/* The newsletter sign-up (public/subscribe.js). It takes the page's own text color and tints itself from it, so it sits
   quietly on paper, navy, or plum; data-theme only picks the button's color. */
.news { --news-accent: #d9483b; --news-ink: #fff; margin: 26px 0 0; padding: 18px 18px 16px; border-radius: 18px; text-align: left; color: inherit; font-family: inherit;
  background: color-mix(in srgb, currentColor 6%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, currentColor 14%, transparent); }
.news[data-theme="navy"] { --news-accent: #f4c64e; --news-ink: #1d1400; }
.news[data-theme="plum"] { --news-accent: #ffc94a; --news-ink: #2a1300; }
.news__title { margin: 0; font-size: 1.2rem; line-height: 1.2; font-weight: 700; }
.news__text { margin: 6px 0 14px; opacity: .78; font-size: .95rem; line-height: 1.45; }
.news__row { display: flex; gap: 8px; }
.news__input { flex: 1; min-width: 0; padding: 13px 14px; border: 0; border-radius: 12px; color: inherit; font: inherit; font-size: max(16px, 1rem);
  background: color-mix(in srgb, currentColor 8%, transparent); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, currentColor 20%, transparent); }
.news__input::placeholder { color: inherit; opacity: .45; }
.news__input:focus, .news__input:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--news-accent); }
.news__btn { flex: none; min-height: 48px; padding: 0 18px; border: 0; border-radius: 12px; background: var(--news-accent); color: var(--news-ink);
  font-family: inherit; font-size: 1rem; font-weight: 700; cursor: pointer; }
