/* TREEZY — mobile-first production CSS */

:root {
  --ocean: #36B4CB;
  --ocean-dark: #118EA5;
  --leaf: #78B94B;
  --leaf-dark: #4F982E;
  --sand: #F3CF8A;
  --cream: #FCF7E9;
  --paper: #FFFCF6;
  --nav-bg: #F9F1E1;
  --paper-2: #EFE8DA;
  --ink: #121211;
  --muted: #5E5A50;
  --line: #141414;
  --image-stroke: #9A9387;
  --disabled-grey: #C3C2BF;
  --danger: #D1291E;
  --danger-soft: #FFF1EF;
  --warning: #EDAB3A;
  --warning-soft: #FFF5E5;
  --success: #74A936;
  --success-soft: #EEF8EA;
  --white: #fff;

  --primary-font: "Kanit", system-ui, sans-serif;
  --body-font: "Inter", system-ui, sans-serif;

  --phone: 402px;
  --radius: 8px;
  --border: 1.5px solid var(--line);
  --shadow: 0 10px 28px rgba(20, 20, 20, 0.14);
  --focus: 0 0 0 3px rgba(54, 180, 203, 0.25);

  --icon-arrow-left: url("https://icsdxwehvumvcwppwagr.supabase.co/storage/v1/object/public/Branding/Icons/Primary_Icons/ArrowLeft.png");
  --icon-arrow-right: url("https://icsdxwehvumvcwppwagr.supabase.co/storage/v1/object/public/Branding/Icons/Primary_Icons/ArrowRight.png");
  --icon-calendar: url("https://icsdxwehvumvcwppwagr.supabase.co/storage/v1/object/public/Branding/Icons/Primary_Icons/CalendarBlank.png");
  --icon-menu: url("https://icsdxwehvumvcwppwagr.supabase.co/storage/v1/object/public/Branding/Icons/Primary_Icons/Hamburger%20Menu.png");
  --icon-close-menu: url("https://icsdxwehvumvcwppwagr.supabase.co/storage/v1/object/public/Branding/Icons/Primary_Icons/Close%20Menu.png");
  --icon-lock: url("https://icsdxwehvumvcwppwagr.supabase.co/storage/v1/object/public/Branding/Icons/Primary_Icons/Lock.png");
  --icon-leaf: url("https://icsdxwehvumvcwppwagr.supabase.co/storage/v1/object/public/Branding/Icons/Primary_Icons/Leaf.png");

  --icon-guess-wrong: url("https://icsdxwehvumvcwppwagr.supabase.co/storage/v1/object/public/Branding/Icons/Tertiary_Icons/Puzzle_Failed_Icon.png");
  --icon-guess-close: url("https://icsdxwehvumvcwppwagr.supabase.co/storage/v1/object/public/Branding/Icons/Tertiary_Icons/Puzzle_Close_Icon.png");
  --icon-guess-correct: url("https://icsdxwehvumvcwppwagr.supabase.co/storage/v1/object/public/Branding/Icons/Tertiary_Icons/Puzzle_Success_Icon.png");
  --icon-puzzle-not-started: url("https://icsdxwehvumvcwppwagr.supabase.co/storage/v1/object/public/Branding/Icons/Tertiary_Icons/Puzzle_Not_Started_Icon.png");
  --icon-puzzle-not-available: url("https://icsdxwehvumvcwppwagr.supabase.co/storage/v1/object/public/Branding/Icons/Tertiary_Icons/Puzzle_Not_Available_Icon.png");

  --menu-puzzle-card-bg: url("https://icsdxwehvumvcwppwagr.supabase.co/storage/v1/object/public/Branding/Card%20Images/Today's%20Puzzle%20Card.png");
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #1f1f1f;
}

