/* Component styles carried over from concept 7 (Quests, ReadiTV, dialogs, toast). Colors and fonts come from the v8 theme tokens in style.css. */
/* Search + chips */
.search { display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 0 10px 0 22px; border: var(--bw) solid var(--edge); border-radius: calc(var(--r-scale) * 999px); background: var(--cream); }
.search i { font-size: calc(var(--t-scale) * 22px); }
.search input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; font: 500 calc(var(--t-scale) * 17px) var(--f-text); color: var(--ink); }
.search input::placeholder { color: var(--mute); }
.search input::-webkit-search-cancel-button { display: none; }
.search .clear { visibility: hidden; }
.search.has-q .clear { visibility: visible; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 14px 2px 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; min-height: 38px; padding: 0 15px; border-radius: calc(var(--r-scale) * 999px); border: 1px solid var(--line); background: transparent; font: 500 calc(var(--t-scale) * 15px) var(--f-text); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.chip:hover { border-color: var(--ink); }
.chip.on { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.hintline { margin: 12px 2px 0; font-size: calc(var(--t-scale) * 15px); color: var(--mute); }
.hintline .link-btn { color: var(--ink); font-weight: 600; }

/* Section rows */
.sec-row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; margin: calc(var(--s-scale) * 36px) 0 calc(var(--s-scale) * 14px); }
.sec-row .label { font-size: calc(var(--t-scale) * 17px); }
.sec-row .mute { font-size: calc(var(--t-scale) * 14px); }
@media (max-width: 560px) { .sec-row .mute { font-size: calc(var(--t-scale) * 13px); flex-basis: 100%; } }

/* Event and place cards */
.events { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, calc((100% - 42px) / 4)); gap: 14px; overflow-x: auto; padding: 2px 2px 10px; scroll-snap-type: x mandatory; }
.ev, .card { background: var(--cream); border: 1px solid var(--line); border-radius: var(--r); padding: 10px; display: grid; gap: 9px; align-content: start; transition: border-color .2s, box-shadow .2s; }
.ev { scroll-snap-align: start; grid-template-rows: auto auto auto 1fr auto; }
.ev:hover, .card:hover { border-color: var(--ink); }
.card.in-quest, .ev.in-quest { border-color: var(--coral); box-shadow: 0 0 0 2px var(--coral) inset; }
.ev-img, .card-img { position: relative; border-radius: calc(var(--r-scale) * 15px); overflow: hidden; background: var(--well); }
.ev-img { aspect-ratio: 16 / 10; }
.card-img { aspect-ratio: 4 / 3; }
.ev-img img, .card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
.ev:hover img, .card:hover img { transform: scale(1.04); }
.ev-date { position: absolute; left: 10px; top: 10px; min-width: 54px; padding: 6px 8px 5px; border-radius: calc(var(--r-scale) * 14px); border: var(--bw) solid var(--edge); background: var(--cream); text-align: center; line-height: 1; font-size: calc(var(--t-scale) * 13px); }
.ev-date b { display: block; font-size: calc(var(--d-scale) * 28px); line-height: .9; }
.oval { position: absolute; left: 10px; top: 10px; padding: 3px 11px 2px; border-radius: calc(var(--r-scale) * 999px); border: 1px solid var(--ink); background: var(--cream); font-size: calc(var(--t-scale) * 13px); }
.stopno { position: absolute; right: 10px; top: 10px; width: 34px; height: 34px; border-radius: 50%; background: var(--coral); border: var(--bw) solid var(--edge); display: grid; place-items: center; font-size: calc(var(--t-scale) * 18px); }
.ev h3, .card h3 { margin: 0 6px; font: 700 calc(var(--t-scale) * 18px)/1.2 var(--f-text); letter-spacing: -.01em; }
.ev .label { margin: 0 6px; font-size: calc(var(--t-scale) * 14px); color: var(--mute); }
.card .meta, .ev .meta { margin: -4px 6px 0; font-size: calc(var(--t-scale) * 14.5px); color: var(--mute); }
.tags { display: flex; flex-wrap: wrap; gap: 5px; margin: 0 6px; }
.tags span { font-size: calc(var(--t-scale) * 12.5px); padding: 2px 9px; border-radius: calc(var(--r-scale) * 999px); border: 1px solid var(--line); }
.card-actions { display: flex; align-items: center; gap: 8px; margin: 2px 4px 2px; }
.card-actions .grow { flex: 1; }
.card-actions .pill.pick { flex: 1; min-height: 46px; font-size: calc(var(--t-scale) * 16px); }
.add.on { background: var(--coral); border-color: var(--coral); color: var(--ink); }
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: calc(var(--s-scale) * 16px); }
.more-row { display: flex; justify-content: center; margin-top: 22px; }
.empty { grid-column: 1 / -1; padding: 26px 0; color: var(--mute); font-size: calc(var(--t-scale) * 17px); }
.empty.small { padding: 10px 0; }

