/* Bret shell foundations; responsive rules below adjust layout, not tokens. */
/* Landing and app share these existing WOFF2 URLs after complete SFNT/glyph/
   metric/variation parity checks against the retained app originals. Only the
   head checksum differs; see shared-landing-app-font-parity.json. No preload.
   Relative URLs support root and prefixed previews without an npm dependency. */
@font-face {
  font-family: Geologica;
  src: url("../../fonts/shared/geologica-variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: Manrope;
  src: url("../../fonts/shared/manrope-variable.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
.bret-games {
  --g-day-page: #e8def8;
  --g-day-ink: #353438;
  --g-day-purple: #715595;
  --g-white: #fff;
  --g-main-width: 1100px;
  --g-view-width: 1260px;
  --g-main-inset: 54px;
  --g-feature-card-narrow: 312px;
  --g-feature-card-wide: 440px;
  --g-card-line: #c4c3c6;
  --g-on-primary: var(--g-white);
  --g-primary-hover: #5c447b;
  --g-pause-background: #f7f2fbef;
  --g-pause-copy: #635570;
  --g-badge-background: #ffffffed;
  --g-badge-ink: #5f477b;
  --g-direction-ink: var(--g-day-ink);
  --g-menu-background: #fffdfef5;
  --g-menu-hover: #eee5f8;
  --g-menu-muted: #736a7f;
  --g-menu-shadow: 0 12px 40px #43314b1a;
  --g-menu-ink: var(--g-day-ink);
  --g-menu-border: var(--g-card-line);
  --g-menu-progress-line: var(--g-day-page);
  --g-menu-strong: var(--g-day-purple);
  --g-evening-wash: #30263f;
  --g-play-overlay: rgb(255 255 255 / .48);
  --g-glass-white: rgb(255 255 255 / .64);
  --g-tabs-background: var(--g-glass-white);
  /* Navigation colors live here. shell.css, loaded after all view styles by
     layouts/source.html, solely owns the sticky bar's geometry and flow. */
  --g-tabs-line: rgb(196 195 198 / .35);
  --g-tabs-ink: var(--g-day-purple);
  --g-tabs-on-active: var(--g-white);
  --g-tabs-hover: #f0e8f8;
  --g-tabs-active-hover: #60477f;
  --g-chip-line: #ecebed;
  --g-coming-soon: #bb59b5;
  --g-page: var(--g-day-page);
  --g-card: var(--g-white);
  --g-ink: var(--g-day-ink);
  --g-muted: #62576d;
  --g-purple: var(--g-day-purple);
  --g-soft: #eee5f8;
  --g-line: #c9c2d5;
  --g-surface: #f4eff8;
  color: var(--g-ink);
  background: var(--g-page);
  font:
    15px/1.65 Manrope,
    sans-serif;
  display: flex;
  min-height: 100vh;
  min-height: 100svh;
  width: 100%;
  isolation: isolate;
  padding-top: calc(
    var(--emt-header-top, 16px) + var(--emt-header-bar-height, 64px) + 16px
  );
  flex-direction: column;
}
.bret-games * {
  box-sizing: border-box;
}
.bret-games [hidden] {
  display: none !important;
}
.bret-games h1,
.bret-games h2,
.bret-games h3 {
  font-family: Geologica, Manrope, sans-serif;
  font-weight: 450;
  color: var(--g-ink);
  margin: 0;
  line-height: 1.25;
}
.bret-games p {
  margin: 0;
}
.bret-games button,
.bret-games select {
  font: inherit;
}
.bret-games button,
.bret-games a,
.bret-games select {
  touch-action: manipulation;
}
.bret-games button {
  cursor: pointer;
}
.bret-games button:focus-visible,
.bret-games a:focus-visible,
.bret-games select:focus-visible {
  outline: 3px solid var(--g-purple);
  outline-offset: 4px;
}
.bret-games button:disabled {
  cursor: default;
  opacity: 0.6;
}
.bret-games a {
  color: inherit;
}
.bret-games button {
  border: 1px solid var(--g-line);
  background: var(--g-card);
  color: var(--g-ink);
  border-radius: 100px;
  padding: 10px 18px;
  min-height: 44px;
  transition: background 0.15s;
}
.bret-games button:hover {
  background: var(--g-soft);
}
.bret-games .games-primary {
  background: var(--g-purple);
  color: var(--g-on-primary);
  border-color: var(--g-purple);
  font-weight: 700;
  padding: 13px 25px;
  min-height: 48px;
}
.bret-games .games-primary:hover {
  background: var(--g-primary-hover);
  color: var(--g-on-primary);
}
.bret-games .games-text-button {
  border-color: transparent;
  background: transparent;
  color: var(--g-purple);
}
.bret-games .games-main {
  max-width: var(--g-main-width);
  width: 100%;
  margin: 0 auto;
  flex: 1;
  padding: 0 var(--g-main-inset);
  min-width: 0;
}
/* Views select tokens; the main owns its width and padding in one place. */
.bret-games .games-main:has(> [data-game-home]:not([hidden])),
.bret-games .games-main:has(> [data-direction]:not([hidden])) {
  --g-main-width: var(--g-view-width);
  --g-main-inset: 0px;
}
.games-eyebrow {
  font-size: 12px;
  letter-spacing: 1.8px;
  font-weight: 750;
  color: var(--g-purple);
  margin-bottom: 14px !important;
}
.games-section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}
.games-section-heading h2 {
  font-size: 20px;
}
.games-section-heading > span {
  color: var(--g-muted);
  font-size: 12px;
  white-space: nowrap;
}
.games-states {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.games-states button {
  font-size: 12px;
  padding: 9px 14px;
}
.games-states button[aria-checked="true"] {
  color: var(--g-purple);
  background: var(--g-soft);
  border-color: var(--g-purple);
}
.games-state-note {
  font-size: 12px;
  color: var(--g-muted);
  margin-top: 12px !important;
  min-height: 20px;
}
.games-library-heading {
  margin-top: 28px;
}
.games-library-heading .games-eyebrow {
  font-size: 12px;
  margin-bottom: 6px !important;
}
.games-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
.games-card {
  border: 1px solid var(--g-card-line);
  border-radius: 24px;
  overflow: hidden;
  background: var(--g-card);
  display: flex;
  flex-direction: column;
  position: relative;
}
.games-card-art {
  height: 188px;
  position: relative;
  overflow: hidden;
}
.games-card-art > svg {
  width: 100%;
  height: 100%;
  display: block;
}
.games-card-badge {
  position: absolute;
  left: 16px;
  top: 14px;
  background: var(--g-badge-background);
  padding: 4px 10px;
  border-radius: 20px;
  color: var(--g-badge-ink);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.4px;
}
.games-card-copy {
  background: var(--g-card);
  padding: 22px 24px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.games-card h3 {
  font-size: 22px;
  margin-bottom: 7px;
}
.games-card-copy > p {
  font-size: 12px;
  color: var(--g-muted);
  min-height: 40px;
}
.games-card-tags {
  display: flex;
  gap: 8px;
  margin: 16px 0 20px;
  font-size: 12px;
  color: var(--g-muted);
  flex-wrap: wrap;
}
.games-card-tags span + span:before {
  content: "·";
  margin-right: 8px;
}
.games-card-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: auto;
}
.games-card-bottom > span {
  font-size: 12px;
  color: var(--g-muted);
}
.games-card-bottom button {
  font-size: 12px;
  padding: 8px 18px;
  min-height: 44px;
}
.games-philosophy {
  display: flex;
  gap: 16px;
  padding: 30px 4px;
  margin-top: 16px;
  color: var(--g-purple);
}
.games-philosophy svg {
  flex: none;
  margin-top: 5px;
}
.games-philosophy h3 {
  font-size: 15px;
  margin-bottom: 8px;
}
.games-philosophy p {
  font-size: 12px;
  color: var(--g-muted);
  max-width: 720px;
}
.games-footer {
  border-top: 1px solid var(--g-line);
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 0;
  margin-top: 30px;
  margin-bottom: 20px;
  font-size: 12px;
  color: var(--g-muted);
}
.games-resume {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: var(--g-soft);
  border-radius: 16px;
  margin-top: 24px;
}
.games-resume > div {
  flex: 1;
}
.games-resume p {
  font-size: 12px;
  color: var(--g-muted);
}
.games-back {
  padding: 8px 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: var(--g-purple) !important;
  font-size: 12px !important;
}
.games-player-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin: 20px 0 28px;
}
.games-player-header h1 {
  font-size: 34px;
  font-weight: 500;
  letter-spacing: 0;
}
.games-player-header .games-eyebrow {
  margin-bottom: 9px !important;
}
.games-player-header p:not(.games-eyebrow) {
  font-size: 13px;
  color: var(--g-muted);
  margin-top: 9px;
}
.games-time {
  text-align: right;
  flex: none;
  display: flex;
  flex-direction: column;
  align-self: center;
}
.games-time strong {
  font:
    27px/1.3 Geologica,
    sans-serif;
  font-variant-numeric: tabular-nums;
}
.games-time span {
  font-size: 12px;
  color: var(--g-muted);
}
.games-setup {
  border: 1px solid var(--g-line);
  background: var(--g-card);
  border-radius: 28px;
  overflow: hidden;
}
.games-setup-art {
  height: 240px;
  background: var(--g-soft);
}
.games-setup-art svg {
  height: 100%;
  width: 100%;
  display: block;
}
.games-setup-copy {
  padding: 30px;
}
.games-setup-copy h2 {
  font-size: 24px;
  margin-bottom: 12px;
}
.games-setup-copy > p {
  color: var(--g-muted);
  font-size: 14px;
  max-width: 760px;
}
.games-why {
  padding: 16px 20px;
  background: var(--g-surface);
  border-radius: 16px;
  margin: 24px 0;
  font-size: 12px;
}
.games-why strong {
  font-size: 12px;
  color: var(--g-purple);
}
.games-why p {
  margin-top: 4px;
}
.games-setup-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.games-setup-fields label {
  display: grid;
  gap: 8px;
  font-size: 12px;
}
.bret-games select {
  width: 100%;
  background: var(--g-card);
  color: var(--g-ink);
  border: 1px solid var(--g-line);
  border-radius: 12px;
  padding: 11px 12px;
  min-height: 46px;
}
.games-setup-note {
  font-size: 12px;
  color: var(--g-muted);
  margin: 15px 0 22px !important;
}
.games-session-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
}
.games-session-bar > span {
  font-size: 12px;
  color: var(--g-muted);
}
.games-session-bar > div {
  display: flex;
  gap: 8px;
}
.games-session-bar button {
  font-size: 12px;
  padding: 8px 16px;
}
.games-stage-wrap {
  position: relative;
  border: 1px solid var(--g-line);
  border-radius: 24px;
  overflow: hidden;
  background: var(--g-card);
}
.bret-games .games-stage {
  min-height: 430px;
  padding: 20px 16px;
}
.games-pause-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: var(--g-pause-background);
  z-index: 4;
  text-align: center;
  padding: 24px;
  backdrop-filter: blur(10px);
}
.games-pause-overlay > div {
  max-width: 420px;
  display: grid;
  justify-items: center;
  gap: 16px;
}
.games-pause-overlay .games-eyebrow {
  margin-bottom: 0 !important;
}
.games-pause-overlay h2 {
  font-size: 28px;
}
.games-pause-overlay p {
  font-size: 13px;
  color: var(--g-pause-copy);
}
.games-progress {
  min-height: 30px;
  margin-top: 16px !important;
  font-size: 13px;
  color: var(--g-purple);
}
.games-input-note {
  font-size: 12px;
  color: var(--g-muted);
}
.games-result {
  text-align: center;
  padding: 28px;
  border: 1px solid var(--g-line);
  border-radius: 28px;
  background: var(--g-card);
}
.games-result > div:first-child {
  height: 180px;
  max-width: 450px;
  margin: auto;
}
.games-result svg {
  height: 100%;
  width: 100%;
}
.games-result h2 {
  font-size: 30px;
  margin-bottom: 12px;
}
.games-result > p {
  font-size: 14px;
  color: var(--g-muted);
  max-width: 660px;
  margin-left: auto;
  margin-right: auto;
}
.games-result-metrics {
  display: flex;
  justify-content: center;
  gap: 48px;
  padding: 28px 0;
}
.games-result-metrics > div {
  display: flex;
  flex-direction: column;
}
.games-result-metrics strong {
  font:
    26px/1.5 Geologica,
    sans-serif;
  color: var(--g-purple);
}
.games-result-metrics span {
  font-size: 12px;
  color: var(--g-muted);
}
.games-feedback {
  border: 0;
  margin: 8px 0;
  padding: 0;
}
.games-feedback legend {
  font-size: 12px;
  margin-bottom: 12px;
  float: none;
  width: 100%;
}
.games-feedback button {
  font-size: 12px;
  margin: 3px;
  padding: 8px 13px;
}
.games-feedback [aria-pressed="true"] {
  background: var(--g-soft);
  border-color: var(--g-purple);
}
.games-result [data-feedback-status] {
  font-size: 12px;
  min-height: 24px;
}
.games-result-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 22px;
}
.games-result-actions button {
  font-size: 12px;
}
.games-storage {
  background: var(--g-soft);
  padding: 12px 16px;
  border-radius: 12px;
  margin-bottom: 16px !important;
  font-size: 12px;
}
.games-garden {
  padding: 12px 0 24px;
}
.games-garden h1 {
  font-size: 36px;
  max-width: 650px;
}
.games-garden [data-garden-art] {
  max-width: 700px;
  height: 290px;
  background: var(--g-soft);
  border-radius: 24px;
  margin: 28px 0;
}
.games-garden svg {
  width: 100%;
  height: 100%;
}
.games-garden > p {
  color: var(--g-muted);
  font-size: 14px;
  max-width: 700px;
}
.games-garden-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 24px 0;
}
.games-garden-stats div {
  border: 1px solid var(--g-line);
  padding: 18px;
  border-radius: 16px;
  background: var(--g-card);
}
.games-garden-stats strong,
.games-garden-stats span {
  display: block;
}
.games-garden-stats span {
  font-size: 12px;
  color: var(--g-muted);
  margin-top: 5px;
}
.games-garden > .games-primary {
  margin-top: 24px;
}
.bret-games.is-evening {
  --g-page: #272032;
  --g-card: #332a40;
  --g-ink: #f2eaf8;
  --g-muted: #c3b5ce;
  --g-purple: #c5ade4;
  --g-soft: #493957;
  --g-line: #51445d;
  --g-surface: #40314e;
  --g-on-primary: #2c203b;
  --g-primary-hover: var(--g-purple);
  --g-pause-background: #30243ded;
  --g-pause-copy: #ded1e9;
  --g-badge-background: #352a42f5;
  --g-badge-ink: #e5d4fa;
  --g-direction-ink: #f6effc;
  --g-menu-background: var(--g-card);
  --g-menu-hover: var(--g-soft);
  --g-menu-muted: var(--g-muted);
  --g-menu-shadow: 0 12px 40px #0006;
  --g-menu-ink: var(--g-ink);
  --g-menu-border: var(--g-line);
  --g-menu-progress-line: var(--g-line);
  --g-menu-strong: var(--g-purple);
  --g-tabs-background: rgb(57 43 72 / .94);
  --g-tabs-ink: #e1c9f7;
  --g-tabs-hover: var(--g-card);
  --g-tabs-on-active: var(--g-evening-wash);
  --g-tabs-active-hover: var(--g-purple);
}

