:root {
  --green: #6aaa64;
  --yellow: #c9b458;
  --gray: #787c7e;
  --tone-1: #000000;
  --tone-2: #787c7e;
  --tone-3: #878a8c;
  --tone-4: #d3d6da;
  --tone-5: #edeff1;
  --tone-6: #f6f7f8;
  --tone-7: #ffffff;
  --bg: #ffffff;
  --text: #000000;
  --correct: var(--green);
  --present: var(--yellow);
  --absent: var(--gray);
  --key-bg: #d3d6da;
  --key-text: #000000;
  --key-evaluated-text: #ffffff;
  --tile-text: #000000;
  --tile-evaluated-text: #ffffff;
  --modal-bg: #ffffff;
  --overlay: rgba(255, 255, 255, 0.5);
  --toast-bg: #000000;
  --toast-text: #ffffff;
  --hint: #c9b458;
  --landing-bg: #e3e3e1;
  --landing-btn-bg: #000000;
  --landing-btn-text: #ffffff;
  --header-height: 52px;
  --keyboard-height: 200px;
  --tile-font: 2rem;
  font-family: 'Clear Sans', 'Helvetica Neue', Arial, sans-serif;
}

body.dark {
  --tone-1: #ffffff;
  --tone-2: #818384;
  --tone-3: #565758;
  --tone-4: #3a3a3c;
  --tone-5: #272729;
  --tone-6: #1a1a1b;
  --tone-7: #121213;
  --bg: #121213;
  --text: #ffffff;
  --correct: #538d4e;
  --present: #b59f3b;
  --absent: #3a3a3c;
  --key-bg: #818384;
  --key-text: #ffffff;
  --tile-text: #ffffff;
  --modal-bg: #121213;
  --overlay: rgba(0, 0, 0, 0.5);
  --toast-bg: #ffffff;
  --toast-text: #000000;
  --hint: #b59f3b;
  --landing-bg: #1a1a1b;
  --landing-btn-bg: #ffffff;
  --landing-btn-text: #000000;
}

body.high-contrast {
  --correct: #f5793a;
  --present: #85c0f9;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
}

body {
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}

button {
  font-family: inherit;
  color: inherit;
}

#app {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
}

/* ---------- Header ---------- */
.header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: var(--header-height);
  padding: 0 12px;
  border-bottom: 1px solid var(--tone-4);
  flex-shrink: 0;
}

.header-side {
  display: flex;
  min-width: 0;
}

.header-right { justify-content: flex-end; }

.title {
  margin: 0;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 0.15rem;
  text-transform: uppercase;
  text-align: center;
  pointer-events: none;
  white-space: nowrap;
}

.icon-btn {
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 6px;
  display: flex;
  align-items: center;
}

.icon-btn svg {
  width: 26px;
  height: 26px;
  fill: var(--tone-3);
}

body.dark .icon-btn svg { fill: var(--tone-2); }
.icon-btn:hover svg { fill: var(--text); }

/* ---------- Game area ---------- */
#game {
  display: flex;
  flex-direction: column;
  flex: 1;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  min-height: 0;
}

.level-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px 0;
  min-height: 46px;
  flex-shrink: 0;
}

.level-label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--tone-2);
  border: 1px solid var(--tone-4);
  padding: 6px 12px;
  border-radius: 999px;
}

.level-label span { color: var(--text); }

.pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--tone-4);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 150ms, border-color 150ms, opacity 150ms;
}

.pill-btn:hover:not(:disabled) { background: var(--tone-5); }
.pill-btn:disabled { opacity: 0.45; cursor: default; }

.pill-btn svg { width: 18px; height: 18px; fill: var(--hint); }

.pill-btn.primary {
  background: var(--correct);
  border-color: var(--correct);
  color: #fff;
}

.pill-btn.primary:hover:not(:disabled) { background: var(--correct); filter: brightness(1.08); }

.hint-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--hint);
  color: #fff;
  font-size: 12px;
}

