:root {
  font-family: -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  color: #202633;
  background: #f7f8fa;
  --surface: #fff;
  --ink: #202633;
  --muted: #5e6675;
  --line: #e2e5ea;
  --accent: #c9a14a;
  --accent-deep: #765416;
  --accent-soft: #faf4e5;
  --radius: 16px;
  --shadow: 0 1px 2px #1b243508, 0 12px 32px -24px #1b24354d;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
[hidden] { display: none !important; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { letter-spacing: -.025em; overflow-wrap: anywhere; }
a { color: var(--accent-deep); text-underline-offset: .2em; }
button, input, textarea { font: inherit; }
button, .primary {
  border: 1px solid #dce0e6;
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  min-height: 42px;
  padding: .6rem .95rem;
  font-size: .9rem;
  font-weight: 650;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: background-color .16s ease, border-color .16s ease;
}
button:hover:not(:disabled) { background: #f8f9fb; border-color: #b5bdc9; }
button:disabled { cursor: default; opacity: .6; }
:where(button, a, input, textarea, summary):focus-visible {
  outline: 2px solid #8b661d;
  outline-offset: 3px;
}
.primary {
  background: #dcb763;
  color: #30230d;
  border-color: var(--accent);
  box-shadow: 0 2px 4px #6c4e1820;
}
.primary:hover:not(:disabled) { background: #ebc777; border-color: #9f752a; }

.topbar { background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  min-height: 72px;
  width: min(1280px, calc(100% - 3rem));
  margin-inline: auto;
}
.brand { display: flex; gap: .7rem; align-items: center; font-weight: 700; letter-spacing: -.025em; }
.brand-logo { display: block; flex: 0 0 auto; border-radius: 10px; object-fit: contain; box-shadow: 0 1px 5px #1b24352b; }
.room-shell, .admin-shell { width: min(1280px, calc(100% - 3rem)); margin-inline: auto; padding: clamp(1.75rem, 4vw, 3.5rem) 0 3rem; }
.admin-shell { width: min(1280px, calc(100% - 3rem)); padding-top: clamp(2rem, 4vw, 3.25rem); }

.auditorium { background: radial-gradient(ellipse at top, #eee2c640, transparent 620px), #f7f8fa; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  background: #f4f5f7;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: .38rem .7rem;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 650;
}
.pill::before { content: ""; flex: 0 0 .4rem; height: .4rem; border-radius: 50%; background: currentColor; }
.pill:is([data-state="waiting"], [data-state="registration"]) { background: var(--accent-soft); color: var(--accent-deep); border-color: #ecdfc2; }
.pill[data-state="playing"] { background: #eaf5ef; color: #235b42; border-color: #d3e9db; }
.pill[data-lesson-ended="true"] { background: var(--accent-soft); color: var(--accent-deep); border-color: #ecdfc2; }
.room-heading { margin-bottom: clamp(1.25rem, 3vw, 1.9rem); }
.room-heading h1 { max-width: 42ch; font-size: clamp(1.75rem, 4vw, 3rem); letter-spacing: -.045em; line-height: 1.12; }
.room-shell:has(.registration-card:not([hidden])) .room-heading { text-align: center; }
.room-shell:has(.registration-card:not([hidden])) .room-heading h1 { margin-inline: auto; }
.registration-card {
  display: grid;
  gap: 1.05rem;
  max-width: 450px;
  margin-inline: auto;
  padding: clamp(1.25rem, 4vw, 2rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 16px 48px -22px #242d4544;
}
.registration-card h2 { font-size: 1.25rem; }
.registration-card .notice { margin-top: 0; }
.room-grid { display: grid; gap: 1.15rem; grid-template-columns: minmax(0, 1fr) minmax(255px, 320px); align-items: start; }
.stage {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 16 / 9;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid #343743;
  border-radius: var(--radius);
  background: radial-gradient(ellipse at 50% 0%, #3f392e, #222532 58%, #171a24);
  color: #fcfaf6;
  box-shadow: 0 16px 32px -22px #1b243588;
}
.stage:has(video:not([hidden])) { background: #0e1016; }
.stage video { width: 100%; height: 100%; position: absolute; inset: 0; }
.stage-message {
  position: relative;
  width: fit-content;
  max-width: 100%;
  padding: clamp(1rem, 3vw, 2rem);
  text-align: center;
  display: grid;
  gap: clamp(.5rem, 1.3vw, .9rem);
  justify-items: center;
  overflow-wrap: anywhere;
}
.stage:has(video:not([hidden])) .stage-message { border-radius: var(--radius); background: #161922ed; }
.replay-button {
  display: flex;
  width: fit-content;
  max-width: 100%;
  min-height: 44px;
  margin: 1rem auto 0;
  padding-inline: 1.1rem;
  border-color: var(--accent-deep);
  background: var(--accent-soft);
  color: var(--accent-deep);
  text-align: center;
}
.replay-button:hover:not(:disabled) { border-color: var(--accent-deep); background: #f1e4c3; }
.stage-icon {
  display: grid;
  place-items: center;
  width: clamp(2.25rem, 5vw, 3.1rem);
  aspect-ratio: 1;
  border: 1px solid #e9bd6357;
  border-radius: 12px;
  background: #dcb7631a;
  color: #efd08c;
  font-size: clamp(1.1rem, 3vw, 1.6rem);
  line-height: 1;
}
.stage h2 { font-size: clamp(1rem, 2.1vw, 1.45rem); font-weight: 600; }
.countdown { font-size: clamp(2.2rem, 8vw, 5.35rem); line-height: 1; letter-spacing: -.055em; font-weight: 650; font-variant-numeric: tabular-nums; }
#stage-detail { max-width: 54ch; color: #dadce4; font-size: .9rem; line-height: 1.5; }
#stage-detail:empty, #notice:empty, #upload-status:empty, #group-status:empty { display: none; }
.audience {
  position: absolute;
  z-index: 1;
  top: .75rem;
  left: .75rem;
  display: flex;
  max-width: calc(100% - 1.5rem);
  overflow: hidden;
  border: 1px solid #ffffff40;
  border-radius: 8px;
  box-shadow: 0 2px 8px #11131d38;
  font-size: .8rem;
  font-weight: 700;
  line-height: 1.25;
  pointer-events: none;
}
.audience-state, .audience-viewers {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .48rem .65rem;
  white-space: nowrap;
}
.audience-state { background: #343744; color: #fff; }
.audience[data-state="live"] .audience-state { background: #c81526; }
.audience-viewers { background: var(--surface); color: var(--ink); font-variant-numeric: tabular-nums; }
.audience-dot {
  width: .44rem;
  height: .44rem;
  border-radius: 50%;
  background: currentColor;
}
.audience[data-state="live"] .audience-dot { animation: audience-pulse 1.8s ease-out infinite; }
.audience-eye {
  position: relative;
  display: grid;
  place-items: center;
  width: .85rem;
  height: .85rem;
  border: 1.5px solid currentColor;
  border-radius: 70% 23%;
  transform: scaleY(.82) rotate(45deg);
}
.audience-eye::after {
  content: "";
  width: .29rem;
  height: .29rem;
  border-radius: 50%;
  background: currentColor;
}
@keyframes audience-pulse {
  0% { box-shadow: 0 0 0 0 #ffffffbf; }
  75%, 100% { box-shadow: 0 0 0 .28rem #ffffff00; }
}
.offer { display: grid; gap: .75rem; margin-top: 1rem; padding: .9rem; background: var(--accent-soft); border: 1px solid #ecdfc2; border-radius: 12px; }
.offer-thumbnail { display: block; width: 100%; max-height: 450px; aspect-ratio: 16 / 9; border-radius: 8px; background: #fff; object-fit: contain; }
.chat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; overflow: hidden; box-shadow: var(--shadow); }
.chat header { padding: .76rem 1rem; background: #f7f8fa; border-bottom: 1px solid var(--line); }
.chat h2 { font-size: .93rem; }
.chat-stream { position: relative; height: clamp(13rem, 42vh, 29rem); }
.chat-empty { position: absolute; inset: 0; color: var(--muted); font-size: .85rem; line-height: 1.5; padding: .85rem 1rem; pointer-events: none; }
.chat ol {
  height: 100%;
  overflow: auto;
  overscroll-behavior-y: contain;
  scrollbar-gutter: stable;
  margin: 0;
  padding: .6rem .55rem .6rem .7rem;
  list-style: none;
}
.chat ol:focus-visible { outline: 2px solid var(--accent-deep); outline-offset: -2px; }
.chat li {
  padding: .29rem .35rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.chat li p { color: #424956; font-size: .875rem; }
.chat li strong { margin-inline-end: .2rem; color: var(--ink); font-weight: 750; }
.chat-scheduled { margin-inline-end: .2rem; padding: .12rem .32rem; border-radius: 4px; background: #f2f3f5; color: var(--muted); font-size: .7rem; }
.chat li.chat-own { background: var(--accent-soft); border-radius: 8px; }
.chat li.chat-own strong { color: var(--accent-deep); }
.chat-form {
  display: grid;
  gap: .35rem;
  padding: .6rem .65rem;
  border-top: 1px solid var(--line);
}
.chat-author { padding-inline: .35rem; color: var(--accent-deep); font-size: .75rem; font-weight: 700; overflow-wrap: anywhere; }
.chat-input { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: .25rem; }
#chat-text { border-color: transparent; background: var(--surface); padding-inline: .35rem; }
.chat-input > button {
  width: 44px;
  min-height: 44px;
  padding: 0;
  border-color: var(--ink);
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
}
.chat-input > button:hover:not(:disabled) { border-color: #394458; background: #394458; }
.chat-input > button span { transform: rotate(-28deg); }
.chat-emojis { position: relative; margin: 0; }
.chat-emojis summary {
  display: grid;
  place-items: center;
  width: 44px;
  min-height: 44px;
  border-radius: 9px;
  color: var(--muted);
  list-style: none;
}
.chat-emojis summary:hover, .chat-emojis[open] summary { background: #f2f3f5; }
.chat-emojis summary::-webkit-details-marker { display: none; }
.emoji-icon {
  position: relative;
  width: 18px;
  height: 18px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
}
.emoji-icon::before {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 5px 0 currentColor;
}
.emoji-icon::after {
  content: "";
  position: absolute;
  inset: 6px 3px 3px;
  border-bottom: 1px solid currentColor;
  border-radius: 50%;
}
.emoji-panel {
  position: absolute;
  z-index: 1;
  right: 0;
  bottom: calc(100% + .4rem);
  display: flex;
  gap: .18rem;
  padding: .3rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 9px;
  box-shadow: var(--shadow);
}
.emoji-panel button { min-width: 32px; min-height: 34px; margin: 0; padding: 0; font-size: 1rem; }
.chat-form .notice { margin: 0; }
.notice { color: #9a2634; margin-top: .75rem; font-size: .9rem; overflow-wrap: anywhere; }
.preview-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-bottom: 1.4rem; padding: .65rem; border: 1px solid #ecdfc2; border-radius: 12px; background: var(--accent-soft); }
.preview-bar strong { margin-inline: .35rem; font-size: .85rem; color: var(--accent-deep); }
.preview-bar button { min-height: 36px; font-size: .8rem; }

.admin-heading, .actions { display: flex; align-items: center; flex-wrap: wrap; gap: .65rem; }
.admin-heading { justify-content: space-between; margin-bottom: 1.5rem; }
.admin-heading h1 { font-size: clamp(2rem, 4vw, 2.65rem); letter-spacing: -.045em; }
.library-heading { align-items: flex-end; margin-bottom: 1.65rem; }
.library-heading .detail-kicker { letter-spacing: .12em; font-size: .7rem; }
.library-heading h1 { margin-bottom: .45rem; }
.library-intro { max-width: 42rem; color: var(--muted); line-height: 1.55; }
.library-count { margin-top: .8rem; color: var(--muted); font-size: .8rem; font-weight: 650; }
.webinar-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.webinar-card {
  display: grid;
  align-content: space-between;
  gap: 1.25rem;
  min-width: 0;
  min-height: 158px;
  padding: 1.15rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.webinar-card:hover { border-color: #d7c18f; box-shadow: 0 10px 28px -20px #1b243580; transform: translateY(-2px); }
.webinar-card[aria-current="true"] { border-color: var(--accent); }
.webinar-card:focus-visible { outline-offset: 3px; }
.webinar-card h2 { margin: 0; font-size: 1.08rem; font-weight: 700; }
.webinar-card-slug { color: var(--muted); font-size: .82rem; overflow-wrap: anywhere; }
.webinar-card-footer { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding-top: .75rem; border-top: 1px solid #edf0f3; }
.webinar-card-action, .webinar-card-archived { font-size: .8rem; font-weight: 650; }
.webinar-card-action { color: var(--accent-deep); }
.webinar-card-archived { color: var(--muted); }
.webinar-card-arrow { color: var(--accent-deep); font-size: 1.15rem; line-height: 1; }
.library-empty { display: grid; justify-items: start; gap: .75rem; min-height: 190px; align-content: center; }
.library-empty h2 { margin: 0; }
.integration-status { margin-top: 1.3rem; padding-top: .8rem; border-top: 1px solid var(--line); }
.back-button { min-height: 36px; margin: 0 0 1rem; padding: .35rem .2rem; border-color: transparent; background: transparent; color: var(--muted); }
.back-button:hover:not(:disabled) { border-color: transparent; background: transparent; color: var(--ink); }
.webinar-detail-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.2rem; }
.detail-kicker { margin-bottom: .25rem; color: var(--muted); font-size: .82rem; font-weight: 650; }
.webinar-detail-heading h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); letter-spacing: -.045em; }
.detail-meta { margin-top: .35rem; color: var(--muted); font-size: .88rem; }
.detail-status { padding: .34rem .65rem; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: .78rem; font-weight: 650; }
.detail-nav {
  position: sticky;
  z-index: 2;
  top: 0;
  display: flex;
  gap: .2rem;
  overflow-x: auto;
  margin: 0 0 1rem;
  padding: .55rem .25rem;
  border-bottom: 1px solid var(--line);
  background: #f7f8faed;
  backdrop-filter: blur(12px);
  scrollbar-width: thin;
}
.detail-nav a[aria-current="location"] { background: #fff; color: var(--accent-deep); box-shadow: 0 1px 3px #1b243514; }
.detail-nav a { flex: 0 0 auto; padding: .5rem .72rem; border-radius: 8px; color: var(--muted); font-size: .84rem; font-weight: 650; text-decoration: none; }
.detail-nav a:hover { background: #fff; color: var(--ink); }
.detail-nav a:focus-visible { outline-offset: 0; }
.webinar-detail-heading { scroll-margin-top: 5rem; }
fieldset[id] { scroll-margin-top: 4.5rem; }
.card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: clamp(1rem, 2.5vw, 1.65rem); margin-bottom: 1rem; box-shadow: var(--shadow); }
.card h2 { font-size: 1.2rem; margin-bottom: .75rem; }
.admin-heading h2 { margin: 0; }
.login { max-width: 410px; margin: clamp(1rem, 5vw, 3.5rem) auto 0; display: grid; gap: 1.2rem; padding: clamp(1.35rem, 4vw, 2rem); }
.login h1 { font-size: clamp(1.45rem, 4vw, 1.75rem); text-align: center; letter-spacing: -.035em; }
.reports-heading { display: flex; align-items: center; justify-content: space-between; gap: .8rem; margin-bottom: .8rem; }
.reports-heading h2 { margin: 0; }
fieldset { min-width: 0; margin: 0 0 1.3rem; padding: .85rem clamp(.75rem, 2vw, 1.15rem) 1rem; border: 1px solid var(--line); border-radius: 12px; }
legend { padding: 0 .35rem; font-size: .95rem; font-weight: 700; }
label { display: grid; gap: .4rem; min-width: 0; font-size: .875rem; font-weight: 600; }
input:not([type="checkbox"]), textarea {
  min-width: 0;
  min-height: 43px;
  width: 100%;
  padding: .6rem .75rem;
  border: 1px solid #d6dbe3;
  border-radius: 9px;
  background: #fcfcfd;
  color: var(--ink);
  font-size: 1rem;
}
input::placeholder { color: #6d7584; }
input[type="checkbox"] { accent-color: var(--accent-deep); }
textarea { resize: vertical; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem; }
.fields .wide, .weekdays { grid-column: 1 / -1; }
.checkbox { display: flex; align-items: center; gap: .4rem; margin: .65rem 0; }
.weekdays { display: flex; flex-wrap: wrap; gap: .65rem; }
.weekdays label { display: flex; align-items: center; }
.muted { color: var(--muted); font-size: .85rem; line-height: 1.5; margin: .45rem 0; }
.edit-row, .invite { display: flex; flex-wrap: wrap; align-items: end; gap: .6rem; margin: .8rem 0; }
.edit-row > label, .invite > label { flex: 1 1 115px; }
#chat-rows label:nth-child(2) { flex-grow: 2; }
details { margin-top: .8rem; }
details .fields, details button { margin-top: .65rem; }
summary { cursor: pointer; color: var(--accent-deep); font-size: .9rem; font-weight: 650; }
.feedback { position: fixed; z-index: 1; bottom: 1rem; right: 1rem; max-width: min(36rem, calc(100% - 2rem)); background: #253248; color: white; padding: .85rem 1rem; border-radius: 10px; box-shadow: 0 4px 20px #0003; overflow-wrap: anywhere; }
.feedback.error { background: #802b33; }
.session-card { border-top: 1px solid var(--line); padding-top: .9rem; margin-top: .9rem; }
.session-card h3 { font-size: 1rem; }
.participant-chat { margin: .8rem 0; }
.participant-chat ol {
  max-height: 26rem;
  overflow: auto;
  list-style: none;
  margin: .5rem 0 0;
  padding: 0;
  overflow-wrap: anywhere;
}
.participant-chat ol:empty, .participant-chat .muted:empty { display: none; }
.participant-chat li { display: grid; grid-template-columns: repeat(2, minmax(0, auto)); gap: .25rem .65rem; justify-content: start; padding: .5rem 0; font-size: .9rem; }
.participant-chat li + li { border-top: 1px solid var(--line); }
.participant-chat time { align-self: center; color: var(--muted); font-size: .78rem; }
.participant-chat li p { grid-column: 1 / -1; }
.upload-panel { padding: .85rem; border: 1px solid var(--line); border-radius: 10px; background: #f8f9fb; }
.upload-panel .actions { margin-top: .65rem; }
.upload-panel progress { width: 100%; margin-top: .75rem; accent-color: var(--accent-deep); }
.upload-panel details label { margin-top: .55rem; }
.offer-thumbnail-panel { display: grid; gap: .5rem; padding: .85rem; border: 1px solid var(--line); border-radius: 10px; background: #f8f9fb; }
.offer-thumbnail-panel > input[type="file"] { background: #fff; }
.offer-thumbnail-preview { display: block; width: min(100%, 560px); max-height: 315px; aspect-ratio: 16 / 9; border: 1px solid var(--line); border-radius: 8px; background: #fff; object-fit: contain; }
.offer-thumbnail-panel progress { width: 100%; accent-color: var(--accent-deep); }
.whatsapp-actions { margin-top: .7rem; }
#whatsapp-rules .edit-row > label:nth-child(2) { flex-grow: 3; }

@media (max-width: 780px) {
  .room-grid { grid-template-columns: minmax(0, 1fr); }
  .chat-stream { height: clamp(10rem, 32vh, 20rem); }
  .chat ol { overscroll-behavior-y: auto; }
  .topbar-inner, .room-shell, .admin-shell { width: calc(100% - 2rem); }
  .webinar-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-nav { top: 0; }
}
@media (max-width: 560px) {
  .webinar-list { grid-template-columns: minmax(0, 1fr); }
  .library-heading { align-items: stretch; }
  .library-heading > button { align-self: flex-start; }
  .webinar-detail-heading { align-items: flex-start; }
  .reports-heading { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 480px) {
  .fields { grid-template-columns: minmax(0, 1fr); }
  .stage { min-height: 235px; }
  .topbar-inner { min-height: 62px; }
  .brand { font-size: .9rem; }
  .pill { font-size: .72rem; }
  .offer .primary { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  button, .primary { transition: none; }
  .audience[data-state="live"] .audience-dot { animation: none; }
}

/* Live broadcast room: compact conversation beside the player. */
select { font: inherit; width: 100%; padding: .7rem; border: 1px solid var(--line); border-radius: 8px; background: white; color: var(--ink); }
.stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.live-room .room-shell { max-width: 1520px; }
.live-room .room-grid { grid-template-columns: minmax(0, 1fr) 360px; gap: 1.5rem; }
.live-room .chat { box-shadow: none; border-radius: 12px; }
.live-room .chat header { background: white; padding: 1.1rem; }
.live-room .chat h2 { font-size: 1rem; }
.live-room .chat-stream { height: clamp(18rem, 48vh, 36rem); }
.live-room .chat li { display: flex; align-items: start; gap: .6rem; padding: .45rem .8rem; border: 0; }
.live-room .chat li p { line-height: 1.55; padding-top: .1rem; overflow-wrap: anywhere; }
.live-room .chat li strong { color: #666; font-weight: 600; }
.live-room .chat li.chat-team strong { color: var(--accent-deep); }
.chat-avatar { display: grid; place-items: center; flex: 0 0 26px; height: 26px; border-radius: 50%; background: #e8eaf1; color: #525a70; font-size: .75rem; font-weight: 700; }
.live-room .chat-team .chat-avatar { background: var(--accent-soft); color: var(--accent-deep); }
.live-room .audience { pointer-events: none; }
.live-admin-count { font-size: 1.05rem; font-weight: 700; color: var(--accent-deep); }
.admin-chat-composer { display: flex; gap: .5rem; margin-top: .75rem; }
.admin-chat-composer input { min-width: 0; flex: 1; }
@media (max-width: 900px) {
  .live-room .room-grid { grid-template-columns: minmax(0, 1fr); }
  .live-room .chat-stream { height: 22rem; }
}

.feedback { pointer-events: none; }

.studio-shell { max-width: 1550px; padding: 2rem; margin: auto; }
.studio-shell h1 { font-size: clamp(1.5rem, 3vw, 2.3rem); }
.studio-shell .muted { margin: .6rem 0; line-height: 1.6; }
.studio-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1.2rem; align-items: start; }
.studio-grid > .card { min-width: 0; padding: 1.2rem; }
.studio-preview { position: relative; overflow: hidden; border-radius: 12px; background: #151922; }
#studio-canvas { display: block; width: 100%; aspect-ratio: 16/9; }
.studio-badge { position: absolute; top: 1rem; left: 1rem; background: #242c3ee8; color: white; border-radius: 6px; padding: .5rem .75rem; font-size: .8rem; }
.studio-badge[data-live="true"] { background: #c81526; }
.studio-devices { margin: 1rem 0; }
.studio-actions { padding-top: 1rem; margin-top: 1rem; border-top: 1px solid var(--line); }
.studio-messages { padding: .25rem; margin: 1rem 0; list-style: none; height: 360px; overflow: auto; }
.studio-messages li { padding: .6rem 0; overflow-wrap: anywhere; line-height: 1.6; font-size: .9rem; border-bottom: 1px solid var(--line); }
.studio-messages strong { color: var(--accent-deep); }
.studio-conversation .admin-chat-composer { flex-wrap: wrap; }
.studio-conversation .admin-chat-composer button { margin-left: auto; }
.studio-page .brand { text-decoration: none; color: var(--ink); }
#native-live { object-fit: contain; background: #111; }
@media(max-width: 1000px) { .studio-grid { grid-template-columns: minmax(0, 1fr); } .studio-shell { padding: 1rem; } .studio-conversation .admin-chat-composer { flex-wrap: nowrap; } }

#studio-notice { color: var(--muted); }

.dvr-controls { position: absolute; z-index: 4; inset: auto 0 0; padding: 1.3rem .75rem .35rem; color: white; background: linear-gradient(transparent, #000c); }
.dvr-controls input[type="range"] { --dvr-progress: 100%; display: block; appearance: none; width: 100%; height: 4px; min-height: 0; margin: .5rem 0 .65rem; padding: 0; border: 0; border-radius: 0; cursor: pointer; background: linear-gradient(to right, #ff2424 var(--dvr-progress), #ffffff70 var(--dvr-progress)); }
.dvr-controls input[type="range"]::-webkit-slider-thumb { appearance: none; width: 12px; height: 12px; border-radius: 50%; background: #ff2424; }
.dvr-controls input[type="range"]::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: #ff2424; }
.dvr-buttons { display: flex; align-items: center; gap: .4rem; }
.dvr-buttons button { min-height: 34px; padding: .25rem .5rem; background: transparent; border: 0; box-shadow: none; color: white; font-size: .78rem; white-space: nowrap; }
.dvr-buttons button:hover { background: #ffffff20; color: white; }
.dvr-buttons [data-dvr-play] { font-size: 1.2rem; min-width: 36px; }
.dvr-buttons [data-dvr-live][data-live="true"] { color: #ff4848; font-weight: 800; }
.dvr-offset { font-size: .75rem; font-variant-numeric: tabular-nums; }
.dvr-spacer { flex: 1; }
.stage:fullscreen { width: 100vw; height: 100vh; border-radius: 0; }
@media(max-width: 480px) { .dvr-controls { padding-inline: .35rem; } .dvr-buttons { gap: 0; } .dvr-buttons button { padding-inline: .3rem; font-size: .7rem; } .dvr-offset { font-size: .65rem; } }
