:root {
  color-scheme: dark;
  --bg: #111211;
  --bg-soft: #171817;
  --panel: #1b1c1b;
  --panel-raised: #222322;
  --panel-strong: #272827;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #f4f4f1;
  --muted: #a4a59f;
  --subtle: #757771;
  --accent: #e5a00d;
  --accent-bright: #ffc23f;
  --accent-ink: #241800;
  --accent-soft: rgba(229, 160, 13, 0.14);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
  --radius: 18px;
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #f1f0ed;
  --bg-soft: #e7e5e1;
  --panel: #fbfaf8;
  --panel-raised: #ffffff;
  --panel-strong: #eeeae4;
  --line: rgba(39, 35, 28, 0.1);
  --line-strong: rgba(39, 35, 28, 0.2);
  --text: #25231f;
  --muted: #6d6961;
  --subtle: #8e887d;
  --shadow: 0 24px 70px rgba(69, 59, 46, 0.13);
}

[data-theme="contrast"] {
  --bg: #000;
  --bg-soft: #090909;
  --panel: #101010;
  --panel-raised: #151515;
  --panel-strong: #202020;
  --line: rgba(255, 255, 255, 0.2);
  --line-strong: rgba(255, 255, 255, 0.38);
  --text: #fff;
  --muted: #dedede;
  --subtle: #b9b9b9;
  --accent: #ffd000;
  --accent-bright: #ffdf4f;
  --accent-ink: #000;
  --accent-soft: rgba(255, 208, 0, 0.18);
}

[data-theme="bubble-gum"] {
  --bg: #1b1020;
  --bg-soft: #24152a;
  --panel: #2b1931;
  --panel-raised: #34203b;
  --panel-strong: #402746;
  --line: rgba(255, 220, 249, 0.11);
  --line-strong: rgba(255, 220, 249, 0.2);
  --text: #fff3fc;
  --muted: #d8b5d1;
  --subtle: #a884a2;
  --accent: #ff7ac8;
  --accent-bright: #ff9bd7;
  --accent-ink: #3a0527;
  --accent-soft: rgba(255, 122, 200, 0.16);
}

[data-theme="moonlight"] {
  --bg: #0c1421;
  --bg-soft: #111c2c;
  --panel: #162235;
  --panel-raised: #1b2a40;
  --panel-strong: #253650;
  --line: rgba(190, 216, 255, 0.11);
  --line-strong: rgba(190, 216, 255, 0.2);
  --text: #eff6ff;
  --muted: #adc0da;
  --subtle: #8297b4;
  --accent: #82aef2;
  --accent-bright: #a6c7ff;
  --accent-ink: #08172d;
  --accent-soft: rgba(130, 174, 242, 0.16);
}

* { box-sizing: border-box; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 68% -12%, var(--accent-soft), transparent 26rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  transition: background-color 180ms ease, color 180ms ease;
}

button, select { font: inherit; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }

.page-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-header,
.main-content,
.app-footer {
  width: min(100% - 48px, 1460px);
  margin-inline: auto;
}

.app-header {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-size: 19px;
  font-weight: 750;
  letter-spacing: -0.04em;
}

.brand-mark {
  width: 33px;
  height: 33px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 20px;
  box-shadow: 0 7px 24px var(--accent-soft);
}

.brand-mark i { transform: translateX(1px); }
.brand-accent { color: var(--accent); }
.header-actions { display: flex; align-items: center; gap: 10px; }

.icon-button,
.profile-button {
  border: 1px solid var(--line);
  background: var(--panel);
  transition: border-color 150ms ease, background-color 150ms ease, transform 150ms ease;
}

.icon-button:hover,
.profile-button:hover {
  border-color: var(--line-strong);
  background: var(--panel-raised);
}

.icon-button {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--muted);
}

.profile-button {
  height: 46px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 5px 4px 11px;
  border-radius: 13px;
}

.profile-status {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #53c978;
  box-shadow: 0 0 0 3px rgba(83, 201, 120, 0.15);
}

.profile-copy { display: grid; text-align: left; line-height: 1.1; }
.profile-copy small { color: var(--subtle); font-size: 9px; text-transform: uppercase; letter-spacing: .12em; }
.profile-copy strong { color: var(--text); font-size: 12px; }

.profile-avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--panel-strong);
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.profile-image { object-fit: cover; }

.profile-menu {
  min-width: 210px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-raised);
  box-shadow: var(--shadow);
}