body {
  min-height: 100vh;
  margin: 0;
  background: #1f1f1f;
  color: var(--ink);
  font-family: var(--body-font);
  display: flex;
  justify-content: center;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

img {
  max-width: 100%;
  display: block;
}

.app-shell {
  position: relative;
  width: min(100%, var(--phone));
  min-height: 100svh;
  background: var(--paper);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Header */

.app-header {
  position: relative;
  z-index: 70;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: var(--nav-bg);
  border-bottom: 2px solid #9A9387;
}

.brand-button {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.brand-logo {
  width: 30px;
  height: auto;
  aspect-ratio: 907 / 1506;
  object-fit: contain;
  border: 0;
  border-radius: 0;
  background: transparent;
  flex: 0 0 auto;
}

.brand-copy {
  min-width: 0;
  display: grid;
}

.brand-title {
  color: #121211;
  font-family: var(--primary-font);
  font-size: 36px;
  font-style: normal;
  font-weight: 700;
  line-height: 36px;
  letter-spacing: 1.8px;
}

.brand-subtitle {
  margin-top: 0;
  color: #03A7C7;
  font-family: var(--primary-font);
  font-size: 12px;
  font-style: normal;
  font-weight: 500;
  line-height: normal;
  text-transform: uppercase;
  white-space: nowrap;
  letter-spacing: 0;
}

.icon-button {
  width: 36px;
  height: 36px;
  border: var(--border);
  border-radius: 999px;
  background: var(--ocean);
  color: #fff;
  display: grid;
  place-items: center;
  padding: 0;
}

.menu-icon,
.hamburger {
  width: 20px;
  height: 20px;
  display: block;
  background-image: var(--icon-menu);
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.hamburger span {
  display: none;
}

.app-shell[data-route="menu"] .menu-icon,
.app-shell[data-route="menu"] .hamburger,
.app-shell[data-route="auth"] .menu-icon,
.app-shell[data-route="auth"] .hamburger {
  background-image: var(--icon-close-menu);
}

/* Screens */

.screen-stack {
  flex: 1;
  position: relative;
}

.screen {
  display: none;
  padding: 12px 14px 26px;
}

.screen.is-active {
  display: block;
}

/* Footer */

.app-footer {
  height: 22px;
  padding: 0 14px 5px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  background: var(--nav-bg);
  color: #8d8779;
  font-size: 0.55rem;
}

.app-footer small {
  margin-right: auto;
}

.text-icon-button {
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
}

/* Game screen */

.game-card {
  position: relative;
}

.hint-image-wrap {
  position: relative;
}

.hint-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid var(--image-stroke);
  border-radius: 5px;
  background: var(--sand);
}

.hint-meta {
  position: absolute;
  left: 8px;
  top: 8px;
  margin: 0;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--ink);
  color: #FCF7F3;
  font-family: var(--primary-font);
  font-size: 14px;
  font-style: normal;
  font-weight: 500;
  line-height: normal;
  letter-spacing: 0.7px;
  text-transform: uppercase;
}

.hint-text {
  min-height: 68px;
  max-height: 72px;
  margin: 12px 0 0;
  padding-left: 10px;
  border-left: 2px solid var(--ink);
  color: #121211;
  font-family: var(--body-font);
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
  line-height: 18px;
  overflow: hidden;
}

.hint-controls {
  display: grid;
  grid-template-columns: 30px 1fr 30px;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(20, 20, 20, 0.28);
}

.square-button {
  width: 30px;
  height: 30px;
  border: var(--border);
  border-radius: 4px;
  background: var(--ocean);
  color: #fff;
  font-family: var(--primary-font);
  font-weight: 900;
  display: grid;
  place-items: center;
  padding: 0;
}

.square-button:disabled {
  background: #C3C2BF;
  border-color: #C3C2BF;
  opacity: 1;
}

.icon-img {
  width: 16px;
  height: 16px;
  display: block;
  object-fit: contain;
  pointer-events: none;
}

.square-button .icon-img {
  width: 17px;
  height: 17px;
}

.hint-progress {
  display: flex;
  justify-content: center;
  gap: 7px;
}

.progress-pill {
  width: 22px;
  height: 6px;
  border-radius: 999px;
  background: #ddd9cf;
}

.progress-pill.unlocked {
  background: #8E8A82;
}

.progress-pill.current {
  background: var(--ink);
}

/* Guess area */

.guess-section {
  padding: 12px 0 14px;
  border-bottom: 1px solid rgba(20, 20, 20, 0.28);
}

.guess-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 7px;
  align-items: start;
}

.input-wrap {
  position: relative;
}

.text-input {
  width: 100%;
  height: 30px;
  height: 34px;
  font-size: 16px !important;
  border: var(--border);
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
  padding: 0 8px;
  font-family: var(--body-font);
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
  outline: 0;
}

.text-input::placeholder {
  color: #898882;
  font-family: var(--body-font);
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
}

.text-input:focus {
  box-shadow: var(--focus);
}

.primary-button,
.secondary-button,
.danger-button {
  min-height: 30px;
  border: var(--border);
  border-radius: 5px;
  padding: 0 12px;
  font-family: var(--primary-font);
  font-size: 0.66rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.035em;
}

.primary-button {
  background: var(--ocean);
  color: #fff;
}

.secondary-button {
  background: #fff;
  color: var(--ink);
}

.danger-button {
  background: #FCF8EE;
  color: var(--danger);
  border-color: var(--danger);
}

.full-width {
  width: 100%;
}

.submit-button {
  height: 34px;
  color: #FFF;
  font-family: var(--primary-font);
  font-size: 14px;
  font-style: normal;
  font-weight: 600;
  line-height: normal;
  letter-spacing: 0.7px;
  text-transform: capitalize;
}

.microcopy {
  display: flex;
  gap: 6px;
  align-items: center;
  margin: 7px 0 0;
  color: #121211;
  font-family: var(--body-font);
  font-size: 10px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
}

.microcopy-icon {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  display: block;
  background-image: var(--icon-leaf);
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.previous-guesses {
  margin-top: 18px;
  min-height: 86px;
}

.eyebrow,
.section-title {
  margin: 0 0 10px;
  color: #121211;
  font-family: var(--primary-font);
  font-size: 12px;
  font-style: normal;
  font-weight: 500;
  line-height: normal;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 22px;
  padding: 3px 7px;
  border: var(--border);
  border-radius: 4px;
  background: #fff;
  font-family: var(--primary-font);
  font-size: 12px;
  font-style: normal;
  font-weight: 500;
  line-height: normal;
  letter-spacing: 0.6px;
  text-transform: capitalize;
}

.chip-icon {
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  display: block;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.chip.wrong {
  color: #D1291E;
  background: var(--danger-soft);
  border-color: #D1291E;
}

.chip.close {
  color: #EDAB3A;
  background: var(--warning-soft);
  border-color: #EDAB3A;
}

.chip.correct {
  color: #74A936;
  background: var(--success-soft);
  border-color: #74A936;
}

.chip.wrong .chip-icon {
  background-image: var(--icon-guess-wrong);
}

.chip.close .chip-icon {
  background-image: var(--icon-guess-close);
}

.chip.correct .chip-icon {
  background-image: var(--icon-guess-correct);
}

/* Autocomplete */

.autocomplete-list {
  position: absolute;
  z-index: 20;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  border: var(--border);
  border-radius: 4px;
  background: #fff;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.autocomplete-list li {
  margin: 0;
  padding: 8px 9px;
  border-bottom: 1px solid #ded8cb;
  color: #121211;
  font-family: var(--primary-font);
  font-size: 12px;
  font-style: normal;
  font-weight: 500;
  line-height: normal;
  letter-spacing: 0.6px;
  text-transform: capitalize;
  list-style: none;
}

.autocomplete-list li strong {
  color: #121211;
  font-family: var(--primary-font);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
  line-height: normal;
  letter-spacing: 0.6px;
}

.autocomplete-list li:last-child {
  border-bottom: 0;
}

.autocomplete-list li:hover,
.autocomplete-list li.is-active {
  background: var(--cream);
}

/* Shared page styles */

.page-title {
  margin: 0 0 4px;
  font-family: var(--primary-font);
  font-size: 1.15rem;
  line-height: 1;
  font-weight: 900;
  text-transform: uppercase;
}

.page-intro {
  margin: 0 0 14px;
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--muted);
}

/* Menu screen */

.menu-puzzle-card {
  position: relative;
  min-height: 122px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 1px 98px;
  gap: 12px;
  align-items: center;
  padding: 14px 14px 12px;
  border: var(--border);
  border-radius: 7px;
  margin-bottom: 18px;
  overflow: hidden;
  background-color: #FCF8EE;
  background-image:
    linear-gradient(
      to bottom,
      rgba(252, 248, 238, 0.92) 0%,
      rgba(252, 248, 238, 0.66) 52%,
      rgba(252, 248, 238, 0.12) 100%
    ),
    var(--menu-puzzle-card-bg);
  background-repeat: no-repeat;
  background-position: bottom center;
  background-size: 100% auto;
}

.menu-puzzle-left {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.menu-puzzle-heading-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.menu-puzzle-icon-wrap {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid #121211;
  border-radius: 999px;
  background: #02A5C5;
}

.menu-puzzle-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.menu-puzzle-title {
  margin: 0;
  color: #121211;
  font-family: var(--primary-font);
  font-size: 12px;
  font-style: normal;
  font-weight: 500;
  line-height: normal;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.menu-puzzle-label {
  margin: 1px 0 0;
  color: #121211;
  font-family: var(--body-font);
  font-size: 10px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
}

.menu-countdown {
  margin: 3px 0 9px 40px;
  color: #02A5C5;
  font-family: var(--primary-font);
  font-size: 20px;
  font-style: normal;
  font-weight: 500;
  line-height: normal;
  letter-spacing: 2px;
}

.menu-puzzle-button {
  width: 100%;
  min-height: 34px;
  color: #FFF;
  font-family: var(--primary-font);
  font-size: 14px;
  font-style: normal;
  font-weight: 600;
  line-height: normal;
  letter-spacing: 0.7px;
  text-transform: capitalize;
}

.menu-puzzle-divider {
  width: 1px;
  height: 82px;
  background: #9A9387;
  opacity: 0.7;
}

.menu-guest-block,
.menu-streak-block {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  align-content: center;
  text-align: center;
  min-width: 0;
}

.menu-guest-icon {
  width: 44px;
  height: 44px;
  margin-bottom: 5px;
  object-fit: contain;
}

.menu-guest-title,
.menu-streak-title,
.menu-streak-days {
  margin: 0;
  color: #121211;
  font-family: var(--primary-font);
  font-size: 12px;
  font-style: normal;
  font-weight: 500;
  line-height: normal;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  white-space: nowrap;
}

.menu-guest-copy {
  margin: 1px 0 0;
  color: #121211;
  font-family: var(--body-font);
  font-size: 10px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
  white-space: nowrap;
}

.menu-streak-count-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.menu-streak-icon {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.menu-streak-count-row strong {
  color: #121211;
  font-family: var(--primary-font);
  font-size: 26px;
  font-style: normal;
  font-weight: 500;
  line-height: normal;
  letter-spacing: 1.3px;
}

.menu-section-heading {
  margin: 0 0 8px;
  color: #121211;
  font-family: var(--primary-font);
  font-size: 16px;
  font-style: normal;
  font-weight: 700;
  line-height: normal;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.menu-benefits-section,
.menu-progress-section {
  margin-bottom: 18px;
}

.benefit-grid,
.menu-progress-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  background: #FCF8EE;
  border: 1px solid #9A9387;
  border-radius: 7px;
  overflow: hidden;
}

.benefit-grid article,
.menu-progress-grid article {
  position: relative;
  padding: 12px 7px;
  text-align: center;
  background: transparent;
}

.benefit-grid article:not(:last-child)::after,
.menu-progress-grid article:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 16px;
  right: 0;
  width: 1px;
  height: calc(100% - 32px);
  background: #9A9387;
}

.benefit-icon,
.menu-progress-icon {
  width: 28px;
  height: 28px;
  margin: 0 auto 6px;
  object-fit: contain;
}

.benefit-grid strong,
.menu-progress-grid small {
  display: block;
  color: #000;
  text-align: center;
  font-family: var(--primary-font);
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
}

.benefit-grid small {
  display: block;
  margin-top: 3px;
  color: #121211;
  text-align: center;
  font-family: var(--body-font);
  font-size: 10px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
}

.menu-progress-grid strong {
  display: block;
  color: #000;
  text-align: center;
  font-family: var(--primary-font);
  font-size: 24px;
  font-style: normal;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 1.2px;
}

.menu-actions-section {
  margin-bottom: 12px;
}

.action-list {
  display: grid;
  gap: 0;
  padding: 0 16px;
  border: 1px solid #9A9387;
  border-radius: 7px;
  background: #FCF8EE;
  overflow: hidden;
}

.action-row {
  width: 100%;
  display: grid;
  grid-template-columns: 30px 1fr auto;
  align-items: center;
  column-gap: 10px;
  min-height: 64px;
  padding: 0;
  border: 0;
  border-top: 1px solid #9A9387;
  background: transparent;
  text-align: left;
}

.action-row:first-child {
  border-top: 0;
}

.action-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
  justify-self: center;
}

.action-row strong {
  color: #121211;
  font-family: var(--primary-font);
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
}

.action-row em {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  font-style: normal;
  text-align: right;
}

.action-lock-spacer {
  width: 14px;
  height: 14px;
  display: block;
}

.action-chevron {
  width: 12px;
  height: 12px;
  object-fit: contain;
}

.lock-icon {
  width: 14px;
  height: 14px;
  display: none;
  background-image: var(--icon-lock);
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  opacity: 0.5;
}

.app-shell[data-auth="guest"] .locked-when-guest .lock-icon {
  display: block;
}

.menu-auth-actions {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.menu-auth-actions .primary-button,
.menu-auth-actions .secondary-button,
.menu-auth-actions .danger-button {
  width: 100%;
  height: 30px;
  min-height: 30px;
  padding: 0 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  font-family: var(--primary-font);
  font-size: 14px;
  font-style: normal;
  font-weight: 600;
  line-height: normal;
  letter-spacing: 0.7px;
  text-transform: capitalize;
}

.menu-auth-actions .danger-button {
  color: #D1291E;
  background: #FCF8EE;
}

.auth-nudge {
  max-width: 320px;
  margin: 0 auto 8px;
  color: #121211;
  text-align: center;
  font-family: var(--body-font);
  font-size: 12px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
  text-wrap: balance;
}

/* Auth visibility */

.guest-only,
.auth-only {
  display: none;
}

.app-shell[data-auth="guest"] .guest-only {
  display: block;
}

.app-shell[data-auth="guest"] .auth-only {
  display: none !important;
}

.app-shell[data-auth="signed-in"] .guest-only {
  display: none !important;
}

.app-shell[data-auth="signed-in"] .auth-only {
  display: block;
}

.app-shell[data-auth="guest"] .menu-auth-actions .guest-only,
.app-shell[data-auth="signed-in"] .menu-auth-actions .auth-only {
  display: flex;
}

.app-shell[data-auth="guest"] .locked-when-guest {
  opacity: 0.42;
}

/* How to play */

.how-to-title {
  margin: 0 0 4px;
  color: #121211;
  font-family: var(--primary-font);
  font-size: 16px;
  font-style: normal;
  font-weight: 700;
  line-height: normal;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.how-to-intro {
  margin: 0 0 18px;
  max-width: 330px;
  color: #121211;
  font-family: var(--body-font);
  font-size: 12px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
}

.how-to-steps {
  display: grid;
  gap: 0;
  margin-bottom: 14px;
  padding: 0;
  border: 1px solid #9A9387;
  border-radius: 7px;
  background: #FCF8EE;
  overflow: hidden;
}

.how-to-step {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 12px;
  align-items: center;
  min-height: 76px;
  padding: 12px;
  border-bottom: 1px solid #9A9387;
}

.how-to-step:last-child {
  border-bottom: 0;
}

.how-to-step-icon {
  width: 30px;
  height: 30px;
  object-fit: contain;
  justify-self: center;
}

.how-to-step h2 {
  margin: 0;
  color: #000;
  font-family: var(--primary-font);
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
}

.how-to-step p {
  margin: 2px 0 0;
  color: #121211;
  font-family: var(--body-font);
  font-size: 10px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
}

.how-to-tip-box {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 8px;
  align-items: center;
  margin: 0 0 14px;
  padding: 10px;
  border: 1px solid #2FB5CE;
  border-radius: 5px;
  background: #F5FDFF;
}

.how-to-tip-icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
  justify-self: center;
}

.how-to-tip-box p {
  margin: 0;
  color: #121211;
  font-family: var(--body-font);
  font-size: 12px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
}

.how-to-tip-box strong {
  font-weight: 700;
}

.how-to-play-button {
  height: 30px;
  min-height: 30px;
  color: #FFF;
  font-family: var(--primary-font);
  font-size: 14px;
  font-style: normal;
  font-weight: 600;
  line-height: normal;
  letter-spacing: 0.7px;
  text-transform: capitalize;
}

/* Auth Screen */

.auth-page-title {
  margin: 0;
  color: #121211;
  font-family: var(--primary-font);
  font-size: 16px;
  font-style: normal;
  font-weight: 700;
  line-height: normal;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.auth-page-intro {
  margin: 2px 0 22px;
  max-width: 330px;
  color: #121211;
  font-family: var(--body-font);
  font-size: 12px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
}

.auth-benefits-panel {
  display: grid;
  gap: 0;
  margin-bottom: 34px;
  padding: 0 18px;
  border: 1px solid #9A9387;
  border-radius: 7px;
  background: #FCF8EE;
  overflow: hidden;
}

.auth-benefit-row {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 16px;
  align-items: center;
  min-height: 76px;
  padding: 12px 0;
  border-bottom: 1px solid #9A9387;
}

.auth-benefit-row:last-child {
  border-bottom: 0;
}

.auth-benefit-icon {
  width: 36px;
  height: 36px;
  object-fit: contain;
  justify-self: center;
}

.auth-benefit-row strong {
  display: block;
  color: #000;
  font-family: var(--primary-font);
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
}

.auth-benefit-row small {
  display: block;
  margin-top: 1px;
  color: #121211;
  font-family: var(--body-font);
  font-size: 10px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
}

.auth-form {
  display: grid;
  gap: 8px;
  margin-top: 0;
}

.auth-form-title {
  margin: 0;
  color: #121211;
  font-family: var(--primary-font);
  font-size: 16px;
  font-style: normal;
  font-weight: 700;
  line-height: normal;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.auth-email-input {
  height: 30px;
}

.auth-submit-button,
.auth-later-button {
  width: 100%;
  height: 30px;
  min-height: 30px;
  padding: 0 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  font-family: var(--primary-font);
  font-size: 14px;
  font-style: normal;
  font-weight: 600;
  line-height: normal;
  letter-spacing: 0.7px;
  text-transform: capitalize;
}

.auth-submit-button {
  color: #FFF;
}

.auth-later-button {
  color: #121211;
}

.auth-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  background: #9A9387;
}

.auth-divider span {
  color: #121211;
  font-family: var(--primary-font);
  font-size: 14px;
  font-style: normal;
  font-weight: 500;
  line-height: normal;
  letter-spacing: 0.7px;
  text-transform: capitalize;
}

.auth-note {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 8px;
  margin: 18px auto 0;
  color: rgba(18, 18, 17, 0.50);
  font-family: var(--body-font);
  font-size: 12px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
  text-align: left;
}

.auth-note-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  margin-top: 1px;
  display: block;
  background-image: var(--icon-lock);
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

/* Calendar page */

.calendar-page-title {
  margin: 0 0 8px;
  color: #121211;
  font-family: var(--primary-font);
  font-size: 16px;
  font-style: normal;
  font-weight: 700;
  line-height: normal;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.calendar-panel {
  border: var(--border);
  border-radius: 7px;
  background: #FCF8EE;
  padding: 16px 12px 12px;
  margin-bottom: 8px;
}

.calendar-nav {
  display: grid;
  grid-template-columns: 34px 1fr 34px;
  align-items: center;
  margin-bottom: 12px;
}

.calendar-month-label {
  margin: 0;
  text-align: center;
  color: #121211;
  font-family: var(--primary-font);
  font-size: 20px;
  font-style: normal;
  font-weight: 700;
  line-height: normal;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.calendar-nav-button {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  padding: 0;
}

.calendar-nav-icon {
  width: 16px;
  height: 16px;
  object-fit: contain;
}

.calendar-nav-icon-prev {
  transform: scaleX(-1);
}

.calendar-nav-icon-next {
  transform: none;
}

.weekday-row,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

.weekday-row {
  margin-bottom: 8px;
}

.weekday-row span {
  color: #000;
  text-align: center;
  font-family: var(--primary-font);
  font-size: 12px;
  font-style: normal;
  font-weight: 500;
  line-height: normal;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.calendar-grid {
  row-gap: 12px;
  column-gap: 2px;
  margin-bottom: 4px;
}

.calendar-empty-day {
  min-height: 40px;
}

.calendar-day {
  position: relative;
  min-height: 40px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 1px;
  padding: 0;
}

.calendar-day-number {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #000;
  text-align: center;
  font-family: var(--primary-font);
  font-size: 20px;
  font-style: normal;
  font-weight: 500;
  line-height: normal;
  letter-spacing: 1px;
  opacity: 1;
}

.calendar-day.selected .calendar-day-number {
  background: #2FB5CE;
  color: #FFF;
}

.calendar-status-icon {
  width: 10px;
  height: 10px;
  object-fit: contain;
  margin-top: -5px;
  opacity: 1;
}

.calendar-day-not-available .calendar-day-number {
  color: #CAC6BE;
}

.calendar-play-button {
  height: 30px;
  min-height: 30px;
  margin-bottom: 30px;
  color: #FFF;
  font-family: var(--primary-font);
  font-size: 14px;
  font-style: normal;
  font-weight: 600;
  line-height: normal;
  letter-spacing: 0.7px;
  text-transform: capitalize;
}

.calendar-results-section {
  margin-bottom: 18px;
}

.calendar-results-title {
  margin: 0 0 10px;
  color: #121211;
  font-family: var(--primary-font);
  font-size: 16px;
  font-style: normal;
  font-weight: 700;
  line-height: normal;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.calendar-results-card {
  border: 1px solid #9A9387;
  border-radius: 7px;
  background: #FCF8EE;
  padding: 0 14px;
  margin-bottom: 8px;
}

.calendar-result-row {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid #9A9387;
}

.calendar-result-row:last-child {
  border-bottom: 0;
}

.calendar-result-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #000;
  text-align: center;
  font-family: var(--primary-font);
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
}

.calendar-result-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.calendar-result-value {
  color: #000;
  text-align: right;
  font-family: var(--primary-font);
  font-size: 24px;
  font-style: normal;
  font-weight: 500;
  line-height: normal;
  letter-spacing: 2.4px;
}

.calendar-stats-button {
  width: 100%;
  height: 30px;
  min-height: 30px;
  padding: 0 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  color: #121211;
  font-family: var(--primary-font);
  font-size: 14px;
  font-style: normal;
  font-weight: 600;
  line-height: normal;
  letter-spacing: 0.7px;
  text-transform: capitalize;
}

/* Stats */

.stats-page-title {
  margin: 0 0 2px;
  color: #121211;
  font-family: var(--primary-font);
  font-size: 16px;
  font-style: normal;
  font-weight: 700;
  line-height: normal;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.stats-page-intro {
  max-width: 330px;
  margin: 0 0 14px;
  color: #121211;
  font-family: var(--body-font);
  font-size: 12px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
}

.stats-card {
  margin-bottom: 20px;
  border: 1px solid #9A9387;
  border-radius: 7px;
  background: #FCF8EE;
  overflow: hidden;
}

.stats-card-three {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.stats-metric {
  position: relative;
  min-height: 130px;
  padding: 14px 8px 12px;
  display: grid;
  justify-items: center;
  align-content: start;
  text-align: center;
}

.stats-metric:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 16px;
  right: 0;
  width: 1px;
  height: calc(100% - 32px);
  background: #9A9387;
}

.stats-metric-icon {
  width: 30px;
  height: 30px;
  margin-bottom: 4px;
  object-fit: contain;
}

.stats-metric strong {
  display: block;
  color: #121211;
  text-align: center;
  font-family: var(--primary-font);
  font-size: 24px;
  font-style: normal;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 2.4px;
}

.stats-metric span {
  display: block;
  margin-top: 2px;
  color: #000;
  text-align: center;
  font-family: var(--primary-font);
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
}

.stats-metric small {
  display: block;
  max-width: 92px;
  margin-top: 4px;
  color: #121211;
  text-align: center;
  font-family: var(--body-font);
  font-size: 10px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
}

.stats-ranking-card {
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  align-items: center;
  min-height: 142px;
  padding: 14px 12px;
}

.stats-global-rank {
  display: grid;
  justify-items: center;
  align-content: center;
  text-align: center;
  padding: 0 8px;
}

.stats-global-icon {
  width: 40px;
  height: 40px;
  margin-bottom: 4px;
  object-fit: contain;
}

.stats-global-rank strong {
  display: block;
  color: #121211;
  text-align: center;
  font-family: var(--primary-font);
  font-size: 24px;
  font-style: normal;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 2.4px;
}

.stats-global-rank span {
  display: block;
  margin-top: 2px;
  color: #000;
  text-align: center;
  font-family: var(--primary-font);
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
}

.stats-global-rank small {
  display: block;
  max-width: 96px;
  margin-top: 6px;
  color: #121211;
  text-align: center;
  font-family: var(--body-font);
  font-size: 10px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
}

.stats-ranking-divider {
  width: 1px;
  height: calc(100% - 8px);
  background: #9A9387;
}

.stats-ranking-list {
  display: grid;
  gap: 10px;
  padding-left: 16px;
}

.stats-ranking-row {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 9px;
  align-items: center;
}

.stats-ranking-icon {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.stats-ranking-row strong {
  display: block;
  color: #121211;
  font-family: var(--primary-font);
  font-size: 20px;
  font-style: normal;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 1px;
}

.stats-ranking-row span {
  display: block;
  margin-top: 1px;
  color: #000;
  font-family: var(--primary-font);
  font-size: 12px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
}

/* Result modal */

#resultModal {
  position: fixed;
  inset: 90px 0 22px;
  z-index: 9000;
  width: 100%;
  margin: 0;
  padding: 12px 14px 28px;
  background: var(--paper);
  overflow-y: auto;
  overflow-x: hidden;
}

#resultModal[hidden] {
  display: none;
}

#resultModal .result-card {
  width: min(100%, var(--content-width));
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  text-align: center;
}

#resultModal .result-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid #9A9387;
  border-bottom: 0;
  border-radius: 7px 7px 0 0;
  background: var(--sand);
}

#resultModal .result-summary-card {
  position: relative;
  margin: 0 0 28px;
  padding: 18px 14px 18px;
  border: 1px solid #9A9387;
  border-radius: 0 0 7px 7px;
  background: #FCF8EE;
  text-align: center;
}

#resultModal .result-icon {
  position: static;
  transform: none;
  width: 44px;
  height: 44px;
  margin: 0 auto 10px;
  z-index: 1;
  border: 2px solid #FCF8EE;
  border-radius: 999px;
  background: transparent;
  display: block;
  object-fit: contain;
  box-shadow: 0 0 0 1px #121211;
}

#resultModal .result-kicker {
  margin: 0 0 4px;
  color: #121211;
  text-align: center;
  font-family: var(--primary-font);
  font-size: 20px;
  font-style: normal;
  font-weight: 700;
  line-height: normal;
  letter-spacing: 1px;
  text-transform: uppercase;
}

#resultModal .result-tree {
  margin: 0;
  color: var(--success);
  text-align: center;
  font-family: var(--primary-font);
  font-size: 26px;
  font-style: normal;
  font-weight: 700;
  line-height: 36px;
  letter-spacing: 1.3px;
  text-transform: uppercase;
}

#resultModal .result-icon.lost + .result-kicker + .result-tree,
#resultModal .result-summary-card:has(.result-icon.lost) .result-tree {
  color: var(--danger);
}

#resultModal .scientific-name {
  margin: -2px 0 14px;
  color: #121211;
  text-align: center;
  font-family: var(--primary-font);
  font-size: 16px;
  font-style: italic;
  font-weight: 500;
  line-height: normal;
}

