/* FPG schedule demo. Tokens follow the live services app (olive / lime, Manrope); light and dark. */
@font-face{font-family:"Manrope";src:url("../fonts/manrope-latin.woff2") format("woff2");font-weight:200 800;font-display:swap}
:root{
  --bg:#f3f5f2; --surface:#ffffff; --surface-2:#f7f8f6; --ink:#1f2a17; --muted:#5d645b; --line:#d9ddd6; --hair:#e8ebe5;
  --olive:#56693f; --olive-d:#475734; --olive-soft:#e7eae4; --lime:#a9b84c; --lime-d:#69732e; --lime-soft:#f1f4e1;
  --accent:#475734; --accent-ink:#ffffff; --focus:#2f6f9f;
  --free:#2f6b3a; --free-soft:#e3f0e3; --part:#7a5d00; --part-soft:#f7efd2; --full:#a3322a; --full-soft:#f9e4e1; --offc:#6a7068; --off-soft:#eceeea;
  --t-olive:#56693f; --t-sky:#2c6a98; --t-copper:#a85a26; --t-violet:#6a4c9c; --t-plum:#8a3b5c; --t-teal:#1d7369; --t-slate:#4b5968; --t-sand:#8b6c1f; --t-grey:#6a7068;
  --c1:#56693f; --c2:#2c6a98; --c3:#8a3b5c; --c4:#a85a26; --c5:#1d7369;
  --shadow:0 1px 2px rgba(20,30,10,.06),0 6px 20px rgba(20,30,10,.07); --shadow-lg:0 12px 48px rgba(20,30,10,.22);
  --r:16px; --r-sm:10px; --pill:999px; --font:"Manrope",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
  --tap:48px; --bar-h:64px; --top-h:64px;
  color-scheme:light;
}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]){
  --bg:#121a0e; --surface:#1c2616; --surface-2:#172012; --ink:#f1f4ee; --muted:#a8aea5; --line:#38432f; --hair:#2a3423;
  --olive:#8fa874; --olive-d:#a5ba8c; --olive-soft:#2c3a20; --lime:#c3d16a; --lime-d:#c3d16a; --lime-soft:#33401c;
  --accent:#a5ba8c; --accent-ink:#121a0e; --focus:#8cc4f0;
  --free:#8fd19a; --free-soft:#1e3322; --part:#e8c766; --part-soft:#3a321a; --full:#ff9a8f; --full-soft:#3d201d; --offc:#a8aea5; --off-soft:#242c1f;
  --t-olive:#a5ba8c; --t-sky:#8cc4f0; --t-copper:#eaa772; --t-violet:#c3adf0; --t-plum:#eba0bd; --t-teal:#7fd3c6; --t-slate:#b4c2d0; --t-sand:#e0c27a; --t-grey:#b8bdb5;
  --c1:#a5ba8c; --c2:#8cc4f0; --c3:#eba0bd; --c4:#eaa772; --c5:#7fd3c6;
  --shadow:0 1px 2px rgba(0,0,0,.3),0 8px 24px rgba(0,0,0,.3); --shadow-lg:0 12px 48px rgba(0,0,0,.55); color-scheme:dark}}
:root[data-theme="dark"]{
  --bg:#121a0e; --surface:#1c2616; --surface-2:#172012; --ink:#f1f4ee; --muted:#a8aea5; --line:#38432f; --hair:#2a3423;
  --olive:#8fa874; --olive-d:#a5ba8c; --olive-soft:#2c3a20; --lime:#c3d16a; --lime-d:#c3d16a; --lime-soft:#33401c;
  --accent:#a5ba8c; --accent-ink:#121a0e; --focus:#8cc4f0;
  --free:#8fd19a; --free-soft:#1e3322; --part:#e8c766; --part-soft:#3a321a; --full:#ff9a8f; --full-soft:#3d201d; --offc:#a8aea5; --off-soft:#242c1f;
  --t-olive:#a5ba8c; --t-sky:#8cc4f0; --t-copper:#eaa772; --t-violet:#c3adf0; --t-plum:#eba0bd; --t-teal:#7fd3c6; --t-slate:#b4c2d0; --t-sand:#e0c27a; --t-grey:#b8bdb5;
  --c1:#a5ba8c; --c2:#8cc4f0; --c3:#eba0bd; --c4:#eaa772; --c5:#7fd3c6;
  --shadow:0 1px 2px rgba(0,0,0,.3),0 8px 24px rgba(0,0,0,.3); --shadow-lg:0 12px 48px rgba(0,0,0,.55); color-scheme:dark}