.profile-menu-email {
  display: block;
  overflow: hidden;
  padding: 6px 8px 9px;
  color: var(--subtle);
  font-size: 11px;
  text-overflow: ellipsis;
}

.logout-button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-align: left;
}

.logout-button:hover { background: var(--panel-strong); color: var(--text); }

.header-signin {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 11px 12px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.theme-menu {
  width: 206px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--panel-raised);
  box-shadow: var(--shadow);
}

.dropdown-label {
  margin: 5px 9px 6px;
  color: var(--subtle);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.theme-option {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 9px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-align: left;
}

.theme-option:hover { background: var(--panel-strong); color: var(--text); }
.theme-option .bi { display: none; margin-left: auto; color: var(--accent); }
.theme-option.active .bi { display: block; }

.theme-dot { width: 13px; height: 13px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .3); }
.theme-dot-default { background: #e5a00d; }
.theme-dot-light { background: #f0eee9; border-color: #aaa59e; }
.theme-dot-contrast { background: #ffd000; border-color: #fff; }
.theme-dot-bubble { background: #ff7ac8; }
.theme-dot-moonlight { background: #82aef2; }

.main-content { flex: 1; padding: 61px 0 32px; }

.intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 28px;
}

.eyebrow,
.section-kicker {
  color: var(--accent);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.intro h1 {
  margin: 7px 0 4px;
  color: var(--text);
  font-size: clamp(37px, 5vw, 62px);
  font-weight: 800;
  letter-spacing: -.075em;
  line-height: 1;
}

.intro p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.connected-note {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--subtle);
  font-size: 12px;
}

.connected-note strong { color: var(--muted); }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: #53c978; box-shadow: 0 0 0 5px rgba(83, 201, 120, .12); }
.pulse-muted { background: var(--subtle); box-shadow: 0 0 0 5px var(--line); }
.signed-out-note:hover { color: var(--muted); }

.app-grid {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(390px, 0.86fr) minmax(0, 1.5fr);
  gap: 21px;
  align-items: stretch;
}

.filter-panel,
.result-area,
.action-panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--panel) 94%, transparent);
  box-shadow: var(--shadow);
}

.filter-panel { padding: 21px; }
.sidebar-stack { display: grid; align-content: start; gap: 13px; }
.action-panel { padding: 13px; }

.auth-callout {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--accent-soft);
}

.auth-callout-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--panel);
  color: var(--accent);
}

.auth-callout strong { display: block; color: var(--text); font-size: 11px; }
.auth-callout p { margin: 2px 0 0; color: var(--muted); font-size: 10px; line-height: 1.4; }
.auth-callout a { color: var(--accent); font-size: 10px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }

.panel-heading,
.result-topline,
.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.filter-panel-toggle {
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
}

.filter-panel-toggle > i { display: none; color: var(--accent); transition: transform 160ms ease; }
.filter-panel-toggle[aria-expanded="true"] > i { transform: rotate(180deg); }
.filter-panel-tools { display: flex; justify-content: flex-end; margin-top: -19px; }

.panel-heading h2,
.result-topline h2 {
  margin: 3px 0 0;
  color: var(--text);
  font-size: 21px;
  font-weight: 780;
  letter-spacing: -.045em;
}

.text-button {
  border: 0;
  background: transparent;
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.filter-section { padding: 18px 0; border-top: 1px solid var(--line); }
.filter-section:first-of-type { margin-top: 16px; }
.filter-compact { padding-bottom: 20px; }

.filter-label {
  display: block;
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.section-title-row span { color: var(--subtle); font-size: 11px; }

.server-list { display: grid; gap: 7px; }

.server-collapse-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
}

.server-collapse-toggle .filter-label { margin-bottom: 3px; }
.server-collapse-toggle small { color: var(--subtle); font-size: 11px; }
.server-collapse-toggle i { color: var(--accent); transition: transform 160ms ease; }
.server-collapse-toggle[aria-expanded="true"] i { transform: rotate(180deg); }

.server-picker-collapse { padding-top: 10px; }

.server-picker-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 9px 5px;
  color: var(--subtle);
  font-size: 10px;
}

.server-message {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--bg-soft);
  color: var(--muted);
  font-size: 11px;
}