#resultModal .result-message {
  max-width: 240px;
  margin: 0 auto;
  color: #121211;
  text-align: center;
  font-family: var(--body-font);
  font-size: 12px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
}

#resultModal .result-results-section {
  width: 100%;
  margin: 0 0 10px;
  text-align: left;
}

#resultModal .result-section-title {
  margin: 0 0 10px;
  color: #121211;
  font-family: var(--primary-font);
  font-size: 16px;
  font-style: normal;
  font-weight: 700;
  line-height: normal;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  text-align: left;
}

#resultModal .result-metric-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: 100%;
  border: 1px solid #9A9387;
  border-radius: 7px;
  background: #FCF8EE;
  overflow: hidden;
}

#resultModal .result-metric-card {
  min-height: 74px;
  display: grid;
  justify-items: center;
  align-content: center;
  padding: 8px 4px;
  border-right: 1px solid #9A9387;
  text-align: center;
  background: transparent;
}

#resultModal .result-metric-card:last-child {
  border-right: 0;
}

#resultModal .result-metric-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
  margin: 0 0 2px;
}

#resultModal .result-metric-card strong {
  display: block;
  color: #000;
  text-align: center;
  font-family: var(--primary-font);
  font-size: 24px;
  font-style: normal;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 1.2px;
}

