@font-face {
  font-family: Manrope;
  src: url('/fonts/manrope.ttf') format('truetype');
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #f6f2e8;
  --paper-deep: #ece6d8;
  --surface: #fcfaf4;
  --surface-soft: #f0ebdf;
  --surface-inset: #eee8db;
  --forest: #28463b;
  --forest-deep: #203b32;
  --accent: #28534a;
  --accent-hover: #1d433b;
  --accent-soft: #e4ebdf;
  --text: #2f342e;
  --text-muted: #6d7165;
  --text-faint: #6d7165;
  --line: #deded0;
  --line-strong: #cbcebc;
  --coral: #b94c38;
  --coral-hover: #a33f2e;
  --coral-soft: #f7e8de;
  --amber: #956c25;
  --shadow: 0 3px 8px #5d51300b, 0 1px 2px #5d51300b;
  --shadow-raised: 0 7px 18px #55492d0b, 0 2px 5px #55492d0a, inset 0 1px 0 #ffffffb3;
  --shadow-inset: inset 1px 2px 4px #574b2b0b, inset -1px -1px 2px #fffaf9;
  --radius: 18px;
  --radius-small: 11px;
  --sidebar-width: 230px;
  --ease: cubic-bezier(.2, .65, .3, 1);
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; scroll-padding-top: 94px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: Manrope, system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, input, select, textarea { font: inherit; color: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { border: 0; background: none; cursor: pointer; }
a { color: inherit; text-decoration: none; }
button:disabled, input:disabled, select:disabled, [aria-disabled='true'] { opacity: .5; cursor: not-allowed; }
button:disabled { transform: none !important; box-shadow: none !important; }
button, a { touch-action: manipulation; }
:focus-visible { outline: 3px solid #9c772e; outline-offset: 4px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline-offset: 2px; }
::selection { background: #d7e3cd; color: #243b2e; }
[hidden] { display: none !important; }
svg { width: 20px; height: 20px; display: inline-block; flex-shrink: 0; vertical-align: middle; }
[data-icon] { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
h1, h2, h3, p { margin-top: 0; }
button, a, input, select { transition: background-color 160ms var(--ease), color 160ms var(--ease), border-color 160ms var(--ease), box-shadow 180ms var(--ease), transform 160ms var(--ease); }
input, select, textarea {
  min-height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-small);
  background: #f8f5ec;
  box-shadow: var(--shadow-inset);
  padding: 10px 13px;
  font-size: 13px;
}
input::placeholder, textarea::placeholder { color: var(--text-faint); opacity: 1; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
input[type='search'] { appearance: none; }
select { cursor: pointer; padding-right: 30px; }
input[type='checkbox'] { accent-color: var(--accent); }
input[type='range'] { cursor: pointer; accent-color: var(--accent); padding: 0; box-shadow: none; }

.app-shell { min-height: 100dvh; display: flex; }
.sidebar {
  position: fixed;
  z-index: 40;
  inset: 0 auto 0 0;
  width: var(--sidebar-width);
  padding: 35px 17px 18px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #78917c var(--forest);
  background: var(--forest);
  color: #e6eddd;
  border-right: 1px solid #213c31;
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 7px 41px;
  width: fit-content;
  font-size: 23px;
  font-weight: 750;
  letter-spacing: -1.1px;
  line-height: 1;
  color: #fcf7e9;
}
.brand-symbol {
  width: 33px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  position: relative;
  flex-shrink: 0;
}
.brand-symbol::before {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid #b9cc9a8c;
  border-radius: 50%;
  transform: rotate(-23deg);
}
.brand-symbol i { width: 3px; height: 13px; background: #d8e4bb; border-radius: 3px; }
.brand-symbol i:nth-child(2) { height: 23px; }
.brand-symbol i:nth-child(3) { height: 19px; }
.brand-symbol i:nth-child(4) { height: 9px; }
.brand-dot { color: #c6d69d; }
.sidebar-label { display: flex; justify-content: space-between; align-items: center; color: #b7c6af; font-size: 10px; font-weight: 600; letter-spacing: 1.9px; margin: 0 14px 12px; }
.sidebar .sidebar-close, .menu-scrim { display: none; }
.navigation { display: flex; flex-direction: column; gap: 5px; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 12px 13px;
  min-height: 47px;
  border-radius: 11px;
  color: #d7e1cc;
  font-size: 14px;
  font-weight: 550;
  text-align: left;
  line-height: 1.5;
}
.nav-item svg { width: 18px; height: 18px; color: #b9c9aa; }
.nav-item:hover { background: #ffffff0d; color: #fff9ee; }
.nav-item.active { background: #f3efd9; color: #2b493a; box-shadow: 0 2px 4px #13281d24; }
.nav-item.active svg { color: #3a5944; }
.nav-item:focus-visible { outline-color: #e8d497; }
.nav-count { display: inline-grid; place-items: center; min-width: 24px; height: 23px; border-radius: 7px; margin-left: auto; font-size: 10px; background: #cdd7ba; color: #34543b; font-weight: 700; }
.sidebar-bottom { margin-top: auto; padding-top: 25px; }
.sidebar-bottom .nav-item { color: #c1d0b9; font-size: 14px; min-height: 44px; }
.sidebar-footer { border-top: 1px solid #d6e5c321; margin: 16px 12px 0; padding-top: 17px; color: #b7c6ac; display: flex; align-items: center; gap: 8px; font-size: 10px; }
.sidebar-footer > span:last-child { margin-left: auto; font-size: 9px; opacity: .8; }
.online-dot, .local-status i { width: 6px; height: 6px; border-radius: 50%; background: #afc88c; display: inline-block; flex-shrink: 0; }
.sidebar .owner-active { color: #e5edc7; background: #ffffff09; }
.storage-mini { margin: 26px 13px 24px; padding: 17px 0 0; border-top: 1px solid #d6e5c323; display: block; }
.storage-mini > span:first-child { display: block; color: #bac9ae; font-size: 9px; font-weight: 650; letter-spacing: 1px; }
.storage-mini > strong { display: block; margin: 7px 0 10px; color: #e6ecd9; font-size: 11px; font-weight: 500; font-variant-numeric: tabular-nums; }
.storage-meter { display: block; width: 100%; height: 5px; border-radius: 12px; overflow: hidden; background: #d9dfcd; box-shadow: inset 0 1px 2px #333d2510; }
.storage-meter i { display: block; height: 100%; background: #5f7b4c; border-radius: inherit; transition: width 200ms var(--ease); }
.sidebar .storage-meter { background: #57705c; }
.sidebar .storage-meter i { background: #c0d09e; }
.storage-mini.near-limit .storage-meter i, .storage-meter.near-limit i { background: #bb8c38; }
.sidebar-session { margin: 0 12px 20px; padding: 13px 14px; border: 1px solid #9db9875c; border-radius: 12px; background: #203e32; }
.sidebar-session strong { display: block; color: #e6edc4; font-size: 17px; letter-spacing: 3px; font-variant-numeric: tabular-nums; }
.sidebar-session span { font-size: 10px; color: #bdcdb0; }
.main-shell { width: calc(100% - var(--sidebar-width)); margin-left: var(--sidebar-width); min-width: 0; display: flex; flex-direction: column; }
.topbar { min-height: 84px; padding: 18px 44px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid #deded0; }
.breadcrumb { display: flex; align-items: center; gap: 11px; font-size: 11px; color: #6e7265; }
.breadcrumb > span { color: #6f7264; }
.breadcrumb strong { font-weight: 600; color: #4b5346; }
.topbar-actions { display: flex; align-items: center; gap: 17px; }
.local-status { display: flex; align-items: center; gap: 7px; color: #69725c; font-size: 10px; white-space: nowrap; }
.local-status i { background: #7e965b; box-shadow: 0 0 0 4px #e6e9d9; }
.room-top-button { display: flex; gap: 9px; align-items: center; padding: 9px 14px; min-height: 44px; border: 1px solid var(--line-strong); border-radius: 11px; font-size: 12px; font-weight: 650; color: var(--accent); background: #faf7ed; box-shadow: var(--shadow); }
.room-top-button:hover { background: #e8eedd; border-color: #b4c0a6; }
.room-top-button svg { width: 17px; height: 17px; }
.room-top-button > span:last-child { color: #697553; margin-left: 3px; }
.avatar { display: grid; place-items: center; min-width: 44px; height: 44px; border: 1px solid #c4cdb3; border-radius: 50%; color: #546842; background: #e5e9d8; font-size: 11px; font-weight: 750; }
.avatar:hover { background: #d5dfc4; }
.icon-button { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; width: 44px; height: 44px; padding: 10px; border-radius: 10px; color: var(--text-muted); }
.icon-button:hover { color: var(--accent); background: var(--accent-soft); }
.icon-button:active { transform: scale(.95); }
.icon-button svg { width: 19px; height: 19px; }
.icon-button.mobile-menu { display: none; }
main { width: 100%; max-width: 1500px; margin: 0 auto; padding: 36px 44px 0; flex: 1; }
#main-content:focus { outline: none; }
#main-content > :first-child { animation: page-enter 200ms var(--ease) both; }
@keyframes page-enter { from { opacity: .3; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
.main-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; max-width: 1500px; width: 100%; margin: 26px auto 0; padding: 24px 44px; color: #6c7262; font-size: 10px; }
.footer-spark { color: #68754e; font-size: 17px; margin-left: 7px; }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 28px; }
.eyebrow { margin-bottom: 10px; font-size: 9px; font-weight: 700; letter-spacing: 1.6px; color: #6b7253; }
.page-heading h1 { font-family: Georgia, 'Times New Roman', serif; font-weight: 400; letter-spacing: -1.3px; font-size: clamp(29px, 3vw, 41px); line-height: 1.2; margin: 0 0 11px; color: #354232; }
.page-heading p { font-size: 12px; line-height: 1.8; margin: 0; color: var(--text-muted); }
.page-heading > .button { flex-shrink: 0; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 44px; padding: 11px 18px; border: 1px solid transparent; border-radius: 11px; font-size: 12px; font-weight: 650; line-height: 1.5; text-align: center; }
.button svg { width: 17px; height: 17px; }
.button.primary { color: #fffdf4; background: var(--accent); border-color: var(--accent); box-shadow: 0 3px 6px #25463716, inset 0 1px 0 #ffffff1a; }
.button.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); box-shadow: 0 5px 9px #25463722; }
.button.secondary { background: #fcf9ef; color: #40523c; border-color: #cdd2bd; box-shadow: var(--shadow-raised); }
.button.secondary:hover { background: #edf0df; border-color: #b6c2a4; }
.button.quiet { color: #52674a; background: #ecefdf; border-color: transparent; }
.button.quiet:hover { background: #dfe7d1; }
.button.danger { background: var(--coral); color: #fffaf2; border-color: var(--coral); box-shadow: 0 3px 6px #ad49251a; }
.button.danger:hover { background: var(--coral-hover); border-color: var(--coral-hover); }
.button:active { transform: translateY(1px); box-shadow: inset 0 1px 3px #2b3d261f; }
.button.small { min-height: 44px; padding: 9px 12px; font-size: 12px; border-radius: 9px; }
.button.full { width: 100%; }
.text-button, .subtle-link { min-height: 44px; display: inline-flex; align-items: center; gap: 7px; padding: 7px 2px; color: var(--accent); font-size: 12px; font-weight: 650; }
.text-button:hover, .subtle-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.back-link { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 0; margin: -8px 0 15px; color: #657359; font-size: 12px; }
.back-link:hover { color: var(--accent); }
.back-link svg { width: 16px; height: 16px; }
.library-intro { display: flex; align-items: center; gap: 26px; justify-content: space-between; padding: 1px 0 25px; }
.library-intro .page-heading { margin-bottom: 0; }
.library-welcome { padding: 5px 0; min-width: 0; }
.library-welcome h1 { font-family: Georgia, 'Times New Roman', serif; font-size: clamp(31px, 3.1vw, 44px); line-height: 1.2; font-weight: 400; letter-spacing: -1.3px; color: #354232; margin: 0 0 17px; }
.library-welcome > p { color: var(--text-muted); font-size: 13px; line-height: 1.9; margin: 0 0 18px; }
.intro-footnote { display: inline-flex; align-items: center; gap: 7px; color: #6a725c; font-size: 10px; }
.intro-footnote svg { color: #65744e; width: 14px; height: 14px; }
.library-note, .library-coop, .cooperative-note { max-width: 280px; padding: 16px 19px; border: 1px solid #d7dec7; border-radius: 14px; background: #edf0df; color: #59684d; font-size: 11px; line-height: 1.7; }
.library-note strong, .library-coop strong, .cooperative-note strong { display: block; margin-bottom: 4px; color: #40563a; font-size: 12px; }
.library-note svg, .library-coop svg, .cooperative-note svg { color: #5c764a; }
.library-coop { flex-shrink: 0; width: 265px; padding: 22px; position: relative; box-shadow: inset 0 1px 0 #fffdf29c; }
.library-coop h2 { color: #526941; font-size: 15px; letter-spacing: -.3px; margin: 11px 0 7px; }
.library-coop > p { color: #647354; font-size: 12px; line-height: 1.9; margin: 0 0 17px; }
.library-coop .button { font-size: 12px; width: 100%; padding-left: 12px; padding-right: 12px; }
.library-coop .button svg { color: #e2eace; width: 14px; height: 14px; }
.coop-symbol { display: inline-grid; place-items: center; width: 39px; height: 39px; border: 1px solid #bccfa1; border-radius: 50%; background: #f6f8eb; box-shadow: var(--shadow); }
.coop-symbol svg { width: 20px; height: 20px; }
.sidebar-note { padding: 20px 13px 24px; color: #b9cda3; }
.sidebar-note .mini-orbit { display: block; font-size: 31px; line-height: 1; margin-bottom: 10px; color: #c3d3a1; }
.sidebar-note p { font-family: Georgia, 'Times New Roman', serif; color: #d7e3c4; font-size: 18px; line-height: 1.55; margin: 0; }
.library-intro > .button { flex-shrink: 0; }
.catalog-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 3px 0 22px; }
.tabs { display: flex; align-items: center; gap: 4px; padding: 4px; background: #eae9db; box-shadow: var(--shadow-inset); border: 1px solid #dedfcf; border-radius: 12px; }
.tab { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 8px 13px; border-radius: 9px; white-space: nowrap; color: #6a725d; font-size: 12px; font-weight: 600; }
.tab:hover { color: var(--accent); background: #f5f4e9; }
.tab.active, .tab[aria-selected='true'] { background: #fcfaf0; color: #365235; box-shadow: 0 2px 4px #5d513014, inset 0 1px 0 #ffffffb3; }
.tab-count { min-width: 21px; height: 20px; padding: 1px 6px; display: inline-grid; place-items: center; border-radius: 6px; background: #e6ead5; font-size: 9px; font-weight: 750; color: #596b42; }
.search-box { display: flex; align-items: center; gap: 10px; min-height: 46px; width: 250px; min-width: 0; padding: 0 13px; border: 1px solid #d1d4c0; background: #faf8f0; border-radius: 11px; box-shadow: var(--shadow-inset); }
.search-box:focus-within { border-color: #768d66; outline: 2px solid #b5c79e5c; outline-offset: 2px; }
.search-box > svg { width: 17px; height: 17px; color: #6c7260; }
.search-box input { width: 100%; min-width: 0; min-height: 44px; padding: 10px 0; font-size: 16px; border: 0; border-radius: 0; background: none; box-shadow: none; outline: none; }
.search-box input:focus-visible { outline: none; }
.pack-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 21px; }
.pack-card { position: relative; min-width: 0; border: 1px solid #d9ddcb; border-radius: var(--radius); background: #fcfaf1; overflow: hidden; box-shadow: var(--shadow-raised); transition: border-color 180ms var(--ease), box-shadow 180ms var(--ease), transform 180ms var(--ease); }
.pack-card:hover { border-color: #a8b792; box-shadow: 0 8px 20px #48553413, 0 2px 5px #4855340d; transform: translateY(-3px); }
.pack-card:focus-within { border-color: #839c6b; box-shadow: 0 0 0 3px #b9c7a45c; }
.pack-open { display: block; width: 100%; height: 100%; min-height: 44px; padding: 0; text-align: left; }
.pack-open:focus-visible { outline: 3px solid #9c772e; outline-offset: -4px; border-radius: var(--radius); }
.pack-cover { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #e0e2d2; border-bottom: 1px solid #d7dbc9; }
.pack-cover img { display: block; height: 100%; width: 100%; object-fit: cover; }
.pack-language, .pack-duration { position: absolute; display: inline-flex; align-items: center; justify-content: center; gap: 5px; padding: 4px 7px; border-radius: 6px; font-size: 9px; font-weight: 650; line-height: 1.5; box-shadow: 0 1px 4px #00000014; }
.pack-language { top: 11px; left: 11px; color: #334731; background: #fcfaede8; backdrop-filter: blur(6px); }
.pack-duration { right: 10px; bottom: 10px; color: #fffdf3; background: #253529db; }
.pack-duration svg { width: 11px; height: 11px; }
.pack-play { position: absolute; display: grid; place-items: center; inset: 0; pointer-events: none; }
.pack-play > span { display: grid; place-items: center; width: 46px; height: 46px; border: 1px solid #ffffffb0; border-radius: 50%; background: #fcfaf0ec; color: var(--accent); opacity: 0; transform: scale(.92); transition: opacity 160ms var(--ease), transform 180ms var(--ease); box-shadow: 0 3px 12px #00000020; }
.pack-play svg { width: 18px; height: 18px; margin-left: 3px; }
.pack-card:hover .pack-play > span, .pack-card:focus-within .pack-play > span { opacity: 1; transform: scale(1); }
.pack-info { padding: 16px 17px 14px; }
.pack-info h3 { color: #343e30; font-size: 15px; font-weight: 750; line-height: 1.6; margin: 0 0 8px; min-height: 21px; overflow-wrap: anywhere; }
.pack-info > p { color: #6d7162; display: flex; justify-content: space-between; gap: 8px; font-size: 11px; margin: 0 0 17px; overflow-wrap: anywhere; }
.pack-size { color: #6e7263; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pack-info-bottom { display: flex; align-items: center; flex-wrap: wrap; gap: 13px; font-size: 11px; color: #6b725e; border-top: 1px solid #e3e6d7; padding-top: 12px; }
.pack-info-bottom > span { display: inline-flex; align-items: center; gap: 5px; }
.pack-info-bottom svg { width: 13px; height: 13px; color: #68715a; }
.pack-cta { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 11px; font-weight: 750; color: var(--accent); margin-top: 13px; }
.pack-cta svg { width: 15px; height: 15px; }
.pack-info-bottom .pack-cta { margin: 0 0 0 auto; }
.pack-info-bottom .card-arrow { margin-left: auto; font-size: 18px; color: #4e7148; }
.library-description { margin: 25px 0 0; font-size: 10px; color: #6c7162; line-height: 1.8; }
.library-description a { display: inline-flex; align-items: center; gap: 5px; min-height: 44px; color: var(--accent); font-weight: 650; }
.library-description a:hover { text-decoration: underline; text-underline-offset: 3px; }
.library-description svg { width: 13px; height: 13px; }

/* The studio keeps one reading order: scene, roles, record, result. */
.studio-heading { margin-bottom: 24px; align-items: flex-end; }
.studio-heading .eyebrow { display: none; }
main:has(.studio-heading) { padding-top: 22px; }
.studio-heading h1 { font-family: Manrope, system-ui, sans-serif; font-size: clamp(23px, 2.5vw, 29px); font-weight: 750; line-height: 1.4; letter-spacing: -.75px; max-width: 730px; }
.studio-heading .eyebrow { margin-bottom: 7px; }
.studio-heading p { font-size: 11px; }
.studio-steps { display: flex; gap: 0; padding: 0 0 25px; margin: 0 0 3px; list-style: none; }
.studio-step { min-width: 0; display: flex; align-items: center; gap: 9px; font-size: 11px; color: #6d715f; position: relative; }
.studio-step + .studio-step { margin-left: 22px; padding-left: 40px; }
.studio-step + .studio-step::before { content: ''; width: 24px; height: 1px; background: #cdd4bd; position: absolute; left: 0; top: 15px; }
.step-number { display: inline-grid; place-items: center; height: 30px; width: 30px; flex-shrink: 0; border: 1px solid #d2d7c3; background: #ecefdf; color: #667557; border-radius: 50%; font-size: 10px; font-weight: 700; }
.step-label { min-width: 0; display: block; font-weight: 550; }
.studio-step.active .step-number { background: var(--accent); color: #fffaf0; border-color: var(--accent); }
.studio-step.active { color: var(--accent); }
.studio-step.complete .step-number { background: #dfe8ce; color: #4c6b3f; }
.studio-steps > li { flex: 1; display: flex; align-items: center; position: relative; min-width: 0; }
.studio-steps > li + li::before { content: ''; height: 1px; background: #d2d9c1; flex: 0 1 28px; margin-right: 14px; }
.studio-steps .studio-step { width: 100%; min-height: 52px; border-radius: 9px; padding: 5px 6px; text-align: left; }
.studio-steps .studio-step:hover { background: #edf0df; }
.step-label small { display: block; margin-top: 1px; color: #6a745a; font-size: 10px; font-weight: 400; white-space: nowrap; }
.studio-heading-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.studio-grid { display: grid; grid-template-columns: minmax(0, 1fr) 288px; grid-template-areas: "video roles" "scene roles" "transcript mic"; gap: 18px 21px; align-items: start; }
.studio-grid .video-panel { grid-area: video; }
.studio-grid .scene-panel { grid-area: scene; margin-top: 0; }
.studio-grid .roles-panel { grid-area: roles; }
.studio-grid .mic-panel { grid-area: mic; margin-top: 0; }
.studio-grid .record-zone { margin: 0; }
.studio-grid .transcript-panel { grid-area: transcript; margin-top: 0; }
.studio-main, .studio-side { min-width: 0; }
.panel { padding: 20px; border: 1px solid #d8ddca; border-radius: 15px; background: #fcfaf3; box-shadow: var(--shadow); }
.panel h2, .section-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12px; font-weight: 750; line-height: 1.6; margin: 0 0 16px; color: #414d38; }
.panel h2 > span, .section-title > span { font-size: 10px; font-weight: 500; color: #6b725f; }
.panel-title { color: #354630 !important; font-size: 13px !important; font-weight: 750 !important; margin-right: auto; }
.panel h2 svg { color: #63754e; width: 18px; height: 18px; }
.section-kicker { font-size: 10px; color: #6a7459; font-weight: 650; letter-spacing: 1px; }
.video-panel { overflow: hidden; border-radius: 15px; border: 1px solid #d2d8c4; background: #202920; box-shadow: 0 4px 12px #44503113; }
.video-wrap { width: 100%; position: relative; aspect-ratio: 16 / 9; max-height: max(230px, calc(100dvh - 540px)); display: flex; justify-content: center; align-items: center; background: #141b17; }
.video-wrap video { width: 100%; height: 100%; display: block; object-fit: contain; background: #141b17; }
.video-wrap:fullscreen { aspect-ratio: auto; width: 100%; height: 100%; }
.video-status { position: absolute; left: 13px; top: 13px; display: flex; align-items: center; gap: 6px; padding: 5px 9px; color: #faf9ee; background: #263b30d9; border: 1px solid #ffffff25; border-radius: 6px; font-size: 9px; font-weight: 600; letter-spacing: .2px; backdrop-filter: blur(4px); }
.video-status > svg { width: 12px; height: 12px; }
.video-status.recording { color: #fff9f0; background: #a84a36e8; border-color: #dc9684; }
.recording-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #fff9ee; animation: recording-pulse 1s infinite; }
.video-captions { position: absolute; bottom: 16px; left: 15px; right: 15px; display: flex; flex-direction: column; align-items: center; gap: 5px; pointer-events: none; }
.video-caption { color: #fffdf4; background: #17271fe8; border: 1px solid #ffffff24; border-radius: 6px; padding: 5px 10px; max-width: 100%; font-size: 13px; line-height: 1.6; text-align: center; text-shadow: 0 1px 2px #00000030; }
.video-caption.yours { border-left: 3px solid #d2eaa4; }
.video-caption small { font-size: 10px; font-weight: 700; color: #d3e7ac; margin-right: 7px; }
.video-controls { display: flex; align-items: center; gap: 9px; padding: 6px 9px; background: #edf0e2; border-top: 1px solid #d2d8c4; }
.video-controls .icon-button { color: #5c7350; }
.video-controls .icon-button:hover { background: #dce5ce; }
.video-controls .icon-button svg { width: 18px; height: 18px; }
.video-time { color: #677259; font-size: 10px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.video-progress { flex: 1; width: 100%; min-width: 25px; height: 4px; min-height: 24px; border: 0; border-radius: 0; background: transparent; accent-color: #6e8d54; }
.countdown { display: grid; place-items: center; position: absolute; inset: 0; color: #fffdf0; background: #183a2775; font-size: 70px; font-weight: 750; text-shadow: 0 3px 10px #00000024; backdrop-filter: blur(2px); }
.scene-panel { margin-top: 18px; }
.scene-inputs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.field-label { display: block; font-size: 10px; letter-spacing: .7px; font-weight: 650; color: #6b725c; margin-bottom: 7px; }
.scene-inputs input { width: 100%; min-width: 0; font-size: 16px; font-variant-numeric: tabular-nums; }
.scene-presets { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-top: 13px; }
.pill-button { min-height: 44px; padding: 7px 10px; border: 1px solid #dce0ce; border-radius: 8px; color: #6b735c; background: #f5f4e8; font-size: 12px; font-weight: 600; }
.pill-button:hover { background: #e8edd9; border-color: #bdc9a9; color: var(--accent); }
.pill-button.active { border-color: #a9bd97; background: #e6ecd8; color: #46613d; box-shadow: inset 0 1px 3px #5d6c3610; }
.pill-button svg { width: 12px; height: 12px; margin-left: 4px; }
.scene-note { font-size: 13px; line-height: 1.8; color: #6b725e; margin: 12px 0 0; }
.roles-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.roles-heading h2 { margin-bottom: 0; }
.roles-heading .text-button { min-height: 32px; padding: 0; }
.roles-panel > .scene-note { margin-top: 7px; margin-bottom: 12px; }
.roles-list { max-height: 310px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #c1cbb0 #f7f5e9; }
.role-option { display: flex; align-items: center; gap: 9px; min-height: 54px; padding: 10px 2px; border-bottom: 1px solid #e5e7da; cursor: pointer; border-radius: 5px; }
.role-option:last-child { border-bottom: 0; }
.role-option:hover { background: #f1f3e6; }
.role-option.selected { background: #f1f4e7; }
.role-option input { position: absolute; opacity: 0; width: 1px; height: 1px; min-height: 0; padding: 0; pointer-events: none; }
.role-check { display: inline-grid; place-items: center; width: 17px; height: 17px; border: 1px solid #c2ccb0; border-radius: 5px; color: transparent; background: #f5f6e9; box-shadow: var(--shadow-inset); font-size: 10px; font-weight: 750; flex-shrink: 0; }
.role-option:has(input:checked) .role-check { background: #4f7240; border-color: #4f7240; color: white; box-shadow: none; }
.role-option:has(input:checked) .role-name { color: #3f5f31; font-weight: 700; }
.role-option:has(input:focus-visible) { outline: 2px solid #9c772e; outline-offset: -2px; }
.role-avatar { width: 29px; height: 29px; display: inline-grid; place-items: center; flex-shrink: 0; background: #dbe3c9; color: #4f693b; border: 1px solid #d0dabe; border-radius: 50%; font-size: 10px; font-weight: 650; }
.role-tone-0 { background: #e8dfca; color: #866c46; border-color: #ded1b4; }
.role-tone-1 { background: #dce7cd; color: #5e763e; border-color: #d2dfc0; }
.role-tone-2 { background: #e8dfeb; color: #7e6788; border-color: #ddd0e0; }
.role-tone-3 { background: #e9e4c7; color: #77723e; border-color: #ded7b3; }
.role-tone-4 { background: #dde4e8; color: #5f727d; border-color: #cfdbe1; }
.role-name { flex: 1; min-width: 0; font-size: 11px; line-height: 1.6; overflow-wrap: anywhere; }
.role-count { color: #6a7060; font-size: 9px; margin-left: 3px; }
.role-select { max-width: 108px; min-width: 80px; width: 100%; font-size: 16px; padding: 7px; min-height: 44px; border-radius: 7px; }
.mic-panel { margin-top: 17px; }
.mic-panel h2 { justify-content: flex-start; gap: 8px; margin-bottom: 16px; }
.effect-select { width: 100%; font-size: 16px; }
.mic-line { display: flex; align-items: center; gap: 6px; font-size: 9px; color: #69735c; margin-top: 16px; }
.mic-line > svg { width: 13px; height: 13px; }
.mic-meter { flex: 1; min-width: 24px; height: 5px; border-radius: 5px; overflow: hidden; background: #dce2d0; }
.mic-meter i { display: block; height: 100%; width: 0; background: #75924f; transition: width 100ms linear; }
.studio-status { display: flex; align-items: center; gap: 6px; min-height: 22px; font-size: 10px; line-height: 1.6; color: #6a725d; margin: 5px 0 0; }
.record-zone {
  position: fixed;
  z-index: 35;
  bottom: 18px;
  left: calc(var(--sidebar-width) + 44px);
  right: 44px;
  display: grid;
  grid-template-columns: minmax(340px, 1fr) 1fr;
  grid-template-areas: "meta meta" "controls help";
  gap: 9px 22px;
  padding: 14px 20px 17px;
  margin: 0;
  border: 1px solid #cdd2bd;
  border-radius: 15px;
  background: #f9f5eaf7;
  backdrop-filter: blur(12px);
  box-shadow: 0 7px 30px #35432921, 0 2px 8px #3543290c, inset 0 1px 0 #ffffffd9;
}
.record-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.record-zone .record-controls { grid-area: controls; margin: 0; }
body:has(.record-zone) .toast-viewport { bottom: 155px; }
html:has(.record-zone) { scroll-padding-bottom: 155px; }
main:has(.record-zone) :is(input, select, button, a) { scroll-margin-bottom: 155px; }
.record-zone :is(input, select, button, a) { scroll-margin-bottom: 0 !important; }
[tabindex="-1"]:focus { scroll-margin-bottom: 155px; }
.record-zone .record-help { grid-area: help; margin: 0; align-self: center; max-width: 540px; }
.record-zone-heading { grid-area: meta; display: flex; align-items: center; flex-wrap: wrap; gap: 7px 15px; margin-bottom: 13px; }
.record-zone-heading .eyebrow { font-size: 9px; margin: 0; }
#selected-roles-summary { margin-left: auto; color: #6b725e; font-size: 10px; }
.record-controls > .button.primary { flex: 1; min-width: 170px; background: var(--coral); border-color: var(--coral); box-shadow: 0 3px 6px #a740251a, inset 0 1px 0 #ffffff21; }
.record-controls > .button.primary:hover { background: var(--coral-hover); border-color: var(--coral-hover); }
.record-controls > .button { min-height: 48px; }
.record-help { font-size: 12px; line-height: 1.9; color: #6d7261; margin: 11px 0 0; max-width: 750px; }
body.recording .scene-panel input, body.recording .scene-panel button, body.recording .role-option, body.recording .effect-select { pointer-events: none; opacity: .5; }
body.recording .record-zone { border-color: #ce9b83; background: #f2e9dd; }
.transcript-panel { margin-top: 20px; padding: 0; overflow: hidden; }
.transcript-heading { padding: 17px 20px 14px; background: #f5f4e8; border-bottom: 1px solid #dce1ce; }
.transcript-heading h2 { margin: 0; }
.transcript-legend { display: inline-flex; align-items: center; gap: 6px; font-size: 9px; color: #62744c; margin-top: 4px; }
.transcript-legend i { height: 5px; width: 5px; border-radius: 50%; background: #7b9c53; }
.cue-list { max-height: 280px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #c1cbb0 #f7f5e9; }
.cue-row { display: flex; align-items: flex-start; gap: 12px; width: 100%; min-height: 56px; padding: 14px 19px; text-align: left; border-top: 1px solid #e8e9de; border-left: 3px solid transparent; }
.cue-row:first-child { border-top: 0; }
.cue-row:hover { background: #f0f2e3; }
.cue-row.active { background: #e7edda; border-left-color: #7d985c; }
.cue-time { width: 35px; min-width: 35px; color: #6c7261; font-size: 9px; font-variant-numeric: tabular-nums; padding-top: 2px; }
.cue-copy { flex: 1; min-width: 0; }
.cue-role { display: block; margin-bottom: 3px; color: #6a715d; font-size: 9px; font-weight: 650; }
.cue-text { display: block; font-size: 13px; line-height: 1.7; color: #535d46; overflow-wrap: anywhere; }
.cue-indicator { width: 5px; height: 5px; margin-top: 6px; border-radius: 50%; background: #c4ccb6; flex-shrink: 0; }
.cue-row.selected .cue-role { color: #4b6b36; }
.cue-row.selected .cue-indicator { background: #698e45; }
.takes-section { margin-top: 28px; padding-bottom: 133px; }
.section-title { font-size: 13px; margin-bottom: 17px; }
.take-list { display: flex; flex-direction: column; gap: 11px; }
.take-card { display: flex; align-items: center; gap: 14px; padding: 17px 19px; background: #fcfaf2; border: 1px solid #d9dfca; border-radius: 13px; box-shadow: var(--shadow); }
.take-card.active { border-color: #a9bc91; background: #f1f4e5; }
.take-icon { width: 40px; height: 40px; display: grid; place-items: center; flex-shrink: 0; background: #e8eddc; color: #61764c; border-radius: 10px; }
.take-icon svg { width: 20px; height: 20px; }
.take-copy { flex: 1; min-width: 0; }
.take-copy strong { display: block; font-size: 12px; font-weight: 700; color: #46583b; overflow-wrap: anywhere; }
.take-copy small { display: block; margin-top: 4px; font-size: 9px; line-height: 1.7; color: #6c7361; overflow-wrap: anywhere; }
.take-actions { display: flex; align-items: center; gap: 6px; }
.take-actions .button { font-size: 12px; padding: 9px 11px; }
.take-actions svg { width: 15px; height: 15px; }
.take-votes { color: #5f7545; font-size: 10px; white-space: nowrap; }
.take-empty { padding: 25px; border: 1px dashed #cad7b6; border-radius: 12px; background: #f2f5e8; }
.room-mix-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 5px; }
.room-banner { display: flex; align-items: center; gap: 12px; padding: 12px 17px; margin-bottom: 22px; border: 1px solid #cdd9b7; border-radius: 12px; background: #e9efdc; color: #5d734b; font-size: 11px; }
.room-banner > svg { width: 20px; height: 20px; color: #5f7646; }
.room-banner > span { flex: 1; }
.room-banner small { display: block; font-size: 10px; color: #687256; margin-top: 2px; }
.room-banner code { font-family: Manrope, sans-serif; font-size: 16px; font-weight: 750; letter-spacing: 2px; color: #436a37; }

/* Pack collection, portable downloads and owner management. */
.storage-heading { margin-bottom: 26px; }
.storage-overview { padding: 22px 25px; background: #eaf0df; border-color: #d2dbc0; }
.storage-overview-top { display: flex; gap: 15px; align-items: center; margin-bottom: 18px; }
.storage-overview-icon { display: grid; place-items: center; width: 47px; height: 47px; flex-shrink: 0; border: 1px solid #cad7b4; border-radius: 13px; background: #f3f6e9; color: #5e7548; box-shadow: var(--shadow); }
.storage-overview-icon svg { width: 23px; height: 23px; }
.storage-overview-top .field-label { font-size: 10px; letter-spacing: 1px; margin-bottom: 3px; color: #667553; }
.storage-overview-top strong { font-size: 27px; font-weight: 750; letter-spacing: -.8px; line-height: 1.3; color: #4a633d; font-variant-numeric: tabular-nums; }
.storage-overview-top strong > span { font-size: 18px; color: #67725a; font-weight: 500; letter-spacing: -.3px; }
.storage-pack-count { color: #647553; font-size: 11px; margin-left: auto; white-space: nowrap; }
.storage-meter.large { height: 7px; background: #d2ddc1; }
.storage-meter.large i { background: #7a9556; }
.storage-overview > p { font-size: 11px; line-height: 1.9; color: #67745a; margin: 14px 0 0; max-width: 900px; }
.storage-access { display: flex; align-items: center; gap: 8px; margin: 15px 0 25px; color: #6b725e; font-size: 11px; }
.storage-access > svg { width: 15px; height: 15px; color: #64744d; }
.storage-access .text-button { margin-left: auto; font-size: 12px; white-space: nowrap; }
.storage-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.storage-toolbar .search-box { width: 300px; margin-right: auto; }
.storage-toolbar > label { font-size: 10px; color: #69715e; }
.storage-toolbar > select { font-size: 16px; min-height: 44px; border-radius: 10px; }
.storage-list { overflow: hidden; border: 1px solid #d8dfc9; background: #fcfaf2; border-radius: 15px; box-shadow: var(--shadow); }
.storage-list-header, .storage-row { display: grid; grid-template-columns: minmax(0, 1fr) 90px 132px 153px; align-items: center; gap: 16px; padding: 17px 20px; }
.storage-list-header { background: #eef1e2; color: #697359; font-size: 10px; padding-top: 12px; padding-bottom: 12px; }
.storage-row { min-height: 95px; border-top: 1px solid #e1e6d4; }
.storage-pack-title { min-width: 0; }
.storage-pack-title > a { display: block; font-size: 13px; font-weight: 700; color: #485d3c; line-height: 1.7; overflow-wrap: anywhere; }
.storage-pack-title > a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.storage-pack-title > small { display: block; margin-top: 5px; font-size: 9px; color: #697260; }
.storage-pack-title > img, .storage-pack-cover { width: 48px; height: 36px; border-radius: 6px; object-fit: cover; margin-right: 12px; float: left; }
.storage-pack-size { font-size: 11px; color: #687555; font-variant-numeric: tabular-nums; white-space: nowrap; }
.storage-pack-date { font-size: 10px; line-height: 1.8; color: #697160; }
.storage-actions { display: flex; align-items: center; justify-content: flex-end; gap: 5px; }
.download-pack.button { font-size: 12px; min-width: 100px; gap: 6px; padding: 8px 10px; background: #edf1df; color: #5b7645; }
.download-pack.button:hover { background: #e1e9cf; }
.download-pack svg { width: 14px; height: 14px; }
.storage-delete { width: 44px; min-width: 44px; color: #846958; }
.storage-delete:hover { color: #a74d36; background: #f7e9df; }
.storage-delete svg { width: 16px; height: 16px; }
.busy-badge, .missing-pack-badge { display: inline-block; padding: 3px 7px; border: 1px solid #dfd2af; border-radius: 5px; font-size: 8px; font-weight: 600; color: #836d3b; background: #f3edd9; }
.missing-pack-badge { margin-left: 8px; vertical-align: middle; }
.storage-history { margin-top: 23px; font-size: 11px; color: #69735a; }
.storage-history > summary { cursor: pointer; min-height: 44px; padding: 12px 0; list-style-position: inside; }
.storage-history > summary > span { background: #e8eeda; padding: 2px 6px; border-radius: 5px; font-size: 9px; margin-left: 5px; }
.storage-history > ul { padding: 0; margin: 0; list-style: none; }
.storage-history li { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 13px 0; border-top: 1px solid #dde4cd; }
.storage-history strong { display: block; color: #69745c; font-size: 11px; font-weight: 600; }
.storage-history small { display: block; color: #6a7260; font-size: 9px; margin-top: 4px; }
.storage-history li > span { white-space: nowrap; font-size: 10px; font-variant-numeric: tabular-nums; }
.packs-guide { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px; margin: 24px 0 20px; }
.packs-guide > h2 { grid-column: 1 / -1; font-size: 14px; margin: 0 0 1px; color: #4d6040; }
.guide-card { position: relative; padding: 19px; border: 1px solid #dae0cb; border-radius: 14px; background: #fcfaf2; box-shadow: var(--shadow); }
.guide-number { display: inline-grid; place-items: center; height: 27px; width: 27px; border-radius: 8px; border: 1px solid #cfdabb; background: #eaf0dd; font-size: 10px; font-weight: 750; color: #66764c; margin-bottom: 11px; }
.guide-card h3 { font-size: 12px; color: #526a40; margin: 0 0 8px; }
.guide-card h2 { font-size: 14px; color: #526a40; margin: 0 0 9px; font-weight: 750; letter-spacing: -.25px; }
.guide-card p { font-size: 13px; line-height: 1.9; color: #69725d; margin: 0; }
.guide-card > div > .button { margin-top: 17px; }
.owner-only-hint { display: block; margin-top: 8px; font-size: 9px; color: #677258; }
.pack-instructions { margin-bottom: 23px; padding: 0 3px; color: #677457; font-size: 11px; }
.pack-instructions summary { cursor: pointer; min-height: 44px; padding: 8px 0 12px; list-style-position: inside; font-weight: 600; }
.pack-instructions ol { margin: 7px 0 14px; padding-left: 23px; line-height: 1.9; }
.pack-instructions li + li { margin-top: 7px; }
.pack-instructions p { margin: 11px 0 19px; line-height: 1.9; }
.pack-instructions code { font-size: 10px; color: #517343; padding: 2px 5px; border-radius: 4px; background: #e8edda; overflow-wrap: anywhere; }
.guide-card a:not(.button) { text-decoration: underline; text-underline-offset: 3px; color: #5a7746; }
.guide-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 15px; }
.guide-actions .button { font-size: 12px; padding: 9px 11px; }
.guide-card code { display: inline; font-size: 10px; color: #597347; overflow-wrap: anywhere; }

/* Dialogs use Radix focus management and share the same component language. */
.modal-overlay { position: fixed; z-index: 80; inset: 0; background: #26342977; backdrop-filter: blur(5px); animation: overlay-enter 150ms var(--ease); }
.modal-window, dialog#modal { z-index: 81; width: min(560px, calc(100vw - 36px)); max-height: min(90dvh, 850px); padding: 0; border: 1px solid #e4e5d4; border-radius: 21px; background: #fcfaf2; color: var(--text); box-shadow: 0 24px 80px #16302033, 0 4px 20px #13281d1a; overflow: auto; scrollbar-width: thin; scrollbar-color: #bccb9e #fcfaf2; }
.modal-window { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); animation: modal-enter 180ms var(--ease); }
dialog#modal::backdrop { background: #26342977; backdrop-filter: blur(5px); }
.modal-header { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 19px 21px 15px 27px; border-bottom: 1px solid #e4e8d6; }
.modal-header h2 { font-size: 19px; font-weight: 750; letter-spacing: -.5px; color: #43583a; line-height: 1.5; margin: 0; }
.modal-header .icon-button { width: 44px; min-width: 44px; height: 44px; }
.modal-body { padding: 22px 27px 27px; }
.modal-description { color: #69725d; font-size: 13px; line-height: 1.9; margin: 0 0 19px; }
.modal-body label { display: block; font-size: 11px; font-weight: 600; color: #667356; margin: 16px 0 7px; }
.modal-body input:not([type='checkbox']):not([type='file']) { width: 100%; font-size: 16px; min-height: 46px; }
.modal-tabs { display: flex; gap: 8px; padding: 4px; border-radius: 12px; background: #edf0e0; margin-bottom: 20px; }
.modal-tabs .button { flex: 1; font-size: 12px; border: 0; box-shadow: none; }
.modal-tabs .button.secondary { background: none; color: #687556; }
.modal-body .button.full { width: 100%; margin-top: 18px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; margin-top: 23px; }
.modal-actions > .button { flex: 1; }
.notice { padding: 13px 15px; margin: 17px 0; border: 1px solid #d9d9bd; border-radius: 10px; color: #78704d; background: #f4f0df; font-size: 12px; line-height: 1.9; }
.notice.info { color: #607552; background: #edf2e2; border-color: #d1dfbe; }
.import-quota-note { margin-top: -2px; }
.modal-body label.import-drop, .import-drop { display: block; padding: 28px 20px; margin: 19px 0 0; border: 1px dashed #a6b78c; border-radius: 13px; color: #5c7547; background: #f1f5e6; text-align: center; cursor: pointer; transition: background 160ms var(--ease), border-color 160ms var(--ease); }
.import-drop:hover, .import-drop:focus-within { background: #e8efdb; border-color: #799b5a; }
.import-drop:focus-within { outline: 2px solid #9c772e; outline-offset: 3px; }
.import-drop svg { display: block; width: 27px; height: 27px; color: #607548; margin: 0 auto 12px; }
.import-drop strong { display: block; font-size: 12px; font-weight: 750; }
.import-drop small { display: block; margin-top: 8px; color: #697259; font-size: 10px; font-weight: 400; }
.import-drop input { position: absolute; opacity: 0; width: 1px; height: 1px; padding: 0; min-height: 0; }
.job-status { margin-top: 16px; padding: 15px 17px; font-size: 12px; line-height: 1.9; color: #64754f; background: #edf2e1; border: 1px solid #d4e0c1; border-radius: 10px; overflow-wrap: anywhere; }
.job-status > p { margin: 9px 0; }
.job-status progress { width: 100%; height: 8px; display: block; accent-color: var(--accent); border: 0; border-radius: 5px; overflow: hidden; margin: 13px 0; }
.job-status progress::-webkit-progress-bar { background: #d4dfc2; border-radius: 5px; }
.job-status progress::-webkit-progress-value { background: #779456; border-radius: 5px; }
.job-stage { display: flex; align-items: center; gap: 9px; }
#import-transfer { display: block; color: #64754e; font-size: 10px; margin-top: 8px; }
.job-status > ul { margin: 10px 0 14px; padding-left: 17px; }
.job-status .button { margin-top: 7px; }
.form-error { margin-top: 15px; padding: 12px 14px; border: 1px solid #e0bcaa; border-radius: 9px; color: #a05f43; background: #fbede3; font-size: 12px; line-height: 1.8; }
.delete-pack-summary { margin: 0 0 17px; padding: 16px 17px; border: 1px solid #e5c7b5; border-radius: 12px; background: #f9eee2; }
.delete-pack-summary > strong { display: block; color: #85694e; font-size: 13px; line-height: 1.7; overflow-wrap: anywhere; }
.delete-pack-summary > span { display: block; margin-top: 6px; color: #85684c; font-size: 11px; }
.room-code-big { padding: 16px 0 21px; font-size: 37px; font-weight: 750; letter-spacing: 7px; color: #5a7744; text-align: center; font-variant-numeric: tabular-nums; }
.room-footnote { display: flex; align-items: flex-start; gap: 7px; margin: 16px 0 0; color: #68745b; font-size: 12px; line-height: 1.8; }
.room-footnote svg { width: 14px; height: 14px; margin-top: 2px; }
.room-players-title { color: #61774e; font-size: 11px; font-weight: 650; margin: 21px 0 0; }
.join-code-input { text-transform: uppercase; letter-spacing: 3px; }
.player-list { display: flex; flex-direction: column; gap: 0; list-style: none; padding: 0; margin: 17px 0 21px; }
.player-list li { display: flex; align-items: center; gap: 10px; min-height: 54px; padding: 10px 0; border-bottom: 1px solid #e2e8d3; font-size: 11px; color: #5e764a; }
.player-list small { margin-left: auto; color: #667553; font-size: 9px; }
.help-step { display: flex; align-items: flex-start; gap: 15px; margin: 23px 0; }
.help-step > span { display: grid; place-items: center; flex-shrink: 0; width: 30px; height: 30px; border: 1px solid #cedcb8; border-radius: 9px; background: #ecf2df; color: #617546; font-size: 10px; font-weight: 750; }
.help-step h3 { color: #5b7546; font-size: 14px; margin: 2px 0 6px; }
.help-step p { color: #657256; font-size: 13px; line-height: 1.9; margin: 0; }
.toast-viewport, .toast-region { position: fixed; z-index: 100; right: 24px; bottom: 24px; width: min(400px, calc(100vw - 32px)); display: flex; flex-direction: column; gap: 10px; list-style: none; padding: 0; margin: 0; outline: none; }
.toast { display: flex; align-items: center; gap: 12px; border: 1px solid #c8d7b2; border-radius: 13px; padding: 15px 14px 15px 18px; color: #557442; background: #f6f9eb; box-shadow: 0 8px 28px #2d45251a, 0 2px 8px #2d452512; font-size: 11px; line-height: 1.8; animation: toast-enter 180ms var(--ease); }
.toast.error { color: #976147; background: #fcf1e5; border-color: #dfc2ac; }
.toast-close { display: inline-grid; place-items: center; width: 44px; min-width: 44px; height: 44px; border-radius: 8px; margin-left: auto; color: inherit; opacity: .7; }
.toast-close:hover { background: #5c7e4010; opacity: 1; }
.toast-close svg { width: 16px; height: 16px; }
.toast[data-swipe='move'] { transform: translateX(var(--radix-toast-swipe-move-x)); }
.toast[data-swipe='cancel'] { transform: translateX(0); transition: transform 160ms var(--ease); }
.toast[data-swipe='end'] { animation: toast-swipe-out 120ms var(--ease); }
.toast[data-state='closed'] { animation: toast-exit 120ms var(--ease); }
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 320px; padding: 38px 25px; text-align: center; background: #f5f5e9; border: 1px dashed #d4ddc3; border-radius: 17px; }
.empty-state > svg { width: 35px; height: 35px; color: #697553; margin-bottom: 19px; }
.empty-state h3 { color: #60774c; font-size: 17px; margin: 0 0 12px; }
.empty-state p { color: #677259; font-size: 13px; line-height: 1.9; max-width: 450px; margin: 0 0 22px; }
.loading-state { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 300px; color: #647353; font-size: 12px; }
.spinner { width: 17px; height: 17px; display: inline-block; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin 800ms linear infinite; flex-shrink: 0; }
.status-message { padding: 29px 20px; color: #687359; text-align: center; font-size: 11px; line-height: 1.9; }
.check-dot { display: inline-block; height: 5px; width: 5px; border-radius: 50%; background: #8fac66; margin-right: 5px; }
.recording-pulse { animation: recording-pulse 1s infinite; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes recording-pulse { 50% { opacity: .3; } }
@keyframes overlay-enter { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-enter { from { opacity: 0; transform: translate(-50%, -48%); } to { opacity: 1; transform: translate(-50%, -50%); } }
@keyframes toast-enter { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toast-exit { to { opacity: 0; transform: translateY(8px); } }
@keyframes toast-swipe-out { to { transform: translateX(calc(100% + 25px)); opacity: 0; } }

@media (min-width: 1700px) {
  :root { --sidebar-width: 246px; }
  .sidebar { padding-left: 21px; padding-right: 21px; }
  .pack-grid { gap: 26px; }
  .pack-info { padding: 19px 20px 17px; }
  .pack-info h3 { font-size: 15px; }
  .topbar { padding-left: 53px; padding-right: 53px; }
  main { padding-top: 43px; }
}
@media (max-width: 1250px) {
  .record-zone { left: calc(var(--sidebar-width) + 30px); right: 30px; grid-template-columns: minmax(310px, 1.1fr) 1fr; gap: 8px 16px; }
  :root { --sidebar-width: 216px; }
  .sidebar { padding-left: 12px; padding-right: 12px; }
  .brand { font-size: 22px; }
  .topbar { padding-left: 30px; padding-right: 30px; }
  main { padding: 32px 30px 0; }
  .main-footer { padding-left: 30px; padding-right: 30px; }
  .local-status { display: none; }
  .pack-grid { gap: 19px 16px; }
  .pack-info { padding: 14px 14px 13px; }
  .pack-info h3 { font-size: 15px; }
  .pack-info-bottom { gap: 10px; font-size: 9px; }
  .studio-grid { grid-template-columns: minmax(0, 1fr) 255px; gap: 17px; }
  .panel { padding: 17px; }
  .transcript-panel { padding: 0; }
  .storage-list-header, .storage-row { grid-template-columns: minmax(0, 1fr) 76px 110px 140px; gap: 12px; padding-left: 16px; padding-right: 16px; }
  .download-pack.button { min-width: 90px; padding: 9px 7px; }
  .library-note, .library-coop, .cooperative-note { max-width: 240px; }

}
@media (max-width: 1050px) {
  .record-zone { left: calc(var(--sidebar-width) + 25px); right: 25px; grid-template-columns: minmax(0, 1fr); grid-template-areas: "meta" "controls"; padding: 13px 16px 16px; gap: 8px; }
  .record-zone .record-help { display: none; }
  :root { --sidebar-width: 202px; }
  .brand { font-size: 20px; gap: 7px; margin-left: 6px; }
  .brand-symbol { width: 30px; height: 35px; }
  .nav-item { font-size: 14px; gap: 9px; padding-left: 11px; padding-right: 10px; }
  .nav-count { min-width: 21px; }
  .topbar { padding-left: 25px; padding-right: 25px; }
  main { padding: 29px 25px 0; }
  .main-footer { padding-left: 25px; padding-right: 25px; }
  .page-heading h1 { font-size: 33px; }
  .page-heading p { font-size: 11px; }
  .catalog-toolbar { flex-wrap: wrap; gap: 14px; }
  .catalog-toolbar .search-box { margin-left: auto; flex: 1; min-width: 155px; }
  .tab { padding: 8px 10px; font-size: 12px; }
  .pack-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 18px; }
  .pack-info h3 { font-size: 15px; }
  .studio-grid { grid-template-columns: 1fr 1fr; grid-template-areas: "video video" "scene scene" "roles mic" "transcript transcript"; }
  .studio-side { display: grid; grid-template-columns: 1fr 1fr; align-items: start; gap: 17px; }
  .studio-side > .panel { margin-top: 0; }
  .roles-list { max-height: 260px; }
  .studio-heading h1 { font-size: 25px; }
  .studio-heading > .button { padding: 10px 12px; font-size: 12px; }
  .studio-step + .studio-step { margin-left: 14px; padding-left: 31px; }
  .studio-step + .studio-step::before { width: 17px; }
  .take-card { flex-wrap: wrap; }
  .take-copy { min-width: 180px; }
  .take-actions { margin-left: auto; }
  .storage-list-header, .storage-row { grid-template-columns: minmax(0, 1fr) 70px 145px; }
  .storage-list-header > span:nth-child(3) { display: none; }
  .storage-pack-date { grid-column: 1; grid-row: 2; font-size: 9px; margin-top: -9px; }
  .storage-pack-date::before { content: 'Последний запуск: '; }
  .storage-pack-size { grid-column: 2; grid-row: 1 / 3; }
  .storage-actions { grid-column: 3; grid-row: 1 / 3; }
  .storage-row { min-height: 112px; }
  .storage-toolbar > label { display: none; }
  .storage-toolbar .search-box { flex: 1; min-width: 100px; }
  .storage-overview-top strong { font-size: 25px; }
  .packs-guide { gap: 10px; }
  .guide-card { padding: 15px; }
  .library-intro { gap: 17px; }
  .library-note, .library-coop, .cooperative-note { max-width: 220px; padding: 15px; font-size: 10px; }
  .library-note strong, .library-coop strong, .cooperative-note strong { font-size: 11px; }

  .library-welcome h1 { font-size: 35px; }
  .library-welcome > p { font-size: 13px; }
  .library-welcome > p br { display: none; }
  .library-coop { width: 220px; }
  .library-coop h2 { font-size: 15px; }
  .library-coop > p { font-size: 12px; }
  .intro-footnote { font-size: 9px; }
  .studio-heading-actions { flex-wrap: wrap; justify-content: flex-end; max-width: 190px; gap: 6px; }
  .studio-heading-actions .button { font-size: 12px; }
  .studio-steps > li + li::before { flex-basis: 14px; margin-right: 8px; }
  .step-label small { font-size: 10px; }
}
@media (max-width: 800px) {
  .breadcrumb { font-size: 10px; gap: 8px; }
  .topbar-actions { gap: 11px; }
  .room-top-button { font-size: 12px; gap: 6px; padding-left: 11px; padding-right: 11px; }
  .room-top-button > span:last-child { display: none; }
  .page-heading { align-items: flex-start; gap: 16px; }
  .page-heading h1 { font-size: 29px; }
  .page-heading > .button { font-size: 12px; padding: 10px 12px; }
  .library-intro { align-items: flex-start; }
  .library-note, .library-coop, .cooperative-note { max-width: 190px; }
  .storage-overview { padding: 20px; }
  .storage-list-header, .storage-row { grid-template-columns: minmax(0, 1fr) 66px 113px; gap: 10px; }
  .storage-pack-title > a { font-size: 13px; }
  .storage-actions { gap: 2px; }
  .download-pack.button { min-width: 70px; font-size: 12px; padding: 9px 6px; gap: 5px; }
  .download-pack svg { width: 13px; height: 13px; }
  .storage-delete { width: 40px; min-width: 40px; padding: 9px; }
  .packs-guide { grid-template-columns: 1fr; }
  .guide-card { padding: 18px 18px 18px 59px; }
  .guide-number { position: absolute; top: 18px; left: 18px; }
  .guide-card p { font-size: 13px; }
  .guide-actions { margin-top: 12px; }

}
@media (max-width: 900px) {
  .video-wrap { max-height: max(180px, calc(100dvh - 540px)); }
  .record-zone { left: 20px; right: 20px; bottom: 13px; padding: 12px 16px 14px; }
  .sidebar .sidebar-close { display: inline-flex; color: #d3dfc6; margin: -10px -7px -10px 0; }
  .sidebar-close:hover { color: #fcf8ec; background: #ffffff0f; }
  .menu-scrim { display: block; position: fixed; z-index: 39; inset: 0; background: #23372b70; backdrop-filter: blur(2px); }
  :root { --sidebar-width: 244px; }
  html { scroll-padding-top: 80px; }
  .sidebar { transform: translateX(-100%); padding: 28px 17px 18px; transition: transform 200ms var(--ease); visibility: hidden; }
  .sidebar.open { transform: translateX(0); visibility: visible; box-shadow: 15px 0 55px #15332040; }
  .sidebar.open::after { content: ''; position: fixed; right: -1px; top: 0; bottom: 0; width: 1px; background: #d5dfbd33; }
  .brand { font-size: 24px; gap: 9px; margin-left: 5px; margin-bottom: 38px; }
  .brand-symbol { width: 34px; height: 39px; }
  .nav-item { font-size: 14px; padding: 13px 12px; gap: 11px; }
  .sidebar-bottom .nav-item { font-size: 14px; }
  .sidebar-bottom { padding-top: 20px; }
  .main-shell { width: 100%; margin-left: 0; }
  .topbar { min-height: 73px; padding: 11px 20px; gap: 10px; }
  .icon-button.mobile-menu { display: inline-flex; margin-left: -9px; }
  .breadcrumb { margin-right: auto; gap: 9px; font-size: 10px; }
  .breadcrumb > span { display: none; }
  .breadcrumb > strong { font-size: 10px; max-width: 110px; line-height: 1.6; }
  .topbar-actions { gap: 9px; }
  .room-top-button { font-size: 12px; padding: 9px 11px; gap: 7px; }
  .room-top-button svg { width: 16px; height: 16px; }
  .avatar { width: 44px; height: 44px; min-width: 44px; font-size: 10px; }
  main { padding: 28px 20px 0; }
  .main-footer { padding: 22px 20px; font-size: 9px; margin-top: 23px; }
  .main-footer > span:last-child { display: none; }
  .page-heading { gap: 16px; align-items: flex-start; margin-bottom: 25px; }
  .page-heading h1 { font-size: 32px; letter-spacing: -.9px; margin-bottom: 10px; }
  .page-heading p { font-size: 11px; line-height: 1.8; }
  .eyebrow { font-size: 8px; letter-spacing: 1.3px; margin-bottom: 9px; }
  .library-intro { padding-bottom: 21px; gap: 19px; }
  .library-note, .library-coop, .cooperative-note { max-width: 240px; }
  .catalog-toolbar { gap: 12px; margin-bottom: 20px; }
  .catalog-toolbar .search-box { min-width: 180px; }
  .pack-grid { gap: 20px 14px; }
  .pack-info { padding: 14px 13px; }
  .pack-info h3 { font-size: 15px; }
  .pack-info > p { font-size: 9px; margin-bottom: 13px; }
  .pack-info-bottom { gap: 9px; font-size: 9px; }
  .pack-cta { font-size: 10px; }
  .pack-language { font-size: 8px; top: 9px; left: 9px; }
  .pack-duration { font-size: 8px; right: 8px; bottom: 8px; }
  .studio-heading h1 { font-size: 23px; letter-spacing: -.7px; }
  .studio-heading .eyebrow { font-size: 8px; }
  .studio-heading > .button { max-width: 110px; padding: 9px 11px; font-size: 12px; margin-top: 36px; }
  .studio-heading > .button svg { display: none; }
  .studio-steps { padding-bottom: 20px; }
  .studio-step { gap: 7px; font-size: 11px; }
  .studio-step + .studio-step { margin-left: 11px; padding-left: 24px; }
  .studio-step + .studio-step::before { width: 14px; top: 14px; }
  .step-number { width: 28px; height: 28px; font-size: 9px; }
  .video-controls { padding: 5px 7px; gap: 5px; }
  .video-time { font-size: 9px; }
  .video-controls .icon-button { padding: 10px; }
  .video-caption { font-size: 12px; }
  .video-captions { bottom: 13px; left: 12px; right: 12px; }
  .record-zone { padding: 17px; }
  .record-help { font-size: 12px; }
  .studio-side { grid-template-columns: 1fr 1fr; gap: 14px; }
  .roles-list { max-height: 250px; }
  .role-option { gap: 8px; }
  .role-select { max-width: 105px; }
  .scene-note { font-size: 13px; }
  .room-banner { padding: 12px 14px; flex-wrap: wrap; gap: 8px; font-size: 11px; }
  .room-banner > .button { margin-left: auto; }
  .room-banner small { font-size: 9px; }
  .take-card { padding: 15px; gap: 11px; }
  .take-copy { flex: 1; min-width: 160px; }
  .take-actions { margin-left: auto; gap: 6px; }
  .take-actions .button { font-size: 12px; }
  .storage-heading > .button { font-size: 12px; padding: 10px 11px; max-width: 126px; }
  .storage-overview-top strong { font-size: 24px; }
  .storage-overview-top strong > span { font-size: 16px; }
  .storage-overview > p { font-size: 10px; }
  .storage-access { font-size: 10px; align-items: flex-start; margin-top: 14px; margin-bottom: 22px; }
  .storage-access > svg { margin-top: 3px; }
  .storage-access .text-button { padding-top: 0; font-size: 12px; }
  .storage-toolbar { flex-wrap: wrap; gap: 10px; }
  .storage-toolbar .search-box { width: 100%; flex-basis: 100%; margin: 0; }
  .storage-toolbar > select { flex: 1; font-size: 16px; min-width: 0; }
  .storage-list-header, .storage-row { padding-left: 14px; padding-right: 14px; grid-template-columns: minmax(0, 1fr) 70px 135px; }
  .storage-pack-title > a { font-size: 13px; }
  .download-pack.button { min-width: 86px; font-size: 12px; }
  .storage-delete { width: 42px; min-width: 42px; }
  .storage-history strong { font-size: 10px; }
  .storage-history small { font-size: 8px; }
  .packs-guide { gap: 12px; margin-top: 23px; }
  .guide-card { padding-right: 20px; }

  .studio-grid { grid-template-columns: 1fr; grid-template-areas: "video" "scene" "roles" "transcript" "mic"; }
  .library-welcome h1 { font-size: 37px; }
  .library-coop { width: 230px; }
  .studio-steps .studio-step { gap: 7px; padding-left: 3px; padding-right: 3px; }
  .studio-steps > li + li::before { flex-basis: 12px; margin-right: 7px; }
  .step-label small { font-size: 10px; }
}
@media (max-width: 480px) {
  .video-wrap { max-height: none; }
  .record-zone { left: 12px; right: 12px; bottom: 10px; padding: 11px 13px 13px; gap: 8px; }
  .record-zone-heading { gap: 4px 9px; margin-bottom: 0; }
  #selected-roles-summary { font-size: 9px; max-width: 210px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .record-zone .record-controls > .button { min-height: 46px; }
  .step-label small { white-space: normal; font-size: 10px; }
  .topbar { padding: 10px 17px; gap: 4px; }
  .breadcrumb { gap: 0; font-size: 0; }
  .breadcrumb > strong { font-size: 10px; max-width: 90px; }
  .topbar-actions { gap: 8px; }
  .room-top-button { max-width: 153px; padding: 9px 11px; font-size: 12px; }
  main { padding: 25px 17px 0; }
  .page-heading { display: flex; flex-wrap: wrap; gap: 15px; margin-bottom: 24px; }
  .page-heading h1 { font-size: 33px; }
  .page-heading p { font-size: 11px; }
  .page-heading > .button { min-height: 44px; font-size: 12px; padding: 10px 14px; }
  .library-intro { display: block; padding-bottom: 20px; }
  .library-intro .page-heading { margin-bottom: 18px; }
  .library-note, .library-coop, .cooperative-note { max-width: none; padding: 14px 16px; font-size: 11px; }
  .library-note strong, .library-coop strong, .cooperative-note strong { font-size: 12px; }
  .library-intro > .button { margin-top: 16px; }
  .catalog-toolbar { display: flex; flex-direction: column; align-items: stretch; gap: 12px; }
  .tabs { justify-content: stretch; padding: 4px; width: 100%; }
  .tab { min-height: 44px; flex: 1; padding: 7px 9px; font-size: 12px; gap: 5px; }
  .tab-count { font-size: 9px; min-width: 19px; height: 19px; }
  .catalog-toolbar .search-box { width: 100%; min-width: 0; flex: none; order: -1; }
  .pack-grid { grid-template-columns: 1fr; gap: 18px; }
  .pack-info { padding: 17px 18px 16px; }
  .pack-info h3 { font-size: 15px; margin-bottom: 7px; }
  .pack-info > p { font-size: 10px; margin-bottom: 15px; }
  .pack-info-bottom { gap: 14px; font-size: 10px; }
  .pack-info-bottom svg { width: 14px; height: 14px; }
  .pack-language { font-size: 9px; top: 11px; left: 11px; }
  .pack-duration { font-size: 9px; right: 11px; bottom: 11px; }
  .pack-cta { font-size: 12px; }
  .pack-play > span { width: 46px; height: 46px; opacity: 1; background: #fcfaf0e8; transform: scale(1); }
  .library-description { font-size: 10px; margin-top: 20px; }
  .studio-heading { display: block; margin-bottom: 20px; }
  .studio-heading h1 { font-size: 24px; line-height: 1.45; }
  .studio-heading > .button { margin-top: 16px; max-width: none; }
  .studio-heading > .button svg { display: block; }
  .studio-steps { justify-content: space-between; gap: 4px; padding-bottom: 18px; }
  .studio-step { flex-direction: column; gap: 5px; align-items: center; text-align: center; font-size: 11px; flex: 1; }
  .studio-step + .studio-step { margin-left: 0; padding-left: 0; }
  .studio-step + .studio-step::before { width: 25px; left: -14px; top: 14px; }
  .step-label { line-height: 1.4; }
  .step-number { width: 29px; height: 29px; }
  .studio-side { grid-template-columns: 1fr; gap: 16px; }
  .panel { padding: 18px; }
  .panel h2, .section-title { font-size: 12px; }
  .panel h2 > span, .section-title > span { font-size: 9px; }
  .transcript-panel { padding: 0; }
  .transcript-heading { padding: 16px 17px; }
  .roles-list { max-height: 255px; }
  .role-option { min-height: 55px; gap: 11px; }
  .role-name { font-size: 12px; }
  .role-avatar { width: 31px; height: 31px; font-size: 11px; }
  .role-count { font-size: 10px; }
  .role-select { max-width: 125px; }
  .video-controls { gap: 3px; padding: 4px; }
  .video-controls .icon-button { min-width: 40px; width: 40px; height: 44px; }
  .video-controls .icon-button svg { width: 16px; height: 16px; }
  .video-time { font-size: 8px; }
  .video-progress { min-width: 23px; }
  .video-status { top: 10px; left: 10px; font-size: 8px; }
  .video-captions { bottom: 10px; left: 9px; right: 9px; gap: 3px; }
  .video-caption { font-size: 11px; padding: 4px 7px; }
  .video-caption small { font-size: 8px; }
  .countdown { font-size: 60px; }
  .scene-inputs { gap: 10px; }
  .field-label { font-size: 10px; letter-spacing: .4px; }
  .scene-presets { gap: 6px; }
  .pill-button { padding: 8px 10px; font-size: 12px; }
  .scene-note { font-size: 13px; }
  .record-zone { margin: 0; padding: 13px; }
  .record-controls { gap: 9px; }
  .record-controls > .button.primary { min-width: 0; }
  .record-controls > .button { font-size: 12px; padding: 11px 12px; }
  .record-help { font-size: 12px; }
  .cue-row { padding: 13px 15px 13px 12px; gap: 8px; }
  .cue-time { width: 29px; min-width: 29px; font-size: 8px; }
  .cue-text { font-size: 13px; }
  .cue-role { font-size: 9px; }
  .take-card { gap: 11px; padding: 15px; }
  .take-icon { width: 35px; height: 35px; border-radius: 9px; }
  .take-icon svg { width: 18px; height: 18px; }
  .take-copy { flex-basis: calc(100% - 46px); min-width: 0; }
  .take-copy strong { font-size: 12px; }
  .take-copy small { font-size: 9px; }
  .take-actions { width: 100%; margin-left: 46px; flex-wrap: wrap; gap: 5px; }
  .take-actions .button { min-height: 44px; }
  .room-banner { gap: 9px; font-size: 10px; }
  .room-banner > svg { width: 17px; height: 17px; }
  .room-banner code { font-size: 15px; }
  .room-banner small { font-size: 9px; }
  .storage-heading > .button { max-width: none; }
  .storage-overview { padding: 18px; }
  .storage-overview-top { gap: 11px; flex-wrap: wrap; margin-bottom: 17px; }
  .storage-overview-icon { width: 40px; height: 40px; border-radius: 11px; }
  .storage-overview-icon svg { width: 20px; height: 20px; }
  .storage-overview-top strong { font-size: 23px; }
  .storage-overview-top strong > span { font-size: 15px; }
  .storage-overview-top .field-label { font-size: 10px; letter-spacing: .6px; }
  .storage-pack-count { font-size: 10px; }
  .storage-overview > p { font-size: 10px; }
  .storage-access { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 22px; font-size: 10px; }
  .storage-access > span { flex: 1; }
  .storage-access .text-button { width: 100%; margin-left: 21px; justify-content: flex-start; min-height: 36px; }
  .storage-toolbar > select { font-size: 16px; }
  .storage-list-header { display: none; }
  .storage-row { grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 17px; min-height: 140px; }
  .storage-row:first-of-type { border-top: 0; }
  .storage-pack-title { grid-column: 1 / -1; grid-row: 1; }
  .storage-pack-title > a { font-size: 13px; }
  .storage-pack-title > small { font-size: 9px; }
  .storage-pack-size { grid-column: 1; grid-row: 2; font-size: 10px; }
  .storage-pack-date { grid-column: 1 / -1; grid-row: 3; font-size: 9px; margin-top: 0; }
  .storage-actions { grid-column: 2; grid-row: 2; gap: 7px; }
  .download-pack.button { min-width: 110px; font-size: 12px; padding: 9px 12px; }
  .storage-delete { width: 44px; min-width: 44px; }
  .storage-history li { gap: 15px; }
  .storage-history strong { font-size: 10px; }
  .storage-history small { font-size: 8px; line-height: 1.8; }
  .storage-history li > span { font-size: 9px; }
  .guide-card { padding: 17px 18px 18px 58px; }
  .guide-card p { font-size: 13px; }
  .guide-card h3 { font-size: 12px; }
  .guide-number { left: 17px; top: 17px; }
  .modal-window, dialog#modal { width: calc(100vw - 24px); border-radius: 17px; max-height: 91dvh; }
  .modal-header { padding: 16px 15px 13px 21px; gap: 10px; }
  .modal-header h2 { font-size: 18px; }
  .modal-body { padding: 19px 21px 23px; }
  .modal-description { font-size: 13px; }
  .modal-body label { font-size: 11px; }
  .modal-tabs { gap: 5px; }
  .modal-tabs .button { padding: 10px 7px; font-size: 12px; }
  .modal-actions .button { font-size: 12px; }
  .room-code-big { font-size: 32px; letter-spacing: 6px; }
  .toast-viewport, .toast-region { right: 14px; bottom: 14px; width: calc(100vw - 28px); }
  .toast { padding: 13px 12px 13px 16px; font-size: 11px; }
  .main-footer { padding-left: 17px; padding-right: 17px; }
  .empty-state { padding: 32px 22px; min-height: 280px; }
  .empty-state p { font-size: 13px; }

  .library-welcome h1 { font-size: 36px; }
  .library-welcome > p { font-size: 13px; }
  .library-welcome { padding-top: 0; }
  .intro-footnote { font-size: 9px; gap: 6px; line-height: 1.8; }
  .library-coop { width: 100%; padding: 18px 19px 18px 72px; margin-top: 21px; }
  .library-coop .coop-symbol { position: absolute; top: 21px; left: 18px; width: 36px; height: 36px; }
  .library-coop h2 { font-size: 15px; margin-top: 0; }
  .library-coop > p { font-size: 12px; margin-bottom: 12px; }
  .library-coop > p br { display: none; }
  .library-coop .button { width: auto; min-width: 185px; font-size: 12px; }
  .studio-heading-actions { justify-content: flex-start; max-width: none; margin-top: 15px; gap: 7px; }
  .studio-steps > li { align-items: stretch; }
  .studio-steps > li + li::before { position: absolute; left: -13px; right: auto; top: 20px; width: 25px; margin: 0; }
  .studio-steps .studio-step { width: 100%; padding: 6px 0; gap: 5px; }
  .step-label small { white-space: normal; font-size: 10px; }
  .sidebar-note { padding-top: 18px; padding-bottom: 21px; }
}
@media (max-width: 359px) {
  .step-label small { display: none; }
  .record-zone .record-controls { flex-direction: row; align-items: center; }
  .record-zone .record-controls > .button { min-width: 0; font-size: 12px; padding: 10px 8px; gap: 6px; }
  .record-zone .record-controls > .button.primary { flex: 1; }
  main { padding-left: 14px; padding-right: 14px; }
  .room-top-button { font-size: 12px; max-width: 140px; padding-left: 9px; padding-right: 9px; }
  .topbar-actions { gap: 6px; }
  .avatar { width: 44px; min-width: 44px; height: 44px; }
  .breadcrumb > strong { max-width: 76px; font-size: 9px; }
  .tab { font-size: 12px; padding-left: 7px; padding-right: 7px; }
  .page-heading h1 { font-size: 30px; }
  .record-controls { flex-direction: column; align-items: stretch; }
  .storage-overview-top { gap: 9px; }
  .storage-overview-top strong { font-size: 21px; }
  .storage-overview-top strong > span { font-size: 14px; }
}
@media (max-height: 750px) and (min-width: 901px) {
  .sidebar { padding-top: 27px; }
  .brand { margin-bottom: 29px; }
  .storage-mini { margin-top: 19px; margin-bottom: 17px; }
  .sidebar-bottom { padding-top: 18px; }
  .sidebar-footer { margin-top: 11px; padding-top: 13px; }
}
@media (hover: none) {
  .pack-card:hover { transform: none; }
  .pack-play > span { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