/* ---------- Hint panel ---------- */
#hint-panel {
  margin: 10px 12px 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--tone-6);
  border: 1px solid var(--tone-4);
  font-size: 14px;
  line-height: 1.35;
  flex-shrink: 0;
}

#hint-panel.reveal { animation: HintIn 300ms ease-out; }

.hint-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hint-row + .hint-row { margin-top: 8px; }

.hint-tag {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tone-2);
  min-width: 52px;
}

.mini-tiles { display: flex; gap: 4px; }

.mini-tile {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--tone-4);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.mini-tile.filled {
  background: var(--correct);
  border-color: var(--correct);
  color: #fff;
}

/* ---------- Board ---------- */
#board-container {
  display: flex;
  justify-content: center;
  align-items: center;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

#board {
  display: grid;
  grid-template-rows: repeat(6, 1fr);
  grid-gap: 5px;
  padding: 10px;
  width: 350px;
  height: 420px;
}

.row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-gap: 5px;
}

.row.invalid { animation: Shake 600ms; }

.tile {
  width: 100%;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  font-size: var(--tile-font);
  line-height: 1;
  font-weight: 700;
  vertical-align: middle;
  text-transform: uppercase;
  user-select: none;
  color: var(--tile-text);
  border: 2px solid var(--tone-4);
}

.tile[data-state='tbd'] {
  border-color: var(--tone-3);
}

.tile[data-state='correct'],
.tile[data-state='present'],
.tile[data-state='absent'] {
  color: var(--tile-evaluated-text);
}

.tile[data-state='correct'] { background: var(--correct); border-color: var(--correct); }
.tile[data-state='present'] { background: var(--present); border-color: var(--present); }
.tile[data-state='absent'] { background: var(--absent); border-color: var(--absent); }

.tile[data-animation='pop'] { animation: PopIn 100ms; }
.tile[data-animation='flip-in'] { animation: FlipIn 250ms ease-in forwards; }
.tile[data-animation='flip-out'] { animation: FlipOut 250ms ease-in; }
.tile[data-animation='win'] { animation: Bounce 1000ms; }

/* ---------- Keyboard ---------- */
#keyboard {
  height: var(--keyboard-height);
  margin: 0 8px 8px;
  user-select: none;
  flex-shrink: 0;
}

.kb-row {
  display: flex;
  width: 100%;
  margin: 0 auto 8px;
  touch-action: manipulation;
}

.key {
  font-family: inherit;
  font-weight: 700;
  border: 0;
  padding: 0;
  margin: 0 6px 0 0;
  height: 58px;
  border-radius: 4px;
  cursor: pointer;
  user-select: none;
  background: var(--key-bg);
  color: var(--key-text);
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  text-transform: uppercase;
  font-size: 1.25em;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0.3);
  transition: background-color 100ms;
}

.key:last-of-type { margin: 0; }
.key.wide { flex: 1.5; font-size: 12px; }
.key svg { width: 24px; height: 24px; fill: var(--key-text); }
.kb-spacer { flex: 0.5; }

.key[data-state='correct'] { background: var(--correct); color: var(--key-evaluated-text); }
.key[data-state='present'] { background: var(--present); color: var(--key-evaluated-text); }
.key[data-state='absent'] { background: var(--absent); color: var(--key-evaluated-text); }
body.dark .key[data-state='absent'] { background: #3a3a3c; }

/* ---------- Toasts ---------- */
#toaster {
  position: absolute;
  top: calc(var(--header-height) + 60px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 3000;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.toast {
  position: relative;
  margin: 6px;
  padding: 14px 16px;
  border-radius: 4px;
  background: var(--toast-bg);
  color: var(--toast-text);
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
  opacity: 1;
  transition: opacity 300ms cubic-bezier(0.645, 0.045, 0.355, 1);
}

.toast.fade { opacity: 0; }

/* ---------- Modals ---------- */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--overlay);
  animation: FadeIn 150ms ease-out;
}

