/* MTIR — styled after the GoodHand menus: dark rounded sheets over the island, grey rows with an icon tile,
   one yellow primary row, small uppercase section labels. */

:root {
  --sea: #10243b;
  --sheet: #1b222b;
  --sheet-line: rgba(255, 255, 255, 0.08);
  --row: #44484f;
  --row-line: rgba(255, 255, 255, 0.10);
  --tile: #5a5e66;
  --gold: #e6c564;
  --gold-ink: #23201a;
  --text: #f2f3f5;
  --muted: #a3a8b0;
  --radius-sheet: 34px;
  --radius-row: 22px;
}

* { box-sizing: border-box; }

html { background: var(--sea); }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font: 17px/1.5 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* The island stays still behind the sheets (a fixed layer: iPhone Safari ignores background-attachment: fixed). */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to bottom, rgba(16, 36, 59, 0) 0, rgba(16, 36, 59, 0) 45%, var(--sea) 100%),
    url("/assets/island.jpg") center top / cover no-repeat;
}

a { color: inherit; }

.screen {
  max-width: 480px;
  min-height: 100vh;
  margin: 0 auto;
  padding: max(20px, env(safe-area-inset-top)) 18px max(24px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
}

/* Home: the title floats on the island, the menu sheet sits low like in the game. */
.title {
  text-align: center;
  padding: 11vh 0 0;
  flex: 1;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.45);
}

.title h1 {
  margin: 0;
  font-size: 64px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.title p {
  margin: 14px 0 0;
  font-size: 20px;
  color: rgba(255, 255, 255, 0.88);
}

.sheet {
  background: var(--sheet);
  border: 1px solid var(--sheet-line);
  border-radius: var(--radius-sheet);
  padding: 22px 20px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

.sheet + .sheet { margin-top: 14px; }

/* Menu rows */
.row {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 74px;
  padding: 8px 18px 8px 8px;
  background: var(--row);
  border: 1px solid var(--row-line);
  border-radius: var(--radius-row);
  text-decoration: none;
  font-size: 19px;
  font-weight: 600;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.12s ease, filter 0.12s ease;
}

.row:hover { filter: brightness(1.08); }
.row:active { transform: scale(0.98); }

.row + .row, .note + .row { margin-top: 12px; }

.row .tile {
  width: 58px;
  height: 58px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: var(--tile);
  border: 1px solid var(--row-line);
  overflow: hidden;
}

.row .tile img { width: 100%; height: 100%; display: block; }
.row .tile svg { width: 26px; height: 26px; }

.row .label { flex: 1; }
.row .chev { color: var(--muted); font-size: 22px; font-weight: 400; }

.row.gold {
  background: var(--gold);
  color: var(--gold-ink);
  border-color: transparent;
}

.row.gold .tile { background: #f4e3b0; border-color: transparent; }
.row.gold .chev { color: rgba(35, 32, 26, 0.55); }

.note {
  margin: 10px 0 0;
  text-align: center;
  font-size: 15px;
  color: var(--muted);
}

/* Inner pages: a header bar with a round close button, then a sheet with sections. */
.bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  background: var(--sheet);
  border: 1px solid var(--sheet-line);
  border-radius: 30px;
  margin-bottom: 14px;
}

.bar h1 { margin: 0; font-size: 28px; font-weight: 800; line-height: 1.1; }

.close {
  width: 50px;
  height: 50px;
  flex: none;
  display: grid;
  place-items: center;
  background: var(--row);
  border: 1px solid var(--row-line);
  border-radius: 16px;
  text-decoration: none;
}

.close svg { width: 22px; height: 22px; }

.section {
  margin: 26px 0 10px;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.section:first-child { margin-top: 6px; }

.sheet p { margin: 0 0 14px; color: #d5d8dd; }
.sheet p:last-child { margin-bottom: 0; }
.sheet p.dim { color: var(--muted); font-size: 15px; }
.sheet strong { color: var(--text); }
.sheet a { color: var(--gold); text-decoration: none; }
.sheet .row { color: var(--text); }
.sheet .row.gold { color: var(--gold-ink); }

/* Option chips, like the settings choices */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }

.chips span {
  padding: 9px 16px;
  background: var(--row);
  border: 1px solid var(--row-line);
  border-radius: 16px;
  font-size: 16px;
}

.chips span.on { background: var(--gold); color: var(--gold-ink); border-color: transparent; }

/* Screenshots scroll sideways inside the sheet */
.shots {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  margin: 0 -20px;
  padding: 0 20px 4px;
  scrollbar-width: none;
}

.shots::-webkit-scrollbar { display: none; }

.shots img {
  width: 62%;
  flex: none;
  height: auto;
  border-radius: 20px;
  scroll-snap-align: start;
  border: 1px solid var(--row-line);
}

.game-head { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.game-head img { width: 76px; height: 76px; border-radius: 20px; }
.game-head h2 { margin: 0; font-size: 22px; line-height: 1.2; }
.game-head p { margin: 4px 0 0; font-size: 15px; color: var(--muted); }

.legal {
  margin-top: 18px;
  text-align: center;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
}

@media (min-width: 900px) {
  .title { padding-top: 14vh; }
}