#resultModal .result-metric-card small {
  display: block;
  margin-top: 3px;
  color: #000;
  text-align: center;
  font-family: var(--primary-font);
  font-size: 12px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
}

#resultModal .result-actions {
  display: grid;
  gap: 8px;
  width: 100%;
  margin-top: 8px;
}

#resultModal .result-share-button,
#resultModal .result-next-button {
  width: 100%;
  height: 30px;
  min-height: 30px;
  padding: 0 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  font-family: var(--primary-font);
  font-size: 14px;
  font-style: normal;
  font-weight: 600;
  line-height: normal;
  letter-spacing: 0.7px;
  text-transform: capitalize;
  border-radius: 5px;
}

#resultModal .result-share-button {
  color: #FFF;
}

#resultModal .result-next-button {
  color: #121211;
  border: var(--border);
  background: #FFF;
}

body.result-open {
  overflow: hidden;
}

@media (max-width: 519px) {
  #resultModal {
    padding-inline: 14px;
  }

  #resultModal .result-card {
    width: 100%;
    max-width: none;
  }
}

@media (max-width: 360px) {
  #resultModal {
    padding-inline: 12px;
  }

  #resultModal .result-summary-card {
    padding-inline: 12px;
  }

  #resultModal .result-tree {
    font-size: 24px;
    line-height: 32px;
  }

  #resultModal .result-kicker {
    font-size: 18px;
  }
}

