:root {
  --bg-1: #fff2e8;
  --bg-2: #ffe3cc;
  --ink: #221a16;
  --muted: #5f5044;
  --line: #ebcfb5;
  --panel: rgba(255, 252, 248, 0.9);
  --accent: #ff6a3e;
  --accent-2: #ffba43;
  --shadow: 0 20px 44px rgba(78, 45, 20, 0.16);
}

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

body {
  margin: 0;
  color: var(--ink);
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 12% -5%, rgba(255, 154, 102, 0.35) 0%, transparent 36%),
    radial-gradient(circle at 88% 8%, rgba(255, 198, 124, 0.3) 0%, transparent 40%),
    linear-gradient(150deg, var(--bg-1), var(--bg-2));
}

#ours-page {
  max-width: 76rem;
  margin: 0 auto;
  padding: 1.2rem 1rem 2rem;
}

#ours-page.is-preload {
  opacity: 0;
  transform: translateY(8px);
}

#ours-page.is-ready {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 420ms ease, transform 420ms ease;
}

#romanceIntroOverlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  opacity: 1;
  transition: opacity 360ms ease;
}

#romanceIntroOverlay.is-hidden {
  opacity: 0;
}

.romance-sky {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 16%, rgba(255, 143, 164, 0.32), transparent 38%),
    radial-gradient(circle at 80% 22%, rgba(255, 109, 81, 0.28), transparent 35%),
    radial-gradient(circle at 54% 66%, rgba(255, 190, 138, 0.32), transparent 48%),
    linear-gradient(170deg, #fff4ed, #ffd8cc);
}

.romance-bursts,
.romance-hearts {
  position: absolute;
  inset: 0;
}

.romance-burst,
.romance-heart {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.romance-burst {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 2px solid rgba(255, 122, 88, 0.65);
  animation: romanceBurst 1300ms ease-out forwards;
}

.romance-heart {
  color: rgba(229, 44, 85, 0.84);
  font-size: 1.2rem;
  animation: romanceHeartFloat 2000ms ease-out forwards;
}

.top-links {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.8rem;
}

.back-link {
  display: inline-block;
  text-decoration: none;
  color: var(--muted);
  font-size: 0.92rem;
}

.back-link:hover,
.back-link:focus-visible {
  color: var(--accent);
  text-decoration: underline;
}

.logout-link {
  display: inline-block;
  text-decoration: none;
  color: #8f5f47;
  font-size: 0.88rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.logout-link:hover,
.logout-link:focus-visible {
  color: var(--accent);
  text-decoration: underline;
}

.hero-card {
  border: 1px solid var(--line);
  border-radius: 1.3rem;
  background:
    radial-gradient(circle at 84% 16%, rgba(255, 173, 149, 0.26), transparent 42%),
    radial-gradient(circle at 18% 84%, rgba(255, 190, 146, 0.22), transparent 44%),
    linear-gradient(170deg, rgba(255, 255, 255, 0.96), rgba(255, 245, 239, 0.92));
  box-shadow: var(--shadow);
  padding: clamp(1.1rem, 2.1vw, 1.8rem);
  position: relative;
  overflow: hidden;
}

.hero-card:before,
.hero-card:after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}

.hero-card:before {
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(255, 186, 120, 0.35), transparent 72%);
  top: -60px;
  right: -30px;
}

.hero-card:after {
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, rgba(255, 124, 82, 0.26), transparent 72%);
  bottom: -50px;
  left: -35px;
}

.hero-topper {
  margin: 0 0 0.35rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  font-weight: 700;
}

h1,
h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
}

h3 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.1rem;
}

h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 0.55rem;
}

h2 {
  font-size: clamp(1.3rem, 2.3vw, 1.7rem);
}

.hero-note {
  min-height: 1.25rem;
  margin: 0 0 0.95rem;
  color: var(--muted);
  font-size: 1rem;
}

.hero-letter-body {
  border: 1px solid rgba(236, 194, 167, 0.9);
  border-radius: 1rem;
  background: rgba(255, 250, 246, 0.78);
  padding: 0.95rem 1rem;
}

.hero-letter-body .letter-paragraph {
  margin-top: 0.58rem;
}

.hero-letter-body .letter-paragraph:first-child {
  margin-top: 0;
}

.timer-duo {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 0.95rem;
}

