#appview{--radius:20px;--shadow:var(--sh2)}
.card{background:var(--card);border:1px solid var(--edge);border-radius:var(--radius);box-shadow:var(--shadow);padding:16px;margin-bottom:16px}
.row{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.row>.grow{flex:1;min-width:120px}
label.l{display:block;font-size:14px;font-weight:700;color:var(--ink-2);margin:0 0 6px}
.field{margin-bottom:14px}
input[type=text],input[type=number],select,textarea{width:100%;min-height:48px;background:var(--bg);border:2px solid var(--line);border-radius:14px;padding:10px 12px}
textarea{min-height:110px;resize:vertical}
input:focus,select:focus,textarea:focus{outline:3px solid var(--sun);outline-offset:1px;border-color:var(--ink)}
.hint{font-size:13.5px;color:var(--muted);margin:6px 0 0}
.seg{display:flex;background:var(--soft);border-radius:999px;padding:4px;gap:4px;border:1px solid var(--edge)}
.seg button{flex:1;border:0;background:transparent;border-radius:999px;min-height:40px;font-weight:700;font-size:14.5px;color:var(--ink-2);cursor:pointer}
.seg button[aria-pressed="true"]{background:var(--ink);color:var(--bg)}
.result{background:var(--brand-soft);border-radius:16px;padding:14px 16px;margin-top:6px;border:1px solid var(--edge)}
.result b.big{display:block;font:800 32px/1.2 var(--display);color:var(--ink)}
.result .err{color:var(--danger);font-weight:700}
.empty{text-align:center;padding:32px 16px;color:var(--muted)}
.empty svg{width:96px;height:96px;opacity:.9}
table.t{width:100%;border-collapse:collapse;font-size:15px}
table.t th{text-align:left;font-size:13px;color:var(--muted);font-weight:700;padding:8px 6px;border-bottom:1px solid var(--edge)}
table.t td{padding:10px 6px;border-bottom:1px solid var(--line)}
table.t tr.hl td{background:var(--sun);color:#1B1A3A;font-weight:800}
.switch{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:52px;border-bottom:1px solid var(--line)}
.switch:last-child{border-bottom:0}
.switch input[type=checkbox]{width:22px;height:22px;accent-color:var(--brand)}
.proj{display:flex;align-items:center;gap:14px;text-decoration:none;color:var(--ink);transition:transform .2s,box-shadow .2s}
.proj:hover{transform:translateY(-2px);box-shadow:var(--sh3)}
.proj .dot{width:46px;height:46px;border-radius:14px;display:grid;place-items:center;flex:none;color:#fff;font-weight:800;font-size:18px;border:1px solid var(--edge)}
.proj h3{margin:0;font-size:18px}
.proj p{margin:2px 0 0;color:var(--muted);font-size:14px}
.proj .count{margin-left:auto;font:800 24px var(--display);color:var(--brand)}
.fab{position:fixed;right:20px;bottom:calc(92px + var(--safe-b));z-index:15;height:56px;padding:0 22px;border-radius:999px;border:1px solid var(--edge);background:var(--brand);color:var(--on-brand);font-weight:800;font-size:16px;box-shadow:var(--sh2);display:flex;align-items:center;gap:8px;cursor:pointer}
.fab svg{width:22px;height:22px}
.counter{position:relative;text-align:center;padding:14px 14px 16px}
.counter .cname{display:flex;align-items:center;justify-content:center;gap:6px;font-weight:800;color:var(--ink-2);font-size:15px}
.counter .cname button{border:0;background:none;color:var(--muted);padding:4px;cursor:pointer;min-width:32px;min-height:32px}
.counter .val{font:800 92px/1 var(--display);letter-spacing:-.04em;font-variant-numeric:tabular-nums;margin:6px 0 4px}
.counter.small .val{font-size:58px}
.counter .sub{font-size:14px;color:var(--muted);min-height:20px}
.counter .sub b{color:var(--brand)}
.counter .ctrl{display:grid;grid-template-columns:76px 1fr;gap:12px;margin-top:12px}
.counter .minus{height:72px;border-radius:20px;border:1px solid var(--edge);background:var(--soft);font-size:34px;font-weight:800;cursor:pointer;color:var(--ink)}
.counter .plus{height:72px;border-radius:20px;border:1px solid var(--edge);background:var(--brand);color:var(--on-brand);font-size:40px;font-weight:800;cursor:pointer;touch-action:manipulation;box-shadow:var(--sh2)}
.counter.main .plus{height:120px;font-size:58px}
.counter.main .minus{height:120px}
.counter .plus:active,.counter .minus:active{transform:translateY(0);box-shadow:none}
.bar{height:8px;background:var(--soft);border-radius:4px;overflow:hidden;margin-top:10px;border:1px solid var(--line)}
.bar i{display:block;height:100%;background:var(--sun);width:0}
.tools-row{display:flex;gap:8px;margin:4px 0 16px;overflow-x:auto;padding:2px 4px 6px}
.tools-row .btn{min-height:44px;padding:0 14px;font-size:14.5px;flex:none}
.timer{font-variant-numeric:tabular-nums}
.flash{animation:flash .6s}
@keyframes flash{0%{background:var(--sun)}100%{background:var(--card)}}
.sheet-back{position:fixed;inset:0;background:rgba(16,15,36,.5);z-index:50;display:flex;align-items:flex-end;justify-content:center}
.sheet{background:var(--card);width:100%;max-width:560px;border-radius:24px 24px 0 0;border:1px solid var(--edge);border-bottom:0;padding:20px 16px calc(20px + var(--safe-b));max-height:92vh;overflow:auto;animation:up .22s ease-out}
.sheet h2{margin:0 0 14px;font-size:22px}
@keyframes up{from{transform:translateY(40px);opacity:.4}to{transform:none;opacity:1}}
.toast{position:fixed;left:50%;bottom:calc(104px + var(--safe-b));transform:translateX(-50%);background:var(--ink);color:var(--bg);padding:10px 16px;border-radius:14px;font-size:14.5px;z-index:60;display:flex;gap:14px;align-items:center;max-width:92vw;box-shadow:var(--sh1)}
.toast button{background:none;border:0;color:var(--sun);font-weight:800;cursor:pointer;padding:4px}
.colors{display:flex;gap:10px;flex-wrap:wrap}
.colors button{width:40px;height:40px;border-radius:12px;border:3px solid transparent;cursor:pointer}
.colors button[aria-pressed="true"]{border-color:var(--ink);box-shadow:var(--sh1)}
h2.sec{font:800 14px var(--font);color:var(--muted);text-transform:uppercase;letter-spacing:.08em;margin:22px 4px 10px}
.mono{font-variant-numeric:tabular-nums}
.instr{font-size:18px;font-weight:700;line-height:1.5;color:var(--ink)}
@media (prefers-reduced-motion:reduce){.studio a,.studio img,.proj,.sheet{transition:none;animation:none}.studio a:hover,.proj:hover{transform:none}.studio a:hover img{transform:none}}
.empty-pic{display:block;width:min(320px,80%);height:auto;aspect-ratio:4/3;object-fit:cover;margin:6px auto 4px;border:1px solid var(--edge);border-radius:20px;box-shadow:var(--sh2);transform:rotate(-2deg)}
.empty h2{font-size:26px}
.empty p{max-width:42ch;margin:0 auto 18px}
.phero{display:flex;flex-wrap:wrap;gap:16px 24px;align-items:flex-end;justify-content:space-between;margin:4px 0 18px}
.phero h2{font:800 clamp(28px,4vw,40px)/1.05 var(--display);margin:0 0 6px;letter-spacing:-.03em}
.phero p{margin:0;color:var(--ink-2);max-width:44ch}
.stats{display:flex;gap:10px;flex-wrap:wrap}
.stats div{border:1px solid var(--edge);border-radius:16px;padding:8px 14px;background:var(--soft);min-width:84px}
.stats b{display:block;font:800 24px/1.1 var(--display)}
.stats span{font-size:12.5px;font-weight:700;color:var(--ink-2)}
.starts{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:14px;margin-bottom:8px}
.start{display:flex;align-items:center;gap:14px;text-align:left;text-decoration:none;color:var(--ink);background:var(--card);border:1px solid var(--edge);border-radius:20px;padding:12px;box-shadow:var(--sh2);cursor:pointer;font:inherit;transition:transform .2s,box-shadow .2s}
.start:hover{transform:translateY(-2px);box-shadow:var(--sh3)}
.start img{width:84px;height:72px;object-fit:cover;border-radius:12px;border:1px solid var(--edge);flex:none}
.start .ic{width:52px;height:52px;border-radius:14px;border:1px solid var(--edge);display:grid;place-items:center;background:var(--sun);color:#1B1A3A;flex:none}
.start .ic.chk{background:var(--brand-soft);color:var(--ink)}
.start .ic svg{width:26px;height:26px}
.start b{display:block;font:800 17px/1.2 var(--display)}
.start small{display:block;color:var(--ink-2);font-size:13.5px;margin-top:2px}
@media (max-width:700px){.starts{grid-template-columns:1fr}}
.pgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:16px}
.pcard{display:flex;flex-direction:column;text-decoration:none;color:var(--ink);background:var(--card);border:1px solid var(--edge);border-radius:20px;overflow:hidden;box-shadow:var(--sh2);transition:transform .25s,box-shadow .25s}
.pcard:hover{transform:translateY(-3px);box-shadow:var(--sh3)}
.pcard img,.pcard .noimg{width:100%;height:auto;aspect-ratio:4/3;object-fit:cover;border-bottom:1px solid var(--edge)}
.pcard .noimg{display:grid;place-items:center;background:var(--soft);font:800 48px var(--display)}
.pcard .pt{padding:12px 14px 14px;display:flex;flex-direction:column;gap:4px}
.pcard b{font:800 18px/1.2 var(--display)}
.pcard small{color:var(--ink-2);font-size:13.5px}
.pcard .cont{font-weight:800;color:var(--brand);font-size:14.5px;margin-top:4px}
.proj .bar,.pcard .bar{display:block;height:8px;border-radius:4px;background:var(--soft);overflow:hidden;margin-top:8px;border:1px solid var(--line)}
.proj .bar i,.pcard .bar i{display:block;height:100%;background:var(--sun)}
.proj .count{display:flex;flex-direction:column;align-items:flex-end;line-height:1}
.proj .count b{font:800 28px var(--display);color:var(--brand)}
.proj .count small{font-size:11.5px;font-weight:700;color:var(--muted);margin-top:4px;font-family:var(--font)}
.none{color:var(--ink-2);background:var(--soft);border:2px dashed var(--line);border-radius:18px;padding:16px 18px;margin:0 0 8px}
#appview .btn.primary{background:var(--brand);color:var(--on-brand)}
#appview .btn.danger{color:var(--danger)}
#appview .btn.block{width:100%}
#appview .chips{display:flex;gap:8px;overflow-x:auto;padding:4px 4px 16px;scrollbar-width:none}
.apptop{display:flex;align-items:center;gap:8px;margin:0 0 14px}
.apptop h1{font-size:clamp(28px,4vw,40px);letter-spacing:-.03em;flex:1}
.icon-btn{width:44px;height:44px;border-radius:999px;border:1px solid var(--edge);background:var(--card);display:grid;place-items:center;cursor:pointer;color:var(--ink)}
.icon-btn svg{width:22px;height:22px}
.hidden{display:none!important}
.fab{bottom:calc(24px + env(safe-area-inset-bottom,0px))}
@media (max-width:720px){.fab{bottom:calc(92px + env(safe-area-inset-bottom,0px));right:16px}}
#view,#view *{min-width:0}#view .card{overflow-x:auto}table.t td,table.t th{overflow-wrap:anywhere}