/*! (c) 2026 Apex Infra. All rights reserved. Copying, republishing or hosting this work elsewhere is not permitted. */
/* Studio pages. Pale shallow water, deep-water ink, one coral mark.
   The game panel keeps the game's own night-desert colours. */
:root {
  --shallows: #DDF1EE;
  --foam: #F4FBFA;
  --deep: #0A3540;
  --kelp: #3F666E;
  --reef: #E8503F;
  --night: #0F1F33;
  --sand: #F3E6CC;
  --mist: #A9BCD0;
  --saffron: #F2A541;
  --font-display: "Reem Kufi", "Noto Kufi Arabic", "Segoe UI", Tahoma, sans-serif;
  --font-body: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  color: var(--deep);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-tap-highlight-color: transparent;
}

/* Language: both texts are in the page, and the page language decides which one shows. */
html[lang="en"] .t-ar,
html[lang="ar"] .t-en { display: none; }

.page {
  max-width: 600px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: 20px 20px 28px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--deep);
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  text-decoration: none;
}

.mark::before {
  content: "";
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--reef);
}

.lang {
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--deep);
  background: transparent;
  border: 0;
  border-radius: 10px;
  padding: 8px 14px;
  box-shadow: inset 0 0 0 1.5px #9CC7C5;
  cursor: pointer;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--deep);
  outline-offset: 3px;
  border-radius: 6px;
}

h1 {
  margin: 8px 0 0;
  font-family: var(--font-display);
  font-size: clamp(34px, 9vw, 52px);
  font-weight: 700;
  line-height: 1.12;
  text-wrap: balance;
}

html[lang="ar"] h1 { line-height: 1.35; }

/* The game panel */
.game {
  border-radius: 22px;
  padding: 26px 22px 24px;
  background: var(--night);
  color: var(--sand);
}

.game a:focus-visible { outline-color: var(--sand); }

.merge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin: 0 0 24px;
  container-type: inline-size;
}

.merge .tile {
  flex: 0 0 25%;
  aspect-ratio: 1;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5cqw;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.3);
}

.merge .glyph { font-size: 11cqw; line-height: 1; }

.merge .name {
  font-family: var(--font-display);
  font-size: 4.2cqw;
  font-weight: 700;
  line-height: 1.1;
}

.merge .sign {
  font-family: var(--font-display);
  font-size: 8cqw;
  font-weight: 700;
  line-height: 1;
  color: var(--saffron);
}

.tile.palm { background: #CFE3B4; color: #24401C; }
.tile.coffee { background: #D9B38C; color: #40270F; animation: pop 420ms 500ms ease-out both; }

@keyframes pop {
  0% { transform: scale(0.5); opacity: 0; }
  60% { transform: scale(1.12); opacity: 1; }
  100% { transform: none; opacity: 1; }
}

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

.game h2 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  line-height: 1.25;
}

.game p { margin: 0; max-width: 44ch; }
.game .facts { margin-top: 6px; font-size: 14px; color: var(--mist); }

.play {
  display: inline-block;
  margin-top: 20px;
  padding: 13px 24px;
  border-radius: 12px;
  background: var(--saffron);
  color: #2B1B00;
  font-weight: 600;
  text-decoration: none;
}

.soon { margin: -10px 0 0; color: var(--kelp); }

.foot {
  margin-top: auto;
  padding-top: 18px;
  border-top: 1.5px solid #B9DEDB;
  font-size: 13.5px;
  color: var(--kelp);
}

.foot p { margin: 0 0 4px; }
.foot a, .text a { color: var(--deep); text-underline-offset: 3px; }

/* Text pages: privacy, not found */
.text h1 { font-size: clamp(30px, 8vw, 42px); }
.text h2 {
  margin: 26px 0 4px;
  font-size: 17px;
  font-weight: 600;
}
.text p { margin: 0 0 8px; max-width: 62ch; }
.text .updated { margin-top: 6px; color: var(--kelp); font-size: 14px; }

/* Small Arabic labels read better in the text face than in the display face. */
html[lang="ar"] .merge .name { font-family: var(--font-body); font-weight: 600; font-size: 4.8cqw; }