/* Toast */

.toast {
  position: fixed;
  z-index: 80;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 80px);
  max-width: calc(100vw - 32px);
  padding: 10px 16px;
  border: var(--border);
  border-radius: 5px;
  background: var(--ink);
  color: #FFF;
  font-family: var(--primary-font);
  font-size: 14px;
  font-style: normal;
  font-weight: 600;
  line-height: normal;
  letter-spacing: 0.7px;
  text-transform: capitalize;
  white-space: nowrap;
  transition: transform 0.22s ease;
}

.toast.show {
  transform: translate(-50%, 0);
}

/* Animation */

.shake {
  animation: shake 0.28s ease;
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-5px);
  }

  50% {
    transform: translateX(5px);
  }

  75% {
    transform: translateX(-3px);
  }
}

/* Utilities */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Responsive refinements */

@media (max-width: 360px) {
  .screen {
    padding-inline: 12px;
  }

  .brand-logo {
    width: 28px;
  }

  .brand-title {
    font-size: 32px;
    line-height: 32px;
  }

  .brand-subtitle {
    font-size: 10px;
  }

  .progress-pill {
    width: 18px;
  }

  .primary-button,
  .secondary-button,
  .danger-button {
    font-size: 0.58rem;
    padding-inline: 8px;
  }

  .menu-puzzle-card {
    grid-template-columns: minmax(0, 1fr) 1px 86px;
    gap: 9px;
    padding: 12px;
  }

  .menu-puzzle-button {
    width: 100%;
    font-size: 12px;
  }

  .menu-countdown {
    font-size: 18px;
  }

  .benefit-grid strong,
  .action-row strong,
  .menu-progress-grid small,
  .stats-metric span {
    font-size: 12px;
  }

  .benefit-grid small,
  .stats-metric small {
    font-size: 9px;
  }

  .auth-benefits-panel {
    padding-inline: 14px;
  }

  .auth-benefit-row {
    grid-template-columns: 40px 1fr;
    gap: 12px;
  }

  .calendar-panel {
    padding-inline: 10px;
  }

  .calendar-day-number {
    width: 30px;
    height: 30px;
    font-size: 18px;
  }

  .calendar-grid {
    row-gap: 10px;
  }

  .calendar-result-value {
    font-size: 22px;
  }

  .how-to-step {
    grid-template-columns: 38px 1fr;
    gap: 10px;
    padding: 10px;
  }

  .how-to-step-icon {
    width: 28px;
    height: 28px;
  }

  .stats-metric {
    min-height: 124px;
    padding-inline: 5px;
  }

  .stats-metric strong,
  .stats-global-rank strong {
    font-size: 22px;
  }

  .stats-ranking-list {
    padding-left: 10px;
  }

  .stats-ranking-row strong {
    font-size: 18px;
  }

  .stats-ranking-row span {
    font-size: 11px;
  }
}

