:root {
  --portal-bg: #101418;
  --portal-panel: #171d22;
  --portal-panel-alt: #20282f;
  --portal-border: rgba(255, 255, 255, 0.1);
  --portal-text: #f1f4f5;
  --portal-muted: #a6b0b6;
  --portal-accent: #e2d703;
  --portal-info: #75c8d6;
  --portal-danger: #e77a7a;
  --portal-success: #86d39b;
  --portal-input-bg: #0d1318;
  --portal-input-bg-focus: #111a20;
  --portal-input-border: rgba(255, 255, 255, 0.16);
  --portal-input-border-focus: #e2d703;
  --portal-input-placeholder: #7f8b92;
  --portal-focus-ring: rgba(226, 215, 3, 0.22);
  --portal-field-gap: 8px;
  --portal-input-height: 52px;
  --portal-touch-target: 48px;
  --portal-input-radius: 8px;
  --portal-ip-preview-size: 76px;
  --portal-page-ip-size: 176px;
  --portal-space-1: 4px;
  --portal-space-2: 8px;
  --portal-space-3: 12px;
  --portal-space-4: 16px;
  --portal-space-5: 20px;
  --portal-space-6: 24px;
  --portal-space-8: 32px;
  --portal-page-header-offset: 96px;
  --portal-panel-shadow: 0 18px 36px rgba(0, 0, 0, 0.2);
  --portal-sheet-overlay: rgba(0, 0, 0, 0.66);
}

.portal-page {
  min-height: 100vh;
  background: var(--portal-bg);
  color: var(--portal-text);
  font-family: "Microsoft YaHei", "Noto Sans SC", Arial, sans-serif;
}

.portal-page > main { flex: 1 0 auto; }
.portal-page > .site-footer { margin-top: auto; }

.portal-auth-page { padding-top: 96px; }
.portal-auth-page .header { background: var(--portal-bg); border-bottom: 1px solid var(--portal-border); }
.portal-auth-page .header .container { width: min(1320px, calc(100% - 40px)); margin-inline: auto; }
.portal-auth-page .header .navbar-link { color: var(--white); }
.portal-auth-page .portal-narrow { padding-top: 40px; }

.portal-page *, .portal-page *::before, .portal-page *::after { box-sizing: border-box; }
.portal-page a { color: inherit; }
.portal-page button, .portal-page input, .portal-page textarea, .portal-page select { font: inherit; }
[hidden] { display: none !important; }

body:not([data-site-logo-ready]) [data-site-logo] { visibility: hidden; }
body:not([data-site-ip-ready]) [data-site-ip] { visibility: hidden; }
body:not([data-site-hero-ready]) .hero,
body:not([data-site-hero-ready]).catalog-page[data-catalog-type="web"] .catalog-hero {
  background-image: none !important;
  background-color: var(--portal-bg, #101418);
}

.portal-header {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(20px, 5vw, 72px);
  border-bottom: 1px solid var(--portal-border);
  background: #0e1215;
}

.portal-brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 700; }
.portal-brand img { width: 118px; height: auto; }
.portal-nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.portal-nav a { padding: 8px 12px; color: var(--portal-muted); text-decoration: none; }
.portal-nav a:hover, .portal-nav a[aria-current="page"] { color: var(--portal-text); }

.portal-wrap { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 38px 0 64px; }
.portal-narrow { width: min(520px, calc(100% - 40px)); margin: 0 auto; padding: 56px 0; }
.portal-title { margin: 0 0 8px; font-size: clamp(26px, 4vw, 42px); line-height: 1.2; }
.portal-lede { margin: 0 0 28px; color: var(--portal-muted); }
.portal-section-title { margin: 0 0 16px; font-size: 20px; }

.portal-panel { padding: 22px; border: 1px solid var(--portal-border); background: var(--portal-panel); border-radius: 6px; }
.portal-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.portal-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 24px; align-items: start; }
.portal-stack { display: grid; gap: 16px; }

