/* ルーレット以外の共通の外枠(上部バー・ログイン画面)。色は roulette.css の :root トークンを使う */
body { margin: 0; }
img { max-width: 100%; }
[hidden] { display: none !important; }
:root { padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }

.topbar { max-width: 1180px; margin: 0 auto 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.brand { font-family: var(--font-display); font-size: 14px; letter-spacing: .08em; color: var(--muted); }
.brand b { font-weight: 400; color: var(--fg); }
.topbar-right { display: flex; align-items: center; gap: 6px 10px; min-width: 0; flex-wrap: wrap; justify-content: flex-end; }
.topbar-right .ghost { white-space: nowrap; }
.topbar a.ghost { text-decoration: none; color: var(--fg); }
.topbar .who { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 40vw; }

/* ログイン */
.login { min-height: calc(100dvh - 60px); display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; }
.login-card { width: min(100%, 420px); background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 28px 24px; display: grid; gap: 16px; }
.login-card h1 { font-size: 28px; }
.login-card p { margin: 0; color: var(--muted); font-size: 13px; }
.login-card label { font-size: 12px; color: var(--muted); letter-spacing: .1em; font-weight: 700; }
.code-input { width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 12px; font-family: var(--font-mono); font-weight: 700; font-size: 18px; letter-spacing: .06em; text-transform: uppercase; }
.login-card .spin { width: 100%; }
.form-error { color: var(--hot); font-size: 13px; min-height: 1.6em; }
select { font: inherit; color: inherit; }
.topbar-link { font-size: 12px; color: var(--muted); }
.topbar-link:hover { color: var(--fg); }

/* 記録について */
.doc { max-width: 720px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.doc h1 { font-family: var(--font-display); font-weight: 400; font-size: 26px; margin: 0; }
.doc section { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 20px; }
.doc h2 { font-size: 15px; margin: 0 0 8px; }
.doc ul { margin: 0; padding-left: 1.3em; display: grid; gap: 4px; }
.doc p { margin: 0; color: var(--muted); font-size: 13px; }
.doc .yes h2 { color: var(--accent); }
.doc .no h2 { color: #5ad49b; }

/* ブランド・案内リンク(配信中に邪魔にならない小ささ) */
.topbar-right .topbar-link { white-space: nowrap; }
.site-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 10px; font-size: 12px; color: var(--muted); }
.site-footer b { color: var(--fg); font-weight: 700; letter-spacing: .06em; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--accent); }
.login-links { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.powered { margin: 0; font-size: 11px; color: var(--muted); letter-spacing: .04em; }
.powered b { color: var(--fg); }
.help-steps { margin: 0; padding-left: 1.4em; display: grid; gap: 6px; }
.help-contact { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.help-contact a { display: inline-block; border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; text-decoration: none; color: var(--fg); background: var(--surface-2); font-size: 13px; }
.help-contact a:hover { border-color: var(--accent); }