/* Community quest cards */
.qgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: calc(var(--s-scale) * 16px); }
.qcard { background: var(--cream); border: var(--bw) solid var(--edge); border-radius: calc(var(--r-scale) * 26px); padding: 10px; display: grid; gap: 10px; align-content: start; }
.qcard.mine { border-color: var(--coral); }
.qimgs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; height: 150px; border-radius: calc(var(--r-scale) * 17px); overflow: hidden; }
.qimgs div { position: relative; background: var(--well); }
.qimgs img { width: 100%; height: 100%; object-fit: cover; }
.qimgs b { position: absolute; left: 8px; top: 8px; width: 28px; height: 28px; border-radius: 50%; background: var(--coral); border: var(--bw) solid var(--edge); display: grid; place-items: center; font-size: calc(var(--t-scale) * 15px); }
.qcard .label { margin: 2px 6px 0; font-size: calc(var(--t-scale) * 13.5px); color: var(--mute); display: flex; gap: 8px; align-items: center; }
.qcard .label .badge { padding: 1px 8px; border-radius: calc(var(--r-scale) * 999px); background: var(--coral); color: var(--ink); }
.qcard h3 { margin: 0 6px; font-size: calc(var(--d-scale) * 1.9rem); }
.qstops { margin: 0 6px; padding: 0; list-style: none; display: grid; gap: 3px; font-size: calc(var(--t-scale) * 14.5px); }
.qstops li { display: flex; gap: 8px; align-items: baseline; }
.qstops li span { color: var(--coral-deep); font-weight: 700; min-width: 12px; }

/* Email wall */
.wall { position: relative; }
.wall.locked .wall-in { filter: blur(7px) saturate(.85); pointer-events: none; user-select: none; max-height: 980px; overflow: hidden; }
.wall-cover { display: none; }
.wall.locked .wall-cover { display: grid; position: absolute; inset: 0; z-index: 3; align-content: start; justify-items: center; padding-top: clamp(110px, 18vw, 220px); background: linear-gradient(180deg, rgba(248, 239, 230, 0) 0%, rgba(248, 239, 230, .55) 30%, var(--paper) 88%); text-align: center; }
.wall-card { width: min(460px, 100%); padding: 26px 24px; border: var(--bw) solid var(--edge); border-radius: calc(var(--r-scale) * 28px); background: var(--cream); box-shadow: var(--shadow); display: grid; gap: 12px; justify-items: center; }
.wall-card h2 { margin: 0; font-size: calc(var(--d-scale) * 2.4rem); }
.wall-card p { margin: 0; color: var(--mute); }
.wall-card .pill { width: 100%; min-height: 52px; font-size: calc(var(--t-scale) * 17px); }

/* Invite / shared banner */
.banner { display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; padding: 14px 16px; margin: 0 0 18px; border: var(--bw) solid var(--edge); border-radius: calc(var(--r-scale) * 24px); background: var(--butter); }
.banner img { width: 76px; height: 76px; object-fit: cover; border-radius: calc(var(--r-scale) * 16px); border: var(--bw) solid var(--edge); }
.banner h2 { margin: 2px 0; font: 700 calc(var(--t-scale) * 20px)/1.2 var(--f-text); }
.banner p { margin: 0; font-size: calc(var(--t-scale) * 15px); }
.banner .btn-row { justify-content: flex-end; }

