:root {
  --ground: #F7F3FC;
  --card: #FFFFFF;
  --ink: #2E1F4A;
  --ink-2: #4A4160;
  --muted: #6B6280;
  --line: #E6DEF5;
  --line-2: #F0EBF8;
  --field: #D9CFEE;
  --accent: #6A54AE;
  --accent-dark: #4B3A86;
  --accent-soft: #EEE8FA;
  --lilac: #C6B2EA;
  --orange: #F37C2C;
  --orange-soft: #FFE9D8;
  --orange-ink: #9A4A10;
  --star: #F5A524;
  --star-off: #DCD3EC;
  --danger: #A3341F;
  --plum: #2E1F4A;
  --plum-2: #44365F;
  --radius: 20px;
  --display: 'Fraunces', Georgia, serif;
  --body: 'Figtree', system-ui, sans-serif;
  --tabbar-h: 72px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--ground); color: var(--ink); font-family: var(--body); font-size: 16px; line-height: 1.45; -webkit-tap-highlight-color: transparent; }
a { color: var(--accent); }
a:hover { color: var(--accent-dark); }
h1, h2, h3 { margin: 0; line-height: 1.2; }
button, input, select, textarea { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 3px solid #9C87D6; outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.desktop-only { display: none !important; }
@media (min-width: 900px) { .desktop-only { display: inline-flex !important; } .mobile-only { display: none !important; } }
.boot { min-height: 100vh; display: flex; align-items: center; justify-content: center; }

/* ---------- shell ---------- */
.shell { min-height: 100vh; display: flex; }
.content { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.main { flex: 1; width: 100%; max-width: 1160px; margin: 0 auto; padding: 16px 16px calc(var(--tabbar-h) + 40px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 16px; }
.main.narrow { max-width: 720px; }

.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; padding: 8px 12px 8px 16px; padding-top: calc(8px + env(safe-area-inset-top)); background: rgba(255,255,255,.96); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.topbar-logo { height: 32px; width: auto; }
.topbar-me { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; text-decoration: none; }
.topbar .back { display: flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 8px 0 0; font-weight: 700; text-decoration: none; }

.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: start; height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding: 6px 4px env(safe-area-inset-bottom); background: #FFFFFF; border-top: 1px solid var(--line); }
.tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 52px; text-decoration: none; color: var(--muted); font-size: 11px; font-weight: 600; }
.tab.active { color: var(--accent); font-weight: 700; }
.tab .fab { width: 54px; height: 54px; margin-top: -26px; border-radius: 50%; background: var(--orange); color: var(--ink); display: flex; align-items: center; justify-content: center; border: 4px solid var(--ground); box-shadow: 0 4px 12px rgba(243,124,44,.35); }
.tab.tab-new { justify-content: flex-start; }

.side { display: none; }
.side-logo { width: 190px; height: auto; margin: 4px 8px 20px; }
.side-label { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #FFB27A; padding: 0 12px 8px; }
.side-link { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 12px; border-radius: 10px; color: #E6DEF5; text-decoration: none; font-weight: 600; background: none; border: none; width: 100%; text-align: left; cursor: pointer; }
.side-link span.l { display: flex; align-items: center; gap: 10px; }
.side-link:hover { background: rgba(255,255,255,.08); color: #fff; }
.side-link.active { background: var(--plum-2); color: #fff; font-weight: 700; }
.side-sep { height: 1px; background: rgba(255,255,255,.14); margin: 14px 8px; }
.side .club-select { margin: 0 4px 18px; display: flex; flex-direction: column; gap: 4px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #BDB0D8; }
.side .club-select select { min-height: 42px; border-radius: 10px; border: 1px solid var(--plum-2); background: var(--plum-2); color: #fff; padding: 0 10px; font-size: 15px; letter-spacing: 0; text-transform: none; }
.side .club-select .name { color: #fff; font-size: 15px; letter-spacing: 0; text-transform: none; font-weight: 700; }

@media (min-width: 900px) {
  .side { display: flex; flex-direction: column; gap: 2px; width: 248px; flex: none; position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--plum); padding: 24px 14px; }
  .topbar, .tabbar, .admin-head { display: none !important; }
  .main { padding: 32px 40px 56px; gap: 24px; }
}

/* ---------- layout bits ---------- */
.row { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.col-2 { flex: 2 1 520px; min-width: 0; }
.col-1 { flex: 1 1 300px; min-width: 0; }
@media (min-width: 900px) { .row { gap: 24px; } }
.stack { display: flex; flex-direction: column; gap: 14px; }
.stack-sm { display: flex; flex-direction: column; gap: 6px; }
.inline { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.page-title { font-family: var(--display); font-weight: 700; font-size: 28px; line-height: 1.15; }
@media (min-width: 900px) { .page-title { font-size: 34px; } }
.sub { color: var(--muted); font-size: 15px; margin-top: 2px; }
.eyebrow { font-size: 12px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .08em; }
.eyebrow.orange { color: var(--orange-ink); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 14px; }
@media (min-width: 900px) { .card { padding: 22px; } }
.card-title { font-family: var(--display); font-weight: 700; font-size: 20px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.tiny { font-size: 13px; }

/* ---------- controls ---------- */
.btn { min-height: 48px; padding: 0 22px; border-radius: 999px; border: 1.5px solid transparent; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; white-space: nowrap; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-block { width: 100%; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--accent-dark); color: #fff; }
.btn-orange { background: var(--orange); color: var(--ink); }
.btn-orange:hover:not(:disabled) { background: #E86B17; color: var(--ink); }
.btn-outline { background: #fff; border-color: var(--accent); color: var(--accent); }
.btn-outline:hover:not(:disabled) { background: var(--accent-soft); }
.btn-ghost { background: transparent; color: var(--accent); }
.btn-ghost:hover:not(:disabled) { background: var(--accent-soft); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger-ghost { background: transparent; color: var(--danger); }
.btn-danger-ghost:hover:not(:disabled) { background: #FBEDEA; }
.btn-danger-outline { background: #fff; border-color: #E8C2B8; color: var(--danger); }
.btn-plum { background: var(--plum); color: #fff; }
.btn-plum:hover:not(:disabled) { background: var(--plum-2); color: #fff; }
.btn-plum-outline { background: #fff; border-color: var(--plum); color: var(--plum); }
.btn-sm { min-height: 40px; padding: 0 14px; font-size: 14px; }
.icon-btn { width: 44px; height: 44px; flex: none; border-radius: 12px; border: 1px solid var(--line); background: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: var(--ink); }
.icon-btn:hover:not(:disabled) { background: var(--accent-soft); }
.icon-btn:disabled { opacity: .35; cursor: not-allowed; }
.round-btn { width: 44px; height: 44px; flex: none; border: none; border-radius: 50%; background: var(--accent); color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.round-btn:disabled { opacity: .5; cursor: not-allowed; }
.link-btn { background: none; border: none; padding: 0; color: var(--accent); font-weight: 700; cursor: pointer; text-decoration: none; }
.link-btn:hover { color: var(--accent-dark); text-decoration: underline; }

.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 700; }
.field .hint, .req { font-weight: 400; color: var(--muted); font-size: 13px; }
.input, .field input, .field select, .field textarea { min-height: 48px; padding: 10px 14px; border: 1px solid var(--field); border-radius: 12px; background: var(--ground); font-weight: 400; font-size: 16px; width: 100%; }
.field textarea, textarea.input { resize: vertical; min-height: 96px; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); outline: 2px solid var(--accent-soft); outline-offset: 0; background: #fff; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.grid-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }

.switch { width: 56px; height: 32px; flex: none; border: none; border-radius: 999px; background: #B8AECB; padding: 3px; display: flex; cursor: pointer; transition: background .15s; }
.switch span { width: 26px; height: 26px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch.on { background: var(--accent); }
.switch.on span { transform: translateX(24px); }
.switch.plum.on { background: var(--plum); }
.toggles { padding: 4px 16px; gap: 0; }
.toggle-row { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--line-2); }
.toggle-row:last-child { border-bottom: none; }
.toggle-row .t { font-weight: 700; }
.toggle-row .d { font-size: 13px; color: var(--muted); }

.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--accent-soft); border-radius: 999px; padding: 4px; }
.seg button { min-height: 40px; padding: 0 18px; border: none; border-radius: 999px; background: transparent; color: var(--accent-dark); font-weight: 700; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--accent); color: #fff; }
.seg.plum { background: #E6DEF5; }
.seg.plum button { color: var(--plum); }
.seg.plum button[aria-pressed="true"] { background: var(--plum); color: #fff; }

.chip { display: inline-flex; align-items: center; white-space: nowrap; font-size: 12px; padding: 4px 10px; border-radius: 999px; font-weight: 700; background: #F3EFF9; color: var(--ink-2); }
.chip.lilac { background: var(--accent-soft); color: var(--accent-dark); }
.chip.orange { background: var(--orange-soft); color: var(--orange-ink); }
.chip.solid { background: var(--accent); color: #fff; }
.chip.danger { background: #FBEDEA; color: var(--danger); }
.chip.outline { background: #fff; border: 1px solid #E0D6F2; font-size: 11px; padding: 3px 8px; }
.chip-pill { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px 0 14px; border: none; border-radius: 999px; background: var(--accent-soft); color: var(--accent-dark); font-size: 14px; font-weight: 700; }
select.chip-pill { appearance: none; -webkit-appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%234B3A86' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; cursor: pointer; }

.alert { padding: 12px 14px; border-radius: 12px; font-size: 15px; }
.alert.error { background: #FBEDEA; color: #7D2A1E; }
.alert.ok { background: var(--accent-soft); color: var(--accent-dark); }
.alert.info { background: var(--orange-soft); color: var(--orange-ink); }

/* ---------- books ---------- */
.cover { border-radius: 8px; overflow: hidden; display: flex; align-items: flex-end; flex: none; color: #fff; }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover .ph { padding: 10px; font-family: var(--display); font-size: 13px; line-height: 1.2; text-shadow: 0 1px 2px rgba(0,0,0,.25); }
.book-title { font-family: var(--display); font-weight: 700; font-size: 22px; line-height: 1.15; }
.current-book { display: flex; gap: 14px; text-decoration: none; color: var(--ink); }
.current-book:hover { color: var(--ink); }
.next-box { margin-top: auto; background: var(--orange-soft); border-radius: 12px; padding: 8px 12px; font-size: 13px; color: var(--orange-ink); }
.scroller { display: flex; gap: 12px; overflow-x: auto; margin: 0 -16px; padding: 2px 16px 6px; scroll-snap-type: x proximity; }
@media (min-width: 900px) { .scroller { margin: 0 -22px; padding: 2px 22px 6px; } }
.scroller > * { scroll-snap-align: start; }
.shelf-book { flex: none; width: 112px; display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: var(--ink); }
.shelf-book:hover { color: var(--ink); }
.shelf-book .cover { width: 112px; height: 168px; }
.shelf-book .t { font-size: 14px; font-weight: 700; line-height: 1.25; }
.shelf-book .a { font-size: 12px; color: var(--muted); }
.book-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
@media (min-width: 900px) { .book-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 20px; } }
.book-card { display: flex; flex-direction: column; gap: 6px; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 10px; text-decoration: none; color: var(--ink); }
.book-card:hover { color: var(--ink); box-shadow: 0 6px 18px rgba(46,31,74,.1); }
.book-card .cover { width: 100%; aspect-ratio: 2 / 3; }
.book-card .t { font-weight: 700; line-height: 1.25; }
.book-card .a { font-size: 13px; color: var(--muted); }

.book-hero { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.hero-left { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.hero-info { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.hero-info .book-title { font-size: 30px; }
.hero-chips { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
@media (min-width: 900px) {
  .book-hero { flex-direction: row; align-items: flex-start; text-align: left; gap: 32px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
  .hero-info { align-items: flex-start; padding-top: 30px; }
  .hero-info .book-title { font-size: 40px; }
  .hero-chips { justify-content: flex-start; }
}
.rate-block { display: flex; flex-direction: column; align-items: center; }
.rate-block .label { font-size: 12px; font-weight: 700; color: var(--muted); }
.rate-block .note { font-size: 12px; color: var(--muted); max-width: 230px; text-align: center; }

.stars { display: inline-flex; gap: 1px; align-items: center; }
.star-btn { width: 44px; height: 44px; padding: 0; border: none; background: transparent; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }

.avg-box { display: flex; align-items: center; gap: 14px; background: var(--orange-soft); border-radius: 16px; padding: 14px 16px; }
.avg-box .num { font-family: var(--display); font-size: 40px; font-weight: 700; line-height: 1; }
.rating-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.rating-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.rating-row .n { flex: 1; min-width: 0; font-weight: 700; }
.rating-row.unrated { background: var(--ground); border-color: var(--line-2); }

/* ---------- comments ---------- */
.comment { display: flex; gap: 10px; }
.comment + .comment { border-top: 1px solid var(--line-2); padding-top: 12px; }
.comment .meta { font-size: 13px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.comment .body { white-space: pre-wrap; overflow-wrap: anywhere; }
.quick-comment { display: flex; gap: 8px; align-items: center; }
.quick-comment .input { flex: 1; min-width: 0; border-radius: 24px; }
.composer { background: var(--ground); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.composer .field input, .composer .field textarea { background: #fff; }

.avatar { border-radius: 50%; flex: none; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- meetings ---------- */
.meet-chip { flex: none; min-width: 104px; min-height: 64px; border-radius: 14px; border: 1px solid var(--line); background: #fff; color: var(--ink); display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: 8px 12px; text-align: left; cursor: pointer; }
.meet-chip strong { font-size: 14px; }
.meet-chip span { font-size: 12px; }
.meet-chip.past { color: var(--muted); }
.meet-chip.on { background: var(--accent); border: 2px solid var(--accent); color: #fff; }
.meet-detail { background: var(--ground); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.meet-detail ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 15px; }
.meet-detail .field input, .meet-detail .field textarea { background: #fff; }
.meet-row { border: 1px solid var(--line); border-radius: 16px; padding: 12px; display: flex; flex-direction: column; gap: 10px; background: #FCFAFE; }
.meet-row .field input, .meet-row .field textarea { background: #fff; }

/* ---------- members ---------- */
.bubble { display: flex; gap: 10px; align-items: flex-start; }
.bubble .b { flex: 1; min-width: 0; background: var(--ground); border-radius: 4px 16px 16px 16px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.roster { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.roster li { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 8px 8px 8px 10px; }
.roster li.lead { border: 2px solid var(--accent); }
.roster li.dragging { opacity: .5; }
.roster li.over { box-shadow: 0 -3px 0 var(--accent); }
.roster .grip { cursor: grab; color: #9A90B0; display: flex; }
.roster .who { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }

.list-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.list-card > a, .list-card > button { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 56px; padding: 0 16px; text-decoration: none; color: var(--ink); font-weight: 700; background: none; border: none; text-align: left; cursor: pointer; }
.list-card > * + * { border-top: 1px solid var(--line-2); }
.list-card .danger { color: var(--danger); }
.badge { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--orange); color: var(--ink); font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }

/* ---------- auth ---------- */
.auth { min-height: 100vh; background: var(--ground); display: flex; flex-direction: column; align-items: center; padding-bottom: 40px; }
.auth-band { width: 100%; background: var(--lilac); display: flex; flex-direction: column; align-items: center; padding: calc(16px + env(safe-area-inset-top)) 16px 60px; text-align: center; }
.auth-band img { width: min(380px, 92vw); height: auto; }
.auth-band p { margin: 0; color: var(--plum); font-weight: 600; }
.auth-card { width: calc(100% - 32px); max-width: 440px; margin-top: -40px; background: #fff; border-radius: 24px; padding: 24px 20px; display: flex; flex-direction: column; gap: 16px; box-shadow: 0 8px 24px rgba(74,58,134,.12); }
.auth-card h1 { font-family: var(--display); font-weight: 700; font-size: 26px; }
.toggle-box { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; background: var(--orange-soft); border-radius: 14px; }
.toggle-box .d { font-size: 13px; color: var(--orange-ink); }
.plain-head { width: 100%; display: flex; align-items: center; justify-content: space-between; padding: 8px 14px 8px 8px; background: #fff; border-bottom: 1px solid var(--line); }
.plain-head img { height: 28px; width: auto; }
.plain-head a { display: flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 8px; font-weight: 700; text-decoration: none; }
.form-page { width: 100%; max-width: 520px; padding: 24px 16px; display: flex; flex-direction: column; gap: 16px; }
.form-page h1 { font-family: var(--display); font-weight: 700; font-size: 28px; }

/* ---------- admin ---------- */
.admin-bg { background: #F3F0F8; }
.admin-head { background: var(--plum); color: #fff; padding: 6px 12px 14px; padding-top: calc(6px + env(safe-area-inset-top)); display: flex; flex-direction: column; gap: 10px; }
.admin-head .toprow { display: flex; align-items: center; justify-content: space-between; }
.admin-head .toprow a { display: flex; align-items: center; gap: 4px; min-height: 44px; color: #E6DEF5; text-decoration: none; font-weight: 700; }
.admin-head img { height: 24px; width: auto; }
.admin-head h1 { font-family: var(--display); font-size: 26px; font-weight: 700; }
.admin-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); background: var(--plum-2); border-radius: 999px; padding: 4px; }
.admin-tabs a { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; border-radius: 999px; color: #fff; text-decoration: none; font-weight: 700; }
.admin-tabs a[aria-current="page"] { background: #fff; color: var(--plum); }
.club-list { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px; padding: 0 16px 4px; }
.club-pick { flex: none; min-height: 58px; padding: 8px 14px; border-radius: 14px; border: 1px solid var(--line); background: #fff; color: var(--ink); text-align: left; display: flex; flex-direction: column; justify-content: center; cursor: pointer; }
.club-pick strong { font-size: 15px; }
.club-pick span { font-size: 12px; }
.club-pick.sel { background: var(--plum); border-color: var(--plum); color: #fff; }
@media (min-width: 900px) {
  .club-list { flex-direction: column; overflow: visible; margin: 0; padding: 0; }
  .club-pick { width: 100%; }
}
.member-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.member-card { border: 1px solid var(--line-2); border-radius: 16px; padding: 12px; display: flex; flex-direction: column; gap: 8px; background: #FCFAFE; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.req-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.req-card dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; font-size: 14px; }
.req-card dt { color: var(--muted); }
.req-card dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.req-action { background: var(--ground); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.req-action .field select, .req-action .input { background: #fff; }

.modal-back { position: fixed; inset: 0; background: rgba(46,31,74,.55); display: flex; align-items: flex-end; justify-content: center; z-index: 50; overflow-y: auto; }
.modal { width: 100%; max-width: 560px; background: #fff; border-radius: 24px 24px 0 0; padding: 24px 20px calc(24px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 16px; }
@media (min-width: 640px) { .modal-back { align-items: flex-start; padding: 64px 16px; } .modal { border-radius: 24px; padding: 30px; } }
.modal h2 { font-family: var(--display); font-size: 24px; font-weight: 700; }
.radio-card { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1px solid var(--line); border-radius: 14px; cursor: pointer; }
.radio-card.sel { border: 2px solid var(--plum); }
.radio-card input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--plum); }

.empty { padding: 24px; text-align: center; color: var(--muted); border: 1.5px dashed var(--field); border-radius: 16px; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.skeleton { color: var(--muted); padding: 24px 0; }

#toasts { position: fixed; bottom: calc(var(--tabbar-h) + 16px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 100; width: min(92vw, 440px); pointer-events: none; }
@media (min-width: 900px) { #toasts { bottom: 24px; } }
.toast { background: var(--plum); color: #fff; padding: 12px 16px; border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.2); font-size: 15px; }
.toast.error { background: #7D2A1E; }
