/* Layout: floating sidebar + working canvas; the timeline (staff columns × minutes) is the hero of the app. */
:root{
  --bg:#F1F6F2;--surface:#FFFFFF;--surface-2:#F7FBF8;--sunk:#E3EEE6;
  --ink:#14211A;--muted:#55675C;--faint:#86978C;--rule:#D7E4DB;
  --brand:#00873C;--brand-hi:#009944;--on-brand:#FFFFFF;--brand-soft:#DCF2E4;
  --rose:#E0464E;--rose-soft:#FCE4E5;
  --warn:#93600F;--warn-soft:#FAEFD9;--bad:#AE3F37;--bad-soft:#F8E1DE;--ok:#2B7349;--ok-soft:#DDF0E4;
  --s1:#00873C;--s1-soft:#D6EFDF;--s2:#D6577E;--s2-soft:#F8DEE6;--s3:#3A78C9;--s3-soft:#DCE8F7;--s4:#BD8418;--s4-soft:#F6EBD3;
  --lgreen:#06C755;--lchat:#8EA8CB;--lin:#FFFFFF;--lin-ink:#121212;--lout:#8DE055;--lout-ink:#121212;--lnote:#F4F6F8;
  --shadow:0 1px 2px rgba(18,40,36,.05),0 10px 28px rgba(18,40,36,.07);
  --f-body:"LINE Seed JP","Hiragino Sans","Hiragino Kaku Gothic ProN","Yu Gothic",system-ui,sans-serif;
  --f-display:var(--f-body);
  --r:14px;
}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]){
  --bg:#0E1511;--surface:#16201A;--surface-2:#1B2620;--sunk:#0B110D;
  --ink:#E3EDE6;--muted:#9BAFA2;--faint:#6E8275;--rule:#28362D;
  --brand:#4BD08A;--brand-hi:#66DA9C;--on-brand:#06210F;--brand-soft:#143323;
  --rose:#F2787E;--rose-soft:#3D2124;
  --warn:#E2B464;--warn-soft:#382C15;--bad:#EF8B81;--bad-soft:#3C211F;--ok:#7DCC9A;--ok-soft:#1B3325;
  --s1:#4BD08A;--s1-soft:#143323;--s2:#EF8FB0;--s2-soft:#3A2330;--s3:#8DB4F0;--s3-soft:#1F2C44;--s4:#E5B65C;--s4-soft:#382C15;
  --lchat:#1C2129;--lin:#353B45;--lin-ink:#EAF0F5;--lout:#6CC04A;--lout-ink:#0D1A08;--lnote:#202A35;
  --shadow:0 1px 2px rgba(0,0,0,.3),0 10px 28px rgba(0,0,0,.25);color-scheme:dark}}
:root[data-theme="dark"]{
  --bg:#0E1511;--surface:#16201A;--surface-2:#1B2620;--sunk:#0B110D;
  --ink:#E3EDE6;--muted:#9BAFA2;--faint:#6E8275;--rule:#28362D;
  --brand:#4BD08A;--brand-hi:#66DA9C;--on-brand:#06210F;--brand-soft:#143323;
  --rose:#F2787E;--rose-soft:#3D2124;
  --warn:#E2B464;--warn-soft:#382C15;--bad:#EF8B81;--bad-soft:#3C211F;--ok:#7DCC9A;--ok-soft:#1B3325;
  --s1:#4BD08A;--s1-soft:#143323;--s2:#EF8FB0;--s2-soft:#3A2330;--s3:#8DB4F0;--s3-soft:#1F2C44;--s4:#E5B65C;--s4-soft:#382C15;
  --lchat:#1C2129;--lin:#353B45;--lin-ink:#EAF0F5;--lout:#6CC04A;--lout-ink:#0D1A08;--lnote:#202A35;
  --shadow:0 1px 2px rgba(0,0,0,.3),0 10px 28px rgba(0,0,0,.25);color-scheme:dark}

html,body{height:100%}
body{background:var(--bg);color:var(--ink);font-family:var(--f-body);font-size:14px;line-height:1.6;
  padding-left:max(16px,env(safe-area-inset-left,0px));padding-right:max(16px,env(safe-area-inset-right,0px));padding-block:16px}
*{box-sizing:border-box}
button,input,select,textarea{font:inherit;color:inherit}
button{cursor:pointer}
:focus-visible{outline:2px solid var(--brand);outline-offset:2px}
.num{font-variant-numeric:tabular-nums}

.shell{display:grid;grid-template-columns:224px minmax(0,1fr);gap:20px;max-width:1500px;margin:0 auto;min-height:calc(100% - 0px)}
.side{position:sticky;top:16px;align-self:start;height:calc(100vh - 32px);background:var(--brand);color:var(--on-brand);border-radius:18px;padding:22px 14px;display:flex;flex-direction:column;gap:4px}
.side .brand{display:flex;gap:11px;align-items:center;padding:0 8px 20px}
.mark{width:40px;height:40px;border-radius:50%;background:var(--on-brand);color:var(--brand);display:grid;place-items:center;font-family:var(--f-display);font-size:19px;font-weight:700;flex:none}
.side .brand b{display:block;font-family:var(--f-display);font-size:18px;letter-spacing:.08em;line-height:1.2}
.side .brand small{display:block;font-size:10px;letter-spacing:.12em;opacity:.7}
.nav{display:flex;flex-direction:column;gap:2px}
.nav button{display:flex;align-items:center;gap:11px;width:100%;border:0;background:transparent;color:inherit;opacity:.78;padding:10px 12px;border-radius:10px;text-align:left;font-weight:500;white-space:nowrap}
.nav button:hover{opacity:1;background:color-mix(in srgb,var(--on-brand) 10%,transparent)}
.nav button.on{opacity:1;background:var(--on-brand);color:var(--brand);font-weight:700}
.nav svg{width:18px;height:18px;flex:none}
.nav .badge{margin-left:auto;background:var(--rose);color:var(--surface);font-size:10px;font-weight:700;border-radius:99px;min-width:20px;height:20px;display:grid;place-items:center;padding:0 6px}
.nav-sep{height:1px;background:color-mix(in srgb,var(--on-brand) 18%,transparent);margin:10px 8px}
.side-foot{margin-top:auto;font-size:11px;opacity:.75;padding:0 8px;line-height:1.7}
.demo-pill{display:inline-block;background:color-mix(in srgb,var(--on-brand) 16%,transparent);border-radius:99px;padding:2px 9px;font-weight:700;letter-spacing:.06em;margin-bottom:6px}

