/* Shared daily-games tokens. Light theme only, by design. */
:root {
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  --bg: #ffffff;
  --ink: #121212;
  --ink2: #5a5a5a;
  --line: #dcdcd8;
  --brand: #e9e9e6;
  --label: #8d8d8d;
  --display: "Clash Grotesk", -apple-system,Helvetica,Arial,sans-serif;
  --ui: "Outfit", -apple-system, Helvetica, Arial, sans-serif;
}
*, *::before, *::after { box-sizing: inherit; }
html { scroll-padding-top: env(safe-area-inset-top, 0px); }
@keyframes hub-in { from { opacity: 0; } }
@keyframes card-in { from { opacity: 0; transform: translateY(6px); } }
.grid.enter > * { animation: card-in .22s ease-out backwards; animation-delay: calc(var(--i, 0) * 18ms); }
body { animation: hub-in .35s ease; margin: 0; background: var(--bg); color: var(--ink); font-family: var(--ui); font-size: 15px; line-height: 1.45; }

.nav { border-bottom: 1px solid var(--line); padding: 11px 16px; position: sticky; top: 0; z-index: 20; background: var(--bg); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; }
.nav .nav-l { justify-self: start; display: flex; align-items: center; gap: 4px; }
.fbtn { all: unset; cursor: pointer; position: relative; display: grid; place-items: center; width: 32px; height: 32px; color: var(--ink); }
.fbtn[hidden] { display: none; }
.fbtn:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 6px; }
.fbtn .badge { position: absolute; top: 1px; right: 0; min-width: 16px; height: 16px; padding: 0 4px; box-sizing: border-box; border-radius: 999px; background: #d3362a; color: #fff; font: 700 10.5px/16px var(--ui); text-align: center; box-shadow: 0 0 0 2px var(--bg); }
.fbtn .badge[hidden] { display: none; }
.nav .nav-acct { justify-self: end; display: flex; align-items: center; gap: 10px; min-width: 0; }
.nav .acct-btn { max-width: 130px; overflow: hidden; text-overflow: ellipsis; }
.acct-ico { display: none; }
@media (max-width: 600px) { .nav .acct-btn:has(.acct-ico) { display: grid; place-items: center; width: 28px; height: 28px; } .acct-btn .acct-name { display: none; } .acct-btn .acct-ico { display: block; } }
.streakchip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px 3px 8px; border-radius: 999px; background: #fde4e1; color: #d3362a; font: 700 13px var(--ui); font-variant-numeric: tabular-nums; }
.streakchip[hidden] { display: none; }
.nav .today { font-weight: 600; font-size: 13px; line-height: 1.2; color: var(--ink2); white-space: nowrap; }
.nav h1 { margin: 0; line-height: 0; }
.nav .logo img { display: block; height: 32px; width: auto; }
/* Keep the title and date aligned with the card column; the bar's border and background stay full width. */
.nav { padding-inline: max(16px, calc(50% - 240px)); }
@media (min-width: 860px) { .nav { padding-inline: max(16px, calc(50% - 440px)); } }
.snd { all: unset; cursor: pointer; display: grid; place-items: center; width: 32px; height: 32px; margin-left: -2px; color: var(--ink); }
.snd[aria-pressed="true"] { color: var(--label); }
.snd:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 6px; }
.snd .off, .snd[aria-pressed="true"] .on { display: none; }
.snd[aria-pressed="true"] .off { display: inline; }
/* intro: the big date, a message, and the install-as-app link, over a hairline */
.intro { max-width: 480px; margin: 0 auto 20px; padding: 8px 0 22px; border-bottom: 1px solid var(--line); }
@media (min-width: 860px) { .intro { max-width: 880px; } }
.bigdate { margin: 0 0 14px; font-family: var(--display); font-weight: 600; font-size: clamp(40px, 11vw, 76px); line-height: 1; letter-spacing: -0.03em; color: #d2d2ce; }
.nextchip { display: inline-flex; align-items: center; margin: 0 0 14px; padding: 3px 12px; border-radius: 999px; background: transparent; border: 1.5px solid #bdbdb8; color: var(--ink); font: 600 13px var(--ui); font-variant-numeric: tabular-nums; }
.hubmsg-title { margin: 0 0 8px; font-family: var(--display); font-weight: 600; font-size: 28px; letter-spacing: -0.02em; line-height: 1.1; }
.hubmsg { margin: 0 0 14px; max-width: 70ch; color: var(--ink); font-size: 15px; line-height: 1.55; }
.applink { all: unset; cursor: pointer; font: 600 15px var(--ui); color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.tert2 { all: unset; cursor: pointer; font: 500 14px var(--ui); color: var(--ink2); text-decoration: underline; text-underline-offset: 3px; }
.tert2:hover { color: var(--ink); }
.tert2:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
.applink:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
.intro-actions { display: flex; align-items: center; gap: 18px; }
.hidelink { all: unset; cursor: pointer; margin-left: auto; font: 500 14px var(--ui); color: var(--label); text-decoration: underline; text-underline-offset: 3px; }
.hidelink[hidden] { display: none; }
.hidelink:hover { color: var(--ink2); }
.hidelink:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
html[data-hide-intro] .hubmsg-title, html[data-hide-intro] .hubmsg, html[data-hide-intro] .intro-actions { display: none; }
/* modals stay put in the viewport and the page behind them doesn't scroll (the scroll position is kept, so nothing jumps) */
html:has(dialog[open]) { overflow: hidden; scrollbar-gutter: stable; }
dialog { overscroll-behavior: contain; }
/* modals: the dim, blurred backdrop fades in and the card rises in with it */
dialog[open] { animation: dlg-in .28s cubic-bezier(.2, .8, .3, 1); }
dialog[open]::backdrop { animation: dlg-dim .28s ease; }
@keyframes dlg-in { from { opacity: 0; transform: translateY(14px) scale(.97); } }
@keyframes dlg-dim { from { opacity: 0; } }
/* install guide dialog */
#appGuide { position: fixed; width: min(380px, calc(100vw - 32px)); max-height: calc(100vh - 32px); margin: auto; padding: 26px 22px 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); color: var(--ink); overflow-x: hidden; overflow-y: auto; }
#appGuide::backdrop { background: rgba(18, 18, 18, .64); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
#appGuide h2 { margin: 0 32px 4px 0; font-family: var(--display); font-weight: 600; font-size: 28px; letter-spacing: -0.02em; line-height: 1.05; }
#appGuide .ag-sub { margin: 0 0 14px; color: var(--ink2); font-size: 14px; line-height: 1.45; }
#appGuide .pl-x { all: unset; cursor: pointer; position: absolute; top: 16px; right: 16px; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 999px; }
#appGuide .pl-x:hover { background: #f2f2f2; }
.ag-seg { display: flex; gap: 2px; padding: 3px; border-radius: 10px; background: rgba(18,18,18,.08); margin-bottom: 14px; }
.ag-seg button { all: unset; box-sizing: border-box; flex: 1; text-align: center; cursor: pointer; padding: 8px 10px; border-radius: 8px; font: 600 14px var(--ui); color: var(--ink2); }
.ag-seg button[aria-selected="true"] { background: #fff; color: var(--ink); box-shadow: 0 0 0 1px var(--line); }
.ag-seg button:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.ag-slides { overflow: hidden; touch-action: pan-y; }
.ag-track { display: flex; transition: transform .32s cubic-bezier(.2,.8,.3,1); }
.ag-slide { flex: 0 0 100%; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 0 4px; }
.ag-slide h3 { margin: 4px 0 0; font-size: 17px; font-weight: 700; line-height: 1.3; }
.ag-slide p { margin: 0; font-size: 14.5px; line-height: 1.45; color: var(--ink2); min-height: 63px; }
.ag-illus { width: 100%; height: 180px; display: flex; align-items: center; justify-content: center; }
.ag-illus svg { width: 220px; max-width: 100%; height: auto; overflow: visible; font-family: var(--ui); }
.ag-pager { display: flex; gap: 7px; justify-content: center; margin: 10px 0 14px; }
.ag-pager i { width: 7px; height: 7px; border-radius: 50%; background: #d4d4d0; transition: background .2s; }
.ag-pager i.on { background: var(--ink); }
.ag-nav { display: flex; gap: 10px; justify-content: center; }
.ag-btn { all: unset; box-sizing: border-box; cursor: pointer; min-width: 110px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 10px 18px; border-radius: 999px; border: 1.5px solid var(--ink); font: 600 14px var(--ui); color: var(--ink); background: var(--bg); }
.ag-btn.primary { background: var(--ink); color: #fff; }
.ag-btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
main { background: #f7f7f5; min-height: calc(100vh - 52px); padding: 24px 16px 48px; }
.lede { margin: 0 auto 20px; max-width: 480px; text-align: center; color: var(--ink2); }
.grid {
  display: grid; gap: 16px; margin: 0 auto; max-width: 480px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr));
}
@media (min-width: 860px) { .grid { max-width: 880px; } }

.toolbar { max-width: 480px; margin: 0 auto 16px; }
@media (min-width: 860px) { .toolbar { max-width: 880px; } }
.toolbar { display: flex; align-items: center; justify-content: flex-start; }
/* Filters: left-aligned on wide screens; on phones one swipeable row that runs to the screen edges */
.filters { display: flex; flex: 1; flex-wrap: wrap; justify-content: flex-start; gap: 6px; }
@media (max-width: 859px) {
  main { padding-top: 6px; }
  .toolbar { margin-bottom: 12px; }
  .filters { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px; width: calc(100% + 32px); }
  .filters::-webkit-scrollbar { display: none; }
  .filters .chip { flex: none; }
  .filters .lucky { order: -1; margin-left: 0; }
}
.chip {
  min-height: 26px; padding: 2px 12px; border-radius: 999px; background: var(--bg); color: var(--ink);
  border: 1.5px solid #bdbdb8; font: 600 13px var(--ui); cursor: pointer;
}
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
/* I'm Feeling Lucky: the screen dips to black, a white die tumbles in, and the icon it lands on is the first game */
#dice { position: fixed; inset: 0; z-index: 110; background: #000; opacity: 0; display: grid; place-items: center; overflow: hidden; transition: opacity .35s ease; }
#dice .drop { --s: clamp(96px, 26vmin, 150px); width: var(--s); height: var(--s); perspective: calc(var(--s) * 7); opacity: 0; }
#dice .hop, #dice .turn, #dice .cube { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; }
/* each face is a rounded white tile; a solid, slightly smaller grey cube sits wholly inside them (the corner rounding is subtle enough that its corners never poke out), so the notches where tiles meet show grey rather than see-through black */
#dice .face { position: absolute; inset: 0; display: grid; place-items: center; border-radius: 4%; backface-visibility: hidden; box-shadow: inset 0 0 0 2px rgba(0,0,0,.1); }
#dice .face.core { inset: 2.5%; border-radius: 0; box-shadow: none; background: #c4c4c4; }
#dice .face svg { width: 62%; height: 62%; display: block; }
.lucky { all: unset; box-sizing: border-box; flex: none; display: inline-flex; align-items: center; gap: 5px; min-height: 26px; margin-left: auto; padding: 2px 4px; font: 500 13px var(--ui); color: var(--ink2); cursor: pointer; white-space: nowrap; }
.lucky svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lucky:hover { color: var(--ink); }
.lucky:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 4px; }
/* playlist: the create/edit block, the card, and the editor */
.tert { all: unset; cursor: pointer; font: 600 14px var(--ui); color: var(--ink); text-decoration: underline; text-underline-offset: 3px; padding: 6px 0; }
.tert:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 4px; }
/* the playlist card once you have one: dark and primary, with a white Start button and a white Edit link */
.game.plcard { background: var(--ink); color: #fff; }
.game.plcard h2 { color: #fff; }
.game.plcard .tert { color: #fff; }
/* before there is a playlist: the same card in a very light grey, with a nudge to make one */
.game.plcard.plempty { background: #e9e9e5; color: var(--ink); padding: 14px 18px; gap: 4px; }
.game.plcard.plempty .copy { display: flex; flex-direction: column; gap: 3px; }
.game.plcard.plempty .copy b { font-size: 15px; font-weight: 700; }
.game.plcard.plempty .copy span { font-size: 13px; line-height: 1.4; opacity: .7; max-width: 52ch; }
.game.plcard.plempty .tert { align-self: flex-start; color: var(--ink); padding: 4px 0; }
/* the social-games callout: no box, just the two icons and the copy with a rule under it */
.game.soccard { position: relative; grid-column: 1 / -1; background: none; box-shadow: none; border: 0; border-bottom: 1px solid var(--line, #dcdcd8); border-radius: 0; min-height: 0; color: var(--ink); padding: 2px 44px 16px 2px; gap: 6px; }
.game.soccard .socicons { display: flex; gap: 6px; }
.game.soccard .socicons span { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; }
.game.soccard .socicons svg { width: 30px; height: 30px; display: block; }
.game.soccard .copy { display: flex; flex-direction: column; gap: 3px; }
.game.soccard .copy b { font-size: 15px; font-weight: 700; }
.game.soccard .copy span { font-size: 13px; line-height: 1.4; opacity: .7; max-width: 52ch; }
.game.soccard .tert { align-self: flex-start; color: var(--ink); padding: 4px 0; }
.game.soccard .socx { all: unset; cursor: pointer; position: absolute; top: -4px; right: 0; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 999px; opacity: .55; }
.game.soccard .socx:hover { opacity: 1; background: rgba(18,18,18,.06); }
.game.soccard .socx:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; opacity: 1; }
/* wide layout: the playlist card spans the whole row (like the toolbar above it) instead of sitting in one stretched grid column */
@media (min-width: 860px) {
  .game.plcard { grid-column: 1 / -1; flex-direction: row; align-items: center; gap: 28px; padding: 18px 24px; }
  .game.soccard { flex-direction: row; align-items: center; gap: 20px; padding: 2px 52px 18px 2px; }
  .game.soccard .socx { top: 50%; margin-top: -24px; }
  .game.soccard .copy { flex: 1; }
  .game.soccard .tert { align-self: center; }
  .game.plcard:not(.plempty) { display: flex; gap: 12px; }
  .game.plcard:not(.plempty) h2 { font-size: 32px; }
  .game.plcard:not(.plempty) .plicons { margin-right: 16px; }
  .game.plcard:not(.plempty) .plact { margin-right: 0; order: 3; }
  .game.plcard:not(.plempty) .pill { order: 4; }
  .game.plcard .top { flex: 1; }
  .game.plcard.plempty { flex-direction: row; align-items: center; justify-content: space-between; padding: 14px 20px; }
  .game.plcard.plempty .tert { align-self: center; flex: none; }
  .game.plcard .plicons { flex: 1; }
}
.game.plcard .pill { background: #fff; color: var(--ink); }
.game.plcard .pill[data-completed="true"] { background: transparent; color: #fff; border: 1.5px solid #fff; }
.plicons { display: flex; flex-wrap: nowrap; overflow: hidden; min-width: 0; padding: 3px 0 3px 8px; }
.plic { position: relative; width: 44px; height: 44px; margin-left: -8px; border-radius: 12px; background: #fff; color: var(--ink); display: grid; place-items: center; box-shadow: 0 0 0 2.5px var(--ink); }
.plic svg { width: 36px; height: 36px; display: block; }
.plic.plmore { font: 700 13px var(--ui); letter-spacing: -0.01em; }
.plic.hide { display: none; }
.plibtn { all: unset; cursor: pointer; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 999px; color: #fff; opacity: .5; }
.plibtn:hover { background: rgba(255, 255, 255, .14); opacity: .85; }
.plibtn:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
.plibtn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
/* phone: title and the share/edit icons on one line, game icons and the Start button on the next */
.game.plcard:not(.plempty) .plact { display: flex; gap: 2px; }
.game.plcard:not(.plempty) .pill { padding: 10px 16px; }
@media (max-width: 859px) {
  .game.plcard:not(.plempty) { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px 8px; }
  .game.plcard:not(.plempty) h2 { font-size: 24px; }
  .game.plcard:not(.plempty) .plact { margin-right: -8px; justify-self: end; }
  .game.plcard:not(.plempty) .plic { width: 38px; height: 38px; margin-left: -7px; }
  .game.plcard:not(.plempty) .plic svg { width: 31px; height: 31px; }
  .game.plcard:not(.plempty) .plicons { padding-left: 7px; }
}
@media (max-width: 380px) {
  .game.plcard:not(.plempty) .plic { width: 32px; height: 32px; margin-left: -6px; border-radius: 10px; }
  .game.plcard:not(.plempty) .plic svg { width: 26px; height: 26px; }
  .game.plcard:not(.plempty) .plicons { padding-left: 6px; }
  .game.plcard:not(.plempty) h2 { font-size: 20px; }
  .game.plcard:not(.plempty) .plic.plmore { font-size: 11px; }
}
[data-signed-in] .about { display: none; }
.about { max-width: 880px; margin: 40px auto 0; padding-top: 18px; border-top: 1px solid var(--line); font: 500 14px/1.5 var(--ui); color: var(--ink2); }
.about h2 { margin: 0 0 6px; font: 600 16px var(--ui); color: var(--ink); }
.about h3 { margin: 14px 0 2px; font: 600 14px var(--ui); color: var(--ink); }
.about p { margin: 0 0 8px; }
.about ul { margin: 0 0 8px; padding-left: 18px; columns: 2 260px; }
.about a { color: inherit; text-underline-offset: 3px; }
/* the long reference content folds into accordions so it does not fill the page */
.about .acc { border-top: 1px solid var(--line); }
.about .acc:last-of-type { border-bottom: 1px solid var(--line); }
.about .acc summary { list-style: none; cursor: pointer; padding: 11px 0; font: 600 14px var(--ui); color: var(--ink); display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.about .acc summary::-webkit-details-marker { display: none; }
.about .acc summary::after { content: ""; flex: none; width: 7px; height: 7px; border-right: 2px solid var(--ink2); border-bottom: 2px solid var(--ink2); transform: rotate(45deg) translateY(-2px); transition: transform .15s; }
.about .acc[open] summary::after { transform: rotate(-135deg) translate(-2px, 0); }
.about .acc summary:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.about .acc ul, .about .acc p { margin: 0 0 12px; }
.about > p { margin-bottom: 14px; }
.sitefoot { max-width: 880px; margin: 40px auto 0; padding-top: 18px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 6px 16px; font: 500 13px var(--ui); color: var(--label); }
.sitefoot > span { margin-right: auto; }
.sitefoot a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.sitefoot a:hover { color: var(--ink2); }
.sitefoot .social { display: flex; gap: 14px; align-items: center; }
.sitefoot .social a { display: inline-flex; color: inherit; text-decoration: none; }
.sitefoot .social a:hover { color: var(--ink2); }
.sitefoot .social svg { display: block; }
#plDlg { position: fixed; width: min(440px, calc(100vw - 32px)); max-height: calc(100vh - 48px); margin: auto; padding: 26px 22px 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); color: var(--ink); overflow: hidden; }
/* title and hint stay put at the top, the Save row at the bottom; only the game list scrolls */
#plDlg[open] { display: flex; flex-direction: column; }
#plDlg h2, #plDlg .hint, #plDlg .acts { flex: none; }
#plDlg::backdrop { background: rgba(18, 18, 18, .64); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
#plDlg h2 { margin: 0 32px 6px 0; font-family: var(--display); font-weight: 600; font-size: 30px; letter-spacing: -0.02em;  line-height: 1.05; }
#plDlg .hint { margin: 0 0 12px; color: var(--ink2); font-size: 14.5px; line-height: 1.45; }
#plDlg ul { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-direction: column; gap: 8px; flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
#plDlg .plrow { all: unset; box-sizing: border-box; width: 100%; display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px 12px; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; font-weight: 600; }
#plDlg .plrow[aria-pressed="true"] { border-color: var(--ink); background: #f6f6f1; }
#plDlg .plrow:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
#plDlg .plrow .mini { flex: none; width: 36px; height: 36px; }
#plDlg .plrow .mini svg { width: 100%; height: 100%; display: block; }
#plDlg .plrow .nm { flex: 1; }
#plDlg .plrow .num { flex: none; width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--line); display: grid; place-items: center; font-size: 13px; font-variant-numeric: tabular-nums; color: transparent; }
#plDlg .plrow[aria-pressed="true"] .num { background: var(--ink); border-color: var(--ink); color: #fff; }
#plDlg .acts { display: flex; align-items: center; gap: 14px; }
#plDlg .acts .pill { border: 0; cursor: pointer; flex: 1; }
#plDlg .acts .pill:disabled { opacity: .4; cursor: default; }
#plDlg .acts .link { all: unset; cursor: pointer; font: 600 14px var(--ui); text-decoration: underline; text-underline-offset: 3px; }
#plDlg .pl-x { all: unset; cursor: pointer; position: absolute; top: 16px; right: 16px; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 999px; }
#plDlg .pl-x:hover { background: #f2f2f2; }
.beta { max-width: 480px; margin: 40px auto 0; }
@media (min-width: 860px) { .beta { max-width: 880px; } }
.beta[hidden] { display: none; }
.beta h2 { margin: 0; font-family: var(--display); font-weight: 600; font-size: 24px; letter-spacing: -0.01em;  }
.beta p { margin: 4px 0 16px; color: var(--ink2); }
.empty { text-align: center; color: var(--ink2); padding: 32px 0; }
button:focus-visible, input:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
:root { --pd-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.5' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.game { position: relative; isolation: isolate; background: var(--tint, var(--brand)); border-radius: 14px; padding: 20px; display: flex; flex-direction: column; gap: 18px; }
/* grain and a soft diagonal light on the colored cards: a touch lighter top left, a touch darker bottom right */
.game::before { content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: -1; pointer-events: none; background-image: var(--pd-grain), linear-gradient(135deg,rgba(255,255,255,.2) 0%,rgba(255,255,255,0) 50%,rgba(0,0,0,.09) 100%); background-size: 200px 200px, auto; }
.game.plcard::before, .game.soccard::before { display: none; }
/* where the browser can do relative colors, the light is a shift of the card's own color instead: a bit lighter and less saturated at the top left, a bit darker and more saturated at the bottom right */
@supports (color: oklch(from red l c h)) {
  .game::before { background-image: var(--pd-grain), linear-gradient(135deg, oklch(from var(--tint, var(--brand)) calc(l + .05) calc(c * .7) h) 0%, var(--tint, var(--brand)) 50%, oklch(from var(--tint, var(--brand)) calc(l - .055) calc(c * 1.5) h) 100%); }
}
.top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 16px; row-gap: 2px; }
.game .tag { display: inline-block; margin-right: 8px; padding: 2px 8px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; vertical-align: 1px; }
/* card streak chip: a saturated take on the card's own color (lightness capped so light accents stay legible),
   blended in with multiply so the gradient shows through */
.gstreak { position: relative; display: inline-flex; align-items: center; gap: 3px; vertical-align: middle; margin-left: 8px; padding: 1px 9px 1px 6px; border-radius: 999px; color: color-mix(in srgb, var(--accent, #5a5a5a) 58%, #121212); font: 700 12px var(--ui); font-variant-numeric: tabular-nums; }
@supports (color: oklch(from red l c h)) { .gstreak { color: oklch(from var(--accent, #5a5a5a) min(l, .56) max(c * 1.25, .17) h); } }
.gstreak::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--tint, #ddd); opacity: .8; mix-blend-mode: multiply; }
.gstreak > * { position: relative; }

html[data-no-streaks] .gstreak { display: none; }
.game .eyebrow { margin: 0 0 4px; font-size: 13px; font-weight: 600; color: var(--ink2); font-variant-numeric: tabular-nums; }
.game h2 {
  margin: 0; font-family: var(--display); font-weight: 600; font-size: 32px; line-height: 1.05;
  letter-spacing: -0.01em; 
}
.game .desc { flex: 0 0 100%; margin: 0; color: var(--ink); opacity: .78; }
/* the icon is taller than the name block, which left a gap above the subtitle: let it hang a little into the row gap */
.game .top { row-gap: 2px; }
.game .top .tile { margin-bottom: -8px; }
.tile { flex: none; width: 64px; height: 64px; }
.tile svg { width: 100%; height: 100%; display: block; }

.play-row { display: flex; align-items: center; justify-content: flex-start; gap: 12px; }
.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 110px; min-height: 44px;
  padding: 10px 18px; border-radius: 999px; background: var(--ink); color: var(--bg);
  font: 600 14px var(--ui); text-decoration: none;
}
.play-row .trophy { all: unset; cursor: pointer; display: inline-flex; align-items: center; min-height: 44px; padding: 0 6px; font: 600 13px var(--ui); color: var(--ink); opacity: .35; text-decoration: underline; text-underline-offset: 3px; border-radius: 6px; }
.play-row .trophy:hover { opacity: .7; }
.play-row .trophy:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; opacity: .7; }
.game.plcard .play-row { justify-content: flex-end; }
#lbLock { width: min(340px, calc(100vw - 32px)); margin: auto; padding: 24px 22px 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); color: var(--ink); }
#lbLock::backdrop { background: rgba(18, 18, 18, .64); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
#lbLock h2 { margin: 0 0 6px; font-family: var(--display); font-weight: 600; font-size: 26px; letter-spacing: -0.02em; line-height: 1.1; }
#lbLock p { margin: 0 0 16px; color: var(--ink2); font-size: 15px; line-height: 1.45; }
#lbLock .acts { display: flex; flex-direction: column; gap: 8px; }
#lbLock .pill { border: 0; cursor: pointer; width: 100%; }
#lbLock .acts { align-items: center; }
.pill .done { display: none; }
.pill[data-completed="true"] { background: #fff; color: var(--ink); }
.pill[data-completed="true"] .go { display: none; }
.pill[data-completed="true"] .done { display: inline-flex; align-items: center; gap: 6px; }
.pill .done svg { width: 16px; height: 16px; display: block; }

.rule { display: flex; align-items: center; gap: 10px; color: var(--ink2); font-size: 11px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; }
.rule::before, .rule::after { content: ""; flex: 1; height: 1px; background: rgba(18,18,18,.22); }

.week { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; list-style: none; margin: -6px 0 0; padding: 0; }
.week a {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: 56px; border-radius: 8px; background: #fff; color: var(--ink); text-decoration: none; border: 1.5px solid transparent;
}
.week .off { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 56px; border-radius: 8px; border: 1.5px dashed rgba(18,18,18,.22); opacity: .6; }
.week .dow { font-size: 10.5px; font-weight: 500; color: var(--ink2); }
.week .num { font-weight: 700; font-size: 16px; line-height: 1; font-variant-numeric: tabular-nums; }
.week a[aria-current="date"] { background: var(--ink); }
.week a[aria-current="date"] .dow, .week a[aria-current="date"] .num { color: #fff; }
/* Completed days drop to an outline (lower contrast) and get a small check in the corner. */
.week a[data-completed="true"]:not([aria-current]) { background: transparent; border-color: var(--ink); }
.week .check {
  position: absolute; top: -5px; right: -5px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--ink); color: #fff; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--tint, var(--brand));
}
.week .check svg { width: 9px; height: 9px; display: block; }

a:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
@media (hover: hover) { .week a:not([aria-current]):hover { border-color: var(--ink); } .pill:hover { opacity: .88; } }
@media (max-width: 380px) { .game { padding: 16px; } .game h2 { font-size: 28px; } .week { gap: 4px; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
.acct-btn { all: unset; cursor: pointer; font: 600 14px var(--ui); color: var(--ink); white-space: nowrap; }
.acct-btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 6px; }
#acct {
  position: fixed; width: min(400px, calc(100vw - 32px)); margin: auto; padding: 28px 24px 24px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--bg); color: var(--ink);
  max-height: calc(100vh - 32px); overflow-y: auto;
}
#acct::backdrop { background: rgba(18, 18, 18, .64); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
#acct .view { display: flex; flex-direction: column; align-items: stretch; gap: 12px; }
#acct .view[hidden], #acct [hidden] { display: none !important; }
#acct h2 {
  margin: 0 32px 0 0; font-family: var(--display); font-weight: 600; font-size: 32px;
  letter-spacing: -0.02em;  line-height: 1.05;
}
#acct .hint { margin: 0; color: var(--ink2); font-size: 15px; line-height: 1.45; }
#acct .field { display: flex; flex-direction: column; gap: 6px; }
#acct .inwrap { position: relative; }
#acct .inwrap input { padding-right: 64px; }
#acct .inwrap input:disabled { background: #f3f3ef; border-color: var(--line); color: var(--ink2); }
#acct .inedit { all: unset; cursor: pointer; position: absolute; top: 50%; right: 10px; transform: translateY(-50%); padding: 6px 8px; font: 600 14px var(--ui); color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
#acct .inedit:focus-visible { outline: 2px solid var(--ink); border-radius: 6px; }
#acct label { font: 600 13px var(--ui); }
#acct input[type="email"], #acct input[type="text"] {
  width: 100%; box-sizing: border-box; min-height: 48px; border: 1.5px solid var(--ink); border-radius: 10px;
  padding: 12px 14px; font: 500 16px var(--ui); color: var(--ink); background: var(--bg);
}
#acct input[type="email"]:focus-visible, #acct input[type="text"]:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
#acct .pill { width: 100%; margin-top: 4px; border: 0; cursor: pointer; }
#acct .msg { margin: 0; color: var(--ink); font-size: 14px; font-weight: 600; }
#acct .who { margin: 0; font-weight: 600; font-size: 16px; overflow-wrap: anywhere; }
#acct .acct-x {
  all: unset; cursor: pointer; position: absolute; top: 16px; right: 16px; width: 32px; height: 32px;
  display: grid; place-items: center; border-radius: 999px; color: var(--ink);
}
#acct .acct-x:hover { background: #f2f2f2; }
#acct .acct-x:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
#acct button:disabled { opacity: .55; cursor: default; }
#acct .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
#acct .idcard { display: flex; align-items: center; gap: 12px; padding: 2px 0 4px; }
#acct .idcard .av { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font: 600 19px var(--display); color: var(--ink); }
#acct .idtext { min-width: 0; }
#acct .idtext p { margin: 0; overflow-wrap: anywhere; }
#acct .who { font-weight: 600; font-size: 16px; }
#acct .mail { color: var(--ink2); font-size: 13.5px; }
#acct .sect { display: flex; flex-direction: column; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); }
#acct .sect h3 { margin: 0; font: 600 12px var(--ui); letter-spacing: .06em; text-transform: uppercase; color: var(--ink2); }
#acct .sect .hint { font-size: 14px; }
#acct .toggle { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
#acct .toggle .tt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
#acct .toggle b { font-weight: 600; font-size: 15px; }
#acct .toggle span { color: var(--ink2); font-size: 13px; line-height: 1.4; }
#acct .sw { all: unset; cursor: pointer; flex: none; position: relative; width: 44px; height: 26px; margin-top: 1px; border-radius: 999px; background: #cfcfca; transition: background .15s ease; }
#acct .sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s ease; }
#acct .sw[aria-checked="true"] { background: var(--ink); }
#acct .sw[aria-checked="true"]::after { transform: translateX(18px); }
#acct .sw:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
#acct .sw:disabled { opacity: .5; cursor: default; }
#acct .links { flex-direction: row; gap: 20px; }
#acct .links .reset { margin-top: 0; }
#acct .danger { padding-top: 6px; border-top: 0; }
#acct .danger .reset { margin-top: 0; padding: 4px 0; color: #a3261f; font-weight: 500; font-size: 13.5px; }
#acct a.reset { display: inline-block; }
#acct .reset {
  align-self: flex-start; margin-top: 4px; background: none; border: 0; padding: 8px 0;
  font: 600 14px var(--ui); color: var(--ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
/* sign-in steps: the quiet link sits centered under the primary button */
#acctForm .reset, #acctSent .reset, #acctSource .reset { align-self: center; }
/* new accounts: two quick set-up steps after the code (username, then how they found us) */
#acct .step { margin: 0 32px -8px 0; font: 700 12px/1 var(--ui); letter-spacing: .1em; text-transform: uppercase; color: var(--ink2); }
#acct .opts { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
#acct .opt { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 10px 14px; border: 1.5px solid var(--line); border-radius: 10px; font: 500 15px var(--ui); cursor: pointer; }
#acct .opt:hover { border-color: var(--ink2); }
#acct .opt input { appearance: none; flex: none; width: 18px; height: 18px; margin: 0; border: 2px solid var(--ink2); border-radius: 50%; display: grid; place-items: center; }
#acct .opt input::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ink); transform: scale(0); transition: transform .12s; }
#acct .opt input:checked { border-color: var(--ink); }
#acct .opt input:checked::after { transform: scale(1); }
#acct .opt:has(input:checked) { border-color: var(--ink); background: #f7f7f4; }
#acct .opt:has(input:focus-visible) { outline: 2px solid var(--ink); outline-offset: 2px; }
