/* 会員ページ・スタッフページ共通 */
:root {
  --bg: #0d0a08; --surface: #1a1410; --text: #efe7da; --muted: #a69a8c;
  --accent: #c9a96e; --accent-dark: #e6cf9c; --gold: #c9a96e; --line: rgba(201,169,110,.25);
  --ok: #7bc48a; --ng: #e07a6a; --stamp: #c9a96e;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: "Noto Sans JP", system-ui, sans-serif; line-height: 1.7; }
a { color: inherit; }
.top { background: var(--surface); border-bottom: 1px solid var(--line); }
.top .in { max-width: 560px; margin: 0 auto; padding: 0 16px; height: 56px; display: flex; align-items: center; justify-content: space-between; }
.top .logo { font-family: "Noto Serif JP", serif; font-weight: 700; font-size: 1.15rem; text-decoration: none; }
.top .logo small { font-family: "Noto Sans JP"; font-size: .7rem; color: var(--muted); margin-left: 6px; }
.top a.back { font-size: .85rem; color: var(--muted); }
main { max-width: 560px; margin: 0 auto; padding: 20px 16px 48px; }
main.wide { max-width: 960px; }
h1 { font-family: "Noto Serif JP", serif; font-size: 1.5rem; margin: 8px 0 4px; text-align: center; }
.lead { text-align: center; color: var(--muted); margin: 0 0 20px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 20px; margin-bottom: 16px; }
.panel h2 { font-size: 1.05rem; margin: 0 0 12px; border-left: 4px solid var(--accent); padding-left: 10px; }
.btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 12px 16px; border-radius: 999px;
       font: inherit; font-weight: 700; font-size: 1rem; cursor: pointer; border: 1px solid var(--line); background: var(--surface); color: var(--text); text-decoration: none; }
.btn + .btn { margin-top: 10px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #1a130c; }
.btn.apple { background: #fff; border-color: #fff; color: #000; }
.btn.small { width: auto; display: inline-flex; white-space: nowrap; flex: none; padding: 6px 14px; font-size: .85rem; }
.btn.danger { color: var(--ng); border-color: var(--ng); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn svg { width: 20px; height: 20px; flex: none; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .85rem; margin: 18px 0; }
.or::before, .or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
label { display: block; font-size: .85rem; font-weight: 700; margin: 10px 0 4px; }
input, select { width: 100%; font: inherit; font-size: 1rem; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--text); }
.tabs { display: flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; margin-bottom: 8px; }
.tabs button { flex: 1; border: 0; background: none; font: inherit; font-weight: 700; padding: 8px; border-radius: 999px; color: var(--muted); cursor: pointer; }
.tabs button.on { background: var(--accent); color: #1a130c; }
.msg { border-radius: 10px; padding: 10px 14px; font-size: .9rem; margin: 10px 0; }
.msg.err { background: color-mix(in srgb, var(--ng) 12%, transparent); color: var(--ng); }
.msg.ok { background: color-mix(in srgb, var(--ok) 12%, transparent); color: var(--ok); }
.msg.info { background: color-mix(in srgb, var(--gold) 18%, transparent); }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }
.linkbtn { background: none; border: 0; font: inherit; color: var(--accent-dark); text-decoration: underline; cursor: pointer; padding: 0; }
.hidden { display: none !important; }

/* 会員証 */
.card { border-radius: 20px; padding: 20px; color: #efe7da; background: linear-gradient(135deg, #2a1f15, #120d09 65%); border: 1px solid rgba(201,169,110,.5); box-shadow: 0 20px 40px rgba(0,0,0,.5); }
.card .brand { color: #e6cf9c; letter-spacing: .3em; }
.card .row { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.card .brand { font-family: "Noto Serif JP", serif; font-weight: 700; font-size: 1.2rem; flex: none; }
.card .brand small { display: block; font-family: "Noto Sans JP"; font-size: .7rem; opacity: .85; font-weight: 400; white-space: nowrap; }
.card .nm { font-weight: 700; font-size: 1.05rem; text-align: right; overflow-wrap: anywhere; }
.stamps { max-width: 360px; margin-left: auto; margin-right: auto; }
.qr { margin: 18px auto 10px; width: min(260px, 72vw); aspect-ratio: 1; border-radius: 22px; box-shadow: 0 0 0 1px rgba(230,207,156,.35), 0 10px 30px rgba(0,0,0,.45); }
.qr svg, .qr img { width: 100%; height: 100%; display: block; }
.code { text-align: center; font-family: ui-monospace, Menlo, monospace; letter-spacing: .15em; font-size: 1.1rem; font-weight: 700; }
.card .hint { text-align: center; font-size: .8rem; opacity: .9; margin: 4px 0 0; }

/* スタンプ */
.stamps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin: 8px 0; }
.st { aspect-ratio: 1; border-radius: 50%; border: 2px dashed var(--line); display: grid; place-items: center; font-weight: 700; color: var(--muted); font-size: .8rem; }
.st.on { border: 0; background: var(--stamp); color: #1a130c; font-size: 1.3rem; animation: pop .4s ease; }
.st.goal { border-color: var(--gold); }
@keyframes pop { 0% { transform: scale(.3); } 70% { transform: scale(1.15); } 100% { transform: scale(1); } }
.progress { text-align: center; font-weight: 700; margin: 6px 0 0; }
.reward-ready { text-align: center; background: var(--gold); color: #1a130c; border-radius: 12px; padding: 10px; font-weight: 700; margin-top: 10px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; }
.stats div { background: var(--bg); border-radius: 12px; padding: 10px 4px; }
.stats b { display: block; font-size: 1.4rem; }
.stats span { font-size: .75rem; color: var(--muted); }
.hist { list-style: none; margin: 0; padding: 0; }
.hist li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: .9rem; }
.hist li:last-child { border-bottom: 0; }
.hist .plus { color: var(--ok); font-weight: 700; }
.hist .minus { color: var(--accent-dark); font-weight: 700; }
.hist .undone { text-decoration: line-through; opacity: .5; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 10px 18px; border-radius: 999px; font-weight: 700; z-index: 50; box-shadow: 0 6px 20px #0004; }

/* 言語の選択（会員証・プライバシーポリシー） */
.top .in { gap: 10px; }
.top .lang-wrap { margin-left: auto; }
.lang-sel { width: auto; font: inherit; font-size: .8rem; padding: 5px 26px 5px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); color: var(--text); }
@media (max-width: 420px) { .top .logo small { display: none; } .top a.back { font-size: .78rem; } }
