/* =====================================================================
   IFEM 2027 — congress companion app
   ===================================================================== */
@font-face { font-family: "Jakarta"; src: url(../assets/fonts/jakarta-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Jakarta"; src: url(../assets/fonts/jakarta-500.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Jakarta"; src: url(../assets/fonts/jakarta-600.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Jakarta"; src: url(../assets/fonts/jakarta-700.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Jakarta"; src: url(../assets/fonts/jakarta-800.woff2) format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Playfair"; src: url(../assets/fonts/playfair-500-italic.woff2) format("woff2"); font-weight: 500; font-style: italic; font-display: swap; }

:root {
  --bg: #f4f5fa;
  --surface: #ffffff;
  --surface-2: #eef0f7;
  --ink: #14162b;
  --ink-2: #3a3e5a;
  --muted: #6b7090;
  --line: rgba(20, 22, 43, .08);
  --brand: #3d34e0;
  --brand-2: #6a6cf6;
  --brand-soft: rgba(61, 52, 224, .09);
  --red: #e5383b;
  --green: #1f9d6c;
  --green-soft: rgba(31, 157, 108, .12);
  --gold: #e8a21a;
  --gold-soft: rgba(232, 162, 26, .14);
  --shadow: 0 1px 2px rgba(20,22,43,.04), 0 8px 24px -12px rgba(20,22,43,.16);
  --shadow-lg: 0 24px 48px -20px rgba(34,28,158,.35);
  --r: 20px;
  --r-sm: 14px;
  --ease: cubic-bezier(.22, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.4, .5, 1);
  --sans: "Jakarta", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Playfair", Georgia, serif;
  --bar-h: 56px;
  --tab-h: 64px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --pad: 18px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1022; --surface: #181a33; --surface-2: #20233f; --ink: #eef0ff; --ink-2: #c9cce6; --muted: #9094b8;
    --line: rgba(255,255,255,.08); --brand: #8b8dff; --brand-2: #a5a7ff; --brand-soft: rgba(139,141,255,.14);
    --green: #3cc48f; --green-soft: rgba(60,196,143,.14); --gold-soft: rgba(232,162,26,.18);
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px -14px rgba(0,0,0,.6); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
    --bg: #0e1022; --surface: #181a33; --surface-2: #20233f; --ink: #eef0ff; --ink-2: #c9cce6; --muted: #9094b8;
    --line: rgba(255,255,255,.08); --brand: #8b8dff; --brand-2: #a5a7ff; --brand-soft: rgba(139,141,255,.14);
    --green: #3cc48f; --green-soft: rgba(60,196,143,.14); --gold-soft: rgba(232,162,26,.18);
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px -14px rgba(0,0,0,.6); color-scheme: dark;
  }

*, *::before, *::after { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
body { overscroll-behavior-y: none; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
:focus-visible { outline: 2.5px solid var(--brand); outline-offset: 2px; border-radius: 8px; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -.02em; }
p { margin: 0; }

/* ---------- splash ---------- */
.splash { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: var(--bg); color: var(--brand); transition: opacity .5s var(--ease), visibility .5s; }
.splash.is-done { opacity: 0; visibility: hidden; }
.splash__mark { width: 140px; text-align: center; }
.splash__mark svg { width: 140px; height: 76px; }
.splash__mark path { stroke-dasharray: 300; stroke-dashoffset: 300; animation: draw 1.1s var(--ease) forwards; }
.splash__mark .d2 { animation-delay: .1s; } .splash__mark .d3 { animation-delay: .25s; } .splash__mark .d4 { animation-delay: .4s; }
.splash__name { margin-top: 10px; font-weight: 800; letter-spacing: .3em; font-size: 12px; color: var(--ink); opacity: 0; animation: fadeUp .6s .5s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- app frame ---------- */
.app { min-height: 100%; }
.bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 30; height: calc(var(--bar-h) + var(--safe-t)); padding: var(--safe-t) 8px 0;
  display: flex; align-items: center; gap: 4px;
  background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: saturate(1.8) blur(20px); -webkit-backdrop-filter: saturate(1.8) blur(20px);
  border-bottom: 1px solid transparent; transition: border-color .3s, background .3s;
}
.bar.is-raised { border-bottom-color: var(--line); }
.bar__btn { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; color: var(--ink); transition: background .2s, transform .2s; }
.bar__btn:active { transform: scale(.9); background: var(--surface-2); }
.bar__title { flex: 1; min-width: 0; padding: 0 8px; font-weight: 700; font-size: 16.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: 0; transform: translateY(6px); transition: opacity .25s, transform .25s var(--ease); }
.bar.show-title .bar__title { opacity: 1; transform: none; }
.bar__title img { height: 30px; width: auto; }
.bar__actions { display: flex; align-items: center; gap: 6px; }
.bar__offline { font-size: 11px; font-weight: 700; padding: 4px 9px; border-radius: 99px; background: var(--gold-soft); color: #a46c00; }

.view { padding: calc(var(--bar-h) + var(--safe-t)) 0 calc(var(--tab-h) + var(--safe-b) + 24px); min-height: 100vh; outline: none; }
.screen { padding: 0 var(--pad); max-width: 760px; margin: 0 auto; }
.screen.enter { animation: enterTab .38s var(--ease) both; }
.screen.enter-push { animation: enterPush .42s var(--ease) both; }
.screen.enter-pop { animation: enterPop .38s var(--ease) both; }
@keyframes enterTab { from { opacity: 0; transform: translateY(10px); } }
@keyframes enterPush { from { opacity: 0; transform: translateX(32px); } }
@keyframes enterPop { from { opacity: 0; transform: translateX(-24px); } }
.stagger > * { animation: fadeUp .5s var(--ease) both; }
.stagger > *:nth-child(1) { animation-delay: .03s; } .stagger > *:nth-child(2) { animation-delay: .07s; }
.stagger > *:nth-child(3) { animation-delay: .11s; } .stagger > *:nth-child(4) { animation-delay: .15s; }
.stagger > *:nth-child(5) { animation-delay: .19s; } .stagger > *:nth-child(6) { animation-delay: .23s; }
.stagger > *:nth-child(n+7) { animation-delay: .27s; }

/* ---------- tab bar ---------- */
.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; height: calc(var(--tab-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: color-mix(in srgb, var(--surface) 82%, transparent); backdrop-filter: saturate(1.8) blur(22px); -webkit-backdrop-filter: saturate(1.8) blur(22px);
  border-top: 1px solid var(--line);
}
.tabs a { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 10.5px; font-weight: 600; color: var(--muted); transition: color .25s; }
.tabs a svg { transition: transform .35s var(--spring); }
.tabs a.is-active { color: var(--brand); }
.tabs a.is-active svg { transform: translateY(-1px) scale(1.08); stroke-width: 2.1; }
.tabs a:active svg { transform: scale(.86); }
.tabs__ink { position: absolute; top: 7px; height: 32px; width: 56px; border-radius: 16px; background: var(--brand-soft); transition: transform .45s var(--spring); left: 0; }

/* ---------- headings ---------- */
.title { padding: 8px 0 14px; }
.title h1 { font-size: 32px; font-weight: 800; line-height: 1.1; letter-spacing: -.035em; }
.title p { color: var(--muted); margin-top: 4px; font-size: 14.5px; }
.title em { font-family: var(--serif); font-style: italic; font-weight: 500; color: var(--brand); letter-spacing: -.01em; }
.section-h { display: flex; align-items: baseline; justify-content: space-between; margin: 26px 0 10px; }
.section-h h2 { font-size: 18px; font-weight: 800; }
.section-h a { font-size: 13.5px; font-weight: 700; color: var(--brand); }
.eyebrow { font-size: 11px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--brand); }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* ---------- surfaces ---------- */
.card { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); border: 1px solid var(--line); }
.pad { padding: 16px; }
.list { background: var(--surface); border-radius: var(--r); border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden; }
.row { display: flex; align-items: center; gap: 14px; padding: 13px 16px; min-height: 58px; position: relative; transition: background .15s; width: 100%; text-align: left; }
.row + .row::before { content: ""; position: absolute; top: 0; left: 62px; right: 0; border-top: 1px solid var(--line); }
.row:active { background: var(--surface-2); }
.row__ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-size: 17px; background: var(--brand-soft); color: var(--brand); flex: none; }
.row__ico svg { width: 19px; height: 19px; }
.row__body { flex: 1; min-width: 0; }
.row__body b { display: block; font-size: 15px; font-weight: 600; }
.row__body span { display: block; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row__chev { color: var(--muted); opacity: .6; width: 18px; height: 18px; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 99px; font-size: 11.5px; font-weight: 700; background: var(--brand-soft); color: var(--brand); white-space: nowrap; }
.chip--green { background: var(--green-soft); color: var(--green); }
.chip--gold { background: var(--gold-soft); color: #a46c00; }
.chip--red { background: rgba(229,56,59,.12); color: var(--red); }
.chip--plain { background: var(--surface-2); color: var(--ink-2); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .chip--gold, :root:not([data-theme="light"]) .bar__offline { color: #f3c35a; } }
:root[data-theme="dark"] .chip--gold, :root[data-theme="dark"] .bar__offline { color: #f3c35a; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 20px; border-radius: 14px; font-weight: 700; font-size: 14.5px; background: var(--brand); color: #fff; transition: transform .2s var(--ease), opacity .2s; }
.btn:active { transform: scale(.96); }
.btn svg { width: 18px; height: 18px; }
.btn--soft { background: var(--brand-soft); color: var(--brand); }
.btn--ghost { background: var(--surface-2); color: var(--ink); }
.btn--block { width: 100%; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-row .btn { flex: 1; }

/* ---------- home ---------- */
.hero {
  position: relative; height: 258px; margin: 6px 0 0; border-radius: 26px; overflow: hidden; isolation: isolate;
  background: linear-gradient(180deg, #8fb4e6 0%, #c3d6ef 50%, #eef1f4 100%); box-shadow: var(--shadow-lg);
}
.hero.is-night { background: radial-gradient(120% 90% at 70% 0%, #2c2f73, #12142e 60%); }
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 1.2s var(--ease); touch-action: pan-y; }
.hero canvas.is-ready { opacity: 1; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(180deg, rgba(10,12,32,0) 48%, rgba(10,12,32,.72) 100%); }
.hero.is-night::after { background: linear-gradient(180deg, rgba(14,16,34,0) 40%, rgba(14,16,34,.88)); }
.hero__sun { position: absolute; left: 62%; top: 22%; width: 260px; height: 260px; transform: translate(-50%,-50%); border-radius: 50%; background: radial-gradient(circle, rgba(255,243,210,.95), rgba(255,236,196,0) 62%); z-index: -1; }
.hero.is-night .hero__sun { background: radial-gradient(circle, rgba(220,224,255,.35), transparent 60%); width: 120px; height: 120px; }
.hero__top { position: absolute; z-index: 2; top: 14px; left: 16px; right: 16px; display: flex; justify-content: space-between; align-items: flex-start; pointer-events: none; }
.hero__logo { height: 64px; width: auto; filter: drop-shadow(0 4px 12px rgba(0,0,0,.12)); }
.hero__wordmark { font-weight: 800; font-size: 22px; letter-spacing: -.02em; color: #1a1c3a; }
.hero.is-night .hero__wordmark { color: #fff; }
.hero__clock { pointer-events: auto; font-size: 11.5px; font-weight: 700; padding: 6px 10px; border-radius: 99px; background: rgba(255,255,255,.75); backdrop-filter: blur(8px); color: #1a1c3a; }
.hero.is-night .hero__clock { background: rgba(20,22,50,.6); color: #e7e8ff; }
.hero__bottom { position: absolute; z-index: 2; left: 16px; right: 16px; bottom: 14px; }
.hero__tag { font-family: var(--serif); font-style: italic; font-size: 21px; line-height: 1.15; color: #fff; text-shadow: 0 2px 12px rgba(0,0,0,.25); }
.hero__meta { margin-top: 4px; font-size: 12.5px; font-weight: 600; color: rgba(255,255,255,.88); display: flex; gap: 10px; flex-wrap: wrap; }
.hero__hint { position: absolute; z-index: 2; right: 14px; bottom: 16px; font-size: 10.5px; color: var(--muted); pointer-events: none; }

.status { margin-top: 14px; padding: 16px; border-radius: var(--r); color: #fff; background: linear-gradient(135deg, #2b22c9, #4b45ec 55%, #6f86ff); box-shadow: var(--shadow-lg); position: relative; overflow: hidden; }
.status::before { content: ""; position: absolute; width: 220px; height: 220px; right: -60px; top: -90px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.25), transparent 65%); animation: float 9s ease-in-out infinite alternate; }
@keyframes float { to { transform: translate(-30px, 30px); } }
.status small { display: block; font-size: 11px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; opacity: .8; }
.cd { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 10px; }
.cd div { text-align: center; background: rgba(255,255,255,.12); border-radius: 14px; padding: 10px 0 8px; }
.cd b { display: block; font-size: 28px; font-weight: 800; letter-spacing: -.04em; font-variant-numeric: tabular-nums; line-height: 1; }
.cd span { font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; opacity: .75; }
.cd b.tick { animation: tick .45s var(--ease); }
@keyframes tick { from { transform: translateY(-30%); opacity: .3; } }
.now { margin-top: 10px; display: grid; gap: 8px; }
.now a { display: flex; gap: 12px; align-items: center; background: rgba(255,255,255,.12); border-radius: 14px; padding: 10px 12px; }
.now a b { display: block; font-size: 14.5px; }
.now a span { font-size: 12px; opacity: .8; }
.now .live { flex: none; font-size: 10px; font-weight: 800; letter-spacing: .1em; padding: 4px 7px; border-radius: 6px; background: #ff4d5a; }
.now .next { background: rgba(255,255,255,.22); }

.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 16px; }
.quick a { display: flex; flex-direction: column; align-items: center; gap: 7px; font-size: 11.5px; font-weight: 600; color: var(--ink-2); text-align: center; line-height: 1.25; }
.quick a i { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; font-style: normal; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); color: var(--brand); transition: transform .3s var(--spring); }
.quick a:active i { transform: scale(.88); }
.quick a i svg { width: 24px; height: 24px; }

.hscroll { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 calc(var(--pad) * -1); padding: 2px var(--pad) 10px; scrollbar-width: none; }
.hscroll::-webkit-scrollbar { display: none; }
.hscroll > * { scroll-snap-align: start; flex: none; }
.deadline { width: 168px; padding: 14px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.deadline .ico { font-size: 20px; }
.deadline small { display: block; font-size: 10.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-top: 8px; }
.deadline b { display: block; font-size: 15px; margin-top: 2px; }
.deadline .rel { display: inline-block; margin-top: 8px; }
.news { display: block; padding: 14px 16px; }
.news + .news { border-top: 1px solid var(--line); }
.news small { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.news b { display: block; font-size: 15px; margin: 2px 0; }
.news p { font-size: 13.5px; color: var(--ink-2); }
.install { display: flex; gap: 14px; align-items: center; padding: 14px 16px; margin-top: 16px; }
.install img { width: 44px; height: 44px; border-radius: 12px; }
.install div { flex: 1; }
.install b { display: block; font-size: 14.5px; }
.install span { font-size: 12.5px; color: var(--muted); }
.help { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.help a { padding: 14px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.help a b { display: block; font-size: 15px; margin-top: 6px; }
.help a span { font-size: 12px; color: var(--muted); }
.help a.sos b { color: var(--red); font-size: 22px; letter-spacing: .02em; }

/* ---------- segmented / chips ---------- */
.seg { position: sticky; top: calc(var(--bar-h) + var(--safe-t)); z-index: 10; margin: 0 calc(var(--pad) * -1); padding: 8px var(--pad); background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.pills { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.pills::-webkit-scrollbar { display: none; }
.pill { flex: none; padding: 8px 14px; border-radius: 99px; font-size: 13.5px; font-weight: 700; background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); transition: background .25s, color .25s, transform .2s; }
.pill:active { transform: scale(.94); }
.pill.is-on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.day-pill { display: flex; flex-direction: column; align-items: center; line-height: 1.15; padding: 8px 12px; min-width: 62px; border-radius: 16px; }
.day-pill small { font-size: 10.5px; font-weight: 700; opacity: .7; }
.day-pill b { font-size: 17px; }
.day-pill.is-today { box-shadow: inset 0 0 0 2px var(--brand); }
.toggle { display: inline-flex; padding: 3px; background: var(--surface-2); border-radius: 12px; margin-top: 10px; position: relative; }
.toggle button { position: relative; z-index: 1; padding: 7px 14px; font-size: 13px; font-weight: 700; color: var(--muted); border-radius: 9px; transition: color .25s; }
.toggle button.is-on { color: var(--ink); }
.toggle i { position: absolute; top: 3px; bottom: 3px; left: 3px; border-radius: 9px; background: var(--surface); box-shadow: 0 1px 3px rgba(0,0,0,.12); transition: transform .4s var(--spring), width .4s var(--spring); }

/* ---------- programme ---------- */
.day-head { margin: 18px 0 10px; display: flex; align-items: baseline; gap: 10px; }
.day-head h2 { font-size: 20px; font-weight: 800; }
.tl { position: relative; display: grid; gap: 10px; }
.session { display: grid; grid-template-columns: 54px 1fr auto; gap: 12px; align-items: start; padding: 14px 12px 14px 14px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); position: relative; overflow: hidden; }
.session::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 4px; border-radius: 0 4px 4px 0; background: var(--k, var(--brand)); }
.session time { font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.2; }
.session time span { display: block; font-size: 11.5px; color: var(--muted); font-weight: 600; }
.session b { display: block; font-size: 15px; line-height: 1.3; }
.session .where { display: block; font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.session .tags { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.session.is-live { box-shadow: 0 0 0 2px #ff4d5a, var(--shadow); }
.session.is-past { opacity: .55; }
.star { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); transition: transform .35s var(--spring), color .2s; }
.star svg { width: 21px; height: 21px; }
.star.is-on { color: var(--gold); }
.star.is-on svg { fill: currentColor; }
.star.pop { animation: pop .45s var(--spring); }
@keyframes pop { 40% { transform: scale(1.35) rotate(-12deg); } }
.k-science { --k: #3d34e0; } .k-social { --k: #e5383b; } .k-plenary { --k: #1f9d6c; } .k-workshop { --k: #e8a21a; } .k-marketplace { --k: #b04de0; } .k-invite { --k: #6b7090; }
.notice { display: flex; gap: 12px; padding: 14px; border-radius: 16px; background: var(--brand-soft); color: var(--ink-2); font-size: 13.5px; margin-top: 12px; }
.notice svg { color: var(--brand); margin-top: 1px; }
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty .big { font-size: 40px; margin-bottom: 8px; }

/* ---------- media cards ---------- */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile { position: relative; display: block; border-radius: 18px; overflow: hidden; background: var(--surface-2); aspect-ratio: 4 / 5; box-shadow: var(--shadow); isolation: isolate; transition: transform .25s var(--ease); }
.tile:active { transform: scale(.97); }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.tile::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, transparent 40%, rgba(8,10,28,.85)); }
.tile .em { position: absolute; top: 10px; left: 10px; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: rgba(255,255,255,.92); font-size: 16px; }
.tile b { position: absolute; left: 12px; right: 12px; bottom: 12px; color: #fff; font-size: 14.5px; line-height: 1.25; }
.tile--wide { aspect-ratio: 16 / 9; grid-column: span 2; }
.tile--wide b { font-size: 18px; }
.feature { position: relative; border-radius: 22px; overflow: hidden; aspect-ratio: 16 / 10; box-shadow: var(--shadow-lg); isolation: isolate; display: block; }
.feature img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.feature::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, transparent 35%, rgba(8,10,28,.88)); }
.feature div { position: absolute; left: 16px; right: 16px; bottom: 14px; color: #fff; }
.feature small { font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; opacity: .85; }
.feature h2 { font-size: 22px; margin-top: 2px; }
.feature p { font-size: 13px; opacity: .85; }

/* ---------- detail ---------- */
.detail-img { margin: 0 calc(var(--pad) * -1); aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface-2); position: relative; }
.detail-img img { width: 100%; height: 100%; object-fit: cover; animation: zoomOut 1.2s var(--ease) both; }
@keyframes zoomOut { from { transform: scale(1.12); } }
.detail-img .em { position: absolute; left: var(--pad); bottom: -22px; width: 52px; height: 52px; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); display: grid; place-items: center; font-size: 26px; }
.detail h1 { font-size: 27px; font-weight: 800; line-height: 1.15; letter-spacing: -.03em; margin-top: 34px; }
.detail .lead { color: var(--ink-2); font-size: 15.5px; margin-top: 12px; line-height: 1.65; }
.detail .lead p + p { margin-top: 12px; }
.facts { display: grid; gap: 0; margin-top: 16px; }
.fact { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); font-size: 14px; }
.fact svg { color: var(--brand); width: 20px; height: 20px; margin-top: 1px; }
.fact b { display: block; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.credit { font-size: 11px; color: var(--muted); margin-top: 14px; }
.prose { color: var(--ink-2); font-size: 15px; line-height: 1.65; }
.prose p + p { margin-top: 12px; }
.prose ul { padding-left: 20px; }
.prose strong { color: var(--ink); }
.quote { font-family: var(--serif); font-style: italic; font-size: 20px; line-height: 1.4; color: var(--ink); padding-left: 14px; border-left: 3px solid var(--brand); margin: 14px 0; }
.person-head { display: flex; gap: 14px; align-items: center; margin: 8px 0 4px; }
.person-head img { width: 68px; height: 68px; border-radius: 50%; object-fit: cover; object-position: top; border: 3px solid var(--surface); box-shadow: 0 0 0 2px var(--brand); }
.person-head b { display: block; font-size: 17px; }
.person-head span { font-size: 12.5px; color: var(--muted); }

/* tables */
.ptable { width: 100%; border-collapse: collapse; font-size: 14px; }
.ptable td { padding: 12px 14px; border-top: 1px solid var(--line); }
.ptable tr:first-child td { border-top: 0; }
.ptable td:last-child { text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; }
.ptable .cur { color: var(--brand); }
.price-cat { padding: 14px 16px; }
.price-cat + .price-cat { border-top: 1px solid var(--line); }
.price-cat b { display: block; font-size: 14.5px; margin-bottom: 8px; }
.price-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.price-grid div { background: var(--surface-2); border-radius: 10px; padding: 8px 6px; text-align: center; }
.price-grid small { display: block; font-size: 9.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.price-grid strong { font-size: 15px; font-variant-numeric: tabular-nums; }
.price-grid .is-cur { background: var(--brand); color: #fff; }
.price-grid .is-cur small { color: rgba(255,255,255,.8); }
.steps { list-style: none; margin: 0; padding: 0; }
.steps li { position: relative; padding: 0 0 18px 34px; }
.steps li::before { content: ""; position: absolute; left: 0; top: 2px; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface); }
.steps li::after { content: ""; position: absolute; left: 9px; top: 22px; bottom: 2px; width: 2px; background: var(--line); }
.steps li:last-child::after { display: none; }
.steps li.done::before { background: var(--brand); border-color: var(--brand); }
.steps li.next::before { border-color: var(--gold); box-shadow: 0 0 0 4px var(--gold-soft); }
.steps b { display: block; font-size: 14.5px; }
.steps .d { font-size: 13px; font-weight: 700; color: var(--brand); }
.steps span { display: block; font-size: 12.5px; color: var(--muted); }
.people { display: grid; gap: 0; }
.ini { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-size: 12.5px; font-weight: 800; background: var(--brand-soft); color: var(--brand); flex: none; }

/* map */
.map { height: 58vh; min-height: 320px; border-radius: 20px; overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); }
.legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12.5px; color: var(--muted); margin-top: 10px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; }
.pin { width: 28px; height: 28px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); display: grid; place-items: center; border: 2px solid #fff; box-shadow: 0 4px 10px rgba(0,0,0,.3); }
.pin span { transform: rotate(45deg); font-size: 12px; color: #fff; font-weight: 800; }
.leaflet-container { font-family: var(--sans); }

/* search */
.search-box { position: relative; margin: 4px 0 14px; }
.search-box input { width: 100%; height: 48px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: 0 14px 0 44px; font: inherit; font-size: 16px; box-shadow: var(--shadow); }
.search-box input:focus { outline: none; border-color: var(--brand); }
.search-box svg { position: absolute; left: 14px; top: 13px; color: var(--muted); }
mark { background: var(--gold-soft); color: inherit; border-radius: 3px; }

/* forms */
.field { display: block; margin-bottom: 12px; }
.field span { display: block; font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 5px; }
.field input, .field select, .field textarea { width: 100%; font: inherit; font-size: 16px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.field textarea { min-height: 110px; resize: vertical; }

/* ---------- sheet & toast ---------- */
.sheet { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center; }
.sheet__scrim { position: absolute; inset: 0; background: rgba(8,10,28,.45); animation: fade .3s both; }
.sheet__panel { position: relative; width: 100%; max-width: 560px; background: var(--surface); border-radius: 26px 26px 0 0; padding: 10px 20px calc(24px + var(--safe-b)); animation: up .45s var(--ease) both; max-height: 85vh; overflow: auto; }
.sheet.is-closing .sheet__panel { animation: up .3s var(--ease) reverse both; }
.sheet.is-closing .sheet__scrim { animation: fade .3s reverse both; }
.sheet__grip { width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 14px; }
.sheet h3 { font-size: 19px; margin-bottom: 8px; }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(100%); } }
.toast { position: fixed; left: 50%; bottom: calc(var(--tab-h) + var(--safe-b) + 14px); z-index: 70; transform: translate(-50%, 20px); opacity: 0; visibility: hidden; background: var(--ink); color: var(--bg); padding: 11px 18px; border-radius: 14px; font-size: 14px; font-weight: 600; box-shadow: 0 14px 30px -10px rgba(0,0,0,.4); transition: .35s var(--ease); max-width: calc(100% - 32px); }
.toast.is-show { transform: translate(-50%, 0); opacity: 1; visibility: visible; }

/* ---------- larger screens: side rail ---------- */
@media (min-width: 900px) {
  :root { --pad: 28px; }
  .tabs { top: 0; right: auto; width: 96px; height: auto; padding: calc(var(--bar-h) + 20px) 0 0; grid-template-columns: 1fr; grid-auto-rows: 76px; align-content: start; border-top: 0; border-right: 1px solid var(--line); }
  .tabs__ink { display: none; }
  .tabs a.is-active::before { content: ""; position: absolute; inset: 8px 14px; border-radius: 18px; background: var(--brand-soft); z-index: -1; }
  .bar { left: 96px; }
  .view { padding-left: 96px; padding-bottom: 40px; }
  .toast { bottom: 24px; }
  .hero { height: 340px; }
  .hero__logo { height: 84px; }
  .hero__tag { font-size: 28px; }
  .quick { grid-template-columns: repeat(8, 1fr); }
  .grid2 { grid-template-columns: repeat(3, 1fr); }
  .tile--wide { grid-column: span 3; aspect-ratio: 21 / 8; }
  .detail-img { margin: 0; border-radius: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
}
