/* ============================================================
   TALLEST — paper, ink and one red line.
   The interface is a drawing sheet laid over a model table.
   ============================================================ */
:root {
  --paper: #f3f2ef; --sheet: #f8f7f4; --ink: #131313; --ink2: rgba(19, 19, 19, .64); --ink3: rgba(19, 19, 19, .4);
  --hair: rgba(19, 19, 19, .16); --red: #d9432a;
  --serif: "Cormorant Garamond", "Cormorant", Garamond, "Times New Roman", serif;
  --sans: "Jost", "Futura", "Century Gothic", system-ui, sans-serif;
  --top: 64px; --sheet-w: 412px; --gut: 22px; --ruler: 62px; --dock-h: 158px; --peek: 0px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--paper); color: var(--ink); font-family: var(--sans); overflow: hidden; overscroll-behavior: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
.hidden { display: none !important; }
#gl { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
#gl:active { cursor: grabbing; }
.caps { font: 500 10.5px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; }

/* ---------- loading ---------- */
#loading { position: fixed; inset: 0; z-index: 50; background: var(--paper); display: grid; place-content: center; justify-items: center; gap: 18px; transition: opacity .7s; }
#loading.out { opacity: 0; pointer-events: none; }
.ld-mark { font: 300 92px/1 var(--serif); }
.ld-bar { width: 180px; height: 1px; background: var(--hair); position: relative; }
.ld-bar i { position: absolute; left: 0; top: -1px; height: 3px; width: 0; background: var(--red); transition: width .25s; }
#ldMsg { font: 500 10.5px/1 var(--sans); letter-spacing: .22em; text-transform: uppercase; color: var(--ink2); }

/* ---------- top bar ---------- */
#hud { position: fixed; inset: 0; pointer-events: none; z-index: 5; }
#hud > * { pointer-events: auto; }
#top { position: absolute; left: 0; right: 0; top: 0; height: var(--top); display: flex; align-items: center; gap: 18px; padding: 0 var(--gut) 0 calc(var(--ruler) + 6px); pointer-events: none; }
#top > * { pointer-events: auto; }
.brand { display: flex; align-items: baseline; gap: 16px; color: var(--ink); text-decoration: none; }
.brand b { font: 600 15px/1 var(--sans); letter-spacing: .42em; text-transform: uppercase; }
.brand span { font: italic 400 17px/1 var(--serif); color: var(--ink2); }
.spacer { flex: 1; }
.seg { display: flex; border: 1px solid var(--ink); background: var(--sheet); }
.seg button { font: 500 10.5px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; padding: 9px 12px; border-left: 1px solid var(--hair); }
.seg button:first-child { border-left: 0; }
.seg button.on { background: var(--ink); color: var(--sheet); }
.txt { font: 500 10.5px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; padding: 10px 2px; border-bottom: 1px solid var(--ink); }
.txt:hover { color: var(--red); border-color: var(--red); }

/* ---------- height ruler ---------- */
#ruler { position: absolute; left: 0; top: 0; bottom: 0; width: var(--ruler); pointer-events: none; transition: opacity .3s; }
#ruler .r-axis { position: absolute; left: calc(var(--ruler) - 14px); top: 0; bottom: 0; width: 1px; background: var(--hair); }
#rTicks i { position: absolute; right: 14px; top: 0; height: 1px; width: 6px; background: var(--ink3); transform: translateY(calc(var(--base) - var(--h) * var(--k))); }
#rTicks i.big { width: 12px; background: var(--ink); }
#rTicks i.big::before { content: attr(data-l); position: absolute; right: 17px; top: -5px; font: 400 10.5px/1 var(--sans); letter-spacing: .04em; color: var(--ink2); font-variant-numeric: tabular-nums; }
.r-mark { position: absolute; left: calc(var(--ruler) - 20px); top: 0; height: 1px; width: 40px; background: var(--red); transform: translateY(calc(var(--base) - var(--h) * var(--k))); transition: transform .5s cubic-bezier(.2, .8, .2, 1); pointer-events: none; }
.r-mark b { position: absolute; left: 46px; top: -9px; font: 500 21px/1 var(--serif); color: var(--red); white-space: nowrap; }
.r-mark span { position: absolute; left: 47px; top: 15px; font: 500 9.5px/1 var(--sans); letter-spacing: .14em; color: var(--red); white-space: nowrap; }

