/* FISHCAT look: black and white, with goldfish orange kept for the one thing to do next.
   Red means a problem and amber means look at this; orange never does. */
:root {
  color-scheme:light;
  --ink:#161616; --mute:#62625f; --line:#e0e0dd; --edge:#bdbdb9; --bg:#f5f5f3; --paper:#fff; --soft:#ededea;
  --fish:#f26a1b; --fishdark:#d95608; --onfish:#1c0900; --fishtext:#a84300; --fishbg:#fff1e7;
  --red:#b01c16; --redbg:#fdecea; --amber:#7d4e00; --amberbg:#fff4d9;
  --r:4px; --ease:cubic-bezier(.2,.7,.2,1);
}
* { box-sizing:border-box; }
[hidden] { display:none !important; }
body { margin:0; background:var(--bg); color:var(--ink); font:16px/1.5 "Segoe UI Variable Text","Segoe UI",system-ui,"PingFang SC","Microsoft YaHei",sans-serif; -webkit-font-smoothing:antialiased; }
main { max-width:640px; margin:auto; padding:16px 16px 90px; }
h1 { font-size:30px; line-height:1.15; letter-spacing:-.02em; font-weight:700; margin:0; }
h2 { font-size:17px; font-weight:700; margin:28px 0 10px; } h3 { margin:0; font-size:20px; line-height:1.25; font-weight:700; letter-spacing:-.01em; }
.word { font-weight:800; letter-spacing:.16em; line-height:1; }
.word::after { content:""; display:inline-block; width:.26em; height:.26em; border-radius:50%; background:var(--fish); margin-left:-.02em; }

/* controls */
button, input, select, textarea { font:inherit; color:inherit; }
button { min-height:44px; padding:8px 16px; border:1px solid var(--edge); border-radius:var(--r); background:var(--paper); cursor:pointer; transition:background .15s var(--ease), border-color .15s var(--ease), transform .15s var(--ease); }
button:hover:not(:disabled) { border-color:var(--ink); } button:active:not(:disabled) { transform:translateY(1px); }
button:disabled { opacity:.42; cursor:default; }
button.main { background:var(--fish); border-color:var(--fish); color:var(--onfish); font-weight:700; } button.main:hover:not(:disabled) { background:#ff7d30; border-color:#ff7d30; }
button.dark, button.on { background:var(--ink); border-color:var(--ink); color:#fff; } button.dark { font-weight:600; } button.dark:hover:not(:disabled) { background:#3a3a38; border-color:#3a3a38; }
button.link { border-color:transparent; background:none; color:var(--ink); padding:4px 8px; text-decoration:underline; text-decoration-color:var(--edge); text-underline-offset:4px; } button.link:hover:not(:disabled) { border-color:transparent; text-decoration-color:var(--fish); }
button.link.red { color:var(--red); }
:focus-visible { outline:3px solid var(--fish); outline-offset:2px; }
input, select, textarea { border:1px solid var(--edge); border-radius:var(--r); padding:8px 10px; background:var(--paper); min-height:44px; max-width:100%; }
input:hover, select:hover, textarea:hover { border-color:var(--ink); } textarea { width:100%; min-height:90px; }
input[type=checkbox] { accent-color:var(--ink); }
.ico { width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linejoin:miter; flex:none; vertical-align:-4px; }
button > .ico { margin-right:8px; }

/* shared pieces */
.row { display:flex; gap:8px; align-items:center; flex-wrap:wrap; } .between { justify-content:space-between; }
.card { background:var(--paper); border:1px solid var(--line); border-radius:var(--r); padding:20px; }
.mute { color:var(--mute); font-size:14px; } .red { color:var(--red); } .amber { color:var(--amber); }
.ring { width:72px; height:72px; flex:none; } .ring circle { fill:none; stroke:var(--soft); stroke-width:7; } .ring .on { stroke:var(--fish); transform:rotate(-90deg); transform-origin:36px 36px; }
.ring text { text-anchor:middle; font-size:17px; font-weight:700; fill:var(--ink); font-variant-numeric:tabular-nums; }
.avatar { display:inline-grid; place-items:center; width:40px; height:40px; flex:none; background:var(--ink); color:#fff; border-radius:var(--r); font-size:18px; font-weight:700; }
.storehead { display:flex; align-items:center; justify-content:space-between; gap:16px; } .storehead h3 { font-size:24px; }
.bar { height:6px; background:var(--soft); overflow:hidden; margin:8px 0; } .bar i { display:block; height:100%; background:var(--fish); }
.alert { background:var(--redbg); color:var(--red); border-radius:var(--r); padding:11px 14px; margin:10px 0; font-weight:600; } .alert.soon { background:var(--amberbg); color:var(--amber); }
.tag { font-size:13px; padding:2px 8px; border-radius:var(--r); background:var(--soft); display:inline-block; } .tag.red { background:var(--redbg); } .tag.amber { background:var(--amberbg); }
.grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,320px),1fr)); gap:16px; } .grid > * { min-width:0; }
.tabs { display:flex; gap:8px; margin:16px 0; flex-wrap:wrap; }
ul.plain { margin:6px 0 12px; padding-left:20px; } ul.plain li::marker { color:var(--edge); }
table { border-collapse:collapse; width:100%; font-size:15px; } td, th { text-align:left; padding:10px 8px 10px 0; border-bottom:1px solid var(--line); } th { font-weight:600; color:var(--mute); font-size:14px; } tr:last-child td { border:0; }
.week td { vertical-align:top; font-variant-numeric:tabular-nums; } .week .pct { font-size:18px; } .week .bar { margin:6px 12px 0 0; }
summary { cursor:pointer; min-height:44px; display:flex; align-items:center; gap:10px; font-weight:600; list-style:none; } summary::-webkit-details-marker { display:none; }
summary::before { content:""; width:7px; height:7px; border:solid var(--ink); border-width:0 2px 2px 0; transform:rotate(-45deg); transition:transform .15s var(--ease); margin-left:2px; } details[open] > summary::before { transform:rotate(45deg); }

