/* ── Page layout ── */
.event-assets-main { padding-left: 0 }
.event-assets-wrap { display: grid; grid-template-columns: 1fr; gap: 20px; max-width: 1400px }

/* ── Tool hub grid ── */
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; margin-top: 4px }
.tool-card {
  padding: 22px; border-radius: 18px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.1);
  box-shadow: 0 8px 32px rgba(0,0,0,.25);
  transition: border-color .2s, transform .2s;
}
.tool-card:hover { border-color: rgba(255,255,255,.2); transform: translateY(-2px) }
.tool-card h3 { margin: 0 0 6px; color: var(--text); font-size: 17px; font-weight: 700; font-family: var(--font-display) }
.tool-card p  { margin: 0; color: var(--text-2); font-size: 13px; line-height: 1.6 }
.tool-meta {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 16px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.08)
}
.tool-meta span { color: var(--cyan); font-size: 12.5px; font-weight: 600 }

/* ── Timer page structure ── */
.timer-page-header {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 20px; flex-wrap: wrap;
}
.timer-workspace {
  display: grid; grid-template-columns: 360px 1fr;
  gap: 20px; align-items: start;
}
.timer-config-panel { padding: 24px }

/* ── Presenter preview panel — sticky so it never scrolls away ── */
.preview-pane {
  position: sticky;
  top: 20px;
  height: calc(100vh - 120px);
  padding: 20px;
  display: flex; flex-direction: column; gap: 14px;
  /* ensure it doesn't clip its sticky child */
  overflow: visible;
}

/* Header row inside preview pane */
.preview-pane-hdr {
  display: flex; align-items: center;
  justify-content: space-between; flex-shrink: 0;
}

/* ── Shared preview stage (tv* markup, mirrors the popup stage) ── */
.mini-stage {
  position: relative;
  flex: 1; min-height: 0;
  border-radius: 14px; overflow: hidden;
  border: 1px solid rgba(255,255,255,.1);
  background: radial-gradient(ellipse at top, rgba(12,20,34,.7), transparent 60%),
              linear-gradient(180deg, #060b14, #030710);
  padding: 24px 24px 18px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
  transition: box-shadow .4s, background .4s;
}
.mini-stage.tv-urgent {
  box-shadow: inset 0 0 60px rgba(249,115,22,.08), 0 0 0 1px rgba(249,115,22,.2);
}
#tvCanvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  z-index: 0; pointer-events: none;
}
.mini-stage .tv-content {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 100%;
}
#tvSubtitle {
  font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: rgba(255,255,255,.4); margin-bottom: 6px;
}
#tvTitle {
  margin: 0 0 4px; font-family: var(--font-display); font-size: 18px;
  font-weight: 700; color: var(--text); letter-spacing: -.3px;
}
.tv-time-wrap {
  position: relative; display: inline-flex;
  align-items: center; justify-content: center; margin: 14px 0 10px;
}
.tv-time-wrap.tv-circle { margin: 16px auto; }
#tvTime {
  font-family: var(--font-display); line-height: 1;
  color: var(--cyan); transition: color .3s, text-shadow .3s;
  position: relative; z-index: 2;
  white-space: nowrap; display: inline-flex; align-items: baseline;
}
/* Each glyph in a fixed-width cell → digits never shift the layout, any font */
.tv-dig, .tv-sep { display: inline-flex; align-items: center; justify-content: center; text-align: center; }
.tv-dig { width: .62em; }
.tv-sep { width: .30em; }
#tvTime.tv-expired { color: #ef4444 !important; }
.mini-stage.tv-urgent #tvTime { animation: urgPulse .7s ease-in-out infinite; }
@keyframes urgPulse { 0%,100% { transform: scale(1) } 50% { transform: scale(1.04) } }
.tv-ring {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 100%; height: 100%;
  z-index: 1; overflow: visible;
}
.tv-ring circle { fill: none; stroke-width: 8; }
.tv-ring .tv-ring-bg { stroke: rgba(255,255,255,.09); }
.tv-ring .tv-ring-fill {
  stroke: var(--cyan); stroke-linecap: round;
  transform: rotate(-90deg); transform-origin: 50% 50%;
  transition: stroke-dashoffset .18s linear, stroke .3s;
}
#tvStatus { color: var(--text-2); font-size: 12px; margin-bottom: 14px; }
.tv-bar {
  height: 6px; border-radius: 99px;
  background: rgba(255,255,255,.07); overflow: hidden;
  border: 1px solid rgba(255,255,255,.06); width: 100%; max-width: 420px;
}
.tv-bar-fill {
  height: 100%; width: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--purple));
  border-radius: inherit; transition: width .18s linear, background .3s;
}

/* All controls on one left-aligned line, every control the same size */
.preview-controls-row {
  display: flex; align-items: center; gap: 10px;
  flex-wrap: wrap; justify-content: flex-start; flex-shrink: 0;
}
.preview-controls-row .tctl {
  flex: 0 0 auto; height: 42px; min-width: 104px; padding: 0 14px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13.5px; font-weight: 700; border-radius: 10px; box-sizing: border-box;
}
/* Manual time entry — clean compact field, professional numeric font (not Syne) */
.timer-manual {
  flex: 0 0 auto; height: 42px; width: 122px; box-sizing: border-box;
  text-align: center; padding: 0 10px;
  font-family: 'Space Grotesk', 'Rajdhani', sans-serif;
  font-weight: 700; font-size: 15px; letter-spacing: 1px;
}

/* Keyboard shortcut hint */
.preview-hint {
  color: var(--text-3); font-size: 11.5px;
  flex-shrink: 0; margin-top: 2px;
}
.preview-hint kbd {
  display: inline-block; padding: 1px 6px; border-radius: 5px;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14);
  font-family: var(--font-display); font-size: 11px; color: var(--text-2);
  margin: 0 1px;
}

/* Logo acts as a back button on the timer page */
#brandLogo.brand-back { cursor: pointer; transition: transform .2s, opacity .2s; }
#brandLogo.brand-back:hover { transform: translateX(-3px); opacity: .85; }

/* ── Setup form grid ── */
.setup-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px }
.hidden { display: none !important }
.badge-live { background: rgba(16,185,129,.12); color: var(--green); border: 1px solid rgba(16,185,129,.2) }

/* ── Responsive ── */
@media (max-width: 1100px) {
  .timer-workspace { grid-template-columns: 1fr }
  .preview-pane { position: static; height: auto; min-height: 500px }
}
@media (max-width: 700px) {
  .setup-grid { grid-template-columns: 1fr }
  .timer-page-header { flex-direction: column; align-items: flex-start }
}

/* ── Small laptop (1024–1366 px): auto 90% scale ── */
@media screen and (max-width: 1366px) and (min-width: 1024px) {
  html { zoom: 0.9; }
}