/* Active quest view */
.qview { display: grid; gap: 16px; padding: 22px 24px; border-radius: calc(var(--r-scale) * 26px); border: var(--bw) solid var(--edge); background: var(--cream); margin-bottom: 18px; }
.qview h2 { margin: 4px 0 2px; font-size: calc(var(--d-scale) * clamp(2rem, 3.6vw, 3rem)); }
.qview p { margin: 0; color: var(--mute); }
.qview ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.qview li { display: flex; align-items: center; gap: 10px; padding: 6px 14px 6px 6px; border-radius: calc(var(--r-scale) * 999px); background: var(--paper); }
.qview li b { width: 30px; height: 30px; border-radius: 50%; background: var(--coral); display: grid; place-items: center; font-size: calc(var(--t-scale) * 17px); }
.qview li small { color: var(--mute); }

/* Generic rows of buttons, fields */
.btn-col { display: grid; gap: 8px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }
.btn-row.fill .pill { flex: 1; }
.field { display: grid; gap: 6px; }
.field > span { font-family: var(--f-label); font-weight: var(--l-wght); font-stretch: var(--l-wdth); font-style: var(--l-style); text-transform: var(--l-case); letter-spacing: .04em; font-variation-settings: var(--l-fvs); font-size: calc(var(--t-scale) * 14px); }
.field input, .field select { min-height: 48px; border-radius: calc(var(--r-scale) * 14px); border: var(--bw) solid var(--edge); background: var(--cream); padding: 0 14px; font: 500 calc(var(--t-scale) * 16px) var(--f-text); color: var(--ink); width: 100%; }
.field input:focus, .field select:focus { outline: 3px solid var(--coral); outline-offset: 1px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: calc(var(--t-scale) * 14.5px); cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--coral-deep); flex: none; }
.hint { font-size: calc(var(--t-scale) * 13.5px); color: var(--mute); margin: 0; }
.hint.warn { color: var(--coral-deep); font-weight: 600; }
.err { margin: 0; color: var(--coral-deep); font-weight: 600; font-size: calc(var(--t-scale) * 14px); }

/* Dialogs (sheets) */
dialog.sheet { width: min(440px, 94vw); max-height: 92svh; border: var(--bw) solid var(--edge); border-radius: calc(var(--r-scale) * 28px); background: var(--paper); color: var(--ink); padding: 24px; overflow: auto; }
dialog.sheet.wide { width: min(900px, 96vw); padding: 0; }
dialog.sheet::backdrop { background: rgba(42, 30, 25, .46); }
dialog.sheet h3 { font: 700 calc(var(--t-scale) * 23px)/1.15 var(--f-text); margin: 6px 0 2px; letter-spacing: -.01em; }
dialog.sheet form, .sheet-body { display: grid; gap: 15px; }
.dlg-close { position: absolute; right: 16px; top: 16px; background: var(--paper); z-index: 2; }
.sheet-title { padding-right: 46px; }
.done-state { display: grid; gap: 12px; justify-items: start; }
.done-state .big { font-size: calc(var(--d-scale) * 2.6rem); }

/* Invite sheet */
.inv { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); }
.inv-preview { padding: 22px; background: var(--ink); display: grid; place-items: center; border-radius: calc(var(--r-scale) * 26px) 0 0 calc(var(--r-scale) * 26px); }
.inv-preview canvas { width: 100%; max-width: 380px; height: auto; border-radius: calc(var(--r-scale) * 18px); background: var(--cream); box-shadow: var(--shadow); }
.inv-side { position: relative; padding: 24px; display: grid; gap: 14px; align-content: start; }
.cal-box { display: grid; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); }

