/* 夜空の紺と、星の金色。特定のゲームの画像やロゴは使わない */
:root {
  --bg: #0d1226;
  --card: rgba(255, 255, 255, 0.06);
  --line: rgba(255, 255, 255, 0.14);
  --text: #eef0f7;
  --soft: #a9b0c6;
  --gold: #e8c170;
  --gold-deep: #c9a24c;
  --on-gold: #1b1606;
  --danger: #ff9b9b;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font-family: "Hiragino Sans", "Noto Sans JP", "Yu Gothic", system-ui, sans-serif;
  line-height: 1.7;
  min-height: 100vh;
  background:
    radial-gradient(1px 1px at 12% 18%, #fff8, transparent),
    radial-gradient(1px 1px at 72% 9%, #fff6, transparent),
    radial-gradient(1.5px 1.5px at 88% 36%, #fff7, transparent),
    radial-gradient(1px 1px at 30% 62%, #fff5, transparent),
    radial-gradient(1px 1px at 55% 85%, #fff6, transparent),
    var(--bg);
  padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
}
main { max-width: 520px; margin: 0 auto; padding: 20px 16px 40px; }
a { color: var(--gold); }
header { text-align: center; margin: 12px 0 18px; }
h1 { margin: 0; font-size: 26px; letter-spacing: 0.06em; overflow-wrap: anywhere; }
.summary { margin: 4px 0 0; color: var(--gold); font-weight: 700; min-height: 1.7em; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px; margin-bottom: 14px; }
.label { margin: 0 0 8px; color: var(--soft); font-size: 13px; }
button { font: inherit; cursor: pointer; }
button:disabled { opacity: 0.4; cursor: default; }
.empty p { margin: 0; color: var(--soft); text-align: center; }

/* 一覧 */
.games { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 10px; }
.gameCard {
  display: flex; align-items: center; gap: 10px;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 10px 12px 10px 16px;
}
.gameCard.checked { border-color: rgba(232, 193, 112, 0.45); }
.gameLink { flex: 1; min-width: 0; min-height: 52px; display: flex; flex-direction: column; justify-content: center; color: var(--text); text-decoration: none; }
.gameName { font-size: 18px; font-weight: 800; overflow-wrap: anywhere; }
.gameMeta { font-size: 13px; color: var(--soft); }
.checkBtn {
  flex: none; min-height: 48px; padding: 0 16px; border: 0; border-radius: 24px;
  background: linear-gradient(180deg, var(--gold), var(--gold-deep)); color: var(--on-gold); font-weight: 800;
}
.doneMark { flex: none; color: var(--gold); font-weight: 800; padding: 0 8px; }
.add {
  display: flex; align-items: center; justify-content: center; min-height: 52px; margin-bottom: 14px;
  border: 1px dashed var(--line); border-radius: 16px; color: var(--gold); font-weight: 700; text-decoration: none;
}

/* 最近7日 */
.weekWrap { overflow-x: auto; }
.week { width: 100%; border-collapse: collapse; font-size: 12px; }
.week th { color: var(--soft); font-weight: 600; padding: 4px 2px; text-align: center; }
.week th.rowHead { text-align: left; max-width: 7em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); padding-right: 8px; }
.week td { text-align: center; padding: 4px 2px; }
.dot { display: inline-block; width: 18px; height: 18px; border-radius: 50%; background: rgba(255, 255, 255, 0.08); vertical-align: middle; }
.dot.on { background: var(--gold); }

/* ゲームのページ */
.back { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; font-weight: 700; }
.gameHead { margin-top: 4px; }
.big {
  display: block; width: 100%; min-height: 64px; border: 0; border-radius: 32px;
  background: linear-gradient(180deg, var(--gold), var(--gold-deep)); color: var(--on-gold);
  font-size: 20px; font-weight: 800; letter-spacing: 0.06em;
  box-shadow: 0 6px 24px rgba(232, 193, 112, 0.25);
}
.big:active { transform: translateY(1px); }
.doneText { margin: 0; text-align: center; font-size: 22px; font-weight: 800; color: var(--gold); }
.doneText::before { content: "✓ "; }
.link { display: block; margin: 8px auto 0; background: none; border: 0; color: var(--soft); text-decoration: underline; min-height: 44px; }
.sub { display: block; width: 100%; min-height: 48px; margin-top: 10px; border-radius: 24px; border: 1px solid var(--gold); background: transparent; color: var(--gold); font-weight: 700; }
.streaks { display: grid; grid-template-columns: 1fr 1fr; text-align: center; }
.num { margin: 0; font-size: 40px; font-weight: 800; line-height: 1.1; }
.num small { font-size: 15px; margin-left: 2px; color: var(--soft); font-weight: 600; }
.calendar { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.day { aspect-ratio: 1; border-radius: 8px; background: rgba(255, 255, 255, 0.05); display: grid; place-items: center; font-size: 12px; color: var(--soft); }
.day.on { background: var(--gold); color: var(--on-gold); font-weight: 700; }
.day.today { outline: 2px solid var(--gold); outline-offset: 1px; }

.form label { display: block; margin-top: 12px; font-size: 14px; font-weight: 700; }
.form input, .form select {
  display: block; width: 100%; margin-top: 6px; min-height: 48px; padding: 0 12px;
  border-radius: 12px; border: 1px solid var(--line); background: rgba(0, 0, 0, 0.25); color: var(--text); font: inherit; font-size: 16px;
}
.hint { margin: 6px 0 0; color: var(--soft); font-size: 13px; }
.form .big { margin-top: 20px; }
.order { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.order .sub { margin-top: 0; }
.danger { display: block; width: 100%; min-height: 48px; margin-top: 14px; border-radius: 24px; border: 1px solid var(--danger); background: transparent; color: var(--danger); font-weight: 700; }

.note { color: var(--soft); font-size: 13px; margin: 12px 0 0; }
.note.first { margin-top: 0; }
.codeBox { margin-top: 12px; padding: 14px; border: 1px solid var(--gold); border-radius: 12px; }
.code { display: block; width: 100%; margin: 0; padding: 4px 0; background: none; border: 0; cursor: pointer; text-align: center; font-size: 22px; font-weight: 800; letter-spacing: 0.08em; color: var(--gold); font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; overflow-wrap: anywhere; }
.codeBox .note { margin-top: 8px; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.useCode { margin-top: 14px; }
.cautions { margin-top: 14px; }
.cautions ul { margin: 6px 0 0; padding-left: 1.2em; color: var(--soft); font-size: 13px; }
.cautions li { margin-bottom: 4px; }
.useCode input {
  display: block; width: 100%; margin-top: 10px; min-height: 48px; padding: 0 12px; border-radius: 12px;
  border: 1px solid var(--line); background: rgba(0, 0, 0, 0.25); color: var(--text); font: inherit; font-size: 16px; letter-spacing: 0.06em; text-transform: uppercase;
}
ol { padding-left: 1.3em; margin: 6px 0 0; }
.about p { color: var(--soft); font-size: 14px; }
summary { cursor: pointer; min-height: 32px; }
.error { color: var(--danger); text-align: center; }

.foot { margin-top: 28px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--soft); font-size: 13px; text-align: center; overflow-wrap: anywhere; }
.foot p { margin: 0 0 6px; }
.footLinks { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 16px; }
.footLinks a { display: inline-block; padding: 6px 0; font-weight: 700; }