/* demo bar */
.demo { margin:-16px -16px 24px; background:var(--soft); color:var(--mute); padding:6px 12px; font-size:13px; display:flex; gap:8px; align-items:center; justify-content:center; flex-wrap:wrap; }
.demo select, .demo button { color:var(--ink); min-height:34px; padding:2px 8px; font-size:13px; }

/* entrance page */
.night { background:var(--ink); color:#fff; color-scheme:dark; }
.gate { min-height:100vh; min-height:100dvh; max-width:760px; display:grid; align-content:center; grid-template-columns:1fr 1fr; gap:16px; padding:24px; } .gate .word, .gate p { grid-column:1/-1; }
.gate .word { font-size:clamp(34px,10vw,84px); letter-spacing:.1em; } .gate p { margin:0 0 32px; color:#b9b9b5; font-size:18px; }
.door { display:flex; flex-direction:column; justify-content:flex-end; min-height:170px; padding:20px; border:1px solid #4a4a47; border-radius:var(--r); color:#fff; text-decoration:none; transition:background .15s var(--ease), border-color .15s var(--ease); } .door b { font-size:26px; line-height:1.2; } .door span { color:#b9b9b5; }
.door:hover { background:#262625; border-color:#fff; } .door.hot { background:var(--fish); border-color:var(--fish); color:var(--onfish); } .door.hot span { color:var(--onfish); } .door.hot:hover { background:#ff7d30; border-color:#ff7d30; }

/* staff page */
.mast { background:var(--ink); color:#fff; margin:-24px -16px 24px; padding:32px 20px 28px; } .mast .word { font-size:34px; margin-bottom:10px; } .mast div { color:#b9b9b5; } .mast .word, .mast h1 { color:#fff; }
.mast.me { display:flex; align-items:center; gap:14px; padding:20px; } .mast.me > div { flex:1; min-width:0; } .mast.me h1 { font-size:26px; overflow-wrap:anywhere; } .mast .avatar { background:var(--fish); color:var(--onfish); width:48px; height:48px; font-size:22px; } .mast button.link { color:#fff; text-decoration-color:#777; }
.login { display:grid; grid-template-columns:1fr 1fr; gap:10px; } .login button { min-height:72px; font-weight:700; font-size:17px; display:flex; align-items:center; gap:12px; text-align:left; padding:12px 14px; overflow-wrap:anywhere; } .login button:not(:has(.avatar)) { justify-content:center; }
.seg { gap:0; flex-wrap:nowrap; } .seg button { flex:1; } .seg button + button { margin-left:-1px; } .seg button:first-child { border-radius:var(--r) 0 0 var(--r); } .seg button:last-child { border-radius:0 var(--r) var(--r) 0; }
.storehead.mine { margin:20px 0 4px; } .storehead.mine b { font-size:24px; line-height:1.2; letter-spacing:-.01em; display:block; } .storehead.mine .link { margin-left:-8px; }
.sec { display:flex; justify-content:space-between; align-items:baseline; gap:12px; } .sec .mute { font-weight:400; font-variant-numeric:tabular-nums; }
.list { background:var(--paper); border:1px solid var(--line); border-radius:var(--r); overflow:hidden; }
.task { padding:14px 14px; border-bottom:1px solid var(--line); display:flex; gap:12px; align-items:center; } .task:last-child { border:0; }
.task > div:not(.acts) { flex:1; min-width:0; } .task b { font-weight:600; line-height:1.35; display:block; } .task.done b { color:var(--mute); font-weight:400; } .task.done { background:#fafaf9; }
.tick { width:26px; height:26px; flex:none; border:2px solid var(--edge); border-radius:var(--r); display:grid; place-items:center; } .task.done .tick { background:var(--ink); border-color:var(--ink); color:#fff; } .tick .ico { width:16px; height:16px; stroke-width:3; vertical-align:0; } .task.late .tick { border-color:var(--red); background:var(--redbg); }
.task .acts { display:flex; flex-direction:column; gap:2px; align-items:stretch; flex:none; } .task .acts .link { font-size:14px; }

/* money */
.money { font-size:38px; line-height:1.15; font-weight:700; letter-spacing:-.025em; font-variant-numeric:tabular-nums; margin:4px 0; } .bankcard { margin-bottom:16px; } .bankcard h2 { margin:0 0 6px; } .bankcard button { margin-top:10px; } .bankcol h3 { margin:0 0 10px; font-size:24px; } .bankcol { align-content:start; }
.calc td:last-child { text-align:right; white-space:nowrap; font-variant-numeric:tabular-nums; padding-right:0; } .depcard .row { margin-top:10px; }
.depcard { border-top:1px solid var(--line); padding:14px 0; overflow-wrap:anywhere; } .depcard img { width:110px; height:82px; object-fit:cover; border-radius:var(--r); background:#111; cursor:zoom-in; flex:none; }
.checks label { display:flex; gap:12px; align-items:center; min-height:44px; } .checks input { min-height:22px; width:22px; height:22px; margin:0; }

/* owner page */
.page > h1 { margin-bottom:20px; } .datebar { margin:-6px 0 20px; } .draft { display:flex; gap:10px; justify-content:space-between; align-items:center; flex-wrap:wrap; background:var(--paper); border:1px solid var(--line); border-radius:var(--r); padding:12px 16px; margin-bottom:14px; font-size:15px; } .draft.has { background:var(--amberbg); border-color:#ecd08c; }
.nav button { border:0; background:none; position:relative; } .nav em { font-style:normal; font-size:12px; line-height:18px; font-weight:700; background:var(--fish); color:var(--onfish); border-radius:9px; padding:0 6px; margin-left:8px; font-variant-numeric:tabular-nums; }
.photos { display:grid; grid-template-columns:repeat(auto-fill,minmax(min(100%,250px),1fr)); gap:16px; } .photos .card { padding:0 0 16px; overflow:hidden; } .photos .card > :not(img) { margin-left:16px; margin-right:16px; } .photos .card > b { display:block; margin-top:14px; }
.photos img, #modal img, #modal video, #modal canvas { width:100%; display:block; background:#111; } #modal img, #modal video { border-radius:var(--r); } .photos img { cursor:zoom-in; aspect-ratio:4/3; object-fit:cover; }
.stars { margin-top:4px; } .stars button { padding:0; width:38px; min-height:42px; font-size:22px; border:0; background:none; color:#cfcfcb; } .stars button:hover { color:var(--fish); } .stars button.sel { color:var(--fish); }
.staffrow { padding:12px 0; border-bottom:1px solid var(--line); }
.setrow { display:flex; align-items:center; border-bottom:1px solid var(--line); padding:10px 0; } .setrow > div { flex:1; min-width:0; overflow-wrap:anywhere; } .setrow button { flex:none; }
.colhead { display:flex; justify-content:space-between; align-items:center; gap:4px; padding:8px 2px 6px; } .colhead button { flex:none; }
.tlist { background:#e9e9e6; border-radius:var(--r); padding:8px; min-height:64px; display:flex; flex-direction:column; gap:8px; } .tlist:empty::after { content:"拖到这里"; color:var(--mute); margin:auto; font-size:14px; }
.tcard { background:var(--paper); border:1px solid var(--line); border-radius:var(--r); display:flex; user-select:none; -webkit-user-select:none; flex:none; } .tcard:hover { border-color:var(--edge); }
.tcard .handle { touch-action:none; flex:none; width:44px; display:flex; align-items:center; justify-content:center; font-size:22px; color:#8c8c88; cursor:grab; -webkit-touch-callout:none; }
.tbody { flex:1; min-width:0; padding:10px 8px 4px 0; overflow-wrap:anywhere; } .tacts { margin-left:-8px; } .tcard.lifted { display:none; } .hole { flex:none; border:2px dashed var(--fish); border-radius:var(--r); background:var(--fishbg); }
.ghost { position:fixed; left:0; top:0; z-index:9; pointer-events:none; box-shadow:0 14px 34px #0003; border-color:var(--ink); } body.dragging { cursor:grabbing; user-select:none; -webkit-user-select:none; }
.gone { margin-top:16px; } .sttabs { position:sticky; top:0; z-index:2; display:flex; gap:8px; padding:8px 0; background:var(--bg); } .sttabs button { flex:1; } .brand { display:none; }

/* windows on top */
#modal { position:fixed; inset:0; background:#161616b8; display:flex; align-items:center; justify-content:center; padding:14px; z-index:5; } #modal > div { background:var(--paper); border-radius:var(--r); padding:24px; width:min(480px,100%); max-height:94vh; overflow:auto; display:grid; gap:14px; animation:rise .2s var(--ease); } #modal label { display:block; }
#toast { position:fixed; left:50%; bottom:84px; transform:translateX(-50%); background:var(--ink); color:#fff; border:1px solid #4a4a47; padding:12px 18px; border-radius:var(--r); z-index:6; width:max-content; max-width:calc(100vw - 32px); pointer-events:none; }
@keyframes rise { from { transform:translateY(10px); } }
@media (prefers-reduced-motion:reduce) { * { animation:none !important; transition:none !important; } }

@media (max-width:480px) { .demo span { width:100%; text-align:center; } .gate .door { min-height:140px; padding:16px; } }
@media (max-width:899px) {
  main.owner { max-width:760px; padding-bottom:100px; }
  .nav { position:fixed; bottom:0; left:0; right:0; z-index:3; background:var(--ink); display:flex; padding-bottom:env(safe-area-inset-bottom); }
  .nav button { flex:1; padding:8px 2px 7px; min-height:60px; font-size:12px; color:#b9b9b5; border-radius:0; } .nav button > span { display:block; } .nav .ico { width:22px; height:22px; vertical-align:0; margin:0; }
  .nav button.on { background:none; color:#fff; font-weight:600; } .nav button.on .ico { color:var(--fish); } .nav em { position:absolute; top:4px; left:54%; margin:0; }
  .photos { grid-template-columns:1fr; } .photos .card:not(.cur) { display:none; } .pager { margin-bottom:10px; } .stars button { width:18%; min-height:52px; font-size:32px; }
  .board[data-st="counter"] [data-station="floor"], .board[data-st="floor"] [data-station="counter"] { display:none; } .station > h3 { display:none; }
}
@media (min-width:900px) {
  main.owner { max-width:none; padding:0; } main.owner .demo { margin:0; }
  .shell { display:grid; grid-template-columns:216px minmax(0,1fr); min-height:calc(100vh - 48px); } .page { padding:32px 36px 60px; max-width:1480px; width:100%; }
  .nav { background:var(--paper); border-right:1px solid var(--line); padding:32px 16px; display:flex; flex-direction:column; gap:4px; position:sticky; top:0; align-self:start; height:calc(100vh - 48px); } .brand { display:block; font-size:23px; padding:4px 14px 32px; }
  .nav button { text-align:left; padding:8px 14px; color:var(--mute); } .nav button:hover { background:var(--soft); color:var(--ink); } .nav button > span { display:inline-block; width:32px; } .nav .ico { margin:0; } .nav button.on { background:var(--ink); color:#fff; font-weight:600; }
  .page > h1 { font-size:38px; } .card { padding:24px; } .pager, .sttabs { display:none !important; } #toast { bottom:32px; }
  .station { margin-bottom:22px; } .cols { display:flex; gap:12px; overflow-x:auto; padding-bottom:4px; } .col { flex:1 0 215px; min-width:0; } .tlist { max-height:max(260px, calc((100vh - 350px) / 2)); overflow-y:auto; }
  .tcard { cursor:grab; } .tcard .handle { width:28px; } .tacts button { min-height:32px; padding:2px 8px; font-size:14px; }
}

/* cloud: sign-in, connection */
main.plain { max-width:460px; padding-top:24px; } .stack { display:grid; gap:16px; margin:20px 0; } .stack input { width:100%; display:block; } .mast, main.plain .mast { margin-top:-16px; } main.plain .mast { margin-top:-24px; }
.offbar { background:var(--amberbg); color:var(--amber); padding:8px 16px; margin:-16px -16px 16px; text-align:center; font-size:14px; font-weight:600; } main.owner .offbar { margin-bottom:0; } .offbar + .mast { margin-top:-16px; }
.foot { margin-top:24px; display:grid; gap:8px; justify-items:start; } .alert button { margin-left:8px; min-height:36px; padding:2px 12px; }
.mast { padding-top:calc(20px + env(safe-area-inset-top)); } img[data-photo]:not([src]) { background:var(--soft); }
@media (min-width:900px) { main.owner .offbar { margin:0; } .shell { min-height:100vh; } .nav { height:100vh; } }