:root {
  color-scheme: dark;
  --bg: #050f14; --text: #e8ebe2; --muted: #95a8a6; --dim: #6d8582; --accent: #a9e9d2; --amber: #e7c27c;
  --line: rgba(177, 216, 200, .15); --glass: rgba(8, 21, 27, .82); --sheet: rgba(7, 19, 24, .95);
  --plant: #6fcf7e; --grazer: #6aa9f0; --predator: #ff7a4d; --scavenger: #e2b14a;
  --serif: "Spectral", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Golos Text", "Segoe UI", system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; width: 100%; height: 100%; overflow: hidden; }
body { font-family: var(--sans); color: var(--text); background: var(--bg); font-size: 14px; -webkit-font-smoothing: antialiased; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 2px; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.symbols { position: absolute; width: 0; height: 0; overflow: hidden; }
[hidden] { display: none !important; }

#ocean { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: grab; display: block; }
#ocean:active { cursor: grabbing; }
.vignette { position: absolute; inset: 0; pointer-events: none; transition: opacity 1s;
  background: linear-gradient(90deg, rgba(3, 12, 17, .86) 0%, rgba(3, 12, 17, .45) 30%, transparent 56%), linear-gradient(0deg, rgba(3, 12, 17, .9), transparent 24%, transparent 78%, rgba(3, 12, 17, .62)); }
body:not(.intro-open) .vignette { opacity: .55; }
.grain { position: absolute; inset: 0; pointer-events: none; opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Cpath fill='white' filter='url(%23n)' opacity='.7' d='M0 0h180v180H0z'/%3E%3C/svg%3E"); }

.eyebrow { font-size: 9px; letter-spacing: .18em; color: var(--muted); text-transform: uppercase; }
.tiny-dot { display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }

/* header */
.header { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; height: 104px; padding: env(safe-area-inset-top, 0px) 44px 0; z-index: 5; pointer-events: none; }
.header > * { pointer-events: auto; }
.brand { display: flex; align-items: center; gap: 13px; color: var(--text); text-decoration: none; }
.brand-mark { width: 40px; height: 40px; stroke: var(--accent); stroke-width: 1.1; }
.brand-mark .mark-strata { stroke: var(--amber); opacity: .8; }
.brand-word { font-size: 23px; letter-spacing: .27em; font-weight: 500; }
.brand-sub { font-size: 9px; letter-spacing: .3em; color: var(--amber); border-left: 1px solid var(--line); padding: 4px 0 4px 13px; margin-left: -4px; }
.header-center { display: flex; align-items: center; gap: 10px; font-size: 9px; letter-spacing: .19em; color: var(--dim); margin-left: 18px; }
.header-right { display: flex; align-items: center; gap: 26px; }
.connection { display: flex; gap: 8px; align-items: center; font-size: 9px; letter-spacing: .14em; color: var(--muted); text-transform: uppercase; }
#live-dot { width: 5px; height: 5px; border-radius: 50%; background: #8f927a; }
body.live #live-dot { background: var(--accent); box-shadow: 0 0 10px rgba(169, 233, 210, .55); }
.head-link { font-size: 11px; letter-spacing: .04em; color: #b8c9c2; transition: color .2s; }
.head-link:hover { color: var(--accent); }
.language { font-size: 10px; letter-spacing: .12em; border-left: 1px solid var(--line); padding: 7px 0 7px 24px; }
.language span { color: var(--dim); padding-left: 4px; }

/* intro */
.intro { position: absolute; top: 49%; left: 6.2%; width: 470px; transform: translateY(-50%); z-index: 2; transition: opacity .7s, transform .7s; }
.intro > .eyebrow { display: flex; align-items: center; gap: 13px; font-size: 8.5px; letter-spacing: .19em; }
.short-line { width: 27px; height: 1px; background: var(--accent); }
h1 { font-family: var(--serif); font-size: clamp(42px, 4.9vw, 74px); font-weight: 300; line-height: 1.04; letter-spacing: -.035em; margin: 22px 0 22px; text-wrap: balance; }
h1 em { font-style: italic; font-weight: 300; color: #b6e4cf; }
.intro-copy { max-width: 360px; color: #a2b2af; font-size: 13.5px; line-height: 1.8; margin: 0 0 30px; }
.enter { display: flex; align-items: center; justify-content: space-between; gap: 38px; border: 1px solid rgba(177, 216, 200, .35); background: rgba(139, 203, 167, .055); padding: 15px 19px; min-width: 214px; font-size: 12px; letter-spacing: .02em; border-radius: 3px; transition: background .2s, border-color .2s; }
.enter:hover { background: rgba(139, 203, 167, .13); border-color: var(--accent); }
.enter svg { width: 16px; height: 16px; }
.intro-foot { display: flex; align-items: flex-start; gap: 8px; margin-top: 24px; max-width: 300px; line-height: 1.6; color: #738c85; font-size: 10px; }
.intro-foot .tiny-dot { margin-top: 6px; }
body:not(.intro-open) .intro { opacity: 0; pointer-events: none; transform: translateY(-50%) translateX(-14px); }

.world-caption { position: absolute; right: 9%; bottom: 22%; max-width: 280px; display: flex; gap: 12px; align-items: flex-start; color: #a7bbb4; line-height: 1.7; font-size: 11px; letter-spacing: .02em; pointer-events: none; z-index: 2; transition: opacity .8s; text-shadow: 0 1px 10px #000; }
.world-caption.fade { opacity: 0; }
.caption-line { width: 25px; height: 1px; background: rgba(177, 216, 200, .35); flex-shrink: 0; margin-top: 10px; }

/* footer */
.footer { position: absolute; bottom: calc(env(safe-area-inset-bottom, 0px) + 40px); left: 44px; right: 44px; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; z-index: 4; pointer-events: none; }
.footer > * { pointer-events: auto; }
.world-age { width: 300px; }
.world-age > div { white-space: nowrap; }
.world-age > .eyebrow { font-size: 8.5px; color: var(--amber); opacity: .85; }
.world-age > div { margin-top: 9px; display: flex; align-items: baseline; gap: 13px; }
#age { font-family: var(--serif); font-size: 30px; font-weight: 300; letter-spacing: -.01em; }
.age-detail { font-size: 10px; color: #7b958d; font-variant-numeric: tabular-nums; }
.season-line { display: block; margin-top: 6px; font-size: 10px; color: #8aa49b; }
.dock { display: flex; align-items: center; gap: 4px; padding: 8px 10px; background: rgba(12, 26, 31, .8); border: 1px solid rgba(163, 209, 188, .17); border-radius: 7px; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: 0 12px 45px rgba(0, 0, 0, .25); }
.dock-button { display: flex; gap: 8px; align-items: center; padding: 11px 13px; font-size: 11px; color: #a9bbb4; white-space: nowrap; border-radius: 3px; transition: color .2s, background .2s; }
.dock-button:hover, .dock-button[aria-pressed="true"] { background: rgba(177, 216, 200, .085); color: var(--accent); }
.dock-button svg { width: 16px; height: 16px; }
.dock-divider { height: 23px; width: 1px; background: var(--line); margin: 0 3px; }
.world-count { min-width: 250px; text-align: right; font-size: 11px; color: #95aca4; }
.world-count > div { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
#n-animals { color: var(--text); font-variant-numeric: tabular-nums; }
.count-foot { display: block; margin-top: 10px; font-size: 9px; color: #67817b; line-height: 1.6; }
.canvas-hint { position: absolute; bottom: calc(env(safe-area-inset-bottom, 0px) + 14px); left: 50%; transform: translateX(-50%); margin: 0; font-size: 9px; color: #61807a; letter-spacing: .04em; white-space: nowrap; pointer-events: none; }

/* observe mode: the ocean alone */
body.observing .header-center, body.observing .world-caption, body.observing .canvas-hint, body.observing .world-age, body.observing .world-count, body.observing .guide, body.observing .selection { opacity: 0; pointer-events: none; }
body.observing .vignette { opacity: .25; }

/* creature card */
.selection { position: absolute; left: 44px; top: 128px; width: 290px; padding: 18px 19px; background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid var(--line); border-radius: 6px; z-index: 3; display: grid; gap: 12px; transition: opacity .4s; }
.selection-heading { display: flex; align-items: flex-start; gap: 11px; }
.lineage-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 9px currentColor; flex-shrink: 0; margin-top: 7px; }
.selection-names { display: grid; gap: 2px; min-width: 0; text-align: left; flex: 1; }
.selection-name, .selection-common { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-collapse svg { transition: transform .25s; }
.mini-meter { display: none; height: 2px; margin-top: 5px; background: rgba(255, 255, 255, .1); border-radius: 1px; overflow: hidden; }
.mini-meter b { display: block; height: 100%; background: linear-gradient(90deg, #5fb48d, #b8ec8d); }
/* compact card: only the name and a thin energy line, so the ocean stays visible */
.selection.compact { gap: 0; padding: 10px 12px; width: 300px; }
.selection.compact .selection-note, .selection.compact .selection-facts, .selection.compact .selection-foot { display: none; }
.selection.compact .selection-common { display: none; }
.selection.compact .mini-meter { display: block; }
.selection.compact .selection-name { font-size: 16px; }
.selection.compact .card-collapse svg { transform: rotate(180deg); }
.selection.compact .lineage-dot { margin-top: 6px; }
.selection-name { font-family: var(--serif); font-style: italic; font-size: 19px; font-weight: 300; line-height: 1.2; }
.selection-common { font-size: 11px; color: var(--muted); }
.selection-heading .icon-button { flex-shrink: 0; }
.selection-discover { margin: 0; font-size: 11px; color: var(--amber); }
.selection-discover.mine { color: var(--accent); }
.epoch-line { display: block; font-family: var(--serif); font-style: italic; font-size: 14px; color: #d9c79a; margin-top: 6px; }
.epoch-box { display: grid; gap: 4px; margin: 16px 0 18px; padding: 13px 14px; border: 1px solid rgba(231, 194, 124, .22); background: rgba(231, 194, 124, .045); border-radius: 5px; }
.epoch-box .eyebrow { color: var(--amber); } .epoch-box strong { font-family: var(--serif); font-weight: 400; font-style: italic; font-size: 18px; }
.epoch-box p { margin: 0; font-size: 11.5px; line-height: 1.6; color: #a8b8b0; }
.forecast { margin: 0 0 20px; font-size: 11.5px; line-height: 1.6; color: #b9c9c1; }
.observer { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; } .observer strong { font-family: var(--serif); font-weight: 400; font-size: 17px; }
.selection-note { margin: 0; font-size: 11.5px; line-height: 1.7; color: #9fb4ad; }
.selection-facts { margin: 0; display: grid; gap: 7px; font-size: 11px; }
.selection-facts > div { display: grid; grid-template-columns: 110px 1fr; gap: 10px; }
.selection-facts dt { color: var(--dim); } .selection-facts dd { margin: 0; color: #cfdad4; min-width: 0; }
.meter { display: block; height: 3px; margin-top: 7px; background: rgba(255, 255, 255, .08); border-radius: 2px; overflow: hidden; }
.meter b { display: block; height: 100%; background: linear-gradient(90deg, #5fb48d, #b8ec8d); }
.selection-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid var(--line); padding-top: 11px; }
.selection-state { font-size: 10px; color: var(--amber); letter-spacing: .04em; }
.follow-button { display: flex; align-items: center; gap: 7px; font-size: 11px; color: var(--accent); }
.follow-button svg { width: 15px; height: 15px; }
.icon-button { padding: 2px; color: var(--muted); }
.icon-button svg { width: 18px; height: 18px; }
.icon-button:hover { color: var(--text); }

/* guide drawer */
.guide { position: absolute; top: 96px; right: 28px; bottom: 132px; width: 360px; padding: 24px 26px; background: var(--sheet); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); border: 1px solid var(--line); border-radius: 10px; z-index: 6; overflow: auto; transform: translateX(calc(100% + 40px)); opacity: 0; transition: transform .35s, opacity .35s; scrollbar-width: thin; scrollbar-color: #2c4545 transparent; }
.guide.open { transform: none; opacity: 1; }
.guide-heading { display: flex; justify-content: space-between; align-items: flex-start; }
.guide-heading h2, .about-top h2, .paper-top h2 { font-family: var(--serif); font-size: 27px; font-weight: 300; letter-spacing: -.015em; margin: 8px 0 20px; }
.tabs { display: flex; border-bottom: 1px solid var(--line); gap: 24px; }
.tabs button { padding: 0 0 13px; font-size: 11.5px; color: var(--dim); border-bottom: 1px solid transparent; margin-bottom: -1px; }
.tabs button.active { color: var(--accent); border-bottom-color: var(--accent); }
.panel-copy { font-size: 11.5px; line-height: 1.8; color: #91aaa1; margin: 16px 0 20px; }
.guide-stat { display: flex; align-items: baseline; gap: 9px; font-size: 10.5px; color: var(--muted); }
.guide-stat strong { font-family: var(--serif); font-size: 24px; font-weight: 300; color: var(--text); }
.spark-label { margin-left: auto; font-size: 9px; color: var(--dim); }
.trend { width: 100%; height: 70px; margin: 6px 0 12px; display: block; }
.role-legend { list-style: none; margin: 0 0 22px; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 7px 18px; font-size: 11px; color: #a6b8b1; }
.role-legend li { display: flex; align-items: center; gap: 8px; } .role-legend b { margin-left: auto; font-weight: 500; color: var(--text); font-variant-numeric: tabular-nums; }
.k { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.k.plant { background: var(--plant); } .k.grazer { background: var(--grazer); } .k.predator { background: var(--predator); } .k.scavenger { background: var(--scavenger); }
.section-label { display: flex; justify-content: space-between; align-items: center; font-size: 8.5px; letter-spacing: .16em; color: #b3c8bc; border-top: 1px solid var(--line); padding-top: 18px; margin: 4px 0 10px; text-transform: uppercase; }
.section-label > span:last-child { color: var(--dim); letter-spacing: .06em; }
.species-list { display: grid; margin-bottom: 18px; }
.species { width: 100%; display: flex; align-items: center; gap: 11px; text-align: left; padding: 10px 0; border-bottom: 1px solid rgba(177, 216, 200, .055); }
.species .lineage-dot { margin-top: 0; }
.species-name { display: block; font-family: var(--serif); font-style: italic; font-size: 14px; color: #d3ddd6; }
.species-role { display: block; font-size: 9.5px; color: #75928a; margin-top: 2px; line-height: 1.5; }
.species-number { margin-left: auto; font-size: 11px; color: #c1cec3; font-variant-numeric: tabular-nums; }
.paper-teaser { width: 100%; display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center; text-align: left; margin: 16px 0 4px; padding: 14px 15px; border: 1px solid rgba(231, 194, 124, .25); background: rgba(231, 194, 124, .05); border-radius: 5px; }
.paper-teaser .eyebrow { color: var(--amber); grid-column: 1; }
.paper-teaser span:nth-child(2) { font-family: var(--serif); font-size: 15px; line-height: 1.35; grid-column: 1; }
.paper-teaser svg { grid-column: 2; grid-row: 1 / 3; width: 16px; color: var(--amber); }
.story-list { display: grid; gap: 14px; margin-bottom: 18px; }
.story h3 { margin: 0 0 4px; font-family: var(--serif); font-weight: 400; font-size: 15px; line-height: 1.3; }
.story p { margin: 0; font-size: 11.5px; line-height: 1.7; color: #95ada4; }
.story time, .event-list time { font-size: 9px; color: #66847a; letter-spacing: .04em; }
.empty { font-size: 11px; color: var(--dim); line-height: 1.7; margin: 0; }
.event-list { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 8px; }
.event-list li { display: grid; grid-template-columns: 54px 1fr; gap: 10px; font-size: 11px; line-height: 1.55; color: #a3b8b0; }
.mini-label { font-size: 8px; }
.rules-copy { font-size: 11.5px; line-height: 1.8; color: #8fa89e; margin: 14px 0; }
.rules-copy p { margin: 0 0 12px; } .rules-copy strong { color: #c3d4c9; font-weight: 500; }
.text-button { font-size: 11px; color: var(--accent); }
.science { display: grid; gap: 4px; font-size: 9.5px; color: #627f75; padding-top: 16px; }

/* about, paper */
.about, .paper { position: fixed; inset: 0; z-index: 9; background: rgba(2, 8, 11, .62); display: grid; place-items: center; padding: 16px; }
.about-sheet, .paper-sheet { width: min(720px, 100%); max-height: calc(100% - 32px); overflow-y: auto; background: #0a171c; border: 1px solid var(--line); border-radius: 12px; padding: 26px 30px 30px; scrollbar-width: thin; scrollbar-color: #2c4545 transparent; }
.about-top, .paper-top { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--line); margin: -2px -30px 22px; padding: 0 30px 4px; }
.about-body { font-size: 13.5px; line-height: 1.75; color: #b2c2bc; }
.about-body h3 { font-family: var(--serif); font-weight: 300; font-size: 23px; line-height: 1.3; color: var(--text); margin: 28px 0 10px; letter-spacing: -.01em; }
.about-body h3:first-child { margin-top: 0; }
.about-body h4 { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin: 26px 0 8px; font-weight: 500; }
.about-body p { margin: 0 0 12px; } .about-body strong { color: #dce5df; font-weight: 500; }
.about-body .lead { font-family: var(--serif); font-size: 20px; line-height: 1.45; color: var(--text); font-weight: 300; }
.about-body .loop { border: 1px solid var(--line); background: rgba(177, 216, 200, .03); border-radius: 6px; padding: 14px 16px; margin: 16px 0; display: grid; gap: 4px; }
.about-body .loop span { color: var(--accent); }
.about-body ul { padding-left: 1.1rem; margin: 0 0 12px; } .about-body li { margin-bottom: 6px; }
.about-body .data { font-family: ui-monospace, Menlo, monospace; font-size: 12px; color: var(--amber); }
.about-body .note { font-size: 12px; color: #7f9a91; border-top: 1px solid var(--line); padding-top: 14px; margin-top: 24px; }
.about-body table { width: 100%; border-collapse: collapse; font-size: 12.5px; margin: 8px 0 16px; }
.about-body td, .about-body th { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.about-body th { font-weight: 500; color: var(--muted); font-size: 11px; }
.about-more { width: 100%; display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; align-items: center; text-align: left; margin: 22px 0 6px; padding: 16px 18px; border: 1px solid var(--line); background: rgba(177, 216, 200, .04); border-radius: 6px; color: var(--accent); font-size: 14px; }
.about-more small { grid-column: 1; color: var(--dim); font-size: 11px; } .about-more .arrow { grid-column: 2; grid-row: 1 / 3; font-size: 18px; }
.about-more:hover { background: rgba(177, 216, 200, .08); }
.about-back { color: var(--accent); font-size: 12px; margin-bottom: 14px; }
.about-body .equation { font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 12px; line-height: 1.65; color: #d7e4dd; background: rgba(0, 0, 0, .25); border: 1px solid var(--line); border-left: 2px solid var(--amber); border-radius: 4px; padding: 12px 14px; margin: 10px 0 14px; overflow-x: auto; white-space: pre; }
.paper-head { margin: 0 0 16px; font-family: var(--serif); font-size: 22px; line-height: 1.35; color: #fff; font-weight: 300; }
.paper-items { margin: 0 0 18px; padding-left: 1.1rem; display: grid; gap: 10px; font-size: 13px; line-height: 1.7; color: #b8c8c1; }
.paper-stories { display: grid; gap: 14px; border-top: 1px solid var(--line); padding-top: 16px; }
.paper-stories h3 { margin: 0 0 4px; font-family: var(--serif); font-weight: 400; font-size: 16px; }
.paper-stories p { margin: 0; color: #9fb3ab; font-size: 12.5px; line-height: 1.7; }
.paper-note { font-size: 11px; color: #6f8a82; margin: 18px 0 0; }
.paper-nav { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: -8px 0 18px; font-size: 12px; }
.paper-nav button { color: var(--amber); padding: 4px 0; } .paper-nav button:disabled { color: var(--dim); opacity: .45; cursor: default; }
.paper-count { font: 500 10px var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

/* the day's discoveries */
.news { position: absolute; top: 96px; right: 44px; z-index: 3; width: 300px; display: grid; grid-template-columns: 56px 1fr; gap: 12px; align-items: center; text-align: left; padding: 10px 14px 10px 10px;
  background: rgba(6, 18, 22, .72); border: 1px solid var(--line); border-radius: 8px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); transition: opacity .6s; cursor: pointer; }
.news.fade { opacity: 0; }
.news-portrait { width: 56px; height: 56px; border-radius: 6px; background: #061217; }
.news-text { display: grid; gap: 3px; min-width: 0; }
.news-eyebrow { color: var(--amber); }
.news-title { font: 400 14px/1.3 var(--serif); color: #e2ece7; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.news-sub { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.intro-open .news, body.focus .news { display: none; }
@media (max-width: 860px) { .news { top: 66px; right: 10px; width: 230px; grid-template-columns: 40px 1fr; padding: 7px 10px 7px 7px; gap: 9px; } .news-portrait { width: 40px; height: 40px; } .news-title { font-size: 12.5px; } }

/* museum of forms */
.museum { grid-template-rows: auto auto 1fr; }
.museum-stats { margin: 8px 0 0; font: 500 10px var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.museum-halls { overflow: auto; padding: 8px 44px 60px; scrollbar-width: thin; scrollbar-color: #2c4545 transparent; }
.museum-hall { font: 500 10px var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--amber); margin: 22px 0 12px; }
.museum-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.exhibit { position: relative; display: grid; gap: 6px; align-content: start; padding: 10px 10px 12px; border: 1px solid var(--line); border-radius: 6px; background: rgba(169, 233, 210, .025); min-width: 0; }
.exhibit.extinct { opacity: .62; } .exhibit.extinct .exhibit-portrait { filter: saturate(.35); }
.exhibit-portrait { width: 100%; aspect-ratio: 1; max-width: 100%; border-radius: 4px; background: #061217; }
.exhibit h4 { margin: 4px 0 0; font: 400 15px/1.3 var(--serif); color: #dfe9e4; text-wrap: balance; }
.exhibit-first { margin: 0; display: flex; gap: 7px; align-items: baseline; font-size: 11px; color: var(--muted); min-width: 0; }
.exhibit-first .lineage-dot { margin-top: 0; align-self: center; } .exhibit-first em { font-family: var(--serif); color: #c8d6cf; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.exhibit-meta { margin: 0; font-size: 11px; color: var(--dim); }
.exhibit-tag { margin-left: auto; padding: 1px 6px; border-radius: 3px; font: 600 8.5px var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--amber); border: 1px solid rgba(231, 194, 124, .35); white-space: nowrap; }
.exhibit-new { position: absolute; top: 16px; left: 16px; z-index: 1; padding: 2px 7px; border-radius: 3px; font: 600 9px var(--sans); letter-spacing: .12em; text-transform: uppercase; color: #041014; background: var(--amber); }
.museum-teaser { border-color: rgba(231, 194, 124, .22); background: rgba(231, 194, 124, .035); } .museum-teaser .eyebrow, .museum-teaser svg { color: var(--amber); }
.portrait-gl { position: fixed; left: -10000px; top: 0; width: 200px; height: 200px; pointer-events: none; }
@media (max-width: 860px) { .museum-halls { padding: 8px 14px 80px; } .museum-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; } }

/* tree of life */
.tree { position: fixed; inset: 0; z-index: 10; background: #040c10; display: grid; grid-template-rows: auto auto 1fr; }
.tree-top { display: flex; justify-content: space-between; gap: 1rem; padding: calc(env(safe-area-inset-top, 0px) + 22px) 44px 10px; border-bottom: 1px solid var(--line); }
.tree-top .eyebrow { color: var(--amber); } .tree-top h2 { font-family: var(--serif); font-weight: 300; font-size: 30px; margin: 6px 0 4px; }
.tree-legend { margin: 0; font-size: 11px; color: var(--dim); max-width: 560px; line-height: 1.6; }
.tree-status { margin: 12px 44px 0; color: var(--muted); font-family: var(--serif); font-size: 16px; }
.tree-plot { overflow: auto; padding: 4px 32px 40px; scrollbar-width: thin; scrollbar-color: #2c4545 transparent; }
.tree-plot svg { display: block; width: auto; height: auto; stroke: none; fill: none; } /* not an icon: keep its own size */
.tree-epoch { font: 500 9px var(--sans); letter-spacing: .12em; fill: #c9ae74; text-transform: uppercase; }
.tree-tick { font: 9px var(--sans); fill: #5f7a74; }
.tree-name { font: italic 11px var(--serif); fill: #c8d6cf; } .tree-name.extinct { fill: #6f8781; }
.tree-lane { cursor: pointer; outline: none; } .tree-lane:hover rect, .tree-lane:focus rect { fill: rgba(169, 233, 210, .05); }
.tree-alive { filter: drop-shadow(0 0 4px currentColor); }
.tree-detail { position: fixed; right: 28px; bottom: 28px; width: 320px; padding: 16px 18px; background: var(--sheet); border: 1px solid var(--line); border-radius: 8px; display: grid; gap: 10px; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.tree-teaser { width: 100%; display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center; text-align: left; margin: 16px 0 4px; padding: 14px 15px; border: 1px solid rgba(169, 233, 210, .25); background: rgba(169, 233, 210, .04); border-radius: 5px; }
.tree-teaser .eyebrow { color: var(--accent); } .tree-teaser span:nth-child(2) { font-family: var(--serif); font-size: 17px; }
.tree-teaser svg { grid-column: 2; grid-row: 1 / 3; width: 16px; color: var(--accent); }
.mini-link { font-size: 9px; letter-spacing: .06em; text-transform: none; }
@media (max-width: 860px) { .tree-top { padding: calc(env(safe-area-inset-top, 0px) + 16px) 18px 10px; } .tree-plot { padding: 4px 8px 200px; } .tree-status { margin: 12px 18px 0; } .tree-detail { left: 12px; right: 12px; bottom: 12px; width: auto; } }

/* time-lapse */
.timelapse { position: fixed; inset: 0; background: #02070a; z-index: 10; }
.timelapse canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.tl-top { position: absolute; top: calc(env(safe-area-inset-top, 0px) + 26px); left: 44px; right: 44px; display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.tl-top .eyebrow { color: var(--amber); }
.tl-time { font-family: var(--serif); font-weight: 300; font-size: 30px; line-height: 1.1; margin-top: 8px; text-shadow: 0 1px 8px #000; }
.tl-counts { color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; margin-top: 6px; text-shadow: 0 1px 6px #000; }
.tl-status { position: absolute; inset: 45% 16px auto; margin: 0; text-align: center; color: var(--muted); font-family: var(--serif); font-size: 18px; }
.tl-controls { position: absolute; left: 44px; right: 44px; bottom: calc(env(safe-area-inset-bottom, 0px) + 30px); display: flex; gap: .7rem; align-items: center; }
.tl-play { min-width: 44px; height: 44px; border: 1px solid var(--line); background: var(--glass); border-radius: 6px; color: var(--accent); }
.tl-bar { position: relative; flex: 1; height: 44px; background: var(--glass); border: 1px solid var(--line); border-radius: 6px; cursor: pointer; touch-action: none; overflow: hidden; }
.tl-spark { position: absolute; inset: 2px 0; width: 100%; height: calc(100% - 4px); }
.tl-head { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--amber); box-shadow: 0 0 8px var(--amber); }

.waking { position: fixed; inset: 47% 16px auto; margin: 0; text-align: center; font-family: var(--serif); font-size: 19px; font-weight: 300; color: var(--muted); letter-spacing: .02em; animation: breathe 2.6s ease-in-out infinite; pointer-events: none; z-index: 1; }
body.ready .waking { display: none; }
@keyframes breathe { 50% { opacity: .4; } }
.fallback { display: none; position: fixed; inset: 40% 16px auto; text-align: center; }
body.no-webgl .fallback { display: block; }
body.no-webgl .waking { display: none; }
@media (prefers-reduced-motion: reduce) { .waking { animation: none; } .guide, .intro, .world-caption { transition: none; } }

/* narrow screens */
@media (max-width: 860px) {
  .header { height: 74px; padding: env(safe-area-inset-top, 0px) 18px 0; }
  .header-center, .connection, .canvas-hint { display: none; }
  .brand-mark { width: 30px; height: 30px; } .brand-word { font-size: 17px; letter-spacing: .22em; } .brand { gap: 9px; }
  .brand-sub { font-size: 8px; padding-left: 9px; }
  .header-right { gap: 16px; } .language { padding-left: 14px; }
  .intro { left: 20px; right: 20px; width: auto; top: auto; bottom: calc(env(safe-area-inset-bottom, 0px) + 168px); transform: none; }
  body:not(.intro-open) .intro { transform: translateY(10px); }
  h1 { font-size: clamp(40px, 11.5vw, 58px); margin: 18px 0 16px; }
  .intro-copy { font-size: 13px; margin-bottom: 22px; }
  .vignette { background: linear-gradient(0deg, rgba(3, 12, 17, .95), rgba(3, 12, 17, .55) 45%, transparent 70%, rgba(3, 12, 17, .6)); }
  .footer { left: 14px; right: 14px; bottom: calc(env(safe-area-inset-bottom, 0px) + 14px); flex-wrap: wrap; gap: 10px; }
  .world-age { width: auto; order: 1; } #age { font-size: 24px; } .season-line { display: none; }
  .world-count { order: 2; min-width: 0; } .count-foot { display: none; }
  .dock { order: 3; width: 100%; justify-content: space-between; padding: 6px; }
  .dock-button { flex-direction: column; gap: 4px; padding: 8px 6px; font-size: 10px; flex: 1; }
  .dock-divider { display: none; }
  .world-caption { left: 20px; right: 20px; bottom: auto; top: 86px; max-width: none; font-size: 10.5px; }
  body.intro-open .world-caption { display: none; }
  .selection { left: 14px; right: 14px; width: auto; top: auto; bottom: calc(env(safe-area-inset-bottom, 0px) + 150px); max-height: 52%; overflow-y: auto; }
  .selection.compact { top: calc(env(safe-area-inset-top, 0px) + 70px); bottom: auto; width: auto; }
  /* following on a phone: only the compact card and the dock stay over the ocean */
  body.focus .world-caption, body.focus .world-age, body.focus .world-count { opacity: 0; pointer-events: none; }
  .guide { top: auto; left: 0; right: 0; bottom: 0; width: auto; height: 74%; border-radius: 14px 14px 0 0; transform: translateY(calc(100% + 20px)); padding: 20px 20px calc(env(safe-area-inset-bottom, 0px) + 20px); }
  .guide.open { transform: none; }
  .about-sheet, .paper-sheet { padding: 22px 20px 24px; } .about-top, .paper-top { margin: -2px -20px 18px; padding: 0 20px 2px; }
  .tl-top, .tl-controls { left: 16px; right: 16px; }
}
@media (max-width: 380px) { .head-link#paper { display: none; } }