.portal-form { display: grid; gap: 14px; }
.portal-form label { display: grid; gap: 7px; color: var(--portal-muted); font-size: 14px; }
.portal-form-inline { grid-template-columns: minmax(120px, 0.8fr) minmax(220px, 1.4fr) minmax(150px, 0.9fr) auto; align-items: end; gap: var(--portal-field-gap); }
.portal-form-inline > label { min-width: 0; }
.portal-form-inline .portal-form-submit { min-height: var(--portal-touch-target); }
.portal-form-inline .portal-message { min-height: 0; }
.portal-form input, .portal-form textarea, .portal-form select {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--portal-border);
  border-radius: 4px;
  outline: 0;
  color: var(--portal-text);
  background: #0f1418;
}
.portal-form textarea { min-height: 120px; resize: vertical; }
.portal-form input:focus, .portal-form textarea:focus, .portal-form select:focus { border-color: var(--portal-info); }
.portal-form input[type="file"] { padding: 8px; }
.portal-check { display: flex !important; grid-template-columns: auto 1fr; align-items: center; gap: 8px !important; }
.portal-check input { width: 18px; min-height: 18px; }

.portal-auth-field { display: grid; gap: var(--portal-field-gap); }
.portal-auth-field > .portal-field-label { display: block; color: var(--portal-text); font-size: 14px; font-weight: 600; line-height: 20px; }
.portal-auth-field > input,
.portal-input-shell > input {
  min-height: var(--portal-input-height);
  padding: 14px 16px;
  border: 1px solid var(--portal-input-border);
  border-radius: var(--portal-input-radius);
  color: var(--portal-text);
  background: var(--portal-input-bg);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035), 0 1px 2px rgba(0, 0, 0, 0.18);
  font-size: 16px;
  line-height: 24px;
  transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}