/* ---------- labels on the edge of the table ---------- */
#labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.lab { position: absolute; left: 0; top: 0; width: 150px; margin-left: -75px; text-align: center; transform: translate(calc(var(--fx) + (var(--x) - var(--cx)) * var(--k)), var(--fy)); opacity: .34; transition: opacity .35s; }
.lab.on { opacity: 1; }
.lab b { display: block; font: 300 26px/1 var(--serif); }
.lab span { display: block; margin-top: 5px; font: 500 9px/1.25 var(--sans); letter-spacing: .17em; text-transform: uppercase; }
.lab em { display: block; margin: 4px -44px 0; white-space: nowrap; font: italic 400 14px/1.15 var(--serif); color: var(--ink2); }
.lab.on b { color: var(--red); }
body.zoomed .lab, body.building .lab:not(.on) { opacity: 0; }

/* ---------- arrows ---------- */
.arrow { position: absolute; top: 46%; width: 42px; height: 42px; border: 1px solid var(--ink); background: var(--sheet); display: grid; place-items: center; transition: background .15s, color .15s; }
.arrow svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.arrow:hover { background: var(--ink); color: var(--sheet); }
.arrow:disabled { opacity: .25; pointer-events: none; }
#prevBtn { left: calc(var(--ruler) + 10px); }
#nextBtn { right: calc(var(--sheet-w) + var(--gut) * 2); }

/* ---------- the sheet ---------- */
#sheet { position: absolute; right: var(--gut); top: calc(var(--top) + 8px); bottom: var(--gut); width: var(--sheet-w); background: var(--sheet); border: 1px solid var(--ink); display: flex; flex-direction: column; box-shadow: 10px 10px 0 rgba(19, 19, 19, .05); }
#grip { display: none; }
.sh-head { display: grid; grid-template-columns: auto 1fr auto; gap: 0 16px; align-items: end; padding: 20px 22px 14px; border-bottom: 1px solid var(--ink); }
.sh-no b { display: block; font: 300 68px/.8 var(--serif); letter-spacing: -.02em; }
.sh-no span { display: block; margin-top: 8px; font: 500 9.5px/1 var(--sans); letter-spacing: .2em; color: var(--ink2); }
.sh-title { min-width: 0; padding-bottom: 1px; }
.sh-title h1 { margin: 0; font: 500 31px/1.02 var(--serif); letter-spacing: -.005em; text-wrap: balance; }
.sh-loc { margin-top: 9px; font: 500 9.5px/1.4 var(--sans); letter-spacing: .19em; text-transform: uppercase; color: var(--ink2); }
.sh-big { text-align: right; }
.sh-big b { display: block; font: 400 34px/.9 var(--serif); color: var(--red); font-variant-numeric: lining-nums; }
.sh-big span { display: block; margin-top: 7px; font: 500 9px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--red); }