.news__btn:disabled { opacity: .6; cursor: default; }
.news__topics { display: grid; gap: 10px; margin: 14px 0 0; padding: 0; border: 0; min-width: 0; }
.news__legend { padding: 0; margin-bottom: 8px; font-size: .85rem; font-weight: 700; opacity: .7; }
.news__topic { display: flex; align-items: flex-start; gap: 10px; font-size: .95rem; line-height: 1.3; cursor: pointer; }
.news__topic input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--news-accent); }
.news__topic small { display: block; opacity: .7; font-size: .88rem; }
.news__more { margin-top: 10px; }
.news__more summary { cursor: pointer; font-size: .92rem; font-weight: 700; opacity: .85; }
.news__more[open] summary { margin-bottom: 8px; }
.news__note { min-height: 1.3em; margin: 10px 0 0; font-size: .92rem; }
.news__note.is-bad { color: var(--news-bad, #d9483b); }
.news[data-theme="navy"] .news__note.is-bad, .news[data-theme="plum"] .news__note.is-bad { color: #ff9a8a; }
.news__hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.news__done { margin: 0; font-weight: 700; line-height: 1.4; }
.news__small { margin: 6px 0 0; opacity: .75; font-size: .92rem; }
.news__link { margin-top: 8px; padding: 6px 0; border: 0; background: none; color: inherit; font: inherit; font-size: .92rem; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; opacity: .85; cursor: pointer; }
@media (max-width: 380px) { .news__row { flex-direction: column; } .news__btn { width: 100%; } }

/* Where the sign-up sits on a page: one button that opens the pop-up. */
.news-spot { margin: 22px 0 0; text-align: left; }
.news-open { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border: 0; border-radius: 14px; color: inherit; font: inherit; text-align: left; cursor: pointer;
  background: color-mix(in srgb, currentColor 6%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, currentColor 14%, transparent); }
.news-open b { display: block; font-size: 1rem; line-height: 1.25; }
.news-open small { display: block; opacity: .72; font-size: .88rem; line-height: 1.3; }
.news-open__icon { flex: none; width: 38px; height: 38px; border-radius: 50%; background: var(--news-accent, #d9483b) center / 20px no-repeat;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2.5'/%3E%3Cpath d='M4 7l8 6 8-6'/%3E%3C/svg%3E"); }
.news-spot { --news-accent: #d9483b; }
.news-spot[data-theme="navy"] { --news-accent: #f4c64e; }
.news-spot[data-theme="plum"] { --news-accent: #ffc94a; }
.news-spot[data-theme="navy"] .news-open__icon, .news-spot[data-theme="plum"] .news-open__icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231d1400' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2.5'/%3E%3Cpath d='M4 7l8 6 8-6'/%3E%3C/svg%3E"); }

/* The pop-up: the whole screen, in the page's colors, the form centered, and an × in the top corner. */
html.news-locked, html.news-locked body { overflow: hidden; }
.news-pop { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: max(64px, env(safe-area-inset-top) + 56px) 20px max(28px, env(safe-area-inset-bottom) + 20px);
  border: 0; overflow-y: auto; overscroll-behavior: contain; font-family: inherit; display: flex; }
.news-pop:not([open]) { display: none; }
.news-pop::backdrop { background: rgba(0, 0, 0, .4); }
.news-pop[open] { animation: news-in .26s cubic-bezier(.2, .8, .2, 1); }
@keyframes news-in { from { opacity: 0; transform: translateY(16px); } }
.news-pop__inner { width: 100%; max-width: 440px; margin: auto; padding: 0; background: none; box-shadow: none; }
.news-pop .news__title:focus { outline: none; }
.news-pop .news__title { font-size: clamp(1.7rem, 7vw, 2.2rem); line-height: 1.1; }
.news-pop .news__text { margin: 10px 0 22px; font-size: 1.05rem; }
.news-pop .news__topics { margin-top: 20px; gap: 14px; }
.news-pop__ok { width: 100%; margin-top: 22px; }
.news-pop__x { position: fixed; top: max(14px, env(safe-area-inset-top) + 8px); right: max(14px, env(safe-area-inset-right) + 8px); width: 44px; height: 44px; display: grid; place-items: center;
  border: 0; border-radius: 50%; color: inherit; cursor: pointer; background: color-mix(in srgb, currentColor 10%, transparent); }
.news-pop__x svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.news-pop__x:focus-visible { outline: 2px solid var(--news-accent, currentColor); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .news-pop[open] { animation: none; } }

/* Games accounts (account.js): the Account button's first letter once signed in, and the sign-in screen's bits. It
   reuses the newsletter pop-up's full-screen look above. */
[data-account] svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
[data-account].is-signed-in .acct-initial { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: currentColor; }
[data-account].is-signed-in .acct-initial::first-letter { color: inherit; }
.acct-initial { font: 700 15px/1 system-ui, sans-serif; }
[data-account].is-signed-in .acct-initial { color: inherit; background: none; box-shadow: inset 0 0 0 2px currentColor; }
.acct__form { display: grid; gap: 10px; }
.acct__form .news__btn { width: 100%; }
.acct__wide { width: 100%; margin-top: 18px; }
.acct__foot { margin: 16px 0 0; text-align: center; }
.acct__foot .news__link { margin: 0; }
.acct .news__small { margin-top: 14px; }
/* One more button in each game's top bar: the name never wraps, and on phones the buttons sit a touch closer. */
.top .brand, .bar .brand { white-space: nowrap; }
@media (max-width: 430px) {
  .top__tools, .bar__tools { gap: 0; }
  .top__tools .icon-btn, .bar__tools .icon-btn { width: 40px; }
}
@media (max-width: 340px) {
  .top__tools .icon-btn, .bar__tools .icon-btn { width: 34px; }
  .top .brand { font-size: 1.1rem; gap: 6px; }
  html.big .top .brand { font-size: 17.6px; }
}
.acct__label { margin: 22px 0 8px; font-size: 1rem; font-weight: 700; }
.acct .news__topics { margin-top: 4px; }
/* The invite on a game-show game's finished screen and leaderboard: a line and a button, in the page's own colors. */
.acct-invite { margin: 18px 0 0; padding: 14px 16px; border-radius: 14px; text-align: center; background: color-mix(in srgb, currentColor 6%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, currentColor 14%, transparent); }
.acct-invite[hidden] { display: none; }
.acct-invite p { margin: 0 0 10px; font-size: .95rem; line-height: 1.4; }
.acct-invite__btn { padding: 10px 18px; border: 0; border-radius: 999px; background: currentColor; font: inherit; font-weight: 700; cursor: pointer; }
.acct-invite__btn { background: #f4c64e; color: #1d1400; }
/* The code: six boxes over one real box that takes the typing, pasting, and the phone's own "from Mail" fill. */
.acct__boxes { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) 6px repeat(3, minmax(0, 1fr)); gap: 7px; cursor: text; }
.acct__boxes .acct__cell:nth-child(4) { grid-column: 5; }
.acct__cell { display: grid; place-items: center; aspect-ratio: 5 / 6; max-height: 68px; border-radius: 12px; font-size: 28px; font-weight: 700;
  font-variant-numeric: tabular-nums; background: color-mix(in srgb, currentColor 8%, transparent); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, currentColor 20%, transparent); }
.acct__cell.is-on { box-shadow: inset 0 0 0 2px var(--news-accent); }
.acct__cell.is-on:empty::after { content: ""; width: 2px; height: 1.1em; background: var(--news-accent); animation: acct-caret 1s steps(1) infinite; }
@keyframes acct-caret { 50% { opacity: 0; } }
.acct__code-input { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; opacity: 0; font-size: 16px; color: transparent; background: none; caret-color: transparent; }
.acct__boxes.is-bad { animation: acct-shake .32s; }
@keyframes acct-shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
@media (prefers-reduced-motion: reduce) { .acct__boxes.is-bad { animation: none; } .acct__cell.is-on:empty::after { animation: none; } }
/* The one-time "New!" card. */
.acct-new__tag { display: inline-block; margin: 0 0 12px; padding: 4px 11px; border-radius: 999px; background: var(--news-accent); color: var(--news-ink); font-size: .85rem; font-weight: 700; }
.acct-new .news-pop__inner { text-align: center; }
/* "Play without a name" under a game's name window. */
.name__skip { margin: 12px 0 0; text-align: center; }

/* ---------- Settings (public/settings.js) ---------- */
.set-cog.is-easy { position: relative; }
.set-cog.is-easy::after { content: ""; position: absolute; top: 9px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: #5bbf6a; box-shadow: 0 0 0 2px currentColor; }
.set-cog svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.set-list { display: grid; gap: 4px; margin: 18px 0 0; }
.set-item { padding: 6px 0 12px; border-bottom: 1px solid color-mix(in srgb, currentColor 14%, transparent); }
.set-row { display: flex; align-items: center; gap: 14px; cursor: pointer; }
.set-row.is-off { cursor: default; }
.set-row__text { flex: 1; min-width: 0; }
.set-row__text b { display: block; font-size: 1.1rem; line-height: 1.3; }
.set-row__text small { display: block; opacity: .75; font-size: .92rem; line-height: 1.35; margin-top: 2px; }
.set-row__note { margin: 8px 0 0; font-size: .9rem; font-weight: 700; color: var(--news-accent); }
.set-row__note[hidden] { display: none; }
.set-switch { position: relative; flex: none; width: 52px; height: 32px; }
.set-switch__input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: inherit; }
.set-switch__track { position: absolute; inset: 0; border-radius: 999px; background: color-mix(in srgb, currentColor 22%, transparent); transition: background-color .18s; pointer-events: none; }
.set-switch__track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .18s cubic-bezier(.2, .8, .2, 1); }
.set-switch__input:checked + .set-switch__track { background: #3aa856; }
.set-switch__input:checked + .set-switch__track::after { transform: translateX(20px); }
.set-switch__input:focus-visible + .set-switch__track { outline: 2px solid var(--news-accent); outline-offset: 2px; }
.set-row.is-off .set-switch { opacity: .55; }
.settings .acct__wide { margin-top: 24px; }

/* "Stuck? Try easy mode": a small bubble under the cog, its arrow pointing up at it. */
.nudge { --nb: #2b2620; position: fixed; z-index: 50; display: flex; align-items: center; gap: 10px; padding: 10px 8px 10px 14px; border-radius: 14px;
  background: var(--nb); color: #fffaf0; box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .55); font: 400 15px/1.3 "Atkinson", system-ui, sans-serif;
  animation: nudge-in 1s ease both; }
.nudge::before { content: ""; position: absolute; top: -8px; left: calc(var(--arrow, 50%) - 8px); width: 0; height: 0;
  border-left: 8px solid transparent; border-right: 8px solid transparent; border-bottom: 8px solid var(--nb); }
.nudge[data-theme="navy"], .nudge[data-theme="plum"] { --nb: #fff7ec; color: #1d1400; }
.nudge p { flex: 1; margin: 0; }
.nudge__on { flex: none; padding: 8px 12px; border: 0; border-radius: 999px; background: #f4c64e; color: #1d1400; font: inherit; font-weight: 700; cursor: pointer; }
.nudge__x { flex: none; display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; background: none; color: inherit; opacity: .75; cursor: pointer; }
.nudge__x svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.nudge.is-leaving { opacity: 0; transform: translateY(-4px); transition: opacity .35s, transform .35s; }
@keyframes nudge-in { from { opacity: 0; transform: translateY(-4px); } }

/* Accessibility mode: no animations or transitions anywhere, and the game's own rules make letters bigger and text
   stronger. */
html.a11y *, html.a11y *::before, html.a11y *::after { animation-duration: 1ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important;
  transition-duration: 1ms !important; transition-delay: 0ms !important; scroll-behavior: auto !important; }
/* The daily reminder's row (public/reminders.js): just the switch, then a note. */
.remind-sheet .set-row__note { font-weight: 600; }