/* Save sheet stops */
.slots { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.slot { display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; align-items: center; padding: 10px; border-radius: calc(var(--r-scale) * 18px); border: var(--bw) solid var(--edge); background: var(--cream); }
.slot .n { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--coral); font-size: calc(var(--t-scale) * 19px); }
.slot b { display: block; font-weight: 700; line-height: 1.2; }
.slot small { display: block; color: var(--mute); font-size: calc(var(--t-scale) * 13.5px); }
.slot .at { color: var(--coral-deep); font-weight: 700; }
.slot-btns { display: flex; gap: 4px; }
.slot-btns button { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line); background: transparent; display: grid; place-items: center; cursor: pointer; }
.slot-btns button:hover:not([disabled]) { border-color: var(--ink); }
.slot-btns button[disabled] { opacity: .3; cursor: default; }

/* Side panels: How it works, Start here (B) */
.scrim { position: fixed; inset: 0; z-index: 55; background: rgba(42, 30, 25, .38); opacity: 0; pointer-events: none; transition: opacity .3s; }
.panel { position: fixed; z-index: 60; top: 0; right: 0; bottom: 0; width: min(440px, 100%); background: var(--paper); border-left: var(--bw) solid var(--edge); transform: translateX(104%); transition: transform .35s cubic-bezier(.2, .8, .2, 1); display: flex; flex-direction: column; }
.panel.open { transform: none; }
html.how-open .scrim { opacity: 1; pointer-events: auto; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.panel-head .display { font-size: calc(var(--d-scale) * 2.3rem); }
.panel-body { flex: 1; overflow: auto; padding: 20px 22px 28px; display: flex; flex-direction: column; gap: 18px; }
.panel-body > * { flex-shrink: 0; }
.panel-foot { padding: 14px 22px 18px; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.how { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.how li { display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: start; }
.how li > b { width: 44px; height: 44px; border-radius: 50%; background: var(--coral); border: var(--bw) solid var(--edge); display: grid; place-items: center; font-size: calc(var(--t-scale) * 22px); }
.how h3 { margin: 4px 0 4px; font: 700 calc(var(--t-scale) * 18px)/1.2 var(--f-text); }
.how p { margin: 0; color: var(--ink); }
.how .demo { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: calc(var(--t-scale) * 13.5px); color: var(--mute); }
.how-peeps { display: flex; justify-content: center; }
.how-peeps img { width: 70px; height: 70px; margin: 0 -9px; }

/* Version A: quest bag */
.bag { position: fixed; z-index: 45; left: 50%; bottom: 16px; transform: translate(-50%, 140%); display: flex; align-items: center; gap: 14px; padding: 8px 8px 8px 18px; border-radius: calc(var(--r-scale) * 999px); background: var(--ink); color: var(--cream); box-shadow: var(--shadow); transition: transform .35s cubic-bezier(.2, .8, .2, 1); max-width: calc(100vw - 24px); }
.bag.show { transform: translate(-50%, 0); }
.bag .label { font-size: calc(var(--t-scale) * 16px); white-space: nowrap; }
.bag-slots { display: flex; gap: 6px; }
.bag-slot { position: relative; width: 44px; height: 44px; border-radius: 50%; border: var(--bw) dashed rgba(255, 248, 241, .45); display: grid; place-items: center; font-size: calc(var(--t-scale) * 15px); overflow: hidden; background: transparent; color: var(--cream); cursor: pointer; padding: 0; }
.bag-slot.on { border: 2px solid var(--coral); }
.bag-slot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.bag-slot b { position: relative; z-index: 1; width: 22px; height: 22px; border-radius: 50%; background: var(--coral); color: var(--ink); display: grid; place-items: center; font-size: calc(var(--t-scale) * 12px); margin: 22px 0 0 22px; }
.bag-hint { font-size: calc(var(--t-scale) * 14px); color: rgba(255, 248, 241, .75); white-space: nowrap; }
.bag .pill.coral[disabled] { opacity: .45; }
.bag .x { width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(255, 248, 241, .12); color: var(--cream); cursor: pointer; display: grid; place-items: center; }

/* Version B: start here panel (no scrim on desktop so cards stay usable) */
html.chain-open .page { padding-right: calc(var(--g) + 440px); }
.chain .panel-body { gap: 14px; }
.chain-stops { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.sugg { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.sugg li { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center; padding: 8px; border-radius: calc(var(--r-scale) * 16px); border: 1px solid var(--line); background: var(--cream); }
.sugg img { width: 56px; height: 56px; border-radius: calc(var(--r-scale) * 12px); object-fit: cover; }
.sugg b { display: block; line-height: 1.2; }
.sugg small { color: var(--mute); }
.sugg .why { display: block; color: var(--coral-deep); font-size: calc(var(--t-scale) * 12.5px); font-weight: 600; }
.mini-search { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border: var(--bw) solid var(--edge); border-radius: calc(var(--r-scale) * 999px); background: var(--cream); }
.mini-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: 500 calc(var(--t-scale) * 15.5px) var(--f-text); }
.resume { position: fixed; z-index: 44; right: 18px; bottom: 18px; box-shadow: var(--shadow); }

/* Version C: fill the blanks */
.strip-slot { position: sticky; top: var(--head-h); z-index: 30; }
.strip { margin: 16px 0 0; padding: 12px 14px; border: var(--bw) solid var(--edge); border-radius: calc(var(--r-scale) * 24px); background: var(--cream); display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; box-shadow: var(--shadow); }
.strip .label { color: var(--coral-deep); margin-right: 4px; }
.strip .w { font-weight: 600; color: var(--mute); }
.blank { display: inline-flex; align-items: center; gap: 6px; max-width: 260px; min-height: 40px; padding: 0 14px; border-radius: calc(var(--r-scale) * 999px); border: var(--bw) dashed rgba(42, 30, 25, .4); background: transparent; cursor: pointer; font: 600 calc(var(--t-scale) * 15px) var(--f-text); color: var(--mute); }
.blank:hover { border-color: var(--ink); color: var(--ink); }
.blank.filled { border: var(--bw) solid var(--edge); background: var(--paper); color: var(--ink); }
.blank.filled .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.blank.active { border: 2px solid var(--coral); background: rgba(228, 101, 73, .12); color: var(--ink); animation: pulse 1.6s ease-in-out infinite; }
.blank .un { margin-left: 2px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: calc(var(--t-scale) * 12px); }
.blank .un:hover { background: var(--ink); color: var(--cream); }
.strip .pill { margin-left: auto; }
@keyframes pulse { 50% { box-shadow: 0 0 0 5px rgba(228, 101, 73, .18); } }
.pickbar { position: fixed; z-index: 46; left: 50%; bottom: 16px; transform: translateX(-50%); display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 18px; border-radius: calc(var(--r-scale) * 999px); background: var(--coral); color: var(--ink); border: var(--bw) solid var(--edge); box-shadow: var(--shadow); font-weight: 700; max-width: calc(100vw - 24px); }
.pickbar .pill { min-height: 36px; }
html.picking .card:not(.in-quest), html.picking .ev:not(.in-quest) { border-color: var(--ink); }

/* Toast */
.toast { position: fixed; z-index: 90; left: 50%; top: 22px; transform: translate(-50%, -24px); opacity: 0; pointer-events: none; padding: 12px 20px; border-radius: calc(var(--r-scale) * 999px); background: var(--ink); color: var(--cream); font-size: calc(var(--t-scale) * 16px); transition: transform .3s cubic-bezier(.2, .8, .2, 1), opacity .2s; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }

/* ReadiTV + members + about + legal are styled further down */
.tv-wrap { max-width: 1240px; margin: 0 auto; padding: clamp(20px, 3vw, 40px) var(--g) 120px; }
.tv-title { text-align: center; font-size: calc(var(--d-scale) * clamp(3.4rem, 8.6vw, 7rem)); }
.tv-sub { text-align: center; max-width: 52ch; margin: 14px auto 0; font-size: calc(var(--t-scale) * 17px); }


/* ReadiTV library (Tanzhaus archive layout) */
.topics { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 22px 0 14px; }
.topics .pill { background: transparent; }
.topics .pill.on { background: var(--ink); color: var(--butter); }
.tv-tools { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 0 0 30px; }
.tv-group { display: flex; align-items: baseline; justify-content: center; gap: 12px; border-top: var(--bw) solid var(--edge); padding: 12px 0 14px; margin: 0; text-align: center; font-size: calc(var(--d-scale) * clamp(2rem, 3.6vw, 2.8rem)); line-height: 1; }
.tv-group small { font-size: calc(var(--t-scale) * 15px); }
.tv-row { display: grid; grid-template-columns: minmax(240px, 38%) 1fr auto; gap: 28px; padding: calc(var(--s-scale) * 22px) 0; border-top: 1px solid var(--ink); }
.tv-thumb { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: calc(var(--r-scale) * 26px); overflow: hidden; border: var(--bw) solid var(--edge); background: var(--ink); }
.tv-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
.tv-thumb:hover img { transform: scale(1.04); }
.tv-thumb .len { position: absolute; right: 12px; bottom: 12px; padding: 3px 10px; border-radius: calc(var(--r-scale) * 999px); background: var(--ink); color: var(--cream); font-size: calc(var(--t-scale) * 14px); }
.tv-thumb .play { position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%; background: var(--cream); border: var(--bw) solid var(--edge); display: grid; place-items: center; font-size: calc(var(--t-scale) * 26px); opacity: 0; transform: scale(.85); transition: opacity .2s, transform .2s; }
.tv-thumb:hover .play, .tv-thumb:focus-visible .play { opacity: 1; transform: none; }
.tv-meta h3 { margin: 4px 0 2px; font: 700 clamp(21px, 2.2vw, 28px)/1.12 var(--f-text); letter-spacing: -.015em; }
.tv-meta h3 a { text-decoration: none; }
.tv-meta h3 a:hover { text-decoration: underline; }
.chan { margin: 0 0 16px; font-weight: 600; }
.tv-btns { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.like.on { background: var(--coral); border-color: var(--coral); color: var(--ink); }
.like.on:hover { background: var(--ink); border-color: var(--ink); color: var(--cream); }
.tv-side { display: grid; justify-items: end; align-content: start; text-align: right; }
.tv-len { font-size: calc(var(--d-scale) * clamp(2.4rem, 4vw, 3.4rem)); line-height: .85; }
.tv-len small { display: block; font-size: .42em; }

/* Player + cinema mode */
.watch { display: grid; grid-template-columns: 1fr 340px; gap: 34px; align-items: start; }
.player-wrap { position: relative; aspect-ratio: 16 / 9; }
.player { position: absolute; inset: 0; border-radius: calc(var(--r-scale) * 28px); overflow: hidden; border: var(--bw) solid var(--edge); background: var(--ink); transition: box-shadow .4s; }
.player iframe, .player #ytp { width: 100%; height: 100%; display: block; border: 0; }
.player-error { margin-top: 14px; padding: 16px 18px; border: var(--bw) solid var(--edge); border-radius: calc(var(--r-scale) * 20px); background: var(--cream); display: grid; gap: 10px; justify-items: start; }
.player-error p { margin: 0; }
.watch-meta h1 { margin: 20px 0 4px; font: 700 clamp(26px, 3vw, 38px)/1.08 var(--f-text); letter-spacing: -.02em; }
.watch-meta .label { display: block; margin-top: 20px; }
.watch-meta .label + h1 { margin-top: 6px; }
.upnext h2 { margin: 0 0 12px; }
.upnext a { display: grid; grid-template-columns: 128px 1fr; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--ink); text-decoration: none; }
.upnext img { aspect-ratio: 16 / 9; width: 100%; object-fit: cover; border-radius: calc(var(--r-scale) * 14px); border: var(--bw) solid var(--edge); }
.upnext b { display: block; font-weight: 700; line-height: 1.2; }
.upnext small { color: rgba(42, 30, 25, .72); }
.cinema-dim { position: fixed; inset: 0; z-index: 95; background: rgba(14, 9, 6, .95); opacity: 0; pointer-events: none; transition: opacity .45s ease; }
html.cinema .cinema-dim { opacity: 1; pointer-events: auto; }
html.cinema .player { position: fixed; z-index: 96; inset: auto; left: 50%; top: calc(50% - 34px); transform: translate(-50%, -50%); width: min(1400px, 94vw, calc((100svh - 170px) * 16 / 9)); aspect-ratio: 16 / 9; border-color: rgba(255, 248, 241, .2); border-radius: calc(var(--r-scale) * 20px); box-shadow: 0 40px 120px rgba(0, 0, 0, .7); }
.cinema-ui { position: fixed; z-index: 97; left: 50%; bottom: 24px; transform: translateX(-50%); display: none; align-items: center; gap: 12px; color: var(--cream); width: min(820px, calc(100vw - 32px)); }
html.cinema .cinema-ui { display: flex; }
.cinema-ui .icon-btn { border-color: rgba(255, 248, 241, .5); color: var(--cream); }
.cinema-ui .icon-btn:hover { background: var(--cream); color: var(--ink); }
.cinema-now { flex: 1; min-width: 0; display: grid; text-align: center; }
.cinema-now b, .cinema-now small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cinema-now small { color: rgba(255, 248, 241, .6); }
.cinema-ui .pill { background: transparent; color: var(--cream); border-color: rgba(255, 248, 241, .5); }
html.cinema .editfab, html.cinema .editpanel, html.cinema .site-head { visibility: hidden; }
html.cinema, html.cinema body { overflow: hidden; }


/* Responsive */
@media (max-width: 1180px) {
  .watch { grid-template-columns: 1fr; }
  .grid { grid-template-columns: repeat(3, 1fr); }
  .events { grid-auto-columns: minmax(250px, calc((100% - 28px) / 3)); }
  .qgrid { grid-template-columns: repeat(2, 1fr); }
  html.chain-open .page { padding-right: var(--g); }
  html.chain-open .scrim { opacity: 1; pointer-events: auto; }
}
@media (max-width: 820px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .events { grid-auto-columns: 74%; }
  .qgrid { grid-template-columns: 1fr; }
  .tv-row { grid-template-columns: 1fr auto; gap: 14px 18px; }
  .tv-thumb { grid-column: 1 / -1; }
  .tv-side { grid-row: 2; grid-column: 2; }
  .cinema-now small { display: none; }
  .inv { grid-template-columns: 1fr; }
  .inv-preview { border-radius: calc(var(--r-scale) * 26px) calc(var(--r-scale) * 26px) 0 0; padding: 16px; }
  .inv-preview canvas { max-width: 230px; }
  .strip-slot { position: static; }
  .strip .pill { margin-left: 0; }
  .banner { grid-template-columns: auto 1fr; }
  .banner .btn-row { grid-column: 1 / -1; justify-content: flex-start; }
  .panel { top: auto; height: 88svh; width: 100%; border-left: 0; border-top: var(--bw) solid var(--edge); border-radius: calc(var(--r-scale) * 26px) calc(var(--r-scale) * 26px) 0 0; transform: translateY(104%); }
  html.chain-open .scrim { opacity: 1; pointer-events: auto; }
}
@media (max-width: 560px) {
  .icons { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid { grid-template-columns: 1fr; }
  .bag { left: 10px; right: 10px; transform: translateY(140%); gap: 8px; padding-left: 12px; justify-content: space-between; }
  .bag.show { transform: none; }
  .bag .label, .bag-hint { display: none; }
  .row2 { grid-template-columns: 1fr 1fr; }
  .wall-card { padding: 22px 18px; }
}
/* Reduce Motion: slow things down instead of switching them off */
@media (prefers-reduced-motion: reduce) {
  .blank.active { animation-duration: 3.2s; }
  .ev img, .card img, .tv-thumb img { transition-duration: 1.4s; }
  .panel, .bag, .toast { transition-duration: .6s; }