.modal {
  position: relative;
  width: 90%;
  max-width: 500px;
  max-height: 90%;
  overflow-y: auto;
  padding: 16px 28px 28px;
  border-radius: 8px;
  border: 1px solid var(--tone-6);
  background: var(--modal-bg);
  color: var(--text);
  box-shadow: 0 4px 23px 0 rgba(0, 0, 0, 0.2);
  animation: SlideIn 200ms ease-out;
  outline: none;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.modal-close svg { width: 24px; height: 24px; fill: var(--tone-3); }

.modal h2 {
  margin: 16px 0 12px;
  font-size: 22px;
  font-weight: 800;
}

.modal h3 {
  margin: 20px 0 8px;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.modal p, .modal li { font-size: 15px; line-height: 1.45; }
.modal ul { padding-left: 20px; margin: 8px 0; }
.modal hr { border: none; border-top: 1px solid var(--tone-4); margin: 16px 0; }
.modal .subtle { color: var(--tone-2); font-size: 13px; }

.example { margin: 12px 0 4px; }
.example .tiles { display: flex; gap: 4px; margin-bottom: 6px; }
.example .tile {
  width: 36px;
  height: 36px;
  font-size: 20px;
}

/* Result modal */
.result { text-align: center; }
.result h2 { font-size: 26px; margin-top: 20px; }
.result .sub { color: var(--tone-2); margin: 0 0 16px; }
.answer-tiles { display: flex; justify-content: center; gap: 5px; margin: 8px 0 12px; }
.answer-tiles .tile { width: 48px; height: 48px; font-size: 26px; }
.answer-clue { font-style: italic; color: var(--tone-2); margin: 0 0 16px; }
.result-meta { display: flex; justify-content: center; gap: 22px; margin: 0 0 20px; }
.result-meta div { display: flex; flex-direction: column; align-items: center; }
.result-meta strong { font-size: 26px; }
.result-meta span { font-size: 12px; color: var(--tone-2); }

.actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 140px;
  height: 48px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid var(--tone-3);
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

.btn:hover { background: var(--tone-5); }

.btn.primary {
  background: var(--correct);
  border-color: var(--correct);
  color: #fff;
}

.btn.primary:hover { filter: brightness(1.08); }
.btn svg { width: 20px; height: 20px; fill: currentColor; }

/* Stats modal */
.stats-row {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-bottom: 8px;
}

.stat {
  flex: 1;
  max-width: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.stat .value { font-size: 32px; font-weight: 400; }
.stat .label { font-size: 12px; line-height: 1.2; }

.dist { width: 90%; margin: 0 auto; }
.dist-row { display: flex; align-items: center; height: 22px; margin-bottom: 5px; font-size: 14px; }
.dist-row .n { width: 14px; }
.dist-row .bar-wrap { flex: 1; height: 100%; padding-left: 4px; }
.dist-row .bar {
  height: 100%;
  min-width: 7%;
  padding: 0 8px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  background: var(--absent);
  color: #fff;
  font-weight: 700;
}
.dist-row .bar.highlight { background: var(--correct); }
.extra-stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 20px; margin-top: 16px; font-size: 14px; color: var(--tone-2); }
.extra-stats strong { color: var(--text); }

/* Settings modal */
.setting {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--tone-4);
  gap: 16px;
}

.setting .title-text { font-size: 18px; }
.setting .desc { font-size: 12px; color: var(--tone-2); margin-top: 2px; }

.switch {
  position: relative;
  flex-shrink: 0;
  width: 32px;
  height: 20px;
  padding: 2px;
  border: none;
  border-radius: 999px;
  background: var(--tone-3);
  cursor: pointer;
  transition: background 150ms;
}

.switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: transform 150ms;
}

.switch[aria-checked='true'] { background: var(--correct); }
.switch[aria-checked='true']::after { transform: translateX(12px); }
.switch:disabled { opacity: 0.5; cursor: not-allowed; }