/* the people: a head coming out of a circle */
.cast { display: flex; align-items: flex-start; gap: 16px; padding: 34px 22px 12px; border-bottom: 1px solid var(--hair); min-height: 96px; }
.cast-one { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 9px; width: 74px; text-align: center; }
.cast-one small { display: block; width: 100%; }
.cast-one small { font: 500 8.5px/1.25 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--ink2); }
.cast-one:hover small { color: var(--red); }
.ava { --s: 52px; position: relative; display: block; width: var(--s); height: var(--s); flex: none; }
.ava-hole { position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle at 50% 30%, #3a3a3a 0%, #151515 70%); box-shadow: inset 0 calc(var(--s) * .08) calc(var(--s) * .16) rgba(0, 0, 0, .7), 0 0 0 calc(var(--s) * .045) var(--sheet), 0 0 0 calc(var(--s) * .065) var(--ink); }
/* What shows of the cut-out: the circle itself, plus a column (80 % of the circle wide) rising out of its top.
   The column meets the circle exactly on its rim, so shoulders are only ever cut by the round rim, never by a
   straight edge, and the head has room to grow on rollover. */
.ava-pop { position: absolute; left: 0; right: 0; bottom: 0; height: 200%; pointer-events: none;
  -webkit-mask: linear-gradient(#000 0 0) 50% 0 / 80% calc(100% - var(--s) * .8) no-repeat, radial-gradient(circle at 50% calc(100% - var(--s) / 2), #000 calc(var(--s) / 2 - .6px), transparent calc(var(--s) / 2)) no-repeat;
  mask: linear-gradient(#000 0 0) 50% 0 / 80% calc(100% - var(--s) * .8) no-repeat, radial-gradient(circle at 50% calc(100% - var(--s) / 2), #000 calc(var(--s) / 2 - .6px), transparent calc(var(--s) / 2)) no-repeat; }
.ava-pop img { position: absolute; left: 50%; bottom: 0; width: 116%; max-width: none; height: auto; transform: translateX(-50%); transform-origin: 50% 100%; transition: transform .25s cubic-bezier(.2, .8, .2, 1); filter: drop-shadow(0 calc(var(--s) * .03) calc(var(--s) * .05) rgba(0, 0, 0, .35)); user-select: none; -webkit-user-drag: none; }
.cast-one:hover .ava-pop img, .person:hover .ava-pop img { transform: translateX(-50%) scale(1.07); }
.ava-init { position: absolute; inset: 0; display: grid; place-items: center; color: var(--sheet); font: 400 calc(var(--s) * .42)/1 var(--serif); letter-spacing: .02em; }

.specs { display: grid; grid-template-columns: 1fr 1fr; margin: 0; border-bottom: 1px solid var(--ink); }
.specs div { padding: 10px 22px 11px; border-top: 1px solid var(--hair); }
.specs div:nth-child(-n+2) { border-top: 0; }
.specs div:nth-child(odd) { border-right: 1px solid var(--hair); }
.specs dt { font: 500 8.5px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--ink3); }
.specs dd { margin: 6px 0 0; font: 400 14px/1.25 var(--sans); }

.tabs { display: flex; gap: 2px; padding: 0 14px; border-bottom: 1px solid var(--hair); }
.tabs button { flex: 1; padding: 14px 4px 12px; font: 500 9.5px/1 var(--sans); letter-spacing: .17em; text-transform: uppercase; color: var(--ink3); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button:hover { color: var(--ink); }
.tabs button.on { color: var(--ink); border-color: var(--red); }
.tab-body { flex: 1; min-height: 0; overflow-y: auto; padding: 20px 22px 26px; scrollbar-width: thin; scrollbar-color: var(--hair) transparent; -webkit-overflow-scrolling: touch; }
.tab-body p { margin: 0 0 13px; font: 400 14.5px/1.58 var(--sans); color: rgba(19, 19, 19, .86); }
.tab-body p.lede { font: 400 21px/1.28 var(--serif); color: var(--ink); margin-bottom: 16px; text-wrap: pretty; }
.tab-body h3 { margin: 24px 0 10px; font: 500 9.5px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--ink2); display: flex; align-items: center; gap: 10px; }
.tab-body h3::after { content: ""; flex: 1; height: 1px; background: var(--hair); }
.tab-body h3:first-child { margin-top: 0; }
figure.photo { margin: 0 0 18px; cursor: zoom-in; }
figure.photo img { display: block; width: 100%; height: 190px; object-fit: cover; filter: grayscale(1) contrast(1.05); border: 1px solid var(--ink); transition: filter .3s; }
figure.photo:hover img { filter: none; }
figure.photo figcaption { margin-top: 6px; font: 400 10.5px/1.35 var(--sans); color: var(--ink3); }
ol.facts { list-style: none; margin: 0; padding: 0; counter-reset: f; }
ol.facts li { counter-increment: f; display: grid; grid-template-columns: 30px 1fr; padding: 9px 0; border-top: 1px solid var(--hair); font: 400 13.5px/1.5 var(--sans); }
ol.facts li::before { content: counter(f, decimal-leading-zero); font: 400 17px/1.1 var(--serif); color: var(--red); }
table.kv { width: 100%; border-collapse: collapse; margin: 0 0 6px; }
table.kv th { text-align: left; vertical-align: top; width: 104px; padding: 9px 10px 9px 0; font: 500 8.5px/1.5 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--ink3); border-top: 1px solid var(--hair); }
table.kv td { padding: 8px 0; font: 400 13.5px/1.5 var(--sans); border-top: 1px solid var(--hair); }
.stages { display: grid; gap: 0; }
.stage { display: grid; grid-template-columns: 30px 1fr; gap: 0 2px; text-align: left; padding: 10px 0; border-top: 1px solid var(--hair); }
.stage i { font: 400 17px/1.1 var(--serif); font-style: normal; color: var(--ink3); }
.stage b { font: 500 9.5px/1.3 var(--sans); letter-spacing: .18em; text-transform: uppercase; }
.stage span { grid-column: 2; margin-top: 4px; font: 400 13.5px/1.5 var(--sans); color: rgba(19, 19, 19, .8); }
.stage:hover i, .stage.on i { color: var(--red); } .stage.on b { color: var(--red); }
.dwg { border: 1px solid var(--ink); background: #fbfaf8; margin: 0 0 14px; position: relative; }
.dwg svg { display: block; width: 100%; height: auto; }
.dwg .tb { display: flex; justify-content: space-between; gap: 10px; padding: 7px 10px; border-top: 1px solid var(--ink); font: 500 8.5px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; }
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.plans .dwg { margin: 0; }
.person { display: grid; grid-template-columns: 84px 1fr; gap: 0 14px; padding: 34px 0 16px; border-top: 1px solid var(--hair); align-items: start; }
.person:first-child { border-top: 0; padding-top: 26px; }
.person .ava { --s: 72px; margin: 0 6px; }
.person h4 { margin: 0; font: 500 22px/1.05 var(--serif); }
.person .role { margin: 6px 0 8px; font: 500 8.5px/1.4 var(--sans); letter-spacing: .17em; text-transform: uppercase; color: var(--red); }
.person p { font-size: 13.5px; margin: 0; }
.person .cr { margin-top: 7px; font: 400 10px/1.35 var(--sans); color: var(--ink3); }
.firms { margin-top: 6px; }
ul.src { list-style: none; margin: 0; padding: 0; }
ul.src li { padding: 8px 0; border-top: 1px solid var(--hair); font: 400 12.5px/1.45 var(--sans); color: var(--ink2); }
a { color: inherit; text-decoration-color: var(--red); text-underline-offset: 3px; }
a:hover { color: var(--red); }
.sh-foot { display: flex; justify-content: space-between; gap: 10px; padding: 9px 22px; border-top: 1px solid var(--ink); font: 500 8.5px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--ink2); }
.sh-foot i { font-style: normal; }

/* ---------- dock: construction slider + skyline ---------- */
#dock { position: absolute; left: calc(var(--ruler) + 10px); right: calc(var(--sheet-w) + var(--gut) * 2); bottom: var(--gut); display: flex; flex-direction: column; gap: 10px; }
#buildBar { display: flex; align-items: center; gap: 14px; padding: 9px 12px 9px 9px; background: var(--sheet); border: 1px solid var(--ink); }
#playBtn { width: 38px; height: 38px; flex: none; border-radius: 50%; background: var(--ink); display: grid; place-items: center; }
#playBtn svg { width: 16px; height: 16px; fill: var(--sheet); }
#playBtn .pa { display: none; } #playBtn.playing .pa { display: block; } #playBtn.playing .pl { display: none; }
#playBtn:hover { background: var(--red); }
.bb-main { flex: 1; min-width: 0; }
.bb-cap { display: flex; align-items: baseline; gap: 12px; height: 16px; overflow: hidden; white-space: nowrap; }
.bb-cap b { font: 500 9.5px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--red); flex: none; }
.bb-cap span { font: italic 400 15px/1 var(--serif); color: var(--ink2); overflow: hidden; text-overflow: ellipsis; }
.bb-track { position: relative; height: 22px; margin-top: 3px; }
.bb-ticks { position: absolute; left: 7px; right: 7px; top: 0; bottom: 0; pointer-events: none; }
.bb-ticks i { position: absolute; top: 6px; width: 1px; height: 10px; background: var(--ink3); }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; margin: 0; background: transparent; cursor: pointer; position: relative; z-index: 1; }
input[type=range]::-webkit-slider-runnable-track { height: 1px; background: linear-gradient(to right, var(--red) var(--p, 100%), var(--ink) var(--p, 100%)); }
input[type=range]::-moz-range-track { height: 1px; background: var(--ink); }
input[type=range]::-moz-range-progress { height: 1px; background: var(--red); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; margin-top: -7px; border-radius: 50%; background: var(--red); border: 2px solid var(--sheet); box-shadow: 0 0 0 1px var(--red); }
input[type=range]::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: var(--red); border: 2px solid var(--sheet); box-shadow: 0 0 0 1px var(--red); }
.tog { flex: none; font: 500 9.5px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; padding: 10px 11px; border: 1px solid var(--ink); }
.tog[aria-pressed=true] { background: var(--ink); color: var(--sheet); }
#skyline { position: relative; height: 112px; background: var(--sheet); border: 1px solid var(--ink); cursor: ew-resize; touch-action: none; outline: none; user-select: none; }
#skySvg { position: absolute; left: 10px; right: 10px; top: 8px; bottom: 0; width: calc(100% - 20px); height: calc(100% - 8px); overflow: visible; }
#skySvg path { fill: rgba(19, 19, 19, .16); transition: fill .25s; }
#skySvg path.on { fill: var(--ink); }
#skySvg path.hv { fill: rgba(19, 19, 19, .4); }
#skySvg line { stroke: var(--ink); stroke-width: 1; vector-effect: non-scaling-stroke; }
#skyCursor { position: absolute; top: 0; bottom: 0; left: 0; width: 1px; pointer-events: none; transition: transform .35s cubic-bezier(.2, .8, .2, 1); }
#skyCursor i { position: absolute; left: -4px; bottom: -1px; width: 9px; height: 3px; background: var(--red); }
#hint { position: absolute; left: calc(var(--ruler) + 12px); top: calc(var(--top) + 40px); font: italic 400 15px/1.3 var(--serif); color: var(--ink2); max-width: 300px; transition: opacity .6s; pointer-events: none; }
#hint.out { opacity: 0; }