.main{min-width:0;display:flex;flex-direction:column;gap:20px;padding-bottom:40px}
.head{display:flex;justify-content:space-between;align-items:flex-end;gap:14px;flex-wrap:wrap}
.eyebrow{font-size:11px;letter-spacing:.16em;color:var(--muted);font-weight:700;margin:0 0 4px}
h1{font-family:var(--f-display);font-size:clamp(22px,2.6vw,30px);font-weight:700;margin:0;letter-spacing:.02em;text-wrap:balance;line-height:1.3}
h2{font-size:15px;font-weight:700;margin:0;display:flex;align-items:center;gap:8px}
.lede{color:var(--muted);font-size:13px;margin:6px 0 0;max-width:60ch}
.row{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.spread{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap}
.card{background:var(--surface);border:1px solid var(--rule);border-radius:var(--r);box-shadow:var(--shadow);min-width:0}
.pad{padding:18px}
.stack{display:flex;flex-direction:column;gap:12px}
.grid-4{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}
.grid-2{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(0,1fr);gap:14px}
.grid-2e{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.muted{color:var(--muted)}.small{font-size:12px}.tiny{font-size:11px}.b{font-weight:700}

.btn{border:1px solid var(--rule);background:var(--surface);border-radius:10px;padding:8px 14px;font-weight:700;font-size:13px;display:inline-flex;align-items:center;gap:6px;min-height:36px;white-space:nowrap}
.btn:hover{background:var(--surface-2)}
.btn svg{width:16px;height:16px}
.btn.pri{background:var(--brand);border-color:var(--brand);color:var(--on-brand)}
.btn.pri:hover{background:var(--brand-hi)}
.btn.soft{background:var(--brand-soft);border-color:transparent;color:var(--brand)}
.btn.danger{background:var(--bad-soft);border-color:transparent;color:var(--bad)}
.btn.sm{padding:5px 10px;min-height:30px;font-size:12px}
.btn:disabled{opacity:.5;cursor:not-allowed}
.btn.block{width:100%;justify-content:center}
.linkbtn{border:0;background:none;color:var(--brand);font-weight:700;padding:0;font-size:12px}

.chip{display:inline-flex;align-items:center;gap:4px;border-radius:99px;padding:2px 9px;font-size:11px;font-weight:700;white-space:nowrap;background:var(--sunk);color:var(--muted)}
.chip.ok{background:var(--ok-soft);color:var(--ok)}.chip.warn{background:var(--warn-soft);color:var(--warn)}.chip.bad{background:var(--bad-soft);color:var(--bad)}.chip.brand{background:var(--brand-soft);color:var(--brand)}.chip.rose{background:var(--rose-soft);color:var(--rose)}
.tag{display:inline-block;border:1px solid var(--rule);border-radius:6px;padding:0 7px;font-size:11px;margin:1px 3px 1px 0;color:var(--muted);background:var(--surface-2)}
.dot{width:8px;height:8px;border-radius:50%;display:inline-block;flex:none}

.metric .lbl{font-size:12px;color:var(--muted);display:flex;justify-content:space-between;gap:6px}
.metric .val{font-size:30px;font-weight:700;letter-spacing:-.02em;line-height:1.15;margin-top:6px}
.metric .val small{font-size:13px;font-weight:500;color:var(--muted);margin-left:3px}
.metric .foot{font-size:11px;color:var(--faint);margin-top:4px}
.meter{height:8px;background:var(--sunk);border-radius:99px;overflow:hidden;margin-top:10px}
.meter i{display:block;height:100%;background:var(--brand);border-radius:99px}
.meter i.warn{background:var(--warn)}.meter i.bad{background:var(--bad)}

.list{display:flex;flex-direction:column}
.li{display:flex;gap:12px;align-items:center;padding:11px 2px;border-top:1px solid var(--rule)}
.li:first-child{border-top:0}
.li .time{width:52px;font-weight:700;font-size:15px;flex:none}
.li .body{flex:1;min-width:0}
.li .body .t{font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.feed .li{align-items:flex-start;font-size:12px;padding:8px 0}
.feed .li .when{color:var(--faint);width:44px;flex:none}

.tablewrap{overflow-x:auto}
table.t{width:100%;border-collapse:collapse;font-size:13px}
.t th{font-size:11px;color:var(--muted);font-weight:700;text-align:left;padding:8px 10px;border-bottom:1px solid var(--rule);white-space:nowrap}
.t td{padding:11px 10px;border-bottom:1px solid var(--rule);vertical-align:middle}
.t tr.click{cursor:pointer}.t tr.click:hover td{background:var(--surface-2)}
.t tr.arch td{opacity:.5}

/* timeline */
.tl-bar{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.datebox{font-weight:700;font-size:16px;min-width:130px;text-align:center}
.legend{display:flex;gap:14px;flex-wrap:wrap;font-size:11px;color:var(--muted);align-items:center}
.legend span{display:inline-flex;align-items:center;gap:5px}
.sw{width:18px;height:11px;border-radius:3px;display:inline-block}
.sw.busy{background:var(--s1-soft);border-left:3px solid var(--s1)}
.sw.free{background:repeating-linear-gradient(135deg,transparent 0 4px,color-mix(in srgb,var(--s1) 25%,transparent) 4px 6px);border:1px dashed var(--s1)}
.tl-wrap{overflow-x:auto;border-top:1px solid var(--rule)}
.tl{display:grid;min-width:560px;position:relative}
.tl-h{position:sticky;top:0;z-index:3;background:var(--surface);border-bottom:1px solid var(--rule);padding:10px 8px;display:flex;align-items:center;gap:8px;min-width:0}
.tl-h .nm{font-weight:700;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tl-h .sub{font-size:11px;color:var(--muted)}
.tl-times{position:relative;border-right:1px solid var(--rule)}
.tl-times span{position:absolute;right:6px;font-size:10px;color:var(--faint);transform:translateY(-50%)}
.tl-col{position:relative;border-right:1px solid var(--rule);cursor:copy;background-image:linear-gradient(var(--rule) 1px,transparent 1px);}
.tl-col:last-child{border-right:0}
.tl-col.off{background:repeating-linear-gradient(45deg,var(--surface-2) 0 8px,var(--sunk) 8px 9px);cursor:not-allowed}
.tl-col .offlbl{position:absolute;top:40%;left:0;right:0;text-align:center;color:var(--faint);font-size:12px;font-weight:700}
.seg{position:absolute;left:4px;right:4px;border-radius:7px;font-size:11px;line-height:1.3;padding:3px 6px;overflow:hidden;cursor:pointer;border:0;text-align:left;color:var(--ink)}
.seg.busy{background:var(--c-soft);border-left:3px solid var(--c)}
.seg.free{background:repeating-linear-gradient(135deg,transparent 0 5px,color-mix(in srgb,var(--c) 22%,transparent) 5px 7px);border:1px dashed color-mix(in srgb,var(--c) 70%,transparent);right:auto;width:30%;color:var(--muted)}
.seg.shift{left:calc(30% + 8px)}
.seg.visited{filter:saturate(.35);opacity:.75}
.seg .n{font-weight:700;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.seg .m{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;opacity:.8}
.seg:hover{z-index:2;box-shadow:0 4px 14px rgba(0,0,0,.12)}
.nowline{position:absolute;left:0;right:0;height:0;border-top:2px solid var(--rose);z-index:2;pointer-events:none}
.nowline::before{content:"";position:absolute;left:-4px;top:-5px;width:8px;height:8px;border-radius:50%;background:var(--rose)}

/* chat */
.chatbox{display:grid;grid-template-columns:280px minmax(0,1fr) 260px;height:calc(100vh - 170px);height:calc(100dvh - 170px);min-height:520px;overflow:hidden}
.th-list{border-right:1px solid var(--rule);overflow-y:auto}
.th{display:flex;gap:10px;padding:12px 14px;border-bottom:1px solid var(--rule);cursor:pointer;width:100%;border-left:0;border-top:0;border-right:0;background:transparent;text-align:left}
.th:hover{background:var(--surface-2)}.th.on{background:var(--brand-soft)}
.av{width:36px;height:36px;border-radius:50%;display:grid;place-items:center;font-weight:700;font-size:13px;flex:none;background:var(--sunk);color:var(--muted)}
.th .b1{flex:1;min-width:0}
.th .nm{font-weight:700;font-size:13px;display:flex;gap:6px;align-items:center}
.th .pv{font-size:12px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.unread{width:8px;height:8px;border-radius:50%;background:var(--rose);flex:none;margin-top:6px}
.convo{display:flex;flex-direction:column;min-width:0;min-height:0}
.convo-h{padding:12px 16px;border-bottom:1px solid var(--rule);display:flex;justify-content:space-between;gap:10px;align-items:center;flex-wrap:wrap}
.msgs{flex:1;overflow-y:auto;padding:16px;display:flex;flex-direction:column;gap:10px;background:var(--surface-2)}
.msg{max-width:75%;display:flex;flex-direction:column;gap:3px}
.msg.in{align-self:flex-start}.msg.outm{align-self:flex-end;align-items:flex-end}
.msg .bub{padding:9px 12px;border-radius:14px;white-space:pre-wrap;word-break:break-word;font-size:13px}
.msg.in .bub{background:var(--surface);border:1px solid var(--rule);border-top-left-radius:4px}
.msg.outm .bub{background:var(--brand);color:var(--on-brand);border-top-right-radius:4px}
.msg.auto .bub{background:var(--brand-soft);color:var(--ink)}
.msg.notice .bub{background:var(--surface);border:1px dashed var(--rule);color:var(--ink)}
.msg .meta{font-size:10px;color:var(--faint)}
.sysline{align-self:center;font-size:11px;color:var(--muted);background:var(--sunk);border-radius:99px;padding:2px 10px}
.photo{width:170px;aspect-ratio:3/4;max-width:100%;border-radius:12px;background:linear-gradient(160deg,#c9a98c,#7d5a46 60%,#3c2a22);display:grid;place-items:end start;padding:8px;color:#fff;font-size:11px;font-weight:700}
.composer{border-top:1px solid var(--rule);padding:10px;display:flex;gap:8px;align-items:flex-end;background:var(--surface)}
.composer textarea{flex:1;resize:none;border:1px solid var(--rule);border-radius:10px;padding:9px 11px;min-height:40px;max-height:120px;background:var(--surface)}
.cinfo{border-left:1px solid var(--rule);overflow-y:auto;padding:16px;display:flex;flex-direction:column;gap:14px;font-size:12px}
.cinfo h3{font-size:11px;letter-spacing:.1em;color:var(--muted);margin:0 0 6px}
.kv{display:grid;grid-template-columns:auto 1fr;gap:4px 10px}
.kv dt{color:var(--muted)}.kv dd{margin:0;font-weight:500}
.empty{padding:40px 16px;text-align:center;color:var(--muted);font-size:13px}

/* forms */
label.f{display:flex;flex-direction:column;gap:5px;font-size:12px;font-weight:700;color:var(--muted)}
.in,select.in,textarea.in{border:1px solid var(--rule);background:var(--surface);border-radius:9px;padding:8px 10px;font-size:14px;color:var(--ink);font-weight:400;width:100%}
textarea.in{resize:vertical;min-height:90px}
.fgrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.fgrid .full{grid-column:1/-1}
.pickset{display:flex;flex-wrap:wrap;gap:6px}
.pick{border:1px solid var(--rule);background:var(--surface);border-radius:99px;padding:6px 12px;font-size:12px;font-weight:700;color:var(--ink)}
.pick.on{background:var(--brand);border-color:var(--brand);color:var(--on-brand)}
.slots{display:grid;grid-template-columns:repeat(auto-fill,minmax(64px,1fr));gap:6px;max-height:190px;overflow-y:auto}
.slot{border:1px solid var(--rule);background:var(--surface);border-radius:8px;padding:6px 0;font-weight:700;font-size:13px}
.slot.on{background:var(--brand);color:var(--on-brand);border-color:var(--brand)}
.flow{display:flex;flex-wrap:wrap;gap:4px;align-items:center;font-size:11px}
.flow span{padding:2px 7px;border-radius:5px;background:var(--brand-soft);color:var(--brand);font-weight:700}
.flow span.free{background:transparent;border:1px dashed var(--faint);color:var(--muted)}
.note{background:var(--surface-2);border:1px solid var(--rule);border-radius:10px;padding:10px 12px;font-size:12px;color:var(--muted)}
.note.warn{background:var(--warn-soft);border-color:transparent;color:var(--warn)}
.note.bad{background:var(--bad-soft);border-color:transparent;color:var(--bad)}
.toggle{position:relative;width:40px;height:23px;border-radius:99px;background:var(--sunk);border:1px solid var(--rule);flex:none;padding:0}
.toggle::after{content:"";position:absolute;top:2px;left:2px;width:17px;height:17px;border-radius:50%;background:var(--surface);box-shadow:0 1px 3px rgba(0,0,0,.25);transition:left .15s}
.toggle.on{background:var(--brand);border-color:var(--brand)}
.toggle.on::after{left:19px}
.tabs{display:flex;gap:4px;border-bottom:1px solid var(--rule);overflow-x:auto}
.tabs button{border:0;background:none;padding:10px 14px;font-weight:700;color:var(--muted);border-bottom:2px solid transparent;white-space:nowrap}
.tabs button.on{color:var(--brand);border-color:var(--brand)}
.steprow{display:grid;grid-template-columns:minmax(0,1fr) 80px auto auto;gap:6px;align-items:center}

/* modal + toast */
.overlay{position:fixed;inset:0;background:rgba(10,20,18,.42);z-index:50;display:grid;place-items:center;padding:16px max(16px,env(safe-area-inset-right,0px)) 16px max(16px,env(safe-area-inset-left,0px))}
.sheet{background:var(--surface);border-radius:18px;width:min(640px,100%);max-height:calc(100vh - 32px);overflow-y:auto;box-shadow:0 30px 70px rgba(0,0,0,.3)}
.sheet-h{display:flex;justify-content:space-between;align-items:center;padding:16px 20px;border-bottom:1px solid var(--rule);position:sticky;top:0;background:var(--surface);z-index:1}
.sheet-h h2{font-size:16px}
.sheet-b{padding:18px 20px;display:flex;flex-direction:column;gap:14px}
.sheet-f{padding:14px 20px;border-top:1px solid var(--rule);display:flex;justify-content:flex-end;gap:8px;flex-wrap:wrap;position:sticky;bottom:0;background:var(--surface)}
.x{border:0;background:var(--sunk);border-radius:50%;width:30px;height:30px;display:grid;place-items:center}
.toasts{position:fixed;right:max(16px,env(safe-area-inset-right,0px));bottom:calc(16px + env(safe-area-inset-bottom,0px));z-index:60;display:flex;flex-direction:column;gap:8px;align-items:flex-end;pointer-events:none}
.toast{background:var(--ink);color:var(--bg);padding:10px 14px;border-radius:10px;font-size:13px;box-shadow:var(--shadow);max-width:340px;animation:tin .2s ease-out}
.toast b{display:block;font-size:11px;opacity:.7;letter-spacing:.06em}
@keyframes tin{from{transform:translateY(8px);opacity:0}}

/* customer LINE */
.linepage{display:grid;grid-template-columns:minmax(0,380px) minmax(0,1fr);gap:24px;align-items:start}
.phone{width:100%;max-width:380px;aspect-ratio:9/18.5;max-height:780px;background:#111;border-radius:42px;padding:11px;box-shadow:0 30px 60px rgba(0,0,0,.25);position:relative;margin:0 auto}
.screen{width:100%;height:100%;border-radius:32px;overflow:hidden;background:var(--lchat);display:flex;flex-direction:column;position:relative}
.lhead{background:var(--lnote);color:var(--lin-ink);padding:30px 14px 10px;display:flex;align-items:center;gap:10px;font-weight:700;font-size:15px}
.lhead .mark{width:30px;height:30px;font-size:13px;background:var(--brand);color:var(--on-brand)}
.lmsgs{flex:1;overflow-y:auto;padding:12px 10px;display:flex;flex-direction:column;gap:8px}
.lm{display:flex;gap:6px;align-items:flex-end;max-width:86%}
.lm.me{align-self:flex-end;flex-direction:row-reverse}
.lm .mark{width:28px;height:28px;font-size:12px;background:var(--brand);color:var(--on-brand);align-self:flex-start}
.lb{background:var(--lin);color:var(--lin-ink);padding:8px 11px;border-radius:16px;font-size:12.5px;white-space:pre-wrap;word-break:break-word;line-height:1.5}
.lm.me .lb{background:var(--lout);color:var(--lout-ink)}
.lt{font-size:9px;color:color-mix(in srgb,var(--lin-ink) 60%,transparent);white-space:nowrap}
.lbimg{display:block;max-width:200px;width:100%;border-radius:14px}
.thumb{width:40px;height:40px;object-fit:cover;border-radius:6px;flex:none}
.pdfcard{display:grid;grid-template-columns:auto minmax(0,1fr);gap:8px 10px;align-items:center;background:var(--lin);color:var(--lin-ink);border:0;border-radius:16px;padding:10px 12px 8px;width:220px;max-width:100%;text-align:left}
.pdfic{width:34px;height:42px;border-radius:6px;background:var(--bad);color:var(--surface);display:grid;place-items:center;font-size:10px;font-weight:700;letter-spacing:.04em}
.pdfmeta{min-width:0;display:flex;flex-direction:column;font-size:12px;line-height:1.4}
.pdfmeta b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pdfmeta span{font-size:10px;opacity:.7}
.pdfbtn{grid-column:1/-1;text-align:center;border-top:1px solid color-mix(in srgb,var(--lin-ink) 15%,transparent);padding-top:7px;color:var(--s3);font-weight:700;font-size:12px}
.lday{align-self:center;font-size:10px;background:rgba(0,0,0,.18);color:#fff;padding:1px 9px;border-radius:99px}
.lcard{background:var(--lin);color:var(--lin-ink);border-radius:16px;overflow:hidden;width:220px;font-size:12px}
.lcard .top{background:var(--brand);color:var(--on-brand);padding:8px 12px;font-weight:700;font-size:12px}
.lcard .bd{padding:10px 12px;display:flex;flex-direction:column;gap:3px}
.rich{display:grid;grid-template-columns:repeat(3,1fr);background:var(--surface);border-top:1px solid var(--rule)}
.rich button{border:0;border-right:1px solid var(--rule);border-bottom:1px solid var(--rule);background:var(--surface);padding:10px 4px;font-size:11px;font-weight:700;display:flex;flex-direction:column;align-items:center;gap:4px;color:var(--ink)}
.rich button:nth-child(3n){border-right:0}
.rich button svg{width:20px;height:20px;color:var(--brand)}
.rich button.main1{background:var(--brand);color:var(--on-brand)}
.rich button.main1 svg{color:var(--on-brand)}
.linput{display:flex;gap:6px;padding:8px 10px calc(10px);background:var(--surface);align-items:center}
.linput input{flex:1;border:1px solid var(--rule);border-radius:99px;padding:7px 12px;font-size:12px;background:var(--surface-2)}
.linput .send{border:0;background:var(--lgreen);color:#fff;border-radius:99px;padding:7px 12px;font-size:12px;font-weight:700}
.linput .ic{border:0;background:none;padding:4px;color:var(--muted)}
.linput .ic svg{width:20px;height:20px}
.liff{position:absolute;inset:0;top:22px;background:var(--surface);border-radius:20px 20px 0 0;display:flex;flex-direction:column;z-index:5;box-shadow:0 -10px 30px rgba(0,0,0,.2);animation:up .22s ease-out}
@keyframes up{from{transform:translateY(30px);opacity:.4}}
.liff-h{padding:12px 14px;border-bottom:1px solid var(--rule);display:flex;align-items:center;gap:8px}
.liff-h .ttl{flex:1;font-weight:700;font-size:14px;text-align:center}
.liff-b{flex:1;overflow-y:auto;padding:14px;display:flex;flex-direction:column;gap:10px;font-size:13px}
.liff-f{padding:10px 14px 14px;border-top:1px solid var(--rule)}
.steps{display:flex;gap:4px;justify-content:center}
.steps i{height:4px;width:28px;border-radius:9px;background:var(--sunk)}
.steps i.on{background:var(--brand)}
.opt{display:flex;justify-content:space-between;align-items:center;gap:10px;border:1px solid var(--rule);border-radius:12px;padding:11px 12px;background:var(--surface);text-align:left;width:100%}
.opt.on{border-color:var(--brand);background:var(--brand-soft)}
.opt .ck{width:20px;height:20px;border-radius:6px;border:1.5px solid var(--faint);display:grid;place-items:center;flex:none}
.opt.on .ck{background:var(--brand);border-color:var(--brand);color:var(--on-brand)}
.opt .ck svg{width:13px;height:13px}
.days{display:flex;gap:6px;overflow-x:auto;padding-bottom:4px}
.day{flex:none;width:50px;border:1px solid var(--rule);border-radius:10px;padding:6px 0;text-align:center;background:var(--surface);font-size:11px}
.day b{display:block;font-size:16px}
.day.on{background:var(--brand);color:var(--on-brand);border-color:var(--brand)}
.day:disabled{opacity:.4}
.day.sun{color:var(--bad)}.day.on.sun{color:var(--on-brand)}
.explain{display:flex;flex-direction:column;gap:14px}
.explain ol{margin:0;padding-left:20px;display:flex;flex-direction:column;gap:6px;font-size:13px}
.log{max-height:360px;overflow-y:auto;font-size:12px}
.log .li{padding:7px 0}
.log code{font-size:11px;background:var(--sunk);padding:0 5px;border-radius:4px}

@media (max-width:1180px){.chatbox{grid-template-columns:240px minmax(0,1fr)}.cinfo{display:none}}
@media (max-width:980px){.grid-4{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-2,.grid-2e{grid-template-columns:minmax(0,1fr)}.linepage{grid-template-columns:minmax(0,1fr)}}
.backbtn{display:none}
@media (prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}

/* 本番版で追加 */
.msg .fail{color:var(--bad);font-weight:700}
.boot{display:grid;place-items:center;min-height:60vh;color:var(--muted);text-align:center;gap:10px}
.msg .lbimg{max-width:220px}
.chip.gray{background:var(--sunk);color:var(--muted)}
.check{display:flex;gap:8px;align-items:center;font-size:13px;font-weight:500;color:var(--ink)}
.statusrow{display:flex;justify-content:space-between;gap:10px;padding:10px 0;border-top:1px solid var(--rule);font-size:13px;flex-wrap:wrap}
.statusrow:first-child{border-top:0}
.mono{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px;word-break:break-all}
.attachbar{display:flex;gap:10px;align-items:center;flex-wrap:wrap;padding:8px 10px;border-top:1px solid var(--rule);background:var(--surface)}
.attach{position:relative;display:inline-flex;align-items:center;gap:6px;border:1px solid var(--rule);border-radius:10px;padding:4px;background:var(--surface-2)}
.attach img{width:56px;height:56px;object-fit:cover;border-radius:8px;display:block}
.attach.pdf{padding:4px 30px 4px 6px;max-width:240px}
.attach .x{position:absolute;top:-8px;right:-8px;width:22px;height:22px;background:var(--ink);color:var(--bg)}
.btn.icononly{padding:8px;min-width:40px;justify-content:center}
.composer textarea{min-width:0}

/* 同意書の店頭サインモード */
#signmode{position:fixed;inset:0;z-index:80;background:var(--bg);overflow-y:auto;-webkit-overflow-scrolling:touch}
.signwrap{max-width:860px;margin:0 auto;min-height:100%;display:flex;flex-direction:column;background:var(--surface)}
.signhead{position:sticky;top:0;z-index:2;background:var(--surface);border-bottom:1px solid var(--rule);display:flex;justify-content:space-between;align-items:center;gap:12px;padding:calc(12px + env(safe-area-inset-top,0px)) max(16px,env(safe-area-inset-right,0px)) 12px max(16px,env(safe-area-inset-left,0px))}
.signbody{flex:1;display:flex;flex-direction:column;gap:16px;padding:16px max(16px,env(safe-area-inset-right,0px)) 16px max(16px,env(safe-area-inset-left,0px))}
.signpages{display:flex;flex-direction:column;gap:12px}
.signpages img{width:100%;height:auto;border:1px solid var(--rule);border-radius:8px;background:#fff}
.signpad{display:block;width:100%;height:220px;border:2px dashed var(--faint);border-radius:12px;background:#fff;touch-action:none;margin-top:6px;cursor:crosshair}
.signfoot{position:sticky;bottom:0;background:var(--surface);border-top:1px solid var(--rule);padding:12px max(16px,env(safe-area-inset-right,0px)) calc(12px + env(safe-area-inset-bottom,0px)) max(16px,env(safe-area-inset-left,0px))}
.signdone{flex:1;display:grid;place-items:center;align-content:center;gap:14px;text-align:center;padding:40px 16px}
/* カルテ */
.karterow{display:grid;grid-template-columns:auto 1fr;gap:4px 10px;width:100%;text-align:left;border:1px solid var(--rule);background:var(--surface);border-radius:10px;padding:10px 12px;margin-top:6px}
.karterow:hover{background:var(--surface-2)}
.karterow .thumbs{grid-column:1/-1;display:flex;gap:6px}
.karterow .thumbs img{width:48px;height:48px;object-fit:cover;border-radius:6px}

/* 予約：日・週・月 */
.seg3{display:inline-flex;background:var(--sunk);border-radius:10px;padding:3px;gap:2px}
.seg3 button{border:0;background:transparent;border-radius:8px;padding:5px 14px;font-weight:700;font-size:13px;color:var(--muted)}
.seg3 button.on{background:var(--surface);color:var(--brand);box-shadow:0 1px 3px rgba(0,0,0,.12)}
.wk{display:grid;min-width:800px;position:relative}
.wk-h{border:0;border-bottom:1px solid var(--rule);flex-direction:column;align-items:center;gap:0;cursor:pointer;text-align:center}
.wk-h:hover{background:var(--surface-2)}
.wk-h .wd{font-size:11px;color:var(--muted)}
.wk-h .dn{font-size:18px;font-weight:700;line-height:1.2}
.wk-h.today .dn{background:var(--brand);color:var(--on-brand);border-radius:99px;padding:0 8px}
.wk-h.sun .wd,.mo-wd.sun,.mo-d.sun{color:var(--bad)}
.wk-h.sat .wd,.mo-wd.sat,.mo-d.sat{color:var(--s3)}
.wk-col{position:relative;border-right:1px solid var(--rule);cursor:copy;background-image:linear-gradient(var(--rule) 1px,transparent 1px)}
.wk-col:last-child{border-right:0}
.wk-col.off{background:repeating-linear-gradient(45deg,var(--surface-2) 0 8px,var(--sunk) 8px 9px);cursor:default}
.wk-col .offlbl{position:absolute;top:30%;left:0;right:0;text-align:center;color:var(--faint);font-size:12px;font-weight:700}
.wkb{position:absolute;border:0;border-left:3px solid var(--c);background:var(--c-soft);border-radius:6px;padding:2px 5px;font-size:11px;line-height:1.25;text-align:left;overflow:hidden;color:var(--ink);display:flex;flex-direction:column;cursor:pointer}
.wkb:hover{z-index:2;box-shadow:0 4px 14px rgba(0,0,0,.14)}
.wkb.done{filter:saturate(.35);opacity:.75}
.wkb .t{font-weight:700;opacity:.8}
.wkb .n{font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.wkb .m{opacity:.75;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.wkb .cw{position:absolute;top:2px;right:3px;width:14px;height:14px;border-radius:50%;background:var(--warn);color:var(--surface);font-size:10px;font-weight:700;display:grid;place-items:center}
.mo-wrap{padding:0 18px 18px;overflow-x:auto}
.mo{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));border-top:1px solid var(--rule);border-left:1px solid var(--rule);min-width:560px}
.mo-wd{font-size:11px;font-weight:700;color:var(--muted);text-align:center;padding:6px 0;border-right:1px solid var(--rule);border-bottom:1px solid var(--rule);background:var(--surface-2)}
.mo-c{min-height:104px;border:0;border-right:1px solid var(--rule);border-bottom:1px solid var(--rule);background:var(--surface);padding:6px;text-align:left;display:flex;flex-direction:column;gap:3px;cursor:pointer;min-width:0;position:relative}
.mo-c:hover{background:var(--surface-2)}
.mo-c.out{background:var(--surface-2)}
.mo-c.out .mo-d,.mo-c.out .mo-l{opacity:.45}
.mo-c.off{background:repeating-linear-gradient(45deg,var(--surface) 0 8px,var(--sunk) 8px 9px)}
.mo-c.today .mo-d{background:var(--brand);color:var(--on-brand);border-radius:99px;padding:0 7px}
.mo-d{font-weight:700;font-size:13px;align-self:flex-start}
.mo-n{position:absolute;top:6px;right:6px;font-size:10px;font-weight:700;color:var(--brand);background:var(--brand-soft);border-radius:99px;padding:0 6px}
.mo-l{display:flex;flex-direction:column;gap:2px;min-width:0}
.mo-i{font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:flex;align-items:center;gap:4px}
.mo-i .dot{width:6px;height:6px}
@media (max-width:640px){.mo{min-width:0}.mo-c{min-height:64px;padding:4px}.mo-l{display:none}.mo-n{position:static;align-self:flex-start;margin-top:2px}.mo-wrap{padding:0 8px 12px}}

/* =========================================================
   レスポンシブ：スマホ（〜767）・タブレット（768〜1099）・PC
   ========================================================= */
:root{--tcol:48px;--scol:150px;--wcol:108px;--dock:64px}
.shell{align-content:start}
.head-t{min-width:0}
.nav .more{display:none}
.nav .ni{display:contents}
.nav .nl{order:2}
.nav .badge{order:3}

/* 予約のツールバー */
.tl-top{padding:14px 18px 12px;display:flex;flex-direction:column;gap:10px}
.tl-bar{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.dnav{display:flex;align-items:center;gap:2px}
.dnav .btn.icononly{border-color:transparent;background:transparent}
.dnav .btn.icononly:hover{background:var(--surface-2)}
.datebox{position:relative;display:inline-flex;align-items:center;gap:8px;font-weight:700;font-size:16px;padding:6px 12px;border-radius:10px;cursor:pointer;min-width:0;white-space:nowrap;min-height:40px}
.datebox:hover{background:var(--surface-2)}
.datebox em{font-style:normal;color:var(--rose);margin-right:6px}
.datebox b{font-family:var(--f-display);font-size:22px;margin:0 2px;line-height:1}
.datebox .til{color:var(--faint);margin:0 4px;font-weight:500}
.datebox svg{color:var(--faint);flex:none}
.datebox input{position:absolute;inset:0;opacity:0;width:100%;height:100%;cursor:pointer;border:0;padding:0;-webkit-appearance:none;appearance:none}
.today-btn[hidden]{display:none}
.legend .cnt{font-weight:700;color:var(--ink);font-size:12px;display:inline-flex;gap:6px;align-items:baseline}
.legend .cnt small{font-weight:500;color:var(--muted);font-size:11px}
.sfilter{padding:0 18px 12px}
.sfilter .pick{display:inline-flex;align-items:center}

/* タイムラインは枠の中でスクロールし、スタッフ名と時刻を固定 */
.tl-wrap{max-height:max(440px,calc(100dvh - 300px));overflow:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
.tl>.tl-h:first-child,.wk>.tl-h:first-child{left:0;z-index:6}
.tl-times{position:sticky;left:0;z-index:4;background:var(--surface)}

/* ホーム：今日の予約 */
.li.bk{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px 12px;align-items:center;padding:10px 6px;margin:0 -6px;border-radius:10px}
.li.bk + .li.bk{border-top:1px solid var(--rule)}
.bk-main{display:flex;gap:12px;align-items:flex-start;border:0;background:none;padding:0;text-align:left;min-width:0;color:inherit}
.bk-main .time{width:58px;font-weight:700;font-size:16px;flex:none;display:flex;flex-direction:column;line-height:1.35}
.bk-main .time small{font-size:10px;color:var(--rose);font-weight:700;letter-spacing:.02em}
.bk-main .body{display:flex;flex-direction:column;min-width:0;border-left:3px solid var(--c);padding-left:10px}
.bk-main .t{font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.bk-main .m{font-size:12px;color:var(--ink);opacity:.8}
.bk-act{display:flex;gap:6px;align-items:center;justify-content:flex-end;flex-wrap:wrap}
.li.bk.next{background:color-mix(in srgb,var(--rose-soft) 70%,transparent)}
.li.bk.next + .li.bk{border-top-color:transparent}

/* その他メニュー */
.morelist{display:flex;flex-direction:column;gap:8px}
.morelist button{display:flex;align-items:center;gap:14px;border:1px solid var(--rule);background:var(--surface);border-radius:14px;padding:12px 14px;text-align:left;color:var(--ink);min-height:66px;width:100%}
.morelist button:active{background:var(--surface-2)}
.morelist button.on{border-color:var(--brand);background:var(--brand-soft)}
.morelist button>svg{color:var(--faint)}
.morelist .mi{width:42px;height:42px;border-radius:12px;background:var(--brand);color:var(--on-brand);display:grid;place-items:center;flex:none}
.morelist .mt{flex:1;display:flex;flex-direction:column;min-width:0;line-height:1.45}
.morelist .mt b{font-size:15px}
.morelist .mt span{font-size:12px;color:var(--muted)}
.acct{display:flex;gap:12px;align-items:center;padding:14px 4px 2px;border-top:1px solid var(--rule)}
.acct .av{background:var(--brand-soft);color:var(--brand)}
.t td[data-l]::before{content:none}

/* タッチ端末：押しやすさと、iPhoneで入力時に拡大されないように */
@media (pointer:coarse){
  .btn{min-height:42px}.btn.sm{min-height:36px;padding:6px 12px}
  .pick{padding:8px 14px;font-size:13px}
  .slot{padding:10px 0;font-size:14px}
  .seg3 button{padding:7px 16px}
  .x{width:36px;height:36px}
  .in,select.in,textarea.in,.composer textarea{font-size:16px}
  .in,select.in{min-height:44px}
  .toggle{width:48px;height:28px}.toggle::after{width:22px;height:22px}.toggle.on::after{left:22px}
  .tabs button{padding:12px 16px}
  .linkbtn{padding:8px 0;font-size:13px}
}

/* ---------- タブレット ---------- */
@media (max-width:1099px){
  .shell{grid-template-columns:88px minmax(0,1fr);gap:18px}
  .side{padding:16px 8px;border-radius:20px;overflow-y:auto}
  .side .brand{padding:0 0 14px;justify-content:center}
  .side .brand>div{display:none}
  .nav{gap:4px}
  .nav button{flex-direction:column;gap:4px;padding:10px 2px 8px;font-size:11px;text-align:center;justify-content:center;align-items:center;letter-spacing:.02em}
  .nav .ni{display:grid;place-items:center;position:relative}
  .nav .badge{position:absolute;top:-7px;right:-12px;margin:0;border:2px solid var(--brand)}
  .nav button.on .badge{border-color:var(--on-brand)}
  .nav-sep{margin:8px 10px}
  .side-foot{display:none}
  .grid-4{grid-template-columns:repeat(2,minmax(0,1fr))}
  .grid-2,.grid-2e,.linepage{grid-template-columns:minmax(0,1fr)}
  :root{--wcol:0px}
  .wk{min-width:0}
  .chatbox{grid-template-columns:260px minmax(0,1fr);height:calc(100dvh - 200px)}
  .cinfo{display:none}
}

/* ---------- スマホ ---------- */
@media (max-width:767px){
  :root{--tcol:38px;--scol:92px;--wcol:0px}
  body{padding:calc(env(safe-area-inset-top,0px) + 14px) max(14px,env(safe-area-inset-right,0px)) 0 max(14px,env(safe-area-inset-left,0px));font-size:15px}
  .shell{display:block}
  .main{gap:14px;padding-bottom:calc(var(--dock) + env(safe-area-inset-bottom,0px) + 28px)}
  /* 下のドック */
  .side{position:fixed;left:0;right:0;bottom:0;top:auto;height:auto;border-radius:0;z-index:30;overflow:visible;
    padding:6px max(6px,env(safe-area-inset-right,0px)) calc(4px + env(safe-area-inset-bottom,0px)) max(6px,env(safe-area-inset-left,0px));
    background:color-mix(in srgb,var(--surface) 84%,transparent);-webkit-backdrop-filter:saturate(1.8) blur(20px);backdrop-filter:saturate(1.8) blur(20px);
    border-top:1px solid color-mix(in srgb,var(--rule) 80%,transparent);color:var(--muted)}
  .side .brand,.side-foot,.nav-sep,.nav .sec{display:none}
  .nav{flex-direction:row;justify-content:space-around;gap:0}
  .nav button,.nav button.on,.nav button:hover{flex:1;flex-direction:column;gap:2px;padding:2px 0 4px;opacity:1;color:var(--muted);font-size:10.5px;font-weight:700;background:none;border-radius:0;min-height:52px;justify-content:center;align-items:center;width:auto;letter-spacing:.04em}
  .nav .more{display:flex}
  .nav .ni{width:58px;height:32px;border-radius:99px;transition:background .25s,color .25s}
  .nav svg{width:22px;height:22px}
  .nav button.on{color:var(--brand)}
  .nav button.on .ni{background:var(--brand-soft)}
  .nav button:active .ni{transform:scale(.94)}
  .nav .badge{top:-2px;right:6px;border-color:var(--surface)!important;min-width:19px;height:19px}
  /* 見出し：iPhoneの大きなタイトルの考え方 */
  .head{flex-wrap:nowrap;align-items:flex-end;gap:10px;padding:4px 2px 0}
  h1{font-size:27px;line-height:1.25}
  .lede{display:none}
  .head-a .btn{padding:8px 12px}
  .card{border-radius:16px}
  .pad{padding:15px}
  .grid-4{gap:10px}
  .metric .val{font-size:24px}
  .metric .lbl .chip,.metric .lbl svg{display:none}
  .fgrid{grid-template-columns:minmax(0,1fr)}
  /* ホーム */
  .li.bk{grid-template-columns:minmax(0,1fr)}
  .bk-act{justify-content:flex-start;padding-left:73px}
  .bk-act:empty{display:none}
  /* 予約 */
  .tl-top{padding:12px 12px 10px;gap:8px}
  .tl-bar{gap:6px;justify-content:space-between}
  .tl-bar .seg3{order:1}
  .tl-bar .today-btn{order:2;margin-left:auto}
  .tl-bar .dnav{order:3;width:100%;justify-content:space-between;background:var(--surface-2);border-radius:12px;padding:2px}
  .datebox{font-size:17px;justify-content:center;flex:1}
  .legend{gap:10px}
  .legend .hint{display:none}
  .sfilter{padding:0 12px 10px;flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;margin-bottom:0}
  .sfilter::-webkit-scrollbar{display:none}
  .sfilter .pick{flex:none}
  .tl,.wk{min-width:0}
  .tl-wrap{max-height:calc(100dvh - 300px - env(safe-area-inset-bottom,0px));min-height:min(360px,70dvh)}
  .tl-h{padding:8px 6px;gap:5px}
  .tl-h .nm{font-size:12px}
  .tl-h .sub{font-size:10px;white-space:nowrap}
  .tl-h .hrs{display:none}
  .sfilter{-webkit-mask-image:linear-gradient(90deg,#000 88%,transparent);mask-image:linear-gradient(90deg,#000 88%,transparent)}
  .sfilter .pick:last-child{margin-right:24px}
  .tl-times span{right:4px;font-size:9.5px}
  .seg{font-size:10.5px;padding:3px 4px;left:2px;right:2px}
  .seg.shift{left:calc(30% + 4px)}
  .wk-h{padding:6px 0}
  .wk-h .dn{font-size:16px}
  .wk-h .sub{font-size:9px}
  .wk-h.today .dn{padding:0 6px}
  .wkb{padding:2px 3px;font-size:10px;border-left-width:2px;border-radius:4px}
  .wkb .t,.wkb .m{display:none}
  .wkb .n{white-space:normal;word-break:break-all;line-height:1.2}
  .wkb .cw{width:10px;height:10px;font-size:0;top:auto;bottom:2px}
  .wk-col .offlbl{writing-mode:vertical-rl;top:20%;left:50%;transform:translateX(-50%);letter-spacing:.3em}
  .mo-wrap{padding:0 8px 10px}
  /* 表 → カード */
  .t.rsp thead{display:none}
  .t.rsp,.t.rsp tbody{display:block}
  .t.rsp tr{display:flex;flex-wrap:wrap;align-items:center;gap:5px 10px;padding:13px 2px;border-bottom:1px solid var(--rule)}
  .t.rsp tr:last-child{border-bottom:0}
  .t.rsp tr.click:hover td{background:none}
  .t.rsp tr.click:active{background:var(--surface-2)}
  .t.rsp td{display:block;border:0;padding:0;max-width:none!important;min-width:0!important}
  .t.rsp td[data-l]::before{content:attr(data-l);color:var(--faint);font-size:11px;font-weight:500}
  .t.cust td:nth-child(1){flex:1 1 calc(100% - 140px);font-size:15px}
  .t.cust td.nxt{order:1;text-align:right;font-weight:700;color:var(--brand);font-size:13px}
  .t.cust td.nxt.none{display:none}
  .t.cust td:nth-child(n+2):nth-child(-n+5){order:2;font-size:12px}
  .t.cust td:nth-child(1) .tiny{font-size:12px}
  .t.menu td:nth-child(1){flex:1;font-size:15px}
  .t.menu td:nth-child(2){font-weight:700}
  .t.menu td:nth-child(3){order:2;flex-basis:100%}
  .t.menu td:nth-child(n+4){order:3;font-size:12px}
  .t.menu td:nth-child(6):empty{display:none}
  .t.staff td:nth-child(1){font-size:15px}
  .t.staff td:nth-child(2){flex:1;color:var(--muted);font-size:12px}
  .t.staff td:nth-child(n+3){font-size:12px}
  .t.staff td:nth-child(6):empty{display:none}
  .t.faq td:nth-child(1){flex:1}
  .t.faq td:nth-child(2){order:2;flex-basis:100%;color:var(--muted);display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
  .t.bch td:nth-child(1){flex:1;font-weight:700}
  .t.bch td:nth-child(5){order:1}
  .t.bch td:nth-child(3){order:2;flex-basis:100%}
  .t.bch td:nth-child(2),.t.bch td:nth-child(4){order:3;font-size:12px;color:var(--muted)}
  .t.bch td:nth-child(6){order:4;margin-left:auto}
  .t.bch td:nth-child(6):empty{display:none}
  .tabs{scrollbar-width:none;-webkit-mask-image:linear-gradient(90deg,#000 85%,transparent);mask-image:linear-gradient(90deg,#000 85%,transparent)}
  .tabs::-webkit-scrollbar{display:none}
  .tabs button:last-child{margin-right:28px}
  /* チャット：一覧 → 全画面の会話 */
  .chatbox{grid-template-columns:minmax(0,1fr);height:auto;min-height:0}
  .chatbox .convo{display:none}
  .th{padding:14px 14px}
  .backbtn{display:inline-flex!important}
  body.chat-open{overflow:hidden}
  body.chat-open .side{display:none}
  body.chat-open .chatbox{position:fixed;inset:0;z-index:45;border-radius:0;border:0;display:flex;flex-direction:column;height:100dvh;box-shadow:none}
  body.chat-open .chatbox .th-list{display:none}
  body.chat-open .chatbox .convo{display:flex;flex:1;min-height:0}
  .convo-h{padding:calc(10px + env(safe-area-inset-top,0px)) max(12px,env(safe-area-inset-right,0px)) 10px max(12px,env(safe-area-inset-left,0px));gap:8px;background:var(--surface)}
  .convo-h>.row:last-child:empty{display:none}
  .msgs{padding:14px 12px;overscroll-behavior:contain}
  .msg{max-width:84%}
  .msg .bub{font-size:15px}
  .composer{padding:8px max(10px,env(safe-area-inset-right,0px)) calc(8px + env(safe-area-inset-bottom,0px)) max(10px,env(safe-area-inset-left,0px));align-items:center}
  .composer .btn.pri{padding:8px 12px}
  /* モーダル → 下から出るシート */
  .overlay{place-items:end stretch;padding:0;animation:fade .2s ease-out}
  .sheet{width:100%;max-height:calc(100dvh - env(safe-area-inset-top,0px) - 24px);border-radius:24px 24px 0 0;animation:sheetup .32s cubic-bezier(.2,.85,.25,1)}
  .sheet-h{padding:22px 18px 12px;border-bottom-color:transparent}
  .sheet-h::before{content:"";position:absolute;top:8px;left:50%;width:40px;height:5px;margin-left:-20px;border-radius:9px;background:var(--rule)}
  .sheet-h h2{font-family:var(--f-display);font-size:20px}
  .sheet-b{padding:4px 18px 18px}
  .sheet-f{display:flex;flex-wrap:wrap;gap:8px;padding:12px max(16px,env(safe-area-inset-right,0px)) calc(12px + env(safe-area-inset-bottom,0px)) max(16px,env(safe-area-inset-left,0px));box-shadow:0 -8px 20px color-mix(in srgb,var(--surface) 80%,transparent)}
  .sheet-f>*{margin:0!important}
  .sheet-f .btn{justify-content:center;flex:1 1 40%}
  .sheet-f .btn.pri{flex-basis:100%;order:9;min-height:52px;font-size:15px;border-radius:14px}
  .sheet-f>span{flex-basis:100%;text-align:center}
  .sheet-f>span:empty{display:none}
  .sheet-f .btn[data-act=close]{display:none}
  .toasts{left:14px;right:14px;bottom:calc(var(--dock) + env(safe-area-inset-bottom,0px) + 12px);align-items:stretch}
  .toast{max-width:none;border-radius:14px;padding:12px 16px}
  body.chat-open .toasts{bottom:calc(72px + env(safe-area-inset-bottom,0px))}
  .statusrow{font-size:14px}
}
@keyframes sheetup{from{transform:translateY(100%)}}
@keyframes fade{from{background:transparent}}

/* 押したときの手ごたえ */
html{-webkit-tap-highlight-color:transparent}
@media (pointer:coarse){
  .btn,.pick,.slot,.morelist button,.th,.bk-main,.mo-c,.wk-h{transition:transform .12s ease,background-color .15s}
  .btn:active,.pick:active,.slot:active{transform:scale(.97)}
  .th:active,.mo-c:active,.wk-h:active{background:var(--surface-2)}
  .bk-main:active{opacity:.7}
}
@media (prefers-reduced-motion:reduce){.sheet,.overlay{animation:none!important}}
@media (max-height:520px){.lede{display:none}}

/* =========================================================
   チャット：LINEのトーク画面に寄せる
   ========================================================= */
.th-list{background:var(--surface)}
.lth{border-bottom:0;padding:10px 14px;gap:12px;align-items:center}
.lth .av{width:48px;height:48px;font-size:17px;background:color-mix(in srgb,var(--lchat) 45%,var(--surface));color:var(--lin-ink)}
.lth.on{background:var(--sunk)}
.lth .nm{gap:6px;min-width:0}
.lth .nmt{font-size:15px;font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.pvr .chip{font-size:10px;padding:1px 7px;flex:none}
.lth .lt{margin-left:auto;font-size:11px;color:var(--faint);font-weight:400;flex:none}
.pvr{display:flex;align-items:center;gap:8px;margin-top:2px}
.pvr .pv{flex:1;min-width:0;font-size:13px}
.ucount{flex:none;min-width:20px;height:20px;padding:0 6px;border-radius:99px;background:var(--lgreen);color:#fff;font-size:11px;font-weight:700;display:grid;place-items:center}

.convo{background:var(--lchat)}
.convo-h{background:var(--surface);border-bottom:1px solid var(--rule)}
.ch-who{flex-wrap:nowrap;min-width:0;flex:1}
.ch-name{font-size:16px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.convo-h .av{width:36px;height:36px;background:color-mix(in srgb,var(--lchat) 45%,var(--surface));color:var(--lin-ink)}
.lback{border:0;background:none;padding:4px 2px;color:var(--ink);display:none;align-items:center}

.msgs.ltalk{background:var(--lchat);gap:3px;padding:12px 14px 18px}
.lday2{display:flex;justify-content:center;margin:12px 0 8px}
.lday2 span{background:rgba(0,0,0,.2);color:#fff;font-size:11px;padding:2px 11px;border-radius:99px;letter-spacing:.02em}
.lr{display:flex;gap:8px;align-items:flex-start;max-width:100%}
.lr.first{margin-top:8px}
.lr.lout{flex-direction:column;align-items:flex-end;gap:3px}
.lav{width:36px;height:36px;border-radius:50%;flex:none;display:grid;place-items:center;font-weight:700;font-size:14px;background:color-mix(in srgb,var(--lin) 75%,var(--lchat));color:var(--lin-ink)}
.lav.sp{visibility:hidden;height:0}
.lcol{display:flex;flex-direction:column;gap:3px;min-width:0;max-width:calc(100% - 44px)}
.lname{font-size:11px;color:color-mix(in srgb,var(--lin-ink) 70%,transparent);margin:0 0 1px 2px}
.lrow{display:flex;align-items:flex-end;gap:6px;max-width:100%}
.lr.lin .lrow{justify-content:flex-start}
.lr.lout .lrow{justify-content:flex-end;max-width:min(78%,560px)}
.lbub{position:relative;padding:8px 12px;border-radius:18px;font-size:14.5px;line-height:1.5;white-space:pre-wrap;word-break:break-word;min-width:0;background:var(--lin);color:var(--lin-ink)}
.lr.lout .lbub{background:var(--lout);color:var(--lout-ink)}
.lr.lout .lbub.auto{background:color-mix(in srgb,var(--lout) 55%,var(--lin))}
/* 吹き出しのしっぽ（グループの最初の1つだけ） */
.lr.lin.first .lrow:first-of-type .lbub::before,.lr.lout.first .lrow:first-child .lbub::before{content:"";position:absolute;top:0;width:10px;height:13px;background:inherit}
.lr.lin.first .lrow:first-of-type .lbub::before{left:-6px;clip-path:polygon(100% 0,0 0,100% 100%);border-top-left-radius:3px}
.lr.lout.first .lrow:first-child .lbub::before{right:-6px;clip-path:polygon(0 0,100% 0,0 100%)}
.lr.lin.first .lrow:first-of-type .lbub{border-top-left-radius:4px}
.lr.lout.first .lrow:first-child .lbub{border-top-right-radius:4px}
.ltime{font-size:10px;color:color-mix(in srgb,var(--lin-ink) 60%,transparent);white-space:nowrap;flex:none;line-height:1.3}
.lside{display:flex;flex-direction:column;align-items:flex-end;flex:none;gap:0}
.lkind{font-size:9.5px;color:color-mix(in srgb,var(--lin-ink) 60%,transparent);white-space:nowrap;line-height:1.3}
.lkind.bad{color:var(--bad);font-weight:700}
.lfail{width:18px;height:18px;border-radius:50%;background:var(--bad);color:#fff;font-size:11px;font-weight:700;display:grid;place-items:center;margin-bottom:2px}
.limg{display:block;min-width:0}
.limg img{display:block;max-width:min(240px,62vw);max-height:320px;border-radius:16px;object-fit:cover;background:var(--lin)}
.lr .pdfcard{flex:none}

.lcomp{background:var(--surface);border-top:1px solid var(--rule);gap:6px;align-items:flex-end;padding:8px 10px}
.lic{width:40px;height:40px;display:grid;place-items:center;color:var(--muted);border-radius:50%;cursor:pointer;flex:none}
.lic:hover{background:var(--surface-2)}
.lcomp textarea{border:0;background:var(--sunk);border-radius:20px;padding:9px 14px;min-height:40px;max-height:140px;line-height:1.5;font-size:15px;overflow-y:auto}
.lcomp textarea:focus{outline:none;box-shadow:0 0 0 2px color-mix(in srgb,var(--lgreen) 40%,transparent)}
.lsend{width:40px;height:40px;border-radius:50%;border:0;flex:none;display:grid;place-items:center;background:transparent;color:var(--faint);transition:background .15s,color .15s,transform .12s}
.lcomp.ready .lsend{background:var(--lgreen);color:#fff}
.lsend:active{transform:scale(.92)}
.lsend:disabled{opacity:.5}
.attachbar{background:var(--surface)}
@media (max-width:767px){
  .lback{display:inline-flex}
  .backbtn.lback{display:inline-flex!important}
  .lth{padding:10px 4px}
  .th-list{border-radius:16px}
  .msgs.ltalk{padding:10px 10px 16px}
  .lr.lout .lrow{max-width:84%}
  .lcomp{padding:8px max(8px,env(safe-area-inset-right,0px)) calc(8px + env(safe-area-inset-bottom,0px)) max(6px,env(safe-area-inset-left,0px))}
  .convo-h .row:last-child .btn{min-height:32px;padding:4px 10px;font-size:12px}
}
@media (max-width:767px){.ch-st .paren{display:none}.convo-h{flex-wrap:nowrap}.convo-h>.row:last-child{flex-wrap:nowrap;gap:6px}}

/* LINE Seed JP：見出しは太字（800）、本文は400/700 */
h1{font-weight:800;letter-spacing:.01em}
.side .brand b,.mark,.datebox b,.sheet-h h2{font-weight:800}

/* 承認待ち */
.badge.warnb{background:var(--warn)}
.pend-card{border-color:color-mix(in srgb,var(--warn) 45%,var(--rule));background:linear-gradient(var(--warn-soft),var(--warn-soft)) top/100% 3px no-repeat,var(--surface);padding:16px 18px 10px}
.pend-h{display:flex;justify-content:space-between;align-items:baseline;gap:6px 14px;flex-wrap:wrap;margin-bottom:6px}
.pend-n{display:inline-grid;place-items:center;min-width:22px;height:22px;border-radius:99px;background:var(--warn);color:var(--surface);font-size:12px;padding:0 6px}
.pend-list{display:flex;flex-direction:column}
.pend-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px 12px;align-items:center;padding:10px 0;border-top:1px solid var(--rule)}
.pend-row:first-child{border-top:0}
.pend-main{display:flex;gap:12px;align-items:flex-start;border:0;background:none;padding:0;text-align:left;color:inherit;min-width:0}
.pend-when{width:58px;flex:none;display:flex;flex-direction:column;line-height:1.3}
.pend-when b{font-size:16px}
.pend-when span{font-size:11px;color:var(--warn);font-weight:700}
.pend-body{display:flex;flex-direction:column;min-width:0;border-left:3px dashed var(--c);padding-left:10px}
.pend-body .t{font-weight:700}
.pend-body .m{font-size:12px;opacity:.85}
.pend-act{display:flex;gap:6px}
.seg.pend{background:repeating-linear-gradient(135deg,var(--c-soft) 0 6px,var(--surface) 6px 9px);border:1.5px dashed var(--c);border-left:3px solid var(--warn)}
.wkb.pend{background:repeating-linear-gradient(135deg,var(--c-soft) 0 6px,var(--surface) 6px 9px);outline:1.5px dashed var(--c);outline-offset:-1.5px;border-left-color:var(--warn)}
.pendtag{display:inline-block;font-size:9.5px;font-weight:700;color:var(--surface);background:var(--warn);border-radius:4px;padding:0 4px;margin-bottom:1px}
@media (max-width:767px){
  .pend-card{padding:14px 14px 8px}
  .pend-row{grid-template-columns:minmax(0,1fr)}
  .pend-act{padding-left:70px}
  .pend-act .btn{flex:1;justify-content:center}
}

/* 自動応答：画像・ボタン */
.fqb{display:grid;grid-template-columns:170px minmax(0,1fr) auto;gap:6px;align-items:center}
.fqb .fqv{grid-column:1/3}
.fqb .x{grid-row:1;grid-column:3}
.fq-prev{background:var(--lchat);border-radius:16px;padding:14px 12px}
.fq-prev .lav{background:var(--brand);color:var(--on-brand)}
.fq-card{white-space:pre-wrap;max-width:280px}
.fq-btns{display:flex;flex-direction:column;gap:6px;margin-top:10px;white-space:normal}
.fq-btns span{display:block;text-align:center;border-radius:8px;padding:7px 10px;font-size:13px;font-weight:700;background:color-mix(in srgb,var(--lin-ink) 8%,transparent);color:var(--lin-ink)}
.fq-btns span.p{background:var(--brand);color:#fff}
.lr.lout .fq-btns span{background:rgba(0,0,0,.08)}
.lr.lout .fq-btns span.p{background:var(--brand)}
.fq-tags{display:flex;gap:4px;flex-wrap:wrap;margin-top:4px}
.fq-tags span{font-size:10px;font-weight:700;color:var(--brand);background:var(--brand-soft);border-radius:6px;padding:1px 7px}
@media (max-width:767px){.fqb{grid-template-columns:minmax(0,1fr) auto}.fqb select{grid-column:1/2}.fqb input[data-k=label]{grid-column:1/-1}.fqb .fqv{grid-column:1/-1}}

/* シナリオ配信 */
.sc-flow{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;position:relative}
.sc-flow li{display:grid;grid-template-columns:74px minmax(0,1fr) auto;gap:12px;align-items:start;position:relative;padding:12px 0}
.sc-flow li::before{content:"";position:absolute;left:36px;top:52px;bottom:-12px;width:2px;background:var(--brand-soft)}
.sc-flow li:last-child::before{display:none}
.sc-when{display:grid;place-items:center;align-content:center;width:74px;height:56px;border-radius:14px;background:var(--brand);color:var(--on-brand);line-height:1.15;position:relative;z-index:1}
.sc-when b{font-size:16px}.sc-when small{font-size:11px;opacity:.85}
.sc-body{border:1px solid var(--rule);background:var(--surface);border-radius:14px;padding:12px 14px;text-align:left;display:flex;flex-direction:column;gap:6px;min-width:0;color:var(--ink)}
.sc-body:hover{background:var(--surface-2)}
.sc-name{font-weight:700;display:flex;gap:6px;align-items:center;flex-wrap:wrap}
.sc-text{font-size:12px;color:var(--muted);white-space:pre-wrap;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.sc-flow li.dis .sc-when{background:var(--sunk);color:var(--muted)}
.sc-flow li.dis .sc-body{opacity:.55}
.sc-flow.off .sc-when{background:var(--faint)}
.sc-flow li > .toggle{margin-top:16px}
@media (max-width:767px){.sc-flow li{grid-template-columns:58px minmax(0,1fr);gap:10px}.sc-when{width:58px;height:50px}.sc-flow li::before{left:28px}.sc-flow li > .toggle{grid-column:2;justify-self:end;margin-top:0}}

/* リッチメニュー */
.rm{display:grid;grid-template-columns:minmax(0,1fr) 400px;gap:24px;align-items:start}
.rm-side{position:sticky;top:16px;display:flex;flex-direction:column;gap:12px}
.rm-phone{border-radius:24px;overflow:hidden;border:1px solid var(--rule);background:var(--surface);box-shadow:var(--shadow)}
.rm-talk{height:120px;background:var(--lchat);display:flex;align-items:flex-end;justify-content:center;padding-bottom:10px}
.rm-talk .lday2{margin:0}
.rm-phone canvas{display:block;width:100%;height:auto}
.rm-bar{text-align:center;font-size:13px;font-weight:700;padding:9px;border-top:1px solid var(--rule);color:var(--ink)}
.rm-layouts{display:flex;gap:8px;flex-wrap:wrap}
.rm-layouts button{display:flex;flex-direction:column;align-items:center;gap:6px;border:1.5px solid var(--rule);background:var(--surface);border-radius:12px;padding:10px 12px;font-size:12px;font-weight:700;color:var(--muted);min-width:86px}
.rm-layouts svg{width:60px;height:auto}
.rm-layouts rect{fill:var(--sunk);stroke:var(--faint);stroke-width:.6}
.rm-layouts button.on{border-color:var(--brand);color:var(--brand);background:var(--brand-soft)}
.rm-layouts button.on rect{fill:var(--surface);stroke:var(--brand)}
.rm-layouts button.on rect:first-child{fill:var(--brand)}
.rm-btn{border:1px solid var(--rule);border-radius:14px;padding:14px;display:flex;flex-direction:column;gap:10px;background:var(--surface)}
.rm-btn.hi{border-color:color-mix(in srgb,var(--brand) 40%,var(--rule))}
.rm-btn-h{display:flex;align-items:center;gap:8px;font-weight:700;font-size:13px}
.rm-btn-h b{display:grid;place-items:center;width:24px;height:24px;border-radius:7px;background:var(--brand);color:var(--on-brand);font-size:12px}
.rm-icons{display:flex;flex-wrap:wrap;gap:6px}
.rm-icons button{width:40px;height:40px;border-radius:10px;border:1.5px solid var(--rule);background:var(--surface);display:grid;place-items:center;color:var(--ink)}
.rm-icons button.none{width:auto;padding:0 10px;font-size:12px;font-weight:700;color:var(--muted)}
.rm-icons button.on{border-color:var(--brand);background:var(--brand-soft);color:var(--brand)}
.rm-ans{font-size:11px;font-weight:700}
.rm-ans.faq{color:var(--ok)}.rm-ans.staff{color:var(--warn)}.rm-ans.none{color:var(--warn)}
.rm-sw{width:28px;height:28px;border-radius:50%;border:2px solid var(--surface);box-shadow:0 0 0 1px var(--rule)}
.rm-sw.on{box-shadow:0 0 0 2.5px var(--ink)}
input[type=color]{width:40px;height:30px;border:1px solid var(--rule);border-radius:8px;padding:2px;background:var(--surface)}
@media (max-width:1099px){.rm{grid-template-columns:minmax(0,1fr)}.rm-side{position:static;order:-1}}

.export-box{border-top:1px solid var(--rule);padding-top:18px;margin-top:8px;max-width:680px}
.plan-lock{border-left:3px solid var(--brand)}

/* 受け付けない時間（勤務の前後・休憩）・特定の日の設定 */
.tl-col .unav{position:absolute;left:0;right:0;background:repeating-linear-gradient(45deg,var(--surface-2) 0 6px,var(--sunk) 6px 7px);pointer-events:none;display:flex;align-items:center;justify-content:center}
.tl-col .unav span{font-size:11px;font-weight:700;color:var(--faint);background:var(--surface);padding:1px 6px;border-radius:999px}
.legend .sw.unav{background:repeating-linear-gradient(45deg,var(--surface-2) 0 3px,var(--sunk) 3px 4px);border:1px solid var(--rule)}
.daynotes{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
.mo-x{display:block;font-size:10.5px;font-weight:700;color:var(--warn);line-height:1.3;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* ログインできる人・招待 */
img.av{object-fit:cover;background:var(--sunk)}
.members .row{gap:10px;flex-wrap:nowrap}
.members .av{width:32px;height:32px;flex:none}
.in.sm{min-height:34px;padding:4px 10px;font-size:13px;width:auto}
.qrbox{width:220px;height:220px;margin:4px auto;padding:10px;background:#fff;border-radius:16px;border:1px solid var(--rule)}
.qrbox svg{width:100%;height:100%;display:block}
.side-out{color:inherit;opacity:.9;padding:0;margin-top:4px;font-size:11px;text-decoration:underline}
a.btn{text-decoration:none}