.danger-link {
  background: none;
  border: none;
  color: #d9534f;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}

/* ---------- Animations ---------- */
@keyframes PopIn {
  from { transform: scale(0.8); opacity: 0; }
  40% { transform: scale(1.1); opacity: 1; }
}

@keyframes FlipIn {
  0% { transform: rotateX(0); }
  100% { transform: rotateX(-90deg); }
}

@keyframes FlipOut {
  0% { transform: rotateX(-90deg); }
  100% { transform: rotateX(0); }
}

@keyframes Shake {
  10%, 90% { transform: translateX(-1px); }
  20%, 80% { transform: translateX(2px); }
  30%, 50%, 70% { transform: translateX(-4px); }
  40%, 60% { transform: translateX(4px); }
}

@keyframes Bounce {
  0%, 20% { transform: translateY(0); }
  40% { transform: translateY(-30px); }
  50% { transform: translateY(5px); }
  60% { transform: translateY(-15px); }
  80% { transform: translateY(2px); }
  100% { transform: translateY(0); }
}

@keyframes SlideIn {
  from { transform: translateY(30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes FadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes HintIn {
  from { transform: translateY(-6px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@media (max-height: 640px) {
  :root { --keyboard-height: 170px; --header-height: 46px; }
  .key { height: 48px; }
}

@media (max-width: 480px) {
  .header { grid-template-columns: auto 1fr auto; padding: 0 8px; }
  .title { font-size: 26px; letter-spacing: 0.1rem; }
  .icon-btn { padding: 4px; }
}

@media (max-width: 400px) {
  .title { font-size: 22px; letter-spacing: 0.08rem; }
  .icon-btn { padding: 3px; }
  .icon-btn svg { width: 24px; height: 24px; }
}

@media (max-width: 360px) {
  .header { padding: 0 6px; }
  .title { font-size: 19px; letter-spacing: 0.04rem; }
  .icon-btn { padding: 2px; }
  .modal { padding: 16px 18px 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .tile[data-animation], .row.invalid, .overlay, .modal, #hint-panel.reveal { animation-duration: 1ms !important; }
}

/* ---------- Account & leaderboard ---------- */
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--correct);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}

.avatar.large { width: 64px; height: 64px; font-size: 30px; margin-top: 18px; }

.account { text-align: center; }
.account h2 { margin-top: 12px; }
.account p { margin: 8px 0; }

.gsi-container {
  display: flex;
  justify-content: center;
  min-height: 44px;
  margin: 18px 0 4px;
}

.link-btn {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-weight: 700;
  color: var(--correct);
  text-decoration: underline;
  cursor: pointer;
}

.center-text { text-align: center; }

.lb-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin-top: 6px;
}

.lb-table th {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--tone-2);
  padding: 6px 4px;
  border-bottom: 1px solid var(--tone-4);
  text-align: right;
}

.lb-table td {
  padding: 9px 4px;
  border-bottom: 1px solid var(--tone-5);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.lb-table th:first-child, .lb-table td.rank { text-align: center; width: 34px; }
.lb-table .name { text-align: left; overflow-wrap: anywhere; }
.lb-table td.pts { font-weight: 700; }
.lb-table tr.me td { background: var(--tone-6); font-weight: 700; }
.lb-table tr.gap td { text-align: center; color: var(--tone-2); border-bottom: none; padding: 2px; }

.you {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--correct);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  vertical-align: middle;
}

.lb-signin {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--tone-4);
  text-align: center;
}

.lb-signin p { margin: 0; font-size: 14px; }

/* ---------- Meanings & history ---------- */
.modal .meaning {
  margin: 6px 0;
  font-size: 14px;
  line-height: 1.45;
}

.modal .meaning .pos {
  margin-right: 6px;
  font-style: italic;
  color: var(--tone-2);
}

.modal .meaning .example {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  font-style: italic;
  color: var(--tone-2);
}

.result-meaning { margin: 0 4px 16px; }
.modal .result-meaning .meaning { font-size: 15px; }

.hist-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  text-align: left;
}

.modal .hist-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--tone-4);
}

.hist-item:last-child { border-bottom: none; }