@media (min-width: 700px) {
  body {
    padding: 28px 0;
  }

  .app-shell {
    min-height: 874px;
    border: 1px solid rgba(255, 255, 255, 0.12);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* -------------------------------------------------------
   TREEZY PAGE-STYLE RESPONSIVE LAYOUT
   Full-width nav/footer, centered game content
   Replace previous responsive override block with this
------------------------------------------------------- */

:root {
  --content-width: 402px;
  --desktop-bg: #FFFCF6;
}

/* Global protection */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  width: 100%;
  min-height: 100%;
  margin: 0;
  padding: 0;
  background: var(--paper) !important;
  overflow-x: hidden;
  touch-action: manipulation;
  -webkit-text-size-adjust: 100%;
}

body {
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  padding: 0 !important;
  background: var(--paper) !important;
  color: var(--ink);
  font-family: var(--body-font);
  display: block !important;
  overflow-x: hidden;
  touch-action: manipulation;
  -webkit-text-size-adjust: 100%;
}

/*
  App shell is no longer a visible phone/device frame.
  It becomes the full page layout container.
*/
.app-shell {
  width: 100% !important;
  max-width: none !important;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0 !important;
  background: var(--paper);
  border: 0 !important;
  box-shadow: none !important;
  overflow-x: hidden;
  overflow-y: visible;
  display: flex;
  flex-direction: column;
}

/*
  Header is a real full-width page nav.
  The bar stretches full screen.
*/
.app-header {
  width: 100% !important;
  max-width: none !important;
  height: 90px;
  margin: 0 !important;
  padding-block: 12px;
  padding-inline: max(14px, calc((100vw - var(--content-width)) / 2 + 14px));
  background: var(--nav-bg);
  border-bottom: 2px solid #9A9387;
  box-shadow: none !important;
}

/*
  Main area fills remaining space.
  Individual screens are the centered game column.
*/
.screen-stack {
  width: 100% !important;
  max-width: none !important;
  flex: 1;
  overflow-x: hidden;
  background: var(--paper);
}

.screen {
  width: min(100%, var(--content-width)) !important;
  max-width: var(--content-width) !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding: 12px 14px 26px;
  overflow-x: hidden;
}

/*
  Footer is also a full-width page bar.
  Text/icons are centered into the same 402px content lane.
*/
.app-footer {
  width: 100% !important;
  max-width: none !important;
  height: 22px;
  margin: 0 !important;
  padding-block: 0 5px;
  padding-inline: max(14px, calc((100vw - var(--content-width)) / 2 + 14px));
  background: var(--nav-bg);
  border: 0 !important;
  box-shadow: none !important;
  flex-shrink: 0;
}

/*
  Result modal should behave like the centered screen content,
  not like a full device overlay on desktop.
*/
#resultModal {
  position: fixed !important;
  inset: 90px 0 22px !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 12px 14px 28px;
  background: var(--paper);
  overflow-y: auto;
  overflow-x: hidden;
}