*{box-sizing:border-box}
html,body{height:100%}
body{margin:0;background:var(--bg);color:var(--ink);font:500 16px/1.45 var(--font);-webkit-font-smoothing:antialiased;-webkit-tap-highlight-color:transparent}
button,input,select,textarea{font:inherit;color:inherit}
button{cursor:pointer;border:0;background:none;padding:0}
:focus-visible{outline:3px solid var(--focus);outline-offset:2px;border-radius:8px}
.num{font-variant-numeric:tabular-nums}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
svg.i{width:20px;height:20px;flex:none;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
svg.i.s{width:16px;height:16px} svg.i.l{width:24px;height:24px}

/* ---------- demo ribbon ---------- */
.ribbon{display:flex;align-items:center;gap:10px;justify-content:center;flex-wrap:wrap;padding:6px max(16px,env(safe-area-inset-left));background:var(--lime-soft);color:var(--ink);font-size:13px;font-weight:600;border-bottom:1px solid var(--line)}
.ribbon button{text-decoration:underline;font-weight:700;min-height:32px;padding:0 6px}

/* ---------- top bar ---------- */
.top{position:sticky;top:0;z-index:20;background:color-mix(in srgb,var(--bg) 92%,transparent);backdrop-filter:blur(10px);border-bottom:1px solid var(--line)}
.top-in{display:flex;align-items:center;gap:10px;min-height:var(--top-h);padding:8px max(16px,env(safe-area-inset-left));max-width:1680px;margin:0 auto}
.brand{display:flex;align-items:center;gap:10px;font-weight:800;font-size:17px;white-space:nowrap}
.brand img{width:32px;height:32px;border-radius:9px}
.brand .chip{font-size:11px;letter-spacing:.06em;text-transform:uppercase;background:var(--lime-soft);color:var(--lime-d);border:1px solid color-mix(in srgb,var(--lime-d) 40%,transparent);padding:2px 7px;border-radius:var(--pill)}
.nav-period{display:flex;align-items:center;gap:4px;margin-left:6px}
.iconbtn{display:inline-grid;place-items:center;min-width:var(--tap);height:var(--tap);border-radius:12px;color:var(--ink)}
.iconbtn:hover{background:var(--surface-2)}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:0 16px;border-radius:12px;border:1.5px solid var(--line);background:var(--surface);font-weight:700;white-space:nowrap}
.btn:hover{border-color:var(--muted)}
a.btn{color:inherit;text-decoration:none}
.btn.primary{background:var(--accent);color:var(--accent-ink);border-color:var(--accent)}
.btn.primary:hover{filter:brightness(1.06)}
.btn.big{min-height:52px;font-size:17px;padding:0 22px;border-radius:14px}
.btn.ghost{border-color:transparent;background:transparent}
.btn.danger{color:var(--full);border-color:color-mix(in srgb,var(--full) 50%,transparent)}
.btn[disabled]{opacity:.45;cursor:not-allowed}
.title{font-weight:800;font-size:18px;white-space:nowrap}
.tabs{display:flex;gap:2px;background:var(--surface-2);border:1px solid var(--line);border-radius:14px;padding:3px}
.tabs button{min-height:40px;padding:0 14px;border-radius:11px;font-weight:700;color:var(--muted);display:flex;align-items:center;gap:7px;white-space:nowrap}
.tabs button[aria-current="true"]{background:var(--surface);color:var(--ink);box-shadow:var(--shadow)}
.badge{display:inline-grid;place-items:center;min-width:22px;height:22px;padding:0 6px;border-radius:var(--pill);font-size:12px;font-weight:800;background:var(--olive-soft);color:var(--olive-d)}
.badge.warn{background:var(--full-soft);color:var(--full)}
.spacer{flex:1}
.selectwrap{position:relative;display:flex;align-items:center}
.selectwrap select{appearance:none;min-height:44px;border-radius:12px;border:1.5px solid var(--line);background:var(--surface);padding:0 34px 0 12px;font-weight:700}
.selectwrap svg{position:absolute;right:10px;pointer-events:none}
.hide-phone{} .only-phone{display:none}
@media (max-width:1560px){.brand .name{display:none}}
@media (max-width:1500px) and (min-width:761px){.top-in{flex-wrap:wrap}.top-in .tabs{order:10;width:100%;justify-content:flex-start}.top-in .tabs button{flex:1;justify-content:center}}

