:root {
  color-scheme: dark;
  font-family: Inter, "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  background: #10141c;
  color: #f3f5f9;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .42; }
button:focus-visible, input:focus-visible { outline: 3px solid #ff9e78; outline-offset: 3px; }

.app-shell { max-width: 1700px; min-height: 100vh; margin: auto; padding: 0 clamp(20px, 4vw, 72px); }
.topbar { height: 90px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #2c3442; }
.brand { display: flex; align-items: center; gap: 12px; font-size: .9rem; letter-spacing: .17em; font-weight: 650; white-space: nowrap; }
.brand strong { color: #ff8065; }
.brand-mark { width: 29px; height: 29px; border: 2px solid #ff8065; border-radius: 9px; transform: rotate(-12deg); display: flex; align-items: center; justify-content: center; gap: 3px; }
.brand-mark span { width: 3px; height: 10px; background: #ff8065; border-radius: 2px; transform: rotate(12deg); }
.brand-mark span:last-child { height: 15px; }
.topbar-right { display: flex; align-items: center; gap: 16px; }
.prototype-tag { color: #ffad91; border: 1px solid #75463d; border-radius: 999px; padding: 6px 11px; font-size: .78rem; }
.topbar-copy { color: #a5aebf; font-size: .82rem; }
.home-link { color: #cbd4e0; text-decoration: none; border-bottom: 1px solid #657286; font-size: .82rem; white-space: nowrap; }
.home-link:hover { color: #fff; border-color: #fff; }

.intro { position: relative; display: flex; justify-content: space-between; min-height: 288px; padding: 43px 0 26px; overflow: hidden; }
.eyebrow, .section-label { margin: 0 0 15px; color: #ff8065; font-size: .76rem; font-weight: 750; letter-spacing: .2em; }
.intro h1 { margin: 0; font-size: clamp(2.3rem, 4.3vw, 4.2rem); line-height: 1.12; letter-spacing: -.055em; font-weight: 760; }
.intro h1 em { color: #ff9076; font-style: normal; }
.intro-copy { margin: 20px 0 0; color: #acb6c6; line-height: 1.6; }
.intro-art { width: min(34%, 420px); position: relative; display: grid; place-items: center; }
.art-screen { position: relative; width: 78%; aspect-ratio: 1.62; border: 8px solid #2b3647; border-radius: 20px; transform: rotate(-7deg); background: linear-gradient(125deg, #1e2838, #4f3540 56%, #ab5c50); box-shadow: 0 24px 55px #090d15a8; z-index: 1; display: grid; place-items: center; }
.art-screen::after { content: ""; position: absolute; inset: 10px; border: 1px solid #ffffff21; border-radius: 7px; }
.art-play { width: 58px; height: 58px; border-radius: 50%; background: #ffffffd9; display: grid; place-items: center; box-shadow: 0 8px 30px #15182478; }
.art-play::after { content: ""; border-left: 15px solid #da6c5b; border-top: 10px solid transparent; border-bottom: 10px solid transparent; margin-left: 5px; }
.art-glow { position: absolute; width: 85%; aspect-ratio: 1; background: #a84e4360; filter: blur(85px); }

.workspace { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(330px, 1fr); gap: 22px; align-items: stretch; }
.player-panel, .queue-panel { background: #191f2a; border: 1px solid #303a4a; border-radius: 24px; padding: clamp(18px, 2.2vw, 32px); box-shadow: 0 16px 50px #070b102b; }
.panel-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; min-height: 55px; margin-bottom: 22px; }
.panel-heading .section-label { margin-bottom: 7px; }
.panel-heading h2 { margin: 0; font-size: clamp(1.2rem, 1.8vw, 1.55rem); letter-spacing: -.035em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 32rem; }
.count-pill { flex: none; background: #27303e; color: #bec7d4; border-radius: 999px; padding: 7px 12px; font-size: .78rem; }
.video-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; min-height: 260px; border-radius: 15px; overflow: hidden; background: radial-gradient(circle at 54% 42%, #283241, #0d1119 70%); border: 1px solid #354253; }
.video-frame iframe { display: block; width: 100%; height: 100%; border: 0; }
.video-frame iframe[hidden] { display: none; }
.empty-player { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 20px; }
.empty-player[hidden] { display: none; }
.empty-icon { width: 62px; height: 62px; display: grid; place-items: center; padding-left: 4px; border: 1px solid #647082; border-radius: 50%; color: #ff9378; font-size: 1.2rem; }
.empty-player p { margin: 18px 0 3px; font-weight: 650; }
.empty-player span:last-child { color: #8e9bad; font-size: .88rem; }
.player-controls { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 20px; color: #aab6c6; font-size: .87rem; }
.player-actions { display: flex; align-items: center; gap: 12px; }
.source-link { display: inline-block; text-decoration: underline; text-underline-offset: 3px; }
.source-link[hidden] { display: none; }
.playback-warning { margin: 16px 0 0; padding: 13px 15px; border: 1px solid #725148; border-radius: 11px; background: #2b2529; color: #e1c8c1; font-size: .83rem; line-height: 1.5; }
.playback-warning strong { color: #ffad91; }
.canvas-panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, 1.3fr); align-items: center; gap: 28px; margin-top: 22px; padding: clamp(18px, 2.2vw, 32px); border: 1px solid #55423f; border-radius: 24px; background: #211f28; }
.canvas-copy h2 { margin: 0; font-size: 1.55rem; letter-spacing: -.035em; }
.canvas-copy > p:not(.section-label) { color: #c0b9c1; line-height: 1.55; font-size: .9rem; }
.canvas-buttons { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 22px; }
.canvas-buttons .button { font-size: .8rem; min-height: 42px; padding: 0 12px; }
.canvas-status { min-height: 42px; }
.canvas-screen { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border: 1px solid #554e5c; border-radius: 14px; background: #0c0c0f; }
.canvas-screen canvas { display: block; width: 100%; height: 100%; }
.audio-only { position: absolute; inset: 0; display: grid; place-items: center; padding: 20px; background: #10141c; color: #f2c6b9; font-weight: 700; text-align: center; }
.audio-only[hidden] { display: none; }
.button { border: 0; border-radius: 11px; min-height: 48px; padding: 0 18px; font-weight: 700; transition: transform .15s ease, background .15s ease; white-space: nowrap; }
.button:not(:disabled):hover { transform: translateY(-2px); }
.button-primary { background: #ff886b; color: #171c24; }
.button-primary:hover { background: #ff9a7e; }
.button-secondary { background: #2b3544; color: #f1f5fb; }
.button-secondary:hover { background: #354254; }
.queue-heading { margin-bottom: 26px; }
.text-button { background: none; border: 0; color: #b9c3d1; font-size: .84rem; padding: 5px; }
.text-button:hover { color: #fff; }
form { padding-bottom: 22px; border-bottom: 1px solid #354052; }
form label { display: block; margin-bottom: 11px; font-weight: 650; font-size: .91rem; }
.input-row { display: flex; gap: 8px; }
.input-row input { width: 100%; min-width: 0; min-height: 48px; background: #111722; color: #f5f7fa; border: 1px solid #424e61; border-radius: 10px; padding: 0 13px; font-size: .9rem; }
.input-row input::placeholder { color: #78869a; }
.input-help { color: #8995a8; font-size: .78rem; margin: 10px 0 0; }
.form-error { color: #ffab9b; font-size: .84rem; margin: 9px 0 0; }
.queue-list { max-height: 440px; overflow-y: auto; padding-top: 16px; }
.empty-queue { text-align: center; color: #9aa7b8; padding: 42px 8px; }
.empty-queue span { color: #ff9279; font-size: 2.1rem; }
.empty-queue p { margin: 12px 0 4px; color: #e5eaf1; }
.empty-queue small { font-size: .79rem; }
.queue-item { display: grid; grid-template-columns: 82px minmax(0, 1fr) 28px; gap: 12px; align-items: center; padding: 10px; border: 1px solid transparent; border-radius: 13px; }
.queue-item + .queue-item { margin-top: 5px; }
.queue-item.active { background: #273443; border-color: #455569; }
.queue-item:hover { background: #242d3a; }
.queue-thumb { display: block; width: 82px; aspect-ratio: 16 / 9; border-radius: 7px; object-fit: cover; background: #111722; }
.queue-open { display: block; width: 100%; background: transparent; color: inherit; border: 0; text-align: left; padding: 0; min-width: 0; }
.queue-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 650; font-size: .88rem; }
.queue-meta { display: block; color: #98a6b8; font-size: .76rem; margin-top: 4px; }
.remove-button { color: #aebac9; background: transparent; border: 0; font-size: 1.3rem; line-height: 1; padding: 4px; }
.remove-button:hover { color: #ff9c8b; }
.notice { display: flex; align-items: flex-start; gap: 13px; margin: 22px 0 48px; border: 1px solid #3c4858; border-radius: 14px; background: #202936; padding: 16px 18px; }
.discover-panel { margin-top: 22px; padding: clamp(18px, 2.2vw, 32px); border: 1px solid #303a4a; border-radius: 24px; background: #191f2a; }
.discover-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.discover-head h2 { margin: 0; font-size: 1.55rem; letter-spacing: -.035em; }
.discover-head p:not(.section-label) { margin: 10px 0 0; color: #aab6c6; line-height: 1.5; font-size: .9rem; }
.account-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; max-width: 460px; }
.account-actions #account-status { color: #aab6c6; font-size: .82rem; }
.account-actions .button { min-height: 42px; font-size: .83rem; }
.device-code-panel { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 22px; padding: 20px; border: 1px solid #765346; border-radius: 14px; background: #2b272c; }
.device-code-panel[hidden] { display: none; }
.device-code-panel strong { font-size: .98rem; }
.device-code-panel p { margin: 7px 0; color: #b9c1ce; font-size: .85rem; line-height: 1.5; }
.device-code-panel a, .privacy-note a { color: #ffae92; }
.device-code { flex: none; padding: 12px 18px; border-radius: 10px; background: #10141c; color: #fff; font: 750 1.45rem ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .13em; white-space: nowrap; }
.discover-content { margin-top: 23px; border-top: 1px solid #354052; padding-top: 18px; }
.discover-tabs { display: flex; flex-wrap: wrap; gap: 7px; }
.discover-tabs button { border: 1px solid #3a4656; border-radius: 999px; padding: 8px 15px; background: #222c39; color: #c1cad7; font-size: .85rem; font-weight: 650; }
.discover-tabs button[aria-selected="true"] { border-color: #ff977c; background: #643f39; color: #fff; }
.search-form { max-width: 640px; margin-top: 20px; padding-bottom: 0; border: 0; }
.search-form[hidden] { display: none; }
.discover-status { min-height: 22px; margin: 18px 0 4px; color: #aab6c6; font-size: .88rem; }
.discover-results { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.result-card { min-width: 0; display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px; align-items: center; border: 1px solid #3a4656; border-radius: 12px; background: #222a37; padding: 10px; }
.result-card img { display: block; width: 110px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 7px; background: #111722; }
.result-card strong { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: .86rem; line-height: 1.35; }
.result-card small { display: block; color: #a4afbe; font-size: .76rem; margin-top: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result-card button, .result-card a { display: inline-block; margin-top: 9px; border: 0; border-radius: 7px; background: #ff886b; color: #171c24; padding: 6px 10px; font-size: .78rem; font-weight: 700; text-decoration: none; }
.result-card button:hover, .result-card a:hover { background: #ffa087; }
.privacy-note { margin: 20px 0 0; color: #8995a8; font-size: .79rem; line-height: 1.55; }
.notice-icon { display: grid; place-items: center; flex: none; width: 23px; height: 23px; border: 1px solid #ff9a7d; border-radius: 50%; color: #ff9a7d; font-family: Georgia, serif; font-weight: 700; }
.notice p { margin: 0; color: #b7c1cf; line-height: 1.55; font-size: .85rem; }
.notice strong { color: #e6ebf2; }
footer { display: flex; justify-content: space-between; border-top: 1px solid #2c3442; padding: 24px 0 36px; color: #798699; font-size: .75rem; letter-spacing: .07em; }

@media (max-width: 1100px) {
  .workspace { grid-template-columns: 1fr; }
  .canvas-panel { grid-template-columns: 1fr; }
  .queue-list { max-height: 340px; }
  .intro-art { width: 30%; }
  .discover-results { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 650px) {
  .app-shell { padding: 0 16px; }
  .topbar { height: 74px; }
  .topbar-copy, .intro-art { display: none; }
  .intro { min-height: auto; padding: 36px 0 28px; }
  .intro h1 { font-size: 2.5rem; }
  .intro-copy { font-size: .9rem; }
  .workspace { gap: 14px; }
  .canvas-panel { padding: 17px; border-radius: 17px; }
  .player-panel, .queue-panel { padding: 17px; border-radius: 17px; }
  .video-frame { min-height: 0; }
  .panel-heading h2 { max-width: 220px; }
  .notice { margin-bottom: 25px; }
  .discover-panel { padding: 17px; border-radius: 17px; }
  .discover-head { flex-direction: column; }
  .account-actions { justify-content: flex-start; }
  .device-code-panel { flex-direction: column; align-items: flex-start; }
  .discover-results { grid-template-columns: 1fr; }
  .result-card { grid-template-columns: 88px minmax(0, 1fr); }
  .result-card img { width: 88px; }
  footer { gap: 8px; flex-wrap: wrap; }
}
