@font-face {
  font-family: "SUIT Variable";
  src: url("/assets/fonts/SUIT-Variable.woff2") format("woff2-variations");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

/*
 * LingoSend editorial operations system
 * Visual grammar adapted from the supplied PRAX/S reference:
 * white operational surfaces, one-pixel rules, modular grids, compact
 * system labels, and typography-led hierarchy. Product behavior remains
 * owned by the existing HTML and JavaScript.
 */

:root {
  color-scheme: light;
  --canvas: #11110f;
  --canvas-soft: #f2f2ee;
  --surface: #ffffff;
  --surface-raised: #f6f6f2;
  --surface-hover: #eeeeea;
  --field: #fbfbf8;
  --line: #ddddd7;
  --line-strong: #8b8b84;
  --text: #080808;
  --soft: #2f2f2b;
  --muted: #66665f;
  --subtle: #8e8e87;
  --accent: #1559c7;
  --accent-strong: #0b3f97;
  --accent-ink: #ffffff;
  --accent-soft: #edf3ff;
  --blue: #1559c7;
  --blue-soft: #edf3ff;
  --warning: #8c5700;
  --warning-soft: #fff6df;
  --danger: #a32b21;
  --danger-soft: #fff0ed;
  --success: #12633c;
  --success-soft: #edf8f1;
  --focus: #1559c7;
  --shadow: 0 28px 64px rgb(0 0 0 / 18%);
  --radius: 0px;
  --radius-small: 0px;
  --content: 1560px;
  --public-content: 1320px;
  --font: "SUIT Variable", SUIT, -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text", "Segoe UI", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", "Hiragino Sans", "Yu Gothic UI", "Noto Sans JP", "Microsoft JhengHei UI", "PingFang TC", "Microsoft YaHei UI", "Noto Sans SC", Tahoma, system-ui, sans-serif;
  --mono: "SUIT Variable", SUIT, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --code: "SFMono-Regular", Consolas, "Liberation Mono", "Roboto Mono", monospace;
  --bg: #f2f2ee;
  --panel: #ffffff;
  --panel-2: #f6f6f2;
  --ink: #080808;
  --btn: #ffffff;
  --input: #fbfbf8;
  --line-soft: #ddddd7;
  --teal: #1559c7;
  --green: #12633c;
  --amber: #8c5700;
}

* {
  letter-spacing: 0;
}

html {
  background: var(--canvas);
}

body,
.public-home-page,
.legal-page,
.lyrics-page {
  background: var(--canvas);
  color: var(--text);
}

body {
  font-family: var(--font);
  font-weight: 400;
  line-height: 1.45;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

code,
pre,
samp,
kbd {
  font-family: var(--code);
}

::selection {
  background: #111;
  color: #fff;
}

a {
  color: var(--accent);
  text-underline-offset: 3px;
}

h1,
h2,
h3,
strong {
  color: var(--text);
}

h1 {
  font-weight: 600;
}

h2,
h3 {
  font-weight: 700;
}

.eyebrow,
.field-title,
.label-small,
.workflow-index,
.legal-updated,
.status-pills,
.save-state,
.metric span,
.admin-chart-scale,
.admin-chart-svg-value,
.admin-chart-svg-weekday,
.admin-chart-svg-date,
.billing-recommended-badge,
.batch-badge,
.job-item small,
.channel-item small,
.lyrics-capability,
.helper-note,
.oauth-help {
  font-family: var(--mono);
}

.eyebrow {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.eyebrow::before {
  color: var(--text);
  content: "SYS/ ";
}

button,
.button,
a.primary,
a.secondary,
a.ghost {
  min-height: 44px;
  border-radius: 999px;
  font-weight: 700;
}

.primary,
button.primary,
a.primary {
  border: 1px solid #0a0a0a;
  background: #0a0a0a;
  color: #fff;
  box-shadow: none;
}

.primary:hover:not(:disabled),
button.primary:hover:not(:disabled),
a.primary:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.secondary,
button.secondary,
a.secondary,
.ghost,
button.ghost,
a.ghost {
  border: 1px solid #111;
  background: #fff;
  color: #111;
  box-shadow: none;
}

.secondary:hover:not(:disabled),
button.secondary:hover:not(:disabled),
a.secondary:hover,
.ghost:hover:not(:disabled),
button.ghost:hover:not(:disabled),
a.ghost:hover {
  border-color: #111;
  background: #111;
  color: #fff;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

input,
select,
textarea {
  min-height: 48px;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  background: #fff;
  color: var(--text);
}

input:hover,
select:hover,
textarea:hover,
input:focus,
select:focus,
textarea:focus {
  border-color: #111;
  background: #fff;
  box-shadow: none;
}

input::placeholder,
textarea::placeholder {
  color: #8b8b84;
}

label > span,
.field-title {
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

small,
.helper-note,
.oauth-help,
.form-message {
  color: var(--muted);
}

::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track {
  background: #f0f0ec;
}

::-webkit-scrollbar-thumb {
  border: 3px solid #f0f0ec;
  border-radius: 0;
  background: #777770;
  background-clip: padding-box;
}

.brand-mark,
.brand-mark.small,
.brand-mark.titlebar-mark {
  border: 1px solid #111;
  border-radius: 0;
  background-color: #111;
  filter: none;
}

.step,
.step-number {
  border: 1px solid #111;
  border-radius: 0;
  background: #fff;
  color: #111;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
}

/* Authentication */
.auth-view {
  min-height: 100dvh;
  padding: 28px;
  background: #111;
}

.auth-view::before {
  inset: 28px 43% 28px 28px;
  border: 1px solid #333;
  border-right: 0;
  border-radius: 8px 0 0 8px;
  background-image: url("/assets/images/lingosend-login-relay.webp?v=20260816-brand-2");
  background-color: #ecece7;
  background-position: center center;
  background-size: cover;
  filter: none;
}

.auth-view::after {
  inset: 28px 43% 28px 28px;
  border-radius: 8px 0 0 8px;
  background: rgb(10 10 10 / 8%);
}

.auth-shell {
  width: min(100%, 620px);
  max-height: calc(100dvh - 56px);
  margin-right: max(0px, calc((43vw - 620px) / 2));
  padding: 42px 46px;
  border: 1px solid #333;
  border-radius: 0 8px 8px 0;
  background: #fff;
  box-shadow: none;
}

.auth-shell > .brand-mark {
  margin-bottom: 38px;
}

.auth-shell h1 {
  margin-bottom: 10px;
  font-size: 54px;
  line-height: 1;
  text-transform: uppercase;
}

.auth-copy {
  color: var(--soft);
}

.auth-purpose {
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-left: 0;
  color: var(--muted);
}

.auth-purpose strong {
  font-family: var(--mono);
  text-transform: uppercase;
}

.auth-language-picker {
  top: 28px;
  right: 30px;
}

.auth-tabs,
.provider-tabs,
.segmented,
.lyrics-input-tabs {
  gap: 0;
  padding: 0;
  border: 1px solid #111;
  border-radius: 0;
  background: #fff;
}

.auth-tabs button,
.provider-tabs button,
.segmented button,
.lyrics-input-tabs button {
  min-height: 44px;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
  color: var(--muted);
}

.auth-tabs button:last-child,
.provider-tabs button:last-child,
.segmented button:last-child,
.lyrics-input-tabs button:last-child {
  border-right: 0;
}

.auth-tabs button.active,
.provider-tabs button.active,
.segmented button.active,
.lyrics-input-tabs button.active {
  background: #111;
  color: #fff;
  box-shadow: none;
}

.auth-form button[type="submit"] {
  border-radius: 0;
  text-transform: uppercase;
}

.legal-links {
  border-top-color: var(--line);
}

.legal-links a {
  color: var(--muted);
  font-family: var(--mono);
}

/* Product shell */
.app {
  width: min(calc(100% - 40px), var(--content));
  min-height: calc(100dvh - 40px);
  margin: 20px auto;
  overflow: clip;
  border: 1px solid #333;
  border-radius: 8px;
  background: #fff;
}

.topbar {
  position: sticky;
  min-height: 92px;
  padding: 18px 28px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: rgb(255 255 255 / 98%);
  backdrop-filter: none;
}

.brand {
  gap: 14px;
}

.brand strong {
  color: #080808;
  font-size: 21px;
  font-weight: 700;
  text-transform: uppercase;
}

.brand > div > span {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
}

.status-pills {
  justify-content: flex-start;
  gap: 18px;
}

.status-pills > span,
.status-pills > span.is-off {
  min-height: 32px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font-size: 11px;
  text-transform: uppercase;
}

.status-pills > span.is-off {
  color: var(--warning);
}

.status-pills i {
  width: 8px;
  height: 8px;
  border: 1px solid currentColor;
  border-radius: 0;
  background: currentColor;
}

.top-actions {
  gap: 8px;
}

.top-actions > span {
  color: var(--muted);
  font-family: var(--mono);
}

.top-actions button,
.top-actions a {
  min-height: 36px;
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
}

.notice {
  min-height: 46px;
  padding: 13px 28px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: #f4f4f0;
  color: var(--text);
  font-family: var(--mono);
  font-size: 12px;
}

.workspace-layout {
  display: block;
  min-height: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: #fff;
}

.workflow-nav {
  position: sticky;
  top: 92px;
  z-index: 24;
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  padding: 0;
  overflow-x: auto;
  border-right: 0;
  border-bottom: 1px solid var(--line);
  background: rgb(247 247 243 / 98%);
  scrollbar-width: thin;
  backdrop-filter: blur(12px);
}

.workflow-nav::before {
  display: none;
  content: none;
}

.workflow-nav-item {
  display: flex;
  min-width: 148px;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  padding: 9px 14px;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 3px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  text-align: center;
}

.workflow-nav-item:last-child {
  border-right: 0;
}

.workflow-nav-item:hover {
  background: #eeeeea;
  color: var(--text);
}

.workflow-nav-item.active {
  border-bottom-color: var(--accent);
  background: #fff;
  color: var(--text);
}

.workflow-nav-item strong,
.workflow-nav-item small {
  color: inherit;
}

.workflow-nav-item strong {
  font-size: 14px;
  font-weight: 680;
}

.workflow-nav-item small {
  display: none;
}

.workflow-index {
  display: none;
}

.workspace {
  display: grid;
  grid-template-areas:
    "setup language run"
    "channel language history";
  grid-template-columns: minmax(300px, .94fr) minmax(390px, 1.18fr) minmax(320px, 1fr);
  grid-template-rows: minmax(0, 1.32fr) minmax(0, .68fr);
  height: clamp(650px, calc(100dvh - 238px), 820px);
  align-items: stretch;
  gap: 0;
  padding: 0;
  overflow: hidden;
  background: var(--line);
}

.setup-section {
  grid-area: setup;
}

.channel-section {
  grid-area: channel;
}

.language-section {
  grid-area: language;
}

.run-section {
  grid-area: run;
}

.history-section {
  grid-area: history;
}

.setup-section,
.channel-section,
.language-section,
.run-section,
.history-section {
  align-self: stretch;
  height: 100%;
  overflow-x: hidden;
  overflow-y: scroll;
  overscroll-behavior: contain;
  scrollbar-color: #66665f #ecece7;
  scrollbar-gutter: stable;
  scroll-margin-top: 160px;
}

.workspace > .section,
.section {
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}

.workspace > .section {
  display: block;
  width: auto;
  min-height: 0;
  margin: 0;
  padding: 22px 20px 30px;
  overflow-x: hidden;
  overflow-y: scroll;
  overscroll-behavior: contain;
  scrollbar-color: #66665f #ecece7;
  scrollbar-gutter: stable;
  animation: none;
}

.workspace > .section::-webkit-scrollbar,
.channel-list::-webkit-scrollbar,
.result::-webkit-scrollbar,
.history-section .job-list::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.workspace > .section::-webkit-scrollbar-track,
.channel-list::-webkit-scrollbar-track,
.result::-webkit-scrollbar-track,
.history-section .job-list::-webkit-scrollbar-track {
  background: #ecece7;
}

.workspace > .section::-webkit-scrollbar-thumb,
.channel-list::-webkit-scrollbar-thumb,
.result::-webkit-scrollbar-thumb,
.history-section .job-list::-webkit-scrollbar-thumb {
  border: 2px solid #ecece7;
  border-radius: 0;
  background: #66665f;
}

.workspace > .section::-webkit-scrollbar-thumb:hover,
.channel-list::-webkit-scrollbar-thumb:hover,
.result::-webkit-scrollbar-thumb:hover,
.history-section .job-list::-webkit-scrollbar-thumb:hover {
  background: #111;
}

.language-section {
  min-height: 0;
}

.language-list {
  max-height: none;
  overflow: visible;
}

.history-section .job-list {
  max-height: none;
  overflow: visible;
}

.section-heading {
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.section-heading h2 {
  color: var(--text);
  font-size: 18px;
  text-transform: uppercase;
}

.section-heading p {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
}

.settings-actions {
  gap: 8px;
}

.save-state {
  min-height: 30px;
  padding: 3px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
}

.save-state.dirty {
  border-color: var(--warning);
  background: var(--warning-soft);
  color: var(--warning);
}

.save-state.saved,
.save-state.is-saved {
  border-color: var(--success);
  background: var(--success-soft);
  color: var(--success);
}

.save-state.error {
  border-color: var(--danger);
  background: var(--danger-soft);
  color: var(--danger);
}

.save-button,
.run-button {
  border-radius: 0;
  text-transform: uppercase;
}

.provider-tabs,
.segmented {
  background: #fff;
}

.input-action {
  gap: 0;
}

.input-action input {
  border-right: 0;
}

.input-action button {
  border-radius: 0;
}

.channel-list,
.job-list,
.admin-notice-list,
.billing-plan-list,
.billing-order-list,
.batch-queue,
.lyrics-jobs {
  gap: 0;
  border-top: 1px solid var(--line);
}

.channel-item,
.job-item,
.admin-notice-item,
.billing-plan-item,
.admin-billing-order,
.billing-history-item,
.lyrics-job,
.batch-item,
.batch-row {
  padding: 15px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
}

.channel-item.active,
.channel-item.is-active {
  border-color: var(--line);
  background: var(--success-soft);
}

.channel-item img {
  border: 1px solid var(--line);
  border-radius: 0;
}

.channel-actions button {
  border-radius: 999px;
}

.language-toolbar {
  gap: 0;
  margin-bottom: 0;
  border: 1px solid var(--line-strong);
}

.language-toolbar input,
.language-toolbar button {
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
}

.language-toolbar button:last-child {
  border-right: 0;
}

.language-list {
  gap: 0;
  padding-right: 0;
  border: 1px solid var(--line);
  border-top: 0;
}

.language-option {
  min-height: 46px;
  padding: 10px 12px;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
}

.language-option:hover {
  border-color: var(--line);
  background: #f3f3ef;
}

.language-option:has(input:checked) {
  border-color: var(--line);
  background: #edf3ff;
}

.language-option input,
.lyrics-toggle input {
  accent-color: var(--accent);
}

.language-option span {
  color: var(--soft);
}

.switch > span:first-of-type {
  border-color: var(--line-strong);
  background: #fff;
}

.switch input:checked + span:first-of-type {
  border-color: #111;
  background: #111;
}

.switch input:checked + span:first-of-type::after {
  background: #fff;
}

.run-button {
  min-height: 58px;
  font-size: 16px;
}

.progress-area,
.result-heading {
  border-top-color: var(--line);
}

.progress-track {
  height: 7px;
  border-radius: 0;
  background: #e8e8e3;
}

.progress-track span {
  border-radius: 0;
  background: #111;
}

.result {
  padding: 16px 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
  color: var(--soft);
}

.job-item p {
  color: var(--muted);
}

.app-legal-links {
  min-height: 66px;
  border-top: 1px solid var(--line);
  background: #f7f7f3;
}

.app-legal-links a {
  color: var(--muted);
  font-family: var(--mono);
  text-transform: uppercase;
}

/* Administration */
.admin-workspace {
  margin: 0;
  padding: 0 28px 40px;
  background: #fff;
}

.admin-header {
  padding: 38px 0 22px;
  border-bottom-color: var(--line);
}

.admin-header h1 {
  font-size: 42px;
  font-weight: 600;
  text-transform: uppercase;
}

.metric-grid {
  gap: 0;
  margin: 0;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
}

.metric {
  min-height: 118px;
  padding: 24px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-left: 1px solid var(--line);
  background: #fff;
}

.metric strong {
  font-size: 34px;
  font-weight: 600;
}

.metric span {
  text-transform: uppercase;
}

.admin-workspace > .section {
  margin-top: 0;
  padding: 0;
  border-right: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.admin-operation-panel {
  padding: 28px;
  border-color: var(--line);
}

.admin-notice-item,
.billing-plan-item,
.admin-billing-order,
.billing-history-item {
  background: #fff;
}

.admin-billing-order {
  border-left: 3px solid var(--warning);
  padding-left: 14px;
}

.admin-chart-section {
  padding: 28px !important;
}

.admin-charts {
  gap: 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.admin-chart-card {
  padding: 18px;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
}

.admin-chart-svg-track {
  fill: #f2f2ee;
  stroke: var(--line);
}

.admin-chart-svg-bar {
  fill: #111;
}

.admin-chart-svg-marker {
  fill: var(--accent);
}

.table-wrap {
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
}

.table-wrap table {
  background: #fff;
}

.table-wrap th,
.table-wrap td {
  padding: 13px 14px;
  border-bottom-color: var(--line);
  color: var(--soft);
}

.table-wrap th {
  background: #f2f2ee;
  color: var(--text);
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
}

/* Dialogs and transactional feedback */
.billing-modal,
.notice-board-modal,
.job-result-modal,
.open-chat-modal,
.maintenance-modal,
.completion-modal {
  background: rgb(10 10 10 / 76%);
  backdrop-filter: none;
}

.billing-modal-content,
.notice-board-card,
.job-result-card,
.open-chat-card,
.maintenance-card,
.completion-card {
  border: 1px solid #111;
  border-radius: 0;
  background: #fff;
  box-shadow: var(--shadow);
}

.billing-customer-plans {
  gap: 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.billing-customer-plan,
.billing-card,
.billing-current-access,
.billing-referral-panel,
.billing-payment-step,
.job-result-stats div,
.job-result-reasons,
.notice-board-item,
.open-chat-url {
  border-color: var(--line);
  border-radius: 0;
  background: #fff;
}

.billing-customer-plan {
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.billing-customer-plan.recommended,
.billing-customer-plan.is-recommended {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 2px var(--accent);
}

.billing-recommended-badge,
.open-chat-badge,
.batch-badge {
  border: 1px solid #111;
  border-radius: 999px;
  background: #fff;
  color: #111;
}

.toast {
  border: 1px solid #111;
  border-radius: 0;
  background: #fff;
  color: var(--text);
  box-shadow: var(--shadow);
}

.toast.error {
  border-color: var(--danger);
  background: var(--danger-soft);
  color: var(--danger);
}

.toast.success {
  border-color: var(--success);
  background: var(--success-soft);
  color: var(--success);
}

/* Public homepage */
.public-home-shell {
  width: min(calc(100% - 48px), 1480px);
  min-height: calc(100dvh - 48px);
  margin: 24px auto;
  overflow: hidden;
  border: 1px solid #333;
  border-radius: 8px;
  background: #fff;
}

.public-home-nav {
  position: static;
  min-height: 94px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  backdrop-filter: none;
}

.public-nav-inner {
  width: 100%;
  min-height: 94px;
  padding: 18px 42px;
}

.public-home-nav .public-brand {
  gap: 14px;
  color: var(--text);
  font-size: 20px;
  font-weight: 700;
  text-transform: uppercase;
}

.public-home-nav .public-brand > span:last-child {
  color: var(--text);
}

.public-home-nav .public-nav-cta {
  color: #fff;
}

.public-nav-inner > nav a,
.public-footer a,
.public-text-actions a {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
}

.public-nav-cta {
  border: 1px solid #111;
  border-radius: 999px;
  background: #111;
  color: #fff;
}

.public-hero {
  position: relative;
  width: 100%;
  height: auto;
  min-height: 560px;
  max-height: none;
  align-items: end;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.public-hero-media {
  inset: 0;
  background: #fff;
}

.public-hero-media img {
  object-position: center top;
  opacity: .5;
  filter: saturate(.82) contrast(1.02);
}

.public-hero::after {
  background: rgb(255 255 255 / 24%);
}

.public-hero-inner {
  width: 100%;
  padding: 58px 50px 54px;
}

.public-hero h1 {
  max-width: 1040px;
  margin-bottom: 24px;
  color: #070707;
  font-size: 76px;
  font-weight: 600;
  line-height: .94;
  text-shadow: none;
  text-transform: uppercase;
}

.public-hero .public-hero-copy {
  max-width: 760px;
  color: #2e2e2a;
  font-size: 17px;
  line-height: 1.7;
  text-shadow: none;
}

.public-actions {
  margin-top: 30px;
}

.public-cta {
  min-height: 50px;
  padding: 0 22px;
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
}

.public-actions .secondary.is-outlined {
  border-color: #111;
  background: #fff;
  color: #111;
}

.public-home-content {
  width: 100%;
  margin: 0;
}

.public-proof {
  border-bottom: 1px solid var(--line);
}

.public-proof span {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-right-color: var(--line);
  color: var(--text);
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
}

.public-section {
  grid-template-columns: minmax(250px, 4fr) minmax(0, 8fr);
  gap: 0;
  padding: 0;
  border-bottom: 1px solid var(--line);
}

.public-section-heading,
.public-section > p,
.public-section > div:last-child {
  padding: 54px 48px;
}

.public-section-heading {
  border-right: 1px solid var(--line);
}

.public-section-heading h2 {
  max-width: 390px;
  font-size: 30px;
  text-transform: uppercase;
}

.public-section > p,
.public-section > div:last-child > p,
.public-section li {
  color: var(--soft);
}

.public-note {
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-left: 0;
  color: var(--muted) !important;
  font-family: var(--mono);
}

.public-grid {
  border-bottom-color: var(--line);
}

.public-grid article,
.public-grid article + article {
  min-height: 260px;
  padding: 42px;
  border-right-color: var(--line);
  background: #fff;
}

.public-grid article:hover {
  background: #f5f5f1;
}

.public-grid h3 {
  margin-top: 42px;
  font-size: 20px;
  text-transform: uppercase;
}

.public-footer {
  min-height: 124px;
  padding: 28px 42px;
  background: #f6f6f2;
}

/* Guide, policy, and support */
.legal-shell {
  width: min(calc(100% - 48px), 1120px);
  min-height: calc(100dvh - 48px);
  margin: 24px auto;
  padding: 0 50px 50px;
  overflow: hidden;
  border: 1px solid #333;
  border-radius: 8px;
  background: #fff;
}

.legal-toolbar {
  min-height: 86px;
  margin: 0 -50px 52px;
  padding: 18px 50px;
  border-bottom-color: var(--line);
}

.legal-back {
  color: var(--text);
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
}

.legal-shell > h1 {
  max-width: 900px;
  font-size: 72px;
  font-weight: 600;
  line-height: .98;
  text-transform: uppercase;
}

.legal-updated {
  margin-bottom: 34px;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.legal-shell > section,
.guide-section {
  display: grid;
  grid-template-columns: minmax(220px, .72fr) minmax(0, 1.28fr);
  gap: 36px;
  padding: 34px 0;
  border-bottom-color: var(--line);
}

.legal-shell section h2,
.guide-section h2 {
  margin: 0;
  color: var(--text);
  font-size: 18px;
  text-transform: uppercase;
}

.legal-shell section h3,
.guide-section h3 {
  grid-column: 2;
}

.legal-shell section p,
.legal-shell section ul,
.legal-shell section ol,
.guide-list,
.guide-section > p {
  grid-column: 2;
  margin-top: 0;
}

.legal-shell section p,
.legal-shell section li,
.guide-list li {
  color: var(--soft);
}

.guide-callout {
  display: block !important;
  margin: 0;
  padding: 26px 0 !important;
  border-top: 1px solid var(--line) !important;
  border-bottom: 1px solid var(--line) !important;
  border-left: 0 !important;
  color: var(--text);
  font-size: 18px;
}

.guide-note {
  padding: 15px 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
}

/* Lyrics workspace */
.lyrics-page {
  --lyrics-surface: #ffffff;
  --lyrics-surface-raised: #f4f4f0;
  --lyrics-surface-soft: #ffffff;
  --lyrics-line: #ddddd7;
  --lyrics-line-strong: #8b8b84;
  --lyrics-blue: #1559c7;
  --lyrics-teal: #1559c7;
  --lyrics-green: #12633c;
  --lyrics-yellow: #8c5700;
  --lyrics-red: #a32b21;
}

.lyrics-topbar {
  position: sticky;
  width: min(calc(100% - 48px), 1480px);
  min-height: 88px;
  margin: 24px auto 0;
  padding: 16px 34px;
  border: 1px solid #333;
  border-bottom-color: var(--line);
  border-radius: 8px 8px 0 0;
  background: #fff;
  backdrop-filter: none;
}

.lyrics-brand {
  color: var(--text);
  text-transform: uppercase;
}

.lyrics-brand small {
  color: var(--muted);
  font-family: var(--mono);
  text-transform: uppercase;
}

.lyrics-shell {
  width: min(calc(100% - 48px), 1480px);
  margin: 0 auto 24px;
  padding: 0 34px 42px;
  overflow: hidden;
  border: 1px solid #333;
  border-top: 0;
  border-radius: 0 0 8px 8px;
  background: #fff;
}

.lyrics-intro {
  min-height: 230px;
  padding: 44px 0 30px;
  border-bottom-color: var(--line);
}

.lyrics-intro h1 {
  max-width: 980px;
  font-size: 64px;
  font-weight: 600;
  line-height: 1;
  text-transform: uppercase;
}

.lyrics-intro p:not(.eyebrow) {
  color: var(--soft);
}

.lyrics-capability {
  border: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
  color: var(--muted);
  text-transform: uppercase;
}

.lyrics-layout {
  gap: 0;
  margin-top: 0;
  border-left: 1px solid var(--line);
}

.lyrics-workspace,
.lyrics-history {
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
}

.lyrics-section,
.lyrics-history {
  padding: 28px;
}

.lyrics-section {
  border-bottom-color: var(--line);
}

.lyrics-section-head,
.history-head {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.lyrics-section-head h2,
.history-head h2 {
  text-transform: uppercase;
}

.lyrics-section-head p {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
}

.lyrics-picker-grid {
  gap: 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.lyrics-picker {
  min-height: 170px;
  padding: 22px;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
}

.lyrics-picker.featured,
.lyrics-picker:hover,
.lyrics-picker:focus-within {
  border-color: var(--line);
  background: #f2f2ee;
}

.picker-button {
  border: 1px solid #111;
  border-radius: 999px;
  background: #fff;
  color: #111;
}

.pairing-note,
.paste-help,
#outputModeHelp {
  color: var(--muted);
}

.separate-pickers {
  border-top-color: var(--line);
}

.paste-mode,
.lyrics-output-mode,
.suno-helper,
.batch-toolbar,
.batch-empty,
.lyrics-toggle {
  border-color: var(--line);
  border-radius: 0;
  background: #fff;
}

.batch-empty {
  border-style: dashed;
}

.batch-row[data-tone="warning"] {
  border-left: 3px solid var(--warning);
}

.batch-row[data-tone="error"] {
  border-left: 3px solid var(--danger);
}

.batch-row[data-tone="success"] {
  border-left: 3px solid var(--success);
}

.batch-file {
  border-color: var(--line);
  border-radius: 0;
  background: #f7f7f3;
}

.lyrics-output-mode {
  border-color: var(--line-strong);
}

.lyrics-history {
  top: 110px;
  max-height: calc(100dvh - 158px);
}

.lyrics-jobs {
  border-top-color: var(--line);
}

.lyrics-start {
  border-radius: 0;
  text-transform: uppercase;
}

/* Bidirectional layout support */
[dir="rtl"] .public-section-heading,
[dir="rtl"] .workflow-nav,
[dir="rtl"] .lyrics-workspace {
  border-right: 0;
  border-left: 1px solid var(--line);
}

@media (max-width: 1240px) {
  .app,
  .public-home-shell,
  .lyrics-topbar,
  .lyrics-shell,
  .legal-shell {
    width: calc(100% - 24px);
    margin-right: 12px;
    margin-left: 12px;
  }

  .topbar {
    grid-template-columns: minmax(210px, auto) 1fr;
  }

  .workflow-nav {
    position: relative;
    top: auto;
  }

  .workspace {
    grid-template-areas:
      "setup language"
      "channel language"
      "run history";
    grid-template-columns: minmax(300px, .88fr) minmax(420px, 1.12fr);
    grid-template-rows: minmax(410px, auto) minmax(260px, auto) minmax(410px, auto);
    height: auto;
    overflow: visible;
  }

  .workspace > .section {
    height: auto;
    max-height: min(68dvh, 720px);
  }
}

@media (max-width: 980px) {
  .auth-view {
    padding: 18px;
  }

  .auth-view::before,
  .auth-view::after {
    inset: 18px;
    border: 0;
    border-radius: 8px;
  }

  .auth-view::after {
    background: rgb(255 255 255 / 76%);
  }

  .auth-shell {
    margin-right: 0;
    border-radius: 8px;
  }

  .public-section {
    grid-template-columns: 1fr;
  }

  .public-section-heading {
    padding-bottom: 20px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .public-section > p,
  .public-section > div:last-child {
    padding-top: 28px;
  }

  .legal-shell > section,
  .guide-section {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .legal-shell section h3,
  .legal-shell section p,
  .legal-shell section ul,
  .legal-shell section ol,
  .guide-list,
  .guide-section > p {
    grid-column: 1;
  }
}

@media (max-width: 720px) {
  body {
    background: #fff;
  }

  .auth-view {
    padding: 0;
    background: #fff;
  }

  .auth-view::before,
  .auth-view::after {
    display: none;
  }

  .auth-shell {
    width: 100%;
    padding: 26px 18px 34px;
    border: 0;
    border-radius: 0;
  }

  .auth-shell h1 {
    font-size: 42px;
  }

  .app,
  .public-home-shell,
  .lyrics-topbar,
  .lyrics-shell,
  .legal-shell {
    width: 100%;
    min-height: 100dvh;
    margin: 0;
    border: 0;
    border-radius: 0;
  }

  .app {
    overflow: visible;
  }

  .topbar {
    min-height: 72px;
    padding: 10px 14px;
    border-right: 0;
    border-left: 0;
  }

  .brand strong {
    font-size: 16px;
  }

  .mobile-menu-button {
    border-radius: 999px;
  }

  .top-actions {
    background: #fff;
  }

  .status-pills {
    gap: 14px;
  }

  .notice {
    padding: 12px 14px;
  }

  .workspace-layout {
    display: block;
    margin-top: 0;
    border-top: 0;
  }

  .workflow-nav {
    position: sticky;
    top: 72px;
    display: flex !important;
    padding: 0;
    overflow-x: auto;
    background: #f7f7f3;
    scroll-snap-type: x proximity;
  }

  .workflow-nav::before {
    display: none;
  }

  .workflow-nav-item {
    width: 142px;
    min-width: 142px;
    min-height: 52px;
    border-right: 1px solid var(--line);
    scroll-snap-align: start;
  }

  .workspace {
    display: block;
    height: auto;
    padding: 0;
    overflow: visible;
    background: #fff;
  }

  .workspace > .section {
    height: auto;
    max-height: none;
    padding: 22px 16px;
    overflow: visible;
    border-right: 0;
    scroll-margin-top: 136px;
  }

  .section-heading {
    padding-bottom: 14px;
  }

  .language-toolbar {
    border-bottom: 0;
  }

  .language-toolbar input,
  .language-toolbar button {
    border-bottom: 1px solid var(--line);
  }

  .language-option {
    border-right: 0;
  }

  .language-list {
    max-height: min(62dvh, 560px);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
  }

  .history-section .job-list {
    max-height: 420px;
    overflow-y: auto;
  }

  .channel-list,
  .result {
    max-height: min(46dvh, 420px);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
  }

  .run-dock {
    border-top: 1px solid #111;
    background: #fff;
    box-shadow: 0 -10px 24px rgb(0 0 0 / 12%);
  }

  .admin-workspace {
    margin: 0;
    padding: 0 14px 30px;
  }

  .admin-header h1 {
    font-size: 34px;
  }

  .admin-operation-panel,
  .admin-chart-section {
    padding: 20px 16px !important;
  }

  .public-home-nav,
  .public-nav-inner {
    min-height: 70px;
  }

  .public-nav-inner {
    width: 100%;
    padding: 10px 14px;
  }

  .public-hero {
    height: auto;
    min-height: 620px;
  }

  .public-hero-inner {
    width: 100%;
    padding: 38px 18px 42px;
  }

  .public-hero h1 {
    font-size: 52px;
    line-height: .98;
  }

  .public-proof {
    grid-template-columns: 1fr;
  }

  .public-section-heading,
  .public-section > p,
  .public-section > div:last-child {
    padding: 34px 18px;
  }

  .public-grid {
    grid-template-columns: 1fr;
  }

  .public-grid article,
  .public-grid article + article {
    min-height: 0;
    padding: 32px 18px;
    border-right: 0;
  }

  .public-footer {
    padding: 28px 18px;
  }

  .legal-shell {
    padding: 0 18px 40px;
  }

  .legal-toolbar {
    min-height: 74px;
    margin: 0 -18px 38px;
    padding: 12px 18px;
  }

  .legal-shell > h1 {
    font-size: 48px;
  }

  .lyrics-topbar {
    position: sticky;
    min-height: 74px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--line);
  }

  .lyrics-shell {
    min-height: 0;
    padding: 0 14px 36px;
  }

  .lyrics-intro {
    padding: 34px 0 24px;
  }

  .lyrics-intro h1 {
    font-size: 42px;
  }

  .lyrics-layout {
    border-left: 0;
  }

  .lyrics-workspace,
  .lyrics-history {
    border-right: 0;
    border-left: 1px solid var(--line);
  }

  .lyrics-section,
  .lyrics-history {
    padding: 22px 16px;
  }

  .lyrics-picker-grid {
    grid-template-columns: 1fr;
  }

  .lyrics-picker {
    border-right: 0;
  }

  .billing-modal-content,
  .notice-board-card,
  .job-result-card,
  .open-chat-card,
  .maintenance-card,
  .completion-card {
    padding: 20px 16px;
  }
}

/* Compact desktop workbench
 * Three permanent work zones replace the tall five-step navigator. Only
 * genuinely long collections scroll: languages, channels, results, and jobs.
 */
body:has(> #appView:not([hidden])) {
  overflow: hidden;
}

.app {
  display: flex;
  width: min(calc(100% - 16px), 1720px);
  height: calc(100dvh - 16px);
  min-height: 620px;
  margin: 8px auto;
  overflow: hidden;
  border: 1px solid #333;
  border-radius: 6px;
  background: #fff;
  box-shadow: none;
  flex-direction: column;
}

.topbar {
  position: relative;
  top: auto;
  z-index: 40;
  display: grid;
  min-height: 60px;
  flex: 0 0 60px;
  grid-template-columns: minmax(190px, auto) minmax(160px, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 8px 14px;
  background: #fff;
}

.brand {
  gap: 10px;
}

.brand strong {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand > div > span {
  font-family: var(--font);
  font-size: 11px;
  text-transform: none;
}

.status-pills {
  gap: 12px;
}

.status-pills > span,
.status-pills > span.is-off {
  min-height: 28px;
  font-family: var(--font);
  font-size: 11px;
  font-weight: 650;
  text-transform: none;
}

.status-pills i {
  width: 6px;
  height: 6px;
}

.top-actions {
  gap: 5px;
}

.top-actions > span,
.top-actions button,
.top-actions a {
  font-family: var(--font);
  text-transform: none;
}

.top-actions button,
.top-actions a,
.app-language-picker select {
  min-height: 34px;
  border-radius: 4px;
  font-size: 12px;
}

.notice {
  display: flex;
  min-height: 36px;
  flex: 0 0 36px;
  align-items: center;
  padding: 7px 18px;
  overflow: hidden;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-layout {
  display: block;
  min-height: 0;
  flex: 1 1 auto;
  margin: 0;
  overflow: hidden;
  border: 0;
  background: #fff;
}

.workspace {
  display: grid;
  width: 100%;
  height: 100%;
  min-height: 0;
  grid-template-areas: none;
  grid-template-columns: minmax(320px, .92fr) minmax(420px, 1.16fr) minmax(360px, 1fr);
  grid-template-rows: minmax(0, 1fr);
  gap: 1px;
  padding: 0;
  overflow: hidden;
  background: var(--line);
}

.setup-section,
.channel-section,
.language-section,
.run-section,
.history-section {
  grid-area: auto;
}

.configuration-column,
.execution-column {
  display: grid;
  min-width: 0;
  min-height: 0;
  gap: 1px;
  overflow: hidden;
  background: var(--line);
}

.configuration-column {
  /* Let setup stop at its content height and give the saved space to channels. */
  grid-template-rows: 40px minmax(270px, max-content) minmax(232px, 1fr);
}

.execution-column {
  grid-template-rows: minmax(0, 1fr) minmax(136px, .42fr);
}

.workflow-nav {
  position: relative;
  top: auto;
  z-index: 2;
  display: grid !important;
  min-width: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: #f6f6f2;
  backdrop-filter: none;
}

.workflow-nav-item {
  min-width: 0;
  min-height: 40px;
  padding: 0 12px;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.workflow-nav-item:last-child {
  border-right: 0;
}

.workflow-nav-item:hover {
  background: #efefea;
  color: var(--text);
}

.workflow-nav-item.active {
  border-bottom-color: var(--accent);
  background: #fff;
  color: var(--text);
}

.workflow-nav-item strong {
  font-size: 13px;
  font-weight: 750;
}

.workspace .section,
.configuration-column > .section,
.execution-column > .section {
  display: block;
  width: auto;
  height: auto;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 13px 15px;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
  scroll-margin-top: 104px;
}

.workspace .section-heading {
  min-height: 38px;
  align-items: center;
  gap: 10px;
  margin: 0 0 9px;
  padding: 0 0 8px;
  border-bottom: 1px solid var(--line);
}

.workspace .section-heading > div:first-child {
  gap: 0;
}

.workspace .section-heading h2 {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.2;
  text-transform: none;
}

.workspace .section-heading p {
  margin-top: 2px;
  font-family: var(--font);
  font-size: 11px;
  line-height: 1.3;
}

.workspace .step {
  display: none;
}

.workspace button,
.workspace input,
.workspace select,
.workspace textarea {
  border-radius: 4px;
}

.workspace input,
.workspace select,
.workspace textarea {
  min-height: 38px;
  padding: 7px 9px;
  font-size: 13px;
}

.workspace button {
  min-height: 34px;
  font-size: 12px;
  text-transform: none;
}

.settings-actions {
  gap: 5px;
}

.save-state {
  min-height: 27px;
  padding: 2px 8px;
  border-radius: 4px;
  font-family: var(--font);
  font-size: 10px;
  text-transform: none;
}

.save-button {
  min-height: 34px !important;
  padding: 0 10px;
  white-space: nowrap;
}

.provider-tabs {
  gap: 0;
  margin: 0 0 8px;
  padding: 0;
  border-radius: 4px;
}

.provider-tabs button,
.segmented button {
  min-height: 34px;
  border-radius: 0;
  font-size: 12px;
}

.settings-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  gap: 7px 9px;
  margin: 0;
}

.settings-grid label > span,
.settings-grid .field-title,
.run-section label > span {
  margin-bottom: 4px;
  font-family: var(--font);
  font-size: 11px;
}

.input-action {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0;
}

.input-action button {
  min-width: 70px;
  border-radius: 0 4px 4px 0;
}

.source-language-segmented {
  gap: 0;
  padding: 0;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.source-language-segmented button {
  padding: 3px 4px;
  line-height: 1.2;
  white-space: normal;
}

.helper-note,
.oauth-help {
  margin: 7px 0 0;
  font-family: var(--font);
  font-size: 11px;
  line-height: 1.35;
}

.helper-note {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.channel-section,
.language-section,
.run-section,
.history-section {
  display: flex !important;
  overflow: hidden !important;
  flex-direction: column;
}

.channel-section .section-heading,
.history-section .section-heading {
  min-height: 34px;
  margin-bottom: 7px;
}

.connect-button,
#refreshJobs {
  min-height: 32px !important;
  padding: 0 9px;
  white-space: nowrap;
}

.channel-list,
.history-section .job-list {
  min-height: 0;
  flex: 1 1 auto;
  gap: 0;
  overflow-y: auto;
  border-top: 0;
}

/* Two connected channels remain visible before the list starts scrolling. */
.channel-section .channel-list {
  min-height: 112px;
  max-height: 150px;
  flex: 0 1 150px;
}

.channel-item,
.job-item {
  padding: 8px 0;
}

.channel-item {
  min-height: 56px;
  gap: 8px;
}

.channel-item img {
  width: 34px;
  height: 34px;
}

.oauth-help {
  display: -webkit-box;
  flex: 0 0 auto;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.language-section .section-heading {
  flex: 0 0 auto;
}

.language-toolbar {
  display: grid;
  min-height: 36px;
  flex: 0 0 auto;
  grid-template-columns: minmax(112px, 1fr) repeat(5, auto);
  gap: 0;
  margin: 0 0 7px;
  border: 1px solid var(--line-strong);
}

.language-toolbar input,
.language-toolbar button {
  min-width: 0;
  min-height: 34px;
  padding: 5px 8px;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  font-size: 11px;
}

.language-toolbar input {
  grid-column: auto;
}

.language-toolbar button:last-child {
  border-right: 0;
}

.language-list {
  display: grid;
  min-height: 0;
  max-height: none;
  flex: 1 1 auto;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 0;
  padding: 0;
  overflow-y: auto;
  border: 1px solid var(--line);
}

.language-option {
  min-height: 35px;
  padding: 6px 9px;
  gap: 8px;
}

.language-option input {
  width: 17px;
  min-width: 17px;
  height: 17px;
  min-height: 17px;
}

.language-option span {
  font-size: 12px;
}

.run-section > label {
  display: grid;
  flex: 0 0 auto;
  gap: 0;
}

.run-section textarea {
  height: 68px;
  min-height: 68px;
  max-height: 88px;
  resize: vertical;
}

.video-paste-button {
  min-height: 34px !important;
  flex: 0 0 auto;
  margin-top: 6px;
}

.run-dock {
  flex: 0 0 auto;
  margin-top: 6px;
}

.run-button {
  min-height: 44px !important;
  margin-top: 0;
  border-radius: 4px !important;
  font-size: 14px !important;
  text-transform: none;
}

.progress-area {
  flex: 0 0 auto;
  margin-top: 8px;
  padding-top: 8px;
}

.result-heading {
  flex: 0 0 auto;
  margin-top: 8px;
  padding-top: 8px;
}

.result-heading strong {
  font-size: 12px;
}

.result-heading span {
  font-size: 10px;
}

.result {
  min-height: 58px;
  flex: 1 1 auto;
  margin-top: 5px;
  padding: 8px 0;
  overflow-y: auto;
  font-size: 12px;
}

.history-section .job-list {
  padding-right: 2px;
}

.job-item p {
  margin-top: 4px;
  font-size: 11px;
}

.language-list,
.channel-list,
.result,
.history-section .job-list {
  scrollbar-width: thin;
  scrollbar-color: #8b8b84 #f2f2ee;
  scrollbar-gutter: stable;
}

.language-list::-webkit-scrollbar,
.channel-list::-webkit-scrollbar,
.result::-webkit-scrollbar,
.history-section .job-list::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.language-list::-webkit-scrollbar-track,
.channel-list::-webkit-scrollbar-track,
.result::-webkit-scrollbar-track,
.history-section .job-list::-webkit-scrollbar-track {
  background: #f2f2ee;
}

.language-list::-webkit-scrollbar-thumb,
.channel-list::-webkit-scrollbar-thumb,
.result::-webkit-scrollbar-thumb,
.history-section .job-list::-webkit-scrollbar-thumb {
  border: 1px solid #f2f2ee;
  border-radius: 0;
  background: #8b8b84;
}

.app-legal-links {
  min-height: 30px;
  flex: 0 0 30px;
  gap: 4px 18px;
  overflow: hidden;
  border-top: 1px solid var(--line);
  background: #f7f7f3;
}

.app-legal-links a {
  min-height: 30px;
  font-family: var(--font);
  font-size: 10px;
  text-transform: none;
}

@media (min-width: 1500px) {
  .language-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-height: 760px) and (min-width: 1181px) {
  .app {
    min-height: 580px;
  }

  .topbar {
    min-height: 56px;
    flex-basis: 56px;
    padding-top: 6px;
    padding-bottom: 6px;
  }

  .notice {
    min-height: 32px;
    flex-basis: 32px;
    padding-top: 5px;
    padding-bottom: 5px;
  }

  .configuration-column {
    grid-template-rows: 38px minmax(258px, max-content) minmax(199px, 1fr);
  }

  .execution-column {
    grid-template-rows: minmax(0, 1fr) minmax(120px, .36fr);
  }

  .workflow-nav-item {
    min-height: 38px;
  }

  .workspace .section {
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .workspace .section-heading {
    min-height: 32px;
    margin-bottom: 6px;
    padding-bottom: 6px;
  }

  .workspace .section-heading p {
    display: none;
  }

  .provider-tabs {
    margin-bottom: 6px;
  }

  .provider-tabs button,
  .segmented button,
  .workspace input,
  .workspace select {
    min-height: 34px;
  }

  .helper-note {
    -webkit-line-clamp: 1;
  }

  .channel-section .channel-list {
    min-height: 112px;
  }

  .oauth-help {
    -webkit-line-clamp: 1;
  }

  .run-section textarea {
    height: 60px;
    min-height: 60px;
  }

  .run-button {
    min-height: 40px !important;
  }

  .app-legal-links,
  .app-legal-links a {
    min-height: 26px;
  }

  .app-legal-links {
    flex-basis: 26px;
  }
}

@media (max-width: 1280px) {
  .status-pills {
    display: none;
  }

  .topbar {
    grid-template-columns: minmax(190px, 1fr) auto;
  }
}

@media (max-width: 1180px) {
  .app {
    width: calc(100% - 12px);
    height: auto;
    min-height: calc(100dvh - 12px);
    margin: 6px;
    overflow: visible;
  }

  .workspace-layout {
    overflow: visible;
  }

  .workspace {
    height: auto;
    min-height: 980px;
    grid-template-columns: minmax(300px, .86fr) minmax(420px, 1.14fr);
    overflow: visible;
  }

  .configuration-column {
    min-height: 760px;
  }

  .language-section {
    min-height: 760px;
  }

  .execution-column {
    min-height: 520px;
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1.3fr) minmax(280px, .7fr);
    grid-template-rows: minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  body,
  body:has(> #appView:not([hidden])) {
    overflow-y: auto;
    background: #fff;
  }

  .app {
    width: 100%;
    min-height: 100dvh;
    margin: 0;
    border: 0;
    border-radius: 0;
  }

  .topbar {
    position: sticky;
    top: 0;
    min-height: 60px;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .notice {
    position: sticky;
    top: 60px;
    z-index: 30;
  }

  .workspace {
    display: block;
    min-height: 0;
  }

  .configuration-column,
  .execution-column {
    display: block;
    min-height: 0;
    overflow: visible;
  }

  .workflow-nav {
    position: sticky;
    top: 92px;
    z-index: 20;
  }

  .workspace .section,
  .configuration-column > .section,
  .execution-column > .section {
    min-height: 0;
    padding: 18px 16px;
    overflow: visible !important;
    border-bottom: 1px solid var(--line);
    scroll-margin-top: 138px;
  }

  .settings-grid {
    grid-template-columns: 1fr;
  }

  .settings-grid > div:last-child {
    grid-column: 1;
  }

  .source-language-segmented {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .language-toolbar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .language-toolbar input {
    grid-column: 1 / -1;
  }

  .language-list {
    max-height: min(58dvh, 520px);
    grid-template-columns: 1fr;
  }

  .channel-list,
  .result,
  .history-section .job-list {
    max-height: min(45dvh, 420px);
  }

  .run-section textarea {
    height: 92px;
  }

  .run-dock {
    position: static;
    inset: auto;
    z-index: auto;
    margin-top: 8px;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .app-legal-links {
    min-height: 42px;
    flex-basis: auto;
    padding: 6px 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
