[hidden] { display: none !important; }

body { color-scheme: dark; padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px)); }

#siteFooter {
  position: fixed;
  z-index: 5;
  inset: auto 0 0;
  padding: 12px 14px calc(12px + env(safe-area-inset-bottom, 0px));
  overflow-x: auto;
  background: #17141f;
  color: #e6ddec;
  border-top: 1px solid #51445f;
  font-size: clamp(11px, 2.6vw, 13px);
  line-height: 1.25;
}
.footer-line {
  display: flex;
  gap: clamp(9px, 2.1vw, 25px);
  width: max-content;
  margin-inline: auto;
  white-space: nowrap;
}
#siteFooter a { color: #e7cfff; }

#studioNav {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 6px;
  margin-bottom: 18px;
  border: 1px solid #463c54;
  border-radius: 12px;
  background: #1e1a27;
}
#studioNav button {
  flex: 1 0 auto;
  margin: 0;
  background: none;
  color: #eee6f6;
  min-height: 44px;
}
#studioNav button[aria-current="page"] { background: #e0c4ff; color: #211338; }
#projectContext { max-width: 520px; margin-bottom: 16px; }
#projectHistory, #editPanel, #youtubePanel, #audioPanel, #managePanel,
#assetPreview, #assetAudioPreview, #projectJobs { margin-bottom: 18px; }
#artifactSearch { display: grid; grid-template-columns: minmax(150px, 2fr) minmax(105px, 1fr) auto auto; gap: 8px; align-items: end; margin-bottom: 16px; }
#artifactSearch label, #artifactSearch button { margin: 0; }
#historyItems .button-row { margin-top: 4px; }
#aiPanel { padding-top: 16px; margin-top: 18px; border-top: 1px solid #51485d; }
#aiScenes { margin: 0 0 12px; }
#profilePanel { padding: 12px 16px; background: #20202b; border: 1px solid #383548; border-radius: 12px; }
#videoPanel summary { margin-bottom: 8px; }
.audio-forms { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
#audioTools details, #trashPanel { margin: 12px 0; padding: 12px; border: 1px solid #51485d; border-radius: 10px; }
#audioMixRows > div { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 10px; align-items: end; }
#audioMixRows .inline-check { grid-column: 1 / -1; }
#assetAudio { width: min(100%, 650px); }
#trashItems, #audioTracks { padding-left: 24px; }
#trashItems li, #audioTracks li { margin: 10px 0; overflow-wrap: anywhere; }
#manageDraftPreview pre { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; max-height: 430px; overflow: auto; }

body.login-mode {
  isolation: isolate;
  min-height: 100vh;
  min-height: 100svh;
  background: #110e15;
}

body.login-mode::before {
  position: fixed;
  inset: 0;
  content: '';
  z-index: -1;
  background: linear-gradient(90deg, rgba(17, 14, 21, .97), rgba(17, 14, 21, .68) 35%, rgba(17, 14, 21, .15) 78%),
    linear-gradient(0deg, rgba(17, 14, 21, .7), transparent 45%), url('/studio-login.webp') center / cover no-repeat;
}

.login-mode main { padding-top: clamp(52px, 11vh, 120px); }
.login-mode .studio-heading { margin-bottom: 35px; }
.login-mode .studio-heading h1 { font-size: clamp(36px, 6vw, 66px); letter-spacing: -.045em; line-height: 1.05; }
.login-mode .studio-heading p { margin-top: 12px; color: #eadcf6; }
.login-mode #accountPanel {
  max-width: 430px;
  background: rgba(30, 24, 38, .91);
  border-color: #64536c;
  border-radius: 22px;
  padding: clamp(22px, 4vw, 35px);
  box-shadow: 0 18px 60px #0b080fcc;
}
.login-mode #accountForm { padding: 0; background: none; border: none; }
.login-mode #accountSubmit { background: #e0c4ff; color: #211338; }
.login-mode #accountStatus:empty { display: none; }
.login-mode #launchHint { max-width: 430px; }

:is(button, input, textarea, select, summary, a):focus-visible { outline: 2px solid #e0c4ff; outline-offset: 3px; }

.inline-check { display: flex; align-items: flex-start; gap: 9px; line-height: 1.5; font-size: .94rem; font-weight: 500; }
.inline-check input { flex: none; width: 17px; height: 17px; margin: 3px 0 0; accent-color: #d3b3ff; }
.field-help { color: #d4cadf; font-size: .94rem; line-height: 1.55; margin-top: 0; }
.button-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.settings-panel { margin-top: 20px; }
.studio-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.studio-tool, .studio-subform { background: transparent; border: 0; border-radius: 0; padding: 12px 0 0; }
.studio-tool > :last-child, .settings-panel > :last-child { margin-bottom: 0; }
#assetVideo { width: 100%; max-width: 840px; max-height: 55vh; background: #111015; border-radius: 10px; }
#assetPreview, #projectJobs { margin-top: 18px; }
#projectHistory details, #accessPanel { margin-top: 14px; padding: 12px 15px; border: 1px solid #534967; border-radius: 10px; }
summary { font-weight: 700; cursor: pointer; }
.clip-row { display: grid; grid-template-columns: minmax(200px, 2.4fr) repeat(2, minmax(80px, 1fr)) minmax(145px, 1.4fr) minmax(90px, 1fr); gap: 10px; padding-bottom: 10px; border-bottom: 1px solid #443d52; }
.clip-row label { margin-bottom: 1px; }
.clip-row .button-row { grid-column: 1 / -1; }
#historyItems, #accessItems { margin: 0; padding-left: 22px; }
#historyItems li, #accessItems li { margin: 10px 0; overflow-wrap: anywhere; }
#jobItems a, #mediaTools a { color: #e2caff; margin-right: 8px; }
.table-scroll { overflow-x: auto; }
.section-toolbar { display: flex; gap: 12px; align-items: center; justify-content: space-between; margin: 0 0 12px; }
.section-toolbar :is(h2, h3, button) { margin: 0; }
#addClip { background: #8de3d3; color: #132c27; }
#titleFilterForm { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: end; }
#titleFilterForm :is(label, button, p) { margin: 0; }
#titleFilterStatus { grid-column: 1 / -1; }
#titleFilterStatus:empty { display: none; }
.select-hint { font-size: calc(1rem - 1pt); color: #c1b5ce; }
#filesPages { display: flex; align-items: center; gap: 9px; white-space: nowrap; }
.studio-table { width: 100%; border-collapse: collapse; table-layout: fixed; min-width: 740px; }
.studio-table :is(th, td) { padding: 9px 10px; text-align: left; vertical-align: middle; border-bottom: 1px solid #51485d; }
.studio-table thead { background: #2e263c; }
.studio-table td :is(button, a) { margin: 0; white-space: nowrap; }
.studio-table .table-actions { flex-wrap: nowrap; gap: 6px; }
.studio-table .table-actions button { min-width: auto; min-height: 34px; padding: 6px 9px; }
.studio-table td:last-child { white-space: nowrap; }
.files-table :is(th, td):nth-child(2) { width: 82px; white-space: nowrap; }
.files-table :is(th, td):nth-child(3) { width: 175px; white-space: nowrap; }
.files-table :is(th, td):nth-child(4) { width: 285px; }
.file-title { display: block; font-size: calc(1em + 1pt); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jobs-table :is(th, td):nth-child(1) { width: 175px; white-space: nowrap; }
.jobs-table :is(th, td):nth-child(2) { width: 112px; }
.jobs-table :is(th, td):nth-child(3) { width: 82px; }
.jobs-table :is(th, td):nth-child(4) { overflow-wrap: anywhere; }
.jobs-table :is(th, td):nth-child(5) { width: 160px; }
.reference-heading { display: flex; align-items: center; gap: 5px; margin: 12px 0 4px; }
.reference-heading label { flex: 1; margin: 0; }
.reference-heading button { padding: 4px 9px; margin: 0; min-height: 34px; }
.reference-inputs { padding: 7px 12px; margin: 8px 0 12px; border: 1px solid #51485d; border-radius: 8px; }
.reference-status:empty { display: none; }
#referenceDialog { width: min(700px, 90vw); max-height: 87vh; color: #f4e9ff; background: #201d2a; border: 1px solid #78648f; border-radius: 12px; }
#referenceDialog::backdrop { background: #090610b8; }
#referenceDialog img { display: block; width: auto; height: auto; max-width: 100%; max-height: 65vh; margin: 0 auto; object-fit: contain; }
#referenceDialog form { border: 0; margin: 0; padding: 6px 0 0; background: transparent; }
.clip-created { font-size: calc(1em - 1pt); color: #cfc4db; }
@supports (appearance: base-select) {
  .clip-source, .clip-source::picker(select) { appearance: base-select; }
  .clip-source::picker(select) { background: #201c2a; border: 1px solid #6e588d; border-radius: 8px; }
  .clip-source > button { min-width: 0; margin: 0; padding: 0; background: transparent; color: inherit; text-align: left; overflow: hidden; }
  .clip-source selectedcontent { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .clip-source option { padding: 8px; display: block; }
  .clip-source option:checked { background: #3b2d4b; }
}
#workflowStep {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 14px; margin: 0 0 14px; border: 1px solid #6e588d;
  border-radius: 12px; background: #2d233d; color: #f4e9ff;
}
#stepLabel { font-weight: 700; }
#nextStage { margin: 0; background: #eed7ff; color: #231334; font-weight: 800; }
#filenameDialog { width: min(460px, 85vw); padding: 0; border: 1px solid #78648f; border-radius: 12px; color: #f4e9ff; }
#filenameDialog form { margin: 0; border: 0; }
#filenameDialog::backdrop { background: #090610b8; }
#filenameError:empty, #remakeStatus:empty { display: none; }
.icon-button { min-width: 42px; min-height: 42px; font-size: 1rem; }
#editTimeline { margin: 16px 0; padding: 13px; border: 1px solid #665678; border-radius: 9px; }
.timeline-lanes { display: grid; gap: 5px; margin-top: 10px; }
.timeline-caption { font-size: .82rem; overflow-wrap: anywhere; }
.timeline-lane {
  height: 13px; background: repeating-linear-gradient(90deg, #25212f 0%, #25212f calc(10% - 1px), #534965 10%);
  border-radius: 3px; overflow: hidden;
}
.timeline-bar { height: 100%; background: #d4b0ff; border-radius: 3px; }
.timeline-bar.audio-bar { background: #95dfc6; }
.timeline-track { grid-template-columns: minmax(160px, 2fr) repeat(4, minmax(0, 1fr)); }
#memberTable table { border-collapse: collapse; width: 100%; min-width: 380px; }
#memberTable th, #memberTable td { text-align: left; border-bottom: 1px solid #51485d; padding: 7px 9px; }
#memberDetails { margin: 16px 0; padding: 12px; background: #262033; border-radius: 9px; }
#memberDetails dt { font-weight: 700; }
#memberDetails dd { margin: 3px 0 9px; white-space: pre-wrap; overflow-wrap: anywhere; }

@media (max-width: 810px) {
  .clip-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .clip-row label:first-child { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .login-mode main { padding: 50px 18px 30px; }
  body.login-mode::before { background-position: center, center, 64% center; }
  .login-mode .studio-heading { margin-bottom: 24px; }
  .studio-columns { gap: 7px; }
  .timeline-track { grid-template-columns: 1fr 1fr; }
  #artifactSearch { grid-template-columns: 1fr 1fr; }
  #artifactSearch label:first-child { grid-column: 1 / -1; }
  .audio-forms { grid-template-columns: 1fr; }
  #audioMixRows > div { grid-template-columns: 1fr 1fr; }
  #audioMixRows > div label:first-child { grid-column: 1 / -1; }
}

.admin-overview, .youtube-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.admin-overview {
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  align-items: stretch;
}
.admin-card[aria-labelledby="usersHeading"] { background: #28243d; border-color: #65558c; }
.admin-card[aria-labelledby="storageHeading"] { background: #1f343a; border-color: #49716d; }
#usersCount { color: #e0c4ff; }
#storageTotal { color: #a5ecd6; }
.admin-card {
  background: #262232;
  border: 1px solid #4b4059;
  border-radius: 12px;
  padding: 14px;
}
.admin-card h3, .admin-list-heading h3, .youtube-destination h3 { margin: 0; }
.admin-card strong { font-size: 1.2rem; }
#chartPeriods button[aria-pressed="true"] { background: #e0c4ff; color: #211338; }
#usersChart {
  list-style: none;
  display: flex;
  gap: 6px;
  margin: 14px 0 2px;
  padding: 0;
}
#usersChart li {
  display: grid;
  flex: 1 0 36px;
  grid-template-rows: 105px auto;
  gap: 5px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.chart-column {
  display: flex;
  flex-direction: column;
  justify-content: end;
  align-items: center;
  border-bottom: 1px solid #80748d;
  padding: 0 2px;
}
.chart-bar {
  width: min(22px, 95%);
  height: max(1px, var(--bar-height));
  background: #ddbbff;
  border-radius: 4px 4px 0 0;
}
.chart-label { font-size: .75rem; white-space: nowrap; }
.storage-table { width: 100%; border-collapse: collapse; }
.storage-table :is(th, td) { padding: 5px; text-align: right; border-bottom: 1px solid #4b4059; }
.storage-table :is(th, td):first-child { text-align: left; }
.admin-list-heading { margin-top: 20px; }
#usersPages { display: flex; gap: 8px; align-items: center; }
#accessPanel { margin-top: 14px; }
.users-table { min-width: 1120px; overflow-wrap: anywhere; }
.users-table :is(th, td):nth-child(1) { width: 112px; }
.users-table :is(th, td):nth-child(2) { width: 112px; }
.users-table :is(th, td):nth-child(3) { width: 190px; }
.users-table :is(th, td):nth-child(4) { width: 103px; }
.users-table :is(th, td):nth-child(6) { width: 140px; }
.users-table :is(th, td):nth-child(5) { width: 70px; }
.users-table :is(th, td):nth-child(8) { width: 112px; }
.users-table select { margin: 0; width: 100%; min-height: 34px; padding: 4px; }
.youtube-source, .youtube-destination { min-width: 0; }
.youtube-destination { padding-left: 18px; border-left: 1px solid #51485d; overflow-wrap: anywhere; }
#youtubeFields { margin-top: 12px; }
#youtubePreview { display: block; width: 100%; max-height: 420px; background: #14121a; }
.upload-icon { font-size: 1.15em; margin-right: 4px; }
.jobs-table { min-width: 820px; }

@media (max-width: 740px) {
  .admin-overview, .youtube-layout { grid-template-columns: minmax(0, 1fr); }
  .youtube-destination { padding: 14px 0 0; border-left: 0; border-top: 1px solid #51485d; }
}


.studio-heading {
  display: flex;
  align-items: baseline;
  gap: 12px;
  white-space: nowrap;
  overflow-x: auto;
  scrollbar-width: thin;
  margin-bottom: 16px;
  padding-bottom: 4px;
}
.studio-heading h1, .login-mode .studio-heading h1 {
  font-size: clamp(22px, 4vw, 45px);
}
.studio-heading p, .login-mode .studio-heading p {
  margin: 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: clamp(11px, 1.15vw, 14px);
}
#languageSwitch { margin-inline-start: auto; flex-shrink: 0; display: flex; gap: 4px; align-items: center; }
#languageSwitch button { margin: 0; padding: 5px 8px; font-size: 12px; color: #ece3f5; background: #302841; }
#languageSwitch [aria-pressed="true"] { color: #211338; background: #e0c4ff; }
@media (max-width: 650px) {
  .studio-heading { gap: 6px; }
  .studio-heading h1, .login-mode .studio-heading h1 { font-size: clamp(16px, 3.6vw, 23px); }
  .studio-heading p, .login-mode .studio-heading p { font-size: 10px; }
  #languageSwitch button { font-size: 10px; padding: 5px; }
}
.blocked-state, .users-table option[value="blocked"] { color: #ff6b6b; font-weight: 700; }
.users-table option:not([value="blocked"]) { color: #f5f2fb; }
.reference-filename bdi { overflow-wrap: anywhere; }
.job-progress {
  display: flex;
  align-items: center;
  gap: .7rem;
  color: #e8d1ff;
  padding: .65rem 0;
}
.spinner {
  width: 1.1rem;
  height: 1.1rem;
  border: 2px solid #5b4d6e;
  border-top-color: #e0c4ff;
  border-radius: 50%;
  animation: job-spin .8s linear infinite;
}
@keyframes job-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }
.admin-integration { margin-top: 16px; padding: 12px; border: 1px solid #534967; border-radius: 10px; }
#youtubeRedirectUri { overflow-wrap: anywhere; }
#executeYouTubeUpload { margin-top: 12px; }

/* API billing, checkout and consultation */
.billing-overview { margin-block: 18px; }
.billing-overview .section-toolbar { flex-wrap: wrap; }
.billing-totals, .billing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(135px, 1fr)); gap: 12px; }
.billing-totals { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.billing-totals div { background: #201b2b; border: 1px solid #493f56; border-radius: 10px; padding: 12px; }
.billing-totals dd, .payment-breakdown dd { margin: 5px 0 0; font-size: 1.12rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.billing-totals dt { font-size: .87rem; }
[data-series="paid"] { --color: #a58bff; }
[data-series="refunds"] { --color: #fa9aaa; }
[data-series="actual"] { --color: #65d4b2; }
[data-series="estimated"] { --color: #ffce76; }
.billing-totals dt[data-series]:not([data-series="net"])::before { content: ''; display: inline-block; width: .67rem; height: .67rem; background: var(--color); border-radius: 3px; margin-inline-end: 6px; }
.billing-bars { min-width: calc(var(--periods, 7) * 58px); display: grid; grid-template-columns: repeat(var(--periods, 7), 1fr); gap: 6px; margin: 8px 0; }
.billing-bucket { text-align: center; }
.billing-bar-group { height: 105px; display: flex; justify-content: center; align-items: end; gap: 2px; border-bottom: 1px solid #6b5f7b; padding-inline: 3px; }
.billing-bar-group span { width: min(14%, 15px); height: var(--share); background: var(--color); border-radius: 3px 3px 0 0; }
.billing-bucket small { display: block; padding-top: 4px; color: #ded4ee; }
.billing-overview summary, #memberPaymentHistory summary { cursor: pointer; margin-block: 10px; }
.users-table { min-width: 1370px; }
.users-table td:nth-child(9) { white-space: nowrap; font-variant-numeric: tabular-nums; }
.payment-table { table-layout: auto; }
.payment-table :is(th, td) { white-space: nowrap; }
.payment-table code { font-size: .75rem; }
#memberBillingRows td:first-child { font-size: .8rem; }
.billing-edit-cost { display: flex; align-items: center; gap: 6px; border: none; margin: 0; padding: 0; background: transparent; }
.billing-edit-cost input { width: 8ch; margin: 0; }
.payment-dialog { max-width: min(94vw, 540px); }
.admin-payments { width: min(92vw, 1280px); max-width: none; max-height: 90vh; overflow: auto; }
.payment-dialog::backdrop { background: #0c0814b9; }
.payment-breakdown { display: grid; gap: 0; margin-block: 16px; }
.payment-breakdown > div { display: flex; align-items: baseline; justify-content: space-between; padding-block: 9px; gap: 10px; border-bottom: 1px solid #4f435d; }
.payment-breakdown dd { margin: 0; overflow-wrap: anywhere; text-align: right; }
.payment-breakdown dd[id="checkoutOrder"] { font-size: .83rem; }
.payment-breakdown > div:last-child dd { color: #e4cbff; }
.checkout-action { display: inline-flex; align-items: center; min-height: 40px; padding: 4px 14px; color: #1b1425; background: #d3b3ff; text-decoration: none; border-radius: 8px; font-weight: 700; }
.payment-dialog .button-row form { margin: 0; padding: 0; background: transparent; border: 0; }
.checkout-page { margin: 0; background: #171421; color: #f2edf8; font-family: system-ui, sans-serif; }
.checkout-card { box-sizing: border-box; width: min(95vw, 540px); margin: clamp(20px, 7vh, 85px) auto; padding: clamp(18px, 5vw, 34px); border: 1px solid #493f56; border-radius: 18px; background: #211c2c; }
.checkout-card h1 { font-size: clamp(1.6rem, 5vw, 2.25rem); margin: 0 0 20px; }
.checkout-card button { padding: 9px 12px; border: 1px solid #d3b3ff; background: #d3b3ff; color: #201929; border-radius: 8px; cursor: pointer; font: inherit; }
.checkout-card button.secondary { background: #383044; color: #f5efff; }
.checkout-card :is(button, a):focus-visible { outline: 2px solid #fff; outline-offset: 4px; }
.checkout-card a { color: #e4cbff; }
.checkout-card img { display: block; max-width: 100%; max-height: 55vh; border-radius: 8px; margin-bottom: 15px; }
.checkout-page [hidden] { display: none !important; }

.footer-line { width: 100%; justify-content: space-between; align-items: center; white-space: normal; }
.footer-brand, .footer-links { display: flex; align-items: center; flex-wrap: wrap; gap: .45rem 1rem; }
.footer-links { justify-content: end; }
.footer-links .inquiry-link { font-weight: 700; color: #231530 !important; background: #dfc6fa; border-radius: 6px; padding: .42rem .75rem; text-decoration: none; }
.footer-disclosures { padding-top: .55rem; margin-top: .5rem; border-top: 1px solid #4a4056; display: flex; flex-wrap: wrap; gap: .35rem 1rem; }
.support-dialog { box-sizing: border-box; width: min(93vw, 690px); max-height: 85vh; max-height: 85dvh; background: #211c2c; color: #f4eef9; border: 1px solid #52435f; border-radius: 12px; padding: clamp(14px, 4vw, 28px); }
.support-dialog::backdrop { background: #110a1acc; }
.support-dialog form[method="dialog"] { margin: 0; padding: 0; border: none; background: none; }
.support-dialog textarea, #adminInquiries textarea, #adminLegal textarea { box-sizing: border-box; width: 100%; font: inherit; }
.support-dialog textarea, #adminInquiries textarea { background: #17141f; color: #f4eef9; padding: .5rem; border: 1px solid #655774; border-radius: 6px; }
.support-dialog a, .guide-content a { color: #ebd3ff; }
.support-dialog button { cursor: pointer; }
.inquiry-card { border: 1px solid #594966; margin: .6rem 0; padding: .6rem .85rem; border-radius: 8px; min-width: 0; }
.inquiry-card summary { cursor: pointer; overflow-wrap: anywhere; }
.inquiry-card time { display: inline-block; margin-inline-start: .5rem; font-size: .83em; color: #dfd1eb; }
.inquiry-text, .legal-document { white-space: pre-wrap; overflow-wrap: anywhere; }
.legal-details { display: grid; grid-template-columns: minmax(95px, auto) 1fr; gap: .45rem .95rem; }
.legal-details dd { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.legal-doc-fields { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.guide-page { margin: 0; background: #17141f; color: #f1eaf7; font: 16px/1.65 system-ui, sans-serif; }
.guide-content { box-sizing: border-box; width: min(100%, 850px); margin: 0 auto; padding: 24px clamp(18px, 5vw, 42px) 30px; }
.guide-content h1 { margin: .25em 0 .05em; font-size: clamp(1.8rem, 5vw, 2.7rem); }
.guide-content h2 { border-top: 1px solid #534561; padding-top: .5em; }
.guide-content header nav { display: flex; gap: 1rem; flex-wrap: wrap; }
.guide-content li { margin: .35rem 0; }
@media (max-width: 740px) {
  .footer-line { flex-wrap: wrap; row-gap: 5px; }
  .footer-links { margin-inline-start: auto; gap: .3rem .65rem; }
  .footer-brand { gap: .2rem .65rem; }
}
@media print {
  .guide-page { background: #fff; color: #161616; padding-bottom: 0 !important; }
  .guide-page :is(#siteFooter, dialog, header nav) { display: none !important; }
  .guide-content { padding: 0; width: auto; }
  .guide-content a { color: #151515; }
  .guide-content h2 { break-after: avoid; }
}
.support-dialog .studio-subform { display: grid; gap: .55rem; }
.support-dialog .studio-subform label:not(.inline-check) { display: grid; gap: .3rem; }
.support-dialog :is(input:not([type="checkbox"]), textarea) { background: #17141f; color: #f4eef9; padding: .5rem; border: 1px solid #655774; border-radius: 6px; font: inherit; }
.support-dialog button { color: #261a32; background: #dfc6fa; border: 0; border-radius: 6px; padding: .45rem .75rem; font: inherit; }
.support-dialog button.secondary { background: #40334e; color: #f5eefb; }
.support-dialog button:disabled { opacity: .55; }
.support-dialog .button-row { display: flex; align-items: center; gap: .7rem; }

/* Minimal, centered footer for the login screen. */
#siteFooter.login-footer { overflow-x: hidden; }
#siteFooter.login-footer .footer-line { width: 100%; justify-content: center; white-space: normal; }
#siteFooter.login-footer .footer-brand { justify-content: center; text-align: center; }

/* Keep company details only in the requested login footer; legal business data remains in its dialog/page. */
#siteFooter:not(.login-footer) .footer-brand,
#siteFooter:not(.login-footer) .footer-disclosures { display: none !important; }

/* Compact public-service header, navigation and Scenario controls */
main { padding-top: 20px; }
.studio-heading {
  display: flex; align-items: center; justify-content: space-between; gap: 12px 22px;
  margin: 0 0 16px; flex-wrap: wrap;
}
.studio-brand { display: flex; align-items: baseline; gap: 14px; min-width: 0; }
.studio-heading h1 { margin: 0; font-size: clamp(26px, 4.8vw, 42px); letter-spacing: -.035em; line-height: 1.1; white-space: nowrap; }
.studio-heading p { margin: 0; color: #aaa6b2; font-size: .91rem; line-height: 1.35; }
.studio-header-tools { display: flex; align-items: center; gap: 12px; margin-left: auto; }
#languageSwitch { display: flex; gap: 4px; align-items: center; white-space: nowrap; }
#languageSwitch button { min-height: 30px; padding: 4px 9px; margin: 0; font-size: 13px; }
#accountBar { display: flex; align-items: center; gap: 8px; margin: 0; white-space: nowrap; }
#accountBar[hidden] { display: none !important; }
#memberName { color: #c2bdc9; font-size: .9rem; }
#accountBar button { min-height: 30px; padding: 4px 9px; margin: 0; font-size: 13px; }
#studioNav { gap: 4px; padding: 3px; margin-bottom: 12px; border-radius: 8px; }
#studioNav button { min-height: 35px; padding: 5px 10px; border-radius: 6px; font-size: 14px; }
#workflowStep { display: grid; grid-template-columns: minmax(210px, 1fr) minmax(270px, 1.3fr) auto; gap: 8px 14px; align-items: center; padding: 8px 12px; margin-bottom: 10px; border-radius: 8px; }
#workflowFlow { color: #b9b4c0; font-size: .82rem; white-space: nowrap; }
#stepLabel { font-size: .92rem; }
#nextStage { min-height: 32px; padding: 5px 10px; white-space: nowrap; }
#project label, #project .field-title { color: #b6b2bd; }
#project input:not([type="file"]), #project select, #project textarea { color: #f5f2fb; }
#projectControls > label { margin-block: 9px; }
.reference-photo-row { display: flex; align-items: center; gap: 9px; min-height: 35px; margin: 8px 0; color: #b6b2bd; }
.reference-photo-row .field-title { font-size: .95rem; font-weight: 600; }
.file-select-button { position: relative; display: inline-flex; align-items: center; min-height: 31px; padding: 4px 11px; margin: 0; border-radius: 6px; background: #393442; color: #fff !important; cursor: pointer; font-size: 13px; font-weight: 600; }
.file-select-button input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.reference-filename { padding: 7px 10px; border-radius: 6px; background: #292732; color: #b8b4bf; }
.reference-filename bdi { display: inline-block; white-space: pre-line; overflow-wrap: anywhere; vertical-align: top; }
.partner-person-row { display: grid; grid-template-columns: minmax(130px, 1fr) minmax(180px, 1.4fr) auto; gap: 8px; align-items: end; margin: 8px 0; }
.partner-person-row label { margin: 0; }
.partner-person-row .remove-person { min-height: 37px; margin: 0; padding: 6px 10px; font-size: 13px; }
.add-person { min-height: 32px; padding: 5px 10px; margin: 0 0 8px; font-size: 13px; }
@media (max-width: 760px) {
  .studio-heading { align-items: flex-start; }
  .studio-brand { flex-wrap: wrap; gap: 4px 10px; }
  .studio-heading p { width: 100%; }
  .studio-header-tools { width: 100%; justify-content: space-between; margin-left: 0; }
  #workflowStep { grid-template-columns: 1fr auto; }
  #workflowFlow { grid-column: 1 / -1; overflow: hidden; text-overflow: ellipsis; }
}
@media (max-width: 480px) {
  .partner-person-row { grid-template-columns: 1fr 1fr; }
  .partner-person-row .remove-person { grid-column: 1 / -1; justify-self: start; }
}
.login-mode .studio-heading { margin-bottom: 16px; }
.login-mode .studio-heading h1 { font-size: clamp(26px, 4.8vw, 42px); }
@media (max-width: 650px) {
  .studio-heading h1, .login-mode .studio-heading h1 { font-size: clamp(18px, 5.2vw, 26px); }
}