.portal-auth-field > input::placeholder,
.portal-input-shell > input::placeholder { color: var(--portal-input-placeholder); opacity: 1; }
.portal-auth-field > input:hover,
.portal-input-shell > input:hover { border-color: rgba(255, 255, 255, 0.28); background: var(--portal-input-bg-focus); }
.portal-auth-field > input:focus,
.portal-input-shell > input:focus {
  border-color: var(--portal-input-border-focus);
  background: var(--portal-input-bg-focus);
  box-shadow: 0 0 0 3px var(--portal-focus-ring), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.portal-auth-field > input:-webkit-autofill,
.portal-auth-field > input:-webkit-autofill:hover,
.portal-input-shell > input:-webkit-autofill,
.portal-input-shell > input:-webkit-autofill:hover {
  -webkit-text-fill-color: var(--portal-text);
  caret-color: var(--portal-text);
  box-shadow: 0 0 0 1000px var(--portal-input-bg) inset, inset 0 1px 0 rgba(255, 255, 255, 0.035);
}
.portal-auth-field > input:-webkit-autofill:focus,
.portal-input-shell > input:-webkit-autofill:focus {
  box-shadow: 0 0 0 1000px var(--portal-input-bg-focus) inset, 0 0 0 3px var(--portal-focus-ring);
}
.portal-input-shell { position: relative; }
.portal-input-shell > input { width: 100%; padding-inline-end: calc(var(--portal-touch-target) + 20px); }
.portal-input-action {
  position: absolute;
  inset-block: 2px;
  inset-inline-end: 2px;
  min-width: var(--portal-touch-target);
  min-height: var(--portal-touch-target);
  padding: 0 10px;
  border: 0;
  border-inline-start: 1px solid var(--portal-border);
  color: var(--portal-info);
  background: transparent;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
}
.portal-input-action:hover { color: var(--portal-text); background: rgba(117, 200, 214, 0.08); }
.portal-input-action:focus-visible { border-radius: 4px; outline: 2px solid var(--portal-accent); outline-offset: -2px; }

.portal-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.portal-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--portal-touch-target);
  padding: 9px 16px;
  border: 1px solid transparent;
  border-radius: 4px;
  color: #0f1214;
  background: var(--portal-accent);
  cursor: pointer;
  font-weight: 700;
  text-decoration: none;
}
.portal-button:hover { filter: brightness(1.08); }
.portal-button.secondary { color: var(--portal-text); border-color: var(--portal-border); background: transparent; }
.portal-button.danger { color: #fff; background: var(--portal-danger); }
.portal-button:disabled { cursor: not-allowed; opacity: 0.55; }
.portal-button:focus-visible { outline: 2px solid var(--portal-accent); outline-offset: 2px; }

.portal-tabs { display: flex; gap: 6px; margin-bottom: 22px; overflow-x: auto; border-bottom: 1px solid var(--portal-border); }
.portal-tab { padding: 12px 14px; border: 0; border-bottom: 2px solid transparent; color: var(--portal-muted); background: transparent; cursor: pointer; white-space: nowrap; }
.portal-tab.active { border-color: var(--portal-accent); color: var(--portal-text); }
.portal-view[hidden] { display: none; }

.portal-message { min-height: 22px; color: var(--portal-muted); }
.portal-message.error { color: var(--portal-danger); }
.portal-message.success { color: var(--portal-success); }
.portal-code { padding: 8px 10px; border: 1px solid rgba(226, 215, 3, 0.35); color: var(--portal-accent); background: rgba(226, 215, 3, 0.08); }
.portal-muted { color: var(--portal-muted); }
.portal-status { display: inline-flex; padding: 4px 8px; border-radius: 3px; color: var(--portal-muted); background: var(--portal-panel-alt); font-size: 12px; }
.portal-status.success { color: var(--portal-success); }
.portal-status.danger { color: var(--portal-danger); }

.portal-table-wrap { overflow-x: auto; }
.portal-table { width: 100%; border-collapse: collapse; min-width: 680px; }
.portal-table th, .portal-table td { padding: 12px 10px; border-bottom: 1px solid var(--portal-border); text-align: left; vertical-align: top; }
.portal-table th { color: var(--portal-muted); font-size: 13px; font-weight: 500; }
.portal-table td { font-size: 14px; }
.portal-table .portal-actions { gap: 6px; }
.portal-table .portal-button { min-height: 34px; padding: 6px 10px; font-size: 13px; }

.portal-movie-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 18px; }
.portal-movie-card { overflow: hidden; border: 1px solid var(--portal-border); background: var(--portal-panel); border-radius: 5px; }
.portal-movie-card img { display: block; width: 100%; aspect-ratio: 2 / 3; object-fit: cover; background: #252d33; }
.portal-movie-card-body { padding: 12px; }
.portal-movie-card h3 { margin: 0 0 6px; font-size: 16px; }
.portal-movie-card p { margin: 0; color: var(--portal-muted); font-size: 13px; }
.portal-movie-card a { text-decoration: none; }

.portal-empty { padding: 26px 0; color: var(--portal-muted); text-align: center; }
.portal-kpi { display: grid; gap: 4px; padding: 16px; border-left: 3px solid var(--portal-accent); background: var(--portal-panel-alt); }
.portal-kpi strong { font-size: 25px; }
.portal-kpi span { color: var(--portal-muted); font-size: 13px; }
.portal-plan { display: grid; gap: 12px; }
.portal-plan strong { font-size: 26px; color: var(--portal-accent); }
.portal-plan ul { margin: 0; padding-left: 18px; color: var(--portal-muted); line-height: 1.8; }
.portal-preview { max-width: 100%; max-height: 220px; object-fit: cover; border: 1px solid var(--portal-border); }
.portal-logo-row { display: grid; grid-template-columns: max-content 160px minmax(0, 1fr) max-content; align-items: center; gap: 12px; }
.portal-logo-row .portal-section-title { margin: 0; }
.portal-logo-preview { display: block; width: 160px; height: 64px; max-width: 100%; padding: 8px; object-fit: contain; border: 1px solid var(--portal-border); background: var(--portal-input-bg); }
.portal-logo-form { display: grid; grid-template-columns: minmax(180px, 1fr) auto; align-items: center; gap: 12px; min-width: 0; }
.portal-logo-form input[type="file"] { width: 100%; min-width: 0; }
.portal-logo-row .portal-message { min-height: 0; }

.portal-hero-panel { display: grid; gap: 16px; }
.portal-hero-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.portal-hero-heading .portal-section-title { margin: 0 0 6px; }
.portal-hero-heading .portal-muted { margin: 0; font-size: 12px; overflow-wrap: anywhere; }
.portal-hero-preview {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 7;
  max-height: 240px;
  object-fit: cover;
  border: 1px solid var(--portal-border);
  background: var(--portal-input-bg);
}
.portal-hero-form { grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 12px; }
.portal-hero-form .portal-form-submit { min-height: 44px; }
.portal-hero-form .portal-message { min-height: 0; }

.portal-page-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--portal-page-ip-size);
  align-items: center;
  gap: 24px;
  margin-bottom: 28px;
}
.portal-page-heading .portal-title { margin-bottom: 8px; }
.portal-page-heading .portal-lede { margin-bottom: 0; }
.portal-page-ip {
  display: block;
  width: 100%;
  height: 150px;
  object-fit: contain;
  filter: drop-shadow(0 14px 20px rgba(0, 0, 0, 0.28));
}
.portal-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.portal-panel-heading .portal-section-title { margin: 0; }
.portal-panel-ip {
  flex: 0 0 82px;
  width: 82px;
  height: 82px;
  object-fit: contain;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.24));
}
.portal-empty-illustrated {
  display: grid;
  justify-items: center;
  gap: 8px;
}
.portal-empty-ip {
  display: block;
  width: 104px;
  height: 104px;
  object-fit: contain;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.2));
}
.portal-ip-panel { min-width: 0; }
.portal-ip-list { display: grid; gap: 0; }
.portal-ip-row {
  display: grid;
  grid-template-columns: minmax(130px, 0.8fr) var(--portal-ip-preview-size) minmax(170px, 1fr) minmax(220px, 1.35fr);
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 12px 0;
  border-top: 1px solid var(--portal-border);
}
.portal-ip-row:first-child { border-top: 0; padding-top: 0; }
.portal-ip-label { display: grid; gap: 4px; min-width: 0; }
.portal-ip-label strong { color: var(--portal-text); font-size: 14px; }
.portal-ip-label span { color: var(--portal-muted); font-size: 12px; line-height: 1.45; }
.portal-ip-preview {
  display: block;
  width: var(--portal-ip-preview-size);
  height: var(--portal-ip-preview-size);
  object-fit: contain;
  border: 1px solid var(--portal-border);
  background: var(--portal-input-bg);
}
.portal-ip-select,
.portal-ip-upload input[type="file"] {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 9px 10px;
  border: 1px solid var(--portal-border);
  border-radius: 4px;
  color: var(--portal-text);
  background: var(--portal-input-bg);
}
.portal-ip-select:focus,
.portal-ip-upload input[type="file"]:focus {
  border-color: var(--portal-info);
  outline: 0;
}
.portal-ip-upload {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.portal-ip-upload .portal-button { min-height: 44px; padding-inline: 12px; }

.live-catalog { padding: 66px 0; background: #12181d; }
.live-catalog .container { width: min(1200px, calc(100% - 40px)); margin: auto; }
.live-catalog .section-subtitle, .live-catalog .section-title { color: #fff; }
.live-catalog .section-subtitle { margin-bottom: 8px; color: var(--portal-accent); }
.live-catalog .section-title { margin-bottom: 22px; }
.live-catalog .portal-movie-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }

@media (max-width: 760px) {
  .portal-auth-page { padding-top: 88px; }
  .portal-header { align-items: flex-start; flex-direction: column; }
  .portal-nav { width: 100%; overflow-x: auto; flex-wrap: nowrap; }
  .portal-layout { grid-template-columns: 1fr; }
  .portal-wrap { padding-top: 28px; }
  .portal-panel { padding: 16px; }
  .portal-narrow { width: min(520px, calc(100% - 32px)); padding-bottom: calc(32px + env(safe-area-inset-bottom)); }
  .portal-form { gap: 16px; }
  .portal-form-inline { grid-template-columns: 1fr; }
  .portal-form-inline .portal-form-submit { min-height: 0; }
  .portal-logo-row { grid-template-columns: 1fr; align-items: start; }
  .portal-logo-row .portal-logo-preview { width: 220px; height: 84px; }
  .portal-logo-form { grid-template-columns: 1fr; width: 100%; }
  .portal-hero-heading { display: grid; gap: 8px; }
  .portal-hero-form { grid-template-columns: 1fr; }
  .portal-hero-form .portal-form-submit { min-height: 0; }
  .portal-page-heading { grid-template-columns: 1fr; gap: 8px; }
  .portal-page-ip { justify-self: end; width: 120px; height: 104px; margin-top: -4px; }
  .portal-panel-heading { align-items: flex-start; }
  .portal-panel-ip { flex-basis: 72px; width: 72px; height: 72px; }
  .portal-ip-row { grid-template-columns: minmax(0, 1fr) var(--portal-ip-preview-size); align-items: start; }
  .portal-ip-select, .portal-ip-upload { grid-column: 1 / -1; }
}

@media (min-width: 761px) and (max-width: 980px) {
  .portal-layout { grid-template-columns: 1fr; }
  .portal-form-inline { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .portal-form-inline .portal-form-submit { grid-column: 1 / -1; }
}

/* Publish-work flow */
.portal-publish-page { padding-top: var(--portal-page-header-offset); }
.portal-publish-wrap { width: min(1240px, calc(100% - 40px)); }
.portal-page-title-row,
.portal-section-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--portal-space-3);
}
.portal-page-title-row { margin-bottom: var(--portal-space-6); }
.portal-page-title-row .portal-title,
.portal-section-row .portal-section-title { margin: 0; }
.portal-page-note {
  flex: 0 0 auto;
  color: var(--portal-muted);
  font-size: 14px;
  line-height: 20px;
  white-space: nowrap;
}
.portal-publish-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
  align-items: start;
  gap: var(--portal-space-6);
}
.portal-publish-form { gap: var(--portal-space-6); }
.portal-fieldset {
  display: grid;
  gap: var(--portal-space-4);
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.portal-fieldset legend {
  width: 100%;
  margin-bottom: var(--portal-space-1);
  color: var(--portal-text);
  font-size: 15px;
  font-weight: 700;
}
.portal-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--portal-space-4);
}
.portal-field-label {
  color: var(--portal-muted);
  font-size: 14px;
  line-height: 20px;
}
.portal-select-field {
  position: relative;
  display: grid;
  gap: 7px;
  min-width: 0;
}
.portal-select-field select { min-width: 0; }
.portal-selector-trigger { display: none; }
.portal-upload-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--portal-space-3);
}
.portal-upload-field {
  display: grid !important;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: var(--portal-space-2);
  min-height: 126px;
  padding: var(--portal-space-3);
  border: 1px solid var(--portal-border);
  border-radius: var(--portal-input-radius);
  color: var(--portal-text) !important;
  background: var(--portal-input-bg);
}
.portal-upload-field input[type="file"],
.portal-upload-field .portal-field-help { grid-column: 1 / -1; }
.portal-upload-field input[type="file"] { min-height: 40px; }
.portal-required,
.portal-optional {
  justify-self: end;
  font-size: 12px;
  line-height: 18px;
}
.portal-required { color: var(--portal-accent); }
.portal-optional { color: var(--portal-muted); }
.portal-field-help {
  margin: 0;
  color: var(--portal-muted);
  font-size: 12px;
  line-height: 18px;
  overflow-wrap: anywhere;
}
.portal-field-error {
  min-height: 18px;
  margin: calc(var(--portal-space-2) * -1) 0 0;
  color: var(--portal-danger);
  font-size: 13px;
  line-height: 18px;
}
.portal-rights-check { margin-top: calc(var(--portal-space-2) * -1); }
.portal-upload-progress { display: grid; gap: var(--portal-space-2); }
.portal-upload-progress-track {
  height: var(--portal-space-2);
  overflow: hidden;
  border-radius: var(--portal-space-1);
  background: var(--portal-panel-alt);
}
.portal-upload-progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--portal-accent);
  transition: width 180ms ease;
}
.portal-upload-progress > span { color: var(--portal-muted); font-size: 13px; line-height: 18px; }
.portal-publish-actions { justify-content: flex-end; }
.portal-submission-history { position: sticky; top: var(--portal-page-header-offset); }
.portal-icon-button {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  flex: 0 0 var(--portal-touch-target);
  width: var(--portal-touch-target);
  min-height: var(--portal-touch-target);
  padding: 0;
  border: 1px solid var(--portal-border);
  border-radius: var(--portal-input-radius);
  color: var(--portal-text);
  background: transparent;
}
.portal-icon-button:hover { color: var(--portal-accent); border-color: var(--portal-accent); }
.portal-icon-button:focus-visible { outline: 2px solid var(--portal-accent); outline-offset: 2px; }
.portal-icon-button ion-icon { font-size: 20px; }
.portal-work-list { display: grid; gap: 0; }
.portal-work-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--portal-space-3);
  padding: var(--portal-space-4) 0;
  border-top: 1px solid var(--portal-border);
}
.portal-work-row:first-child { padding-top: var(--portal-space-2); border-top: 0; }
.portal-work-main { min-width: 0; }
.portal-work-title { display: flex; align-items: center; gap: var(--portal-space-2); min-width: 0; }
.portal-work-title strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.portal-work-meta { margin: var(--portal-space-1) 0 0; color: var(--portal-muted); font-size: 13px; line-height: 18px; }
.portal-work-main .portal-message { min-height: 0; margin: var(--portal-space-2) 0 0; font-size: 13px; line-height: 18px; }
.portal-work-actions { flex: 0 0 auto; }

