/* Studio refresh: shared surfaces and accessible interaction states. */
:root {
  color-scheme: dark;
  --ink: #090c10;
  --paper: #11161c;
  --line: #29323b;
  --lime: #d0f878;
  --hot: #ff8caa;
  --ice: #8bdcde;
  --text: #edf2ee;
  --mist: #b6c2c5;
  --dim: #91a0a8;
  --layout-max: 1320px;
}
body { background: radial-gradient(ellipse at 15% 0%, #1b2924 0, transparent 48%), var(--ink); }
.texture-noise { opacity: .09; }
.sweep-line { display: none; }
.glow-orb { opacity: .35; }
.head { border-bottom: 1px solid var(--line); background: transparent; padding-block: 22px; backdrop-filter: none; }
.head-logo { border-radius: 15px; border: 1px solid #465341; box-shadow: 0 4px 20px #0004; }
.head-slogan { margin-top: 5px; letter-spacing: .04em; }
.head-download, .head-pickup-toggle { border-radius: 9px; transform: none; box-shadow: none; min-height: 40px; }
.head-download:hover { transform: translateY(-1px); }
.rail { display: none; }
.content { padding-top: 28px; }
.card, .rail-card, .gallery-track { border-radius: 16px; background: var(--paper); box-shadow: 0 8px 32px #0002; }
.card--slant::after { display: none; }
.btn-go { border: 1px solid transparent; border-radius: 9px; transform: none; box-shadow: 0 3px 12px #b9e96416; transition: background .18s, transform .18s, box-shadow .18s; }
.btn-go:hover { transform: translateY(-2px); box-shadow: 0 6px 20px #b9e96426; background: #ddff97; }
.btn-go:active { transform: translateY(0); box-shadow: none; }
.btn-go:disabled { transform: none; box-shadow: none; }
.btn-ghost, .passphrase-input, .gallery-page-btn { border-radius: 9px; }
.passphrase-input { min-width: 0; background: #0b1015; padding: 13px 14px; }
:where(button, a, input, summary, [tabindex]):focus-visible { outline: 2px solid var(--ice); outline-offset: 4px; }
.gallery-row, .gallery-preview-row { border-radius: 10px; }
.gallery-badge, .badge { border-radius: 5px; }
.foot { border-top-width: 1px; color: var(--dim); }
.home-v2 { --workbench-gap: 24px; --zone-work-bg: #141c20; }
.home-v2 .home-announcement { margin-top: 18px; border: 1px solid #344338; border-radius: 10px; background: #17231c; color: #b9cbb8; font-size: 12px; }
.home-announcement__label { color: var(--lime); padding-right: 12px; border-right: 1px solid #40503b; }
.home-v2 .engine-tabs { gap: 10px; margin-bottom: 0; }
.home-v2 .engine-tab { border: 1px solid var(--line); border-radius: 12px; padding: 18px 14px; background: #11171c; min-height: 112px; gap: 9px; font-family: var(--font); }
.home-v2 .engine-tab:hover:not(:disabled) { background: #192127; border-color: #586651; }
.home-v2 .engine-tab.is-active { border: 1px solid #8da952; background: linear-gradient(135deg, #29391f, #18231c); box-shadow: inset 0 2px 0 var(--lime), 0 4px 20px #0002; }
.home-v2 .engine-tab__title { display: flex; align-items: center; gap: 8px; font-size: .94rem; }
.engine-tab__icon { width: 17px; height: 17px; flex: none; color: var(--dim); }
.engine-tab.is-active .engine-tab__icon { color: var(--lime); }
.home-v2 .engine-tab__sub { font-size: .7rem; line-height: 1.65; }
.home-v2 .engine-tab__tag { border-radius: 4px; top: 8px; right: 8px; font-size: .52rem; padding: 1px 5px; }
.home-v2 #tab-mvsep .engine-tab__title { padding-right: 30px; }
.home-v2 .hero { border: 1px solid #344239; border-radius: 20px; padding: 30px; background: radial-gradient(ellipse at 0 0, #283b2560, transparent 68%), #12191e; overflow: hidden; margin-bottom: 0; box-shadow: inset 0 1px 0 #e5ffc80a, 0 12px 40px #0002; }
.hero-cut { display: none; }
.home-v2 .hero-inner { margin-bottom: 26px; }
.home-v2 .kicker { display: flex; align-items: center; gap: 9px; color: var(--lime); font-size: .72rem; letter-spacing: .12em; margin-bottom: 16px; }
.home-v2 .kicker::before { content: ''; width: 6px; height: 6px; background: var(--lime); border-radius: 50%; box-shadow: 0 0 12px #d0f85766; }
.home-v2 .hero-title { font-size: clamp(1.8rem, 3.6vw, 2.8rem); line-height: 1.3; margin-bottom: 14px; letter-spacing: -.04em; }
.home-v2 .hero-title em { text-decoration: none; }
.home-v2 .hero-lead { max-width: 52ch; font-size: .86rem; line-height: 1.9; }
.home-v2 .dropzone { min-height: 290px; border: 1px dashed #526640; border-radius: 13px; background: radial-gradient(ellipse at center, #23322166, transparent 80%), #0d1416; padding: 28px 22px; }
.home-v2 .dropzone:hover, .home-v2 .dropzone.drag-over { transform: none; border-color: var(--lime); box-shadow: inset 0 0 35px #d0f87808; }
.home-v2 .dropzone-inner { align-items: center; text-align: center; gap: 12px; }
.home-v2 .drop-art { justify-content: center; margin-bottom: 8px; }
.home-v2 .fake-vu { height: 50px; align-items: center; background: transparent; border: 0; gap: 5px; }
.home-v2 .fake-vu i { width: 4px; border-radius: 5px; animation-duration: 1.2s; }
.home-v2 .drop-hint-line { display: none; }
.home-v2 .dropzone .hint { max-width: 48ch; font-size: .75rem; line-height: 1.8; }
.home-v2 .dropzone .notice { font-size: .68rem; line-height: 1.7; color: var(--dim); }
.home-v2 .dropzone .btn-go { min-width: 168px; margin-top: 4px; }
.home-v2 .rail-card { padding: 22px; border: 1px solid var(--line); }
.home-v2 .mono-label { color: var(--ice); font-size: .62rem; letter-spacing: .17em; margin-bottom: 12px; }
.home-v2 .rail-card--status { border-top: 2px solid #a3c565; background: linear-gradient(120deg, #202b20, #141c20); }
.home-v2 .rail-est-note, .home-v2 .pickup-lead--compact { line-height: 1.85; }
.home-v2 .pickup-block { border: 1px solid var(--line); padding: 22px; }
.home-v2 .pickup-row { gap: 8px; }
.home-v2 .pickup-go { padding: 12px 18px; margin: 0; }
.home-v2 #task-card { margin-top: 22px; }
.home-v2 .zone--community { margin-top: 30px; padding: 26px; border: 1px solid var(--line); background: linear-gradient(105deg, #162226, #11161c); }
.home-v2 .gallery-entry-head h2 { font-size: 1.2rem; }
.home-v2 .zone--guide { border-top: 1px solid var(--line); padding-top: 26px; }
.home-v2 .guide-head { margin: 0 0 20px; padding-bottom: 0; border: 0; }
.home-v2 .guide-tabs { gap: 8px; border-bottom: 0; }
.home-v2 .guide-tab { border-radius: 8px; }
.home-v2 .voice-options { margin: 0 0 22px; }
@media (min-width: 1000px) { .home-v2 .workbench-zone { grid-template-columns: minmax(0, 1.8fr) minmax(300px, .85fr); } }
@media (min-width: 641px) and (max-width: 999px) { .home-v2 .engine-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .head { padding-block: 16px; gap: 10px; }
  .head-name { font-size: .94rem; }
  .head-slogan { font-size: .62rem; }
  .head-logo { width: 40px; height: 40px; border-radius: 12px; }
  .head-brand { gap: 10px; }
  .home-v2 .content { padding-top: 18px; }
  .home-v2 .engine-tabs--scroll { display: flex; flex-wrap: nowrap; min-width: 0; overflow-x: auto; padding: 0 0 6px; gap: 8px; scroll-snap-type: x proximity; scroll-padding-inline: 2px; -webkit-overflow-scrolling: touch; scrollbar-width: thin; scrollbar-color: #526640 transparent; }
  .home-v2 .engine-tabs--scroll .engine-tab { flex: 0 0 clamp(160px, 44vw, 186px); width: auto; min-height: 88px; padding: 13px 12px; gap: 5px; scroll-snap-align: start; }
  .home-v2 .engine-tab__sub { font-size: .64rem; }
  .home-v2 .hero { padding: 22px 16px 16px; border-radius: 16px; }
  .home-v2 .dropzone { min-height: 270px; padding: 22px 14px; }
  .home-v2 .hero-title { font-size: 1.9rem; }
  .home-v2 .hero-lead { font-size: .8rem; }
  .home-v2 .rail-card, .home-v2 .pickup-block, .home-v2 .zone--community { padding: 20px 16px; }
  .home-v2 .gallery-entry-head { gap: 12px; }
  .home-v2 .workbench-zone { gap: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .fake-vu i { animation: none; height: 18px; }
  .fake-vu i:nth-child(2n) { height: 30px; }
  *, *::before, *::after { transition-duration: 0s !important; }
}
/* Keep the atmosphere continuous on long pages and native controls consistent. */
body { background-repeat: no-repeat; background-attachment: fixed; }
button, input, select, textarea { font-family: var(--font); }
.head-pickup-toggle { border: 1px solid var(--line); background: var(--paper); color: var(--mist); padding: 6px 12px; cursor: pointer; }
/* This checkbox is the first row, so it needs no extra top separation. */
#karaoke-options { padding: 18px 22px; }
#karaoke-options .voice-checks { margin: 0 0 10px; }

/* Shared studio details: typography, restrained surfaces, and clear focus states. */
::selection { color: var(--ink); background: var(--lime); }
.card--slant, .badge { transform: none; }
.btn-ghost, .head-download, .head-pickup-toggle, .guide-tab, .gallery-track a.download, .result-item a.download { font-family: var(--font); }
.btn-ghost { min-height: 38px; display: inline-flex; align-items: center; justify-content: center; }
.btn-ghost:hover { background: #8bdcde12; border-color: #698e8e; color: var(--text); }
.badge--infer { border: 1px solid #52683d; background: #cfed8812; color: var(--lime); padding: 7px 10px; }
.head-download { background: #c9ee9010; border-color: #536647; padding: 10px 14px; }
.head-pickup-toggle:hover { border-color: var(--ice); color: var(--text); }
.passphrase-input { color: var(--text); border: 1px solid var(--line); border-radius: 9px; min-height: 44px; }
.passphrase-input::placeholder { color: #7f919a; }
.head-nav { gap: 8px; }
.head-nav a { padding: 10px 12px; border-radius: 8px; border: 1px solid transparent; font-family: var(--font); }
.head-nav a:hover { border-color: var(--line); background: #ffffff05; }
.foot { padding-block: 22px; background: transparent; }
.foot p { line-height: 2; }
.foot a { color: #a2b8ba; text-decoration: none; }
.foot a:hover { color: var(--lime); }

/* Home: keep the primary action distinct from supporting content. */
.home-v2 .fake-vu { width: 70px; height: 62px; justify-content: center; gap: 3px; border: 1px solid #4f673a80; border-radius: 16px; background: #c9ed8910; }
.home-v2 .fake-vu i { width: 3px; }
.home-v2 .drop-title { font-size: 1rem; font-weight: 600; }
.home-v2 .dropzone .btn-go { min-height: 46px; }
.home-v2 .pickup-block { transform: none; box-shadow: 0 6px 28px #0002; }
.home-v2 .zone--community { margin-top: 24px; }
.home-v2 .guide-head h2 { font-size: 1.2rem; margin-bottom: 8px; }
.home-v2 .guide-head .deku { font-size: .82rem; }
.home-v2 .guide-tabs { display: inline-flex; padding: 5px; background: #080e12; border: 1px solid var(--line); border-radius: 11px; gap: 4px; }
.home-v2 .guide-tab { min-height: 38px; border: 1px solid transparent; background: transparent; padding: 8px 16px; }
.home-v2 .guide-tab.is-active { background: #d0f87812; border-color: #778c4a80; color: var(--lime); }
.home-v2 .guide-panel .section-bar--nested { margin-top: 8px; }
.home-v2 .steps li { padding-block: 13px; align-items: center; border-bottom: 0; font-size: .84rem; }
.home-v2 .steps li:not(.hidden) ~ li:not(.hidden) { border-top: 1px solid var(--line); }
.home-v2 .st-n { width: 28px; height: 28px; border: 1px solid #5a6e3c; background: #d0f87812; color: var(--lime); border-radius: 8px; }
.home-v2 .feature { border-left-width: 1px; border-top: 2px solid #647d46; padding: 22px; }
.home-v2 .feature .num { color: var(--ice); margin-bottom: 14px; }
.home-v2 .feature p { font-size: .8rem; line-height: 1.85; }
.faq details, .faq details:last-of-type { border-radius: 10px; margin-bottom: 8px; padding: 0; background: #0d1419; border: 1px solid var(--line); }
.faq details[open] { border-color: #4f6344; background: #141e1b; }
.faq summary { display: flex; justify-content: space-between; gap: 16px; padding: 14px 16px; line-height: 1.65; font-size: .85rem; }
.faq summary::after { flex: none; color: var(--ice); }
.faq details p { margin: 0; padding: 0 16px 16px; line-height: 1.85; font-size: .8rem; }
.engine-tabs--scroll .engine-tab:focus-visible { outline-offset: -4px; }
.status { border-radius: 6px; padding: 4px 9px; }
.status.done { border-color: #6b8b4e; background: #d0f87812; }
.bar-box, .bar-fill, .gallery-item__bar { border-radius: 999px; }
.bar-fill { background: linear-gradient(90deg, #8bdcde, var(--lime)); }
.task-title { font-size: 1.05rem; line-height: 1.6; overflow-wrap: anywhere; }
.result-item { border: 1px solid var(--line); border-radius: 12px; padding: 16px; background: #121b20; }
.result-item .label { color: var(--text); }
.result-item a.download, .gallery-track a.download { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; border-radius: 8px; border: 1px solid #5a7043; background: #c9ee9010; color: var(--lime); padding: 7px 13px; }
.result-item a.download:hover, .gallery-track a.download:hover { color: var(--ink); background: var(--lime); border-color: var(--lime); }
.passphrase-box { border-radius: 12px; }
.error { border-radius: 10px; line-height: 1.8; }

/* The library: consistent row heights, quieter status badges, readable filenames. */
body.gallery-v2 .gallery-page { border: 1px solid var(--line); padding: 32px; background: linear-gradient(140deg, #1b292066, transparent 42%), var(--paper); }
.gallery-head { align-items: center; margin-bottom: 14px; gap: 20px; }
.gallery-head .mono-label, .gallery-detail > .mono-label { color: var(--ice); margin-bottom: 12px; }
.gallery-page-title { font-size: clamp(1.4rem, 2.6vw, 2rem); line-height: 1.45; overflow-wrap: anywhere; }
.gallery-head__actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.gallery-counts { color: var(--mist); font-family: var(--font); font-size: .74rem; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: #0b1115; }
.gallery-page > .pickup-lead { font-size: .82rem; line-height: 1.85; margin-bottom: 24px; }
.gallery-table { border: 0; gap: 10px; margin-top: 20px; }
body.gallery-v2 .gallery-row { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; padding: 17px 18px; gap: 16px; border: 1px solid var(--line); background: #0d141a; }
body.gallery-v2 .gallery-row:hover { transform: none; border-color: #536a47; background: #18221d; }
.gallery-row::before { content: ''; width: 42px; height: 42px; border-radius: 11px; border: 1px solid #53674680; background: #d0f8780b url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c1d59e' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M4 9v6m4-9v12m4-15v18m4-15v12m4-9v6'/%3E%3C/svg%3E") center / 22px no-repeat; }
.gallery-row__name { display: block; font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border: 0; line-height: 1.7; }
.gallery-row__sub { font-size: .73rem; line-height: 1.6; color: var(--dim); }
.gallery-row__side::after { content: '↗'; color: #718678; font-size: 1.1rem; margin-left: 10px; }
.gallery-badge { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font); font-size: .67rem; letter-spacing: 0; padding: 4px 8px; border-radius: 6px; }
.gallery-badge::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; flex: none; }
.gallery-badge--done { color: #c2eaa0; border-color: #536a4680; background: #c7ed8810; }
.gallery-badge--processing { color: #f4cb89; border-color: #8b744880; background: #e4bc7310; }
.gallery-badge--queued { color: var(--ice); border-color: #526f7480; background: #8bdcde0a; }
.gallery-preview-row { padding: 14px 16px; }
.gallery-preview-row__name { font-weight: 500; }
.gallery-empty, .gallery-preview__empty { border: 1px dashed #425746; border-radius: 12px; padding: 24px; color: var(--mist); background: #a6c58a06; line-height: 1.9; }
.gallery-pager[hidden] { display: none; }
body.gallery-v2 .gallery-pager { border-top-style: solid; padding-top: 20px; margin-top: 24px; }

/* Results: an original track followed by a compact two-column stem rack. */
.detail-v2 .gallery-detail { padding: 30px; }
.gallery-detail-head { align-items: center; gap: 16px; }
.gallery-detail-head .gallery-page-title { flex: 1 1 65%; min-width: 0; }
.gallery-item__meta { font-family: var(--font); }
.gallery-item__msg { line-height: 1.8; color: var(--dim); }
.gallery-tracks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 24px; }
.gallery-track { min-width: 0; border: 1px solid var(--line); padding: 18px; background: #141e24; border-radius: 13px; box-shadow: none; }
.gallery-track--original { grid-column: 1 / -1; margin: 0; border-color: #536847; background: #1a251d; }
.gallery-track--score { grid-column: 1 / -1; }
.gallery-track__label { font-size: .86rem; }
.gallery-track--original .gallery-track__label { color: var(--lime); }
.gallery-track__row { margin: 0 0 12px; }
.gallery-detail-foot { padding-top: 20px; border-top: 1px solid var(--line); margin-top: 26px; }
.gallery-detail-foot a { color: var(--mist); border: 0; display: inline-flex; min-height: 36px; align-items: center; }
.gallery-detail-foot a:hover { color: var(--lime); }
.track-player { background: #0d151a; border-color: #304049; color: var(--text); padding: 12px; box-shadow: inset 0 1px 0 #ffffff03; }
.track-player.is-playing { background: #17251e; border-color: #6a874b; }
.track-player__duration { color: var(--dim); }
.track-player input[type="range"] { background: linear-gradient(to right, var(--player-accent) var(--fill), #354149 var(--fill)); }
.track-player input[type="range"]::-webkit-slider-thumb { border-color: #131d20; }
.track-player input[type="range"]::-moz-range-thumb { border-color: #131d20; }
.track-player .track-player__mute { color: var(--mist); }
.track-player .track-player__volume { flex-basis: 48px; width: 48px; }

/* Dialogs use the same cool, calm surface as the workbench. */
.modal-card { background: linear-gradient(145deg, #1c2a24, #111a20 65%); border-color: #4b6147; border-radius: 18px; padding: 28px 24px 24px; }
.modal-close { width: 36px; height: 36px; background: #0a131780; border: 1px solid var(--line); }
.modal-card h3 { padding-right: 36px; line-height: 1.55; }
.modal-card .mono-label { margin-bottom: 14px; }
.offline-spec { border-radius: 10px; }
.modal-lead, .modal-note { line-height: 1.85; }
@media (max-width: 1000px) {
  .gallery-tracks { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .head-nav { gap: 2px; }
  .head-nav a { padding: 9px 7px; font-size: .72rem; }
  .head-download { display: inline-flex; align-items: center; justify-content: center; width: 40px; min-height: 40px; padding: 0; flex: none; }
  .head-download__text { display: none; }
  .head-download__icon svg { width: 18px; height: 18px; }
  .head-r { gap: 8px; }
  body.gallery-v2 .gallery-page, .detail-v2 .gallery-detail { padding: 22px 16px; }
  .gallery-head__actions { width: 100%; gap: 10px; justify-content: space-between; }
  .gallery-counts { padding: 8px; font-size: .67rem; }
  .gallery-page-title { font-size: 1.4rem; }
  .gallery-tracks { grid-template-columns: 1fr; gap: 12px; }
  .gallery-track { padding: 16px 12px; }
  .gallery-detail-head .gallery-page-title { flex-basis: 100%; }
  body.gallery-v2 .gallery-row { grid-template-columns: 34px minmax(0, 1fr); gap: 7px 12px; padding: 14px 12px; align-items: start; }
  .gallery-row::before { width: 34px; height: 34px; grid-row: 1 / 3; border-radius: 9px; background-size: 18px; }
  body.gallery-v2 .gallery-row__main { width: auto; }
  body.gallery-v2 .gallery-row__name { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; white-space: normal; overflow-wrap: anywhere; line-height: 1.7; font-size: .85rem; }
  body.gallery-v2 .gallery-row__side { grid-column: 2; justify-content: flex-start; justify-self: stretch; flex-wrap: wrap; }
  .gallery-row__side::after { margin-left: auto; }
  .gallery-preview-row { padding: 12px; }
  .result-item { padding: 13px; }
}
@media (max-width: 540px) {
  .track-player { display: grid; grid-template-columns: 38px 34px minmax(0, 1fr) 34px; gap: 6px; }
  .track-player .track-player__play { width: 36px; height: 36px; grid-column: 1; grid-row: 1; }
  .track-player__current { grid-column: 2; grid-row: 1; }
  .track-player__seek { grid-column: 3; grid-row: 1; }
  .track-player__duration { grid-column: 4; grid-row: 1; }
  .track-player .track-player__mute { grid-column: 1; grid-row: 2; height: 28px; width: 36px; }
  .track-player .track-player__volume { grid-column: 2 / 5; grid-row: 2; width: 100%; }
  .track-player__status { grid-column: 1 / -1; font-size: .7rem; line-height: 1.7; }
  .home-v2 .guide-tabs { display: flex; width: 100%; }
  .home-v2 .guide-tab { flex: 1; padding-inline: 8px; }
  .gallery-head__actions .btn-ghost { font-size: .67rem; }
}
@media (prefers-reduced-motion: reduce) {
  .modal-backdrop, .modal-card, .glow-orb { animation: none; }
}