/* ---------- main ---------- */
main{max-width:1680px;margin:0 auto;padding:16px max(16px,env(safe-area-inset-left)) calc(var(--bar-h) + 96px)}
.layout{display:grid;grid-template-columns:minmax(0,1fr) 272px;gap:16px;align-items:start}
.layout.solo{grid-template-columns:minmax(0,1fr)}
.panel{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);box-shadow:var(--shadow)}
.panel-h{display:flex;align-items:center;gap:10px;padding:14px 16px;border-bottom:1px solid var(--hair);font-weight:800}
.hint{color:var(--muted);font-size:14px;font-weight:600}
.legend{display:flex;flex-wrap:wrap;gap:6px 14px;font-size:13px;color:var(--muted);font-weight:600;margin:10px 2px 0}
.legend span{display:inline-flex;align-items:center;gap:6px}

/* ---------- room pips ---------- */
.room{display:flex;align-items:center;gap:7px;font-size:13px;font-weight:800;min-height:22px}
.pips{display:inline-flex;gap:3px}
.pips i{display:block;width:12px;height:12px;border-radius:4px;border:2px solid var(--free);background:transparent}
.pips i.b{background:var(--muted);border-color:var(--muted)}
.pips i.h{background:linear-gradient(135deg,var(--part) 50%,transparent 50%);border-color:var(--part)}
.room.free{color:var(--free)} .room.part{color:var(--part)} .room.full{color:var(--full)} .room.off{color:var(--offc)}
.room.full .pips i{border-color:var(--full);background:var(--full)}

/* ---------- job card ---------- */
.card{--tone:var(--t-grey);position:relative;display:flex;gap:8px;align-items:flex-start;width:100%;text-align:left;padding:8px 10px 8px 12px;border-radius:12px;background:color-mix(in srgb,var(--tone) 13%,var(--surface));border:1px solid color-mix(in srgb,var(--tone) 34%,transparent);min-height:44px;touch-action:manipulation;user-select:none;-webkit-user-select:none}
.card::before{content:"";position:absolute;left:0;top:6px;bottom:6px;width:4px;border-radius:4px;background:var(--tone)}
.card .ic{color:var(--tone);margin-top:1px}
.card .tx{min-width:0;flex:1;display:grid;gap:1px}
.card .t1{font-weight:800;font-size:14px;line-height:1.25;overflow-wrap:anywhere}
.card .t2{font-size:12.5px;color:var(--muted);font-weight:650;line-height:1.3}
.card .tags{display:flex;flex-wrap:wrap;gap:4px;margin-top:3px}
.tag{display:inline-flex;align-items:center;gap:4px;font-size:11.5px;font-weight:800;padding:1px 7px;border-radius:var(--pill);background:var(--surface);border:1px solid var(--line);color:var(--muted)}
.tag.wait{border-style:dashed;color:var(--part);border-color:var(--part)}
.tag.bad{color:var(--full);border-color:var(--full);background:var(--full-soft)}
.tag.ok{color:var(--free);border-color:color-mix(in srgb,var(--free) 50%,transparent)}
.card.tentative{border-style:dashed;border-width:1.5px}
.card.done{opacity:.62}
.card.done .t1{text-decoration:line-through;text-decoration-thickness:1.5px}
.card.bad{box-shadow:0 0 0 2px var(--full)}
.card:hover{filter:brightness(.985)}
.card.lift{box-shadow:var(--shadow-lg);transform:scale(1.03);z-index:50}
.card.flash{animation:flash 1.2s ease-out}
@keyframes flash{0%{box-shadow:0 0 0 4px var(--lime)}100%{box-shadow:0 0 0 0 transparent}}
.tone-olive{--tone:var(--t-olive)} .tone-sky{--tone:var(--t-sky)} .tone-copper{--tone:var(--t-copper)} .tone-violet{--tone:var(--t-violet)}
.tone-plum{--tone:var(--t-plum)} .tone-teal{--tone:var(--t-teal)} .tone-slate{--tone:var(--t-slate)} .tone-sand{--tone:var(--t-sand)} .tone-grey{--tone:var(--t-grey)}