/* Admin submission review workbench */
.portal-review-workspace {
  display: grid;
  grid-template-columns: minmax(260px, 0.78fr) minmax(0, 1.7fr);
  align-items: start;
  gap: var(--portal-space-4);
}
.portal-review-panel { min-width: 0; }
.portal-review-queue { display: grid; gap: 0; }
.portal-review-item {
  display: grid !important;
  width: 100%;
  min-height: 72px;
  padding: var(--portal-space-3) 0;
  border-bottom: 1px solid var(--portal-border);
  color: var(--portal-text);
  text-align: left;
}
.portal-review-item:first-child { border-top: 1px solid var(--portal-border); }
.portal-review-item.active { padding-inline: var(--portal-space-2); border-color: rgba(226, 215, 3, 0.55); background: rgba(226, 215, 3, 0.08); }
.portal-review-item-title { display: flex; align-items: center; justify-content: space-between; gap: var(--portal-space-2); min-width: 0; }
.portal-review-item-title strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.portal-review-item-meta { margin-top: var(--portal-space-1); color: var(--portal-muted); font-size: 12px; line-height: 18px; }
.portal-review-empty { min-height: 280px; display: grid; place-items: center; color: var(--portal-muted); text-align: center; }
.portal-review-detail { display: grid; gap: var(--portal-space-5); }
.portal-review-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--portal-space-4); }
.portal-review-heading h2 { margin: 0; font-size: 22px; line-height: 30px; overflow-wrap: anywhere; }
.portal-review-meta { display: flex; flex-wrap: wrap; gap: var(--portal-space-2); color: var(--portal-muted); font-size: 13px; line-height: 20px; }
.portal-review-summary { margin: 0; color: var(--portal-text); line-height: 1.75; white-space: pre-wrap; overflow-wrap: anywhere; }
.portal-review-rights { display: inline-flex; align-items: center; gap: var(--portal-space-2); color: var(--portal-muted); font-size: 13px; line-height: 20px; }
.portal-review-rights ion-icon { color: var(--portal-success); font-size: 18px; }
.portal-review-rights.danger ion-icon { color: var(--portal-danger); }
.portal-review-materials { display: grid; gap: var(--portal-space-3); }
.portal-review-material {
  display: grid;
  gap: var(--portal-space-2);
  padding-top: var(--portal-space-3);
  border-top: 1px solid var(--portal-border);
}
.portal-review-material:first-child { padding-top: 0; border-top: 0; }
.portal-review-material-title { display: flex; align-items: center; justify-content: space-between; gap: var(--portal-space-2); color: var(--portal-text); font-size: 14px; line-height: 20px; }
.portal-review-material-title span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.portal-review-poster { display: block; width: min(220px, 100%); aspect-ratio: 2 / 3; object-fit: cover; border: 1px solid var(--portal-border); border-radius: var(--portal-input-radius); background: var(--portal-input-bg); }
.portal-review-video { display: block; width: 100%; max-height: 420px; background: #000; }
.portal-review-download { color: var(--portal-info); font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }
.portal-review-decision { display: grid; gap: var(--portal-space-3); padding-top: var(--portal-space-4); border-top: 1px solid var(--portal-border); }
.portal-review-reason { display: grid; gap: 7px; color: var(--portal-muted); font-size: 14px; }
.portal-review-reason textarea { width: 100%; min-height: 92px; padding: var(--portal-space-3); border: 1px solid var(--portal-input-border); border-radius: var(--portal-input-radius); color: var(--portal-text); background: var(--portal-input-bg); resize: vertical; }
.portal-review-reason textarea:focus { border-color: var(--portal-input-border-focus); outline: 0; }
.portal-review-history { display: grid; gap: var(--portal-space-2); padding-top: var(--portal-space-4); border-top: 1px solid var(--portal-border); }
.portal-review-history h3 { margin: 0; font-size: 15px; line-height: 20px; }
.portal-review-history-item { color: var(--portal-muted); font-size: 13px; line-height: 20px; }

/* Mobile bottom-sheet selector */
.portal-selector-sheet {
  position: fixed;
  z-index: 40;
  inset: 0;
  display: grid;
  align-items: end;
}
.portal-selector-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: var(--portal-sheet-overlay);
}
.portal-selector-dialog {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  max-height: min(72vh, 560px);
  padding: var(--portal-space-2) var(--portal-space-4) calc(var(--portal-space-4) + env(safe-area-inset-bottom));
  border: 1px solid var(--portal-border);
  border-bottom: 0;
  border-radius: var(--portal-input-radius) var(--portal-input-radius) 0 0;
  background: var(--portal-panel);
  box-shadow: var(--portal-panel-shadow);
}
.portal-selector-handle { justify-self: center; width: 40px; height: 4px; margin-bottom: var(--portal-space-2); border-radius: var(--portal-space-2); background: var(--portal-muted); opacity: 0.55; }
.portal-selector-heading { display: flex; align-items: center; justify-content: space-between; gap: var(--portal-space-3); padding-bottom: var(--portal-space-2); }
.portal-selector-heading h2 { margin: 0; font-size: 18px; line-height: 24px; }
.portal-selector-options { display: grid; overflow-y: auto; overscroll-behavior: contain; }
.portal-selector-option {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: var(--portal-space-3);
  width: 100%;
  min-height: var(--portal-touch-target);
  padding: var(--portal-space-3) 0;
  border-bottom: 1px solid var(--portal-border);
  color: var(--portal-text);
  text-align: left;
}
.portal-selector-option.selected { color: var(--portal-accent); }
.portal-selector-option ion-icon { visibility: hidden; color: var(--portal-accent); font-size: 20px; }
.portal-selector-option.selected ion-icon { visibility: visible; }
.portal-selector-option:focus-visible { outline: 2px solid var(--portal-accent); outline-offset: -2px; }
body.portal-selector-open { overflow: hidden; }

