*{
  box-sizing:border-box;
}

html,body{
  height:100%;
}

body{
  margin:0;
  font-family: 'Arial', sans-serif;
  background: rgb(245, 245, 245); 
}

.app{
  max-width:1100px; 
  margin:0 auto; 
  padding:24px;
}

.btn-back {
  display: inline-block;
  margin-bottom: 16px;  
  color: rgb(0, 0, 0);               
  text-decoration: none;    
  font-size: 14px;
  text-align: center;
  font-weight: bold;
}

.btn-back:hover {
  color: rgb(180,100,70);
}

.topbar{
  display:flex; 
  justify-content:space-between; 
  gap:16px; 
  align-items:flex-start;
  padding:18px 18px 10px;
}

h1{
  margin:0; 
  font-size:32px; 
}

.subtitle{
  margin:6px 0 0;
  opacity: 0.75;
  line-height:1.5;
}

.top-actions{
  display:flex; 
  gap:10px; 
  align-items:center; 
  flex-wrap:wrap;
}

.grid{
  display:grid;
  grid-template-columns: 360px 1fr;
  gap:16px;
  padding:8px 12px 24px;
}

.card{
  background: rgb(234, 232, 230);
  border-radius: 18px;
}

.panel{
  padding:16px;
}

.panel h2,.garden h2{
  margin:0 0 12px;
  font-size:18px;
}

.garden{
  padding:16px; 
  position:relative;
}

.mood-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:10px;
}

.mood{
  display:flex; 
  align-items:center; 
  justify-content:space-between;
  padding:10px 12px;
  border-radius: 14px;
  border: 1px solid rgb(240,240,240);
  background: rgb(240,240,240);      
  cursor:pointer;
  user-select:none;
  transition: transform .08s ease, background-color .12s ease, border-color .12s ease;
}

.mood:hover{
  transform: translateY(-1px);
  background: rgb(235,235,235);
}

.mood[aria-checked="true"]{
  border-color: rgb(200,200,200);
  background: rgb(225,225,225);
}

.mood .left{
  display:flex; 
  gap:10px; 
  align-items:center;
}

.badge{
  width:14px; 
  height:14px; 
  border-radius:50%;
  border: 1px solid rgb(200,200,200);
}

.mood .name{
  font-size:14px; 
}

.field{
  margin:14px 0 10px;
}

label{
  display:block;
  font-size:13px;
  opacity:.75;
  margin-bottom:8px;
}

textarea{
  width:100%;
  border-radius:14px;
  border:1px solid rgb(240,240,240);
  background: rgb(245,245,245); 
  padding:10px 12px;
  outline:none;
  resize: vertical;
}

.btn{
  border:1px solid rgb(240,240,240);
  background: rgb(245,245,245);
  padding:10px 12px;
  border-radius: 14px;
  cursor:pointer;
  transition: transform .08s ease, background-color .12s ease, border-color .12s ease;
  font-size:13px;
}

.btn:hover{
  transform: translateY(-1px); 
  background: rgb(235,235,235);
}

.btn.primary{
  width:100%;
  background: rgb(180,100,70);  
  color: rgb(250,250,250);
  border-color: rgb(180,100,70);
  font-weight:600;
}

.support{
  margin-top:14px; 
  padding:12px;
}

.subtle{
  background: rgb(240,240,240);
}

.support-title,.small{
  font-size:13px;
  opacity:0.7;
  line-height:1.25;
  margin:8px 0 0;
}

.garden-head{
  margin-bottom:10px;
}

.meta{
  opacity:0.7;
  font-size:13px;
}

.garden-canvas{
  position:relative;
  height: 500px;
  border-radius: 16px;
  border: 1px dashed rgb(200,200,200);
  background: rgb(245,245,245); 
  overflow:hidden;
}

.empty{
  position:absolute;
  inset:0;
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  text-align:center;
}

.empty-title{
  font-size:14px; 
  opacity:0.8; 
  margin-bottom:6px;
}

.empty-sub{
  font-size:12px; 
  max-width:42ch; 
  opacity:0.7; 
}

.flower{
  position: absolute;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  transform-origin: center;
}

.legend{
  display:flex; 
  flex-wrap:wrap; 
  gap:10px;
  margin-top:12px;
  opacity:0.7;
  font-size:12px;
}

.legend-item{
  display:flex; 
  gap:8px;
}

.swatch{
  width:12px; 
  height:12px; 
  border-radius:50%; 
}
.swatch.calm{
  background: rgb(180,187,148)
}
.swatch.anxious{
  background: rgb(188, 53, 53);
}
.swatch.happy{
  background: rgb(249, 202, 70);
}
.swatch.low{
  background: rgb(155,183,212);
}
.swatch.excited{
  background: rgb(242, 167, 181);
}
.swatch.tired{
  background: rgb(149,126,152);
}

.flower-img{
  width: 100px;
  height: 100px;
  object-fit: contain;
  display: block;
  pointer-events: none; 
  user-select: none;
}

.modal{
  position:fixed;
  inset:0;
  display:none;
  align-items:center;
  justify-content:center;
  padding:16px;
  z-index:999;
}

.modal.show{
  display:flex;
}

.modal-backdrop{
  position:absolute; 
  inset:0;
}

.modal-card{
  position:relative;
  width:min(520px, 100%);
  border-radius:15px;
  background: rgb(250,250,250); 
  border: 1px solid rgb(180,100,70);
  overflow:hidden;
}

.modal-header{
  display:flex; 
  justify-content:space-between; 
  align-items:flex-start;
  padding:14px 14px 10px;
  border-bottom: 2px solid rgb(240,240,240);
}

.modal-title{
  font-size:15px; 
  font-weight:800; 
}

.modal-subtitle{
  margin-top:4px;
  font-size:12px;
  opacity:0.7;
}

.icon-btn{
  border:1px solid rgb(240,240,240);
  background: rgb(245,245,245);
  width:34px; 
  height:34px;
  border-radius: 12px;
  cursor:pointer;
}

.modal-body{
  padding:12px 14px;
}

.info-row{
  display:grid;
  grid-template-columns: 110px 1fr;
  gap:10px;
  padding:8px 0;
}

.info-row:last-child{
  border-bottom:none;
}

.k{
  opacity:0.7; 
  font-size:12px;
}
.v{
  font-size:13px; 
  line-height:1.5; 
  white-space:pre-wrap;
}

.modal-footer{
  display:flex; 
  gap:10px; 
  justify-content:center;
  padding:12px 14px 14px;
  border-top: 2px solid rgb(240,240,240);
}

.btn.danger {
  background: rgb(180,100,70);  
  color: rgb(250,250,250);
  border-color: rgb(180,100,70);
}


@media (max-width: 920px){
  .grid{
    grid-template-columns: 1fr; 
  }
  .garden-canvas{
    height: 520px;
  }
}