/* avatars */
.ava{display:inline-grid;place-items:center;width:30px;height:30px;border-radius:50%;font-size:12px;font-weight:800;background:var(--surface-2);border:2px solid var(--crewc,var(--line));color:var(--ink);flex:none}
.ava.sm{width:24px;height:24px;font-size:10.5px;border-width:1.5px}
.ava.off{opacity:.45;border-style:dashed}
.avas{display:inline-flex}
.avas .ava+.ava{margin-left:-6px}
.crewdot{display:inline-block;width:10px;height:10px;border-radius:50%;background:var(--crewc);flex:none}

/* ---------- week board (desktop) ---------- */
.board{display:grid;grid-template-columns:150px repeat(var(--cols),minmax(150px,1fr));border:1px solid var(--line);border-radius:var(--r);background:var(--surface);box-shadow:var(--shadow);overflow:hidden}
.board-wrap{overflow-x:auto;border-radius:var(--r)}
.bh{position:sticky;top:0;z-index:2;background:var(--surface-2);border-bottom:1px solid var(--line);padding:10px 10px 8px;display:grid;gap:4px;border-left:1px solid var(--hair)}
.bh:first-child{border-left:0}
.bh .d1{font-weight:800;font-size:15px;display:flex;align-items:baseline;gap:6px}
.bh .d1 b{font-size:20px}
.bh.today .d1 b{display:inline-grid;place-items:center;min-width:32px;height:32px;border-radius:50%;background:var(--accent);color:var(--accent-ink)}
.bh .d2{font-size:12px;color:var(--muted);font-weight:700}
.rowh{padding:12px;border-top:1px solid var(--hair);display:grid;gap:6px;align-content:start;background:var(--surface-2)}
.rowh .rn{display:flex;align-items:center;gap:8px;font-weight:800}
.rowh .rm{font-size:13px;color:var(--muted);font-weight:650}
.cell{position:relative;border-top:1px solid var(--hair);border-left:1px solid var(--hair);padding:8px;display:flex;flex-direction:column;gap:6px;min-height:118px;cursor:pointer}
.cell:hover{background:color-mix(in srgb,var(--surface-2) 60%,var(--surface))}
.cell.today{background:color-mix(in srgb,var(--olive-soft) 40%,var(--surface))}
.cell.isoff{background:repeating-linear-gradient(135deg,var(--off-soft) 0 8px,transparent 8px 16px)}
.cell .addrow{margin-top:auto;display:flex;align-items:center;justify-content:center;gap:6px;min-height:36px;border-radius:10px;border:1.5px dashed var(--line);color:var(--muted);font-size:13px;font-weight:800;opacity:.0;transition:opacity .12s}
.cell:hover .addrow,.cell:focus-within .addrow{opacity:1}
.cell.fit{outline:3px solid var(--free);outline-offset:-3px;background:var(--free-soft)}
.cell.nofit{background:var(--full-soft)}
.cell.nofit::after{content:attr(data-why);position:absolute;right:8px;top:8px;font-size:11px;font-weight:800;color:var(--full)}
.cell.over{outline:3px solid var(--accent);outline-offset:-3px}

/* ---------- side tray ---------- */
.tray{position:sticky;top:calc(var(--top-h) + 16px)}
.tray .list{display:grid;gap:8px;padding:12px}
.titem{display:grid;gap:8px;padding:10px;border:1px solid var(--line);border-radius:12px;background:var(--surface-2)}
.titem .row{display:flex;gap:8px;align-items:center}
.empty{padding:22px 16px;color:var(--muted);font-weight:650;text-align:center}

