:root {
  --water: #07131c;
  --ice: rgba(214, 228, 236, 0.92);
  --quiet: rgba(214, 228, 236, 0.45);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
}

body {
  background:
    radial-gradient(ellipse at 50% 38%, rgba(150, 190, 210, 0.08), transparent 55%),
    var(--water);
  color: var(--ice);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 300;
}

.thought {
  position: absolute;
  left: 8vw;
  bottom: 12vh;
  max-width: 16em;
  margin: 0;
  font-size: 1.75rem;
  line-height: 1.35;
  letter-spacing: 0.01em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: opacity 420ms ease;
}

.thought[data-long="true"] { font-size: 1.45rem; }
.thought.is-out { opacity: 0; }

.edge {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 16.666%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: transparent;
  cursor: default;
  touch-action: pan-y;
  -webkit-tap-highlight-color: transparent;
}

.edge-older { left: 0; }
.edge-newer { right: 0; top: 72px; }
.edge:disabled { pointer-events: none; }

.mark {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 0;
  background: transparent;
  color: var(--ice);
  opacity: 0;
  cursor: default;
  transition: opacity 280ms ease;
  -webkit-tap-highlight-color: transparent;
}

a.mark { display: block; }

.mark svg { display: block; width: 100%; height: 100%; }
.mark.is-awake { opacity: 1; }

.menu {
  position: absolute;
  top: 68px;
  right: 28px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.7rem;
  font-size: 1rem;
}

.menu[hidden] { display: none; }

.menu a {
  color: var(--quiet);
  text-decoration: none;
}

.menu a[aria-current="page"] { color: var(--ice); }

.sisters, .ripples { position: absolute; inset: 0; pointer-events: none; }

.sister {
  position: absolute;
  width: 5px;
  height: 5px;
  margin: -2.5px 0 0 -2.5px;
  border-radius: 50%;
  background: rgba(226, 238, 244, 0.95);
  box-shadow: 0 0 10px rgba(190, 220, 232, 0.85);
}

.burst { position: absolute; width: 0; height: 0; }

.burst i {
  position: absolute;
  left: 0;
  top: 0;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border: 1px solid rgba(198, 222, 232, 0.7);
  border-radius: 50%;
  animation: ring var(--fade) ease-out both;
}

.burst i:nth-child(2) { width: 36px; height: 36px; margin: -18px 0 0 -18px; }
.burst i:nth-child(3) { width: 56px; height: 56px; margin: -28px 0 0 -28px; }
.burst i:nth-child(4) { width: 78px; height: 78px; margin: -39px 0 0 -39px; }
.burst i:nth-child(5) { width: 102px; height: 102px; margin: -51px 0 0 -51px; }

@keyframes ring {
  from { opacity: 0.85; transform: scale(0.4); }
  to { opacity: 0; transform: scale(1); }
}

.game-word {
  position: absolute;
  top: 14%;
  left: 0;
  right: 0;
  z-index: 1;
  margin: 0;
  text-align: center;
  font-size: 1rem;
  letter-spacing: 0.14em;
  pointer-events: none;
}

.tiles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.tile-face {
  fill: rgba(190, 220, 232, 0.08);
  stroke: rgba(214, 228, 236, 0.16);
  stroke-width: 0.4;
  transition: fill 280ms ease, stroke 280ms ease;
}

.tile-glow {
  fill: rgba(190, 220, 232, 0.22);
  opacity: 0.45;
  stroke: none;
  transition: opacity 280ms ease;
}

.tile.is-awake .tile-face {
  fill: rgba(210, 230, 238, 0.28);
  stroke: rgba(226, 238, 244, 0.55);
}

.tile.is-awake .tile-glow {
  opacity: 1;
}

.coming-soon {
  position: absolute;
  z-index: 1;
  margin: 0;
  color: rgba(214, 228, 236, 0.92);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  white-space: nowrap;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: opacity 280ms ease;
}

.siege-door {
  position: absolute;
  z-index: 2;
  left: 43%;
  top: 42%;
  width: 11%;
  height: 16%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  font-size: 0.72rem;
  font-weight: 300;
  letter-spacing: 0.14em;
  text-decoration: none;
}

.siege-door.is-open,
.siege-door:focus-visible {
  color: rgba(214, 228, 236, 0.92);
}

.courtyard {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 0;
  width: min(100vw, calc(100vh * 16 / 9));
  height: min(100vh, calc(100vw * 9 / 16));
  transform: translate(-50%, -50%);
  image-rendering: pixelated;
  object-fit: contain;
}

.shop,
.result {
  position: absolute;
  left: 50%;
  top: 58%;
  z-index: 2;
  margin: 0;
  transform: translate(-50%, -50%);
  text-align: center;
  transition: opacity 280ms ease;
}

.shop {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
}

.shop[hidden],
.result[hidden] {
  display: none;
}

.coins,
.result-words,
.offers {
  margin: 0;
}

.offers {
  display: flex;
  gap: 1.4rem;
}

.shop button,
.result button,
.fight-words button {
  margin: 0;
  padding: 0.15rem 0.1rem 0.35rem;
  border: 0;
  background: none;
  color: var(--ice);
  font: inherit;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  cursor: pointer;
}

.fight-words {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 7%;
  z-index: 2;
  justify-content: center;
  gap: 1.8rem;
}

.fight-words button {
  position: relative;
  min-width: 4.6rem;
}

.cool {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 1px;
  background: rgba(214, 228, 236, 0.92);
}

.live {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  border: 0;
}

@media (pointer: coarse) {
  .fight-words.is-live { display: flex; }
}

@media (prefers-reduced-motion: reduce) {
  .thought, .mark, .burst i { transition: none; animation: none; }
  .tile-face, .tile-glow, .coming-soon { transition: none; }
  .shop, .result { transition: none; }
}