.server-message i,
.server-message .spinner-border { color: var(--accent); }
.server-message button {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: var(--accent);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.server-message form { margin-left: auto; }
.server-message form button { margin-left: 0; }

.server-message a {
  margin-left: auto;
  color: var(--accent);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.server-refresh {
  margin-left: 7px;
  border: 0;
  background: transparent;
  color: var(--accent);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.server-offline { opacity: .58; }

.server-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 9px;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 140ms ease, background-color 140ms ease;
}

.server-option:hover { border-color: var(--line); background: var(--panel-raised); }

.server-option input {
  width: 15px;
  height: 15px;
  border-color: var(--line-strong);
  background-color: var(--panel-strong);
  box-shadow: none !important;
}

.server-option input:checked { border-color: var(--accent); background-color: var(--accent); }

.server-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
}

.server-option > span:nth-of-type(2) { min-width: 0; display: grid; line-height: 1.3; }
.server-option strong { color: var(--text); font-size: 12px; }
.server-option small { color: var(--subtle); font-size: 11px; }
.server-hide {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: var(--subtle);
}
.server-hide:hover { color: var(--accent); }
.hidden-server-list { display: grid; gap: 4px; margin-top: 9px; padding: 9px; border-top: 1px solid var(--line); }
.hidden-server-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 0;
  background: transparent;
  color: var(--subtle);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.hidden-server-toggle small { color: var(--subtle); font-size: 9px; }
.hidden-server-toggle i { color: var(--accent); transition: transform 160ms ease; }
.hidden-server-toggle[aria-expanded="true"] small i { transform: rotate(180deg); }
.hidden-server-restore {
  display: block;
  margin-top: 6px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  text-align: left;
}
.hidden-server-restore:hover { color: var(--accent); }

.segmented-control {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--bg-soft);
}

.segmented-control label { margin: 0; cursor: pointer; }
.segmented-control input { position: absolute; opacity: 0; pointer-events: none; }

.segmented-control span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px;
  border-radius: 7px;
  color: var(--subtle);
  font-size: 12px;
  font-weight: 750;
  transition: background-color 150ms ease, color 150ms ease;
}

.segmented-control input:checked + span {
  background: var(--panel-strong);
  color: var(--accent);
}

.form-select {
  min-height: 39px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background-color: var(--bg-soft);
  color: var(--muted);
  font-size: 12px;
  box-shadow: none !important;
}

.form-select:focus { border-color: var(--accent); }

.roulette-button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border: 0;
  border-radius: 11px;
  background: var(--accent);
  color: var(--accent-ink);
  text-align: left;
  transition: background-color 140ms ease, transform 140ms ease, box-shadow 140ms ease;
}

.roulette-button:hover {
  background: var(--accent-bright);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px var(--accent-soft);
}

.button-icon {
  width: 35px;
  height: 35px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: rgba(0, 0, 0, .12);
  font-size: 16px;
}

.roulette-button span:nth-child(2) { display: grid; line-height: 1.12; }
.roulette-button strong { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; }
.roulette-button small { opacity: .7; font-size: 11px; }
.button-arrow { margin-left: auto; }

.filter-footer {
  margin: 16px 0 0;
  color: var(--subtle);
  font-size: 10px;
  text-align: center;
}

.filter-footer i { color: var(--accent); }

.media-status {
  display: grid;
  gap: 5px;
  margin-top: 13px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--subtle);
  font-size: 10px;
  text-align: center;
}

