/* Suze's tuintje — all sizing is in cqw / % against .frame (1536 x 1024 design space). */

html, body { margin: 0; padding: 0; height: 100%; background: #232f1c; overflow: hidden; }
a { color: #8a6420; }
a:hover { color: #b18632; }
img { -webkit-user-drag: none; user-drag: none; }

.stage {
  position: fixed; inset: 0;
  display: grid; place-items: center;
  background: #232f1c; overflow: hidden;
  font-family: 'EB Garamond', Georgia, serif;
  -webkit-user-select: none; user-select: none;
}

.bg-blur {
  position: absolute; left: 50%; top: 50%;
  width: 114%; height: 114%;
  transform: translate(-50%, -50%);
  object-fit: cover;
  filter: blur(22px) brightness(0.6) saturate(1.1);
}

.vignette {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 42%, rgba(0,0,0,0) 45%, rgba(12,18,8,0.55) 100%);
}

.frame {
  position: relative;
  aspect-ratio: 1536 / 1024;
  width: min(100vw, 150dvh);
  max-width: 1900px;
  container-type: inline-size;
}

.board {
  position: absolute; inset: 0;
  width: 100%; height: 100%; display: block;
  border-radius: 0.8cqw;
  box-shadow: 0 2.2cqw 4cqw rgba(10,14,6,0.55);
}

/* ── HUD ─────────────────────────────────────────────────────── */

.hud-energy {
  position: absolute; left: 73.4%; top: 7.6%; width: 6.9%; height: 8%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0.1cqw;
}
.hud-energy__value {
  font-size: 1.75cqw; font-weight: 600; color: #f4e9c0;
  text-shadow: 0 1px 3px rgba(0,0,0,0.55); line-height: 1;
}
.hud-energy__label {
  font-size: 0.72cqw; color: #cfe0b4; letter-spacing: 0.06em; text-transform: lowercase;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5); line-height: 1; white-space: nowrap;
}

.hud-gems {
  position: absolute; left: 85.8%; top: 7.6%; width: 5.2%; height: 8%;
  display: flex; align-items: center; justify-content: center;
}
.hud-gems__value {
  font-size: 2cqw; font-weight: 600; color: #f4e9c0;
  text-shadow: 0 1px 3px rgba(0,0,0,0.55); line-height: 1;
}

.lbl {
  position: absolute;
  display: flex; align-items: center; justify-content: center;
}
.lbl--diary { left: 72.3%; top: 21.6%; width: 20.5%; height: 4%; }
.lbl--diary > div { font-size: 1.62cqw; color: #4a5f38; letter-spacing: 0.01em; white-space: nowrap; }

.lbl--task { left: 72.3%; top: 30.6%; width: 20.5%; height: 3.8%; }
.lbl--task > div { font-size: 1.42cqw; color: #4d3f26; white-space: nowrap; }

.lbl--hint { left: 64.1%; top: 87.9%; width: 20.8%; height: 5.4%; }
.lbl--hint > div { font-size: 1.22cqw; color: #5b4a2c; font-style: italic; white-space: nowrap; }

.lbl--quest { left: 72.9%; top: 35.4%; width: 16.3%; height: 3.5%; }
.lbl--quest > div {
  font-size: 1.1cqw; font-variant: small-caps; color: #f0dda6; letter-spacing: 0.06em;
  text-shadow: 0 1px 2px rgba(20,10,30,0.7); white-space: nowrap;
}

/* ── Growth ladder ───────────────────────────────────────────── */

.ladder {
  position: absolute; left: 6.6%; top: 81.4%; width: 55.4%; height: 10.6%;
  display: flex; align-items: flex-end; justify-content: space-between;
}
.ladder__step {
  flex: 1; height: 100%;
  display: flex; align-items: flex-end; justify-content: center;
  cursor: help;
}
.ladder__step img {
  transform-origin: 50% 100%;
  filter: drop-shadow(0 0.25cqw 0.35cqw rgba(60,40,10,0.3));
}

/* ── Ladder tooltip ──────────────────────────────────────────── */

.tip {
  position: absolute; bottom: 19.4%;
  transform: translateX(-50%) scale(0);
  transform-origin: 50% 100%;
  pointer-events: none; z-index: 44;
  display: flex; flex-direction: column; align-items: center;
}
.tip__body {
  background: #f7edcd;
  border: 0.16cqw solid #b08c3e;
  border-radius: 0.7cqw;
  padding: 0.5cqw 0.9cqw;
  box-shadow: 0 0.4cqw 0.9cqw rgba(20,14,4,0.42);
  display: flex; flex-direction: column; align-items: center; gap: 0.15cqw;
  white-space: nowrap;
}
.tip__name { font-size: 1.2cqw; font-weight: 600; color: #3f5233; line-height: 1.1; }
.tip__row { display: flex; align-items: center; gap: 0.35cqw; }
.tip__row img { width: 1.35cqw; }
.tip__value { font-size: 1.05cqw; color: #7a6742; line-height: 1; }
.tip__tail { position: relative; width: 1.5cqw; height: 0.8cqw; margin-top: -0.16cqw; }
.tip__tail-border {
  position: absolute; inset: 0; background: #b08c3e;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}
.tip__tail-fill {
  position: absolute; left: 0.16cqw; right: 0.16cqw; top: 0; bottom: 0.14cqw;
  background: #f7edcd; clip-path: polygon(0 0, 100% 0, 50% 100%);
}

/* ── Board cells ─────────────────────────────────────────────── */

.cell { position: absolute; }
.cell__ring {
  position: absolute; inset: 3%;
  border-radius: 16%;
  border: 0.18cqw solid rgba(255,213,110,0.9);
  box-shadow: 0 0 1.3cqw rgba(255,199,84,0.8), inset 0 0 1.3cqw rgba(255,220,140,0.45);
  transform: scale(0);
  pointer-events: none;
}
.cell__glow {
  position: absolute; left: 50%; top: 46%;
  width: 6cqw; height: 6cqw; margin: -3cqw 0 0 -3cqw;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255,228,140,0.85), rgba(255,228,140,0));
  transform: scale(0);
  pointer-events: none;
}
.cell__plant {
  position: absolute; left: 50%;
  transform: translate(-50%, 0) scale(0);
  transform-origin: 50% 100%;
  pointer-events: none;
  will-change: transform;
  filter: drop-shadow(0 0.35cqw 0.45cqw rgba(50,32,8,0.28));
}

/* ── Journal panel ───────────────────────────────────────────── */

.journal {
  position: absolute; left: 72.3%; top: 40.8%; width: 21.2%; height: 33%;
  display: flex; flex-direction: column;
  color: #4d3f26;
}
.journal__view { display: none; flex-direction: column; text-align: center; }
.journal__view[data-open] { display: flex; }

.journal__quest { gap: 1cqw; padding-top: 0.6cqw; }
.journal__p { font-size: 1.26cqw; line-height: 1.45; text-wrap: pretty; }
.journal__note { font-size: 1.08cqw; font-style: italic; color: #7a6742; text-wrap: pretty; }
.journal__chain { display: flex; align-items: flex-end; justify-content: center; gap: 0.7cqw; }
.journal__arrow { color: #b98f3e; font-size: 1.5cqw; line-height: 1; }

.journal__done { gap: 0.9cqw; padding-top: 0.6cqw; }
.journal__done-bloom { width: 4.6cqw; margin: 0 auto; }
.journal__done-title { font-size: 1.6cqw; font-weight: 600; color: #3f5233; line-height: 1.15; }
.journal__done-body { font-size: 1.15cqw; line-height: 1.4; text-wrap: pretty; }
.journal__rows { display: flex; flex-direction: column; gap: 0.5cqw; }

.journal__row {
  display: flex; align-items: center; justify-content: center; gap: 0.6cqw;
  cursor: pointer; text-decoration: none;
  transition: transform 0.15s ease;
}
.journal__row:hover { transform: scale(1.06); }
.journal__row img { width: 1.6cqw; filter: drop-shadow(0 0 0.4cqw rgba(120,220,255,0.8)); }
.journal__row-title { font-size: 1.25cqw; color: #8a6420; text-decoration: underline dotted; }
.journal__row-ext { font-size: 1cqw; color: #8a7548; }

.journal__card {
  gap: 0.65cqw; padding-top: 0.2cqw;
  transform-origin: 50% 15%;
}
.journal__card-title { font-size: 1.55cqw; font-weight: 600; color: #3f5233; line-height: 1.1; }
.journal__card-preview {
  height: 8cqw;
  border: 0.14cqw dashed #c3a559;
  border-radius: 0.8cqw;
  background: rgba(205,175,110,0.16);
  display: grid; place-items: center;
}
/* Portrait page thumbnail, matted inside the dashed frame. */
.journal__card-preview img {
  /* Sized in cqw, not %, so it cannot fall back to the file's natural size:
     the box is 8cqw tall, the page art is portrait 1054x1492. */
  height: 7cqw; width: auto; max-width: 96%;
  display: block; object-fit: contain;
  border-radius: 0.2cqw;
  box-shadow: 0 0.15cqw 0.4cqw rgba(40,28,8,0.32);
}
.journal__card-file { font-size: 0.98cqw; color: #6b5a3a; }
.journal__back {
  font-size: 1.02cqw; color: #8a6420; cursor: pointer; text-decoration: underline dotted;
}

.btn-download {
  display: block; position: relative;
  width: 82%; margin: 0.2cqw auto 0;
  cursor: pointer;
  transition: transform 0.15s ease;
}
.btn-download:hover { transform: scale(1.05); }
.btn-download:active { transform: scale(0.95); }
.btn-download > img {
  width: 100%; display: block;
  filter: drop-shadow(0 0.3cqw 0.5cqw rgba(30,20,5,0.3));
}
.btn-download__label {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-size: 1.18cqw; color: #f4e6b8; letter-spacing: 0.02em;
  text-shadow: 0 1px 2px rgba(8,32,26,0.65); white-space: nowrap;
}

/* ── Gem slots ───────────────────────────────────────────────── */

.slots {
  position: absolute; left: 72.3%; top: 73.4%; width: 21.2%; height: 8.5%;
  display: flex; align-items: center; justify-content: center; gap: 1.8cqw;
}
.slot {
  width: 3.4cqw; height: 3.4cqw; border-radius: 50%;
  border: 0.12cqw solid #c9b078;
  background: rgba(90,70,35,0.12);
  box-shadow: inset 0 0.2cqw 0.5cqw rgba(60,40,10,0.25);
  display: grid; place-items: center;
  cursor: default;
}
.slot--filled { cursor: pointer; }
.slot img { width: 58%; transform: scale(0); }

/* ── Mute toggle ─────────────────────────────────────────────── */

.mute {
  position: absolute; left: 1.4%; bottom: 2.4%;
  width: 3cqw; height: 3cqw; border-radius: 50%;
  background: #efe0b6;
  border: 0.16cqw solid #8a6a2e;
  box-shadow: 0 0.25cqw 0.6cqw rgba(20,14,4,0.4);
  display: grid; place-items: center;
  cursor: pointer; z-index: 45;
  transition: transform 0.15s ease;
}
.mute:hover { transform: scale(1.1); }
.mute__note { font-size: 1.5cqw; color: #6b4f1d; line-height: 1; }
.mute__slash {
  position: absolute; width: 66%; height: 0.28cqw;
  background: #8f3a2d; transform: rotate(-40deg); border-radius: 0.2cqw;
}
.mute__slash[hidden] { display: none; }

/* ── Particle layer ──────────────────────────────────────────── */

.fx { position: absolute; inset: 0; pointer-events: none; z-index: 40; overflow: visible; }

/* ── Win overlay ─────────────────────────────────────────────── */

.win {
  position: absolute; inset: 0; z-index: 50;
  display: grid; place-items: center;
  overflow: hidden; border-radius: 0.8cqw;
}
.win[hidden] { display: none; }
.win__bg {
  position: absolute; left: 50%; top: 50%;
  width: 190cqw; height: 190cqw; border-radius: 50%;
  background: radial-gradient(circle, rgba(26,36,16,0.5) 0%, rgba(16,24,10,0.78) 70%);
  transform: translate(-50%, -50%) scale(0);
}
.win__card {
  position: relative; width: 44cqw;
  background: #f7edcd;
  border: 0.3cqw double #b08c3e;
  border-radius: 1.3cqw;
  padding: 2.6cqw 3cqw 2.2cqw;
  box-shadow: 0 2cqw 4cqw rgba(10,14,6,0.5);
  display: flex; flex-direction: column; align-items: center; gap: 0.9cqw;
  text-align: center;
  transform: scale(0);
}
.win__bloom {
  width: 6.5cqw; margin-top: -5.6cqw;
  filter: drop-shadow(0 0.4cqw 0.6cqw rgba(30,20,5,0.35));
}
.win__title { font-size: 2.4cqw; font-weight: 600; color: #3f5233; line-height: 1.1; }
.win__body { font-size: 1.3cqw; color: #6b5a3a; text-wrap: pretty; }
.win__rows { display: flex; flex-direction: column; gap: 0.55cqw; margin-top: 0.3cqw; }

.win__row {
  display: flex; align-items: center; justify-content: center; gap: 0.7cqw;
  cursor: pointer; text-decoration: none;
  transition: transform 0.15s ease;
}
.win__row:hover { transform: scale(1.06); }
.win__row img { width: 1.9cqw; filter: drop-shadow(0 0 0.4cqw rgba(120,220,255,0.8)); }
.win__row-title { font-size: 1.35cqw; color: #8a6420; text-decoration: underline dotted; }
.win__row-ext { font-size: 1.05cqw; color: #8a7548; }

.win__dismiss {
  margin-top: 0.7cqw;
  background: #2f5b46; color: #f1e2ba;
  font-size: 1.25cqw;
  padding: 0.7cqw 2.4cqw;
  border-radius: 2cqw;
  cursor: pointer;
  box-shadow: 0 0.3cqw 0.7cqw rgba(10,14,6,0.35);
  transition: transform 0.15s ease;
}
.win__dismiss:hover { transform: scale(1.06); }

/* ── Intro letter ────────────────────────────────────────────── */

.intro {
  position: fixed; inset: 0; z-index: 60;
  overflow: hidden;
  display: grid; place-items: center;
}
.intro[hidden] { display: none; }
.intro__paper {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
}
.intro__card {
  position: relative;
  aspect-ratio: 1536 / 1024;
  width: min(100vw, 150dvh);
  max-width: 1900px;
  transform-origin: 50% 45%;
}
/* was top:-11.4px in the mock — 11.4 / 1024 of the frame */
.intro__logo {
  position: absolute; left: 50%; top: -1.113%;
  width: 34%; margin-left: -17%;
  z-index: 3;
  transform-origin: 50% 0;
  filter: drop-shadow(0 1cqw 1.6cqw rgba(8,14,4,0.55));
}
/* The paper is object-fit:cover over the viewport, so its rendered width is
   max(100vw, 100dvh * 1492/1054). This sheet reproduces that box exactly, so the
   letter stays glued to the scroll at every window aspect instead of drifting
   against the card's 1536:1024 space. It is a container, so the letter's cqw
   sizes scale with the paper too. */
.intro__sheet {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: max(100vw, 141.556dvh);
  aspect-ratio: 1492 / 1054;
  container-type: inline-size;
  pointer-events: none;
}
/* Centred on the scroll's writable area, measured from a4Opening.png:
   x 246-1239 of 1492, y 174-877 of 1054 -> centre 49.77% / 49.86%.
   (The mock had left:22.852% width:30.664%, i.e. a centre at 38.2%.) */
.intro__letter {
  position: absolute;
  left: 32.77%; top: 27.86%;
  width: 34%; height: 44%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: space-between;
  text-align: center;
  color: #4a3a22;
  font-family: 'Caveat', 'EB Garamond', Georgia, serif;
}
.intro__hello { font-size: 2.3cqw; line-height: 1; align-self: flex-start; }
.intro__line { font-size: 1.72cqw; line-height: 1.35; text-wrap: pretty; }
.intro__sign {
  display: flex; flex-direction: column; align-items: flex-end; align-self: flex-end;
  gap: 1.7cqw; line-height: 1;
}
.intro__sign-from { font-size: 1.5cqw; line-height: 1; white-space: nowrap; }
.intro__sign-names { font-size: 2cqw; line-height: 1; color: #3f5233; white-space: nowrap; }

.intro__btn {
  position: absolute; left: 50%; bottom: 12.5%;
  width: 19%; margin-left: -9.5%;
  z-index: 3; cursor: pointer;
  transform-origin: 50% 50%;
  transition: filter 0.15s ease;
}
.intro__btn:hover { filter: brightness(1.08); }
.intro__btn > img {
  width: 100%; display: block;
  filter: drop-shadow(0 0.5cqw 0.9cqw rgba(8,14,4,0.5));
}
/* The mock nudged this to left:0 width:230px top:3.84px height:43px on 292x70
   art, putting the text's centre at 39.4% / 36.2% instead of dead centre. The
   button art is symmetric (its well centres on x=146 of 292), so inset:0 is
   right - same as .btn-download__label. */
.intro__btn-label {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-size: 1.35cqw; color: #f4e6b8; letter-spacing: 0.02em;
  text-shadow: 0 1px 2px rgba(8,32,26,0.65); white-space: nowrap;
  font-family: 'EB Garamond', Georgia, serif;
}
