/* ══════════════════════════════════════════════════════════════════
   LUMEN — events, countdowns, device connection guides, QR codes
   ══════════════════════════════════════════════════════════════════ */

/* ── event cards ── */
.ev-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); margin-bottom: 34px; }
.card-event .ev-date { position: absolute; z-index: 3; top: 10px; left: 10px; display: grid; justify-items: center; min-width: 46px; padding: 5px 8px 6px; border-radius: 10px; background: rgba(10, 10, 16, .78); backdrop-filter: blur(8px); box-shadow: 0 0 0 1px rgba(255, 255, 255, .12); line-height: 1; }
.card-event .ev-date small { font-size: 10px; font-weight: 800; letter-spacing: .12em; color: var(--accent-2); }
.card-event .ev-date b { font-family: var(--display); font-size: 26px; font-weight: 400; margin-top: 2px; }
.card-event .live-pill { position: absolute; z-index: 3; top: 10px; left: 10px; }
.card-event .ev-count { background: var(--grad); color: #fff; }
.card-event.is-ended .card-media { filter: saturate(.55) brightness(.8); }
.card-event.is-live .card-media { box-shadow: 0 0 0 2px var(--live), 0 0 40px -6px rgba(255, 45, 85, .6); }
.row-head.flush { padding: 0; margin: 10px 0 14px; }

/* ── featured event hero ── */
.ev-hero { position: relative; overflow: hidden; border-radius: 28px; min-height: 380px; display: grid; align-items: end; margin-bottom: 36px; isolation: isolate; box-shadow: var(--shadow), 0 0 0 1px var(--line); }
.ev-hero.tall { min-height: min(68vh, 620px); }
.ev-hero.is-live { box-shadow: var(--shadow), 0 0 0 2px var(--live), 0 0 80px -20px rgba(255, 45, 85, .7); }
.ev-hero-bg { position: absolute; inset: 0; z-index: -2; }
.ev-hero-bg img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1s; }
.ev-hero-bg img.ok { opacity: 1; animation: kenburns 30s ease-out forwards; }
.ev-hero::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(7, 7, 11, .96) 8%, rgba(7, 7, 11, .55) 50%, rgba(7, 7, 11, .15)), linear-gradient(90deg, rgba(7, 7, 11, .75), transparent 70%); }
.ev-hero-body { padding: clamp(22px, 4vw, 48px); display: grid; gap: 16px; max-width: 900px; }
.ev-title { font-family: var(--display); font-weight: 400; font-size: clamp(46px, 7vw, 96px); line-height: .9; text-shadow: 0 10px 40px rgba(0, 0, 0, .5); }
.ev-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; color: var(--text-2); font-weight: 550; }
.ev-meta .i { width: 17px; height: 17px; color: var(--accent-2); }
.ev-empty { display: grid; justify-items: center; text-align: center; gap: 12px; padding: 60px 20px; border-radius: 28px; border: 1px dashed var(--line-2); margin-bottom: 30px; }

