:root {
  color-scheme: light;
  --ink: #132853;
  --blue: #1e4089;
  --sky: #b7d4fb;
  --clay: #ad3328;
  --white: #fff;
  --display: "Bricolage Grotesque", "Avenir Next", "Hiragino Sans", "PingFang SC", sans-serif;
  --body: system-ui, "Hiragino Sans", "PingFang SC", sans-serif;
}
* { box-sizing: border-box }
html { font: 100%/1.55 var(--body); color: var(--ink); background: white; overflow-wrap: break-word; font-variant-numeric: tabular-nums }
body, figure { margin: 0 }
p, li { text-wrap: pretty }
.wrap { width: min(100% - clamp(2.4rem, 9vw, 9rem), 77rem); margin-inline: auto }
a { color: var(--blue); text-underline-offset: .22em; text-decoration-thickness: .08em }
a:hover { text-decoration-thickness: .15em }
a, summary { -webkit-tap-highlight-color: #aac5f1 }
:focus-visible { outline: 3px solid #b43b14; outline-offset: 4px }
.train :focus-visible { outline-color: #ffd46a }
::selection { background: #f8cc64; color: var(--ink) }
img { display: block; max-width: 100%; height: auto }
h1, h2, h3, .brand, .signature, .stamp-foot {
  font-family: var(--display); font-weight: 780; font-optical-sizing: auto;
  letter-spacing: -.035em; line-height: 1.14; margin: 0; text-wrap: balance;
}
h2 { font-size: clamp(2.15rem, 4.5vw, 3.8rem) }
h3 { font-size: clamp(1.22rem, 2vw, 1.55rem); letter-spacing: -.015em }
p { margin: .7em 0 }
summary { cursor: pointer; list-style: none }
summary::-webkit-details-marker { display: none }
nav, .utilities, .actions, .doc-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem }
.mast, .cover, .doc-cover { background: var(--sky) }
.mast .wrap, footer .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem }
.mast .wrap { min-height: 4.6rem; border-bottom: 1px solid #19376544; position: relative; z-index: 8 }
.brand { display: inline-flex; align-items: center; gap: .55rem; color: var(--ink); text-decoration: none; font-size: clamp(1.1rem, 2.2vw, 1.58rem) }
.brand img { width: 35px; height: 35px; border-radius: 22% }
.utilities { gap: clamp(.6rem, 3vw, 2.3rem); flex-wrap: nowrap }
.parent-link, .language summary { color: var(--ink); font-size: .93rem; font-weight: 630 }
.language { position: relative }
.language summary { display: flex; align-items: center; min-height: 44px; gap: .55rem }
.language summary::after {
  content: ""; display: inline-block; width: .48rem; height: .48rem;
  border: solid currentColor; border-width: 0 1.8px 1.8px 0; transform: rotate(45deg); margin-bottom: .2em;
}
.language[open] summary::after { transform: rotate(225deg); margin-bottom: -.2em }
.language nav { position: absolute; z-index: 8; top: 100%; inset-inline-end: 0; width: min(20rem, 88vw); display: grid; grid-template-columns: 1fr 1fr; padding: .55rem; gap: .1rem; background: white; box-shadow: 0 7px 22px #16335738 }
.language nav a { padding: .5rem; color: var(--ink) }
.cover { position: relative; padding-bottom: .65rem }
.cover::after, .doc-cover::after {
  content: ""; display: block; height: 8px; position: absolute; inset: auto 0 0;
  background: repeating-linear-gradient(125deg, #ecf4ff 0 21px, #ba4941 21px 40px, #ecf4ff 40px 61px, #3259a0 61px 82px);
}
.dispatch { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .98fr); align-items: center; gap: clamp(1.4rem, 4vw, 4.2rem); padding-block: clamp(3.2rem, 5.8vw, 5.8rem) }
.cover-topic { margin: 0 0 .65rem; color: var(--ink); font-size: .96rem; font-weight: 650; line-height: 1.45 }
.cover h1 { font-size: clamp(3.4rem, 7.2vw, 6rem); max-width: 11ch; line-height: 1.08; color: var(--ink) }
:lang(tr) .cover h1, :lang(pl) .cover h1 { line-height: 1.14 }
.lead { max-width: 40ch; font-size: clamp(1.08rem, 1.55vw, 1.36rem); line-height: 1.5; margin-block: 1.25rem 1.65rem }
.actions { align-items: flex-start; gap: .9rem 1.2rem }
.read-link, .guide-link { display: inline-flex; align-items: center; justify-content: center; gap: .75rem; color: white; text-decoration: none; font-weight: 715; line-height: 1.2 }
.read-link { min-height: 3.55rem; background: var(--clay); border-radius: .45rem; padding: .75rem 1.12rem; box-shadow: 0 3px 6px #4b1c1728 }
.read-link::after { content: ""; width: .62em; height: .62em; border: solid currentColor; border-width: 0 2px 2px 0; transform: translateY(-.12em) rotate(45deg); flex: none }
.read-link:hover { background: #94291c }
.dispatch-info { border-top: 1px solid #19376544; margin-block: 0; padding-block: 1.08rem; font-size: .92rem; font-weight: 530 }
.postage { width: min(100%, 33rem); aspect-ratio: 1.35; position: relative; justify-self: center; direction: ltr; display: block; text-decoration: none }
.stamp { position: absolute; filter: drop-shadow(1px 6px 6px #17366147); isolation: isolate; padding: 4%; }
.stamp::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: #fffdfa;
  --hole: radial-gradient(circle at 5px 5px, transparent 3.3px, #000 3.9px) -5px -5px / 10px 10px repeat;
  --perforation: linear-gradient(#000 0 0) center / calc(100% - 12px) calc(100% - 12px) no-repeat, var(--hole);
  -webkit-mask: var(--perforation); mask: var(--perforation);
}
.stamp img { width: 100%; aspect-ratio: 1; object-fit: cover }
.stamp.extra { width: 38%; right: 1%; top: 49%; transform: rotate(11deg); padding: 2.6% }
.stamp.illustrated { width: 68%; left: 8%; top: 0; transform: rotate(-8deg) }
.stamp-foot { display: flex; justify-content: space-between; align-items: center; gap: .6rem; margin-top: 3.5%; color: #9b302a; font-size: clamp(.95rem, 2vw, 1.55rem); font-weight: 740; line-height: 1.12 }
.envelope { width: 1.35em; height: .93em; border: 1.8px solid currentColor; display: inline-block; position: relative; flex: none }
.envelope::after { content: ""; position: absolute; inset: 0; background: currentColor; clip-path: polygon(0 0, 50% 57%, 100% 0, 100% 12%, 50% 70%, 0 12%) }
.cancel { position: absolute; width: 26%; height: 24%; left: -1%; bottom: 10%; transform: rotate(-11deg); opacity: .83 }
.cancel i { display: block; height: 31%; margin-block: 1%; border-top: 2px solid #335995; border-radius: 50% 35% 0 0 }
.cancel::before { content: ""; position: absolute; border: 4px double #335995; border-radius: 100%; width: 42%; aspect-ratio: 1; right: -12%; top: -16%; background: transparent }
.store-action { display: inline-flex; align-items: center; max-width: 100%; min-height: 3.55rem }
.store-soon { color: var(--ink); font-size: .93rem; font-weight: 600 }
.live-badge { display: inline-flex; align-items: center; padding: .75rem }
.live-badge img { display: block; width: auto; height: 3rem }
.actions:has(.live-badge), .doc-actions:has(.live-badge) { align-items: center }
.train { background: #203e80; color: white; scroll-margin-top: 0 }
.play-layout { display: grid; grid-template-columns: minmax(0,.69fr) minmax(0,1.31fr); align-items: center; gap: clamp(1.7rem, 5vw, 5rem); padding-block: clamp(3.1rem, 6.3vw, 6rem) }
.scene-prompt, .family-intro { font-size: clamp(1.06rem, 1.65vw, 1.32rem); max-width: 35ch }
.craft { color: #d6e6ff; max-width: 36ch }
.mail-game { min-width: 0; color: var(--ink); background: #e6f1ff; border: 6px solid #e6f1ff; border-radius: .4rem; box-shadow: 0 7px 18px #0c234a4a }
.mail-game [hidden] { display: none }
.mail-surface { position: relative; direction: ltr; isolation: isolate; user-select: none; -webkit-user-select: none }
.mail-surface img, .mail-paper img { width: 100%; height: auto; aspect-ratio: 7/3 }
.mail-surface canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none }
.mail-grip { position: absolute; touch-action: none; min-width: 44px; min-height: 44px; cursor: grab; border-radius: 45% }
.mail-grip:active { cursor: grabbing }
[data-phase=bridge] .mail-grip { left: 49%; top: 34%; width: 24%; height: 52% }
[data-phase=train] .mail-grip { top: 30%; width: 49%; height: 52% }
[data-phase=moving] .mail-grip, [data-phase=done] .mail-grip { display: none }
.mail-controls, .mail-paper label { margin: .45rem .25rem .05rem }
.mail-controls { display: flex; align-items: center; flex-wrap: wrap; gap: .45rem .85rem }
.mail-controls button, .mail-paper label { display: inline-flex; justify-content: center; align-items: center; min-height: 44px; padding: .45rem .85rem; color: var(--ink); background: #ffda72; font: 700 1rem/1.2 var(--body); border: 1px solid #b59346; border-radius: .35rem; cursor: pointer }
.mail-controls button:hover, .mail-paper label:hover { background: #ffea9b }
.mail-controls button:focus-visible, .mail-paper:focus-within label { outline: 3px solid var(--blue); outline-offset: 1px }
.mail-controls [role=status] { flex: 1 1 13rem; font-size: .93rem }
.mail-controls [role=status]:empty { flex: 0 }
.mail-game:not([data-phase=done]) .mail-finish-link { display: none }
.mail-paper { position: relative }.mail-paper input { position: absolute; width: 1px; height: 1px; opacity: 0 }
.mail-paper > div { display: none }
#mail-start:checked ~ .paper-start, #mail-ready:checked ~ .paper-ready, #mail-done:checked ~ .paper-done { display: block }
.scenes { padding-block: clamp(3.4rem, 6.4vw, 6.2rem) }
.spread { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(1.4rem, 5vw, 5rem); align-items: start; margin-top: 2rem }
.spread figure:nth-child(2) { margin-top: clamp(.8rem, 2.2vw, 2.1rem) }
.spread img { width: 100%; border-radius: .25rem }.spread figcaption { margin-top: .65rem; max-width: 47ch; font-size: 1.07rem }
.family { background: #e5efff }.family-layout,.doc-spread { display: grid; grid-template-columns: minmax(0,.78fr) minmax(0,1.22fr); gap: clamp(2rem, 6vw, 6rem); padding-block: clamp(2.8rem, 5.8vw, 5.5rem) }
.family-intro { margin-block: 1rem 1.4rem }.guide-link { color: var(--blue); text-decoration: underline; justify-content: start }
.answers p { margin: .4rem 0 1.4rem; max-width: 62ch }.answers p:last-child { margin-bottom: 0 }
.doc-cover { position: relative }.doc-cover h1 { max-width: 23ch; color: var(--ink); font-size: clamp(2.5rem, 5.2vw, 4.6rem); padding-block: clamp(2.3rem, 5vw, 4.6rem) }
.doc-spread { grid-template-columns: minmax(0, 1.65fr) minmax(0, .75fr) }
.doc-spread article { max-width: 68ch }.doc-spread article section { margin: 0 0 2rem }.doc-spread article h2 { font-size: clamp(1.45rem, 2.25vw, 2.05rem); line-height: 1.18 }
.doc-spread aside { align-self: start; padding: clamp(1.1rem, 2.5vw, 2.3rem); background: #e5efff }
.doc-spread aside > img { width: min(55%, 8.5rem); outline: 5px solid white; transform: rotate(-4deg); margin: .4rem 0 1.35rem }
.signature { font-size: 1.55rem }.doc-actions { align-items: flex-start; gap: .8rem; margin-block: 1.1rem }
.doc-spread nav { gap: .4rem 1.1rem }.mail { unicode-bidi: isolate; direction: ltr; overflow-wrap: anywhere }
footer { color: white; background: var(--ink) }footer a { color: white }footer .wrap { min-height: 5rem; flex-wrap: wrap; padding-block: 1.2rem; font-size: .88rem }
:lang(ar) h1,:lang(ar) h2,:lang(ar) h3 { letter-spacing: 0; line-height: 1.3 }
@media(max-width:60rem) {
  .wrap { width: min(100% - 3rem, 77rem) }
  .dispatch { gap: 1.3rem }
}
@media(max-width:43rem) {
  .wrap { width: calc(100% - 2.4rem) }
  .mast .wrap { min-height: 3.7rem }.brand img { width: 29px; height: 29px }.utilities { gap: .8rem }.parent-link,.language summary { font-size: .79rem }
  .dispatch { grid-template-columns: minmax(0, 1fr); gap: .5rem; padding-block: 1.9rem 1.2rem }
  .cover-text { display: contents }.cover-heading { grid-row: 1 }.cover h1 { max-width: 14ch; font-size: clamp(3.1rem, 12vw, 4.6rem) }
  .postage { grid-row: 2; width: min(86%, 22rem); margin-block: 1rem .5rem }.lead { grid-row: 3; margin: .5rem 0 .4rem }
  .actions { grid-row: 4; gap: .6rem .8rem }.dispatch-info { font-size: .85rem; padding-block: .8rem }
  .play-layout,.family-layout,.doc-spread { grid-template-columns: 1fr; gap: 1.45rem }
  .spread { grid-template-columns: 1fr; gap: 1.75rem }.spread figure:nth-child(2) { margin: 0 }
  .scene-prompt,.craft { max-width: 45ch }.train-copy p:last-child { margin-bottom: 0 }
  .doc-spread aside .doc-actions { display: flex }
}
@media(max-width:26rem) {
  
  .actions .read-link,.actions .store-action { min-height: 3.1rem }.read-link { padding-inline: .74rem }.read-link { font-size: .93rem }
}
@media(max-width:22rem) {
  .parent-link { display: none }.actions { flex-direction: column }
}
.inline-play { display: inline-block; font-weight: 680; padding-block: .2rem }
