/* ── Lantern ─────────────────────────────────────────────────── */
@font-face { font-family: 'Fraunces'; font-style: normal; font-weight: 300 700; font-display: swap; src: url(assets/fraunces-roman-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Fraunces'; font-style: italic; font-weight: 300 700; font-display: swap; src: url(assets/fraunces-italic-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Fraunces'; font-style: normal; font-weight: 300 700; font-display: swap; src: url(assets/fraunces-roman-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Fraunces'; font-style: italic; font-weight: 300 700; font-display: swap; src: url(assets/fraunces-italic-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
:root { --serif: 'Fraunces', 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, serif; --paper: #f3ecd2; --paper-dim: rgba(243,236,210,.66); --paper-faint: rgba(243,236,210,.38); --gold: #ffe0a0; --night: #05070e; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; margin: 0; }
body { background: var(--night); color: var(--paper); font-family: var(--serif); font-weight: 300; overflow: hidden; position: fixed; inset: 0; -webkit-font-smoothing: antialiased; touch-action: none; user-select: none; -webkit-user-select: none; overscroll-behavior: none; }
#c { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
#ui { position: fixed; inset: 0; pointer-events: none; }
#ui button, #ui input, #ui a, #ui .panel, #ui .card, #ui .sheet { pointer-events: auto; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* hud */
.hud { position: absolute; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: flex-start; padding: calc(12px + env(safe-area-inset-top)) calc(12px + env(safe-area-inset-right)) 0 calc(16px + env(safe-area-inset-left)); }
.hud-left { display: flex; flex-direction: column; gap: 2px; padding-top: 6px; }
.hud-name { font-style: italic; font-size: 17px; color: var(--paper-dim); letter-spacing: .03em; }
.hud-sub { font-size: 12.5px; letter-spacing: .05em; color: var(--paper-faint); font-variant-numeric: tabular-nums; line-height: 1.5; white-space: pre-line; }
.hud-right { display: flex; gap: 2px; align-items: center; }
.ib { background: none; border: 0; cursor: pointer; color: var(--paper-faint); width: 40px; height: 40px; padding: 8px; border-radius: 50%; line-height: 0; transition: color .3s, background .3s; font-family: inherit; }
.ib svg { width: 100%; height: 100%; }
.ib:hover, .ib:focus-visible { color: var(--paper); background: rgba(243,236,210,.06); outline: none; }
.ib.text { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; line-height: 1; font-style: italic; }
#btnSound .off { display: none; } #btnSound.muted .wave { display: none; } #btnSound.muted .off { display: block; }
/* title / place */
.title { position: absolute; left: 0; right: 0; top: 14%; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 0 22px; transition: opacity .8s, transform .8s; }
.title.gone { opacity: 0; transform: translateY(-12px); pointer-events: none; visibility: hidden; transition: opacity .8s, transform .8s, visibility 0s .8s; }
.title.gone * { pointer-events: none; }
.title h1 { margin: 0; font-style: italic; font-weight: 300; font-size: clamp(50px, 12vw, 96px); line-height: 1; letter-spacing: .02em; text-shadow: 0 0 40px rgba(255,200,110,.25); animation: rise 1.4s ease both; }
.title .sub { margin: 12px 0 0; font-style: italic; font-size: clamp(15px, 2.4vw, 18px); color: var(--paper-dim); animation: rise 1.4s .2s ease both; }
.place { margin-top: 34px; display: flex; flex-direction: column; align-items: center; gap: 12px; width: min(420px, 100%); animation: rise 1.4s .5s ease both; }
.place label { font-size: 14px; letter-spacing: .12em; color: var(--gold); text-transform: lowercase; }
.place .row { display: flex; gap: 8px; width: 100%; }
.place input { flex: 1; font-family: inherit; font-size: 17px; font-style: italic; color: var(--paper); background: rgba(243,236,210,.06); border: 1px solid rgba(243,236,210,.25); border-radius: 999px; padding: 11px 18px; outline: none; min-width: 0; }
.place input:focus { border-color: rgba(255,224,160,.6); }
.place .results { width: 100%; display: flex; flex-direction: column; gap: 4px; }
.place .results button { font-family: inherit; font-size: 15px; font-style: italic; color: var(--paper); background: rgba(243,236,210,.05); border: 1px solid rgba(243,236,210,.12); border-radius: 12px; padding: 10px 14px; text-align: left; cursor: pointer; }
.place .results button:hover, .place .results button:focus-visible { background: rgba(243,236,210,.12); outline: none; }
.place .results small { display: block; font-style: normal; font-size: 12px; color: var(--paper-faint); letter-spacing: .04em; }
.pill { font-family: inherit; font-style: italic; font-size: 15px; letter-spacing: .1em; color: var(--gold); background: rgba(255,224,160,.06); border: 1px solid rgba(255,224,160,.45); border-radius: 999px; padding: 11px 24px; cursor: pointer; transition: background .3s, color .3s, transform .2s; white-space: nowrap; }
.pill:hover, .pill:focus-visible { background: rgba(255,224,160,.16); color: #fff6d8; outline: none; }
.pill:active { transform: scale(.97); }
.pill.ghost { color: var(--paper-dim); border-color: rgba(243,236,210,.22); background: transparent; }
.pill.small { font-size: 13px; padding: 7px 14px; }
.links { display: flex; gap: 8px 18px; flex-wrap: wrap; justify-content: center; margin-top: 16px; }
.links button { background: none; border: 0; cursor: pointer; font-family: inherit; font-style: italic; font-size: 14.5px; color: var(--paper-dim); padding: 6px 2px; border-bottom: 1px solid transparent; }
.links button:hover, .links button:focus-visible { color: var(--paper); border-color: rgba(243,236,210,.3); outline: none; }
.worldline { margin: 26px 0 0; font-size: 12.5px; letter-spacing: .06em; color: var(--paper-faint); min-height: 1em; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes breathe { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
/* tonight's sky panel (pre-flight) */
.sky { position: absolute; left: calc(14px + env(safe-area-inset-left)); top: calc(60px + env(safe-area-inset-top)); width: min(330px, calc(100vw - 28px)); background: rgba(5,7,14,.55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border: 1px solid rgba(243,236,210,.12); border-radius: 16px; padding: 14px 16px; animation: rise 1s .2s ease both; }
.sky h2 { margin: 0 0 2px; font-style: italic; font-weight: 400; font-size: 18px; }
.sky .when { font-size: 12.5px; color: var(--paper-faint); letter-spacing: .05em; margin-bottom: 10px; }
.sky .now { font-size: 14.5px; color: var(--paper-dim); margin-bottom: 10px; line-height: 1.5; }
.ladder { display: grid; grid-template-columns: auto 1fr auto; gap: 3px 10px; font-size: 13px; font-variant-numeric: tabular-nums; align-items: center; }
.ladder .h { color: var(--paper-faint); text-align: right; }
.ladder .arrow { display: inline-block; width: 18px; height: 18px; vertical-align: middle; }
.ladder .arrow svg { width: 18px; height: 18px; }
.ladder .spd { color: var(--paper-dim); }
.sky .toward { margin-top: 12px; font-style: italic; font-size: 14.5px; color: var(--gold); line-height: 1.45; }
.sky .src { margin-top: 8px; font-size: 11px; color: var(--paper-faint); letter-spacing: .04em; }
.hold { position: absolute; left: 0; right: 0; bottom: calc(26px + env(safe-area-inset-bottom)); text-align: center; font-style: italic; font-size: clamp(15px, 2.6vw, 18px); color: var(--gold); letter-spacing: .1em; animation: breathe 2.6s ease-in-out infinite; pointer-events: none; }
.whisper { position: absolute; left: 0; right: 0; bottom: calc(28px + env(safe-area-inset-bottom)); text-align: center; padding: 0 28px; font-style: italic; font-size: clamp(15px, 2.6vw, 18px); letter-spacing: .03em; color: var(--paper-dim); opacity: 0; transition: opacity 1s; text-shadow: 0 2px 18px rgba(5,7,14,.9); pointer-events: none; }
.whisper.on { opacity: 1; }
.toolrow { position: absolute; right: calc(14px + env(safe-area-inset-right)); bottom: calc(22px + env(safe-area-inset-bottom)); display: flex; gap: 8px; }
/* cards and panels */
.card { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(460px, calc(100vw - 32px)); max-height: calc(100vh - 40px); overflow-y: auto; background: rgba(5,7,14,.78); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid rgba(243,236,210,.14); border-radius: 18px; padding: 22px 22px 18px; text-align: center; animation: cardin 1s ease both; }
@keyframes cardin { from { opacity: 0; transform: translate(-50%, -48%); } to { opacity: 1; transform: translate(-50%, -50%); } }
.card h2 { margin: 0; font-style: italic; font-weight: 300; font-size: clamp(26px, 6vw, 40px); line-height: 1.1; }
.card .line { margin: 10px 0 0; font-style: italic; font-size: 16px; color: var(--paper-dim); line-height: 1.5; }
.card .stat { margin: 14px 0 0; font-size: 13.5px; letter-spacing: .05em; color: var(--paper-dim); line-height: 1.7; font-variant-numeric: tabular-nums; white-space: pre-line; }
.card .dim { color: var(--paper-faint); }
.card .actions { margin-top: 18px; display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.card .fields { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; text-align: left; }
.card .fields label { font-size: 12px; letter-spacing: .08em; color: var(--paper-faint); text-transform: lowercase; }
.card .fields input { font-family: inherit; font-size: 16px; font-style: italic; color: var(--paper); background: rgba(243,236,210,.06); border: 1px solid rgba(243,236,210,.22); border-radius: 10px; padding: 9px 12px; outline: none; width: 100%; }
.card .fields input:focus { border-color: rgba(255,224,160,.6); }
.card .note { margin-top: 10px; font-size: 11.5px; color: var(--paper-faint); line-height: 1.5; }
.panel { position: absolute; inset: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; background: rgba(5,7,14,.8); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); animation: fadein .5s ease both; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
.panel-inner { max-width: 40rem; margin: 0 auto; padding: calc(64px + env(safe-area-inset-top)) 24px calc(48px + env(safe-area-inset-bottom)); position: relative; }
.panel h1 { font-style: italic; font-weight: 300; font-size: clamp(34px, 7vw, 52px); margin: 0 0 18px; line-height: 1.05; }
.panel h2 { font-style: italic; font-weight: 400; font-size: 17px; margin: 28px 0 8px; color: var(--gold); }
.panel p { margin: 0 0 13px; font-size: 16.5px; line-height: 1.6; color: var(--paper-dim); }
.panel p.lede { font-size: 19px; font-style: italic; color: var(--paper); line-height: 1.5; }
.panel .sig { margin-top: 30px; font-style: italic; font-size: 22px; color: var(--paper); }
.panel .sigsub { font-size: 12.5px; color: var(--paper-faint); margin-top: -6px; }
.ib.close { position: absolute; top: calc(14px + env(safe-area-inset-top)); right: 14px; }
body.pl .lang-en, body:not(.pl) .lang-pl { display: none; }
/* designer */
.designer { display: flex; flex-direction: column; gap: 14px; align-items: center; }
.designer .hint { margin: 0; font-size: 13px; font-style: italic; color: var(--paper-faint); text-align: center; max-width: 420px; }
.designer .draw { display: flex; gap: 18px; align-items: center; justify-content: center; flex-wrap: wrap; }
.designer #designGrid { width: 264px; height: 264px; border-radius: 50%; touch-action: none; cursor: crosshair; background: #0a0d18; box-shadow: 0 0 0 1px rgba(243,236,210,.12); }
.designer .previews { display: flex; flex-direction: column; gap: 10px; align-items: center; }
.designer #designPreview { width: 120px; height: 120px; }
.designer #designSide { width: 80px; height: 120px; }
.designer .opts { display: grid; grid-template-columns: auto 1fr; gap: 10px 14px; align-items: center; width: 100%; max-width: 380px; }
.designer .opts span { font-size: 12.5px; letter-spacing: .08em; color: var(--paper-faint); text-transform: lowercase; text-align: right; }
.designer .opts div { display: flex; gap: 6px; flex-wrap: wrap; }
.designer .opts button { font-family: inherit; font-size: 13px; font-style: italic; color: var(--paper-dim); background: rgba(243,236,210,.05); border: 1px solid rgba(243,236,210,.15); border-radius: 999px; padding: 6px 12px; cursor: pointer; }
.designer .opts button.on { color: var(--gold); border-color: rgba(255,224,160,.6); background: rgba(255,224,160,.1); }
.designer .opts button.swatch { width: 28px; height: 28px; padding: 0; border-radius: 50%; }
/* map */
.mapbar { position: absolute; left: 0; right: 0; bottom: calc(18px + env(safe-area-inset-bottom)); display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; padding: 0 12px; }
.mapcard { position: absolute; left: 50%; transform: translateX(-50%); top: calc(64px + env(safe-area-inset-top)); width: min(420px, calc(100vw - 28px)); background: rgba(5,7,14,.7); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border: 1px solid rgba(243,236,210,.14); border-radius: 14px; padding: 12px 16px; font-size: 14px; line-height: 1.5; color: var(--paper-dim); animation: fadein .3s ease both; }
.mapcard b { color: var(--paper); font-weight: 400; font-style: italic; }
.toast { position: absolute; left: 50%; top: calc(64px + env(safe-area-inset-top)); transform: translateX(-50%); font-size: 13.5px; color: var(--paper-dim); background: rgba(5,7,14,.7); border: 1px solid rgba(243,236,210,.12); border-radius: 999px; padding: 8px 16px; animation: fadein .4s ease both; max-width: calc(100vw - 32px); text-align: center; }
.spinner { display: inline-block; width: 10px; height: 14px; border-radius: 50% 50% 45% 45%; background: radial-gradient(circle at 50% 70%, #fff3c0, #ffb050 60%, transparent 70%); animation: flicker .5s ease-in-out infinite alternate; vertical-align: middle; margin-right: 8px; }
@keyframes flicker { from { transform: scaleY(.9) translateY(1px); opacity: .8; } to { transform: scaleY(1.1); opacity: 1; } }
/* narrow screens: the whisper sits above the tool row instead of under it */
@media (max-width: 640px) { .whisper { bottom: calc(76px + env(safe-area-inset-bottom)); } }
@media (max-width: 480px) { .sky { top: calc(56px + env(safe-area-inset-top)); padding: 12px 14px; } .sky .now { font-size: 13.5px; } .ladder { font-size: 12px; } }
@media (max-height: 640px) { .sky .ladder .h:nth-child(n+16), .sky .ladder .arrow:nth-child(n+16), .sky .ladder .spd:nth-child(n+16) { display: none; } }
@media (prefers-reduced-motion: reduce) { .title h1, .title .sub, .place, .sky, .card, .panel, .hold { animation: none; } }