@media (min-width: 1700px) {
  .bret-games { --g-main-inset: 72px; }
  .games-card-art {
    height: 215px;
  }
}
@media (max-width: 1100px) {
  .bret-games { --g-main-inset: 28px; }
  .games-card-copy {
    padding: 18px;
  }
  .games-section-heading > span {
    display: none;
  }
  .games-card-art {
    height: 160px;
  }
}

@media (max-width: 390px) {
  .games-card-bottom {
    padding-left: 16px;
    padding-right: 16px;
  }
}

.bret-games .games-heading {
  padding: 16px 0 28px;
  max-width: 680px;
}
.bret-games .games-heading h1 {
  font:
    500 32px/36px Geologica,
    sans-serif;
  letter-spacing: 0;
  margin-bottom: 8px;
}
.bret-games .games-heading > p {
  font:
    400 14px/20px Manrope,
    sans-serif;
}
.bret-games[data-bret-section]:not([data-bret-section="games"]) .games-footer {
  display: none;
}
/* Mobile app layout has one owner; the narrower rule adds card padding only. */
@media (max-width: 767px) {
  .games-card h3 {
    font-size: 18px;
  }

  .games-card-tags {
    font-size: 12px;
    margin: 12px 0;
  }
  .games-card-copy {
    padding: 16px;
  }
  .games-card-badge {
    left: 10px;
    top: 10px;
    font-size: 12px;
  }
  .games-states {
    gap: 7px;
  }
  .games-states button {
    font-size: 12px;
    padding: 8px 12px;
  }

  .games-player-header h1 {
    font-size: 28px;
  }
  .games-setup-fields {
    grid-template-columns: 1fr;
  }
  .games-setup-copy {
    padding: 24px;
  }
  .games-setup-art {
    height: 190px;
  }
  .games-player-header p:not(.games-eyebrow) {
    font-size: 12px;
  }
  .games-session-bar {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .games-session-bar > div {
    margin-left: auto;
  }
  .games-session-bar button {
    padding: 8px 14px;
    font-size: 12px;
  }
  .bret-games .games-stage {
    min-height: 400px;
    padding: 18px 10px;
  }
  .games-result {
    padding: 22px 14px;
  }
  .games-result-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .games-result-actions button {
    width: 100%;
  }
  .games-result > div:first-child {
    height: 150px;
  }
  .games-result h2 {
    font-size: 26px;
  }
  .games-garden-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .games-garden h1 {
    font-size: 30px;
  }
  .games-footer {
    font-size: 12px;
    flex-wrap: wrap;
  }
  .games-resume {
    flex-wrap: wrap;
  }
  .games-resume > div {
    flex-basis: 100%;
  }
  .games-time strong {
    font-size: 23px;
  }

  html[data-route-id="/bret/app"] .site-header,
  html[data-route-id="/bret/games"] .site-header {
    display: none;
  }
  .bret-games {
    --g-main-inset: 16px;
    padding-top: 0;
  }



  .bret-games .games-grid {
    gap: 16px;
    grid-template-columns: 1fr;
  }
  .bret-games .games-card-art {
    height: 200px;
  }
  .bret-games .games-card-bottom {
    flex-direction: row;
    align-items: center;
  }
  .bret-games .games-card-bottom button {
    width: auto;
    margin: 0;
  }
  .bret-games .games-section-heading h2 {
    font-size: 18px;
  }

  .bret-games .games-result-metrics {
    gap: 18px;
  }
  .bret-games .games-result-metrics strong {
    font-size: 20px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .bret-games * {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}

.games-empty {
  max-width: 680px;
  margin: 24px auto;
  padding: 24px;
  border: 1px solid var(--g-line);
  border-radius: 20px;
  background: var(--g-card);
}
.games-empty p {
  margin: 12px 0;
}

/* The mobile app hides the website header. Keep an independent keyboard entry
   to the app content; the Bret menu supplies About Bret and site navigation. */
.bret-app-skip {
  position: fixed;
  left: 16px;
  top: -200px;
  z-index: 1000;
  padding: 12px 18px;
  border: 2px solid var(--g-ink);
  border-radius: 12px;
  background: var(--g-card);
  color: var(--g-ink);
}
.bret-app-skip:focus {
  top: 12px;
}
@media (forced-colors: active) {
  /* System pairs must reach hover/focus rules as well as their default state.
     Equal evening specificity keeps the system tokens authoritative. */
  .bret-games,
  .bret-games.is-evening {
    --g-purple: Highlight;
    --g-on-primary: HighlightText;
    --g-primary-hover: Highlight;
    --g-tabs-background: Canvas;
    --g-tabs-ink: ButtonText;
    --g-tabs-hover: ButtonFace;
    --g-tabs-on-active: HighlightText;
    --g-tabs-active-hover: Highlight;
    --g-menu-background: Canvas;
    --g-menu-hover: ButtonFace;
    --g-menu-muted: CanvasText;
    --g-menu-shadow: none;
    --g-menu-ink: CanvasText;
    --g-menu-border: CanvasText;
    --g-menu-progress-line: CanvasText;
    --g-menu-strong: CanvasText;
  }
  .bret-games,
  .bret-games .games-card,
  .bret-games .games-card-copy,
  .bret-games .games-setup,
  .bret-games .games-result,
  .bret-games .games-pause-overlay,
  .bret-games .games-pause-overlay > div,
  .bret-games .games-garden,
  .bret-games .games-empty,
  .bret-games .games-resume {
    background: Canvas;
    color: CanvasText;
    border-color: CanvasText;
  }
  .bret-games button,
  .bret-games select,
  .bret-app-skip {
    background: ButtonFace;
    color: ButtonText;
    border-color: ButtonText;
  }
  /* Preserve selected state independently of focus in either system palette. */
  .bret-games .games-states button[aria-checked="true"],
  .bret-games.is-evening .games-states button[aria-checked="true"],
  .bret-games .games-feedback [aria-pressed="true"],
  .bret-games.is-evening .games-feedback [aria-pressed="true"] {
    background: Highlight;
    color: HighlightText;
    border: 2px solid Highlight;
    forced-color-adjust: none;
  }
  .bret-games a { color: LinkText; }
  .bret-games :focus-visible { outline: 3px solid Highlight; outline-offset: 3px; }
  .bret-games .games-card-art svg { forced-color-adjust: auto; }
}