.hist-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.hist-level {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tone-2);
  white-space: nowrap;
}

#hist-more { margin-top: 12px; }
#hist-more p { margin: 6px 0; }
.modal .hist-credit { margin-top: 14px; font-size: 11px; }
.hist-actions { margin-top: 16px; }
.modal .hist-link { margin: 14px 0 0; }

/* History lock badge on the header icon */
.lock-badge {
  display: none;
  position: absolute;
  right: 1px;
  bottom: 1px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg);
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.icon-btn .lock-badge svg { width: 11px; height: 11px; fill: var(--tone-2); }
#btn-history.locked .lock-badge { display: flex; }
#btn-history.locked svg.main { opacity: 0.45; }

/* ---------- Landing page ---------- */
#landing {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1500;
  overflow-y: auto;
  background: var(--landing-bg);
  color: var(--text);
}

html.landing #landing { display: flex; }

.landing-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 400px;
  margin: auto;
  padding: 32px 22px;
  text-align: center;
}

.landing-tiles {
  display: flex;
  gap: 5px;
  margin-bottom: 18px;
  perspective: 400px;
}

.landing-tiles .tile {
  width: 52px;
  height: 52px;
  font-size: 28px;
  animation: LandingFlip 600ms ease-in-out 400ms both, LandingReveal 300ms step-end 400ms backwards;
}

.landing-tiles .tile:nth-child(2) { animation-delay: 580ms, 580ms; }
.landing-tiles .tile:nth-child(3) { animation-delay: 760ms, 760ms; }
.landing-tiles .tile:nth-child(4) { animation-delay: 940ms, 940ms; }
.landing-tiles .tile:nth-child(5) { animation-delay: 1120ms, 1120ms; }

.landing-title {
  margin: 0 0 10px;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 44px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.landing-tagline {
  max-width: 330px;
  margin: 0;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 21px;
  line-height: 1.3;
}

.landing-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin: 28px 0 14px;
}

.landing-btn {
  width: 260px;
  height: 44px;
  border: none;
  border-radius: 999px;
  background: var(--landing-btn-bg);
  color: var(--landing-btn-text);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
}

.landing-btn:hover { filter: brightness(1.25); }
body.dark .landing-btn:hover { filter: brightness(0.9); }
.landing-btn:focus-visible { outline: 3px solid var(--correct); outline-offset: 3px; }

.landing-greeting {
  margin: 0 0 2px;
  font-size: 16px;
}

.landing-switch {
  font-size: 13px;
  font-weight: 400;
  color: var(--tone-2);
}

.landing-or {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--tone-2);
}

.landing-gsi { margin: 0; }
.landing-gsi p { margin: 10px 0 0; font-size: 13px; color: var(--tone-2); }

.landing-note {
  max-width: 300px;
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
  color: var(--tone-2);
}

.landing-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 14px;
  margin: 22px 0 6px;
  padding: 0;
  list-style: none;
  font-size: 13px;
  line-height: 1.3;
  text-align: left;
}

.landing-features li { display: flex; gap: 6px; align-items: flex-start; }
.landing-help { margin-top: 14px; font-size: 14px; color: var(--text); }

@keyframes LandingFlip {
  0% { transform: rotateX(0); }
  50% { transform: rotateX(-90deg); }
  100% { transform: rotateX(0); }
}

/* Holds the blank look until mid-flip, then the tile shows its color (step-end). */
@keyframes LandingReveal {
  from { background-color: transparent; border-color: var(--tone-3); color: var(--tile-text); }
}

@media (max-height: 640px) {
  .landing-inner { padding: 20px 18px; }
  .landing-tiles .tile { width: 44px; height: 44px; font-size: 24px; }
  .landing-title { font-size: 36px; margin-bottom: 6px; }
  .landing-tagline { font-size: 18px; }
  .landing-actions { margin: 18px 0 10px; }
  .landing-features { margin-top: 14px; gap: 6px 12px; font-size: 12px; }
  .landing-help { margin-top: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .landing-tiles .tile { animation: none; }
}