.media-status i { color: var(--accent); }
.media-status button {
  justify-self: center;
  border: 0;
  background: transparent;
  color: var(--accent);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.media-refresh-indicator { display: none; align-items: center; gap: 5px; }
.media-refresh-indicator.htmx-request { display: inline-flex; }
.refresh-confirmation { color: #53c978; }
.refresh-warnings { display: grid; gap: 3px; color: #e7a844; }

.history-button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 9px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.history-button i { color: var(--accent); }
.history-button span { margin-left: auto; color: var(--subtle); font-size: 9px; }
.history-button:hover { border-color: var(--accent); color: var(--accent); }

.recent-picks { border: 1px solid var(--line); border-radius: 14px; background: var(--panel-raised); color: var(--muted); }
.recent-picks .modal-header, .recent-picks .modal-footer { border-color: var(--line); }
.recent-picks h2 { margin: 3px 0 0; color: var(--text); font-size: 24px; font-weight: 820; letter-spacing: -.06em; }
.history-count { display: block; color: var(--accent); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }

.recent-picks ol {
  display: grid;
  gap: 7px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.recent-picks li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  color: var(--muted);
  font-size: 11px;
}

.recent-picks li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-picks li small { flex: 0 0 auto; color: var(--subtle); font-size: 9px; text-transform: uppercase; }
.recent-picks p { margin: 10px 0 0; color: var(--subtle); font-size: 11px; }
.recent-picks-clear {
  margin-top: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--subtle);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.recent-picks-clear:hover { color: #e56b67; }

.result-area {
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 21px;
}

.result-topline { min-height: 47px; margin-bottom: 16px; }
.loading-copy { display: none; align-items: center; gap: 7px; color: var(--accent); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; }
.loading-copy.htmx-request { display: flex; }

.recommendation-card {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(232px, 35%) minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg-soft);
  animation: card-in 260ms ease both;
}

.empty-recommendation {
  min-height: 518px;
  display: grid;
  place-items: center;
  padding: 34px;
  text-align: center;
}

.empty-recommendation > div { max-width: 380px; }
.empty-recommendation .auth-card-icon { margin-inline: auto; }
.empty-recommendation h3 { margin: 9px 0 7px; color: var(--text); font-size: 30px; font-weight: 820; letter-spacing: -.06em; }
.empty-recommendation p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }

@keyframes card-in {
  from { opacity: .4; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.poster-column { position: relative; min-height: 518px; overflow: hidden; background: #111; }
.poster-column::after {
  position: absolute;
  inset: auto 0 0;
  height: 26%;
  content: "";
  background: linear-gradient(transparent, rgba(0, 0, 0, .58));
}

.poster-image { width: 100%; height: 100%; object-fit: cover; }

.poster-tag {
  position: absolute;
  z-index: 1;
  top: 14px;
  left: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 99px;
  background: rgba(0, 0, 0, .4);
  color: #fff;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .12em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
}

.recommendation-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.recommendation-main { padding: clamp(25px, 4vw, 48px); }

.media-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.rating-box { padding: 2px 4px; border: 1px solid var(--line-strong); border-radius: 3px; font-size: 9px; }
.star-rating { color: var(--accent); }

.recommendation-main h3 {
  margin: 12px 0 12px;
  color: var(--text);
  font-size: clamp(34px, 4vw, 58px);
  font-weight: 820;
  letter-spacing: -.075em;
  line-height: .98;
}

.genre-list { display: flex; flex-wrap: wrap; gap: 6px; }
.genre-list span {
  padding: 5px 8px;
  border-radius: 99px;
  background: var(--panel-strong);
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
}

.summary {
  max-width: 630px;
  margin: 22px 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.why-this {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  max-width: 560px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
}

.why-this > span { color: var(--accent); }
.why-this strong { display: block; color: var(--text); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.why-this p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }

.recommendation-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-top: 1px solid var(--line);
  background: var(--panel);
}

.source-copy,
.result-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.source-copy > i { color: var(--accent); }
.source-copy span { display: grid; line-height: 1.2; }
.source-copy small { color: var(--subtle); font-size: 9px; letter-spacing: .1em; text-transform: uppercase; }
.source-copy strong { color: var(--muted); font-size: 11px; }
.source-copy b { color: var(--subtle); }

.result-reroll { background: var(--panel-strong); }
.result-ignore { color: #e56b67; background: var(--panel-strong); }

.plex-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 11px 13px;
  border-radius: 9px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
  transition: background-color 140ms ease, transform 140ms ease;
}

.plex-button:hover { background: var(--accent-bright); transform: translateY(-1px); color: var(--accent-ink); }
.plex-icon-button { min-width: 64px; justify-content: center; padding: 9px 11px; background: #191919; color: #f4f4f1; }
.plex-icon-button:hover { background: #282828; color: #fff; }
.plex-icon-button img { width: 13px; height: 20px; }
.plex-icon-button i { font-size: 13px; }

.shortlist-button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 9px;
  padding: 11px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--panel);
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .1em;
  text-transform: uppercase;
  transition: border-color 140ms ease, color 140ms ease, transform 140ms ease;
}

.shortlist-button:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }

.shortlist-panel {
  flex: 1;
  min-width: 0;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg-soft);
  animation: card-in 260ms ease both;
}

.shortlist-heading,
.shortlist-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.shortlist-heading { margin-bottom: 14px; }
.shortlist-heading h3 { margin: 3px 0 0; color: var(--text); font-size: 24px; font-weight: 820; letter-spacing: -.06em; }
.shortlist-heading > span { color: var(--muted); font-size: 10px; font-weight: 750; }
.shortlist-heading > span i { margin-right: 4px; color: var(--accent); }

.shortlist-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }

.shortlist-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--panel);
  animation: card-in 220ms ease both;
}

