* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; font-family: Arial, Helvetica, sans-serif; }
button, input, select, textarea { font: inherit; }
button, a, input, select { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.45; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid #ffd43b; outline-offset: 3px; }
.source-page, .source-page body { width: 100%; height: 100%; overflow: hidden; background: transparent; }
.source-page body { display: flex; }
.viewport { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: transparent; }
#stage { width: min(100vw, calc(100vh * 9 / 16)); height: min(100vh, calc(100vw * 16 / 9)); background: transparent; }
.sr-only { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.host-page { background: #100818; color: #f7f4ff; }
.masthead { background: #161028; color: #f7f4ff; padding: 24px max(24px, calc((100vw - 1380px) / 2)); border-bottom: 5px solid #ffd43b; }
.masthead a { color: #ffd43b; font-size:14px; text-decoration: none; }
.masthead h1 { font: 800 clamp(34px, 4vw, 50px) Georgia, Times New Roman, serif; margin: 12px 0; }
.masthead p { max-width: 860px; line-height: 1.55; color: #e6e0f4; margin: 0 0 6px; }
.layout { max-width: 1380px; margin: auto; padding: 28px 24px 60px; display: grid; grid-template-columns: minmax(280px, 420px) minmax(0, 1fr); gap: 28px; align-items: start; }
.preview-wrap { background: radial-gradient(circle at 50% 18%, #4a2878, #14081f 62%); border: 1px solid #3a2a58; border-radius: 20px; overflow: hidden; }
.preview-heading { padding: 15px 17px; background: #1a1430; display: flex; justify-content: space-between; gap: 14px; align-items: center; font-size:14px; font-weight: 800; letter-spacing: 0.9px; color: #f7f4ff; }
.preview-heading span { color: #ffd43b; }
.preview-wrap iframe { display: block; width: 100%; aspect-ratio: 9 / 16; border: 0; background: #14081f; }
.caption { font-size:14px; line-height: 1.55; color: #d9d0ea; margin: 15px 3px; }
.right-column { display: grid; gap: 20px; min-width: 0; }
.panel { background: #181228; border: 1px solid #3a2a58; border-radius: 18px; padding: 24px; min-width: 0; }
.panel h2 { font-size: 22px; margin: 0 0 9px; }
.panel h3 { font-size: 15px; margin: 22px 0 12px; }
.muted, .note { color: #d9d0ea; font-size: 14px; line-height: 1.55; }
.muted { margin: 6px 0 17px; }
.note { margin: 12px 0 0; }
.modes, .effects, .button-row, .check-row { display: flex; gap: 8px; flex-wrap: wrap; }
.modes { margin: 16px 0 12px; }
.modes button, .secondary { border: 1px solid #5a4878; background: #221c36; color: #f7f4ff; padding: 11px 14px; border-radius: 9px; font-size:14px; font-weight: 700; }
.modes button[aria-pressed="true"] { background: #ffd43b; color: #101114; border-color: #ffd43b; }
.effects { margin-top: 12px; }
.status { padding: 12px 14px; background: #221c36; border-left: 3px solid #ffd43b; font-size:14px; line-height: 1.6; }
.status p, .status small { margin: 0; }
.status small { color: #ffd43b; }
.primary { background: #ffd43b; border: 1px solid #ffd43b; color: #101114; padding: 12px 18px; border-radius: 9px; font-size: 14px; font-weight: 800; }
.field-row, .input-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.field-row label, .input-grid label, .panel label { display: grid; gap: 6px; font-size:14px; font-weight: 700; }
.input-grid label { flex: 1 1 150px; }
.field-row label { flex: 1 1 160px; }
.check-row label { display: flex; align-items: center; gap: 8px; font-size: 14px; }
input, select, textarea { background: #100818; color: #f7f4ff; border: 1px solid #5a4878; border-radius: 8px; padding: 10px 12px; font-size: 16px; }
textarea { width: 100%; min-height: 88px; }
.source-link { width: 100%; margin: 8px 0 12px; }
.source-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.source-actions a { color: #ffd43b; font-weight: 700; }
.rules { line-height: 1.55; }
.footer { padding: 18px 24px 32px; color: #b7adc8; font-size:14px; }
#queue-list { margin: 8px 0 0; padding-left: 18px; }
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; padding: 16px 12px 40px; }
  .masthead { padding: 18px 12px; }
  .panel { padding: 16px; }
}
