:root {
  --bg: #f6f4ef; --card: #fff; --ink: #1c2321; --muted: #6b726f; --line: #e3dfd6;
  --brand: #0f766e; --brand-ink: #fff; --accent: #e76f51; --ok: #2f855a; --warn: #b7791f; --chip: #eef3f1;
  --radius: 14px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #121614; --card: #1b201e; --ink: #e9ecea; --muted: #9aa39f; --line: #2c3330;
    --brand: #2bb3a6; --brand-ink: #062521; --chip: #233; }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; -webkit-text-size-adjust: 100%; }
a { color: var(--brand); }
.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px;
  padding: calc(env(safe-area-inset-top) + 10px) 16px 10px; background: var(--bg); border-bottom: 1px solid var(--line); }
.brand { font-weight: 700; text-decoration: none; color: var(--ink); }
#nav { margin-left: auto; display: flex; gap: 14px; font-size: 15px; }
#nav a { text-decoration: none; color: var(--muted); }
#nav a.on { color: var(--brand); font-weight: 600; }
main { max-width: 720px; margin: 0 auto; padding: 12px 16px calc(env(safe-area-inset-bottom) + 110px); }
h1 { font-size: 22px; margin: 8px 0 12px; }
h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 22px 0 8px; }
.muted { color: var(--muted); }
.center { text-align: center; }
.small { font-size: 14px; }
.card { display: block; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px; margin: 10px 0; color: inherit; text-decoration: none; }
.card .meta { font-size: 13px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; }
.card .snip { margin: 6px 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chip { background: var(--chip); border-radius: 999px; padding: 2px 10px; font-size: 13px; }
.pill { display: inline-block; border-radius: 999px; padding: 2px 10px; font-size: 13px; font-weight: 600; }
.pill.open { background: #d9f2e6; color: #155e3b; }
.pill.taken { background: #e6e1d6; color: #5a5144; }
.pill.warn { background: #fdecc8; color: #7a4d00; }
.banner { border-radius: var(--radius); padding: 12px 14px; margin: 10px 0; font-weight: 600; }
.banner.open { background: #d9f2e6; color: #155e3b; }
.banner.taken { background: #ece7dc; color: #4b4336; }
.banner.warn { background: #fdecc8; color: #6b4300; font-weight: 500; }
.post { white-space: pre-wrap; }
.imgs { display: flex; gap: 6px; overflow-x: auto; margin-top: 8px; }
.imgs img { height: 90px; border-radius: 8px; }
.opt { display: flex; gap: 12px; align-items: flex-start; }
.opt img { width: 84px; height: 84px; object-fit: cover; border-radius: 10px; flex: none; background: var(--chip); }
.opt .t { font-weight: 600; }
textarea { width: 100%; min-height: 260px; padding: 12px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--card); color: var(--ink); font-family: inherit; font-size: 15px; line-height: 1.45; resize: vertical; }
input[type=text], input[type=email] { width: 100%; padding: 12px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--card); color: var(--ink); font-size: 17px; }
.code-input { text-transform: uppercase; letter-spacing: .15em; text-align: center; font-size: 22px !important; }
button, .btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 12px;
  padding: 12px 16px; font-family: inherit; font-weight: 600; font-size: 16px; line-height: 1.2; cursor: pointer; text-decoration: none;
  background: var(--chip); color: var(--ink); min-height: 46px; }
.btn.primary, button.primary { background: var(--brand); color: var(--brand-ink); }
.btn.big, button.big { width: 100%; font-size: 17px; min-height: 54px; }
.btn.link, button.link { background: none; color: var(--brand); padding: 8px 4px; min-height: 0; }
.actions { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; background: var(--bg); border-top: 1px solid var(--line);
  padding: 10px 16px calc(env(safe-area-inset-bottom) + 10px); }
.actions .row { max-width: 720px; margin: 0 auto; display: grid; gap: 8px; }
.actions .two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.steps { padding-left: 20px; } .steps li { margin: 8px 0; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; margin: 8px 0; }
label.check { display: flex; gap: 8px; align-items: center; font-size: 15px; }
.codebox { font: 700 26px/1 ui-monospace, monospace; letter-spacing: .12em; padding: 14px; text-align: center;
  background: var(--chip); border-radius: 12px; margin: 8px 0; user-select: all; }
#toast { position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 130px); transform: translateX(-50%);
  background: #1c2321; color: #fff; padding: 10px 16px; border-radius: 999px; font-size: 15px; opacity: 0;
  transition: opacity .2s; pointer-events: none; z-index: 10; max-width: 90vw; text-align: center; }
#toast.show { opacity: 1; }
.warnlist { margin: 6px 0 0; padding-left: 18px; font-weight: 400; }
[hidden] { display: none !important; }
