.admin-show-tabs { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:20px; }
.admin-show-tabs img { width:24px; height:24px; object-fit:contain; margin-right:6px; }
.admin-show-editor-layout { display:grid; grid-template-columns:minmax(0,2fr) minmax(240px,1fr); gap:24px; align-items:start; }
.admin-show-section { min-width:0; display:grid; gap:16px; margin:0 0 20px; padding:20px; border:1px solid #cbd5e1; border-radius:12px; background:#fff; }
.admin-show-section legend { font-weight:800; padding:0 8px; }
.admin-show-field-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.admin-show-image { display:flex; gap:16px; align-items:center; flex-wrap:wrap; }
.admin-show-image img { width:100px; height:80px; object-fit:contain; border:1px solid #dbe2ea; border-radius:8px; }
.admin-show-cast-editor { display:grid; gap:14px; }
.admin-show-cast-row { display:grid; gap:12px; padding:14px; border:1px solid #dbe2ea; border-radius:10px; }
.admin-show-cast-actions { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.admin-show-cast-actions strong { margin-right:auto; }
.admin-show-preview-wrap { position:sticky; top:20px; }
.admin-show-preview { border-radius:14px; overflow:hidden; border:1px solid #dbe2ea; }
.admin-show-preview [data-preview-banner] { padding:20px; background-size:cover; color:white; overflow-wrap:anywhere; }
.admin-show-preview [data-preview-card] { margin:16px; padding:18px; border-radius:10px; }
.admin-show-save { display:flex; gap:12px; align-items:center; padding:12px 0; }
.show-hub-page .show-identity-card { overflow:hidden; }
.show-hub-page .show-identity-icon { width:64px; height:64px; min-width:64px; overflow:hidden; contain:paint; }
.show-hub-page .show-identity-icon img { width:100%; height:100%; max-width:100%; max-height:100%; object-fit:contain; transform:none; }
.show-hub-page .show-page-moderator { display:block; }
.show-moderator-list { display:grid; gap:10px; margin-top:10px; }
.show-moderator-link { display:flex; align-items:center; gap:10px; color:inherit; text-decoration:none; font-weight:800; }
.show-moderator-link:hover strong { text-decoration:underline; }
.show-moderator-link img { width:38px; height:48px; object-fit:cover; object-position:top; border-radius:6px; flex:none; }
.show-managed-cast { padding:16px; border-bottom:1px solid #cbd5e1; }
.show-managed-cast h3 { margin:0 0 12px; }
.show-managed-cast-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.show-managed-cast-member { display:grid; align-content:start; gap:5px; min-width:0; text-align:center; overflow-wrap:anywhere; }
.show-managed-cast-member img { width:100%; aspect-ratio:3/4; object-fit:cover; object-position:top; border-radius:8px; }
.show-managed-cast-member small { opacity:.8; }
 .show-hub-page.has-show-theme,
.show-hub-page.has-show-theme .site-header {
  background:
    linear-gradient(90deg,color-mix(in srgb,var(--custom-show-text) 13%,transparent) 2px,transparent 2px),
    linear-gradient(0deg,color-mix(in srgb,var(--custom-show-text) 13%,transparent) 2px,transparent 2px),
    radial-gradient(ellipse at center,color-mix(in srgb,var(--custom-show-accent) 12%,transparent),transparent 64%),
    var(--custom-show-background);
  background-position:0 0,0 0,center,0 0;
  background-size:44px 44px,44px 44px,auto,auto;
}
.has-show-theme .show-hub-shell {
  --ink:var(--custom-show-text);
  --muted:color-mix(in srgb,var(--custom-show-text) 72%,var(--custom-show-surface));
  --show-theme-tint:color-mix(in srgb,var(--custom-show-accent) 20%,var(--custom-show-surface));
  --show-theme-highlight:color-mix(in srgb,var(--custom-show-surface) 94%,white);
  --show-theme-line:color-mix(in srgb,var(--custom-show-text) 16%,transparent);
  color:var(--custom-show-text);
}
.has-show-theme :is(.show-hub-sidebar,.show-community,.show-thread-post,.show-poll-card) {
  background:linear-gradient(145deg,var(--show-theme-highlight),var(--custom-show-surface) 55%,var(--show-theme-tint));
  color:var(--custom-show-text);
}
.has-show-theme .show-identity-card {
  background:linear-gradient(135deg,var(--show-theme-highlight),var(--show-theme-tint));
}
.has-show-theme .show-page-moderator {
  background:linear-gradient(110deg,var(--custom-show-surface),color-mix(in srgb,var(--custom-show-accent) 10%,var(--custom-show-surface)));
}
.has-show-theme :is(.show-managed-cast,.show-cast-status,.show-daily-rankings) {
  background:linear-gradient(145deg,var(--show-theme-highlight),var(--show-theme-tint));
}
.has-show-theme .show-sidebar-note {
  background:linear-gradient(135deg,var(--show-theme-tint),var(--show-theme-highlight));
}
.has-show-theme :is(.show-identity-card,.show-page-moderator,.show-managed-cast,.show-sidebar-note,.show-section-tabs) { border-color:var(--show-theme-line); }
.has-show-theme .show-section-tabs { background:color-mix(in srgb,var(--custom-show-accent) 12%,var(--custom-show-surface)); }
.has-show-theme :is(.show-panel,.show-rankings-panel) { background:color-mix(in srgb,var(--custom-show-surface) 97%,var(--custom-show-text)); }
.has-show-theme .show-sidebar-note a { color:var(--custom-show-text); }
.has-show-theme :is(.show-community h2,.show-identity-card h2,.show-topic-title,.show-thread-title) { color:var(--custom-show-text); }
.has-custom-show-banner .show-hub-hero { min-height:var(--custom-banner-height); background-position:center var(--custom-banner-position); background-color:var(--show-accent); background-image:linear-gradient(rgba(0,0,0,var(--custom-banner-overlay)),rgba(0,0,0,var(--custom-banner-overlay))),var(--show-hero-image); }
.show-banner-subtitle { font-size:clamp(1rem,2vw,1.4rem); margin:16px 0 0; }
@media(max-width:800px){ .admin-show-editor-layout{grid-template-columns:1fr;} .admin-show-preview-wrap{position:static;} .admin-show-field-grid{grid-template-columns:1fr;} }
.show-hub-page [data-cast-status].show-managed-hidden { display:none; }
.admin-show-editor-heading { display:flex; justify-content:space-between; gap:16px; align-items:center; }
.show-hub-page .show-identity-icon img { min-width:0; min-height:0; }
.show-hub-page .show-identity-card > div:last-child { min-width:0; }
.show-hub-page .show-identity-card h2 { overflow-wrap:anywhere; }
.show-hub-page .show-page-moderator .show-moderator-list { display:grid; gap:10px; }
.show-moderator-link strong { overflow-wrap:anywhere; }

/* Match the Big Brother cast's compact five-column sidebar layout. */
.show-hub-page .show-hub-sidebar { width:100%; max-width:320px; }
.show-managed-cast-grid { grid-template-columns:repeat(5,minmax(0,50px)); justify-content:center; gap:7px 5px; }
.show-managed-cast-member { min-width:0; display:flex; flex-direction:column; gap:3px; }
.show-managed-cast-member img { box-sizing:border-box; aspect-ratio:1; border:2px solid var(--cast-border,rgba(7,19,63,.18)); border-radius:0; object-position:center; }
.show-managed-cast-member strong { font:900 .61rem/1 "Barlow Semi Condensed",Arial,sans-serif; text-transform:uppercase; overflow-wrap:anywhere; }
.show-managed-cast-member small { font-size:.6rem; line-height:1.1; overflow-wrap:anywhere; }
.show-managed-cast-member.is-dead img { filter:grayscale(1) brightness(.63); }

.show-managed-cast { position:relative; }
.show-managed-cast-edit { position:absolute; top:12px; right:12px; border:1px solid currentColor; border-radius:8px; padding:5px 9px; background:var(--custom-show-surface,#fff); color:var(--ink); font-size:.8rem; font-weight:800; text-decoration:none; opacity:0; transition:opacity .15s; }
.show-managed-cast:hover .show-managed-cast-edit,.show-managed-cast:focus-within .show-managed-cast-edit { opacity:1; }
@media(hover:none){ .show-managed-cast-edit { opacity:1; } }
#show-cast-editor { scroll-margin-top:24px; }

/* Theme the menu surfaces without tinting the illustrated icons. */
.has-show-theme .site-header :is(.main-tab,.account-link) {
  background:linear-gradient(180deg,color-mix(in srgb,var(--custom-show-surface) 84%,var(--custom-show-text)),var(--custom-show-surface));
  border-color:color-mix(in srgb,var(--custom-show-text) 24%,var(--custom-show-surface));
  color:var(--custom-show-text); text-shadow:none;
  box-shadow:inset 0 1px 0 color-mix(in srgb,var(--custom-show-text) 32%,transparent),0 3px 0 color-mix(in srgb,var(--custom-show-background) 80%,black),0 8px 16px #0002;
}
.has-show-theme .site-header .main-tab.is-active {
  background:linear-gradient(180deg,color-mix(in srgb,var(--custom-show-accent) 85%,white),var(--custom-show-accent));
  border-color:var(--custom-show-accent); color:var(--show-accent-ink);
}
.has-show-theme .site-header :is(.account-dropdown,.shows-menu-panel) {
  background:linear-gradient(160deg,color-mix(in srgb,var(--custom-show-surface) 88%,var(--custom-show-accent)),var(--custom-show-surface));
  border-color:color-mix(in srgb,var(--custom-show-text) 24%,var(--custom-show-surface));
  box-shadow:inset 0 1px 0 color-mix(in srgb,var(--custom-show-text) 24%,transparent),0 3px 0 #0003,0 14px 24px #0003;
}
.has-show-theme .site-header :is(.account-dropdown,.shows-menu-panel) :is(a,button) { color:var(--custom-show-text); }
.has-show-theme .site-header :is(.account-dropdown,.shows-menu-panel) :is(a,button):is(:hover,:focus-visible),
.has-show-theme .site-header :is(.main-tab,.account-link):hover { background:color-mix(in srgb,var(--custom-show-accent) 24%,var(--custom-show-surface)); color:var(--custom-show-text); }
.has-show-theme .site-header :is(a,button,summary):focus-visible { outline:2px solid var(--custom-show-accent); outline-offset:3px; }

.show-hub-page .show-sidebar-note {
  margin:0; border:0; border-radius:0; background:transparent;
  box-shadow:none; padding:18px;
}

.show-cast-popup { box-sizing:border-box; width:min(760px,calc(100vw - 28px)); max-height:calc(100dvh - 36px); padding:0; border:3px solid #ffffffb0; border-radius:18px; color:var(--custom-show-text,#07133f); background:linear-gradient(145deg,var(--custom-show-surface,#fff),var(--custom-show-background,#e7f2f1)); box-shadow:0 26px 70px #0005; }
.show-cast-popup::backdrop { background:#07133f88; backdrop-filter:blur(5px); }
.show-cast-popup form { margin:0; }
.show-cast-popup header,.show-cast-popup footer { display:flex; align-items:center; gap:12px; padding:18px 20px; }
.show-cast-popup header { justify-content:space-between; }
.show-cast-popup h2 { margin:0; }
.show-cast-popup-content { padding:0 20px; }
.show-cast-popup-row { display:grid; grid-template-columns:48px 1.2fr 1fr 1fr; align-items:center; gap:10px; padding:12px 0; border-top:1px solid #8885; }
.show-cast-popup-row img { width:48px; height:48px; object-fit:cover; }
.show-cast-popup label { display:grid; gap:5px; font-size:.85rem; min-width:0; }
.show-cast-popup input,.show-cast-popup select { box-sizing:border-box; width:100%; min-width:0; padding:8px; border:1px solid #8888; border-radius:6px; background:var(--custom-show-surface,#fff); color:inherit; font:inherit; }
.show-cast-popup button { padding:8px 12px; border:1px solid #8888; border-radius:8px; background:var(--custom-show-surface,#fff); color:inherit; cursor:pointer; font:inherit; }
.show-cast-popup button[type=submit] { background:var(--custom-show-accent,#49938e); color:var(--show-accent-ink,#fff); }
.show-cast-popup footer p { flex:1; margin:0; }
.show-cast-popup-group { display:grid; grid-template-columns:1fr 100px auto; align-items:end; gap:10px; margin-bottom:10px; }
.show-cast-popup [type=color] { height:36px; padding:2px; }
@media(max-width:550px){ .show-cast-popup-row { grid-template-columns:48px 1fr; } .show-cast-popup-row label:last-child { grid-column:2; } }

/* Ship forum marker sizing with the show page that renders these SVGs. */
.show-topic.has-topic-marker { grid-template-columns: 34px minmax(0, 1fr) auto; }
.topic-marker { position: relative; display: inline-flex; width: 28px; height: 28px; color: #8998a4; flex: none; }
.topic-marker svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.topic-marker.is-unread { color: var(--show-accent, #49938e); }
.topic-marker.is-unread svg { fill: currentColor; }
.topic-marker.is-unread .topic-marker-lines { stroke: white; }
.topic-marker i { position: absolute; width: 7px; height: 7px; background: var(--show-accent-dark, #285c58); border: 2px solid white; border-radius: 50%; right: -3px; top: -3px; }
.topic-marker-legend { display: flex; flex-wrap: wrap; gap: 14px 24px; padding: 18px; color: var(--muted); font-size: .85rem; border-top: 1px solid #e0e5ec; }
.topic-marker-legend > span { display: inline-flex; align-items: center; gap: 8px; }
.topic-marker-legend .topic-marker { width: 22px; height: 22px; }
@media (max-width: 600px) { .show-topic.has-topic-marker { grid-template-columns: 28px minmax(0, 1fr); } .has-topic-marker .topic-stats { grid-column: 2; } }

.discussion-toolbar { flex-wrap: wrap; }
.discussion-toolbar .topic-marker-legend { padding: 0; margin: 0; border: 0; gap: 8px 14px; font: 500 12px/18px Arial, sans-serif; flex: 0 1 auto; align-items: center; }
.discussion-toolbar .topic-marker-legend > span { gap: 5px; white-space: nowrap; }
.discussion-toolbar .topic-marker-legend .topic-marker { width: 16px; height: 16px; }
.discussion-toolbar .topic-marker-legend .topic-marker i { width: 4px; height: 4px; border-width: 1px; right: -1px; top: -1px; }
.discussion-toolbar .discussion-search-control { flex: 0 0 auto; }
@media (max-width: 600px) {
  .discussion-toolbar .topic-marker-legend { flex-basis: 100%; }
  .discussion-toolbar .discussion-search-control { max-width: 100%; }
}
.show-managed-cast-portrait { display:block; aspect-ratio:1; overflow:hidden; border:2px solid var(--cast-border,rgba(7,19,63,.18)); }
.show-managed-cast-member .show-managed-cast-portrait img { display:block; width:100%; height:100%; border:0; filter:var(--cast-filter,none); }
.show-cast-popup-group { grid-template-columns:1fr 90px 120px auto; }
.admin-show-section input[type=color] { width:100%; height:40px; padding:3px; border:1px solid #cbd5e1; border-radius:6px; }
@media(max-width:550px){ .show-cast-popup-group { grid-template-columns:1fr 1fr; } }

.show-cast-popup.is-traitors-editor .show-cast-popup-row { grid-template-columns:48px minmax(0,1fr) minmax(100px,1fr); }

.has-show-theme :is(.discussion-filters,.show-pagination,.show-thread-pagination) button,
.has-show-theme .discussion-search {
  background:linear-gradient(180deg,var(--show-theme-tint),var(--custom-show-surface));
  color:var(--custom-show-text); border:1px solid var(--show-theme-line); text-shadow:none;
  box-shadow:inset 0 1px 0 var(--show-theme-line),0 2px 4px #0002;
}
.has-show-theme :is(.discussion-filters,.show-pagination,.show-thread-pagination) button.is-active,
.has-show-theme .show-new-post {
  background:linear-gradient(180deg,color-mix(in srgb,var(--custom-show-accent) 88%,white),var(--custom-show-accent));
  color:var(--show-accent-ink); border-color:var(--custom-show-accent); text-shadow:none;
}
.has-show-theme :is(.discussion-filters,.show-pagination,.show-thread-pagination) button:not(.is-active):not(:disabled):hover,
.has-show-theme .discussion-search:hover { background:var(--show-theme-tint); border-color:var(--custom-show-accent); }
.has-show-theme :is(.discussion-filters,.show-pagination,.show-thread-pagination) button:disabled { opacity:.45; cursor:default; box-shadow:none; }
.has-show-theme :is(.discussion-filters,.show-pagination,.show-thread-pagination) button:focus-visible { outline:2px solid var(--custom-show-accent); outline-offset:3px; }

.show-hub-page .discussion-filters { display:none; }

.show-pagination[hidden],.show-thread-pagination[hidden] { display:none !important; }

/* Thread surfaces use the same palette as the discussion list. */
.has-show-theme .show-full-reply-dialog {
  --ink:var(--custom-show-text);
  --muted:color-mix(in srgb,var(--custom-show-text) 78%,var(--custom-show-surface));
  --show-theme-tint:color-mix(in srgb,var(--custom-show-accent) 20%,var(--custom-show-surface));
  --show-theme-highlight:color-mix(in srgb,var(--custom-show-surface) 94%,white);
  --show-theme-line:color-mix(in srgb,var(--custom-show-text) 20%,transparent);
  background:var(--custom-show-surface); color:var(--custom-show-text); border-color:var(--show-theme-line);
}
.has-show-theme :is(.show-thread-heading,.show-thread-author,.show-thread-reply),
.has-show-theme .show-full-reply-dialog > header {
  background:linear-gradient(135deg,var(--show-theme-tint),var(--custom-show-surface));
  color:var(--custom-show-text); border-color:var(--show-theme-line);
}
.has-show-theme :is(.show-thread-post-list,.show-thread-pagination) {
  background:color-mix(in srgb,var(--custom-show-background) 55%,var(--custom-show-surface));
}
.has-show-theme .show-thread-post { background:var(--custom-show-surface); border-color:var(--show-theme-line); }
.has-show-theme .show-thread-post.is-original { border-color:var(--custom-show-accent); }
.has-show-theme :is(.show-thread-post-copy,.show-full-reply-preview) { color:var(--custom-show-text); }
.has-show-theme :is(.show-thread-author-stats,.show-thread-post-body > footer,.show-thread-author-avatar) { border-color:var(--show-theme-line); }
.has-show-theme .show-thread-heading > a,
.has-show-theme :is(.show-thread-post-copy,.show-full-reply-preview) :is(a,summary) { color:var(--custom-show-text); text-decoration:underline; text-decoration-color:var(--custom-show-accent); text-underline-offset:3px; }
.has-show-theme :is(.show-thread-post-copy,.show-full-reply-preview) :is(blockquote,details) { background:var(--show-theme-tint); border-color:var(--custom-show-accent); }
.has-show-theme :is(.show-thread-reply,.show-full-reply-dialog) :is(textarea,input:not([type=color]),select),
.has-show-theme .show-full-reply-preview {
  background:color-mix(in srgb,var(--custom-show-background) 25%,var(--custom-show-surface));
  color:var(--custom-show-text); border-color:var(--show-theme-line); caret-color:var(--custom-show-text);
}
.has-show-theme :is(.show-thread-reply,.show-full-reply-dialog) :is(textarea,input)::placeholder { color:var(--muted); opacity:1; }
.has-show-theme .show-full-reply-toolbar { background:var(--show-theme-tint); border-color:var(--show-theme-line); }
.has-show-theme .show-thread-reply footer button,
.has-show-theme .show-full-reply-dialog button:not([type=submit]),
.has-show-theme .show-post-actions > div {
  background:var(--custom-show-surface); color:var(--custom-show-text); border-color:var(--show-theme-line);
}
.has-show-theme .show-thread-heading-actions button,
.has-show-theme .show-thread-reply footer .show-thread-reply-submit,
.has-show-theme .show-full-reply-dialog button[type=submit],
.has-show-theme .show-thread-moderator-badge {
  background:var(--custom-show-accent); color:var(--show-accent-ink); border-color:var(--custom-show-accent); text-shadow:none;
}
.has-show-theme .show-thread-author-identity span { color:var(--custom-show-text); }
.has-show-theme .show-post-actions button:hover { background:var(--show-theme-tint); }
.has-show-theme .show-thread-post-body > footer :is(button,a):hover { color:var(--custom-show-text); }
.has-show-theme .show-post-like-heart { width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:1.8; vertical-align:middle; }
.has-show-theme [data-post-like][aria-pressed=true] .show-post-like-heart { fill:var(--custom-show-accent); stroke:var(--custom-show-accent); }
.post-designer-layout{display:grid;grid-template-columns:minmax(0,1fr) 210px;gap:16px;align-items:start}.post-designer-layout>aside{display:grid;gap:12px;background:#f5f7fb;border:1px solid #dbe2ea;border-radius:10px;padding:14px}.post-designer-layout select,.post-designer-layout input[type=number]{width:100%;min-width:0;padding:6px}.post-designer-layout [data-post-sample]{min-width:0}@media(max-width:1200px){.post-designer-layout{grid-template-columns:1fr}.post-designer-layout>aside{grid-template-columns:repeat(2,minmax(0,1fr))}}

.post-designer-layout [data-post-inspector] .admin-field > span { display:flex; align-items:center; gap:7px; }
.post-designer-layout input[type=checkbox] { width:auto; margin:0; flex:none; }

/* Interactive show skin editor */
.skin-preview-tabs { display:flex; flex-wrap:wrap; gap:8px; margin:16px 0; }
.skin-preview-tabs button { border:1px solid #bbc8dc; border-radius:9px; padding:10px 16px; background:#fff; color:#172b45; font:inherit; cursor:pointer; }
.skin-preview-tabs button[aria-pressed="true"] { background:#172b45; color:#fff; border-color:#172b45; }
.post-designer-layout > aside { align-self:start; position:sticky; top:16px; }
@media(max-width:800px) { .post-designer-layout > aside {position:static;} }

.has-show-theme .show-poll-vote-option { background:var(--custom-show-surface); color:var(--custom-show-text); border-color:var(--show-theme-line); }
.has-show-theme .show-poll-vote-option:hover { background:color-mix(in srgb,var(--custom-show-accent) 20%,var(--custom-show-surface)); }
.has-show-theme .show-poll-vote-option :is(strong,span) { color:inherit; }

.admin-show-editor-layout.has-skin-editor {grid-template-columns:minmax(0,1fr);}
