/* Nabij Vánoce energií! · PF 2027 · UNICORNO */
:root {
  --ink: #18181a; --red: #ed4d35; --red-hi: #ff8a5c; --orange: #ed8f28; --gold: #ffd35a; --snow: #f5f3f1; --muted: #c9c2bc;
  --safe-t: env(safe-area-inset-top, 0px); --safe-r: env(safe-area-inset-right, 0px); --safe-b: env(safe-area-inset-bottom, 0px); --safe-l: env(safe-area-inset-left, 0px);
  --head: 'Host Grotesk', 'Roboto', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif; --body: 'Roboto', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #141212; color: var(--snow); }
body { font-family: var(--body); overflow: hidden; overscroll-behavior: none; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100%; }
button { font: inherit; }
.pf { position: fixed; inset: 0; display: flex; flex-direction: column; }
.stage { position: relative; flex: 1; min-height: 0; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; }
.scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

.top { position: absolute; z-index: 6; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; padding: calc(var(--safe-t) + 12px) calc(var(--safe-r) + 12px) 0 calc(var(--safe-l) + 12px); pointer-events: none; }
.top > * { pointer-events: auto; }
.top__logo { display: inline-flex; padding: 3px 10px; border-radius: 12px; background: rgba(255, 255, 255, .96); box-shadow: 0 6px 18px rgba(0, 0, 0, .35); transition: opacity .6s, visibility .6s; }
.top__logo img { display: block; width: 104px; height: auto; }
.pf[data-scene="final"] .top__logo { opacity: 0; visibility: hidden; }
.iconbtn { width: 46px; height: 46px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .3); background: rgba(24, 22, 21, .7); color: #fff; display: grid; place-items: center; cursor: pointer; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.iconbtn:hover { background: rgba(237, 77, 53, .5); }
.ico { width: 22px; height: 22px; }
.iconbtn .ico-off { display: none; } .iconbtn[aria-pressed="true"] .ico-on { display: none; } .iconbtn[aria-pressed="true"] .ico-off { display: block; }

.msg { position: absolute; z-index: 5; left: 50%; top: calc(var(--safe-t) + 74px); width: min(660px, calc(100% - 28px)); margin: 0; transform: translate(-50%, -10px); text-align: center; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .5s, transform .5s, visibility .5s; }
.msg__title { margin: 0; font-family: var(--head); font-weight: 800; font-size: clamp(26px, 6.6vw, 48px); line-height: 1.08; letter-spacing: -.01em; text-wrap: balance; text-shadow: 0 4px 26px rgba(0, 0, 0, .65); }
.msg__sub { margin: 10px 0 0; font-size: clamp(17px, 4vw, 22px); font-weight: 500; color: #ffd9c9; text-shadow: 0 2px 14px rgba(0, 0, 0, .7); opacity: 0; transition: opacity .6s .8s; }
.pf[data-scene="intro"] .msg--intro, .pf[data-scene="charge"] .msg--charge, .pf[data-scene="full"] .msg--full { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.pf[data-scene="intro"] .msg__sub { opacity: 1; }
.msg--charge { font-family: var(--head); font-weight: 700; font-size: clamp(18px, 4.4vw, 26px); color: #fff; text-shadow: 0 2px 16px rgba(0, 0, 0, .8); }
.msg--full { font-family: var(--head); font-weight: 800; font-size: clamp(26px, 6.4vw, 46px); line-height: 1.1; color: var(--gold); text-wrap: balance; text-shadow: 0 0 30px rgba(255, 211, 90, .7), 0 3px 0 rgba(0, 0, 0, .35); }

.hint { position: absolute; z-index: 5; left: 0; top: 0; margin: 0; padding: 8px 14px; border-radius: 999px; background: rgba(237, 77, 53, .95); color: #fff; font-family: var(--head); font-weight: 700; font-size: 15px; white-space: nowrap; box-shadow: 0 8px 22px rgba(0, 0, 0, .4); transform: translate(-50%, 0); opacity: 0; visibility: hidden; transition: opacity .4s 1.2s, visibility .4s 1.2s; pointer-events: none; }
.pf[data-scene="intro"] .hint { opacity: 1; visibility: visible; }
.handle { position: absolute; z-index: 4; left: 0; top: 0; width: 120px; height: 120px; margin: -60px 0 0 -60px; border: 0; border-radius: 50%; background: transparent; cursor: grab; touch-action: none; opacity: 0; visibility: hidden; }
.pf[data-scene="intro"] .handle { opacity: 1; visibility: visible; }
.handle:active { cursor: grabbing; }
.handle__ring { position: absolute; inset: 14px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .85); box-shadow: 0 0 0 4px rgba(237, 77, 53, .5), 0 0 26px rgba(255, 138, 92, .8); animation: ring .8s ease-in-out infinite alternate; }
.handle.is-drag .handle__ring { animation: none; opacity: .35; }
@keyframes ring { to { transform: scale(1.12); box-shadow: 0 0 0 8px rgba(237, 77, 53, .3), 0 0 40px rgba(255, 138, 92, 1); } }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 54px; padding: 0 24px; border-radius: 16px; border: 0; cursor: pointer; text-decoration: none; font-family: var(--head); font-weight: 700; font-size: 17px; transition: transform .12s, filter .2s; }
.btn svg { width: 22px; height: 22px; }
.btn--red { color: #fff; background: linear-gradient(180deg, #ff8a5c, #ed4d35 55%, #c63a24); box-shadow: 0 0 0 2px rgba(255, 255, 255, .25) inset, 0 10px 26px rgba(237, 77, 53, .4), 0 3px 0 #7a1d10; }
.btn--red:hover { filter: brightness(1.06); } .btn--red:active { transform: translateY(2px); }
.btn--ghost { color: #fff; background: rgba(0, 0, 0, .2); border: 2px solid rgba(255, 255, 255, .5); font-size: 15px; min-height: 48px; }
.btn--ghost:hover { border-color: var(--red-hi); color: var(--red-hi); }
.btn:focus-visible, .iconbtn:focus-visible, .handle:focus-visible, .foot a:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

.final { position: absolute; z-index: 5; inset: 0; display: flex; flex-direction: column; overflow-y: auto; padding: calc(var(--safe-t) + 16px) 14px 14px; opacity: 0; visibility: hidden; transition: opacity 1s, visibility 1s; }
.pf[data-scene="final"] .final { opacity: 1; visibility: visible; }
.final__card { margin: auto auto 5vh; flex-shrink: 0; width: min(560px, 100%); padding: 20px 22px 18px; text-align: center; border-radius: 26px;
  background: linear-gradient(180deg, rgba(30, 26, 24, .62), rgba(16, 14, 13, .88)); border: 1px solid rgba(255, 255, 255, .2); box-shadow: 0 30px 70px rgba(0, 0, 0, .5); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); transform: translateY(16px); transition: transform 1s cubic-bezier(.2, .8, .2, 1); }
.pf[data-scene="final"] .final__card { transform: none; }
.final__pf { margin: 0; font-family: var(--head); font-weight: 800; font-size: clamp(64px, 19vw, 128px); line-height: .95; letter-spacing: -.02em; color: #fff; text-shadow: 0 0 34px rgba(255, 138, 92, .6), 0 4px 0 rgba(0, 0, 0, .3); }
.final__pf span { background: linear-gradient(180deg, #ed4037, #ed8f28); -webkit-background-clip: text; background-clip: text; color: transparent; }
.final__wish { margin: 10px auto 0; max-width: 460px; font-size: clamp(15.5px, 3.8vw, 18px); font-weight: 500; line-height: 1.5; color: #f6f1ec; text-wrap: balance; }
.final__sign { margin: 12px 0 0; font-family: var(--head); font-size: clamp(15px, 3.6vw, 17px); font-weight: 700; color: var(--gold); }
.final__logo { display: inline-flex; margin-top: 12px; padding: 5px 14px; border-radius: 14px; background: #fff; box-shadow: 0 6px 18px rgba(0, 0, 0, .35); }
.final__logo img { display: block; width: 160px; height: auto; }
.final__actions { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

.foot { flex: none; position: relative; z-index: 7; height: calc(30px + var(--safe-b)); padding: 0 16px var(--safe-b); display: flex; align-items: center; justify-content: center; background: #0f0e0e; font-size: 12.5px; color: rgba(235, 228, 222, .75); }
.foot a { margin-left: .3em; color: #fff; font-weight: 700; text-decoration: none; border-bottom: 1px solid var(--red); }
.foot a:hover { color: var(--red-hi); border-bottom-color: var(--red-hi); }
.noscript { position: absolute; inset: auto 0 45% 0; text-align: center; }

@media (max-width: 420px) { .top__logo img { width: 86px; } .final__card { padding: 16px 14px 14px; } .final__logo img { width: 130px; } .btn { font-size: 16px; } .hint { font-size: 13.5px; } }
@media (min-width: 900px) and (min-aspect-ratio: 4/3) { .final__card { margin: auto 5vw auto auto; } }
@media (max-height: 500px) and (min-aspect-ratio: 1/1) {
  .msg { top: calc(var(--safe-t) + 12px); width: min(560px, calc(100% - 220px)); }
  .msg__title { font-size: clamp(20px, 4.2vw, 30px); } .msg__sub { margin-top: 4px; font-size: 15px; }
  .final { padding-top: calc(var(--safe-t) + 8px); }
  .final__card { margin: auto 12px auto auto; width: min(440px, 58%); padding: 10px 14px; }
  .final__pf { font-size: 54px; } .final__wish { margin-top: 4px; font-size: 13px; line-height: 1.35; } .final__sign { margin-top: 6px; font-size: 13.5px; }
  .final__logo { margin-top: 6px; padding: 3px 10px; } .final__logo img { width: 100px; }
  .final__actions { margin-top: 8px; } .btn { min-height: 42px; font-size: 14px; padding: 0 14px; }
  .foot { height: calc(24px + var(--safe-b)); font-size: 11.5px; }
}
@media (prefers-reduced-motion: reduce) { .handle__ring { animation: none; } }