#resultModal .result-card {
  width: min(100%, var(--content-width)) !important;
  max-width: var(--content-width) !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* Prevent inner elements causing sideways bleed */
.game-card,
.hint-image-wrap,
.hint-image,
.guess-section,
.guess-form,
.previous-guesses,
.result-summary-card,
.calendar-panel,
.stats-card,
.menu-puzzle-card,
.action-list,
.auth-benefits-panel,
.how-to-steps {
  max-width: 100%;
  overflow-x: hidden;
}

img,
video,
canvas,
svg {
  max-width: 100%;
}

button,
input,
textarea,
select {
  max-width: 100%;
}

/* iOS input zoom prevention */
input,
textarea,
select {
  font-size: 16px !important;
}

.text-input {
  height: 34px;
  font-size: 16px !important;
}

.text-input::placeholder {
  font-size: 16px !important;
}

.submit-button {
  height: 34px;
}

/* Prevent double-tap zoom on tappable controls */
button,
a,
[role="button"],
.icon-button,
.square-button,
.primary-button,
.secondary-button,
.danger-button,
.calendar-day,
.action-row,
.brand-button {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* Prevent accidental text selection on repeated taps */
button,
.icon-button,
.square-button,
.primary-button,
.secondary-button,
.danger-button,
.calendar-day,
.action-row,
.hint-controls,
.hint-progress {
  user-select: none;
  -webkit-user-select: none;
}

/* Mobile keeps the same logic, but naturally fills the viewport */
@media (max-width: 519px) {
  .app-header {
    padding-inline: 14px;
  }

  .app-footer {
    padding-inline: 14px;
  }

  .screen {
    width: 100% !important;
    max-width: none !important;
  }

  .result-card {
    width: 100% !important;
    max-width: none !important;
  }
}

/* Small phone polish */
@media (max-width: 360px) {
  .app-header {
    padding-inline: 12px;
  }

  .app-footer {
    padding-inline: 12px;
  }

  .screen,
  #resultModal {
    padding-inline: 12px;
  }

  .brand-logo {
    width: 28px;
  }

  .brand-title {
    font-size: 32px;
    line-height: 32px;
    letter-spacing: 1.4px;
  }

  .brand-subtitle {
    font-size: 10px;
  }

  .progress-pill {
    width: 18px;
  }

  .submit-button {
    font-size: 13px;
    padding-inline: 10px;
  }
}

