@import url("../shared/tokens.css?v=i18n-4lang-b-20261018");

a[href*="#homepage-rankings"] { display: none !important; }

:root {
  --purple: var(--palette-accent, #7e63f7);
  --purple-2: var(--palette-accent-strong, #5b45df);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", "Hiragino Sans", "Noto Sans JP", "Apple SD Gothic Neo", "Noto Sans KR", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-synthesis: none;
}

body[data-theme="dark"] {
  --ink: #f5f6ff;
  --muted: #9da6ba;
  --soft-muted: #737e96;
  --line: #293142;
  --line-strong: #202736;
  --purple-soft: var(--palette-soft, #211b42);
  --canvas: #080b12;
  --surface: #111620;
  --surface-soft: #151b28;
  --text-soft: #d4d9e8;
  --pc-canvas: #080b12;
  --pc-surface: #111620;
  --pc-text: #f5f6ff;
  --pc-text-secondary: #d4d9e8;
  --pc-text-muted: #9da6ba;
  --pc-border: #293142;
  color-scheme: dark;
  background: var(--canvas);
  color: var(--ink);
}

body[data-theme="light"] {
  --ink: #161923;
  --muted: #7c8190;
  --soft-muted: #9da2af;
  --line: #eceef3;
  --line-strong: #e2e5ec;
  --purple-soft: var(--palette-soft, #f0efff);
  --canvas: #f5f6fa;
  --surface: #fff;
  --surface-soft: #fbfcff;
  --text-soft: #374052;
  --pc-canvas: #fff;
  --pc-surface: #fbfcff;
  --pc-text: #171927;
  --pc-text-secondary: #667085;
  --pc-text-muted: #98a0b3;
  --pc-border: #e9ecf3;
  color-scheme: light;
  background: var(--canvas);
  color: var(--ink);
}

* { box-sizing: border-box; }
html { background: #080b12; scroll-behavior: smooth; }
body { margin: 0; background: var(--canvas); color: var(--ink); font-size: 13px; line-height: 1.45; }
[hidden] { display: none !important; }
button, input { color: inherit; font: inherit; }
button { border: 0; cursor: pointer; }
button:focus-visible, input:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--palette-ring, #8c83ff); outline-offset: 2px; }
a { color: inherit; text-decoration: none; }
.icon { display: block; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.icon-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.sprite { background: #0f141f; }

/* Left navigation */
.app-shell { width: var(--pc-frame-width); min-height: 100vh; margin: 0 auto; background: #fff; }
.sidebar { position: fixed; z-index: 10; inset: 0 auto 0 0; left: var(--pc-frame-gutter); width: 206px; overflow: hidden; background: #fff; border-right: 1px solid #e9ebf1; }
.brand { display: flex; align-items: center; gap: 11px; height: 61px; padding: 0 20px; border-bottom: 1px solid #f0f1f4; }
.brand-name { color: #111218; font-size: 19px; font-weight: 750; letter-spacing: -0.045em; white-space: nowrap; }
.brand-mark { position: relative; display: block; width: 32px; height: 32px; color: #6855f3; }
.brand-mark::before, .brand-mark::after, .brand-mark i, .brand-mark b, .brand-mark em { position: absolute; display: block; content: ""; border-radius: 4px; background: currentColor; transform: skew(-12deg); }
.brand-mark::before { top: 1px; left: 16px; width: 11px; height: 8px; }
.brand-mark::after { top: 2px; left: 3px; width: 10px; height: 7px; }
.brand-mark i { top: 11px; left: 3px; width: 9px; height: 16px; }
.brand-mark b { top: 13px; left: 16px; width: 7px; height: 11px; }
.brand-mark em { top: 24px; left: 15px; width: 9px; height: 7px; }
.sidebar-nav { height: calc(100vh - 61px); overflow: hidden; padding: 10px 11px 20px; }
.nav-group { padding-top: 14px; }
.nav-group h2 { margin: 0 8px 6px; color: #777c8a; font-size: 12px; font-weight: 500; }
.first-group { padding-top: 5px; }
.nav-link { display: flex; align-items: center; gap: 12px; height: 32px; padding: 0 10px; border-radius: 8px; color: #22242b; font-size: 13px; white-space: nowrap; }
.nav-link + .nav-link { margin-top: 1px; }
.nav-link .icon { width: 17px; height: 17px; color: #20232a; stroke-width: 1.55; }
.nav-link:hover { color: var(--purple); background: #f7f6ff; }
.nav-link.is-active { color: var(--purple); background: linear-gradient(90deg, #f0efff, #f4f2ff); font-weight: 650; }
.nav-link.is-active .icon { color: var(--purple); }

/* Top bar */
.workspace { min-width: 0; min-height: 100vh; margin-left: 206px; background: #fff; }
.topbar { display: flex; align-items: center; height: 61px; padding: 0 23px; border-bottom: 1px solid #f0f1f4; background: rgba(255, 255, 255, .98); }
.global-search { display: flex; align-items: center; flex: 0 0 543px; width: 543px; height: 36px; margin-left: 211px; overflow: hidden; border: 1px solid #e2e5ec; border-radius: 9px; background: #fff; }
.global-search > .icon { flex: 0 0 auto; width: 17px; height: 17px; margin: 0 10px 0 14px; color: #52596b; }
.global-search input { min-width: 0; flex: 1; height: 100%; padding: 0; border: 0; outline: 0; background: transparent; color: #505666; font-size: 12px; }
.global-search input::placeholder { color: #969aa6; }
.global-search button { display: inline-flex; align-items: center; justify-content: center; width: 59px; height: 34px; color: #fff; background: linear-gradient(110deg, #5b46f2, #5b3cf3); font-size: 13px; font-weight: 650; }
.top-actions { display: flex; align-items: center; gap: 14px; min-width: 0; margin-left: auto; }
.checkin-button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 93px; height: 35px; padding: 0 10px; border: 1px solid #f3e5de; border-radius: 9px; color: #684b38; background: #fffdfb; font-size: 12px; }
.checkin-button .icon { width: 16px; height: 16px; color: #f15d4f; }
.checkin-button b { color: #6e5548; font-weight: 700; }
.credits { display: flex; align-items: center; gap: 7px; height: 35px; color: #181b24; font-size: 13px; }
.credits .coin { display: inline-flex; align-items: center; justify-content: center; width: 19px; height: 19px; color: #f2a21e; }
.credits .coin .icon { width: 18px; height: 18px; stroke-width: 1.65; }
.credits strong { font-weight: 600; }
.credits button { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; margin-left: 3px; border-radius: 50%; color: #767b86; background: #f0f1f4; }
.credits button .icon { width: 12px; height: 12px; stroke-width: 2; }
.top-icon { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 34px; color: #151820; background: transparent; }
.top-icon .icon { width: 19px; height: 19px; }
.profile-button { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 34px; padding: 0; background: transparent; }
.profile-avatar { display: flex; align-items: center; justify-content: center; width: 31px; height: 31px; overflow: hidden; border: 1px solid #d9dce3; border-radius: 50%; color: #fff; font-size: 0; box-shadow: 0 1px 4px rgba(35, 39, 55, .08); }

/* Main case canvas */
.case-shell { min-height: calc(100vh - 61px); margin: 0 10px; padding: 0 11px 30px; border: 1px solid #f0f1f4; border-top: 0; border-radius: 0 12px 0 0; background: #fff; }
.back-button { display: inline-flex; align-items: center; gap: 7px; height: 31px; margin: 9px 0 7px; padding: 0 1px; color: #3f434d; background: transparent; font-size: 12px; }
.back-button .icon { width: 16px; height: 16px; stroke-width: 1.6; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 811px) minmax(390px, 1fr); align-items: start; gap: 22px; }
.media-column, .detail-sidebar { min-width: 0; }

/* Video and thumbnail rail */
.video-frame { position: relative; height: 398px; min-height: 220px; overflow: hidden; border: 1px solid #dfe3ea; border-radius: 10px; background-color: #152339; box-shadow: 0 2px 4px rgba(35, 43, 67, .05); }
.video-frame.is-live { background-image: var(--live-thumb); background-repeat: no-repeat; background-position: center; background-size: contain; }
.video-frame.is-empty { background: #0f141f; background-image: none; }
.thumb.is-empty { background: #0f141f; background-image: none; }
.video-frame.is-live video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: transparent; }
.video-frame .still-original { display: block; width: 100%; height: auto; max-height: min(85vh, 920px); object-fit: contain; object-position: center; background: #0f141f; cursor: zoom-in; }
.case-shell[data-orientation="landscape"] .video-frame { aspect-ratio: 16 / 9; height: auto; min-height: 220px; }
.case-shell[data-orientation="landscape"] .video-frame.is-live { background-size: cover; }
.case-shell[data-orientation="landscape"] .video-frame.is-live video { object-fit: cover; }
.case-shell[data-orientation="portrait"] .video-frame { width: min(100%, 520px); height: auto; min-height: 220px; aspect-ratio: 9 / 16; margin-right: auto; margin-left: auto; }
.case-shell[data-orientation="other"] .video-frame { width: min(100%, 520px); height: auto; min-height: 220px; aspect-ratio: 1 / 1; margin-right: auto; margin-left: auto; }
.case-shell[data-orientation="wide"] .video-frame { aspect-ratio: 21 / 9; height: auto; min-height: 220px; }
.case-shell[data-type="image"] .video-frame { height: auto; min-height: 0; aspect-ratio: auto; }
.case-shell[data-type="image"] .video-frame::after { display: none; }
.case-shell[data-type="image"] .video-frame.is-live { background-image: none; }
.video-frame::after { position: absolute; inset: 0; content: ""; pointer-events: none; background: linear-gradient(180deg, rgba(7, 13, 24, .22), transparent 20%, transparent 70%, rgba(7, 13, 24, .48)); }
.video-top-left, .video-actions, .video-bottom-left, .video-controls, .main-play { z-index: 2; }
.video-top-left { position: absolute; top: 13px; left: 12px; display: flex; align-items: center; gap: 7px; color: #fff; }
.video-type, .video-duration, .video-gallery-count, .video-bottom-left span { display: inline-flex; align-items: center; justify-content: center; min-height: 25px; padding: 0 9px; border-radius: 8px; color: #fff; background: rgba(14, 23, 39, .74); font-size: 11px; font-weight: 650; backdrop-filter: blur(6px); }
.video-type { background: rgba(35, 34, 72, .78); }
.video-duration { padding: 0 8px; font-variant-numeric: tabular-nums; }
.video-actions { position: absolute; top: 13px; right: 10px; display: flex; gap: 7px; }
.share-panel { margin: 12px 0 8px; padding: 12px 0 4px; border-top: 1px solid rgba(255,255,255,.08); }
.share-panel-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.share-panel-head strong { margin-right: 4px; color: var(--text, #e8e8ef); font-size: 13px; }
.share-panel-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.share-row-button, .share-icon { display: inline-flex; align-items: center; justify-content: center; min-height: 32px; padding: 0 12px; color: var(--text, #e8e8ef); border: 1px solid rgba(255,255,255,.16); border-radius: 999px; background: rgba(8,11,18,.55); font-size: 12px; font-weight: 650; text-decoration: none; cursor: pointer; }
.share-icon { min-width: 36px; }
.share-row-button:hover, .share-icon:hover { border-color: rgba(179,170,255,.6); }
.media-action { display: inline-flex; align-items: center; justify-content: center; width: 29px; height: 29px; color: #fff; border: 1px solid rgba(255, 255, 255, .17); border-radius: 7px; background: rgba(13, 20, 34, .46); }
.media-action .icon { width: 19px; height: 19px; stroke-width: 1.8; }
.media-action.is-on { color: #ff7597; }
.main-play { position: absolute; top: 50%; left: 50%; display: inline-flex; align-items: center; justify-content: center; width: 70px; height: 70px; color: #fff; border: 1px solid rgba(255, 255, 255, .92); border-radius: 50%; background: rgba(12, 17, 24, .57); transform: translate(-50%, -50%); }
.main-play .icon { width: 31px; height: 31px; margin-left: 4px; fill: currentColor; stroke: none; }
.main-play[hidden] { display: none !important; }
.video-controls { position: absolute; right: 10px; bottom: 9px; left: 10px; display: grid; grid-template-rows: 12px 28px; gap: 5px; min-height: 49px; padding: 6px 8px; color: #fff; border: 1px solid rgba(255, 255, 255, .2); border-radius: 9px; background: rgba(8, 13, 24, .8); box-shadow: 0 5px 18px rgba(0, 0, 0, .24); backdrop-filter: blur(10px); opacity: 0; pointer-events: none; transform: translateY(5px); transition: opacity .18s ease, transform .18s ease; }
.video-frame:hover .video-controls, .video-frame:focus-within .video-controls, .video-frame.is-controls-visible .video-controls { opacity: 1; pointer-events: auto; transform: translateY(0); }
.video-controls[hidden] { display: none !important; }
.video-control-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.video-control-button { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 28px; width: 28px; height: 28px; padding: 0; color: inherit; border: 0; border-radius: 6px; background: transparent; }
.video-control-button:hover, .video-control-button:focus-visible, .video-control-button.is-active { background: rgba(255, 255, 255, .15); }
.video-control-button:focus-visible, .video-progress:focus-visible, .video-volume-range:focus-visible { outline: 2px solid #bcb5ff; outline-offset: 2px; }
.video-control-button .icon { width: 18px; height: 18px; fill: currentColor; stroke: currentColor; stroke-width: 1.55; stroke-linecap: round; stroke-linejoin: round; }
.video-time { flex: 0 0 auto; min-width: 34px; color: rgba(255, 255, 255, .84); font-size: 11px; font-variant-numeric: tabular-nums; text-align: center; }
.video-progress, .video-volume-range { min-width: 0; margin: 0; accent-color: #9b8cff; cursor: pointer; }
.video-progress { grid-row: 1; width: 100%; height: 4px; }
.video-volume-control { display: inline-flex; align-items: center; min-width: 28px; }
.video-volume-range { flex: 0 0 auto; width: 0; height: 4px; opacity: 0; pointer-events: none; transition: width .16s ease, opacity .16s ease; }
.video-volume-control:hover .video-volume-range, .video-volume-control:focus-within .video-volume-range { width: 76px; opacity: 1; pointer-events: auto; }
@media (hover: none) {
  .video-frame .video-controls { opacity: 1; pointer-events: auto; transform: none; }
  .video-volume-range { width: 72px; opacity: 1; pointer-events: auto; }
}

.unknown-case-state { display: flex; min-height: calc(100vh - 120px); flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 56px 24px; text-align: center; }
.unknown-case-mark { display: inline-flex; width: 70px; height: 70px; align-items: center; justify-content: center; color: #6047e8; border: 1px solid #d8d0ff; border-radius: 22px; background: #f1edff; font-size: 34px; font-weight: 800; }
.unknown-case-state p { margin: 8px 0 0; color: #7664e8; font-size: 12px; font-weight: 800; letter-spacing: .14em; }
.unknown-case-state h1 { margin: 0; color: #171923; font-size: 30px; }
.unknown-case-state div { max-width: 100%; color: #74798a; font-size: 14px; overflow-wrap: anywhere; word-break: break-word; }
.unknown-case-state code { color: #4434a4; overflow-wrap: anywhere; word-break: break-word; }
.unknown-case-state a { display: inline-flex; min-height: 42px; margin-top: 8px; align-items: center; justify-content: center; padding: 0 20px; color: #fff; border-radius: 10px; background: #6047e8; font-weight: 750; }
.prototype-pill { display: inline-flex; min-height: 32px; align-items: center; padding: 0 12px; color: #7065a8; border: 1px solid #e2dcff; border-radius: 9px; background: #f7f5ff; font-size: 12px; font-weight: 700; }
.video-bottom-left { position: absolute; bottom: 58px; left: 12px; display: flex; gap: 8px; }
.video-bottom-left [data-media-resolution] { display: none; }
.video-bottom-left span { min-height: 25px; padding: 0 9px; font-size: 11px; }
.thumb-row { display: flex; align-items: center; gap: 10px; height: 65px; margin-top: 14px; }
.thumb-arrow { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 30px; width: 30px; height: 30px; border: 1px solid #e4e7ed; border-radius: 50%; color: #8a91a0; background: #fff; }
.thumb-arrow .icon { width: 16px; height: 16px; stroke-width: 1.55; }
.thumb-arrow:hover { color: var(--purple); border-color: #bdb6ff; background: #faf9ff; }
.thumb-viewport { min-width: 0; flex: 1; overflow: hidden; }
.thumb-list { display: flex; gap: 8px; width: max-content; transition: transform .25s ease; }
.thumb { position: relative; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 88px; width: 88px; height: 60px; overflow: hidden; border: 2px solid transparent; border-radius: 8px; background-color: #1d2738; }
.thumb.is-active { border-color: #5840f5; box-shadow: 0 0 0 1px rgba(90, 70, 245, .12); }
.thumb-play, .mini-video { display: inline-flex; align-items: center; justify-content: center; color: #fff; border: 1px solid rgba(255,255,255,.85); border-radius: 50%; background: rgba(10, 15, 24, .61); }
.thumb-play { width: 24px; height: 24px; }
.thumb-play .icon { width: 13px; height: 13px; margin-left: 2px; fill: currentColor; stroke: none; }

/* Prompt editor */
.prompt-card { margin-top: 17px; border: 1px solid #edf0f4; border-radius: 10px; background: #fff; box-shadow: 0 2px 7px rgba(34, 43, 69, .025); }
.prompt-tabs { display: flex; align-items: stretch; min-height: 46px; border-bottom: 1px solid #eff1f5; }
.prompt-tab { position: relative; display: inline-flex; flex: 1 1 0; align-items: center; justify-content: center; min-width: 0; min-height: 46px; padding: 10px 12px; color: #4c5260; background: transparent; font-size: 12px; line-height: 1.35; white-space: normal; overflow-wrap: anywhere; word-break: break-word; }
.prompt-tab.is-active { color: var(--purple); font-weight: 650; }
.prompt-tab.is-active::after { position: absolute; right: 16px; bottom: -1px; left: 16px; height: 3px; content: ""; border-radius: 3px 3px 0 0; background: var(--purple); }
.prompt-body { padding: 0 10px 8px; }
.prompt-copy-area { position: relative; min-width: 0; max-width: 100%; margin: 0; padding: 21px 14px 11px; border: 1px solid #edf0f4; border-top: 0; border-radius: 0 0 9px 9px; background: #fff; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; }
.prompt-copy-area p { margin: 0; color: #2d3038; font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: 11px; line-height: 2; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; }
.prompt-text { display: block; width: 100%; min-width: 0; max-width: 100%; margin: 0; overflow: visible; color: #2d3038; background: transparent; font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: 12px; line-height: 1.85; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; }
.prompt-copy-area.is-collapsed .prompt-text { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 10; }
.prompt-copy-area.is-expanded .prompt-text { display: block; overflow: visible; }
.prompt-toggle { display: inline-flex; min-height: 32px; margin-top: 12px; align-items: center; padding: 0 11px; color: #5b46e8; border: 1px solid #ded9ff; border-radius: 8px; background: #f8f7ff; font-size: 11px; font-weight: 700; }
.parameter-view { display: grid; gap: 10px; min-width: 0; color: #2d3038; font-size: 11px; line-height: 1.6; }
.parameter-view > div { display: grid; grid-template-columns: minmax(44px, 74px) minmax(0, 1fr); gap: 8px; min-width: 0; align-items: start; }
.parameter-view b { color: #4c5260; font-weight: 700; }
.parameter-view span { min-width: 0; color: #2d3038; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; }
.rights-banner { margin: 0 0 12px; padding: 10px 12px; border: 1px solid #d8b25a; border-radius: 10px; background: #fff8e8; color: #6a4b12; font-size: 12px; line-height: 1.5; }
.rights-banner[hidden] { display: none; }
.copy-success { position: static; display: inline-flex; align-items: center; gap: 5px; max-width: 100%; min-height: 31px; margin: 14px 0 0 auto; padding: 7px 12px; color: #30a37b; border-radius: 9px; background: #ecfbf5; font-size: 11px; line-height: 1.4; opacity: .95; white-space: normal; overflow-wrap: anywhere; word-break: break-word; }
.copy-success[hidden] { display: none; }
.copy-success .icon { width: 13px; height: 13px; stroke-width: 2; }
.prompt-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 41px; padding: 10px 12px 0 4px; color: #747b89; font-size: 11px; }
.prompt-foot button { display: inline-flex; align-items: center; gap: 6px; min-width: 0; color: var(--purple); background: transparent; font-size: 11px; white-space: normal; overflow-wrap: anywhere; word-break: break-word; }
.prompt-foot button .icon { width: 14px; height: 14px; }
.prompt-foot button:disabled { color: #a3a7b1; cursor: not-allowed; }

/* Related cases */
.related-section { margin-top: 13px; }
.related-heading { display: flex; align-items: baseline; gap: 13px; height: 31px; }
.related-heading h2 { margin: 0; color: #242630; font-size: 15px; font-weight: 750; letter-spacing: -.02em; }
.related-heading button { padding: 0; color: var(--purple); background: transparent; font-size: 11px; }
.related-viewport { overflow: hidden; }
.related-grid { display: grid; grid-auto-flow: column; grid-auto-columns: 138px; gap: 11px; width: max-content; }
.related-card { min-width: 0; overflow: hidden; }
.related-image { position: relative; width: 138px; height: 99px; overflow: hidden; border-radius: 8px; background-color: #283448; }
.related-image.is-live img { display: block; width: 100%; height: 100%; object-fit: cover; }

.media-lightbox { position: fixed; z-index: 80; inset: 0; display: grid; place-items: center; padding: 28px; background: rgba(4, 7, 14, .92); }
.media-lightbox[hidden] { display: none; }
.lightbox-stage { display: flex; align-items: center; justify-content: center; width: min(100%, 96vw); max-height: min(90vh, 980px); }
.lightbox-stage img { display: block; width: auto; height: auto; max-width: 100%; max-height: min(90vh, 980px); object-fit: contain; object-position: center; }
.lightbox-close { position: absolute; top: 16px; right: 18px; width: 38px; height: 38px; color: #fff; border: 1px solid rgba(255, 255, 255, .25); border-radius: 50%; background: rgba(8, 12, 22, .68); font-size: 28px; line-height: 1; cursor: pointer; }
.related-image.is-empty { background: #0f141f; background-image: none; }
.related-card a { color: inherit; text-decoration: none; }
.related-empty { margin: 8px 0 0; color: #8c92a0; font-size: 12px; }
.mini-video { position: absolute; right: 7px; bottom: 7px; width: 19px; height: 19px; }
.mini-video .icon { width: 10px; height: 10px; margin-left: 1px; fill: currentColor; stroke: none; }
.related-card h3 { margin: 6px 1px 0; overflow: hidden; color: #30333c; font-size: 11px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.related-card p { display: flex; align-items: center; gap: 2px; margin: 3px 1px 0; color: #8c92a0; font-size: 10px; }
.related-card p .icon { width: 12px; height: 12px; stroke-width: 1.35; }

/* Right-hand case information */
.detail-sidebar { padding-top: 0; }
.case-overview { padding: 0 0 0; }
.title-row { display: flex; align-items: center; min-height: 36px; gap: 9px; }
.title-row h1 { margin: 0; color: #171922; font-size: 18px; font-weight: 750; letter-spacing: -.03em; }
.selected-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 43px; height: 21px; padding: 0 8px; border-radius: 10px; color: #5e4df0; background: #f0efff; font-size: 11px; }
.author-row { display: flex; align-items: center; height: 33px; margin-top: 4px; color: #21232b; }
.author-avatar { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; overflow: hidden; margin-right: 9px; border: 1px solid #dce0e6; border-radius: 50%; color: transparent; }
.author-row strong { font-size: 13px; font-weight: 600; }
.author-name { min-width: 0; margin-left: 6px; color: #7c818e; font-size: 11px; overflow-wrap: anywhere; }
.verified-mark { display: inline-flex; align-items: center; justify-content: center; width: 14px; height: 14px; margin-left: 5px; border-radius: 50%; color: #fff; background: #5651db; }
.sample-badge { display: inline-flex; align-items: center; min-height: 18px; margin-left: 7px; padding: 0 6px; color: #777d8c; border: 1px solid #e3e5eb; border-radius: 9px; background: #f7f8fa; font-size: 10px; }
.verified-mark .icon { width: 10px; height: 10px; stroke-width: 2.4; }
.published { margin: 5px 0 0; color: #7c818e; font-size: 12px; }
.case-crumb { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 8px; color: #7c818e; font-size: 12px; }
.case-crumb a { color: inherit; text-decoration: none; }
.case-crumb a:hover { color: #3a3f4b; }
.case-source-line { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 8px 0 0; color: #5c6270; font-size: 12px; }
.case-source-line a { color: #3d4dd8; text-decoration: none; }
.spec-bar { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.spec-chip { display: inline-flex; align-items: center; min-height: 26px; padding: 0 10px; border-radius: 999px; color: #3a4150; background: #f3f4f7; font-size: 12px; }
.spec-chip .spec-key { margin-right: 6px; color: #8b909c; font-size: 10px; font-weight: 650; }
.spec-chip small { margin-left: 6px; color: #8b909c; font-size: 10px; }
.tag-list a { display: inline-flex; align-items: center; justify-content: center; min-height: 26px; padding: 0 10px; border-radius: 12px; color: #5b606c; background: #f3f4f6; font-size: 10px; text-decoration: none; white-space: nowrap; }
.stats-row { display: grid; grid-template-columns: repeat(3, 1fr); align-items: start; height: 56px; margin-top: 15px; }
.stat { display: flex; flex-direction: column; align-items: center; gap: 1px; color: #989da7; font-size: 11px; }
.stat + .stat { border-left: 0; }
.stat strong { display: flex; align-items: center; gap: 6px; color: #171922; font-size: 16px; font-weight: 650; line-height: 1.25; }
.stat strong .icon { width: 17px; height: 17px; stroke-width: 1.55; }
.hot-symbol { color: #ff7044; font-size: 22px; line-height: 18px; transform: rotate(180deg); }

.model-card { min-height: 308px; margin-top: 10px; padding: 14px 14px 15px; border: 1px solid #eceef3; border-radius: 11px; background: #fff; }
.model-card h2 { margin: 0 0 9px; color: #22242a; font-size: 12px; font-weight: 700; }
.model-name { display: flex; align-items: center; gap: 8px; height: 25px; color: #282a31; }
.model-logo { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 3px; color: #fff; background: #23282e; font-size: 12px; line-height: 1; }
.model-name strong { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 12px; background: #f2f3f5; font-size: 12px; font-weight: 500; }
.model-details { display: grid; gap: 6px; margin: 17px 0 19px; }
.model-details div { display: grid; grid-template-columns: 74px 1fr; font-size: 11px; }
.model-details dt { color: #22242b; }
.model-details dd { margin: 0; color: #30333a; }
.model-details dd { min-width: 0; line-height: 1.55; }
.model-chip { display: inline-flex; align-items: center; min-height: 22px; padding: 0 8px; color: #5745e9; border-radius: 6px; background: #f0efff; font-size: 11px; font-weight: 600; }
.model-state { margin-left: 6px; color: #7c8190; font-size: 10px; }
.model-muted { color: #9a9fad !important; }
.compact-details { margin-top: 10px; margin-bottom: 15px; }
.tag-title { margin-bottom: 9px !important; }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px 8px; }
.tag-list span { display: inline-flex; align-items: center; justify-content: center; min-height: 26px; padding: 0 10px; border-radius: 12px; color: #5b606c; background: #f3f4f6; font-size: 10px; white-space: nowrap; }

.mechanism-card { margin-top: 10px; padding: 14px; border: 1px solid #e6e3ff; border-radius: 11px; background: linear-gradient(145deg, #fbfaff, #f6f7ff); }
.mechanism-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.mechanism-kicker { display: block; margin-bottom: 5px; color: #8176dc; font-size: 9px; font-weight: 800; letter-spacing: .12em; }
.mechanism-heading h2 { margin: 0; color: #29214f; font-size: 13px; line-height: 1.35; }
.mechanism-badge { display: inline-flex; align-items: center; height: 21px; padding: 0 8px; border-radius: 11px; color: #5b4ad8; background: #ebe8ff; font-size: 10px; font-weight: 700; white-space: nowrap; }
.mechanism-summary { margin: 10px 0 12px; color: #64657c; font-size: 11px; line-height: 1.6; }
.mechanism-grid { display: grid; gap: 8px; }
.mechanism-grid div { display: grid; grid-template-columns: 67px 1fr; gap: 8px; align-items: start; padding-top: 8px; border-top: 1px solid rgba(129, 118, 220, .14); }
.mechanism-grid span { color: #8a879f; font-size: 10px; }
.mechanism-grid strong { color: #3b3760; font-size: 10px; font-weight: 650; line-height: 1.45; }

/* Creative Reference object */
.reference-card { margin-top: 12px; padding: 14px; border: 1px solid #e4e1ff; border-radius: 11px; background: linear-gradient(145deg, #fcfbff, #f7f7ff); }
.reference-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.reference-heading h2 { margin: 0; color: #29214f; font-size: 13px; line-height: 1.35; }
.reference-badge { display: inline-flex; align-items: center; min-height: 21px; padding: 0 8px; border-radius: 11px; color: #5b4ad8; background: #ebe8ff; font-size: 10px; font-weight: 700; white-space: nowrap; }
.reference-summary { margin: 9px 0 10px; color: #66677e; font-size: 11px; line-height: 1.6; }
.reference-path-row { display: flex; align-items: center; gap: 7px; min-width: 0; padding: 8px 9px; border: 1px solid #e8e6f5; border-radius: 8px; background: rgba(255,255,255,.78); }
.reference-path-row code { min-width: 0; flex: 1; overflow: hidden; color: #4e4690; font-family: "SFMono-Regular", Consolas, monospace; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.reference-path-row button { display: inline-flex; align-items: center; gap: 4px; flex: 0 0 auto; padding: 3px 0; color: #5b46e8; background: transparent; font-size: 10px; font-weight: 700; }
.reference-path-row button .icon { width: 13px; height: 13px; }
.reference-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.reference-meta span { display: inline-flex; align-items: center; min-height: 22px; padding: 0 7px; border-radius: 11px; color: #747184; background: #f0eff9; font-size: 10px; }
.reference-actions { display: flex; align-items: center; gap: 9px; min-width: 0; margin-top: 11px; }
.reference-adapt-trigger { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 34px; padding: 0 10px; border: 1px solid #bdb5ff; border-radius: 8px; color: #fff; background: #6651ea; font-size: 11px; font-weight: 700; }
.reference-adapt-trigger:hover { background: #5743d7; }
.reference-adapt-trigger .icon { width: 14px; height: 14px; }
.reference-rights-note { min-width: 0; color: #8a8998; font-size: 10px; line-height: 1.4; }
.reference-adapt-form { display: grid; gap: 9px; margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(129,118,220,.14); }
.reference-adapt-form label { display: grid; gap: 4px; min-width: 0; color: #6d6a80; font-size: 10px; }
.reference-adapt-form input, .reference-adapt-form select { width: 100%; min-width: 0; height: 32px; padding: 0 8px; border: 1px solid #e2e1eb; border-radius: 7px; outline: 0; color: #363442; background: #fff; font-size: 11px; }
.reference-adapt-form input:focus, .reference-adapt-form select:focus { border-color: #9b90f2; box-shadow: 0 0 0 2px rgba(102,81,234,.1); }
.reference-form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.reference-submit { min-height: 34px; border-radius: 8px; color: #5b46e8; border: 1px solid #d4cffd; background: #f0efff; font-size: 11px; font-weight: 750; }
.reference-form-note { margin: 0; color: #9895a7; font-size: 10px; line-height: 1.45; }
.reference-result { margin-top: 11px; padding: 10px; border: 1px solid #dceee7; border-radius: 8px; color: #49645b; background: #f5fcf8; font-size: 10px; line-height: 1.55; }
.reference-result strong { display: block; margin-bottom: 4px; color: #2c5948; font-size: 11px; }
.reference-result ul { margin: 5px 0 0; padding-left: 16px; }

/* Inspiration directions */
.inspiration-section[hidden] { display: none; }
.inspiration-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.inspiration-card { min-width: 0; padding: 12px; border: 1px solid #e8eaf0; border-radius: 10px; background: #fff; }
.inspiration-card.is-light { border-color: #e8e3ff; background: #fcfbff; }
.inspiration-card.is-medium { border-color: #dce8ff; background: #f9fbff; }
.inspiration-card.is-deep { border-color: #d9eee6; background: #f8fdfb; }
.inspiration-card h3 { margin: 0; color: #272933; font-size: 12px; }
.inspiration-card .inspiration-strength { display: block; margin-top: 3px; color: #827aa5; font-size: 9px; font-weight: 800; letter-spacing: .1em; }
.inspiration-card p { margin: 9px 0 0; color: #666a77; font-size: 11px; line-height: 1.6; }
.inspiration-card .inspiration-changes { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
.inspiration-card .inspiration-changes span { display: inline-flex; min-height: 20px; align-items: center; padding: 0 6px; border-radius: 10px; color: #6a6b78; background: #f0f1f5; font-size: 9px; }
.inspiration-card button { width: 100%; min-height: 30px; margin-top: 11px; border: 1px solid #dedfee; border-radius: 7px; color: #5847d4; background: #fff; font-size: 10px; font-weight: 700; }
.inspiration-card button:hover { border-color: #aaa1f0; background: #faf9ff; }

/* Provenance */
.detail-section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.section-kicker { display: block; margin-bottom: 4px; color: #8176dc; font-size: 9px; font-weight: 800; letter-spacing: .12em; }
.detail-section-heading h2 { margin: 0; color: #22242d; font-size: 13px; line-height: 1.35; }
.detail-section-badge { display: inline-flex; align-items: center; min-height: 22px; padding: 3px 8px; color: #737887; border: 1px solid #e4e6ec; border-radius: 999px; background: #fff; font-size: 10px; line-height: 1.35; text-align: right; }

.primary-actions { min-width: 0; margin-top: 20px; }
.copy-prompt-button { display: flex; align-items: center; justify-content: center; gap: 9px; width: 100%; min-width: 0; height: 48px; padding: 0 12px; border-radius: 9px; color: #fff; background: linear-gradient(105deg, var(--purple-2), var(--purple)); box-shadow: 0 7px 16px color-mix(in srgb, var(--purple) 20%, transparent); font-size: 15px; font-weight: 650; }
.copy-prompt-button .icon { width: 18px; height: 18px; }
.secondary-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; min-width: 0; margin-top: 14px; }
.edit-prompt-button, .favorite-prompt-button, .generate-button, .remix-idea-button { display: flex; align-items: center; justify-content: center; gap: 8px; min-width: 0; width: 100%; min-height: 42px; height: auto; padding: 8px; border-radius: 8px; background: #fff; font-size: 13px; font-weight: 600; line-height: 1.35; white-space: normal; overflow-wrap: anywhere; word-break: break-word; }
.edit-prompt-button { border: 1px solid #d7d9e2; color: #4f5562; }
.favorite-prompt-button { grid-column: 2; grid-row: 1; border: 1px solid #d7d9e2; color: #4f5562; }
.favorite-prompt-button.is-on { color: #d94f76; border-color: #f0a0b4; background: #fff2f5; }
.edit-prompt-button { grid-column: 1; grid-row: 1; }
.edit-prompt-button[hidden] { display: none !important; }
.generate-button { grid-column: 1 / -1; grid-row: 2; border: 1px solid #ffb28a; color: #ff7a25; }
.generate-result { margin: 12px 0 0; padding: 12px; border: 1px solid var(--line, #e4e6ec); border-radius: 10px; background: var(--surface, #fff); }
.generate-result img { display: block; width: 100%; border-radius: 8px; }
.generate-result p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.generate-result img + p { margin-top: 8px; }
.generate-result a { color: var(--purple, #5b45df); }
.remix-idea-button { grid-column: 1; grid-row: 1; border: 1px solid #c9b8ff; color: #5b45df; }
.action-rights { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: 11px; line-height: 1.45; }
.action-rights span { display: inline-flex; align-items: center; min-height: 22px; padding: 0 8px; border: 1px solid var(--line, #e4e6ec); border-radius: 999px; background: var(--surface, #fff); color: var(--text-soft, #4f5562); }
.remix-idea-hint { margin: 8px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.remix-idea-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.remix-idea-actions button { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px; border: 1px solid #d7d9e2; border-radius: 8px; background: #fff; color: #4f5562; font-size: 12px; font-weight: 700; }
.remix-idea-actions #copy-remix-idea { color: #5b45df; border-color: #c9b8ff; }
.remix-idea-actions .rewrite-remix-idea { color: #fff; border-color: transparent; background: linear-gradient(105deg, var(--purple-2), var(--purple)); }
.edit-prompt-button .icon, .favorite-prompt-button .icon, .generate-button .icon, .remix-idea-button .icon { width: 17px; height: 17px; flex: 0 0 auto; }
.generate-button .icon { stroke-width: 1.45; }
.copy-prompt-button:disabled, .edit-prompt-button:disabled, .generate-button:disabled, .remix-idea-button:disabled { color: #969ba7; border-color: #e0e2e8; background: #f1f2f5; box-shadow: none; cursor: not-allowed; }
.remix-idea-card { margin-top: 14px; }
.remix-idea-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.remix-idea-heading h2 { margin: 0; font-size: 14px; }
.remix-idea-direction { margin: 10px 0 8px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.remix-idea-prompt { white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; }
.help-card { min-height: 111px; margin-top: 13px; padding: 12px 16px 10px; border-radius: 9px; color: #757a88; background: linear-gradient(110deg, #f7f8ff, #f8f7ff); }
.help-card h2 { margin: 0 0 5px; color: #262830; font-size: 12px; font-weight: 750; }
.help-card ol { margin: 0; padding-left: 15px; font-size: 11px; line-height: 1.95; }
.help-card li { padding-left: 1px; }
.tip-card { min-height: 68px; margin-top: 15px; padding: 11px 16px 10px; border-radius: 9px; background: #fff9ef; }
.tip-card h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 5px; color: #262830; font-size: 12px; font-weight: 750; }
.tip-card h2 .icon { width: 17px; height: 17px; color: #efaa31; stroke-width: 1.55; }
.tip-card p { margin: 0; color: #8f887e; font-size: 11px; line-height: 1.6; }

/* Structured work detail */
.detail-sections { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 28px; padding-bottom: 12px; }
.detail-section { min-width: 0; padding: 18px; border: 1px solid #e8eaf0; border-radius: 12px; background: #fff; box-shadow: 0 3px 12px rgba(31, 38, 63, .035); }
.recipe-summary { margin-top: 14px; padding: 13px 14px; border-radius: 9px; background: #f8f7ff; }
.recipe-summary h3 { margin: 0; color: #342d69; font-size: 13px; }
.recipe-summary p { margin: 6px 0 0; color: #686b7d; font-size: 11px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; }
.recipe-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.recipe-field { min-width: 0; padding: 11px 12px; border: 1px solid #eff0f4; border-radius: 9px; background: #fcfcfd; }
.recipe-field span { display: block; margin-bottom: 4px; color: #8b909d; font-size: 10px; }
.recipe-field strong { display: block; min-width: 0; color: #373a44; font-size: 11px; font-weight: 650; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; }
.recipe-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.recipe-tags span { display: inline-flex; min-height: 25px; align-items: center; padding: 0 9px; color: #5f6370; border-radius: 999px; background: #f1f2f5; font-size: 10px; }
.play-list { display: grid; gap: 10px; margin-top: 14px; }
.play-list article { min-width: 0; padding: 12px 13px; border-left: 3px solid #8b7cff; border-radius: 0 9px 9px 0; background: #faf9ff; }
.play-list h3 { margin: 0; color: #3d3769; font-size: 11px; }
.play-list p { margin: 5px 0 0; color: #686b7b; font-size: 11px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; }
.variant-content { margin-top: 14px; }
.variant-frames { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.variant-frames article { display: flex; min-width: 0; flex-direction: column; gap: 4px; padding: 11px 12px; border: 1px solid #eceef3; border-radius: 9px; background: #fcfcfd; }
.variant-frames strong { font-size: 11px; }
.variant-frames span { color: #888e9b; font-size: 10px; overflow-wrap: anywhere; }
.variant-evidence, .detail-empty { margin: 12px 0 0; color: #858b98; font-size: 11px; line-height: 1.65; }
.source-list { display: grid; gap: 0; margin: 13px 0 0; }
.source-list div { display: grid; grid-template-columns: 82px minmax(0, 1fr); gap: 10px; padding: 9px 0; border-top: 1px solid #eff0f4; }
.source-list dt { color: #8a909c; font-size: 10px; }
.source-list dd { min-width: 0; margin: 0; color: #3c3f49; font-size: 11px; line-height: 1.55; overflow-wrap: anywhere; word-break: break-word; }
.source-list a { color: #5947df; text-decoration: underline; text-underline-offset: 2px; }
.source-disclaimer { margin: 10px 0 0; padding: 10px 11px; color: #776d58; border-radius: 8px; background: #fff8e9; font-size: 10px; line-height: 1.55; }

.toast { position: fixed; z-index: 30; right: 24px; bottom: 24px; min-width: 150px; padding: 10px 16px; border: 1px solid #dcd8ff; border-radius: 9px; color: #4f43cd; background: #fff; box-shadow: 0 10px 28px rgba(52, 47, 125, .14); font-size: 12px; opacity: 0; pointer-events: none; transform: translateY(8px); transition: opacity .2s ease, transform .2s ease; }
.toast.is-visible { opacity: 1; transform: translateY(0); }

/* Keep the composition useful outside the reference viewport. */
@media (max-width: 1260px) {
  .global-search { margin-left: 100px; }
  .detail-grid { grid-template-columns: minmax(0, 1.55fr) minmax(370px, .9fr); gap: 18px; }
  .video-frame { height: 350px; }
  .related-grid { grid-auto-columns: 125px; }
  .related-image { width: 125px; height: 90px; }
}

@media (max-width: 1080px) {
  html, body { min-width: 0; overflow-x: hidden; }
  .sidebar { width: 178px; }
  .workspace { margin-left: 178px; }
  .global-search { flex: 1 1 auto; width: auto; min-width: 0; margin-left: 0; }
  .detail-grid { grid-template-columns: minmax(0, 1fr); }
  .detail-sidebar { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
  .case-overview, .source-section, .model-card, .mechanism-card, .primary-actions, .help-card, .tip-card { grid-column: span 1; }
  .primary-actions { margin-top: 0; }
  .detail-sections { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 620px) {
  html, body { min-width: 0; overflow-x: hidden; }
  .app-shell { width: 100%; min-width: 0; margin: 0; }
  .sidebar, .topbar { display: none; }
  .workspace { width: 100%; min-width: 0; margin-left: 0; }
  .case-shell { width: 100%; min-width: 0; margin: 0; padding: 0 12px 24px; border: 0; border-radius: 0; }
  .detail-grid { display: flex; min-width: 0; flex-direction: column; gap: 16px; }
  .media-column, .detail-sidebar { display: contents; }
  .video-frame, .thumb-row, .case-overview, .source-section, .prompt-card, .primary-actions, .model-card, .mechanism-card, .reference-card, .help-card, .tip-card, .related-section { width: 100%; min-width: 0; max-width: 100%; }
  .case-overview { order: 1; }
  .primary-actions { order: 2; }
  .video-frame { order: 3; max-height: 46vh; }
  .video-controls { right: 6px; bottom: 6px; left: 6px; grid-template-rows: 10px 26px; gap: 4px; min-height: 44px; padding: 4px 5px; }
  .video-control-row { gap: 4px; }
  .video-control-button { flex-basis: 26px; width: 26px; height: 26px; }
  .video-time { min-width: 29px; font-size: 10px; }
  .video-volume-control:hover .video-volume-range, .video-volume-control:focus-within .video-volume-range { width: 54px; }
  .video-bottom-left { bottom: 51px; left: 8px; gap: 4px; }
  .video-bottom-left span { min-height: 22px; padding: 0 6px; font-size: 9px; }
  .thumb-row { order: 4; }
  .source-section { order: 5; }
  .prompt-card, .share-panel { order: 6; }
  .model-card { order: 7; }
  .mechanism-card { order: 8; }
  .reference-card { order: 9; }
  .help-card { order: 10; }
  .tip-card { order: 11; }
  .related-section { order: 12; }
  .media-column, .detail-sidebar, .prompt-card, .prompt-body, .prompt-copy-area, .primary-actions, .secondary-actions { min-width: 0; max-width: 100%; }
  .prompt-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .prompt-tab { min-width: 0; width: 100%; padding: 8px 4px; font-size: 11px; line-height: 1.25; white-space: normal; overflow-wrap: anywhere; word-break: break-word; }
  .prompt-tab.is-active::after { right: 4px; left: 4px; }
  .title-row { align-items: flex-start; flex-wrap: wrap; min-height: 0; }
  .title-row h1 { min-width: 0; flex: 1 1 180px; overflow-wrap: anywhere; }
  .author-row strong { min-width: 0; max-width: calc(100% - 48px); overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
  .author-name { display: none; }
  .secondary-actions { gap: 8px; }
  .edit-prompt-button, .favorite-prompt-button, .generate-button, .remix-idea-button { gap: 5px; padding: 0 5px; font-size: 12px; line-height: 1.2; white-space: normal; overflow-wrap: anywhere; }
  .edit-prompt-button .icon, .favorite-prompt-button .icon, .generate-button .icon, .remix-idea-button .icon { width: 15px; height: 15px; }
  .recipe-grid, .variant-frames { grid-template-columns: minmax(0, 1fr); }
  .detail-sections { grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 18px; }
  .detail-section { padding: 15px; }
  .detail-section-heading { align-items: flex-start; flex-direction: column; gap: 7px; }
  .detail-section-badge { text-align: left; }
}

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.lang-switch { display: inline-flex; align-items: center; }
.lang-switch select { height: 27px; max-width: 108px; padding: 0 6px; color: var(--muted); border: 1px solid var(--line); border-radius: 7px; background: transparent; font-size: 12px; font-weight: 650; cursor: pointer; }
.lang-switch select:hover, .lang-switch select:focus { color: var(--ink); border-color: var(--purple); }
.lang-switch-sidebar { margin: 8px 16px 0; }
.theme-toggle { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; height: 34px; padding: 0; color: var(--muted); background: transparent; }
.theme-toggle:hover { color: var(--purple); }
.theme-toggle-icon { font-size: 18px; line-height: 1; }
.theme-toggle [data-theme-label] { display: none; }
.auth-button { display: inline-flex; align-items: center; justify-content: center; height: 32px; padding: 0 12px; color: #fff; border-radius: 8px; background: linear-gradient(115deg, var(--purple-2), var(--purple)); font-size: 12px; font-weight: 750; white-space: nowrap; }
.auth-button:hover { color: #fff; filter: brightness(1.08); }

body[data-theme="dark"] .app-shell,
body[data-theme="dark"] .workspace,
body[data-theme="dark"] .case-shell { background: var(--canvas); }
body[data-theme="dark"] .sidebar {
  background: var(--surface);
  border-right-color: var(--line);
}
body[data-theme="dark"] .brand,
body[data-theme="dark"] .topbar { background: rgba(17, 22, 32, .96); border-color: var(--line-strong); }
body[data-theme="dark"] .brand-name,
body[data-theme="dark"] .title-row h1,
body[data-theme="dark"] .author-row,
body[data-theme="dark"] .stat strong,
body[data-theme="dark"] .related-heading h2,
body[data-theme="dark"] .unknown-case-state h1 { color: var(--ink); }
body[data-theme="dark"] .case-crumb,
body[data-theme="dark"] .case-source-line { color: #b7bdca; }
body[data-theme="dark"] .case-crumb a:hover { color: #fff; }
body[data-theme="dark"] .spec-chip,
body[data-theme="dark"] .tag-list a { color: #d5d8e0; background: #232838; }
body[data-theme="dark"] .spec-chip .spec-key { color: #9aa3b5; }
body[data-theme="dark"] .nav-group h2,
body[data-theme="dark"] .published,
body[data-theme="dark"] .author-name,
body[data-theme="dark"] .stat,
body[data-theme="dark"] .prompt-foot,
body[data-theme="dark"] .related-card p,
body[data-theme="dark"] .related-empty { color: var(--muted); }
body[data-theme="dark"] .nav-link { color: var(--text-soft); }
body[data-theme="dark"] .nav-link:hover { color: var(--purple); background: #1b2231; }
body[data-theme="dark"] .nav-link.is-active { color: #cbb6ff; background: linear-gradient(90deg, #211b42, #1a1733); }
body[data-theme="dark"] .global-search {
  border-color: var(--line);
  background: var(--surface-soft);
}
body[data-theme="dark"] .global-search input { color: var(--text-soft); }
body[data-theme="dark"] .back-button { color: var(--text-soft); }
body[data-theme="dark"] .case-shell { border-color: var(--line-strong); }
body[data-theme="dark"] .prompt-card,
body[data-theme="dark"] .model-card,
body[data-theme="dark"] .detail-section,
body[data-theme="dark"] .inspiration-card,
body[data-theme="dark"] .toast {
  background: var(--surface);
  border-color: var(--line);
  color: var(--text-soft);
}
body[data-theme="dark"] .prompt-tabs,
body[data-theme="dark"] .prompt-copy-area,
body[data-theme="dark"] .source-list div { border-color: var(--line-strong); }
body[data-theme="dark"] .prompt-copy-area,
body[data-theme="dark"] .prompt-text,
body[data-theme="dark"] .parameter-view,
body[data-theme="dark"] .parameter-view span { color: var(--text-soft); background: var(--surface-soft); }
body[data-theme="dark"] .prompt-tab { color: var(--muted); }
body[data-theme="dark"] .prompt-tab.is-active { color: #cbb6ff; }
body[data-theme="dark"] .prompt-toggle {
  color: #cbb6ff;
  border-color: #3a3270;
  background: #1b1733;
}
body[data-theme="dark"] .rights-banner {
  border-color: #8a6a28;
  background: #2a2314;
  color: #e6c98a;
}
body[data-theme="dark"] .action-rights span {
  border-color: var(--line);
  background: var(--surface);
  color: var(--text-soft);
}
body[data-theme="dark"] .copy-success { background: #14332a; color: #6ee7b7; }
body[data-theme="dark"] .thumb-arrow {
  color: var(--muted);
  border-color: var(--line);
  background: var(--surface);
}
body[data-theme="dark"] .related-card h3,
body[data-theme="dark"] .model-card h2,
body[data-theme="dark"] .model-details dt,
body[data-theme="dark"] .model-details dd,
body[data-theme="dark"] .help-card h2,
body[data-theme="dark"] .tip-card h2,
body[data-theme="dark"] .detail-section-heading h2 { color: var(--ink); }
body[data-theme="dark"] .selected-badge,
body[data-theme="dark"] .model-chip,
body[data-theme="dark"] .tag-list span { color: #cbb6ff; background: #211b42; }
body[data-theme="dark"] .model-name strong,
body[data-theme="dark"] .sample-badge { color: var(--text-soft); background: #1b2231; border-color: var(--line); }
body[data-theme="dark"] .mechanism-card,
body[data-theme="dark"] .reference-card {
  border-color: #3a3270;
  background: linear-gradient(145deg, #161427, #12182a);
}
body[data-theme="dark"] .mechanism-heading h2,
body[data-theme="dark"] .reference-heading h2 { color: #e4dcff; }
body[data-theme="dark"] .mechanism-summary,
body[data-theme="dark"] .reference-summary,
body[data-theme="dark"] .mechanism-grid strong { color: var(--text-soft); }
body[data-theme="dark"] .mechanism-grid div { border-top-color: rgba(129, 118, 220, .22); }
body[data-theme="dark"] .reference-path-row {
  border-color: #3a3270;
  background: rgba(17, 22, 32, .78);
}
body[data-theme="dark"] .reference-path-row code { color: #cbb6ff; }
body[data-theme="dark"] .edit-prompt-button,
body[data-theme="dark"] .favorite-prompt-button,
body[data-theme="dark"] .remix-idea-button {
  color: var(--text-soft);
  border-color: var(--line);
  background: var(--surface);
}
body[data-theme="dark"] .remix-idea-button {
  border-color: #4a3d86;
  color: #cbb6ff;
}
body[data-theme="dark"] .generate-button {
  border-color: #6b3d22;
  color: #ffb089;
  background: #1c1512;
}
body[data-theme="dark"] .generate-result {
  border-color: var(--line);
  background: var(--surface);
}
body[data-theme="dark"] .generate-result a { color: #cbb6ff; }
body[data-theme="dark"] .copy-prompt-button:disabled,
body[data-theme="dark"] .edit-prompt-button:disabled,
body[data-theme="dark"] .generate-button:disabled,
body[data-theme="dark"] .remix-idea-button:disabled {
  color: #6d7484;
  border-color: var(--line);
  background: #151b28;
}
body[data-theme="dark"] .help-card { background: linear-gradient(110deg, #151b28, #171427); color: var(--muted); }
body[data-theme="dark"] .tip-card { background: #241c12; }
body[data-theme="dark"] .tip-card p { color: #cbb89a; }
body[data-theme="dark"] .recipe-summary,
body[data-theme="dark"] .play-list article { background: #171427; }
body[data-theme="dark"] .recipe-field,
body[data-theme="dark"] .variant-frames article {
  background: var(--surface-soft);
  border-color: var(--line);
}
body[data-theme="dark"] .recipe-field strong,
body[data-theme="dark"] .source-list dd { color: var(--text-soft); }
body[data-theme="dark"] .source-disclaimer {
  color: #e6c98a;
  background: #2a2314;
}
body[data-theme="dark"] .unknown-case-mark {
  color: #cbb6ff;
  border-color: #3a3270;
  background: #211b42;
}
body[data-theme="dark"] .toast {
  color: #cbb6ff;
  border-color: #3a3270;
  background: #151b28;
}
body[data-theme="dark"] .author-avatar { border-color: var(--line); background: #1b2231; }