/* ---------- day (desktop time grid) ---------- */
.dgrid{display:grid;grid-template-columns:64px repeat(var(--cols),minmax(170px,1fr));border:1px solid var(--line);border-radius:var(--r);background:var(--surface);box-shadow:var(--shadow);overflow:hidden}
.dcolh{padding:10px;border-left:1px solid var(--hair);border-bottom:1px solid var(--line);background:var(--surface-2);display:grid;gap:4px}
.dcolh .rn{display:flex;align-items:center;gap:8px;font-weight:800}
.dtimes{position:relative;border-right:1px solid var(--hair)}
.dtimes span{position:absolute;right:8px;transform:translateY(-50%);font-size:12px;color:var(--muted);font-weight:700}
.dcol{position:relative;border-left:1px solid var(--hair);cursor:pointer}
.dcol .hl{position:absolute;left:0;right:0;border-top:1px solid var(--hair)}
.dcol .win{position:absolute;left:0;right:0;background:color-mix(in srgb,var(--olive-soft) 35%,transparent);border-top:1px dashed var(--line)}
.dcol .offh{position:absolute;left:0;right:0;background:repeating-linear-gradient(135deg,var(--off-soft) 0 8px,transparent 8px 16px)}
.dcol .gap{position:absolute;left:4px;right:4px;border-radius:10px;border:1.5px dashed color-mix(in srgb,var(--free) 60%,transparent);color:var(--free);font-size:12px;font-weight:800;display:flex;align-items:flex-start;justify-content:center;padding-top:6px;opacity:0;transition:opacity .12s}
.dcol:hover .gap{opacity:1}
.dcol .card{position:absolute;left:4px;right:4px;width:auto;overflow:hidden}
.nowline{position:absolute;left:0;right:0;height:2px;background:var(--full);z-index:3}

/* ---------- phone: week strip + lanes ---------- */
.strip{display:grid;grid-template-columns:repeat(7,1fr);gap:4px;margin-bottom:12px}
.strip button{display:grid;justify-items:center;gap:2px;padding:8px 0 7px;border-radius:14px;min-height:64px}
.strip .w{font-size:12px;font-weight:800;color:var(--muted);text-transform:uppercase}
.strip .n{font-size:18px;font-weight:800}
.strip .bar{width:70%;height:5px;border-radius:3px;background:var(--line);overflow:hidden;display:flex}
.strip .bar i{display:block;height:100%;background:var(--olive)}
.strip button[aria-current="true"]{background:var(--accent);color:var(--accent-ink)}
.strip button[aria-current="true"] .w{color:inherit}
.strip button[aria-current="true"] .bar{background:color-mix(in srgb,var(--accent-ink) 35%,transparent)}
.strip button[aria-current="true"] .bar i{background:var(--accent-ink)}
.strip button.istoday:not([aria-current="true"]) .n{color:var(--olive-d);text-decoration:underline;text-underline-offset:4px}
.lane{margin-bottom:12px}
.lane-h{display:flex;align-items:center;gap:10px;padding:12px 14px;border-bottom:1px solid var(--hair)}
.lane-h .rn{font-weight:800;font-size:17px;display:flex;align-items:center;gap:8px}
.lane-h .spacer{flex:1}
.lane-b{display:grid;gap:8px;padding:10px}
.free-row{display:flex;align-items:center;gap:10px;min-height:var(--tap);padding:0 12px;border-radius:12px;border:1.5px dashed color-mix(in srgb,var(--free) 55%,transparent);color:var(--free);font-weight:800;font-size:14px;width:100%;text-align:left;background:color-mix(in srgb,var(--free-soft) 50%,transparent)}
.offnote{font-size:13px;color:var(--muted);font-weight:700;padding:0 4px}
.dayhead{display:flex;align-items:baseline;gap:10px;margin:2px 2px 10px}
.dayhead h2{margin:0;font-size:22px}

/* phone week grid */
.pweek{display:grid;grid-template-columns:repeat(var(--cols),1fr);gap:4px}
.pweek .ph{font-size:12px;font-weight:800;color:var(--muted);text-align:center;padding:4px 0}
.pweek .ph b{display:block;font-size:16px;color:var(--ink)}
.pweek .ph.today b{color:var(--olive-d);text-decoration:underline;text-underline-offset:3px}
.pweek .rlab{grid-column:1/-1;display:flex;align-items:center;gap:8px;font-weight:800;padding:10px 2px 2px}
.pcell{display:grid;justify-items:center;gap:4px;padding:8px 2px;border-radius:12px;background:var(--surface);border:1px solid var(--line);min-height:62px;font-size:12px;font-weight:800}
.pcell.isoff{background:repeating-linear-gradient(135deg,var(--off-soft) 0 6px,var(--surface) 6px 12px)}
.pcell .pips i{width:9px;height:9px;border-radius:3px;border-width:1.5px}