.shortlist-card > img { width: 100%; aspect-ratio: 2 / 2.45; object-fit: cover; background: #111; }
.shortlist-card-body { padding: 12px; }
.shortlist-card .media-meta { gap: 7px; font-size: 9px; }
.shortlist-card h4 { min-height: 2.3em; margin: 8px 0 6px; color: var(--text); font-size: 19px; font-weight: 820; letter-spacing: -.055em; line-height: 1.05; }
.shortlist-card p { height: 3.7em; overflow: hidden; margin: 0 0 12px; color: var(--muted); font-size: 10px; line-height: 1.25; }
.shortlist-card-actions { justify-content: flex-end; }
.shortlist-card-actions .plex-button { padding: 9px 10px; font-size: 9px; }

.app-footer {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  padding: 20px 0 25px;
  border-top: 1px solid var(--line);
  color: var(--subtle);
  font-size: 11px;
}

.app-footer a { color: var(--muted); }
.app-footer i { margin-left: 3px; font-size: 9px; }
.app-footer .support-link { color: var(--accent); font-weight: 750; }

.auth-page {
  width: min(100% - 34px, 570px);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin: auto;
  padding: 35px 0;
}

.auth-page > .brand { align-self: center; margin-bottom: 20px; }

.auth-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(28px, 7vw, 52px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  text-align: center;
}

.auth-card-icon {
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  border-radius: 18px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 25px;
}

.auth-card-icon-error { color: #e56b67; background: rgba(229, 107, 103, .12); }
.auth-card h1 { margin: 7px 0 8px; color: var(--text); font-size: 34px; font-weight: 820; letter-spacing: -.07em; }
.auth-card p { max-width: 420px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7; }

.pin-copy {
  display: grid;
  gap: 3px;
  margin: 22px 0 0;
  padding: 11px 21px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-soft);
}

.pin-copy small { color: var(--subtle); font-size: 9px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.pin-copy strong { color: var(--accent); font-size: 20px; letter-spacing: .15em; }

.auth-progress {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  color: var(--muted);
  font-size: 12px;
}

.auth-progress .spinner-border { color: var(--accent); }
.auth-cancel { margin-top: 21px; }
.auth-retry { margin-top: 22px; }

@media (max-width: 1080px) {
  .app-grid { grid-template-columns: 355px minmax(0, 1fr); }
  .recommendation-card { grid-template-columns: minmax(185px, 38%) minmax(0, 1fr); }
  .recommendation-main { padding: 27px; }
  .poster-column { min-height: 470px; }
  .recommendation-main h3 { font-size: clamp(33px, 4vw, 46px); }
}

@media (max-width: 850px) {
  .app-grid { grid-template-columns: 1fr; }
  .main-content { padding-top: 43px; }
  .poster-column { min-height: 420px; }
}

@media (min-width: 601px) {
  .filter-panel-body.collapse { display: block; }
}

@media (max-width: 600px) {
  .app-header, .main-content, .app-footer { width: min(100% - 28px, 1460px); }
  .app-header { min-height: 68px; }
  .profile-button { width: 42px; height: 42px; padding: 4px; }
  .profile-button .profile-status, .profile-button .profile-copy { display: none; }
  .profile-avatar { width: 32px; height: 32px; }
  .intro { display: block; }
  .intro p { max-width: 290px; }
  .connected-note { margin-top: 17px; }
  .filter-panel, .result-area { padding: 15px; }
  .action-panel { padding: 11px; }
  .filter-panel-toggle > i { display: block; }
  .filter-panel-tools { margin-top: 8px; }
  .recommendation-card { grid-template-columns: 1fr; }
  .poster-column { min-height: 410px; max-height: 470px; }
  .recommendation-main { padding: 23px 19px 26px; }
  .recommendation-main h3 { font-size: 43px; }
  .recommendation-footer { align-items: flex-start; flex-direction: column; }
  .result-actions { width: 100%; }
  .plex-button { flex: 1; justify-content: center; }
  .shortlist-grid { grid-template-columns: 1fr; }
  .shortlist-card { display: grid; grid-template-columns: 112px minmax(0, 1fr); }
  .shortlist-card > img { height: 100%; aspect-ratio: auto; }
  .app-footer { display: grid; }
}
