:root {
  --ink: #1b1510;
  --ink-2: #2a2119;
  --bronze: #8a5a2b;
  --gold: #d6aa5a;
  --gold-2: #f0d293;
  --parch: #efe2c4;
  --parch-2: #e3d0a6;
  --text: #f4ead6;
  --muted: #bfae8e;
  --empire: #c2412f;
  --neo: #3d86b8;
  --glass: rgba(24, 18, 13, .78);
  --glass-line: rgba(214, 170, 90, .28);
  --shadow: 0 18px 50px rgba(0, 0, 0, .45);
  --r: 16px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --serif: "Cormorant Garamond", Georgia, serif;
  --display: "Cinzel", "Trajan Pro", Georgia, serif;
  --ui: "Inter", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--ink); color: var(--text); font-family: var(--ui); }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
svg { width: 1em; height: 1em; }
.leaflet-container svg.leaflet-zoom-animated, .leaflet-pane > svg { width: auto; height: auto; }
a { color: var(--gold-2); }

.glass {
  background: var(--glass);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border: 1px solid var(--glass-line);
  box-shadow: var(--shadow);
  border-radius: var(--r);
}

.btn { display: inline-flex; align-items: center; gap: .5em; padding: .85em 1.6em; border-radius: 999px; font-weight: 600; letter-spacing: .03em; transition: transform .25s var(--ease), box-shadow .25s, background .25s; }
.btn svg { width: 1.1em; height: 1.1em; }
.btn.sm { padding: .55em 1em; font-size: .85rem; }
.btn-gold { background: linear-gradient(135deg, #f3d48e, #c58f3d 60%, #9a6526); color: #23170b; box-shadow: 0 8px 28px rgba(214, 170, 90, .35), inset 0 1px 0 rgba(255, 255, 255, .5); }
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 12px 34px rgba(214, 170, 90, .5); }
.btn-ghost { border: 1px solid var(--glass-line); background: rgba(255, 255, 255, .04); }
.btn-ghost:hover { background: rgba(214, 170, 90, .14); transform: translateY(-1px); }

/* ---------- Intro ---------- */
#intro { position: fixed; inset: 0; z-index: 3000; display: grid; place-items: center; overflow: hidden; background: #0d0a07; transition: opacity 1.1s var(--ease), transform 1.4s var(--ease), filter 1.1s; }
#intro.out { opacity: 0; transform: scale(1.08); filter: blur(8px); pointer-events: none; }
.intro-slides { position: absolute; inset: -4%; }
.intro-slides div { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0; transition: opacity 2.2s ease; filter: sepia(.35) brightness(.55) contrast(1.1); }
.intro-slides div.on { opacity: 1; animation: kenburns 9s ease-out forwards; }
@keyframes kenburns { from { transform: scale(1.02) translate(0, 0); } to { transform: scale(1.16) translate(-2%, -1.5%); } }
#intro::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at center, rgba(13, 10, 7, .25), rgba(13, 10, 7, .92) 75%); }
.intro-grain { position: absolute; inset: 0; z-index: 1; opacity: .18; pointer-events: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='.6'/></svg>"); }
.intro-inner { position: relative; z-index: 2; text-align: center; padding: 24px; max-width: 760px; }
.intro-logo { width: 116px; height: 116px; color: var(--gold); filter: drop-shadow(0 0 24px rgba(214, 170, 90, .45)); }
.intro-logo .draw { stroke-dasharray: 160; stroke-dashoffset: 160; animation: draw 2.4s var(--ease) forwards; }
.intro-logo .draw:nth-child(2) { animation-delay: .25s; } .intro-logo .draw:nth-child(3) { animation-delay: .5s; }
.intro-logo .draw:nth-child(4) { animation-delay: .8s; } .intro-logo .draw:nth-child(5) { animation-delay: 1s; } .intro-logo .draw:nth-child(6) { animation-delay: 1.2s; }
.intro-logo circle { opacity: 0; animation: pop .5s var(--ease) forwards; animation-delay: 1.6s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(0); } to { opacity: 1; transform: scale(1); } }
.intro-logo circle { transform-box: fill-box; transform-origin: center; }
.intro-kicker { font-family: var(--display); letter-spacing: .45em; color: var(--gold); font-size: .8rem; margin: 18px 0 6px; opacity: 0; animation: rise 1s var(--ease) .6s forwards; }
.intro-title { font-family: var(--display); font-weight: 900; font-size: clamp(3rem, 11vw, 7.4rem); line-height: .95; margin: 0; letter-spacing: .08em; display: flex; flex-direction: column; align-items: center; }
.intro-title span { display: block; background: linear-gradient(180deg, #fff3d4, #d6aa5a 55%, #8a5a2b); -webkit-background-clip: text; background-clip: text; color: transparent; opacity: 0; letter-spacing: .5em; animation: track 1.6s var(--ease) forwards; }
.intro-title span:nth-child(2) { animation-delay: .25s; font-size: .62em; letter-spacing: .9em; }
@keyframes track { to { opacity: 1; letter-spacing: .08em; } }
.intro-title span:nth-child(2) { animation-name: track2; }
@keyframes track2 { to { opacity: 1; letter-spacing: .32em; } }
.intro-sub { font-family: var(--serif); font-size: clamp(1.1rem, 2.4vw, 1.45rem); color: #e8d9bb; line-height: 1.45; opacity: 0; animation: rise 1s var(--ease) 1s forwards; }
.intro-stats { display: flex; justify-content: center; gap: clamp(18px, 5vw, 56px); margin: 26px 0 30px; opacity: 0; animation: rise 1s var(--ease) 1.3s forwards; }
.intro-stats b { display: block; font-family: var(--display); font-size: clamp(1.6rem, 4vw, 2.4rem); color: var(--gold-2); }
.intro-stats span { font-size: .78rem; text-transform: uppercase; letter-spacing: .16em; color: var(--muted); }
.intro-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; opacity: 0; animation: rise 1s var(--ease) 1.6s forwards; }
.intro-credit { margin-top: 34px; font-size: .75rem; color: #9f8f72; opacity: 0; animation: rise 1s var(--ease) 2s forwards; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* ---------- Map ---------- */
#map { position: fixed; inset: 0; background: #cbb68c; }
.leaflet-container { font-family: var(--ui); background: #b9c6c2; }
.tiles-ancient { filter: sepia(.62) saturate(.78) hue-rotate(-10deg) brightness(1.04) contrast(1.06); }
.tiles-detail { filter: sepia(.75) saturate(.6) hue-rotate(-12deg) brightness(1.02) contrast(1.02); }
.tiles-relief { mix-blend-mode: multiply; opacity: .5; filter: sepia(.4); }
.tiles-dim { filter: saturate(.85) brightness(.96); }
.map-vignette { position: fixed; inset: 0; pointer-events: none; z-index: 400; background:
  radial-gradient(ellipse at center, transparent 55%, rgba(40, 24, 8, .38) 100%),
  url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='p'><feTurbulence type='fractalNoise' baseFrequency='.55' numOctaves='3' seed='4'/><feColorMatrix values='0 0 0 0 .45  0 0 0 0 .32  0 0 0 0 .16  0 0 0 .55 0'/></filter><rect width='100%' height='100%' filter='url(%23p)'/></svg>");
  mix-blend-mode: multiply; opacity: .55; transition: opacity .6s; }
body.base-modern .map-vignette { opacity: .18; }
.leaflet-control-attribution { background: rgba(24, 18, 13, .7) !important; color: #cdbd9c !important; font-size: 10px; border-radius: 8px 0 0 0; max-width: 60vw; }
.leaflet-control-attribution a { color: var(--gold-2) !important; }
.leaflet-bar { border: 1px solid var(--glass-line) !important; box-shadow: var(--shadow) !important; border-radius: 12px !important; overflow: hidden; }
.leaflet-bar a { background: var(--glass) !important; color: var(--gold-2) !important; border-bottom-color: var(--glass-line) !important; backdrop-filter: blur(10px); }
.leaflet-bar a:hover { background: rgba(214, 170, 90, .25) !important; }
.leaflet-control-scale-line { background: rgba(24, 18, 13, .6); color: var(--parch); border-color: var(--gold); }
.leaflet-bottom.leaflet-right { bottom: 104px; }
.leaflet-bottom.leaflet-left { bottom: 104px; }

/* regions */
.region { transition: opacity 1.2s var(--ease), fill-opacity 1.2s, stroke-dashoffset 2s; opacity: 0; pointer-events: none; }
.region.on { opacity: 1; pointer-events: auto; }
.region.k-hatti { animation: breathe 6s ease-in-out infinite; }
@keyframes breathe { 50% { fill-opacity: .34; } }
.region-label { font-family: var(--display); font-weight: 700; text-transform: uppercase; letter-spacing: .32em; font-size: 12px; white-space: nowrap; text-align: center; color: rgba(70, 25, 12, .8); text-shadow: 0 0 6px rgba(255, 240, 210, .9), 0 0 2px rgba(255, 240, 210, .9); opacity: 0; transform: translateY(6px) scale(.96); transition: opacity 1s var(--ease), transform 1s var(--ease); pointer-events: none; }
.region-label.on { opacity: 1; transform: none; }
.region-label.k-vassal { color: rgba(110, 50, 25, .75); font-size: 10px; letter-spacing: .2em; }
.region-label.k-rival, .region-label.k-enemy, .region-label.k-aram { color: rgba(40, 40, 50, .72); font-size: 10.5px; }
.region-label.k-neo { color: rgba(18, 55, 85, .88); font-size: 10.5px; letter-spacing: .18em; }
body.base-modern .region-label { color: #fff; text-shadow: 0 1px 4px rgba(0, 0, 0, .9); }
.hide-regions .region, .hide-regions .region-label { opacity: 0 !important; pointer-events: none !important; }

/* ancient places */
.place { pointer-events: none; white-space: nowrap; transform: translate(-50%, -50%); opacity: 0; transition: opacity .9s var(--ease), transform .9s var(--ease); }
.place.on { opacity: 1; }
.place b { display: block; font-family: var(--serif); font-style: italic; font-weight: 600; font-size: 15px; color: #3b200e; text-shadow: 0 0 5px #fff6df, 0 0 2px #fff6df; }
.place.big b { font-family: var(--display); font-style: normal; font-weight: 700; font-size: 14px; letter-spacing: .14em; color: #5e1a0e; }
.place small { display: block; font-size: 9.5px; color: #6c5235; text-align: center; letter-spacing: .05em; text-shadow: 0 0 4px #fff6df; }
.place.faint b { color: rgba(59, 32, 14, .55); font-size: 17px; letter-spacing: .25em; text-transform: uppercase; font-family: var(--display); font-style: normal; }
.place.big::before { content: ""; position: absolute; left: 50%; top: -9px; width: 7px; height: 7px; margin-left: -3.5px; border: 1.5px solid #5e1a0e; background: #f3e1b8; transform: rotate(45deg); }
.nature { pointer-events: none; transform: translate(-50%, -50%); white-space: nowrap; font-family: var(--serif); font-style: italic; color: rgba(30, 70, 105, .75); font-size: 13px; letter-spacing: .12em; text-shadow: 0 0 4px rgba(230, 240, 245, .8); }
.nature.sea { font-family: var(--display); font-style: normal; font-size: 13px; letter-spacing: .6em; color: rgba(30, 70, 105, .5); }
.nature small { display: block; font-size: 9px; letter-spacing: .1em; }
body.base-modern .place b, body.base-modern .place small, body.base-modern .nature { color: #fff; text-shadow: 0 1px 4px #000, 0 0 2px #000; }
.hide-places .place { opacity: 0 !important; }

/* routes */
.route { fill: none; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transition: opacity .8s; pointer-events: none; }
.route.on { opacity: 1; pointer-events: stroke; }
.route.trade { stroke: #7a4a16; stroke-width: 3; stroke-dasharray: 2 9; animation: march 1.2s linear infinite; }
.route.campaign { stroke: #b3241a; stroke-width: 3.5; stroke-dasharray: 14 10; animation: march .9s linear infinite; filter: drop-shadow(0 0 3px rgba(255, 220, 180, .9)); }
.route.enemy { stroke: #23364a; stroke-width: 3; stroke-dasharray: 10 8; animation: march 1.1s linear infinite; }
.route-glow { fill: none; stroke: rgba(255, 238, 200, .55); stroke-width: 9; stroke-linecap: round; opacity: 0; transition: opacity .8s; pointer-events: none; }
.route-glow.on { opacity: 1; }
@keyframes march { to { stroke-dashoffset: -46; } }
.hide-routes .route, .hide-routes .route-glow, .hide-routes .battle, .hide-routes .army { opacity: 0 !important; }
.army { width: 26px; height: 26px; margin: -13px 0 0 -13px; display: grid; place-items: center; font-size: 15px; border-radius: 50%; background: #fff3d8; border: 2px solid #b3241a; box-shadow: 0 3px 10px rgba(0, 0, 0, .35); opacity: 0; transition: opacity .5s; }
.army.on { opacity: 1; }
.army.enemy { border-color: #23364a; }
.battle { width: 54px; height: 54px; margin: -27px 0 0 -27px; position: relative; opacity: 0; transition: opacity .6s; pointer-events: none; }
.battle.on { opacity: 1; }
.battle i { position: absolute; inset: 0; border-radius: 50%; border: 2px solid #c22a1a; animation: ripple 2s ease-out infinite; }
.battle i:nth-child(2) { animation-delay: .7s; } .battle i:nth-child(3) { animation-delay: 1.4s; }
.battle b { position: absolute; inset: 15px; display: grid; place-items: center; font-size: 17px; background: #fff0d6; border-radius: 50%; border: 2px solid #c22a1a; }
.battle span { position: absolute; top: 56px; left: 50%; transform: translateX(-50%); white-space: nowrap; font-family: var(--display); font-weight: 700; font-size: 11px; color: #8a1b10; letter-spacing: .08em; text-shadow: 0 0 4px #fff4dc, 0 0 2px #fff4dc; }
@keyframes ripple { from { transform: scale(.4); opacity: 1; } to { transform: scale(1.6); opacity: 0; } }
.turkey-line { stroke: #6b3d14; stroke-width: 1.4; stroke-dasharray: 5 4; fill: none; opacity: .55; pointer-events: none; }
body.base-modern .turkey-line { stroke: #f0d293; opacity: .75; }

/* monument markers */
.mk-wrap { background: none; border: 0; }
.mk { --c: var(--empire); width: 18px; height: 18px; position: relative; display: grid; place-items: center; transition: transform .45s var(--ease), opacity .45s var(--ease); transition-delay: var(--d, 0s); }
.mk.neo { --c: var(--neo); }
.mk i { width: 11px; height: 11px; background: var(--c); border: 2px solid #fff4dc; box-shadow: 0 2px 6px rgba(0, 0, 0, .5); transition: transform .25s var(--ease), box-shadow .25s; }
.mk.inscr i { transform: rotate(45deg); }
.mk.rock i { background: #fff4dc; border: 3px solid var(--c); }
.mk.both i { background: linear-gradient(135deg, var(--empire) 50%, var(--neo) 50%); }
.mk.rock.both i { background: #fff4dc; border-color: var(--empire) var(--neo) var(--neo) var(--empire); }
.mk:hover i, .mk.hot i { transform: scale(1.55) rotate(var(--rot, 0deg)); box-shadow: 0 0 0 4px rgba(255, 244, 220, .35), 0 4px 14px rgba(0, 0, 0, .55); }
.mk.inscr { --rot: 45deg; }
.mk.off { transform: scale(0); opacity: 0; pointer-events: none; transition-delay: 0s; }
.mk.sel::before, .mk.sel::after { content: ""; position: absolute; inset: -14px; border-radius: 50%; border: 2px solid var(--gold); animation: ripple 1.8s ease-out infinite; }
.mk.sel::after { animation-delay: .9s; }
.mk.sel i { transform: scale(1.7) rotate(var(--rot, 0deg)); }
.mk.dimmed { opacity: .25; }
.mk-label { background: rgba(255, 247, 228, .9) !important; border: 1px solid rgba(138, 90, 43, .45) !important; color: #3a230f !important; font-family: var(--serif); font-weight: 600; font-size: 13px; padding: 1px 7px !important; border-radius: 6px !important; box-shadow: 0 2px 6px rgba(0, 0, 0, .2) !important; display: none; }
.mk-label::before { display: none; }
.show-labels .mk-label { display: block; animation: fadein .4s; }
.show-labels .mk-wrap.hidden-site + .mk-label { display: none; }
@keyframes fadein { from { opacity: 0; } }
.osm-mk { width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: #5d7a3a; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .5); animation: pop .4s var(--ease) backwards; }
.osm-mk.museum { background: #7b4f9e; }

/* ---------- Brand (top-left) ---------- */
#brand { position: fixed; top: 16px; left: 16px; z-index: 1000; }
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; padding: 10px 18px 10px 12px; background: linear-gradient(135deg, rgba(36, 25, 15, .9), rgba(20, 14, 9, .86)); border: 1px solid var(--glass-line); border-radius: 18px; box-shadow: var(--shadow); backdrop-filter: blur(12px); transition: transform .3s var(--ease); }
.logo:hover { transform: translateY(-2px); }
.logo:hover .logo-mark { transform: rotate(-8deg) scale(1.08); }
.logo-mark { width: 46px; height: 46px; color: var(--gold); filter: drop-shadow(0 0 10px rgba(214, 170, 90, .35)); transition: transform .5s var(--ease); }
.logo-text b { display: block; font-family: var(--display); font-weight: 900; letter-spacing: .2em; font-size: 1.12rem; background: linear-gradient(180deg, #fff1cc, #d6aa5a); -webkit-background-clip: text; background-clip: text; color: transparent; }
.logo-text small { display: block; font-family: var(--serif); font-style: italic; color: var(--muted); font-size: .9rem; margin-top: 1px; }

/* ---------- Panel ---------- */
#panel { position: fixed; top: 96px; left: 16px; z-index: 990; width: 268px; padding: 6px; max-height: calc(100vh - 340px); display: flex; flex-direction: column; transition: transform .5s var(--ease), opacity .5s; }
.panel-toggle { display: flex; align-items: center; gap: 8px; padding: 8px 10px; font-weight: 600; font-size: .85rem; color: var(--gold-2); border-radius: 10px; width: 100%; }
.panel-toggle:hover { background: rgba(214, 170, 90, .1); }
.panel-toggle svg { width: 18px; height: 18px; }
.panel-body { overflow: auto; padding: 0 10px 10px; transition: max-height .5s var(--ease), opacity .4s; max-height: calc(100vh - 400px); }
#panel.collapsed { width: max-content !important; }
#panel.collapsed .panel-body { display: none; }
#panel.collapsed .panel-body { max-height: 0; opacity: 0; padding-bottom: 0; }
#panel h3 { font-family: var(--display); font-size: .68rem; letter-spacing: .22em; color: var(--muted); margin: 14px 0 8px; font-weight: 700; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px; border-radius: 999px; font-size: .8rem; border: 1px solid var(--glass-line); background: rgba(255, 255, 255, .03); transition: all .25s var(--ease); }
.chip:hover { border-color: var(--gold); }
.chip.on { background: rgba(214, 170, 90, .2); border-color: var(--gold); color: #fff6e0; }
.chip em { font-style: normal; font-size: .72rem; color: var(--muted); }
.dot { width: 10px; height: 10px; border-radius: 2px; border: 1.5px solid #fff4dc; }
.dot.empire { background: var(--empire); } .dot.neo { background: var(--neo); }
.shape { width: 9px; height: 9px; border: 1.5px solid var(--gold-2); }
.shape.diamond { transform: rotate(45deg); background: var(--gold-2); }
.shape.hollow { border-width: 2.5px; }
.shape.pin { border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--gold-2); }
.toggles label { display: flex; align-items: center; gap: 10px; font-size: .84rem; padding: 5px 0; cursor: pointer; color: #e9dcc2; }
.toggles input { display: none; }
.toggles span { width: 30px; height: 17px; border-radius: 999px; background: rgba(255, 255, 255, .14); position: relative; transition: background .3s; flex: none; }
.toggles span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 13px; height: 13px; border-radius: 50%; background: #e8dcc4; transition: transform .3s var(--ease); }
.toggles input:checked + span { background: var(--bronze); }
.toggles input:checked + span::after { transform: translateX(13px); background: var(--gold-2); }
.basemaps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.basemaps button { font-size: .66rem; display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--muted); }
.basemaps .bm { width: 100%; aspect-ratio: 1; border-radius: 10px; border: 2px solid transparent; background-size: cover; transition: border-color .25s, transform .25s var(--ease); }
.basemaps button:hover .bm { transform: scale(1.06); }
.basemaps button.on { color: var(--gold-2); }
.basemaps button.on .bm { border-color: var(--gold); }
.bm-antik { background: radial-gradient(circle at 30% 40%, #e8d2a0, #b98d53 70%), #c9a46a; }
.bm-topo { background: linear-gradient(135deg, #cfe2b8, #e9d8a6 45%, #c7a77d); }
.bm-osm { background: linear-gradient(135deg, #f2efe9 40%, #aad3df 41%, #aad3df 55%, #f9e9a6 56%); }
.bm-uydu { background: radial-gradient(circle at 60% 40%, #6b7d4a, #3a4a2f 60%, #1f3a4f 61%); }
.panel-count { font-size: .78rem; color: var(--muted); margin: 14px 0 2px; }
.panel-count b { color: var(--gold-2); font-family: var(--display); font-size: 1rem; }

/* ---------- Topbar ---------- */
#topbar { position: fixed; top: 16px; right: 16px; z-index: 1000; display: flex; gap: 8px; align-items: center; transition: right .55s var(--ease); }
body.drawer-open #topbar { right: calc(min(470px, 100vw) + 16px); }
.search { position: relative; display: flex; align-items: center; gap: 8px; padding: 0 12px; height: 46px; width: 330px; border-radius: 999px; transition: width .4s var(--ease); }
.search:focus-within { width: 380px; border-color: var(--gold); }
.search > svg { width: 18px; height: 18px; color: var(--gold); flex: none; }
.search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; color: var(--text); font: inherit; font-size: .92rem; }
.search input::placeholder { color: #a49373; }
.search kbd { font-family: var(--ui); font-size: .7rem; color: var(--muted); border: 1px solid var(--glass-line); border-radius: 5px; padding: 1px 6px; }
#search-results { position: absolute; top: 54px; left: 0; right: 0; margin: 0; padding: 6px; list-style: none; background: rgba(24, 18, 13, .95); border: 1px solid var(--glass-line); border-radius: 16px; box-shadow: var(--shadow); max-height: 60vh; overflow: auto; display: none; }
#search-results.on { display: block; animation: drop .25s var(--ease); }
@keyframes drop { from { opacity: 0; transform: translateY(-6px); } }
#search-results li { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 10px; cursor: pointer; }
#search-results li.act, #search-results li:hover { background: rgba(214, 170, 90, .16); }
#search-results img { width: 42px; height: 42px; object-fit: cover; border-radius: 8px; flex: none; background: #2a2119; }
#search-results b { display: block; font-size: .9rem; }
#search-results small { color: var(--muted); font-size: .74rem; }
#search-results mark { background: none; color: var(--gold-2); }
.tool { height: 46px; display: inline-flex; align-items: center; gap: 8px; padding: 0 16px; border-radius: 999px; font-size: .86rem; font-weight: 600; color: var(--gold-2); transition: transform .25s var(--ease), background .25s; }
.tool.icon { width: 46px; padding: 0; justify-content: center; }
.tool svg { width: 19px; height: 19px; }
.tool:hover { transform: translateY(-2px); background: rgba(50, 36, 22, .9); }
.tool:active { transform: scale(.94); }
#btn-random:hover svg { animation: spin .6s var(--ease); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Era card ---------- */
#era-card { position: fixed; left: 16px; bottom: 112px; z-index: 980; width: 380px; display: flex; gap: 14px; padding: 14px 16px; transition: transform .6s var(--ease), opacity .5s; }
#era-card.swap .era-info { animation: swap .7s var(--ease); }
@keyframes swap { 0% { opacity: 0; transform: translateX(-12px); } 100% { opacity: 1; transform: none; } }
.era-year { flex: none; text-align: center; padding-right: 14px; border-right: 1px solid var(--glass-line); min-width: 84px; }
.era-year small { display: block; font-family: var(--display); color: var(--muted); letter-spacing: .3em; font-size: .7rem; }
.era-year b { font-family: var(--display); font-size: 2.1rem; color: var(--gold-2); font-variant-numeric: tabular-nums; line-height: 1.1; }
.era-info h2 { margin: 0; font-family: var(--display); font-size: .98rem; letter-spacing: .06em; color: #fff4dc; }
.era-king { margin: 3px 0 6px; font-size: .82rem; color: var(--gold-2); }
.era-king span { font-size: .66rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
#era-text { margin: 0; font-family: var(--serif); font-size: 1rem; line-height: 1.35; color: #e6d8bb; }
body.tour-on #era-card, body.drawer-open #era-card { transform: translateX(-120%); opacity: 0; }

/* ---------- Event toast ---------- */
#event-toast { position: fixed; top: 84px; left: 50%; z-index: 1100; width: min(520px, calc(100vw - 32px)); padding: 14px 18px 14px 74px; transform: translate(-50%, -30px); opacity: 0; pointer-events: none; transition: transform .6s var(--ease), opacity .5s; }
#event-toast.on { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
#event-toast .ev-y { position: absolute; left: 14px; top: 14px; width: 48px; height: 48px; display: grid; place-items: center; text-align: center; border-radius: 12px; background: linear-gradient(135deg, #f3d48e, #9a6526); color: #23170b; font-family: var(--display); font-weight: 700; font-size: .72rem; line-height: 1.05; }
#event-toast h4 { margin: 0 0 3px; font-family: var(--display); font-size: .95rem; color: #fff4dc; }
#event-toast p { margin: 0; font-family: var(--serif); font-size: 1.02rem; color: #e6d8bb; line-height: 1.35; }
#event-toast .ev-go { margin-top: 6px; font-size: .78rem; color: var(--gold-2); text-decoration: underline; cursor: pointer; }

/* ---------- Timeline ---------- */
#timeline { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 1000; height: 82px; display: flex; align-items: center; gap: 12px; padding: 0 14px; transition: right .55s var(--ease); }
body.drawer-open #timeline { right: calc(min(470px, 100vw) + 16px); }
.tl-play { flex: none; width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #f3d48e, #b07a33); color: #23170b; box-shadow: 0 6px 20px rgba(214, 170, 90, .35); transition: transform .25s var(--ease); }
.tl-play:hover { transform: scale(1.08); }
.tl-play svg { width: 20px; height: 20px; }
.tl-play.playing { animation: glow 1.6s ease-in-out infinite; }
@keyframes glow { 50% { box-shadow: 0 0 0 8px rgba(214, 170, 90, .18), 0 6px 20px rgba(214, 170, 90, .35); } }
.tl-speed { flex: none; font-size: .76rem; font-weight: 600; color: var(--gold-2); border: 1px solid var(--glass-line); border-radius: 8px; padding: 4px 7px; }
.tl-track { position: relative; flex: 1; min-width: 0; height: 62px; cursor: pointer; touch-action: none; user-select: none; }
.tl-eras { position: absolute; left: 0; right: 0; top: 26px; height: 12px; border-radius: 6px; overflow: hidden; display: flex; }
.tl-eras div { position: absolute; top: 0; bottom: 0; opacity: .6; transition: opacity .3s, filter .3s; }
.tl-eras div.cur { opacity: 1; filter: brightness(1.2); }
.tl-eras span { position: absolute; top: -18px; font-size: .62rem; letter-spacing: .08em; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-transform: uppercase; }
.tl-eralabels { position: absolute; left: 0; right: 0; top: 6px; height: 14px; }
.tl-eralabels span { position: absolute; font-size: .6rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-left: 3px; transition: color .3s; }
.tl-eralabels span.cur { color: var(--gold-2); }
.tl-ticks { position: absolute; left: 0; right: 0; top: 42px; height: 18px; }
.tl-ticks span { position: absolute; transform: translateX(-50%); font-size: .62rem; color: #9b8a6b; font-variant-numeric: tabular-nums; }
.tl-ticks span::before { content: ""; position: absolute; left: 50%; top: -5px; width: 1px; height: 4px; background: #9b8a6b; }
.tl-events { position: absolute; left: 0; right: 0; top: 20px; height: 24px; pointer-events: none; }
.tl-events button { position: absolute; top: 4px; width: 12px; height: 12px; margin-left: -6px; transform: rotate(45deg); background: #fff4dc; border: 2px solid var(--bronze); pointer-events: auto; transition: transform .2s var(--ease), background .2s; z-index: 2; }
.tl-events button:hover, .tl-events button.past { background: var(--gold); }
.tl-events button:hover { transform: rotate(45deg) scale(1.4); }
.tl-events button .tip { position: absolute; bottom: 20px; left: 50%; transform: rotate(-45deg) translate(-30%, 0); transform-origin: left bottom; white-space: nowrap; background: rgba(24, 18, 13, .95); border: 1px solid var(--glass-line); padding: 4px 8px; border-radius: 8px; font-size: .72rem; color: #fff4dc; opacity: 0; pointer-events: none; transition: opacity .2s; }
.tl-events button:hover .tip { opacity: 1; }
.tl-progress { position: absolute; left: 0; top: 26px; height: 12px; border-radius: 6px; background: linear-gradient(90deg, rgba(255, 244, 220, .0), rgba(255, 244, 220, .25)); pointer-events: none; }
.tl-handle { position: absolute; top: 14px; width: 4px; height: 36px; margin-left: -2px; background: var(--gold-2); border-radius: 2px; box-shadow: 0 0 12px rgba(240, 210, 147, .8); outline: none; z-index: 3; }
.tl-handle span { position: absolute; bottom: 38px; left: 50%; transform: translateX(-50%); white-space: nowrap; background: linear-gradient(135deg, #f3d48e, #b07a33); color: #23170b; font-family: var(--display); font-weight: 700; font-size: .74rem; padding: 2px 8px; border-radius: 8px; box-shadow: 0 4px 12px rgba(0, 0, 0, .4); }
.tl-handle::after { content: ""; position: absolute; left: 50%; top: -6px; width: 14px; height: 14px; margin-left: -7px; background: var(--gold-2); transform: rotate(45deg); border-radius: 2px; }
.tl-all { flex: none; display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 600; padding: 8px 12px; border-radius: 999px; border: 1px solid var(--glass-line); color: var(--muted); transition: all .25s; }
.tl-all svg { width: 18px; height: 18px; }
.tl-all.on { background: rgba(214, 170, 90, .2); color: var(--gold-2); border-color: var(--gold); }

/* ---------- Drawer ---------- */
#drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 1200; width: min(470px, 100vw); background: linear-gradient(180deg, #1e1711, #15100c); border-left: 1px solid var(--glass-line); box-shadow: -20px 0 60px rgba(0, 0, 0, .5); transform: translateX(105%); transition: transform .6s var(--ease); }
#drawer.on { transform: none; }
.drawer-close { position: absolute; top: 14px; right: 14px; z-index: 5; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: rgba(15, 11, 8, .6); backdrop-filter: blur(8px); border: 1px solid var(--glass-line); color: #fff4dc; transition: transform .3s var(--ease); }
.drawer-close:hover { transform: rotate(90deg); }
.drawer-close svg { width: 18px; height: 18px; }
.drawer-scroll { height: 100%; overflow-y: auto; overflow-x: hidden; scroll-behavior: smooth; }
.drawer-scroll::-webkit-scrollbar { width: 8px; } .drawer-scroll::-webkit-scrollbar-thumb { background: #4a3826; border-radius: 4px; }
.hero { position: relative; height: 320px; overflow: hidden; background: #0e0b08; cursor: zoom-in; }
.hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; animation: kenburns2 16s ease-in-out infinite alternate; opacity: 0; transition: opacity 1s; }
.hero img.ok { opacity: 1; }
@keyframes kenburns2 { from { transform: scale(1.04); } to { transform: scale(1.18) translate(-2%, -2%); } }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .2), transparent 30%, rgba(21, 16, 12, .2) 55%, #15100c 98%); }
.hero-title { position: absolute; left: 22px; right: 22px; bottom: 16px; z-index: 2; }
.hero-title .badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.badge { font-size: .66rem; font-weight: 600; text-transform: uppercase; letter-spacing: .12em; padding: 3px 9px; border-radius: 999px; background: rgba(0, 0, 0, .45); border: 1px solid rgba(255, 255, 255, .25); backdrop-filter: blur(6px); }
.badge.empire { background: var(--empire); border-color: transparent; } .badge.neo { background: var(--neo); border-color: transparent; }
.badge.gold { background: rgba(214, 170, 90, .85); color: #23170b; border-color: transparent; }
.hero-title h1 { margin: 0; font-family: var(--display); font-size: 1.75rem; line-height: 1.1; color: #fff; text-shadow: 0 2px 12px rgba(0, 0, 0, .7); }
.hero-title .anc { font-family: var(--serif); font-style: italic; font-size: 1.15rem; color: var(--gold-2); margin-top: 2px; }
.hero-count { position: absolute; top: 18px; left: 18px; z-index: 2; font-size: .74rem; background: rgba(0, 0, 0, .5); padding: 4px 10px; border-radius: 999px; backdrop-filter: blur(6px); }
.d-sec { padding: 6px 22px 18px; animation: rise .6s var(--ease) backwards; }
.d-sec:nth-child(3) { animation-delay: .08s; } .d-sec:nth-child(4) { animation-delay: .16s; } .d-sec:nth-child(5) { animation-delay: .24s; }
.d-actions { display: flex; flex-wrap: wrap; gap: 6px; padding: 14px 22px 4px; }
.d-actions a, .d-actions button { display: inline-flex; align-items: center; gap: 6px; font-size: .76rem; text-decoration: none; padding: 6px 11px; border-radius: 999px; border: 1px solid var(--glass-line); color: #f0e2c4; transition: background .2s, border-color .2s; }
.d-actions a:hover, .d-actions button:hover { background: rgba(214, 170, 90, .15); border-color: var(--gold); }
.d-actions svg { width: 14px; height: 14px; }
.tabs { display: flex; gap: 2px; margin: 10px 22px 0; border-bottom: 1px solid var(--glass-line); position: sticky; top: 0; background: #17120d; z-index: 3; }
.tabs button { padding: 11px 12px; font-size: .8rem; font-weight: 600; color: var(--muted); position: relative; }
.tabs button.on { color: var(--gold-2); }
.tabs button.on::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: -1px; height: 2px; background: var(--gold); animation: grow .35s var(--ease); }
@keyframes grow { from { transform: scaleX(0); } }
.tabs .lang { margin-left: auto; font-size: .7rem; }
.tab { display: none; } .tab.on { display: block; animation: rise .45s var(--ease); }
.prose { font-family: var(--serif); font-size: 1.12rem; line-height: 1.6; color: #eadfc8; }
.prose p { margin: 0 0 .85em; }
.prose p:first-child::first-letter { font-family: var(--display); font-size: 3.1em; float: left; line-height: .9; padding: 4px 8px 0 0; color: var(--gold); }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 4px 0 16px; }
.fact { padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, .035); border: 1px solid rgba(214, 170, 90, .14); }
.fact small { display: block; font-size: .64rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.fact b { font-size: .86rem; font-weight: 600; color: #f6ead0; }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.gallery button { position: relative; aspect-ratio: 1; overflow: hidden; border-radius: 10px; background: #2a2119; animation: pop .45s var(--ease) backwards; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease), filter .4s; filter: sepia(.15); }
.gallery button:hover img { transform: scale(1.12); filter: none; }
.gallery button::after { content: attr(data-c); position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 7px 5px; font-size: .62rem; line-height: 1.2; text-align: left; background: linear-gradient(transparent, rgba(0, 0, 0, .85)); opacity: 0; transform: translateY(6px); transition: all .3s var(--ease); }
.gallery button:hover::after { opacity: 1; transform: none; }
.near { display: flex; flex-direction: column; gap: 6px; }
.near button, .ext-list a, .ext-list div { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 7px; border-radius: 12px; background: rgba(255, 255, 255, .03); border: 1px solid transparent; transition: border-color .2s, background .2s, transform .2s var(--ease); text-decoration: none; color: inherit; }
.near button:hover, .ext-list a:hover { border-color: var(--glass-line); background: rgba(214, 170, 90, .08); transform: translateX(3px); }
.near img, .ext-list img { width: 48px; height: 48px; object-fit: cover; border-radius: 8px; flex: none; background: #2a2119; }
.near b, .ext-list b { display: block; font-size: .88rem; }
.near small, .ext-list small { color: var(--muted); font-size: .74rem; }
.near em { margin-left: auto; font-style: normal; font-size: .74rem; color: var(--gold-2); white-space: nowrap; }
.ext-ico { width: 32px; height: 32px; flex: none; border-radius: 8px; display: grid; place-items: center; font-size: 15px; background: rgba(214, 170, 90, .15); }
.d-h { font-family: var(--display); font-size: .72rem; letter-spacing: .22em; color: var(--muted); margin: 22px 0 10px; display: flex; align-items: center; gap: 8px; }
.d-h::after { content: ""; flex: 1; height: 1px; background: var(--glass-line); }
.wiki-card { border-radius: 14px; overflow: hidden; background: rgba(255, 255, 255, .035); border: 1px solid rgba(214, 170, 90, .16); margin-bottom: 10px; }
.wiki-card img { width: 100%; max-height: 260px; object-fit: cover; display: block; }
.wiki-card div { padding: 12px 14px; }
.wiki-card h4 { margin: 0 0 4px; font-family: var(--display); font-size: .95rem; }
.wiki-card p { margin: 0 0 8px; font-family: var(--serif); font-size: 1.04rem; line-height: 1.5; color: #e6d8bb; }
.skeleton { height: 14px; border-radius: 6px; margin: 8px 0; background: linear-gradient(90deg, #2a2119 25%, #3a2d20 50%, #2a2119 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.lit { font-size: .78rem; line-height: 1.55; color: #c8b896; white-space: pre-line; }
.muted { color: var(--muted); font-size: .82rem; }
.src-note { font-size: .74rem; color: var(--muted); padding: 8px 22px 40px; line-height: 1.5; }

/* ---------- Tour ---------- */
#tour { position: fixed; left: 16px; bottom: 112px; z-index: 1050; width: min(430px, calc(100vw - 32px)); padding: 0 20px 16px; overflow: hidden; transform: translateY(30px); opacity: 0; pointer-events: none; transition: transform .6s var(--ease), opacity .5s; }
#tour.on { transform: none; opacity: 1; pointer-events: auto; }
.tour-progress { height: 3px; margin: 0 -20px 12px; background: rgba(255, 255, 255, .08); }
.tour-progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--bronze), var(--gold-2)); transition: width .8s var(--ease); }
.tour-head { display: flex; align-items: center; gap: 10px; font-size: .74rem; color: var(--muted); letter-spacing: .1em; }
#tour-year { color: var(--gold-2); font-family: var(--display); font-weight: 700; }
.tour-x { margin-left: auto; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; }
.tour-x:hover { background: rgba(255, 255, 255, .08); }
.tour-x svg { width: 14px; height: 14px; }
#tour h2 { margin: 6px 0 6px; font-family: var(--display); font-size: 1.35rem; color: #fff4dc; }
#tour p { margin: 0; font-family: var(--serif); font-size: 1.12rem; line-height: 1.48; color: #e9dcc2; }
#tour.swap h2, #tour.swap p, #tour.swap .tour-photos { animation: swap .8s var(--ease) backwards; }
#tour.swap p { animation-delay: .1s; } #tour.swap .tour-photos { animation-delay: .2s; }
.tour-photos { display: flex; gap: 6px; margin-top: 12px; }
.tour-photos:empty { display: none; }
.tour-photos button { flex: 1; height: 74px; border-radius: 10px; overflow: hidden; background: #2a2119; }
.tour-photos img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.tour-photos button:hover img { transform: scale(1.1); }
.tour-nav { display: flex; gap: 8px; margin-top: 14px; }
.tour-nav .btn-gold { margin-left: auto; }
#tour-open[hidden] { display: none; }

/* ---------- Peek ---------- */
#peek { position: fixed; z-index: 1500; pointer-events: none; width: 230px; border-radius: 14px; overflow: hidden; background: rgba(24, 18, 13, .96); border: 1px solid var(--glass-line); box-shadow: var(--shadow); opacity: 0; transform: translateY(8px) scale(.96); transition: opacity .2s, transform .25s var(--ease); }
#peek.on { opacity: 1; transform: none; }
#peek img { width: 100%; height: 120px; object-fit: cover; display: block; background: #2a2119; }
#peek div { padding: 8px 11px 10px; }
#peek b { display: block; font-family: var(--display); font-size: .86rem; color: #fff4dc; }
#peek i { display: block; font-family: var(--serif); color: var(--gold-2); font-size: .95rem; }
#peek small { color: var(--muted); font-size: .72rem; }

/* ---------- Lightbox ---------- */
#lightbox { position: fixed; inset: 0; z-index: 4000; background: rgba(8, 6, 4, .96); display: grid; grid-template-rows: 1fr auto auto; opacity: 0; pointer-events: none; transition: opacity .4s; }
#lightbox.on { opacity: 1; pointer-events: auto; }
.lb-stage { position: relative; overflow: hidden; display: grid; place-items: center; cursor: zoom-in; touch-action: none; }
.lb-stage.zoomed { cursor: zoom-out; }
#lb-img { max-width: 94vw; max-height: calc(100vh - 170px); object-fit: contain; box-shadow: 0 20px 70px rgba(0, 0, 0, .7); transition: transform .45s var(--ease), opacity .35s; opacity: 0; transform: scale(.97); }
#lb-img.ok { opacity: 1; transform: none; }
.lb-stage.zoomed #lb-img { transition: transform .1s; }
.lb-spinner { position: absolute; width: 38px; height: 38px; border-radius: 50%; border: 3px solid rgba(214, 170, 90, .2); border-top-color: var(--gold); animation: spin 0.9s linear infinite; pointer-events: none; }
#lb-img.ok + .lb-spinner { display: none; }
.lb-btn { position: absolute; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: rgba(30, 22, 15, .7); border: 1px solid var(--glass-line); color: #fff4dc; transition: transform .25s var(--ease), background .2s; z-index: 2; }
.lb-btn:hover { background: rgba(214, 170, 90, .3); transform: scale(1.08); }
.lb-btn svg { width: 22px; height: 22px; }
.lb-prev { left: 18px; top: 45%; } .lb-next { right: 18px; top: 45%; } .lb-close { right: 18px; top: 18px; }
.lb-bar { display: flex; align-items: center; gap: 14px; padding: 10px 24px; }
.lb-cap { flex: 1; font-family: var(--serif); font-size: 1.08rem; color: #eadfc8; }
.lb-cap b { font-family: var(--display); font-size: .86rem; color: var(--gold-2); margin-right: 10px; letter-spacing: .06em; }
.lb-count { font-variant-numeric: tabular-nums; color: var(--muted); font-size: .85rem; }
.lb-thumbs { display: flex; gap: 6px; padding: 0 24px 16px; overflow-x: auto; scroll-behavior: smooth; }
.lb-thumbs button { flex: none; width: 64px; height: 50px; border-radius: 6px; overflow: hidden; opacity: .45; border: 2px solid transparent; transition: opacity .2s, border-color .2s; }
.lb-thumbs button.on { opacity: 1; border-color: var(--gold); }
.lb-thumbs img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .search { width: 220px; } .search:focus-within { width: 260px; }
  #btn-tour span { display: none; } #btn-tour { width: 46px; padding: 0; justify-content: center; }
  #era-card { width: 320px; }
  body.drawer-open #topbar, body.drawer-open #timeline { right: 16px; }
}
@media (max-width: 640px) {
  #brand { top: 10px; left: 10px; }
  .logo { padding: 7px 12px 7px 8px; gap: 8px; }
  .logo-mark { width: 34px; height: 34px; }
  .logo-text b { font-size: .9rem; } .logo-text small { display: none; }
  #topbar { top: 10px; right: 10px; gap: 6px; }
  .search { width: 46px; padding: 0 14px; }
  .search input, .search kbd { display: none; }
  .search.open { position: fixed; left: 10px; right: 10px; top: 64px; width: auto; }
  .search.open input { display: block; }
  #btn-full { display: none; }
  #panel { top: 64px; left: 10px; width: calc(100vw - 20px); max-height: 60vh; }
  #panel.collapsed { width: max-content !important; }
#panel.collapsed .panel-body { display: none; }
  #era-card { left: 10px; right: 10px; width: auto; bottom: 96px; padding: 10px 12px; }
  #era-text { display: none; }
  .era-year b { font-size: 1.5rem; } .era-year { min-width: 64px; }
  #timeline { left: 10px; right: 10px; bottom: 10px; height: 74px; gap: 8px; padding: 0 10px; }
  .tl-speed, .tl-all span, .tl-eralabels { display: none; }
  .tl-play { width: 42px; height: 42px; }
  .tl-ticks span:nth-child(even) { display: none; }
  #drawer { width: 100vw; top: 12vh; border-radius: 22px 22px 0 0; transform: translateY(105%); border-left: 0; border-top: 1px solid var(--glass-line); }
  #drawer.on { transform: none; }
  .hero { height: 240px; }
  #tour { left: 10px; bottom: 96px; }
  #event-toast { top: 118px; }
  .leaflet-bottom.leaflet-right, .leaflet-bottom.leaflet-left { bottom: 90px; }
  .leaflet-control-zoom { display: none; }
  .lb-prev, .lb-next { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------- About ---------- */
#about { position: fixed; inset: 0; z-index: 3500; display: grid; place-items: center; padding: 16px; background: rgba(8, 6, 4, .72); backdrop-filter: blur(6px); opacity: 0; pointer-events: none; transition: opacity .4s; }
#about.on { opacity: 1; pointer-events: auto; }
.about-card { position: relative; width: min(720px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; padding: 28px 30px 24px; border-radius: 22px; background: linear-gradient(180deg, #211912, #15100c); border: 1px solid var(--glass-line); box-shadow: var(--shadow); transform: translateY(24px) scale(.97); transition: transform .5s var(--ease); }
#about.on .about-card { transform: none; }
.about-x { position: absolute; top: 14px; right: 14px; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--glass-line); transition: transform .3s var(--ease); }
.about-x:hover { transform: rotate(90deg); }
.about-x svg { width: 16px; height: 16px; }
.about-head { display: flex; gap: 16px; align-items: center; padding-right: 40px; }
.about-logo { width: 64px; height: 64px; flex: none; color: var(--gold); }
.about-head h2 { margin: 0 0 4px; font-family: var(--display); font-size: 1.35rem; color: #fff4dc; }
.about-head p { margin: 0; font-family: var(--serif); font-size: 1.08rem; color: #e6d8bb; line-height: 1.4; }
.about-maker { margin: 20px 0 6px; padding: 14px 16px; border-radius: 14px; background: rgba(214, 170, 90, .1); border: 1px solid rgba(214, 170, 90, .35); display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; }
.about-maker small { width: 100%; font-size: .64rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.about-maker b { font-family: var(--display); font-size: 1.1rem; color: var(--gold-2); }
.about-maker a { font-size: .9rem; }
.about-card h3 { font-family: var(--display); font-size: .7rem; letter-spacing: .22em; color: var(--muted); margin: 22px 0 8px; display: flex; align-items: center; gap: 8px; }
.about-card h3::after { content: ""; flex: 1; height: 1px; background: var(--glass-line); }
.about-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.about-list li { padding: 9px 12px; border-radius: 12px; background: rgba(255, 255, 255, .03); }
.about-list a, .about-list b { display: block; font-weight: 600; font-size: .9rem; color: var(--gold-2); text-decoration: none; }
.about-list a:hover { text-decoration: underline; }
.about-list span { display: block; font-size: .8rem; color: #cdbd9c; line-height: 1.45; margin-top: 2px; }
.about-foot { margin: 20px 0 0; font-size: .8rem; color: var(--muted); line-height: 1.5; }
@media (max-width: 640px) { .about-card { padding: 22px 18px; } .about-head { flex-direction: column; align-items: flex-start; } }

/* ---------- Feedback ---------- */
#feedback { position: fixed; inset: 0; z-index: 3600; display: grid; place-items: center; padding: 16px; background: rgba(8, 6, 4, .72); backdrop-filter: blur(6px); opacity: 0; pointer-events: none; transition: opacity .4s; }
#feedback.on { opacity: 1; pointer-events: auto; }
#feedback.on .about-card { transform: none; }
.fb-card { width: min(640px, 100%); }
#fb-form { display: flex; flex-direction: column; gap: 12px; margin-top: 20px; }
.fb-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
#fb-form label { display: flex; flex-direction: column; gap: 5px; font-size: .78rem; font-weight: 600; color: var(--gold-2); }
#fb-form label em { font-style: normal; font-weight: 400; color: var(--muted); }
#fb-form input, #fb-form select, #fb-form textarea { font: inherit; font-size: .92rem; color: var(--text); background: rgba(255, 255, 255, .05); border: 1px solid var(--glass-line); border-radius: 10px; padding: 10px 12px; outline: none; transition: border-color .2s, background .2s, box-shadow .2s; }
#fb-form textarea { resize: vertical; min-height: 120px; font-family: var(--serif); font-size: 1.05rem; line-height: 1.45; }
#fb-form select option { background: #1e1711; }
#fb-form input:focus, #fb-form select:focus, #fb-form textarea:focus { border-color: var(--gold); background: rgba(214, 170, 90, .08); box-shadow: 0 0 0 3px rgba(214, 170, 90, .15); }
.fb-honey { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.fb-status { margin: 0; min-height: 1.2em; font-size: .84rem; color: var(--muted); }
.fb-status.err { color: #f0a08f; }
.fb-actions { display: flex; align-items: center; gap: 14px; }
.fb-note { flex: 1; font-size: .76rem; color: var(--muted); }
.fb-note b { color: #e8dcc2; font-weight: 600; }
#fb-send:disabled { opacity: .6; cursor: progress; transform: none; }
.fb-done { display: none; text-align: center; padding: 30px 0 10px; }
#feedback.sent #fb-form { display: none; }
#feedback.sent .fb-done { display: block; animation: rise .6s var(--ease); }
.fb-check { width: 72px; height: 72px; margin: 0 auto 12px; border-radius: 50%; display: grid; place-items: center; font-size: 2rem; font-weight: 700; color: #23170b; background: linear-gradient(135deg, #f3d48e, #b07a33); box-shadow: 0 0 0 10px rgba(214, 170, 90, .15); animation: pop .6s var(--ease); }
.fb-done h3 { margin: 0 0 4px; font-family: var(--display); font-size: 1.3rem; color: #fff4dc; justify-content: center; }
.fb-done h3::after { display: none; }
.fb-done p { margin: 0 0 18px; font-family: var(--serif); font-size: 1.1rem; color: #e6d8bb; }
@media (max-width: 640px) { .fb-row { grid-template-columns: 1fr; } .fb-actions { flex-direction: column-reverse; align-items: stretch; } #btn-feedback { display: none; } }
