* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: #fff; color: #242831; font: 16px/1.5 system-ui, sans-serif; overscroll-behavior: none; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid #4776e6; outline-offset: 3px; }
#home { min-height: 100dvh; }
.settings-button { position: fixed; top: calc(20px + env(safe-area-inset-top, 0px)); right: calc(20px + env(safe-area-inset-right, 0px)); width: 46px; height: 46px; padding: 10px; border: 0; border-radius: 50%; background: transparent; color: #6b7280; }
.settings-button:hover { background: #f0f1f3; color: #242831; }
.settings-button svg { width: 100%; height: 100%; }
#stage { position: fixed; inset: 0; background: #000; }
#local-player, #youtube-container, #youtube-container iframe { width: 100%; height: 100%; border: 0; }
#local-player { object-fit: contain; }
dialog { width: min(560px, calc(100% - 32px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px))); max-height: calc(100dvh - 40px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)); padding: 28px; border: 1px solid #e4e6ea; border-radius: 18px; box-shadow: 0 20px 80px #0002; }
dialog::backdrop { background: #151a2555; }
header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
h1 { margin: 0; font-size: 24px; }
.close-button { border: 0; background: transparent; color: #6b7280; font-size: 28px; padding: 0 8px; }
.hint { color: #697180; font-size: 14px; }
fieldset { margin: 22px 0; padding: 0; border: 0; min-width: 0; }
legend { font-weight: 650; margin-bottom: 10px; }
label { display: block; font-size: 14px; margin-bottom: 6px; }
.source { font-size: 16px; font-weight: 600; margin-top: 16px; }
.source input { accent-color: #365fd1; }
select, input[type="url"], input[type="password"] { width: 100%; min-width: 0; padding: 10px; border: 1px solid #ccd1da; border-radius: 8px; background: #fff; color: inherit; margin-bottom: 12px; }
select:disabled, input:disabled { background: #f4f5f7; color: #8b929d; }
#upload-video { display: block; width: 100%; margin-bottom: 10px; }
#upload-button { padding: 8px 14px; border: 1px solid #ccd1da; border-radius: 8px; background: #f4f5f7; color: inherit; }
button:disabled { cursor: wait; opacity: .6; }
#upload-status { font-size: 14px; }
footer { display: flex; justify-content: flex-end; margin-top: 22px; }
.save-button { border: 0; border-radius: 8px; background: #365fd1; color: #fff; padding: 10px 24px; font-weight: 600; }
.form-error { color: #a42525; font-size: 14px; }
#notice { position: fixed; z-index: 3; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100% - 32px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)); padding: 14px 18px; border: 1px solid #edbcbc; border-radius: 10px; background: #fff4f4; color: #8c2020; display: flex; align-items: center; gap: 16px; }
#dismiss-notice { background: transparent; border: 0; color: inherit; font-size: 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