.timer-panel {
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.82);
  padding: 0.95rem;
}

.timer-panel--elapsed {
  border-color: #c9e5b9;
}

.timer-panel--countdown {
  border-color: #f0c2b6;
}

.timer-heading-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.timer-direction {
  font-size: 1.2rem;
  line-height: 1;
  font-weight: 700;
}

.timer-direction--up {
  color: #4f9d3a;
}

.timer-direction--down {
  color: #d5603f;
}

.timer-grid {
  margin-top: 0.7rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(70px, 1fr));
  gap: 0.6rem;
}

.tile {
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  text-align: center;
  padding: 0.8rem 0.3rem 0.6rem;
  background: linear-gradient(180deg, #fffefc, #fff3e8);
}

.tile span {
  display: block;
  font-size: clamp(1.25rem, 2.3vw, 1.85rem);
  font-weight: 800;
  letter-spacing: 0.02em;
}

.tile small {
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.subtext {
  margin: 0.7rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.reveal-card {
  margin-top: 1rem;
}

.cta-btn {
  border: 0;
  border-radius: 999px;
  background: linear-gradient(160deg, var(--accent), #ff855e);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 0.62rem 1.08rem;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(200, 87, 50, 0.24);
}

.cta-btn:hover,
.cta-btn:focus-visible {
  filter: brightness(1.03);
}

.letter-panel {
  margin-top: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 0.95rem;
  background: linear-gradient(170deg, #fffef9, #fff6ec);
  box-shadow: 0 12px 28px rgba(86, 53, 24, 0.14);
  padding: 1rem;
}

.letter-open {
  animation: fadeUp 240ms ease-out;
}

.letter-paragraph {
  margin: 0.68rem 0 0;
  color: #40362f;
  line-height: 1.55;
}

.layout-grid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 1rem;
}

.flight-surface {
  margin-top: 1rem;
}

.flight-help {
  margin-top: 0.28rem;
}

.flight-map {
  width: 100%;
  height: auto;
  margin-top: 0.62rem;
  border: 1px solid rgba(235, 194, 166, 0.9);
  border-radius: 1rem;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.7), transparent 45%),
    linear-gradient(180deg, rgba(255, 251, 247, 0.9), rgba(255, 244, 237, 0.9));
}

.flight-map-country {
  fill: rgba(246, 218, 191, 0.82);
  stroke: rgba(216, 165, 133, 0.75);
  stroke-width: 0.9;
}

.flight-inset-frame {
  fill: rgba(255, 246, 237, 0.84);
  stroke: rgba(200, 133, 95, 0.92);
  stroke-width: 1.6;
  rx: 10;
  ry: 10;
}

.flight-inset-connector {
  stroke: rgba(200, 133, 95, 0.78);
  stroke-width: 1.3;
  stroke-dasharray: 4 4;
}

.flight-inset-label {
  fill: #7a5643;
  font-size: 12px;
  font-weight: 700;
}

.flight-route-guide {
  fill: none;
  stroke: rgba(210, 126, 102, 0.45);
  stroke-width: 3.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 8 7;
}

.flight-route-trail {
  fill: none;
  stroke: #e6524d;
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.flight-route-guide[data-mode="plane"] {
  stroke: rgba(231, 102, 81, 0.38);
}

.flight-route-trail[data-mode="plane"] {
  stroke: #e6524d;
}

.flight-route-guide[data-mode="train"] {
  stroke: rgba(79, 129, 198, 0.42);
}

.flight-route-trail[data-mode="train"] {
  stroke: #4f81c6;
}

.flight-route-guide[data-mode="bus"] {
  stroke: rgba(161, 120, 46, 0.42);
}

.flight-route-trail[data-mode="bus"] {
  stroke: #a1782e;
}

.flight-route-guide[data-mode="car"] {
  stroke: rgba(70, 132, 82, 0.42);
}

.flight-route-trail[data-mode="car"] {
  stroke: #4d8b58;
}

.flight-point {
  fill: #f15b53;
  stroke: #fff6ef;
  stroke-width: 2;
}

.flight-label {
  fill: #6f4f3d;
  font-size: 15px;
  font-weight: 700;
}

.flight-vehicle-emoji {
  font-size: 32px;
  text-anchor: middle;
  dominant-baseline: middle;
  paint-order: stroke;
  stroke: rgba(255, 246, 237, 0.85);
  stroke-width: 1.8;
}

.flight-heart-pop {
  fill: #d83d5d;
  font-size: 18px;
  text-anchor: middle;
  dominant-baseline: middle;
  animation: flightHeartPop 860ms ease-out forwards;
}

.flight-status {
  margin-top: 0.55rem;
}

.surface {
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: rgba(255, 252, 247, 0.9);
  box-shadow: var(--shadow);
  padding: 1rem;
}

.gallery-grid {
  margin-top: 0.8rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 0.8rem;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 190ms ease, transform 190ms ease;
}

.gallery-grid.is-leaving {
  opacity: 0;
  transform: translateY(8px);
}

.gallery-grid.is-entering .polaroid {
  animation: galleryCardIn 280ms ease both;
}

.gallery-grid.is-entering .polaroid:nth-child(1) {
  animation-delay: 20ms;
}

.gallery-grid.is-entering .polaroid:nth-child(2) {
  animation-delay: 60ms;
}

.gallery-grid.is-entering .polaroid:nth-child(3) {
  animation-delay: 100ms;
}

.gallery-grid.is-entering .polaroid:nth-child(4) {
  animation-delay: 140ms;
}

.gallery-status {
  min-height: 1.1rem;
}

.gallery-next-btn {
  margin-top: 0.55rem;
  border: 0;
  border-radius: 0.78rem;
  background: linear-gradient(160deg, var(--accent-2), #ffc964);
  color: #33261f;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0.58rem 0.9rem;
  cursor: pointer;
  box-shadow: 0 8px 16px rgba(113, 74, 14, 0.18);
}

.gallery-next-btn:hover,
.gallery-next-btn:focus-visible {
  filter: brightness(1.03);
}

.polaroid {
  margin: 0;
  background: #fff;
  border: 1px solid #e8d7c8;
  border-radius: 0.35rem;
  padding: 0.42rem 0.42rem 0.7rem;
  transform: rotate(var(--twist, 0deg));
  box-shadow: 0 10px 24px rgba(66, 43, 25, 0.18);
}

.polaroid img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background: #f6eee5;
  border-radius: 0.2rem;
  display: block;
}

.polaroid figcaption {
  margin-top: 0.45rem;
  text-align: center;
  font-size: 0.84rem;
  color: var(--muted);
}

.reasons-grid {
  margin-top: 0.6rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 0.6rem;
}

.reason-card {
  min-height: 76px;
  border: 1px solid #ebd6c3;
  border-radius: 0.8rem;
  background: linear-gradient(165deg, #fffdf9, #fff5ea);
  color: #2f2620;
  font-size: 0.92rem;
  padding: 0.6rem;
  text-align: left;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.2s ease;
}

.reason-card:hover,
.reason-card:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 9px 20px rgba(74, 47, 24, 0.16);
}

.reason-card.is-open {
  border-color: var(--accent-2);
  background: linear-gradient(165deg, #fff8eb, #ffefd6);
}

.rankle-surface {
  margin-top: 1rem;
}

.rankle-boundary {
  width: fit-content;
  margin: 0.5rem auto;
  border: 1px solid #e6d5c5;
  background: #fff8f0;
  border-radius: 0.5rem;
  padding: 0.32rem 0.58rem;
  color: #5b4a3f;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.rankle-boundary--top {
  margin-top: 0.9rem;
}

.rankle-track {
  display: grid;
  grid-template-columns: 66px 1fr;
  gap: 0.65rem;
  align-items: stretch;
}

.rankle-year-rail {
  position: relative;
  border-right: 1px solid #eddcc9;
  margin-right: 0.25rem;
}

.rankle-year-marker {
  position: absolute;
  right: -1px;
  width: 58px;
  transform: translateY(-50%);
  text-align: right;
  pointer-events: none;
}

.rankle-year-line {
  display: inline-block;
  width: 28px;
  height: 1px;
  background: #dcc6b1;
  margin-right: 0.35rem;
  vertical-align: middle;
}

.rankle-year-label {
  font-size: 0.72rem;
  color: #8b7565;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 700;
}

.rankle-list {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.45rem;
  position: relative;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

.rankle-card {
  position: relative;
  width: 100%;
  text-align: center;
  border: 1px solid #eedfce;
  border-radius: 0.75rem;
  background: linear-gradient(165deg, #fffefb, #fffaf4);
  color: #2d241f;
  padding: 0.62rem 0.72rem;
  cursor: grab;
  transition:
    transform 360ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 200ms ease,
    border-color 220ms ease,
    background 220ms ease;
  box-shadow: 0 6px 12px rgba(72, 46, 25, 0.08);
  touch-action: none;
}

.rankle-card:hover,
.rankle-card:focus-visible {
  border-color: #e4c3a6;
  box-shadow: 0 10px 19px rgba(72, 46, 25, 0.12);
}

.rankle-card.is-dragging {
  cursor: grabbing;
  box-shadow: 0 20px 34px rgba(60, 37, 20, 0.22);
  z-index: 40;
}

.rankle-card.is-locked {
  cursor: default;
  border-color: #79bb7e;
  background: linear-gradient(165deg, #f2fff1, #dcf7d8);
  box-shadow: 0 10px 22px rgba(40, 118, 45, 0.18);
}

.rankle-card.is-lock-hit {
  animation: rankleLockHit 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

.rankle-card.is-checking {
  animation: ranklePulse 220ms ease;
}

.rankle-card.is-wrong {
  animation: rankleShake 280ms ease;
}

.rankle-card--placeholder {
  border: 1px dashed #dfb995;
  border-radius: 0.75rem;
  background: rgba(255, 237, 219, 0.55);
}

.rankle-card-main {
  display: block;
  font-size: 0.95rem;
  line-height: 1.35;
  font-weight: 700;
  text-align: center;
}

.rankle-card-date {
  display: block;
  margin-top: 0.45rem;
  font-size: 0.8rem;
  color: #2e7332;
  font-weight: 700;
  text-align: center;
  opacity: 0;
  transform: translateY(8px);
}

.rankle-card-check {
  position: absolute;
  top: 0.42rem;
  right: 0.5rem;
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 999px;
  background: #4ca95b;
  color: #fff;
  font-size: 0.72rem;
  line-height: 1.05rem;
  font-weight: 700;
  opacity: 0;
  transform: scale(0.7);
}

.rankle-card.is-locked .rankle-card-check {
  opacity: 1;
}

.rankle-card.is-lock-hit .rankle-card-check {
  animation: rankleCheckPop 380ms cubic-bezier(0.22, 1, 0.36, 1);
}

.rankle-list.is-solved .rankle-card-date {
  animation: fadeUp 320ms ease forwards;
  animation-delay: var(--reveal-delay, 0ms);
}

.rankle-actions {
  margin-top: 0.95rem;
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.rankle-reset-btn {
  min-width: 110px;
}

.rankle-status {
  min-height: 1.2rem;
}

.timeline-surface {
  margin-top: 1rem;
}

.arcade-surface {
  margin-top: 1rem;
  --arcade-h: clamp(260px, 46vh, 420px);
}

.arcade-help {
  margin-bottom: 0.75rem;
}

.arcade-duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  align-items: start;
}

.arcade-card {
  border: 1px solid #ebd7c2;
  border-radius: 0.8rem;
  background: rgba(255, 253, 249, 0.95);
  padding: 0.8rem;
}

.arcade-canvas-wrap {
  border: 1px solid #edd8c2;
  border-radius: 0.9rem;
  background: linear-gradient(180deg, #fffdf8, #fff6eb);
  padding: 0.65rem;
}

.arcade-canvas {
  display: block;
  max-width: 100%;
  margin: 0 auto;
  border: 1px solid #e8d7c5;
  border-radius: 0.65rem;
  background: #fffaf0;
  outline: none;
}

.arcade-canvas--snake {
  width: min(100%, var(--arcade-h));
  height: min(100%, var(--arcade-h));
}

.arcade-canvas--tetris {
  width: min(100%, calc(var(--arcade-h) / 2));
  height: min(100%, var(--arcade-h));
}

.arcade-canvas--tetris.is-line-clear {
  animation: tetrisLineClearFlash 320ms ease;
}

.arcade-canvas--tetris.is-tetris-clear {
  animation: tetrisMegaClear 520ms cubic-bezier(0.22, 1, 0.36, 1);
}

.arcade-canvas:focus-visible {
  box-shadow: 0 0 0 3px rgba(255, 133, 94, 0.38);
}

.tetris-meta {
  margin-top: 0.55rem;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.7rem;
  align-items: center;
}

.tetris-next-wrap {
  border: 1px solid #ead3bd;
  border-radius: 0.7rem;
  background: #fff9f2;
  padding: 0.45rem;
}

.tetris-next-label {
  margin-top: 0;
  margin-bottom: 0.35rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.tetris-next-canvas {
  width: 88px;
  height: 88px;
  display: block;
  border: 1px solid #ecd8c4;
  border-radius: 0.45rem;
  background: #fffdf9;
}

.arcade-stats {
  margin-top: 0.65rem;
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  color: #4f4035;
  font-size: 0.88rem;
  font-weight: 700;
}

.arcade-status {
  min-height: 1.2rem;
}

.arcade-actions {
  margin-top: 0.55rem;
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.snake-controls {
  margin-top: 0.55rem;
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.snake-control {
  display: grid;
  gap: 0.22rem;
  font-size: 0.8rem;
  color: #5a4b40;
  font-weight: 700;
}

.snake-control input[type="range"] {
  width: 132px;
}

.snake-control select {
  border: 1px solid #dcc0a6;
  border-radius: 0.5rem;
  background: #fffaf2;
  color: #3d2f26;
  font-size: 0.82rem;
  padding: 0.28rem 0.35rem;
}

.mobadle-surface {
  margin-top: 1rem;
}

.mobadle-board {
  margin-top: 0.7rem;
  display: grid;
  gap: 0.45rem;
}

.mobadle-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(42px, 56px));
  gap: 0.45rem;
  justify-content: center;
  perspective: 600px;
}

.mobadle-cell {
  height: 52px;
  border: 1px solid #e4d2bf;
  border-radius: 0.55rem;
  background: #fffdf9;
  color: #2f2620;
  font-weight: 800;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
  transform-origin: center;
}

.mobadle-cell.is-typing {
  animation: mobadlePop 170ms ease-out;
}

.mobadle-cell.is-correct {
  background: #67b66e;
  border-color: #67b66e;
  color: #fff;
}

.mobadle-cell.is-present {
  background: #d9b451;
  border-color: #d9b451;
  color: #fff;
}

.mobadle-cell.is-absent {
  background: #8f8073;
  border-color: #8f8073;
  color: #fff;
}

.mobadle-entry {
  margin-top: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
}

.mobadle-status {
  min-height: 1.2rem;
}

.mobadle-keyboard {
  margin-top: 0.75rem;
  display: grid;
  gap: 0.35rem;
}

.mobadle-keyboard-row {
  display: flex;
  justify-content: center;
  gap: 0.35rem;
}

.mobadle-key {
  border: 1px solid #e2cdb8;
  border-radius: 0.45rem;
  background: #fff9f1;
  color: #3a2f28;
  font-size: 0.8rem;
  font-weight: 700;
  min-width: 36px;
  height: 40px;
  padding: 0 0.45rem;
  cursor: pointer;
}

.mobadle-key--action {
  min-width: 68px;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
}

.mobadle-key:hover,
.mobadle-key:focus-visible {
  filter: brightness(1.03);
}

.mobadle-key.is-correct {
  background: #67b66e;
  border-color: #67b66e;
  color: #fff;
}

.mobadle-key.is-present {
  background: #d9b451;
  border-color: #d9b451;
  color: #fff;
}

.mobadle-key.is-absent {
  background: #8f8073;
  border-color: #8f8073;
  color: #fff;
}

.mobadle-cell.is-revealing {
  animation: mobadleFlipReveal 600ms ease;
}

.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;
}

.timeline {
  margin-top: 0.75rem;
  display: grid;
  gap: 0.75rem;
}

.timeline-row {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 0.85rem;
  align-items: start;
}

.timeline--animated .timeline-row {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 320ms ease, transform 320ms ease;
}

.timeline--animated .timeline-row.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.timeline-date {
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding-top: 0.2rem;
}

.timeline-block {
  border-left: 3px solid #f2c49a;
  padding-left: 0.75rem;
}

.timeline-block h3 {
  margin: 0;
  font-size: 1rem;
  font-family: Georgia, "Times New Roman", serif;
}

.timeline-block p {
  margin: 0.3rem 0 0;
  color: var(--muted);
  line-height: 1.45;
}

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

@keyframes galleryCardIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985) rotate(var(--twist, 0deg));
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1) rotate(var(--twist, 0deg));
  }
}

@keyframes rankleShake {
  0% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-4px);
  }
  40% {
    transform: translateX(4px);
  }
  60% {
    transform: translateX(-3px);
  }
  80% {
    transform: translateX(3px);
  }
  100% {
    transform: translateX(0);
  }
}

@keyframes ranklePulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.018);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes rankleCheckPop {
  0% {
    transform: scale(0.65);
  }
  62% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes rankleLockHit {
  0% {
    box-shadow: 0 10px 22px rgba(40, 118, 45, 0.18);
    border-color: #79bb7e;
  }
  45% {
    box-shadow: 0 0 0 6px rgba(103, 194, 111, 0.14), 0 16px 30px rgba(40, 118, 45, 0.22);
    border-color: #5faa65;
  }
  100% {
    box-shadow: 0 10px 22px rgba(40, 118, 45, 0.18);
    border-color: #79bb7e;
  }
}

@keyframes mobadlePop {
  0% {
    transform: scale(1);
  }
  45% {
    transform: scale(1.06);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes mobadleFlipReveal {
  0% {
    transform: rotateX(0deg) scale(1);
  }
  45% {
    transform: rotateX(88deg) scale(1.02);
  }
  100% {
    transform: rotateX(0deg) scale(1);
  }
}

@keyframes romanceBurst {
  0% {
    transform: scale(0.2);
    opacity: 0;
  }
  22% {
    opacity: 0.85;
  }
  100% {
    transform: scale(7.8);
    opacity: 0;
  }
}

@keyframes romanceHeartFloat {
  0% {
    transform: translateY(0) scale(0.78);
    opacity: 0;
  }
  20% {
    opacity: 0.9;
  }
  100% {
    transform: translateY(-92px) scale(1.22);
    opacity: 0;
  }
}

@keyframes flightHeartPop {
  0% {
    transform: translateY(0) scale(0.6);
    opacity: 0;
  }
  35% {
    transform: translateY(-16px) scale(1.08);
    opacity: 1;
  }
  100% {
    transform: translateY(-42px) scale(1);
    opacity: 0;
  }
}

@keyframes tetrisLineClearFlash {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 221, 120, 0.35);
    filter: brightness(1);
  }
  45% {
    box-shadow: 0 0 0 6px rgba(255, 221, 120, 0.28);
    filter: brightness(1.08);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 221, 120, 0);
    filter: brightness(1);
  }
}

@keyframes tetrisMegaClear {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 140, 110, 0.26);
    filter: brightness(1);
  }
  35% {
    box-shadow: 0 0 0 10px rgba(255, 140, 110, 0.24);
    filter: brightness(1.14);
  }
  70% {
    box-shadow: 0 0 0 6px rgba(255, 210, 125, 0.2);
    filter: brightness(1.07);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 210, 125, 0);
    filter: brightness(1);
  }
}

