/* Daily games base v1. Keep this file identical in all four repositories.
   Loaded last; only the shared page shell belongs here, never puzzle geometry. */
:root {
  --paper: #f6f5ef;
  --ink: #203c33;
  --green: #163e33;
  --muted: #677265;
  --line: #dedfd5;
  --yellow: #e8cf83;
  --serif: 'Libre Caslon Display', Georgia, serif;
  --sans: 'DM Sans', system-ui, sans-serif;
}
html:has(.daily-shell) { background: var(--paper); }
.daily-shell {
  margin: 0;
  padding-top: env(safe-area-inset-top, 0px);
  background: var(--paper);
  color: var(--ink);
  font: 14px/1.6 var(--sans);
}
.daily-shell .topbar {
  box-sizing: border-box;
  height: 90px;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 56px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.daily-shell .topbar .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font: 700 27px/1 var(--sans);
  letter-spacing: -1px;
}
.daily-shell .brandmark { font-size: 32px; font-weight: 400; }
.daily-shell .topbar .brand > svg { width: 30px; height: 30px; }
.daily-shell .topbar :is(nav, .header-actions) { display: flex; align-items: center; gap: 12px; }
.daily-shell .daily-label { font-size: 11px; letter-spacing: 1.7px; color: var(--muted); margin-right: 14px; }
.daily-shell :is(.iconbtn, .icon-button) {
  box-sizing: border-box;
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  font: 17px/1 var(--sans);
}
.daily-shell .icon-button svg { width: 18px; height: 18px; }
.daily-shell main { box-sizing: border-box; width: 100%; max-width: 1120px; margin: 0 auto; padding: 42px 0 0; }
.daily-shell :is(.family, .game-links) {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 27px;
}
.daily-shell :is(.family, .game-links) > span {
  margin-right: 8px;
  font: 600 11px/1.6 var(--sans);
  letter-spacing: 1.4px;
  color: var(--muted);
}
.daily-shell :is(.family, .game-links) a {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid #d5dacb;
  border-radius: 24px;
  background: #efefe5;
  color: #526b4e;
  font: 600 12px/1.4 var(--sans);
  text-decoration: none;
}
.daily-shell :is(.family, .game-links) a[aria-current="page"] { background: var(--green); border-color: var(--green); color: var(--paper); }
.daily-shell :is(.family, .game-links) a:hover { border-color: #7e987a; }
.daily-shell .family-mark { width: 16px; height: 16px; flex-shrink: 0; fill: currentColor; stroke: none; }
.daily-shell .intro { display: flex; position: static; align-items: center; justify-content: space-between; gap: 24px; padding: 0; margin-bottom: 32px; }
.daily-shell .eyebrow { display: flex; align-items: center; gap: 8px; font: 600 11px/1.6 var(--sans); letter-spacing: 1.5px; text-transform: uppercase; }
.daily-shell .intro h1 { font: 400 54px/1.1 var(--serif); letter-spacing: -1.1px; margin: 12px 0 10px; text-wrap: balance; }
.daily-shell .intro p { max-width: 65ch; margin: 0; color: var(--muted); font: 14px/1.7 var(--sans); }
.daily-shell .edition { display: flex; position: static; flex-direction: column; align-items: flex-end; gap: 7px; padding: 0; writing-mode: horizontal-tb; color: var(--muted); font: 11px/1.6 var(--sans); }
.daily-shell .edition > span:first-child { letter-spacing: 1px; }
.daily-shell .edition strong { color: var(--ink); font: 400 23px/1.2 var(--serif); }
.daily-shell .layout { display: grid; grid-template-columns: minmax(0, 1fr) 265px; gap: 26px; align-items: start; }
.daily-shell .layout > * { min-width: 0; }
.daily-shell .layout > aside { display: flex; flex-direction: column; gap: 20px; margin: 0; }
.daily-shell .side-content { display: grid; grid-template-columns: 1fr; gap: 20px; }
.daily-shell .game { min-width: 0; border: 0; border-radius: 13px; background: var(--green); box-shadow: 0 10px 35px #173b3210; }
.daily-shell :is(.gamebar, .game-heading) { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 21px 26px 18px; background: var(--green); color: #f4f2e6; }
.daily-shell :is(.game-title, .game-heading > div) { display: flex; align-items: center; gap: 10px; }
.daily-shell :is(.game-title, .game-heading) strong { font: 500 12px/1.6 var(--sans); }
.daily-shell :is(.weekcard, .howto, .build-sheet) { margin: 0; padding: 26px 23px; border: 1px solid var(--line); border-radius: 10px; background: #efefe5; }
.daily-shell :is(.weekcard, .howto, .build-sheet) h2 { margin: 14px 0; font: 400 31px/1.1 var(--serif); letter-spacing: -.5px; }
.daily-shell :is(.weekcard, .howto, .build-sheet, .daily-note) p { color: #596c50; font-size: 12px; line-height: 1.85; }
.daily-shell :is(.howcard, .daily-note) { padding: 2px 12px; margin: 0; border: 0; }
.daily-shell :is(.howcard, .daily-note) h3 { margin: 6px 0 14px; font: 400 24px/1.2 var(--serif); }
.daily-shell :is(.nextcard, .next) { display: flex; align-items: center; gap: 11px; margin: 0; padding: 20px 16px; border: 0; border-radius: 7px; background: #eceee4; color: #596c50; font-size: 11px; }
.daily-shell :is(.nextcard, .next) strong { display: block; margin-top: 6px; font: 500 18px/1.4 var(--sans); font-variant-numeric: tabular-nums; letter-spacing: 2px; color: #3e583d; }
.daily-shell .next { justify-content: space-between; }
.daily-shell :is(.below, .family-footer) { display: flex; flex-wrap: wrap; align-items: center; gap: 15px; margin: 10px 0 0; padding: 26px 0; border: 0; }
.daily-shell :is(.below, .family-footer) > div { flex: 1; }
.daily-shell :is(.below, .family-footer) h3 { margin: 0 0 6px; font: 600 12px/1.6 var(--sans); }
.daily-shell :is(.below, .family-footer) p { margin: 0; color: var(--muted); font: 11px/1.7 var(--sans); }
.daily-shell :is(.below, .family-footer) > a { display: inline-flex; align-items: center; min-height: 40px; padding: 10px 15px; border: 1px solid var(--line); border-radius: 6px; font-size: 11px; }
.daily-shell footer { display: flex; align-items: center; flex-wrap: wrap; gap: 15px; padding: 26px 0 32px; color: var(--muted); font: 11px/1.6 var(--sans); }
.daily-shell footer > span { flex: 1; }
.daily-shell :is(button, a):focus-visible { outline: 3px solid #ba8331; outline-offset: 4px; }
@media (max-width: 1200px) {
  .daily-shell main { padding: 32px 34px 0; }
  .daily-shell .topbar { padding: 0 34px; }
  .daily-shell .layout { grid-template-columns: minmax(0, 1fr) 240px; gap: 22px; }
}
@media (max-width: 900px) {
  .daily-shell .layout { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .daily-shell .layout > aside { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; margin: 0; }
  .daily-shell .layout > aside > :is(.side-content, .next) { grid-column: 1 / -1; }
  .daily-shell .side-content { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
  .daily-shell .side-content .nextcard { grid-column: 1 / -1; }
  .daily-shell .layout > aside > .ad-side { grid-column: 1 / -1; order: 0; }
  .daily-shell .intro h1 { font-size: 46px; }
  .daily-shell .daily-label { display: none; }
}
@media (max-width: 540px) {
  .daily-shell .topbar { height: 60px; padding: 0 20px; }
  .daily-shell .topbar .brand { font-size: 24px; }
  .daily-shell .topbar .brand > svg { width: 27px; height: 27px; }
  .daily-shell .topbar :is(nav, .header-actions) { gap: 9px; }
  .daily-shell main { padding: 27px 15px 0; }
  .daily-shell :is(.family, .game-links) { gap: 7px; margin-bottom: 24px; }
  .daily-shell :is(.family, .game-links) > span { display: none; }
  .daily-shell :is(.family, .game-links) a { padding: 7px 12px; font-size: 11px; }
  .daily-shell .intro { display: block; margin-bottom: 25px; }
  .daily-shell .intro h1 { font-size: 37px; letter-spacing: -.7px; }
  .daily-shell .intro p { max-width: 65ch; font-size: 12px; }
  .daily-shell .edition { flex-direction: row; align-items: baseline; justify-content: flex-start; gap: 8px; min-width: 0; margin: 14px 0 0; }
  .daily-shell .edition strong { font-size: 16px; }
  .daily-shell .edition > span:last-child { display: none; }
  .daily-shell :is(.gamebar, .game-heading) { padding: 16px 15px; }
  .daily-shell :is(.game-title, .game-heading > div) { gap: 7px; }
  .daily-shell :is(.game-title, .game-heading) strong { font-size: 11px; }
  .daily-shell .layout > aside, .daily-shell .side-content { display: flex; flex-direction: column; gap: 20px; }
  .daily-shell :is(.weekcard, .howto, .build-sheet) { padding: 22px; }
  .daily-shell :is(.below, .family-footer) > div { flex-basis: 100%; }
  .daily-shell footer > span { order: 3; flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .daily-shell :is(.family, .game-links) a { transition: none; }
}