/* flip-style countdown */
.cd { display: flex; gap: 10px; }
.cd div { display: grid; justify-items: center; min-width: 78px; padding: 12px 10px 10px; border-radius: 16px; background: rgba(12, 12, 18, .72); backdrop-filter: blur(12px); box-shadow: 0 0 0 1px rgba(255, 255, 255, .1), inset 0 1px 0 rgba(255, 255, 255, .06); }
.cd b { font-family: var(--display); font-weight: 400; font-size: clamp(36px, 5vw, 56px); line-height: 1; font-variant-numeric: tabular-nums; background: linear-gradient(180deg, #fff, #ffc9b0); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cd b.flip { animation: cdflip .5s var(--ease-out); }
@keyframes cdflip { 0% { transform: translateY(-30%) rotateX(70deg); opacity: 0; } 100% { transform: none; opacity: 1; } }
.cd small { font-size: 10.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
.cd.done { opacity: .5; }

/* event detail */
.ev-body { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; }
.ev-desc h3 { margin-bottom: 10px; }
.ev-desc p { color: var(--text-2); white-space: pre-line; max-width: 760px; }
.ev-side { display: grid; gap: 14px; align-content: start; }
.ev-fact { display: flex; gap: 12px; align-items: flex-start; }
.ev-fact > .i { width: 22px; height: 22px; color: var(--accent-2); margin-top: 2px; }
.ev-fact div { display: grid; }
.ev-fact small { color: var(--muted); font-size: 12px; }
.ev-tools { display: flex; gap: 8px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 14px; }
.modal-ev { width: min(620px, 100%); }
.input.file { padding: 9px 12px; height: auto; }
.input.file::file-selector-button { margin-right: 12px; padding: 6px 12px; border: 0; border-radius: 8px; background: rgba(255, 255, 255, .12); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; }

/* invite picker */
.invite { display: grid; gap: 8px; }
.search-box.sm { height: 38px; min-width: 0; }
.invite-list { max-height: 220px; overflow: auto; display: grid; gap: 2px; padding: 4px; border-radius: 12px; background: rgba(0, 0, 0, .25); border: 1px solid var(--line); }
.invite-row { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 9px; cursor: pointer; }
.invite-row:hover { background: rgba(255, 255, 255, .06); }
.invite-row input { accent-color: var(--accent); width: 16px; height: 16px; }
.invite-row > span:last-child { display: grid; line-height: 1.25; }
.invite-row small { color: var(--muted); font-size: 12px; }

/* ── QR codes ── */
.qr-card { display: grid; justify-items: center; gap: 8px; align-content: start; text-align: center; }
.qr-card svg { width: 150px; height: 150px; padding: 8px; border-radius: 14px; background: #fff; box-shadow: 0 12px 30px rgba(0, 0, 0, .4); }
.qr-card svg path, .qr-card svg rect[fill='black'] { fill: #0a0a0f; }
.qr-card small { font-size: 12px; color: var(--muted); line-height: 1.35; }

/* ── studio: phone + device guides ── */
.phone-qr, .lan-grid, .ingest-grid { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: start; }
.phone-qr .btn, .guide-buttons .btn { white-space: normal; height: auto; min-height: 34px; padding-top: 6px; padding-bottom: 6px; text-align: left; }
.studio-side { grid-template-columns: minmax(0, 1fr); min-width: 0; }
.phone-qr p { margin-bottom: 10px; }
.ingest-fields { display: grid; gap: 10px; min-width: 0; }
.guide-buttons { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 6px; }
.orient-pick { margin-top: 10px; width: 100%; }
.orient-pick button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.orient-pick .i { width: 16px; height: 16px; }
.studio-stage.portrait { aspect-ratio: 9 / 16; max-height: min(78vh, 900px); margin: 0 auto; width: auto; height: min(78vh, 900px); }
.studio-canvas canvas { object-fit: contain; }
.modal-guide { width: min(860px, 100%); }
.guide-tabs { flex-wrap: wrap; margin-bottom: 18px; border-radius: 16px; }
.guide-tabs button { display: inline-flex; align-items: center; gap: 7px; border-radius: 12px; }
.guide-tabs .i { width: 17px; height: 17px; }
.guide-body { display: grid; grid-template-columns: minmax(0, 1fr) 170px; gap: 22px; }
.guide-text h4 { margin: 14px 0 6px; font-size: 14.5px; color: var(--accent-2); }
.steps { margin: 0; padding-left: 22px; display: grid; gap: 9px; color: var(--text-2); font-size: 14px; }
.steps li::marker { color: var(--accent-2); font-weight: 800; }
.steps .copy-field { margin-top: 6px; }
.warn a { color: #ffd6a8; text-decoration: underline; }

/* viewer: camera dropped */
.signal-lost { position: absolute; z-index: 6; left: 50%; top: 16px; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; padding: 8px 16px; border-radius: 999px; background: rgba(40, 14, 20, .9); backdrop-filter: blur(10px); box-shadow: 0 0 0 1px rgba(255, 61, 90, .5); font-size: 13.5px; white-space: nowrap; }
.ply-ring.sm { width: 18px; height: 18px; border-width: 2px; }

/* dashboard: public access */
.tunnel { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.tunnel h4 { display: flex; align-items: center; gap: 8px; }
.tunnel .btn { justify-self: start; }
.lan-grid > div:last-child { display: grid; gap: 6px; min-width: 0; }

@media (max-width: 900px) {
  .ev-body { grid-template-columns: 1fr; }
  .guide-body { grid-template-columns: 1fr; }
  .cd div { min-width: 64px; padding: 10px 6px 8px; }
  .studio-stage.portrait { height: auto; width: 100%; max-height: none; }
}
@media (max-width: 560px) {
  .phone-qr, .lan-grid, .ingest-grid { grid-template-columns: 1fr; justify-items: start; }
  .cd { gap: 6px; }
  .cd div { min-width: 0; flex: 1; }
}

/* ── low-bandwidth controls ── */
.pm-note { margin: 6px 12px 4px; font-size: 12px; color: var(--muted); line-height: 1.45; }
.net-check { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.net-check b { color: var(--text); }
.warn-inline { color: #ffc98f; }
.player.data-saver .ply-settings::after { content: ''; position: absolute; top: 8px; right: 8px; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 2px rgba(0, 0, 0, .5); }