/* ---------- modals ---------- */
.modal { border: 1px solid var(--ink); background: var(--sheet); color: var(--ink); padding: 0; width: min(680px, calc(100vw - 28px)); max-height: min(86vh, 900px); box-shadow: 14px 14px 0 rgba(19, 19, 19, .08); }
.modal::backdrop { background: rgba(243, 242, 239, .82); backdrop-filter: blur(6px); }
.modal .x { position: sticky; float: right; top: 12px; margin: 12px 12px 0 0; width: 34px; height: 34px; border: 1px solid var(--ink); background: var(--sheet); font: 300 20px/1 var(--sans); z-index: 2; }
.modal .x:hover { background: var(--ink); color: var(--sheet); }
.ab { padding: 34px 38px 30px; }
.ab .kick { font: 500 9.5px/1 var(--sans); letter-spacing: .22em; text-transform: uppercase; color: var(--red); }
.ab h2 { margin: 12px 0 14px; font: 400 40px/1.02 var(--serif); letter-spacing: -.01em; }
.ab p { margin: 0 0 13px; font: 400 15px/1.6 var(--sans); color: rgba(19, 19, 19, .86); }
.ab p.lede { font: 400 22px/1.3 var(--serif); color: var(--ink); }
.ab h3 { margin: 26px 0 4px; font: 500 9.5px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--ink2); display: flex; align-items: center; gap: 10px; }
.ab h3::after { content: ""; flex: 1; height: 1px; background: var(--hair); }
.ab table.kv th { width: 128px; }
.ab-foot { margin-top: 30px; padding-top: 26px; border-top: 1px solid var(--ink); display: grid; justify-items: center; gap: 12px; text-align: center; }
.gr-seal { display: block; width: 148px; height: 148px; color: var(--ink); transition: transform .5s cubic-bezier(.2, .8, .2, 1), color .2s; }
.gr-seal:hover { transform: rotate(-9deg) scale(1.04); color: var(--red); }
.gr-seal svg { width: 100%; height: 100%; display: block; }
.ab-foot small { font: 500 9px/1.5 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--ink3); }
.lb { width: min(1100px, calc(100vw - 20px)); }
.lb img { display: block; width: 100%; max-height: 78vh; object-fit: contain; background: #111; }
.lb p { margin: 0; padding: 10px 14px; font: 400 12px/1.45 var(--sans); color: var(--ink2); }

/* ---------- phone ---------- */
@media (max-width: 860px) {
  :root { --top: 50px; --gut: 10px; --ruler: 40px; --peek: 96px; }
  #sheet { overflow: hidden; }
  #top { padding: 0 10px 0 12px; gap: 10px; }
  .brand span, .arrow { display: none; }
  .brand b { font-size: 13px; letter-spacing: .34em; }
  .seg button { padding: 8px 8px; font-size: 9px; letter-spacing: .12em; }
  .txt { font-size: 9px; }
  #rTicks i.big::before { font-size: 8.5px; right: 14px; letter-spacing: 0; }
  #rTicks i:not(.big) { display: none; }
  .r-mark b { font-size: 17px; left: 42px; top: -12px; } .r-mark span { display: none; }
  .lab { width: 96px; margin-left: -48px; } .lab b { font-size: 19px; } .lab span { font-size: 7.5px; letter-spacing: .12em; } .lab em { margin: 3px -50px 0; font-size: 11.5px; }
  #sheet { left: 0; right: 0; top: auto; bottom: 0; width: auto; height: var(--peek); border-width: 1px 0 0; box-shadow: 0 -10px 30px rgba(19, 19, 19, .08); transition: height .38s cubic-bezier(.2, .8, .2, 1); z-index: 8; }
  #sheet.open { height: min(74dvh, calc(100dvh - 70px)); }
  #grip { display: block; position: absolute; left: 0; right: 0; top: 0; height: 22px; z-index: 3; }
  #grip i { position: absolute; left: 50%; top: 7px; width: 38px; height: 3px; margin-left: -19px; background: var(--ink); border-radius: 2px; opacity: .5; }
  .sh-head { padding: 24px 16px 10px; gap: 0 12px; }
  .sh-no b { font-size: 46px; } .sh-no span { margin-top: 5px; font-size: 8.5px; }
  .sh-title h1 { font-size: 24px; } .sh-loc { margin-top: 6px; font-size: 8.5px; letter-spacing: .15em; }
  .sh-big b { font-size: 27px; } .sh-big span { margin-top: 5px; font-size: 8px; }
  .cast { padding: 28px 16px 10px; gap: 12px; min-height: 90px; }
  .specs div { padding: 9px 16px 10px; }
  .tabs { padding: 0 8px; } .tabs button { font-size: 8.5px; letter-spacing: .12em; }
  .tab-body { padding: 18px 16px 30px; }
  .sh-foot { padding: 9px 16px calc(9px + env(safe-area-inset-bottom)); }
  #dock { left: 8px; right: 8px; bottom: calc(var(--peek) + 8px); gap: 6px; }
  #buildBar { gap: 8px; padding: 6px 8px 6px 6px; }
  #playBtn { width: 32px; height: 32px; }
  .bb-cap span { font-size: 13px; }
  .tog { padding: 9px 7px; font-size: 8.5px; letter-spacing: .12em; }
  #skyline { height: 54px; }
  #hint { left: 12px; right: 12px; top: calc(var(--top) + 2px); font-size: 13.5px; max-width: none; }
  .ab { padding: 26px 20px 24px; } .ab h2 { font-size: 32px; }
  .plans { gap: 8px; }
}
@media (prefers-reduced-motion: reduce) { * { transition-duration: .01s !important; } }

.nocast { font: italic 400 15px/1.35 var(--serif); color: var(--ink2); align-self: center; }

.lab:not(.on) span, .lab:not(.on) em { display: none; }

/* phones and embedded viewers: keep clear of system bars */
#top { top: env(safe-area-inset-top, 0px); padding-right: max(var(--gut), env(safe-area-inset-right, 0px)); }
#sheet { margin-bottom: 0; }
@media (max-width: 860px) { #sheet { padding-bottom: env(safe-area-inset-bottom, 0px); height: calc(var(--peek) + env(safe-area-inset-bottom, 0px)); } #dock { bottom: calc(var(--peek) + 8px + env(safe-area-inset-bottom, 0px)); } }

/* ---------- finish: the model, or a cast in metal ---------- */
#finish { position: absolute; left: calc(var(--ruler) + 12px); top: calc(var(--top) + 2px + env(safe-area-inset-top, 0px)); display: flex; align-items: center; gap: 7px; }
#finish span { font: 500 9.5px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--ink2); margin-right: 3px; }
#finish b { font: italic 400 16px/1 var(--serif); color: var(--ink); margin-left: 4px; min-width: 52px; }
#finish button { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; border: 1px solid transparent; }
#finish button.on { border-color: var(--ink); }
#finish button:hover { border-color: var(--ink3); } #finish button.on:hover { border-color: var(--ink); }
.sw { display: block; width: 18px; height: 18px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(19, 19, 19, .28); }
.sw-model { background: linear-gradient(135deg, #ffffff 0 50%, #c9d2d8 50% 100%); }
.sw-gold { background: radial-gradient(circle at 34% 30%, #fff3c4 0, #e8b64a 42%, #9c7120 100%); }
.sw-silver { background: radial-gradient(circle at 34% 30%, #ffffff 0, #d9dcdf 45%, #8d9196 100%); }
.sw-pewter { background: linear-gradient(160deg, #a5a7a9, #77797b); }
.tog:disabled { opacity: .3; pointer-events: none; }
@media (max-width: 860px) { #finish { left: 46px; gap: 5px; } #finish span { display: none; } #finish b { font-size: 14px; } #hint { top: calc(var(--top) + 34px); left: 46px; } }

#finish { right: calc(var(--sheet-w) + var(--gut) * 2 + 12px); }
#finishNote { flex: 1 1 0; min-width: 0; margin-left: 6px; font: italic 400 13.5px/1.25 var(--serif); color: var(--ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#finishNote u { text-decoration: none; }
@media (max-width: 1280px) { #finishNote u { display: none; } }
@media (max-width: 860px) { #finish { right: 10px; } #finishNote { font-size: 12.5px; margin-left: 2px; } }
body.cast #hint { display: none; }

/* ---------- towers still to come ---------- */
.sh-status { display: none; margin: 0 22px; padding: 9px 0 10px; border-top: 1px solid var(--hair); font: 500 9.5px/1.5 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--ink2); }
#sheet.fut .sh-status { display: block; }
.sh-status b { color: var(--red); font-weight: 600; margin-right: 8px; }
.sh-status span { letter-spacing: .08em; text-transform: none; font: italic 400 14px/1.35 var(--serif); color: var(--ink2); }
#sheet.fut .sh-no b { font-style: italic; }
.lab.fut b { font-style: italic; } .lab.fut em::after { content: 'to come'; display: block; margin-top: 2px; font-size: .86em; }
#skySvg path.fut { fill: rgba(19, 19, 19, .03); stroke: rgba(19, 19, 19, .42); stroke-width: 1; stroke-dasharray: 3 2; vector-effect: non-scaling-stroke; }
#skySvg path.fut.on { fill: rgba(217, 67, 42, .18); stroke: var(--red); stroke-dasharray: none; }
#skySvg path.fut.hv { fill: rgba(19, 19, 19, .12); }
@media (max-width: 860px) { .sh-status { margin: 0 14px; padding: 7px 0 8px; } .sh-status span { font-size: 13px; } }

/* ---------- the photographed finish: a generated photograph of the tower in front of a round window on its own city.
   The page behind is one flat tone and the photograph is a cut-out, so there is no picture edge to line up with anything. ---------- */
/* the swatch is a real miniature: a crop of the Dubai panorama (img/photo/thumb.webp, 108 px for sharp phones) */
.sw-photo { background: #9db7cc url(../img/photo/thumb.webp) 50% 50% / cover no-repeat; }
#photo { position: fixed; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; background: var(--paper); opacity: 0; visibility: hidden; transition: opacity .45s, visibility 0s .45s; --d: 300px; }
body.photo-on #photo { opacity: 1; visibility: visible; transition: opacity .45s; }
.ph-win { position: absolute; left: 0; top: 0; width: var(--d); height: var(--d); border-radius: 50%; overflow: hidden; transform: translate(var(--wx, 0px), var(--wy, 0px)); background: #c9d1d6;
  box-shadow: 0 0 0 calc(var(--d) * .014 + 1px) var(--paper), 0 0 0 calc(var(--d) * .014 + 2px) var(--ink); }
.ph-win::after { content: ''; position: absolute; inset: 0; border-radius: 50%; box-shadow: inset 0 calc(var(--d) * .025) calc(var(--d) * .06) rgba(0, 0, 0, .3), inset 0 0 0 1px rgba(19, 19, 19, .35); }
.ph-bg { position: absolute; inset: 0; background-repeat: repeat-x; background-size: auto 100%; background-position: var(--bx, 0px) 0; }
/* the window is held back a fifth so the building stands forward: a black veil over the panorama, and in plan, where the
   tower is part of the picture, the same veil with a soft clearing over the tower */
.ph-bg::after { content: ''; position: absolute; inset: 0; background: rgba(0, 0, 0, .2); }
.ph-dim { position: absolute; inset: 0; display: none; background: radial-gradient(circle closest-side, rgba(0, 0, 0, 0) calc(var(--fr, 45%) * .92), rgba(0, 0, 0, .2) calc(var(--fr, 45%) * 1.5)); }
#phShade { position: absolute; left: 0; top: 0; max-width: none; user-select: none; opacity: .55; filter: brightness(0) blur(calc(var(--d) * .016)); }
#phPlan { position: absolute; inset: 0; width: 100%; height: 100%; display: none; transform: rotate(var(--rot, 0deg)); user-select: none; }
.ph-sh { position: absolute; left: 50%; top: var(--sy, 90%); width: var(--sw, 80px); height: var(--sh, 30px); transform: translate(-38%, -44%); border-radius: 50%; background: radial-gradient(closest-side, rgba(6, 14, 22, .62), rgba(6, 14, 22, .36) 50%, rgba(6, 14, 22, 0)); }
#photoImg { position: absolute; left: 0; top: 0; max-width: none; user-select: none; will-change: transform; filter: sepia(.1) saturate(1.08) drop-shadow(0 0 .6px rgba(19, 19, 19, .45)); }
#photo[data-mode=plan] #phPlan, #photo[data-mode=plan] .ph-dim { display: block; }
#photo[data-mode=plan] .ph-bg, #photo[data-mode=plan] .ph-sh, #photo[data-mode=plan] #phShade, #photo[data-mode=plan] #photoImg { display: none; }
body.photo-on #labels, body.photo-on #hint { opacity: 0 !important; }
body.photo-on #buildBar { opacity: .35; pointer-events: none; }