@media (max-width: 1079px) {
  .portal-publish-layout { grid-template-columns: 1fr; }
  .portal-submission-history { position: static; }
}

@media (max-width: 760px) {
  .portal-publish-page { --portal-page-header-offset: 84px; }
  .portal-publish-wrap { width: min(100% - 32px, 640px); padding-bottom: var(--portal-space-8); }
  .portal-page-title-row { align-items: flex-start; margin-bottom: var(--portal-space-4); }
  .portal-page-note { padding-top: var(--portal-space-1); font-size: 13px; }
  .portal-form-grid,
  .portal-upload-grid { grid-template-columns: 1fr; }
  .portal-upload-field { min-height: 0; }
  .portal-publish-actions { justify-content: stretch; }
  .portal-publish-actions .portal-button { flex: 1 1 140px; }
  .portal-work-row { align-items: stretch; flex-direction: column; }
  .portal-work-actions .portal-button { width: 100%; }
  .portal-select-field select {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
  }
  .portal-selector-trigger {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: var(--portal-touch-target);
    padding: var(--portal-space-3);
    border: 1px solid var(--portal-input-border);
    border-radius: var(--portal-input-radius);
    color: var(--portal-text);
    background: var(--portal-input-bg);
    text-align: left;
  }
  .portal-selector-trigger:hover,
  .portal-selector-trigger:focus-visible { border-color: var(--portal-input-border-focus); background: var(--portal-input-bg-focus); }
  .portal-selector-trigger:focus-visible { outline: 2px solid var(--portal-focus-ring); outline-offset: 2px; }
  .portal-selector-trigger ion-icon { color: var(--portal-muted); font-size: 18px; }
  .portal-review-workspace { grid-template-columns: 1fr; }
  .portal-review-heading { display: grid; gap: var(--portal-space-2); }
  .portal-review-video { max-height: 240px; }
  .portal-selector-dialog { max-height: min(76vh, 620px); }
}

@media (prefers-reduced-motion: reduce) {
  .portal-upload-progress-track span { transition: none; }
}