/* ---------- bottom bar + fab (phone) ---------- */
.bottom{position:fixed;left:0;right:0;bottom:0;z-index:30;display:none;grid-template-columns:repeat(5,1fr);background:color-mix(in srgb,var(--surface) 96%,transparent);backdrop-filter:blur(10px);border-top:1px solid var(--line);padding-bottom:env(safe-area-inset-bottom)}
.bottom button{display:grid;justify-items:center;align-content:center;gap:2px;min-height:var(--bar-h);font-size:11.5px;font-weight:800;color:var(--muted);position:relative}
.bottom button[aria-current="true"]{color:var(--olive-d)}
.bottom button[aria-current="true"] svg{stroke-width:2.4}
.bottom .badge{position:absolute;top:6px;left:calc(50% + 6px);min-width:18px;height:18px;font-size:11px}
.fab{position:fixed;right:max(16px,env(safe-area-inset-right));bottom:calc(var(--bar-h) + 16px + env(safe-area-inset-bottom));z-index:31;display:none;align-items:center;gap:8px;min-height:60px;padding:0 22px 0 18px;border-radius:20px;background:var(--accent);color:var(--accent-ink);font-weight:800;font-size:17px;box-shadow:var(--shadow-lg)}

/* ---------- sheet ---------- */
.scrim{position:fixed;inset:0;z-index:60;background:rgba(10,14,8,.42);display:flex;justify-content:flex-end;animation:fade .16s ease-out}
.sheet{width:min(560px,100%);height:100%;background:var(--surface);display:flex;flex-direction:column;box-shadow:var(--shadow-lg);animation:slidein .2s cubic-bezier(.2,.8,.25,1)}
.sheet-h{display:flex;align-items:center;gap:10px;padding:12px 12px 12px 20px;border-bottom:1px solid var(--hair)}
.sheet-h h2{margin:0;font-size:20px;flex:1}
.sheet-b{flex:1;overflow:auto;padding:16px 20px 24px;display:grid;grid-template-columns:minmax(0,1fr);gap:20px;align-content:start}
.sheet-b>*,#dyn>*{min-width:0}
#dyn{grid-template-columns:minmax(0,1fr)}
.sheet-f{display:flex;gap:10px;padding:12px 20px calc(12px + env(safe-area-inset-bottom));border-top:1px solid var(--hair);background:var(--surface)}
.sheet-f .btn.primary{flex:1}
@keyframes slidein{from{transform:translateX(30px);opacity:.4}}
@keyframes slideup{from{transform:translateY(40px);opacity:.4}}
@keyframes fade{from{opacity:0}}
.sec{display:grid;gap:10px}
.sec>h3{margin:0;font-size:13px;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);font-weight:800;display:flex;align-items:center;gap:8px}
.sec>h3 .r{margin-left:auto;text-transform:none;letter-spacing:0;font-size:13px}
.chips{display:flex;flex-wrap:wrap;gap:8px}
.chip{display:inline-flex;align-items:center;gap:8px;min-height:var(--tap);padding:0 14px;border-radius:14px;border:1.5px solid var(--line);background:var(--surface);font-weight:750;font-size:15px;text-align:left}
.chip small{color:var(--muted);font-weight:700;font-size:12.5px}
.chip[aria-pressed="true"]{border-color:var(--accent);background:var(--olive-soft);box-shadow:inset 0 0 0 1px var(--accent)}
.chip .st{font-size:11.5px;font-weight:800;padding:1px 7px;border-radius:var(--pill)}
.chip .st.f{background:var(--free-soft);color:var(--free)} .chip .st.b{background:var(--full-soft);color:var(--full)} .chip .st.o{background:var(--off-soft);color:var(--offc)}
.types{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.types .chip{min-height:58px;flex-direction:row;padding:8px 12px}
.types .chip .ic{color:var(--tone)}
.types .chip span{display:grid}
.field{display:grid;gap:6px}
.field label{font-size:13px;font-weight:800;color:var(--muted)}
.input{min-height:var(--tap);border-radius:12px;border:1.5px solid var(--line);background:var(--surface-2);padding:0 14px;width:100%}
textarea.input{padding:10px 14px;min-height:72px;resize:vertical}
.row2{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.quick{display:grid;gap:8px;padding:14px;border-radius:14px;background:var(--lime-soft);border:1px solid color-mix(in srgb,var(--lime-d) 30%,transparent)}
.quick .input{background:var(--surface)}
.parsed{display:flex;flex-wrap:wrap;gap:6px;font-size:13px;font-weight:700;align-items:center}
.parsed .tag{font-size:12.5px;background:var(--surface);color:var(--ink)}
.stepper{display:flex;align-items:center;gap:8px}
.stepper button{width:var(--tap);height:var(--tap);border-radius:12px;border:1.5px solid var(--line);background:var(--surface);font-size:22px;font-weight:700;display:grid;place-items:center}
.stepper output{min-width:2.4ch;text-align:center;font-size:22px;font-weight:800}
.sugs{display:grid;gap:8px}
.sug{display:flex;gap:12px;align-items:center;min-height:64px;padding:10px 14px;border-radius:14px;border:1.5px solid var(--line);background:var(--surface);text-align:left;width:100%}
.sug[aria-pressed="true"]{border-color:var(--accent);background:var(--olive-soft);box-shadow:inset 0 0 0 1px var(--accent)}
.sug .d{display:grid;justify-items:center;min-width:52px;padding:4px 0;border-radius:10px;background:var(--surface-2);border:1px solid var(--line)}
.sug .d b{font-size:20px;line-height:1.1} .sug .d small{font-size:11.5px;font-weight:800;color:var(--muted);text-transform:uppercase}
.sug .m{display:grid;gap:2px;min-width:0} .sug .m b{font-size:15.5px} .sug .m span{font-size:13px;color:var(--muted);font-weight:650}
.impact{display:flex;gap:10px;align-items:flex-start;padding:12px 14px;border-radius:12px;background:var(--surface-2);border:1px solid var(--line);font-weight:700;font-size:14px}
.impact.closes{background:var(--part-soft);border-color:color-mix(in srgb,var(--part) 40%,transparent)}
.note{padding:12px 14px;border-radius:12px;background:var(--full-soft);color:var(--full);font-weight:750;font-size:14px}
.kv{display:grid;grid-template-columns:96px 1fr;gap:10px 12px;font-size:15px}
.kv dt{color:var(--muted);font-weight:800;font-size:13px;padding-top:2px}
.kv dd{margin:0;font-weight:650}
.actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.actions .btn{justify-content:flex-start}
.confirm{padding:14px;border-radius:14px;border:2px solid var(--full);background:var(--full-soft);display:grid;gap:10px;font-weight:750}

/* ---------- booking ---------- */
.bgrid{display:grid;grid-template-columns:minmax(120px,1.1fr) repeat(3,minmax(0,1fr));gap:6px}
.bgrid .bh2{font-size:12px;font-weight:800;color:var(--muted);text-transform:uppercase;letter-spacing:.05em;padding:6px 4px;text-align:center}
.bgrid .bd{display:flex;align-items:center;gap:8px;font-weight:800;padding:0 4px}
.bgrid .bd small{color:var(--muted);font-weight:700}
.bslot{min-height:52px;border-radius:12px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;font-weight:800;font-size:14px;border:1.5px solid;line-height:1.15}
.bslot small{font-size:11.5px;font-weight:750}
.bslot.open{background:var(--free-soft);color:var(--free);border-color:color-mix(in srgb,var(--free) 45%,transparent)}
.bslot.shut{background:var(--surface-2);color:var(--muted);border-color:var(--line);border-style:dashed}
.bslot.busy{background:var(--full-soft);color:var(--full);border-color:color-mix(in srgb,var(--full) 40%,transparent)}
.bslot.flash{animation:flash 1.4s ease-out}
.bweek{font-weight:800;font-size:13px;color:var(--muted);text-transform:uppercase;letter-spacing:.05em;padding:14px 4px 2px;grid-column:1/-1}

/* ---------- team ---------- */
.tgrid{display:grid;grid-template-columns:minmax(150px,1.4fr) minmax(120px,1fr) repeat(6,minmax(54px,.6fr));gap:6px;align-items:center}
.tgrid .th{font-size:12px;font-weight:800;color:var(--muted);text-transform:uppercase;text-align:center}
.tgrid .tn{display:flex;align-items:center;gap:10px;font-weight:800}
.tday{min-height:var(--tap);border-radius:12px;border:1.5px solid var(--line);font-weight:800;font-size:13px;display:grid;place-items:center}
.tday.on{background:var(--free-soft);color:var(--free);border-color:color-mix(in srgb,var(--free) 40%,transparent)}
.tday.offd{background:var(--off-soft);color:var(--offc);border-style:dashed}
.tsec{grid-column:1/-1;font-weight:800;font-size:13px;text-transform:uppercase;letter-spacing:.05em;color:var(--muted);padding:12px 2px 0}

/* ---------- crew view ---------- */
.my{display:grid;gap:10px}
.mycard{display:grid;gap:10px;padding:16px;border-radius:var(--r);background:var(--surface);border:1px solid var(--line);box-shadow:var(--shadow)}
.mycard .when{font-size:22px;font-weight:800}
.mycard .what{font-size:18px;font-weight:800;display:flex;gap:8px;align-items:center}
.mycard .addr{font-size:16px;font-weight:650;color:var(--muted)}
.mycard .acts{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.mycard .acts .btn{min-height:56px;flex-direction:column;gap:2px;font-size:13px}

/* ---------- toast ---------- */
.toasts{position:fixed;left:max(24px,env(safe-area-inset-left));bottom:calc(24px + env(safe-area-inset-bottom));z-index:80;display:grid;gap:8px;width:min(520px,calc(100% - 32px))}
.toast{display:flex;align-items:center;gap:12px;padding:12px 12px 12px 16px;border-radius:14px;background:var(--ink);color:var(--bg);box-shadow:var(--shadow-lg);font-weight:700;animation:slideup .18s ease-out}
.toast .msg{flex:1}
.toast button{min-height:40px;padding:0 12px;border-radius:10px;font-weight:800;color:var(--lime)}
.toast.bad{background:var(--full);color:#fff}
.toast.bad button{color:#fff;text-decoration:underline}

/* ---------- drag ghost ---------- */
.dragghost{position:fixed;z-index:100;pointer-events:none;width:220px;opacity:.95}

/* ---------- responsive ---------- */
@media (max-width:1100px){.layout{grid-template-columns:minmax(0,1fr)} .tray{position:static}}
@media (max-width:760px){
  :root{--top-h:56px}
  .hide-phone{display:none!important} .only-phone{display:revert}
  .bottom{display:grid} .fab{display:inline-flex}
  .top-in{gap:6px}
  .brand .name,.brand .chip{display:none}
  .brand{display:none}
  .panel-h{flex-wrap:wrap}
  .panel-h>.btn.primary{width:100%}
  .panel-h .spacer{display:none}
  .bgrid{grid-template-columns:82px repeat(3,minmax(0,1fr));gap:5px}
  .bgrid .bd{font-size:14px;flex-wrap:wrap;gap:2px 6px}
  .bslot{min-height:56px;font-size:13px}
  .tscroll{overflow-x:auto;margin:0 -16px;padding:0 16px}
  .tgrid{min-width:420px}
  .tgrid .tn .ava{display:none}
  .ribbon{flex-wrap:nowrap;padding-top:2px;padding-bottom:2px;font-size:12.5px}
  .langbtn svg{display:none}
  .langbtn{min-width:44px}
  .lane-h{flex-wrap:wrap;row-gap:6px}
  .lane-h .room{order:5;width:100%}
  .lane-h .spacer{display:none}
  .title{font-size:14px;letter-spacing:-.01em}
  .top-in{gap:4px}
  .nav-period{margin-left:0;gap:0;flex:1 1 auto;min-width:0}
  .nav-period .title{min-width:0;overflow:hidden;text-overflow:ellipsis}
  .nav-period .iconbtn{min-width:36px}
  .top-in>.spacer{display:none}
  .top-in .iconbtn{min-width:40px}
  .top-in>.btn{padding:0 8px;gap:4px}
  main{padding-top:12px}
  .sheet{width:100%;height:auto;max-height:94dvh;margin-top:auto;border-radius:20px 20px 0 0;animation:slideup .22s cubic-bezier(.2,.8,.25,1)}
  .scrim{align-items:flex-end}
  .sheet-b{padding:14px 16px 20px}
  .sheet-f{padding:12px 16px calc(12px + env(safe-area-inset-bottom))}
  .types{grid-template-columns:repeat(2,minmax(0,1fr))}
  .tgrid{grid-template-columns:minmax(96px,1.2fr) repeat(6,minmax(38px,1fr));gap:4px}
  .tgrid .tcrew{display:none}
  .toasts{left:16px;bottom:calc(var(--bar-h) + 88px + env(safe-area-inset-bottom))}
  .kv{grid-template-columns:80px 1fr}
}
@media (prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}}
