/* Time Machine panel: header, toolbar, collection rail, filter sheet, list rows, place card, phone sheet.
   NAVIG ink and hairlines. Selected = ink fill. Yellow is reserved for the one primary action in a view (Show places, Play story). */
.tm-drawer { --tmp-pad: 14px; --tmp-r: 10px; --tmp-soft: #f4f5f6; }
.tm-drawer [hidden] { display: none !important; }
.tm-drawer button { font-family: inherit; }
.tm-drawer em { font-style: normal; }

/* Shell: left panel on desktop, bottom sheet on phones. */
.tm-drawer { position: absolute; z-index: 1000; left: 12px; top: 12px; bottom: 12px; width: 372px; max-width: calc(100% - 24px); display: flex; flex-direction: column; background: var(--nv-raised); border: 1px solid var(--nv-line); border-radius: 14px; box-shadow: var(--nv-shadow); overflow: hidden; opacity: 0; transform: translateX(-10px); transition: opacity .35s var(--nv-ease), transform .45s var(--nv-ease); }
.is-ready .tm-drawer { opacity: 1; transform: none; }
.tm-view { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.tm-view[hidden] { display: none; }
#tm-place { overflow-y: auto; overscroll-behavior: contain; padding: 0 16px 28px; }
#tm-place > * { flex: none; }
@media (min-width: 768px) { .tm-key { margin-left: 396px !important; } }

/* Header */
.tm-head { flex: none; padding: 16px var(--tmp-pad) 0; background: #fff; }
.tm-eyebrow { font-size: 11px; font-weight: 600; letter-spacing: .14em; color: var(--nv-muted); }
.tm-head h1 { margin: 2px 0 12px; font: 700 22px/1.12 var(--nv-font); letter-spacing: -.03em; text-wrap: balance; }
.tmp-search { position: relative; display: block; }
.tmp-search input { display: block; width: 100%; height: 46px; margin: 0; padding: 0 46px 0 42px; border: 1px solid var(--nv-line); border-radius: var(--tmp-r); background: var(--tmp-soft); font: 500 15px/1 var(--nv-font); color: var(--nv-ink); appearance: none; -webkit-appearance: none; transition: border-color .2s, background-color .2s, box-shadow .2s; }
.tmp-search input::placeholder { color: var(--nv-muted); font-weight: 400; }
.tmp-search input::-webkit-search-cancel-button, .tmp-search input::-webkit-search-decoration { display: none; -webkit-appearance: none; }
.tmp-search input:focus { background: #fff; border-color: var(--nv-ink); box-shadow: 0 0 0 3px rgba(18,19,22,.08); outline: none; }
.tmp-search-ic { position: absolute; left: 14px; top: 50%; width: 18px; height: 18px; margin-top: -9px; color: var(--nv-muted); pointer-events: none; }
.tmp-search-ic svg, .tmp-clear svg { display: block; width: 100%; height: 100%; }
.tmp-clear { position: absolute; right: 1px; top: 1px; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: var(--tmp-r); background: none; color: var(--nv-muted); cursor: pointer; }
.tmp-clear svg { width: 16px; height: 16px; padding: 0; }
.tmp-clear:hover { color: var(--nv-ink); }

/* Toolbar: one joined row. */
.tmp-bar { display: flex; margin: 10px 0 0; }
.tmp-bar .tmp-extra:empty { display: none; }
.tmp-bar .tmp-extra { display: flex; margin: 0 0 0 6px; padding: 0; gap: 6px; overflow: visible; }
.tmp-tool { position: relative; flex: 1 1 0; min-width: 0; display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 40px; margin: 0; padding: 0 8px; border: 1px solid var(--nv-line); border-radius: 0; background: #fff; color: var(--nv-ink); font: 600 13px/1 var(--nv-font); white-space: nowrap; cursor: pointer; transition: background-color .2s var(--nv-ease), color .2s var(--nv-ease), border-color .2s var(--nv-ease); }
.tmp-tool::after { content: ""; position: absolute; inset: -2px 0; }
.tmp-tool + .tmp-tool { margin-left: -1px; }
.tmp-tool:first-child { border-radius: var(--tmp-r) 0 0 var(--tmp-r); }
.tmp-tool:nth-child(3) { border-radius: 0 var(--tmp-r) var(--tmp-r) 0; }
.tmp-tool > [data-ic] { display: inline-flex; flex: none; }
.tmp-tool svg, .nv-seg-item svg { display: block; width: 16px; height: 16px; flex: none; }
.tmp-tool:hover { background: var(--tmp-soft); }
.tmp-tool[aria-expanded="true"] { background: var(--nv-ink); border-color: var(--nv-ink); color: #fff; z-index: 1; }
.tmp-tool:active { transform: scale(.98); }
.tmp-badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--nv-ink); color: #fff; font: 700 11px/1 var(--nv-font); font-variant-numeric: tabular-nums; }
.tmp-tool[aria-expanded="true"] .tmp-badge { background: #fff; color: var(--nv-ink); }
.tmp-layers { margin: 8px 0 0; animation: tm-fade .2s var(--nv-ease) both; }
.tmp-layers .nv-seg { display: flex; width: 100%; }
.tmp-layers .nv-seg-item { flex: 1 1 0; min-width: 0; padding: 0 8px; gap: 6px; font-size: 13px; font-weight: 600; background: #fff; }
.tm-drawer .nv-seg-item[aria-pressed="true"], .tm-drawer .nv-pick[aria-pressed="true"] { background: var(--nv-ink); border-color: var(--nv-ink); color: #fff; }

/* Applied filters */
.tmp-applied { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 10px 0 0; }
.tmp-applied-chip { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 9px 0 11px; border: 1px solid var(--nv-ink); border-radius: 15px; background: #fff; color: var(--nv-ink); font: 600 12px/1 var(--nv-font); cursor: pointer; max-width: 100%; }
.tmp-applied-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tmp-applied-chip::after { content: ""; position: absolute; inset: -7px -2px; }
.tmp-applied-chip svg { width: 12px; height: 12px; flex: none; color: var(--nv-muted); }
.tmp-applied-chip:hover { background: var(--tmp-soft); }
.tmp-applied-clear { position: relative; height: 30px; padding: 0 6px; border: 0; background: none; color: var(--nv-ink); font: 600 12px/1 var(--nv-font); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.tmp-applied-clear::after { content: ""; position: absolute; inset: -7px -2px; }

/* Collection rail */
.tmp-rail { display: flex; gap: 6px; margin: 10px calc(var(--tmp-pad) * -1) 0; padding: 0 36px 12px var(--tmp-pad); overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; scroll-padding: 0 var(--tmp-pad); -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 32px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 32px), transparent); border-bottom: 0; }
.tmp-rail::-webkit-scrollbar { display: none; }
.tmp-pill { position: relative; flex: none; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 13px; border: 1px solid var(--nv-line); border-radius: 17px; background: #fff; color: var(--nv-ink); font: 500 13px/1 var(--nv-font); white-space: nowrap; cursor: pointer; transition: background-color .2s var(--nv-ease), color .2s var(--nv-ease), border-color .2s var(--nv-ease), transform .18s var(--nv-ease); }
.tmp-pill::after { content: ""; position: absolute; inset: -5px 0; }
.tmp-pill em { font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--nv-muted); }
.tmp-pill:hover { background: var(--tmp-soft); }
.tmp-pill:active { transform: scale(.96); }
.tmp-pill[aria-pressed="true"] { background: var(--nv-ink); border-color: var(--nv-ink); color: #fff; }
.tmp-pill[aria-pressed="true"] em { color: rgba(255,255,255,.72); }
.tm-head { box-shadow: 0 1px 0 var(--nv-line); position: relative; z-index: 2; }

.tm-meta { margin: 0; padding: 10px var(--tmp-pad) 4px; font-size: 12px; line-height: 1.4; color: var(--nv-muted); font-variant-numeric: tabular-nums; }
.tm-legend { margin: 0; padding: 8px var(--tmp-pad) 10px; border-top: 1px solid var(--nv-line); font-size: 11px; line-height: 1.5; color: var(--nv-muted); flex: none; }
.tm-legend-ring { display: inline-block; width: 11px; height: 11px; margin-right: 4px; border: 1.5px dashed var(--nv-ink); border-radius: 50%; vertical-align: -1px; }

/* Collection header */
.tm-collection-head { display: flex; justify-content: space-between; gap: 12px; margin: 10px var(--tmp-pad) 0; padding: 10px 12px; border-left: 3px solid var(--nv-ink); border-radius: 0 var(--tmp-r) var(--tmp-r) 0; background: var(--tmp-soft); font-size: 13px; }
.tm-collection-head p { margin: 2px 0 0; color: var(--nv-muted); line-height: 1.4; }
.tm-collection-head a { flex: none; align-self: center; font-weight: 600; color: var(--nv-ink); }

/* Filter sheet */
.tmf { display: flex; flex-direction: column; flex: 1; min-height: 0; background: #fff; }
.tmf[hidden] { display: none; }
#tm-home.is-filtering .tm-head, #tm-home.is-filtering .tm-list-scroll, #tm-home.is-filtering .tm-legend, #tm-home.is-filtering #tm-home-top, #tm-home.is-filtering #tm-collection-top, #tm-home.is-filtering .tm-meta { display: none; }
.tmf-head { flex: none; display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 4px; padding: 6px 6px 6px 8px; border-bottom: 1px solid var(--nv-line); }
.tmf-head h2 { margin: 0; font: 700 17px/1 var(--nv-font); letter-spacing: -.02em; }
.tmf-close, .tmf-reset { display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; padding: 0 10px; border: 0; border-radius: var(--tmp-r); background: none; color: var(--nv-ink); font: 600 13px/1 var(--nv-font); cursor: pointer; }
.tmf-close svg { width: 20px; height: 20px; }
.tmf-reset { text-decoration: underline; text-underline-offset: 3px; }
.tmf-reset:disabled, .tmf-reset-foot:disabled { opacity: .35; cursor: default; }
.tmf-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 var(--tmp-pad) 18px; }
.tmf-sec { padding: 16px 0 14px; border-top: 1px solid var(--nv-line); }
.tmf-sec:first-of-type { border-top: 0; }
.tmf-sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 0 0 10px; }
.tmf-sec-head h3 { margin: 0; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--nv-muted); }
.tmf-hint { font-size: 12px; font-weight: 600; color: var(--nv-ink); }
.tmf-empty { display: grid; gap: 6px; margin: 12px 0 0; padding: 12px; border-left: 3px solid var(--nv-ink); border-radius: 0 var(--tmp-r) var(--tmp-r) 0; background: var(--tmp-soft); font-size: 13px; line-height: 1.4; }
.tmf-fixes { display: flex; flex-wrap: wrap; gap: 6px; }
.tmf-fix, .tmp-empty-btn { position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border: 1px solid var(--nv-ink); border-radius: 20px; background: #fff; color: var(--nv-ink); font: 600 13px/1 var(--nv-font); cursor: pointer; }
.tmf-fix:hover, .tmp-empty-btn:hover { background: var(--tmp-soft); }
.tmf-fix em, .tmp-empty-btn em { font-size: 11px; color: var(--nv-muted); font-variant-numeric: tabular-nums; }
.tmf-opt { position: relative; display: flex; align-items: center; gap: 9px; min-height: 44px; margin: 0; padding: 6px 10px; border: 1px solid var(--nv-line); border-radius: var(--tmp-r); background: #fff; color: var(--nv-ink); font: 500 13px/1.2 var(--nv-font); text-align: left; cursor: pointer; transition: background-color .2s var(--nv-ease), color .2s var(--nv-ease), border-color .2s var(--nv-ease), opacity .2s; }
.tmf-opt:hover { background: var(--tmp-soft); }
.tmf-opt-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.tmf-n { flex: none; font-size: 11px; font-weight: 600; color: var(--nv-muted); font-variant-numeric: tabular-nums; }
.tmf-opt[aria-pressed="true"] { background: var(--nv-ink); border-color: var(--nv-ink); color: #fff; }
.tmf-opt[aria-pressed="true"] .tmf-n, .tmf-opt[aria-pressed="true"] small { color: rgba(255,255,255,.72); }
.tmf-opt.is-empty { opacity: .45; }
.tmf-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.tmf-key { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--h, var(--nv-ink)); color: #fff; }
.tmf-key svg { width: 15px; height: 15px; }
.tmf-opt[aria-pressed="true"] .tmf-key { box-shadow: 0 0 0 2px #fff; }
/* Era: a vertical timeline, several eras can be on. */
.tmf-era { position: relative; display: grid; gap: 2px; }
.tmf-era::before { content: ""; position: absolute; left: 18px; top: 22px; bottom: 22px; width: 2px; background: var(--nv-line); }
.tmf-era-item { z-index: 1; min-height: 44px; padding: 4px 10px 4px 8px; border-color: transparent; background: transparent; gap: 12px; }
.tmf-era-item:hover { background: var(--tmp-soft); }
.tmf-dot { flex: none; width: 20px; height: 20px; border: 2px solid var(--nv-ink); border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px #fff; transition: background-color .2s; }
.tmf-era-item small { font-size: 12px; color: var(--nv-muted); font-variant-numeric: tabular-nums; }
.tmf-era-item[aria-pressed="true"] { background: var(--nv-ink); border-color: var(--nv-ink); }
.tmf-era-item[aria-pressed="true"] .tmf-dot { background: var(--nv-accent); border-color: #fff; box-shadow: none; }
.tmf-flags { display: grid; gap: 6px; }
.tmf-switch { display: flex; align-items: center; gap: 12px; min-height: 56px; margin: 0; padding: 8px 12px; border: 1px solid var(--nv-line); border-radius: var(--tmp-r); background: #fff; color: var(--nv-ink); text-align: left; cursor: pointer; }
.tmf-switch > span { flex: 1; min-width: 0; display: grid; gap: 2px; }
.tmf-switch b { font-size: 14px; font-weight: 600; }
.tmf-switch small { font-size: 12px; color: var(--nv-muted); }
.tmf-switch i { position: relative; flex: none; order: 3; width: 40px; height: 24px; border-radius: 12px; background: #d3d5d9; transition: background-color .2s var(--nv-ease); }
.tmf-switch i::after { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(18,19,22,.3); transition: transform .22s var(--nv-ease); }
.tmf-switch[aria-checked="true"] { border-color: var(--nv-ink); }
.tmf-switch[aria-checked="true"] i { background: var(--nv-ink); }
.tmf-switch[aria-checked="true"] i::after { transform: translateX(16px); }
.tmf-switch .tmf-n { order: 2; }
.tmf-select { display: block; }
.tmf-select select { width: 100%; height: 46px; padding: 0 40px 0 12px; border: 1px solid var(--nv-line); border-radius: var(--tmp-r); background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256' fill='%23121316'%3E%3Cpath d='M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z'/%3E%3C/svg%3E") no-repeat right 14px center / 14px; color: var(--nv-ink); font: 500 14px/1 var(--nv-font); appearance: none; -webkit-appearance: none; }
.tmf-foot { flex: none; display: flex; gap: 8px; padding: 10px var(--tmp-pad) max(12px, env(safe-area-inset-bottom)); border-top: 1px solid var(--nv-line); background: #fff; box-shadow: 0 -8px 16px -12px rgba(18,19,22,.25); }
.tmf-reset-foot { min-height: 46px; padding: 0 16px; border: 1px solid var(--nv-line); border-radius: var(--tmp-r); background: #fff; color: var(--nv-ink); font: 600 14px/1 var(--nv-font); cursor: pointer; }
.tmf-apply { flex: 1; min-height: 46px; padding: 0 16px; border: 1px solid var(--nv-ink); border-radius: var(--tmp-r); background: var(--nv-accent); color: var(--nv-accent-ink); font: 700 14px/1 var(--nv-font); cursor: pointer; transition: transform .18s var(--nv-ease); font-variant-numeric: tabular-nums; }
.tmf-apply:active { transform: scale(.98); }
.tmf-apply.is-none { background: var(--tmp-soft); border-color: var(--nv-line); color: var(--nv-muted); }

/* List */
.tm-list-scroll { position: relative; flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
#tm-list { position: relative; width: 100%; }
.tm-row { position: absolute; left: 0; right: 0; top: 0; height: 72px; display: grid; grid-template-columns: minmax(0, 1fr) 44px; align-items: center; padding-left: var(--tmp-pad); padding-right: 4px; will-change: transform; animation: tm-fade .3s var(--nv-ease) both; transition: background-color .15s; }
.tm-row::before { content: ""; position: absolute; left: calc(var(--tmp-pad) + 68px); right: var(--tmp-pad); top: 0; height: 1px; background: var(--nv-line); }
.tm-row:hover, .tm-row:focus-within { background: var(--tmp-soft); }
.tm-row.is-current { background: var(--tmp-soft); box-shadow: inset 3px 0 0 var(--nv-ink); }
.tm-row-main { display: grid; grid-template-columns: 56px minmax(0, 1fr); align-items: center; gap: 12px; min-height: 72px; margin: 0; padding: 8px 0; border: 0; background: none; font: inherit; color: var(--nv-ink); text-align: left; cursor: pointer; min-width: 0; }
.tm-row-main:focus-visible { outline-offset: -2px; }
.tmp-thumb { position: relative; width: 56px; height: 56px; border-radius: 9px; overflow: visible; }
.tmp-thumb img { border-radius: 9px; }
.tmp-thumb > svg { width: 22px; height: 22px; }
.tmp-pair-badge { position: absolute; right: -4px; bottom: -4px; z-index: 1; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--nv-ink); color: #fff; box-shadow: 0 0 0 2px #fff; }
.tmp-pair-badge svg { width: 11px; height: 11px; }
.tm-row-text { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tm-row-name { font-size: 15px; font-weight: 600; line-height: 1.2; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tm-row-former { font-size: 12px; line-height: 1.25; color: var(--nv-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tm-row-meta { display: flex; align-items: center; gap: 8px; min-width: 0; margin-top: 2px; font-size: 12px; color: var(--nv-muted); white-space: nowrap; overflow: hidden; }
.tm-years { font-variant-numeric: tabular-nums; }
.tm-drawer .tm-badge { display: inline-flex; align-items: center; flex: none; min-height: 20px; padding: 0 8px; border: 1px solid var(--nv-ink); border-radius: 10px; background: #fff; color: var(--nv-ink); font-size: 11px; font-weight: 600; line-height: 1; }
.tm-drawer .tm-badge-standing { background: var(--nv-ink); color: #fff; }
.tm-drawer .tm-badge-demolished, .tm-drawer .tm-badge-marked-site-only, .tm-drawer .tm-badge-relocated, .tm-drawer .tm-badge-reused { border: 1px dashed #7d7254; background: #f4efe0; color: #3a3122; }
.tm-drawer .tm-badge-restricted { border: 1px dashed var(--nv-ink); background: var(--tmp-soft); }
.tm-star { display: inline-grid; place-items: center; width: 44px; height: 44px; margin: 0; padding: 0; border: 0; background: none; color: var(--nv-ink); cursor: pointer; }
.tm-star-lg { margin-right: -10px; }
.tmp-skel-list i { display: block; height: 72px; margin: 0 var(--tmp-pad); --s: #e9eaec; background: linear-gradient(var(--s), var(--s)) 0 8px / 56px 56px no-repeat, linear-gradient(var(--s), var(--s)) 68px 16px / 58% 14px no-repeat, linear-gradient(var(--s), var(--s)) 68px 38px / 38% 11px no-repeat, linear-gradient(var(--s), var(--s)) 68px 54px / 24% 12px no-repeat; animation: tmp-pulse 1.3s ease-in-out infinite; }
.tmp-skel-list i:nth-child(2n) { animation-delay: .15s; }
.tmp-skel-list i:nth-child(3n) { animation-delay: .3s; }
@keyframes tmp-pulse { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
.tmp-empty { display: grid; justify-items: center; gap: 8px; padding: 32px 22px 24px; text-align: center; animation: tm-fade .3s var(--nv-ease) both; }
.tmp-empty strong { font-size: 15px; letter-spacing: -.01em; }
.tmp-empty p { max-width: 30ch; margin: 0; font-size: 13px; line-height: 1.45; color: var(--nv-muted); }
.tmp-empty-ic { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--tmp-soft); color: var(--nv-muted); }
.tmp-empty-ic svg { width: 20px; height: 20px; }
.tmp-empty-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 6px; }

/* Place card */
.tm-card-top { position: sticky; top: 0; z-index: 3; display: flex; justify-content: space-between; align-items: center; margin: 0 -16px; padding: 4px 16px; background: rgba(255,255,255,.94); backdrop-filter: blur(6px); border-bottom: 1px solid var(--nv-line); }
.tm-back { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin: 0 0 0 -8px; padding: 0 8px; border: 0; background: none; font: 600 14px/1 var(--nv-font); color: var(--nv-ink); cursor: pointer; }
.tm-back svg { width: 18px; height: 18px; transition: transform .25s var(--nv-ease); }
.tm-back:hover svg { transform: translateX(-3px); }
.tm-hero-wrap { margin: 12px 0 0; }
.tm-hero-img { position: relative; width: 100%; margin: 0; display: block; border-radius: 12px; overflow: hidden; animation: tm-fade .45s var(--nv-ease) both; }
.tm-hero-img::before { content: ""; display: block; padding-top: var(--r, 66.67%); }
.tm-hero-img > svg { position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; }
.tm-hero-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tm-hero-img figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 10px 7px; font-size: 11px; line-height: 1.3; color: #fff; background: linear-gradient(transparent, rgba(18,19,22,.74)); }
.tm-hero-img figcaption:empty { display: none; }
.tm-hero-img.is-missing figcaption { color: var(--nv-muted); background: none; }
.tmp-hero-tag { position: absolute; left: 10px; top: 10px; padding: 5px 10px; border-radius: 14px; background: var(--nv-ink); color: #fff; font: 700 12px/1 var(--nv-font); font-variant-numeric: tabular-nums; box-shadow: 0 0 0 2px #fff; }
.tmp-pair { display: flex; width: 100%; margin: 8px 0 0; }
.tmp-pair .nv-seg-item { flex: 1 1 0; min-width: 0; padding: 0 6px; font-size: 13px; font-weight: 600; }
.tm-hero-wrap[data-mode="slide"] .tm-hero-img { display: none; }
.tm-hero-wrap:not([data-mode="slide"]) .tm-hero-slot .tm-photo-swipe { display: none; }
.tm-hero-slot:empty { display: none; }
.tm-place-name { margin: 16px 0 6px; font: 700 25px/1.12 var(--nv-font); letter-spacing: -.03em; text-wrap: balance; }
.tm-place-name:focus { outline: none; }
.tm-former { margin: 0 0 8px; font-size: 13px; line-height: 1.3; color: var(--nv-muted); white-space: normal; }
.tm-place-sub { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; font-size: 13px; color: var(--nv-muted); }
.tmp-actions { display: flex; margin: 0 0 14px; }
.tmp-actions:not(:has(.tmp-story:not([hidden]))) { display: none; }
.tmp-story { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 9px; width: 100%; min-height: 48px; padding: 0 18px; border: 1px solid var(--nv-ink); border-radius: var(--tmp-r); background: var(--nv-accent); color: var(--nv-accent-ink); font: 700 15px/1 var(--nv-font); cursor: pointer; transition: transform .18s var(--nv-ease), box-shadow .2s var(--nv-ease); }
.tmp-story svg { width: 18px; height: 18px; }
.tmp-story:hover { box-shadow: 0 3px 0 var(--nv-ink); transform: translateY(-1px); }
.tmp-story:active { transform: none; box-shadow: none; }
.tm-summary { margin: 0 0 12px; font-size: 15px; line-height: 1.58; }
.tm-sec { padding: 18px 0 0; }
.tm-sec h3 { display: flex; align-items: baseline; justify-content: space-between; margin: 0 0 10px; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--nv-muted); }
.tmp-sec-n { font-weight: 600; letter-spacing: 0; text-transform: none; font-size: 12px; }
.tm-beats { margin: 4px 0 0 6px; padding: 0 0 0 20px; list-style: none; border-left: 2px solid var(--nv-line); }
.tm-beats li { position: relative; display: block; padding: 0 0 20px; }
.tm-beats li:last-child { padding-bottom: 4px; }
.tm-beats li::before { content: ""; position: absolute; left: -27px; top: 3px; width: 12px; height: 12px; border: 2px solid var(--nv-ink); border-radius: 50%; background: #fff; }
.tm-beats li:first-child::before { background: var(--nv-ink); }
.tm-beat-year { display: inline-block; margin: 0 0 5px; padding: 3px 8px; border-radius: 10px; background: var(--tmp-soft); font: 700 12px/1 var(--nv-font); font-variant-numeric: tabular-nums; color: var(--nv-ink); }
.tm-beats strong { display: block; font-size: 15px; line-height: 1.3; letter-spacing: -.01em; }
.tm-beats p { margin: 3px 0 0; font-size: 14px; line-height: 1.55; color: #2a2c33; }
.tm-sec details { border-top: 1px solid var(--nv-line); }
.tm-sec summary { min-height: 44px; display: flex; align-items: center; font-size: 14px; font-weight: 600; cursor: pointer; }
.tm-sec details p { margin: 0 0 12px; font-size: 14px; line-height: 1.5; color: #2a2c33; }
.tmp-links { display: grid; gap: 6px; }
.tmp-link { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 12px; border: 1px solid var(--nv-line); border-radius: var(--tmp-r); color: var(--nv-ink); text-decoration: none; transition: background-color .15s, border-color .15s; }
.tmp-link:hover { background: var(--tmp-soft); border-color: var(--nv-ink); }
.tmp-link-ic { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--nv-ink); color: #fff; }
.tmp-link-ic svg { width: 18px; height: 18px; }
.tmp-link-text { display: grid; gap: 2px; min-width: 0; }
.tmp-link-text b { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tmp-link-text small { font-size: 12px; color: var(--nv-muted); font-variant-numeric: tabular-nums; }
.tm-near { display: grid; margin-top: 8px; }
.tm-near a, .tm-related a { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; border-top: 1px solid var(--nv-line); font-size: 14px; color: var(--nv-ink); text-underline-offset: 3px; }
.tm-near a span { font-size: 12px; color: var(--nv-muted); font-variant-numeric: tabular-nums; }
.tm-get { margin-top: 10px; }
.tm-get .gt-modes { margin: 0; }
.tm-related { margin: 0; padding: 0; list-style: none; }
.tm-related a { justify-content: flex-start; padding: 6px 0; text-decoration: none; font-weight: 600; }
.tm-related .tm-thumb { width: 44px; height: 44px; }
.tm-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.tm-tags a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 13px; border: 1px solid var(--nv-line); border-radius: 18px; font-size: 13px; color: var(--nv-ink); text-decoration: none; }
.tm-tags a:hover { background: var(--tmp-soft); border-color: var(--nv-ink); }
.tm-foot { display: flex; flex-direction: column; gap: 2px; margin: 18px 0 0; font-size: 12px; color: var(--nv-muted); }
.tm-foot a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; color: var(--nv-ink); }
.tm-skel { height: 14px; margin: 14px 0; border-radius: 7px; background: linear-gradient(90deg, #e8e9eb, #f3f3f4, #e8e9eb); background-size: 200% 100%; animation: tm-shimmer 1.2s linear infinite; }
.tm-skel.short { width: 55%; }
.tm-skel.tmp-skel-hero { height: auto; aspect-ratio: 3 / 2; margin: 12px 0 0; border-radius: 12px; }

/* Phones: bottom sheet in 3 levels. */
@media (max-width: 767px) {
  .tm-drawer { left: 0; right: 0; top: auto; bottom: 0; width: 100%; max-width: none; border-radius: 16px 16px 0 0; border-width: 1px 0 0; padding-top: 18px; transform: translateY(24px); height: var(--tm-sheet-half); transition: height .35s var(--nv-ease), opacity .35s, transform .45s var(--nv-ease); }
  .is-ready .tm-drawer { transform: none; }
  .tm-drawer[data-level="0"] { height: 148px; }
  .tm-drawer[data-level="1"] { height: var(--tm-sheet-half); }
  .tm-drawer[data-level="2"] { height: var(--tm-sheet-full); }
  .tm-drawer[data-level="0"] .tm-list-scroll, .tm-drawer[data-level="0"] .tm-legend, .tm-drawer[data-level="0"] .tmp-rail, .tm-drawer[data-level="0"] .tmp-applied, .tm-drawer[data-level="0"] .tmp-layers, .tm-drawer[data-level="0"] .tm-head h1, .tm-drawer[data-level="0"] .tm-meta { display: none; }
  .tm-head { padding-top: 6px; }
  .tm-head h1 { font-size: 18px; margin-bottom: 10px; }
  .tm-eyebrow, .tm-legend { display: none; }
  .tm-head { padding-bottom: 0; }
  .tm-drawer[data-level="0"] #tm-place { overflow: hidden; }
  #tm-place { padding-left: 14px; padding-right: 14px; }
  .tm-card-top { margin: 0 -14px; padding: 4px 14px; }
}
@media (max-width: 767px) and (max-height: 720px) { .tm-head h1 { display: none; } }
@media (max-width: 359px) {
  .tmf-grid { grid-template-columns: 1fr; }
  .tmp-tool { gap: 5px; padding: 0 4px; }
  .tmf-foot { padding-left: 10px; padding-right: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .tm-drawer, .tm-row, .tm-hero-img, .tm-skel, .tm-back svg, .tmp-pill, .tmp-tool, .tmp-layers, .tmp-empty, .tmp-skel-list i, .tmf-switch i, .tmf-switch i::after, .tmp-story, .tmf-apply, .tmf-opt { animation: none !important; transition: none !important; }
  .tm-drawer { transform: none; }
}
