:root {
  /* Merchant & Guild: engraved ink, brass and parchment */
  --ink: #1f1c18;
  --ink-2: #2c2822;
  --accent: #c49c58;
  --brass: #8d6830;
  --bg: #f3ede2;
  --card: #fffdf8;
  --text: #221d17;
  --muted: #74695a;
  --line: #e5dccb;
  --soft: #f6f0e5;
  --serif: "Cinzel", "Trajan Pro", Georgia, serif;
  --green: #12805c;
  --green-bg: #e3f5ec;
  --red: #c8322b;
  --red-bg: #fdecea;
  --amber: #b26a00;
  --amber-bg: #fff4dc;
  --blue: #2457c5;
  --blue-bg: #e8effc;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
  --radius: 14px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14120f;
    --card: #1f1c18;
    --text: #efe8dc;
    --muted: #a89c8a;
    --line: #342f27;
    --soft: #29251f;
    --green: #4ccf98;
    --green-bg: #12352a;
    --red: #ff7b72;
    --red-bg: #3d1b1d;
    --amber: #e0b35f;
    --amber-bg: #3a2e14;
    --blue: #7ea6ff;
    --blue-bg: #1b2a4d;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, sans-serif;
  -webkit-tap-highlight-color: transparent;
  padding-bottom: env(safe-area-inset-bottom);
}
button, input, textarea, select { font: inherit; color: inherit; }
h1, .dayhead h1, .card h2, .section-head h2, .sheet-head h3, .venue .top h2, .done-screen h3 { font-family: var(--serif); font-weight: 600; letter-spacing: .02em; }
button { cursor: pointer; }
a { color: inherit; }
.boot { padding: 40vh 0; text-align: center; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.hidden { display: none !important; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20; background: var(--ink); color: #fff; border-bottom: 1px solid rgba(196, 156, 88, .35);
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
  display: flex; align-items: center; gap: 12px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: .2px; min-width: 0; }
.brand .wordmark { height: 22px; width: auto; display: block; }
.brand .role { font-family: var(--serif); color: var(--accent); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; margin-left: 2px; }
.brand .logo { width: 30px; height: 30px; border-radius: 8px; background: var(--accent); color: var(--ink); display: grid; place-items: center; font-size: 13px; font-weight: 800; flex: none; }
.brand .where { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand small { display: block; font-weight: 500; opacity: .7; font-size: 12px; }
.topbar .spacer { flex: 1; }
.topnav { display: flex; gap: 4px; }
.topnav a { color: #fff; text-decoration: none; opacity: .75; padding: 6px 10px; border-radius: 8px; font-size: 14px; }
.topnav a.on { opacity: 1; background: rgba(255,255,255,.12); }
.chip-btn {
  border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.08); color: #fff;
  border-radius: 999px; padding: 6px 12px; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
}
.brand { flex: none; }
.chip-btn .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.chip-btn svg { width: 16px; height: 16px; }
.chip-btn .short { display: none; }
@media (max-width: 480px) {
  .chip-btn .long { display: none; }
  .chip-btn .short { display: inline; }
  .logo-plate.top { width: 104px; height: 34px; }
  .topbar { gap: 8px; padding-left: 12px; padding-right: 12px; }
  .brand .where { display: none; }
  .brand .role { display: none; }
  .topbar .brand .wordmark { display: none; }
  .topbar .brand .mark { display: block; }
  .chip-btn.mgr .name { display: none; }
  .chip-btn.mgr { padding: 6px 9px; }
  .topnav { gap: 0; }
  .topnav a { padding: 6px 7px; font-size: 14px; }
  .chip-btn { padding: 6px 10px; font-size: 14px; }
  .chip-btn .name { max-width: 72px; overflow: hidden; text-overflow: ellipsis; }
}

.tabs { position: sticky; top: calc(50px + env(safe-area-inset-top)); z-index: 19; background: var(--ink); display: flex; padding: 0 8px; }
.tabs a { flex: 1; text-align: center; color: #fff; opacity: .65; text-decoration: none; padding: 10px 4px 12px; font-size: 15px; border-bottom: 3px solid transparent; }
.tabs a.on { opacity: 1; border-color: var(--accent); font-weight: 600; }
.tabs .count { background: var(--red); color: #fff; border-radius: 999px; font-size: 12px; padding: 1px 7px; margin-left: 4px; font-weight: 700; }
.tabs .count.quiet { background: rgba(255,255,255,.2); }

main { max-width: 760px; margin: 0 auto; padding: 16px 16px 120px; }
main.wide { max-width: 1180px; }

/* ---------- cards ---------- */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 14px; overflow: hidden; }
.card-pad { padding: 16px; }
.card h2 { font-size: 17px; margin: 0; }
.card-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.card-head h2 { flex: 1; }

.pill { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--soft); color: var(--muted); white-space: nowrap; }
.pill.green { background: var(--green-bg); color: var(--green); }
.pill.red { background: var(--red-bg); color: var(--red); }
.pill.amber { background: var(--amber-bg); color: var(--amber); }
.pill.blue { background: var(--blue-bg); color: var(--blue); }

/* ---------- day header ---------- */
.dayhead { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.dayhead .ring { flex: none; }
.dayhead .info { flex: 1; min-width: 0; }
.dayhead h1 { font-size: 22px; margin: 0; }
.dayhead .sub { color: var(--muted); font-size: 14px; margin-top: 2px; }
.daynav { display: flex; gap: 6px; }
.iconbtn { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); display: grid; place-items: center; color: var(--text); }
.iconbtn:disabled { opacity: .35; }
.iconbtn svg { width: 20px; height: 20px; }
.ring svg { display: block; }
.ring-label { font-weight: 700; font-size: 15px; }

.banner { border-radius: var(--radius); padding: 12px 14px; margin-bottom: 14px; display: flex; gap: 12px; align-items: flex-start; }
.banner svg { width: 22px; height: 22px; flex: none; margin-top: 1px; }
.banner.note { background: var(--amber-bg); color: var(--text); }
.banner.note svg { color: var(--amber); }
.banner.bad { background: var(--red-bg); }
.banner.bad svg { color: var(--red); }
.banner.info { background: var(--blue-bg); }
.banner.info svg { color: var(--blue); }
.banner .title { font-weight: 700; }
.banner .body { white-space: pre-wrap; margin-top: 2px; }
.banner button.link { background: none; border: 0; padding: 0; color: inherit; text-decoration: underline; font-weight: 600; }
.missed-list { margin: 8px 0 0; padding: 0; list-style: none; font-size: 14px; }
.missed-list li { padding: 3px 0; display: flex; gap: 8px; }
.missed-list .sec { color: var(--muted); }

/* ---------- sections & tasks ---------- */
.section-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); background: none; border-left: 0; border-right: 0; border-top: 0; width: 100%; text-align: left; }
.section-head h2 { font-size: 17px; margin: 0; flex: 1; }
.section-head .count { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.section-head .chev { width: 18px; height: 18px; color: var(--muted); transition: transform .2s; }
.section.collapsed .chev { transform: rotate(-90deg); }
.section.collapsed .tasks { display: none; }
.section.collapsed .section-head { border-bottom: 0; }
.section.overdue { box-shadow: inset 4px 0 0 var(--red), var(--shadow); }
.section.carried { box-shadow: inset 4px 0 0 var(--amber), var(--shadow); }
.bar { height: 4px; background: var(--soft); }
.bar > i { display: block; height: 100%; background: var(--green); transition: width .3s; }

.tasks { list-style: none; margin: 0; padding: 0; }
.task { display: flex; align-items: stretch; border-bottom: 1px solid var(--line); }
.task:last-child { border-bottom: 0; }
.task .tap { flex: 1; display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; background: none; border: 0; text-align: left; min-height: 60px; }
.task .tap:disabled { cursor: default; }
.box { flex: none; width: 28px; height: 28px; border-radius: 9px; border: 2px solid #c3c9d4; display: grid; place-items: center; transition: all .15s; margin-top: -1px; }
.box svg { width: 18px; height: 18px; color: #fff; opacity: 0; transform: scale(.5); transition: all .15s; }
.task.done .box { background: var(--green); border-color: var(--green); }
.task.done .box svg { opacity: 1; transform: scale(1); }
.task.overdue .box { border-color: var(--red); }
.task .what { flex: 1; min-width: 0; }
.task .t { font-size: 16.5px; }
.task.done .t { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(102,112,133,.5); }
.task .hint { font-size: 13.5px; color: var(--muted); margin-top: 2px; }
.task .meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; font-size: 13px; }
.task .meta .by { color: var(--green); font-weight: 600; }
.task .meta .late { color: var(--amber); font-weight: 600; }
.task .side { flex: none; width: 48px; border: 0; background: none; color: var(--muted); display: grid; place-items: center; opacity: .6; }
.task .side:hover { opacity: 1; color: var(--red); }
.task .side svg { width: 19px; height: 19px; }
.task.pop .box { animation: pop .3s; }
@keyframes pop { 50% { transform: scale(1.18); } }

.addrow { display: flex; gap: 8px; padding: 12px 16px; }
.addrow input { flex: 1; }

/* ---------- forms ---------- */
.field { margin-bottom: 16px; }
.field > label, .label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.input, textarea.input, select.input {
  width: 100%; border: 1.5px solid var(--line); background: var(--card); border-radius: 12px; padding: 12px 14px; outline: none;
}
.input:focus { border-color: var(--blue); }
textarea.input { resize: vertical; min-height: 84px; }
.btn {
  border: 0; border-radius: 12px; padding: 12px 18px; font-weight: 650; background: var(--soft); color: var(--text);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px;
}
.btn svg { width: 18px; height: 18px; }
.btn.primary { background: var(--ink); color: #fff; }
@media (prefers-color-scheme: dark) { .btn.primary { background: var(--accent); color: var(--ink); } }
.btn.danger { background: var(--red-bg); color: var(--red); }
.btn.green { background: var(--green); color: #fff; }
.btn.block { width: 100%; }
.btn.sm { min-height: 36px; padding: 7px 12px; font-size: 14px; border-radius: 10px; }
.btn:disabled { opacity: .5; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1.5px solid var(--line); background: var(--card); border-radius: 999px; padding: 8px 14px; font-size: 14.5px; }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
@media (prefers-color-scheme: dark) { .chip.on { background: var(--accent); color: var(--ink); border-color: var(--accent); } }

.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; }
.seg button { border: 1.5px solid var(--line); background: var(--card); border-radius: 12px; padding: 10px 8px; text-align: center; }
.seg button b { display: block; font-size: 15px; }
.seg button span { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.seg button.on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.seg button.on.urgent { border-color: var(--red); box-shadow: inset 0 0 0 1px var(--red); background: var(--red-bg); }
@media (prefers-color-scheme: dark) { .seg button.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); } }

.toggle { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.toggle:last-child { border-bottom: 0; }
.toggle span { flex: 1; }
.switch { position: relative; width: 50px; height: 30px; flex: none; }
.switch input { opacity: 0; width: 100%; height: 100%; position: absolute; margin: 0; cursor: pointer; z-index: 1; }
.switch i { position: absolute; inset: 0; background: #c3c9d4; border-radius: 99px; transition: .2s; }
.switch i::after { content: ""; position: absolute; width: 24px; height: 24px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + i { background: var(--green); }
.switch input:checked + i::after { transform: translateX(20px); }

/* ---------- FAB ---------- */
.fab {
  position: fixed; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 25;
  background: var(--red); color: #fff; border: 0; border-radius: 999px; padding: 15px 22px 15px 18px;
  font-weight: 700; font-size: 16px; display: flex; align-items: center; gap: 8px;
  box-shadow: 0 8px 24px rgba(200, 50, 43, .35);
}
.fab svg { width: 22px; height: 22px; }

/* ---------- sheet ---------- */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(20, 16, 10, .55); z-index: 50; display: flex; align-items: flex-end; justify-content: center; animation: fade .2s; }
.sheet {
  background: var(--bg); width: 100%; max-width: 640px; max-height: 94vh; border-radius: 20px 20px 0 0;
  display: flex; flex-direction: column; animation: up .25s cubic-bezier(.2, .8, .2, 1); overflow: hidden;
}
@media (min-width: 700px) { .sheet-backdrop { align-items: center; } .sheet { border-radius: 20px; max-height: 88vh; } }
.sheet-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; background: var(--card); border-bottom: 1px solid var(--line); }
.sheet-head h3 { flex: 1; margin: 0; font-size: 18px; }
.sheet-body { overflow-y: auto; padding: 16px; flex: 1; -webkit-overflow-scrolling: touch; }
.sheet-foot { padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--card); border-top: 1px solid var(--line); display: flex; gap: 10px; }
.sheet-foot .btn { flex: 1; }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }

.types { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.type {
  border: 0; background: var(--card); border-radius: 16px; padding: 18px 14px; text-align: left; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 8px; min-height: 140px;
}
.type .ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; }
.type .ic svg { width: 26px; height: 26px; }
.type b { font-size: 17px; }
.type span { font-size: 13px; color: var(--muted); }
.t-incident .ic { background: var(--red-bg); color: var(--red); }
.t-broken .ic { background: var(--amber-bg); color: var(--amber); }
.t-maintenance .ic { background: var(--blue-bg); color: var(--blue); }
.t-other .ic { background: var(--soft); color: var(--muted); }

.photos { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.photo-add {
  flex: none; width: 96px; height: 96px; border-radius: 14px; border: 2px dashed #b9c0cc; background: var(--card);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 13px; color: var(--muted); position: relative;
}
.photo-add svg { width: 26px; height: 26px; }
.photo-add input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.thumb { flex: none; width: 96px; height: 96px; border-radius: 14px; background: var(--soft) center/cover; position: relative; }
.thumb button { position: absolute; top: -6px; right: -6px; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--bg); background: var(--ink); color: #fff; font-size: 14px; line-height: 1; padding: 0; }

.dupes { background: var(--blue-bg); border-radius: 12px; padding: 10px 12px; margin-bottom: 16px; font-size: 14px; }
.dupes button { display: block; width: 100%; text-align: left; border: 0; background: var(--card); border-radius: 10px; padding: 9px 12px; margin-top: 6px; font-size: 14px; }

.done-screen { text-align: center; padding: 30px 10px; }
.done-screen .big { width: 84px; height: 84px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; margin: 0 auto 16px; animation: pop .4s; }
.done-screen .big svg { width: 44px; height: 44px; }
.done-screen h3 { font-size: 22px; margin: 0 0 6px; }

/* ---------- issues ---------- */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.issue { display: flex; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); background: none; border-left: 0; border-right: 0; border-top: 0; width: 100%; text-align: left; align-items: center; }
.issue:last-child { border-bottom: 0; }
.issue .ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.issue .ic svg { width: 22px; height: 22px; }
.issue .what { flex: 1; min-width: 0; }
.issue .t { font-weight: 600; }
.issue .m { font-size: 13px; color: var(--muted); margin-top: 3px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.issue .ph { width: 52px; height: 52px; border-radius: 10px; background: var(--soft) center/cover; flex: none; }
.issue.urgent { box-shadow: inset 4px 0 0 var(--red); }
.empty { text-align: center; padding: 34px 16px; color: var(--muted); }
.empty svg { width: 40px; height: 40px; color: var(--green); display: block; margin: 0 auto 8px; }

.gallery { display: flex; gap: 10px; overflow-x: auto; margin-bottom: 14px; }
.gallery a { flex: none; }
.gallery img { height: 180px; border-radius: 12px; display: block; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 14.5px; margin-bottom: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.timeline { list-style: none; padding: 0; margin: 0 0 14px; }
.timeline li { position: relative; padding: 0 0 14px 22px; font-size: 14.5px; }
.timeline li::before { content: ""; position: absolute; left: 4px; top: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.timeline li::after { content: ""; position: absolute; left: 7.5px; top: 18px; bottom: 0; width: 1px; background: var(--line); }
.timeline li:last-child::after { display: none; }
.timeline .who { font-weight: 600; }
.timeline .when { color: var(--muted); font-size: 12.5px; }

/* ---------- login ---------- */
.login { min-height: 100vh; background: var(--ink); color: #fff; padding: calc(40px + env(safe-area-inset-top)) 16px 40px; }
.login-inner { max-width: 440px; margin: 0 auto; }
.login h1 { font-size: 26px; margin: 18px 0 4px; }
.masthead { text-align: center; padding: 18px 0 8px; }
.masthead img { width: 100%; max-width: 380px; height: auto; display: block; margin: 0 auto; }
.tagline { white-space: nowrap; display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 14px; font-family: var(--serif); color: var(--accent); font-size: 12px; letter-spacing: .32em; text-transform: uppercase; }
.tagline i { display: block; width: 34px; height: 1px; background: var(--accent); opacity: .7; }
.login .pick { text-align: center; margin: 26px 0 18px; }
@media (max-width: 420px) { .tagline { font-size: 10.5px; letter-spacing: .24em; gap: 8px; } .tagline i { width: 22px; } }
.login p { opacity: .7; margin: 0 0 24px; }
.login .logo { width: 56px; height: 56px; border-radius: 16px; background: var(--accent); color: var(--ink); display: grid; place-items: center; font-weight: 800; font-size: 20px; }
.venue-btn { display: flex; align-items: center; width: 100%; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); color: #fff; border-radius: 16px; padding: 18px; font-size: 18px; font-weight: 600; margin-bottom: 10px; text-align: left; }
.venue-btn span { flex: 1; }
.venue-btn svg { width: 20px; height: 20px; opacity: .6; }
.pin-dots { display: flex; gap: 14px; justify-content: center; margin: 26px 0; }
.pin-dots i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255,255,255,.5); }
.pin-dots i.on { background: var(--accent); border-color: var(--accent); }
.pin-dots.shake { animation: shake .4s; }
@keyframes shake { 25% { transform: translateX(-10px); } 75% { transform: translateX(10px); } }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; max-width: 320px; margin: 0 auto; }
.keypad button { height: 68px; border-radius: 18px; border: 0; background: rgba(255,255,255,.1); color: #fff; font-size: 26px; font-weight: 500; }
.keypad button:active { background: rgba(255,255,255,.25); }
.keypad button.ghost { background: none; font-size: 16px; }
.login .input { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.2); color: #fff; }
.login .input::placeholder { color: rgba(255,255,255,.5); }
.login .err { color: #ffb4ae; text-align: center; min-height: 22px; margin-top: 10px; }
.login .back { background: none; border: 0; color: #fff; opacity: .7; padding: 0; display: inline-flex; align-items: center; gap: 4px; }
.login .back svg { width: 18px; height: 18px; }
.login .mgr-link { display: block; margin: 30px auto 0; background: none; border: 0; color: #fff; opacity: .55; text-decoration: underline; }

/* ---------- venue logos ---------- */
.logo-plate { background: var(--ink); display: flex; align-items: center; justify-content: center; border-radius: 12px; padding: 10px 14px; overflow: hidden; }
.logo-plate img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.logo-plate.top { height: 38px; width: 130px; padding: 4px 8px; border-radius: 8px; flex: none; }
.logo-plate.tile { height: 76px; width: 100%; padding: 16px 26px; }
.logo-plate.hero { height: 64px; max-width: 220px; margin: 24px auto 0; padding: 0; background: none; }
.logo-plate.card { height: 64px; border-radius: 0; padding: 12px 20px; }
.logo-plate.name-only { background: rgba(255,255,255,.08); color: #fff; font-size: 20px; font-weight: 700; text-align: center; }
.venue-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 360px) { .venue-tiles { grid-template-columns: 1fr; } }
.venue-tile { border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.06); color: #fff; border-radius: 16px; padding: 8px; display: flex; flex-direction: column; gap: 8px; text-align: center; }
.venue-tile:active { transform: scale(.98); }
.venue-tile .logo-plate { border: 1px solid rgba(255,255,255,.08); }
.venue-tile .nm { font-size: 14px; font-weight: 600; opacity: .85; padding-bottom: 4px; }

/* ---------- dashboard ---------- */
.venues { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.venue { cursor: pointer; text-decoration: none; display: block; color: inherit; }
.venue .card-pad { display: grid; gap: 12px; }
.venue .top { display: flex; align-items: center; gap: 10px; }
.venue .top h2 { flex: 1; font-size: 18px; }
.venue .rows { display: grid; gap: 8px; }
.venue .row { display: flex; align-items: center; gap: 10px; font-size: 14.5px; }
.venue .row .n { width: 128px; color: var(--muted); }
.venue .row .bar { flex: 1; height: 8px; border-radius: 99px; overflow: hidden; }
.venue .row .bar > i { border-radius: 99px; }
.venue .row .bar.red > i { background: var(--red); }
.venue .row .v { width: 54px; text-align: right; font-variant-numeric: tabular-nums; font-size: 13.5px; }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.week div { border-radius: 8px; padding: 6px 0 5px; text-align: center; font-size: 11.5px; line-height: 1.2; }
.week div b { display: block; font-size: 13px; }
.week .g { background: var(--green-bg); color: var(--green); }
.week .a { background: var(--amber-bg); color: var(--amber); }
.week .r { background: var(--red-bg); color: var(--red); }
.week .n { background: var(--soft); color: var(--muted); }
.week .p { background: var(--soft); color: var(--text); outline: 1.5px dashed var(--line); }
.badges { display: flex; flex-wrap: wrap; gap: 6px; }

.history .day { display: flex; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); align-items: flex-start; }
.history .day:last-child { border-bottom: 0; }
.history .d { width: 92px; flex: none; font-weight: 600; }
.history .d span { display: block; font-weight: 400; color: var(--muted); font-size: 13px; }
.history .r { flex: 1; font-size: 14px; }
.history .r ul { margin: 6px 0 0; padding-left: 18px; color: var(--muted); }

/* ---------- accounts ---------- */
.role-buttons { display: grid; gap: 12px; margin-top: 34px; }
.role-btn { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; padding: 18px; border-radius: 16px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(196, 156, 88, .35); color: #fff; }
.role-btn:active { transform: scale(.99); }
.role-btn > svg:first-child { width: 26px; height: 26px; color: var(--accent); flex: none; }
.role-btn > svg:last-child { width: 18px; height: 18px; opacity: .5; flex: none; }
.role-btn span { flex: 1; }
.role-btn b { display: block; font-family: var(--serif); font-size: 18px; letter-spacing: .03em; }
.role-btn small { display: block; opacity: .65; font-size: 13.5px; margin-top: 2px; }
.login .chips.recent { justify-content: center; margin-top: 16px; }
.login .chip { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.18); color: #fff; }
.login .chip.on { background: var(--accent); border-color: var(--accent); color: var(--ink); }
.login .label { color: #fff; opacity: .85; }
.login .hint-text, .hint-text { font-size: 13px; opacity: .7; margin-top: 6px; }
.login .grid2 { gap: 0 12px; }
.venue-tiles.light .venue-tile { background: var(--card); color: var(--text); border-color: var(--line); }
.person { padding: 14px 16px; border-bottom: 1px solid var(--line); }
.person:last-child { border-bottom: 0; }
.person .row1 { display: flex; gap: 10px; align-items: flex-start; }
.person .who { flex: 1; min-width: 0; }
.person .who .small { margin-top: 3px; }
.person .tool { width: 36px; height: 36px; border-radius: 10px; border: 0; background: none; color: var(--muted); display: grid; place-items: center; }
.person .tool svg { width: 18px; height: 18px; }
.person .actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 12px; }
.person .chips .chip { padding: 6px 12px; font-size: 13.5px; }
.temp-pin { font: 700 44px/1 var(--serif); letter-spacing: .3em; text-align: center; padding: 18px 0 18px .3em; background: var(--soft); border-radius: 14px; margin: 8px 0 12px; }
.nav-count { background: var(--accent); color: var(--ink); border-radius: 999px; font-size: 11.5px; font-weight: 700; padding: 1px 6px; margin-left: 5px; }
.brand .mark { display: none; width: 30px; height: 30px; border-radius: 8px; }

/* ---------- setup ---------- */
.setup-venues { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid3 { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 12px; align-items: end; }
@media (max-width: 560px) { .grid2, .grid3 { grid-template-columns: 1fr; } }
.srow { border-bottom: 1px solid var(--line); padding: 10px 12px 10px 16px; }
.srow:last-child { border-bottom: 0; }
.srow .line { display: flex; gap: 6px; align-items: center; }
.srow .line .input { padding: 9px 12px; border-radius: 10px; }
.srow .more { display: grid; gap: 10px; padding: 10px 0 4px; }
.srow .tool { width: 36px; height: 36px; border-radius: 10px; border: 0; background: none; color: var(--muted); display: grid; place-items: center; flex: none; }
.srow .tool:hover { background: var(--soft); color: var(--text); }
.srow .tool svg { width: 18px; height: 18px; }
.srow .tool.on { color: var(--amber); }
.days { display: flex; gap: 4px; }
.days button { width: 36px; height: 34px; border-radius: 8px; border: 1.5px solid var(--line); background: var(--card); font-size: 13px; font-weight: 600; }
.days button.on { background: var(--ink); border-color: var(--ink); color: #fff; }
@media (prefers-color-scheme: dark) { .days button.on { background: var(--accent); border-color: var(--accent); color: var(--ink); } }
.secedit { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--soft); }
.secedit .input { padding: 8px 12px; border-radius: 10px; width: auto; }
.secedit .name { flex: 1; min-width: 140px; font-weight: 700; }

/* ---------- toast ---------- */
#toast {
  position: fixed; left: 50%; bottom: calc(90px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); z-index: 60;
  background: #111827; color: #fff; padding: 12px 16px; border-radius: 12px; font-size: 15px; display: flex; gap: 14px; align-items: center;
  opacity: 0; pointer-events: none; transition: all .2s; max-width: calc(100vw - 32px);
}
#toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
#toast button { background: none; border: 0; color: var(--accent); font-weight: 700; padding: 0; }
