/* Website (light Jewel & Ink): Daily Crown, The Gauntlet, The Vault. */
body { background: var(--parchment); color: var(--ink); min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }

.site-header { background: var(--ink); color: var(--text); padding-top: env(safe-area-inset-top); }
.site-header-inner { max-width: 1160px; margin: 0 auto; padding: 12px 24px; display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-family: var(--display); font-weight: 800; font-size: 24px; letter-spacing: -.02em; }
.site-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.site-nav a { padding: 9px 14px; border-radius: 10px; color: var(--text-2); font-weight: 700; font-size: 15px; text-decoration: none; }
.site-nav a[aria-current="page"] { background: var(--gold); color: var(--ink); }
.header-actions { margin-left: auto; display: flex; gap: 10px; }
.pill-outline, .pill-light { padding: 10px 16px; border-radius: 999px; font-weight: 700; font-size: 14px; text-decoration: none; }
.pill-outline { border: 1.5px solid #3A4380; background: transparent; color: var(--text); }
.pill-light { background: var(--text); color: var(--ink); }

.wrap { max-width: 1160px; margin: 0 auto; padding: 32px 24px 64px; }
.play { display: flex; flex-wrap: wrap; gap: 40px; }
.play-main { flex: 999 1 540px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.play-side { flex: 1 1 290px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }

.title-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.title-row h1 { font-size: clamp(30px, 5vw, 40px); }
.badge { padding: 5px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.badge.easy { background: #DDF3E8; color: #146046; }
.badge.medium { background: #FCE3C2; color: #7A4A06; }
.badge.hard { background: #FAD4DA; color: #8A1F33; }
.badge.expert { background: #E6DCFB; color: #4B2A99; }
.badge.archive { background: #E4E6F1; color: var(--ink-3); }

.status-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; max-width: 620px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 6px 12px; border-radius: 12px; border: 0; font-weight: 700; font-size: 14px; background: #E4E6F1; color: var(--ink-3); }
.chip.done { background: #DDF3E8; color: #146046; }
.chip.now { background: var(--ink); color: var(--gold); }
.chip:disabled { opacity: .55; }
.timer { display: flex; align-items: center; gap: 8px; font-family: var(--display); font-weight: 800; font-size: 28px; font-variant-numeric: tabular-nums; }

.board-shell { position: relative; max-width: 620px; width: 100%; }
.board-shell .board { background: var(--ink); }
.cover { position: absolute; inset: 0; border-radius: 22px; display: grid; place-items: center; background: rgba(16,20,42,.55); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.cover-inner { display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--text); text-align: center; padding: 16px; }
.cover-inner p { margin: 0; color: var(--text-2); font-size: 14px; }

.tools { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; max-width: 620px; }
.tools .toggle { margin-left: auto; display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; }
.toggle input { width: 18px; height: 18px; accent-color: var(--ink); }

.card { background: var(--card); border-radius: 20px; padding: 22px; display: flex; flex-direction: column; gap: 12px; box-shadow: 0 1px 0 var(--rule); }
.card h2 { font-size: 20px; }
.card ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.card p { margin: 0; color: var(--ink-3); font-size: 14px; line-height: 1.5; }
.card-dark { background: var(--ink); color: var(--text); box-shadow: none; }
.card-dark p { color: var(--text-2); font-size: 15px; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); }
.streak-num { display: flex; align-items: baseline; gap: 8px; }
.streak-num b { font-family: var(--display); font-weight: 800; font-size: 48px; line-height: 1; }
.streak-num span { color: var(--ink-3); font-size: 15px; }
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.week div { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--ink-3); }
.week i { width: 100%; aspect-ratio: 1; border-radius: 8px; background: #E4E6F1; }
.week i.on { background: var(--gold); }
.week i.today { box-shadow: inset 0 0 0 2px var(--ink); }

/* Vault */
.vault-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.vault-head p { margin: 6px 0 0; color: var(--ink-3); font-size: 16px; }
.seg { display: flex; padding: 4px; background: #E4E6F1; border-radius: 12px; }
.seg button { padding: 9px 16px; border: 0; border-radius: 9px; background: transparent; color: var(--ink-3); font-weight: 700; font-size: 14px; min-height: 40px; }
.seg button[aria-selected="true"] { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(16,20,42,.12); }
.cal-head { display: flex; align-items: center; justify-content: space-between; }
.cal-head h2 { font-size: 24px; }
.icon-btn { width: 44px; height: 44px; border-radius: 12px; border: 1.5px solid #CDD1E6; background: var(--card); display: grid; place-items: center; }
.icon-btn:disabled { opacity: .35; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.cal .dow { text-align: center; font-size: 12px; font-weight: 700; letter-spacing: .08em; color: var(--ink-3); padding-bottom: 4px; }
.day { aspect-ratio: 1; border-radius: 14px; background: #E4E6F1; color: var(--ink); text-decoration: none; display: flex; flex-direction: column; justify-content: space-between; padding: 8px 10px; min-width: 0; }
.day b { font-size: 15px; }
.day small { font-size: 12px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.day.done { background: var(--gold); }
.day.started { background: #FCE3C2; }
.day.future { background: transparent; box-shadow: inset 0 0 0 1.5px #E1E4F0; color: #A6ABC8; pointer-events: none; }
.day.today { box-shadow: inset 0 0 0 2.5px var(--ink); }
.day.blank { background: transparent; pointer-events: none; }
.legend { display: flex; gap: 18px; flex-wrap: wrap; font-size: 13px; color: var(--ink-3); }
.legend span { display: flex; align-items: center; gap: 6px; }
.legend i { width: 14px; height: 14px; border-radius: 4px; }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.stats div { background: var(--parchment); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 2px; }
.stats b { font-family: var(--display); font-weight: 800; font-size: 28px; }
.stats span { font-size: 13px; color: var(--ink-3); }

/* Dialogs */
.sheet { border: 0; border-radius: 22px; background: var(--card); color: var(--ink); padding: 26px; width: min(440px, calc(100vw - 32px)); box-shadow: 0 30px 80px rgba(16,20,42,.35); }
.sheet::backdrop { background: rgba(16,20,42,.55); }
.sheet h2 { font-size: 28px; margin-bottom: 8px; }
.sheet p { line-height: 1.55; color: var(--ink-2); font-size: 15px; }
.sheet .rules { padding-left: 20px; display: flex; flex-direction: column; gap: 8px; line-height: 1.5; color: var(--ink-2); font-size: 15px; }
.sheet-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }
.win-crown { width: 64px; height: 64px; background: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cpath d='M9 17l7.5 7.5L24 12l7.5 12.5L39 17l-3.2 17H12.2z' fill='%23F5C04A' stroke='%2310142A' stroke-width='2.4' stroke-linejoin='round'/%3E%3Cpath d='M24 22.5l3.6 4.5-3.6 4.5-3.6-4.5z' fill='%23E5677A'/%3E%3C/svg%3E"); }
.win-times { display: flex; flex-wrap: wrap; gap: 8px; }

.site-footer { max-width: 1160px; width: 100%; margin: 0 auto; padding: 24px; display: flex; gap: 18px; color: var(--ink-3); font-size: 14px; }
.site-footer span { margin-right: auto; font-weight: 700; }

@media (max-width: 640px) {
  .site-header-inner { gap: 10px 16px; padding: 10px 16px; }
  .header-actions { margin-left: 0; width: 100%; justify-content: flex-end; order: 2; }
  .site-nav { order: 3; width: 100%; }
  .site-nav a { padding: 8px 10px; font-size: 14px; }
  .logo { font-size: 22px; }
  .wrap { padding: 20px 16px 48px; }
  .play { gap: 28px; }
  .day { padding: 6px; border-radius: 10px; }
  .day small { font-size: 10px; }
  .cal { gap: 5px; }
}
@media (max-width: 380px) { .header-actions .pill-outline { display: none; } }

/* Readable content below the game (for players, search engines and AI assistants) */
.about { background: var(--card); border-top: 1px solid var(--rule); }
.about-inner { max-width: 760px; margin: 0 auto; padding: 48px 24px 56px; color: var(--ink-2); font-size: 16px; line-height: 1.65; }
.about h2 { font-size: clamp(26px, 4vw, 32px); color: var(--ink); margin-bottom: 12px; }
.about h3 { font-size: 20px; color: var(--ink); margin: 32px 0 10px; }
.about h4 { font-family: var(--body); font-size: 16px; font-weight: 700; color: var(--ink); margin: 0 0 4px; }
.about p { margin: 0 0 12px; }
.about ol, .about ul { margin: 0 0 12px; padding-left: 22px; }
.about li { margin: 6px 0; }
.faq { display: grid; gap: 18px; }
.faq-item p { margin: 0; }
@media (max-width: 640px) { .about-inner { padding: 36px 16px 44px; } }
.about a { color: #2F3FA8; text-underline-offset: 3px; }
.site-footer { flex-wrap: wrap; }

/* Share-a-picture dialog */
#picDialog { text-align: center; }
.pic-sizes { display: flex; gap: 8px; justify-content: center; margin: 4px 0 12px; }
.pic-sizes .chip { cursor: pointer; }
.pic-preview { height: min(380px, 46vh); margin: 0 auto; border-radius: 16px; overflow: hidden; background: #10142A; color: #C9CEEA; display: grid; place-items: center; font-size: 14px; padding: 0; box-shadow: 0 10px 30px rgba(16,20,42,.25); }
.pic-preview img { width: 100%; height: 100%; display: block; }
#picDialog .sheet-actions { flex-wrap: wrap; justify-content: center; }
