:root {
  --bg: #f6f1ea;
  --card: #fffdf9;
  --ink: #1f1b16;
  --muted: #74695d;
  --line: #e6ddd1;
  --accent: #c4581b;      /* warm saffron */
  --accent-ink: #ffffff;
  --green: #2f7a55;       /* Irish green */
  --soft: #f0e6d8;
  --danger: #b3261e;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(60, 40, 20, .06), 0 6px 20px rgba(60, 40, 20, .06);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141210; --card: #1e1b18; --ink: #f3ece3; --muted: #a99c8e; --line: #312c27;
    --accent: #e57a3a; --green: #5fb487; --soft: #2a2520; --danger: #ef6b62;
    --shadow: none;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body {
  font: 16px/1.45 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  padding: env(safe-area-inset-top) 16px calc(88px + env(safe-area-inset-bottom));
  min-height: 100vh;
}
main { max-width: 560px; margin: 0 auto; padding-top: 20px; }
h1 { font: 700 28px/1.15 ui-serif, "New York", Georgia, serif; margin: 8px 0 4px; letter-spacing: -.01em; }
h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 28px 4px 10px; font-weight: 600; }
p { margin: 0 0 12px; }
.sub { color: var(--muted); margin-bottom: 20px; }
.loading { color: var(--muted); text-align: center; margin-top: 40vh; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); margin-bottom: 12px; }
.card h3 { margin: 0 0 4px; font-size: 17px; }
.card .muted { color: var(--muted); font-size: 14px; }

label { display: block; font-size: 14px; font-weight: 600; margin: 14px 0 6px; }
input {
  width: 100%; font: inherit; font-size: 17px; padding: 14px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--bg); color: var(--ink);
}
input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
input.code { letter-spacing: .4em; text-align: center; font-variant-numeric: tabular-nums; font-size: 24px; }

.btn {
  display: block; width: 100%; margin-top: 18px; padding: 15px; border: 0; border-radius: 14px;
  background: var(--accent); color: var(--accent-ink); font: inherit; font-weight: 650; font-size: 17px;
  text-align: center; text-decoration: none; cursor: pointer;
}
.btn.secondary { background: var(--soft); color: var(--ink); }
.btn.small { display: inline-block; width: auto; padding: 9px 14px; font-size: 14px; margin-top: 10px; }
.btn:disabled { opacity: .5; }
.error { color: var(--danger); font-size: 14px; margin-top: 10px; min-height: 1em; }

.row { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.row:first-of-type { border-top: 0; padding-top: 4px; }
.row .grow { flex: 1; min-width: 0; }
.row .title { font-weight: 600; }
.row .meta { color: var(--muted); font-size: 13px; }
.icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-weight: 700; color: #fff; flex: none; }
.i-drive { background: #3c8b5f; } .i-yt { background: #c53a2b; } .i-ig { background: #b04a8f; } .i-ai { background: #6a5acd; }

.pill { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--soft); color: var(--muted); white-space: nowrap; }
.pill.ok { background: color-mix(in srgb, var(--green) 18%, transparent); color: var(--green); }

.empty { text-align: center; padding: 26px 12px; color: var(--muted); }
.empty .big { font-size: 34px; margin-bottom: 6px; }

.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; }
.steps li { counter-increment: s; position: relative; padding: 2px 0 14px 40px; }
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%;
  background: var(--soft); display: grid; place-items: center; font-size: 14px; font-weight: 700;
}
.keybox { font: 600 15px/1.5 ui-monospace, Menlo, monospace; word-break: break-all; background: var(--soft); padding: 12px; border-radius: 12px; user-select: all; -webkit-user-select: all; }

.privacy li { margin-bottom: 8px; }

.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-around;
  background: color-mix(in srgb, var(--card) 92%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line); padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
}
.tabs button { flex: 1; background: none; border: 0; color: var(--muted); font: inherit; font-size: 11px; font-weight: 600; padding: 4px 0; cursor: pointer; }
.tabs button .ti { display: block; font-size: 20px; line-height: 1.3; }
.tabs button.active { color: var(--accent); }
.topbar { display: flex; justify-content: space-between; align-items: center; }
.link { background: none; border: 0; color: var(--accent); font: inherit; font-weight: 600; padding: 6px 0; cursor: pointer; }
.mt8 { margin-top: 8px; } .mt14 { margin-top: 14px; }
.privacy { margin: 0; padding-left: 18px; }
.muted { color: var(--muted); font-size: 14px; }
summary { cursor: pointer; }
.tabs[hidden] { display: none; }
.tabs svg { display: block; width: 22px; height: 22px; margin: 0 auto 2px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
