/* Карточки и блоки */
.card{background:var(--card);border:1px solid var(--line);border-radius:var(--r-lg);box-shadow:var(--shadow-sm);padding:16px}
.hero{
  background:linear-gradient(135deg,#2f6b3c 0%,#3f7d49 45%,#6b9b64 100%);
  color:#f7fbf4;border-radius:var(--r-lg);padding:20px;box-shadow:var(--shadow);position:relative;overflow:hidden
}
.hero::after{content:"";position:absolute;right:-40px;top:-50px;width:170px;height:170px;border-radius:50%;background:rgba(255,255,255,.10)}
.hero h1{color:#fff;font-size:28px;margin-bottom:6px;position:relative}
.hero p{color:rgba(255,255,255,.9);font-size:15px;position:relative}
.hero-stats{display:flex;gap:10px;flex-wrap:wrap;margin-top:14px;position:relative}
.hero-stat{background:rgba(255,255,255,.15);border:1px solid rgba(255,255,255,.25);border-radius:14px;padding:8px 12px;min-width:86px}
.hero-stat b{display:block;font-size:22px;line-height:1.15}
.hero-stat span{font-size:12px;opacity:.9}
.btn{
  border:0;border-radius:14px;padding:12px 18px;min-height:46px;font-weight:600;
  background:var(--green);color:#fff;display:inline-flex;align-items:center;justify-content:center;gap:8px;
  box-shadow:var(--shadow-sm)
}
.btn:active{transform:translateY(1px)}
.btn.ghost{background:var(--card);color:var(--green-deep);border:1px solid var(--line);box-shadow:none}
.btn.wood{background:var(--wood);color:#fff}
.btn.danger{background:var(--danger)}
.btn.sm{min-height:38px;padding:8px 13px;border-radius:11px;font-size:14px}
.btn.block{width:100%}
.btn[disabled]{opacity:.55;cursor:not-allowed}
.row{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.chip{display:inline-flex;align-items:center;gap:6px;background:var(--beige);border-radius:999px;padding:5px 11px;font-size:13px;color:var(--green-deep)}
.chip.green{background:#e2efdf;color:var(--green-deep)}
.chip.warn{background:#f8e8cc;color:#8a5a12}
.chip.danger{background:#f7ded9;color:#8c2f26}
.section-title{display:flex;align-items:center;gap:10px;margin:22px 0 12px}
.section-title h2{font-size:20px}
.section-title .line{flex:1;height:1px;background:var(--line)}

/* Список задач */
.task{display:flex;gap:12px;align-items:flex-start;padding:13px 0;border-bottom:1px dashed var(--line)}
.task:last-child{border-bottom:0}
.task-ic{width:42px;height:42px;border-radius:13px;background:var(--beige);display:grid;place-items:center;font-size:20px;flex:0 0 auto}
.task.overdue .task-ic{background:#f7ded9}
.task.today .task-ic{background:#e2efdf}
.task.need .task-ic{background:#f8e8cc}
.task-body{min-width:0;flex:1}
.task-title{font-weight:600}
.task-note{font-size:14px;color:var(--muted);margin-top:2px}
.task-actions{display:flex;gap:6px;flex-wrap:wrap;margin-top:9px}
.empty{text-align:center;padding:26px 16px;color:var(--muted)}
.empty .big{font-size:40px;margin-bottom:6px}

/* Карточка растения */
.plant-card{background:var(--card);border:1px solid var(--line);border-radius:var(--r-lg);overflow:hidden;box-shadow:var(--shadow-sm);display:flex;flex-direction:column}
.plant-card .ph{aspect-ratio:4/3;background:var(--beige);position:relative}
.plant-card .ph svg,.plant-card .ph img{width:100%;height:100%;object-fit:cover;display:block}
.plant-card .body{padding:12px 14px 14px;display:flex;flex-direction:column;gap:7px;flex:1}
.plant-card .name{font-weight:700;font-size:17px}
.plant-card .meta{font-size:13px;color:var(--muted)}
.plant-card .acts{display:flex;gap:8px;margin-top:auto;padding-top:8px}

/* Энциклопедия */
.enc-card{background:var(--card);border:1px solid var(--line);border-radius:var(--r-md);overflow:hidden;box-shadow:var(--shadow-sm);text-align:left;padding:0;border:1px solid var(--line);width:100%}
.enc-card .ph{aspect-ratio:1/1;background:var(--beige)}
.enc-card .ph svg,.enc-card .ph img{width:100%;height:100%;object-fit:cover;display:block}
.enc-card .cap{padding:10px 12px 12px}
.enc-card .cap b{display:block;font-size:15px}
.enc-card .cap span{font-size:13px;color:var(--muted);font-style:italic}
.spec{display:grid;grid-template-columns:minmax(120px,34%) 1fr;gap:6px 12px;font-size:15px}
.spec dt{color:var(--muted);font-size:14px}
.spec dd{margin:0}
.dis{background:#faf2e9;border-radius:var(--r-md);padding:12px 14px;font-size:14px;border-left:4px solid var(--warn)}

/* Формы */
.field{display:block;margin-bottom:13px}
.field > span{display:block;font-size:14px;font-weight:600;margin-bottom:6px;color:#4b4a40}
.field input,.field select,.field textarea{
  width:100%;padding:12px 13px;border-radius:13px;border:1px solid var(--line);background:#fff;min-height:48px
}
.field textarea{min-height:96px;resize:vertical}
.field input:focus,.field select:focus,.field textarea:focus{outline:2px solid var(--sage);border-color:var(--sage)}
.field small{display:block;color:var(--muted);font-size:13px;margin-top:5px}
.form-grid{display:grid;gap:0 14px;grid-template-columns:1fr}
@media(min-width:620px){.form-grid.two{grid-template-columns:1fr 1fr}}
.photo-pick{display:flex;gap:12px;align-items:center;flex-wrap:wrap}
.photo-prev{width:96px;height:96px;border-radius:16px;overflow:hidden;background:var(--beige);border:1px solid var(--line);display:grid;place-items:center}
.photo-prev img,.photo-prev svg{width:100%;height:100%;object-fit:cover}
.photo-prev input{display:none}
.photo-btn{border:1px dashed var(--sage);background:#f4f8f3;border-radius:13px;padding:11px 15px;min-height:46px;display:inline-flex;align-items:center;gap:8px}

/* Модальное окно */
.modal{position:fixed;inset:0;z-index:60;display:none}
.modal.on{display:block}
.modal-bg{position:absolute;inset:0;background:rgba(40,32,22,.45);backdrop-filter:blur(2px)}
.modal-box{
  position:relative;background:var(--milk);border-radius:var(--r-lg);box-shadow:0 24px 60px rgba(0,0,0,.25);
  max-width:640px;width:calc(100% - 24px);max-height:88vh;overflow:auto;margin:5vh auto;padding:18px
}
.modal-head{display:flex;align-items:center;gap:10px;margin-bottom:14px}
.modal-head h2{font-size:21px}
.modal-close{margin-left:auto;width:40px;height:40px;border-radius:12px;border:1px solid var(--line);background:var(--card);font-size:18px}
.toast{
  position:fixed;left:50%;bottom:96px;transform:translate(-50%,16px);z-index:80;
  background:var(--green-deep);color:#fff;padding:12px 18px;border-radius:14px;box-shadow:var(--shadow);
  opacity:0;pointer-events:none;transition:.25s;max-width:calc(100% - 32px);text-align:center
}
.toast.on{opacity:1;transform:translate(-50%,0)}
.toast.err{background:var(--danger)}
@media(min-width:900px){.toast{bottom:28px}}
.timeline{border-left:2px solid var(--sage-soft);margin-left:8px;padding-left:16px;display:flex;flex-direction:column;gap:12px}
.timeline .t-item{position:relative;font-size:15px}
.timeline .t-item::before{content:"";position:absolute;left:-23px;top:6px;width:11px;height:11px;border-radius:50%;background:var(--sage);border:2px solid var(--milk)}
.mini-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px}
.mini-list li{display:flex;gap:10px;align-items:center;background:var(--card);border:1px solid var(--line);border-radius:12px;padding:10px 12px}
.mini-list li.done{opacity:.55;text-decoration:line-through}
.todo-done{width:26px;height:26px;border-radius:9px;border:2px solid var(--sage);background:#fff;flex:0 0 auto}
.todo-done.on{background:var(--green);border-color:var(--green)}

/* Телефон: кнопки и поля — не меньше 44px по высоте (правило в конце файла,
   чтобы перекрывать меньшие значения выше) */
@media (max-width:899px){
  .btn,.btn.sm,.btn.ghost,.btn.wood,.btn.danger{min-height:44px}
  .icon-btn{width:44px;height:44px}
  .modal-close{width:44px;height:44px}
  .photo-btn{min-height:44px}
  .field input,.field select,.field textarea{min-height:44px}
  .nav button{min-height:56px}
  .todo-done{width:44px;height:44px;border-radius:12px}
}

/* Стеллаж: натуральное дерево и живая коллекция растений */
.shelf-page{overflow:hidden}
.shelf-room{position:relative;max-width:920px;margin:0 auto;border-radius:26px;overflow:hidden;background:#e9e3d8;box-shadow:0 20px 48px rgba(58,43,28,.18);border:1px solid #d7c7af;isolation:isolate;padding-bottom:3%}
.shelf-wall{position:absolute;inset:0 0 12% 0;background:linear-gradient(108deg,rgba(255,253,246,.64),transparent 43%),radial-gradient(circle at 18% 9%,#fbf8f0 0,transparent 38%),linear-gradient(135deg,#eeeae2,#d9d4ca);z-index:-2}
.shelf-wall::before{content:"";position:absolute;inset:0;background:linear-gradient(90deg,rgba(255,255,255,.48) 0 14%,transparent 14% 24%,rgba(76,57,40,.07) 24% 25%,transparent 25% 55%,rgba(76,57,40,.055) 55% 56%,transparent 56%);filter:blur(.2px)}
.shelf-room::after{content:"";position:absolute;left:0;right:0;bottom:0;height:13%;background:linear-gradient(#c79c6c,#a87549);z-index:-1;box-shadow:inset 0 5px 12px rgba(71,44,24,.16)}
.shelf-frame{position:relative;width:min(92%,690px);margin:0 auto;padding:3.5% 0 2.4%;z-index:1}
.shelf-frame::before,.shelf-frame::after{content:"";position:absolute;top:-1%;bottom:-1%;width:3.1%;background:repeating-linear-gradient(90deg,#9d6c3e 0 5px,#d6ab73 6px 11px,#b37f4b 12px 16px);box-shadow:0 8px 13px rgba(55,36,19,.25);z-index:6;border-radius:3px}
.shelf-frame::before{left:-2.6%}.shelf-frame::after{right:-2.6%}
.shelf-frame-top{height:21px;margin:0 -5.5% 3px;background:linear-gradient(#dcb17b,#b77c47);border-radius:4px;box-shadow:0 7px 11px rgba(49,31,18,.28)}
.shelf-frame-bottom{height:26px;margin:0 -5.5% -2px;background:linear-gradient(#c18a56,#895a35);border-radius:3px;box-shadow:0 10px 14px rgba(42,27,16,.3)}
.shelf-level{position:relative;display:block;align-items:end;margin:0 -3.5% 29px}
.shelf-level:last-of-type{margin-bottom:8px}.shelf-board{min-height:138px}
.shelf-label{display:none}
.shelf-label span{font-size:15px;font-weight:700}.shelf-label b{font-size:9px;text-transform:uppercase;letter-spacing:.05em}
.shelf-board{position:relative;min-height:138px;padding:0 10px;background:transparent}
.shelf-board::before{content:"";position:absolute;z-index:2;left:-3%;right:-3%;bottom:0;height:22px;background:linear-gradient(#dfb37b 0,#c18b56 48%,#a66e3e 100%);border-radius:4px 4px 6px 6px;box-shadow:0 9px 10px rgba(55,34,18,.34),inset 0 1px rgba(255,241,212,.55)}
.shelf-board::after{content:"";position:absolute;z-index:1;left:-2.5%;right:-2.5%;bottom:-6px;height:7px;background:linear-gradient(#91613c,#75492d);border-radius:0 0 4px 4px}
.shelf-row{position:relative;display:flex;align-items:flex-end;gap:clamp(5px,1.2vw,13px);min-height:138px;padding:0 5px 5px}
.shelf-row::before{content:"";position:absolute;left:0;right:0;top:0;height:30px;background:linear-gradient(rgba(255,255,255,.1),transparent);pointer-events:none}
.slot{position:relative;flex:1 1 0;min-width:0;height:132px;padding:0;border:0;background:none;display:flex;align-items:flex-end;justify-content:center;border-radius:14px 14px 6px 6px;transition:transform .18s ease,filter .18s ease}
.slot:hover{transform:translateY(-4px)}
.slot:focus-visible{outline:3px solid #f2d083;outline-offset:2px}
.slot.filled{height:145px}
.slot.pick .shelf-plant{filter:drop-shadow(0 0 8px rgba(245,211,119,.95));transform:translateY(-5px)}
.shelf-plant{width:100%;max-width:160px;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;transition:transform .18s ease;pointer-events:none}
.shelf-plant .art,.shelf-plant-photo{width:100%;height:126px;object-fit:contain;object-position:center bottom;filter:drop-shadow(0 9px 6px rgba(39,29,18,.3))}
.shelf-plant .art{border-radius:4px;background:transparent}
.shelf-plant-name{width:100%;margin-top:-3px;padding:5px 6px;border-radius:9px;background:rgba(45,69,43,.92);color:#fff;text-align:center;font-size:11px;line-height:1.15;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;box-shadow:0 3px 8px rgba(31,25,16,.24)}
.empty-slot{width:36px;height:36px;display:grid;place-items:center;border:1px dashed rgba(73,49,28,.4);border-radius:50%;color:rgba(73,49,28,.5);font-size:21px;line-height:1;margin-bottom:29px;background:rgba(255,248,232,.12)}
.shelf-help{margin-top:16px}
@media(max-width:600px){
  .shelf-room{border-radius:20px}.shelf-frame{width:95%}
  .shelf-level{margin-left:0;margin-right:0;margin-bottom:25px}
  .shelf-board,.shelf-row{min-height:112px}.shelf-board{padding-left:4px;padding-right:4px}.shelf-row{gap:3px;padding-bottom:4px}
  .slot{height:108px}.slot.filled{height:118px}.shelf-plant .art,.shelf-plant-photo{height:102px}
  .shelf-plant-name{font-size:9px;padding:3px 3px}.empty-slot{width:28px;height:28px;font-size:17px;margin-bottom:23px}
  .shelf-board::before{height:19px}.shelf-board::after{height:6px}
}
@media(max-width:380px){
  .shelf-frame{width:97%}
  .shelf-plant-name{display:none}.shelf-board,.shelf-row{min-height:96px}.slot,.slot.filled{height:94px}.shelf-plant .art,.shelf-plant-photo{height:87px}
}

/* Стеллаж — мультяшный вариант, отодвинут чуть дальше в комнату */
.shelf-room{background:#efe6d6;border-radius:30px;border:2px solid #e0cdb0;
  box-shadow:0 26px 60px rgba(58,43,28,.22),inset 0 2px 0 rgba(255,255,255,.6);
  padding-bottom:7%;perspective:1400px;perspective-origin:50% 42%}
.shelf-wall{inset:0 0 24% 0;background:
  radial-gradient(circle at 22% 12%,rgba(255,252,240,.95) 0,rgba(255,250,235,.35) 26%,transparent 46%),
  radial-gradient(circle at 82% 78%,rgba(214,226,205,.75) 0,transparent 42%),
  linear-gradient(160deg,#f6efe1 0%,#eadfcd 58%,#ded2bd 100%)}
.shelf-wall::before{inset:0;background:
  linear-gradient(90deg,rgba(255,255,255,.5) 0 12%,transparent 12% 21%,rgba(88,66,44,.06) 21% 22%,transparent 22% 52%,rgba(88,66,44,.05) 52% 53%,transparent 53%);
  filter:blur(.3px)}
.shelf-wall::after{content:"";position:absolute;right:7%;top:9%;width:26%;height:34%;border-radius:18px;
  background:linear-gradient(#e8f3f7,#cfe6ee);box-shadow:0 6px 16px rgba(90,80,60,.18),inset 0 0 0 4px rgba(255,255,255,.75)}
.shelf-room::after{height:24%;background:linear-gradient(#d3a271 0,#c08a58 34%,#a97545 100%);
  box-shadow:inset 0 6px 14px rgba(71,44,24,.18);border-top:3px solid #e6c9a4}
.shelf-frame{width:min(86%,640px);transform:translateZ(-70px) scale(.94);transform-origin:50% 46%;padding:5% 0 3%}
.shelf-frame::before,.shelf-frame::after{width:3.6%;border-radius:9px;
  background:repeating-linear-gradient(90deg,#a97545 0 5px,#e0b784 6px 12px,#bd8a55 13px 17px);
  box-shadow:0 10px 16px rgba(55,36,19,.3),inset 0 2px 0 rgba(255,240,214,.6)}
.shelf-frame-top{height:24px;border-radius:10px;background:linear-gradient(#e5b982,#c2884f);
  box-shadow:0 9px 14px rgba(49,31,18,.32),inset 0 2px 0 rgba(255,244,222,.75)}
.shelf-frame-bottom{height:30px;border-radius:9px;background:linear-gradient(#cb9460,#9b6a41);
  box-shadow:0 13px 18px rgba(42,27,16,.34),inset 0 2px 0 rgba(255,238,210,.5)}
.shelf-level{margin:0 -4% 34px}
.shelf-board::before{height:26px;border-radius:8px 8px 10px 10px;
  background:linear-gradient(#e8b87e 0,#d0944f 46%,#b5733c 100%);
  box-shadow:0 12px 14px rgba(55,34,18,.38),inset 0 3px 0 rgba(255,240,212,.7),inset 0 -3px 0 rgba(120,78,40,.35)}
.shelf-board::after{height:8px;border-radius:0 0 7px 7px;background:linear-gradient(#9a6a41,#7d5231)}
.shelf-row{min-height:150px}
.slot{height:142px}
.slot.filled{height:156px}
.slot:hover{transform:translateY(-6px) scale(1.02)}
.slot.pick .shelf-plant{filter:drop-shadow(0 0 10px rgba(245,211,119,.95));transform:translateY(-7px)}
.shelf-plant{max-width:170px}
.shelf-plant .art,.shelf-plant-photo{height:132px;filter:drop-shadow(0 11px 7px rgba(39,29,18,.34)) saturate(1.08)}
.shelf-plant-name{border-radius:11px;background:rgba(52,84,48,.94);padding:6px 8px;font-size:11px;
  box-shadow:0 4px 10px rgba(31,25,16,.28),inset 0 1px 0 rgba(255,255,255,.16)}
.empty-slot{width:40px;height:40px;font-size:23px;margin-bottom:32px;border-width:2px;border-radius:50%;
  background:rgba(255,250,238,.28);box-shadow:inset 0 2px 4px rgba(80,55,32,.14)}
@media(max-width:600px){
  .shelf-frame{width:92%;transform:translateZ(-40px) scale(.95)}
  .shelf-board,.shelf-row{min-height:116px}
  .slot{height:110px}.slot.filled{height:120px}
  .shelf-plant .art,.shelf-plant-photo{height:106px}
  .shelf-board::before{height:21px}.shelf-board::after{height:7px}
  .shelf-room{padding-bottom:8%}
}
@media(max-width:380px){
  .shelf-frame{width:95%}
  .shelf-plant-name{display:none}
  .shelf-board,.shelf-row{min-height:98px}.slot,.slot.filled{height:96px}
  .shelf-plant .art,.shelf-plant-photo{height:90px}
}