@media only screen and (max-width: 980px) {
  .layout-grid {
    grid-template-columns: 1fr;
  }

  .timer-duo {
    grid-template-columns: 1fr;
  }

  .arcade-surface {
    --arcade-h: clamp(220px, 40vh, 340px);
  }

  .arcade-duo {
    grid-template-columns: 1fr;
  }
}

@media only screen and (max-width: 700px) {
  .top-links {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }

  .timer-grid {
    grid-template-columns: repeat(2, minmax(90px, 1fr));
  }

  .reasons-grid {
    grid-template-columns: 1fr;
  }

  .timeline-row {
    grid-template-columns: 1fr;
    gap: 0.3rem;
  }

  .rankle-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .rankle-track {
    grid-template-columns: 1fr;
  }

  .rankle-year-rail {
    display: none;
  }

  .arcade-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .snake-controls {
    flex-direction: column;
    align-items: flex-start;
  }

  .mobadle-entry {
    justify-content: center;
    align-items: center;
  }

  .mobadle-key {
    min-width: 30px;
    height: 36px;
    font-size: 0.74rem;
    padding: 0 0.34rem;
  }

  .mobadle-key--action {
    min-width: 54px;
    font-size: 0.62rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .timeline--animated .timeline-row {
    opacity: 1;
    transform: none;
  }

  * {
    animation: none !important;
    transition: none !important;
  }
}