/*
  Remove old desktop framing completely.
  This specifically kills the previous phone-on-page effect.
*/
@media (min-width: 520px) {
  body {
    padding: 0 !important;
    background: var(--paper) !important;
  }

  .app-shell {
    width: 100% !important;
    max-width: none !important;
    min-height: 100vh !important;
    border: 0 !important;
    box-shadow: none !important;
  }

  .app-header,
  .app-footer {
    width: 100% !important;
    max-width: none !important;
  }
}

/* -------------------------------------------------------
   AUTOCOMPLETE DROPDOWN FIX
   Keeps suggestions above the input and preserves typography
------------------------------------------------------- */

.input-wrap {
  position: relative;
  overflow: visible !important;
  z-index: 100;
}

.guess-form,
.guess-section,
.game-card,
.screen,
.screen-stack {
  overflow: visible !important;
}

.autocomplete-list {
  position: absolute;
  z-index: 9999;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 176px;
  overflow-y: auto;
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1.5px solid #121211;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(20, 20, 20, 0.14);
}

.autocomplete-list[hidden] {
  display: none !important;
}

.autocomplete-list li {
  margin: 0;
  padding: 8px 9px;
  border-bottom: 1px solid #ded8cb;
  color: #121211;
  background: #fff;
  font-family: var(--primary-font);
  font-size: 12px;
  font-style: normal;
  font-weight: 500;
  line-height: normal;
  letter-spacing: 0.6px;
  text-transform: capitalize;
  list-style: none;
  cursor: pointer;
}

.autocomplete-list li:last-child {
  border-bottom: 0;
}

.autocomplete-list li strong {
  color: #121211;
  font-family: var(--primary-font);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
  line-height: normal;
  letter-spacing: 0.6px;
}

.autocomplete-list li:hover,
.autocomplete-list li.is-active {
  background: #FCF7E9;
}