:root {
    --base: #08080c;
    --surface: #131318;
    --panel: #1b1b22;
    --line: rgba(255,255,255,.09);
    --text: #f5f5f7;
    --muted: #a6a6af;
    --dim: #71717a;
    --rpg: #c084fc;
    --rpg-2: #f472b6;
    --gta: #fbbf24;
    --gta-2: #f97316;
    --cyan: #22d3ee;
    --ease-out-soft: cubic-bezier(0.22, 1, 0.36, 1);
  }

  * { box-sizing: border-box; }

  html, body {
    margin: 0;
    background: var(--base);
    color: var(--text);
    font-family: Inter, system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
    color-scheme: dark;
  }
  body { overflow-x: hidden; }

  .app {
    min-height: 100vh;
    background:
      radial-gradient(1000px 500px at 15% -8%, rgba(192,132,252,.16), transparent 60%),
      radial-gradient(900px 480px at 90% 10%, rgba(34,211,238,.08), transparent 60%),
      linear-gradient(to bottom, #101016, var(--base) 420px);
    padding-bottom: 96px;
  }

  /* ================= Top bar ================= */
  .topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 26px;
    height: 64px;
    padding: 0 36px;
    background: linear-gradient(to bottom, rgba(0,0,0,.8), rgba(0,0,0,.35) 70%, transparent);
    backdrop-filter: blur(6px);
  }
  .brand {
    font-family: "Bebas Neue", sans-serif;
    letter-spacing: .06em;
    font-size: 26px;
    line-height: 1;
    background: linear-gradient(to bottom, var(--rpg), var(--rpg-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
  .nav { display: flex; gap: 4px; margin-left: auto; }
  .nav a {
    padding: 8px 12px;
    border-radius: 8px;
    color: var(--muted);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: color .15s;
  }
  .nav a:hover { color: #fff; background: rgba(255,255,255,.06); }
  .nav-item { position: relative; }
  .nav-item > a { display: inline-flex; align-items: center; gap: 5px; }
  .nav-item__caret { font-size: 9px; opacity: .7; transition: transform .15s; }
  .nav-item:hover .nav-item__caret { transform: rotate(180deg); }
  .dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 200px;
    padding: 6px;
    display: none;
    flex-direction: column;
    gap: 2px;
    background: #1b1b22;
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 12px;
    box-shadow: 0 18px 44px rgba(0,0,0,.55);
  }
  .dropdown::before {
    content: "";
    position: absolute;
    top: -10px;
    left: 0;
    right: 0;
    height: 10px;
  }
  .nav-item:hover .dropdown,
  .nav-item:focus-within .dropdown { display: flex; }
  .dropdown a {
    display: block;
    padding: 9px 12px;
    border-radius: 8px;
    color: var(--muted);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
  }
  .dropdown a:hover { color: #fff; background: rgba(255,255,255,.06); }

  /* ================= Tool hero ================= */
  .hero-tool { padding: 48px 40px 8px; }
  .hero-tool .kicker {
    margin: 0;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .24em;
    text-transform: uppercase;
    color: var(--cyan);
  }
  .hero-tool .title {
    margin: 8px 0 10px;
    font-family: "Bebas Neue", sans-serif;
    font-size: clamp(44px, 7vw, 88px);
    line-height: .9;
    letter-spacing: .02em;
  }
  .hero-tool .title .accent { color: var(--rpg); }
  .hero-tool .sub { margin: 0; max-width: 640px; color: var(--muted); font-size: 15px; line-height: 1.6; }

  /* ================= Layout ================= */
  .tool {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 20px;
    padding: 24px 40px 0;
    align-items: start;
  }
  @media (max-width: 900px) { .tool { grid-template-columns: 1fr; } }

  .panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 22px;
  }
  .panel h2 {
    margin: 0 0 16px;
    font-family: "Bebas Neue", sans-serif;
    font-size: 28px;
    letter-spacing: .03em;
    line-height: 1;
  }
  .panel--form { position: sticky; top: 84px; }
  @media (max-width: 900px) { .panel--form { position: static; } }

  .form-grid { display: grid; gap: 14px; }
  label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--dim);
  }
  .field { display: grid; gap: 6px; }
  input[type="text"], textarea {
    width: 100%;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 8px;
    background: rgba(0,0,0,.35);
    color: var(--text);
    font-family: inherit;
    font-size: 14px;
    padding: 11px 13px;
    outline: none;
    transition: border-color .15s;
    resize: vertical;
  }
  input[type="text"]:focus, textarea:focus { border-color: var(--rpg); }
  input::placeholder, textarea::placeholder { color: var(--dim); }

  .actions { display: flex; gap: 10px; flex-wrap: wrap; }
  .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 42px;
    padding: 0 18px;
    border: 0;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: transform .15s cubic-bezier(.2,0,0,1), background .15s, border-color .15s, color .15s;
  }
  .btn:active { transform: scale(.96); }
  .btn--accent {
    background: linear-gradient(120deg, var(--rpg), var(--rpg-2));
    color: #0b0b0e;
  }
  .btn--accent:hover { filter: brightness(1.08); }
  .btn--ghost {
    background: transparent;
    border: 1px solid rgba(255,255,255,.16);
    color: var(--text);
  }
  .btn--ghost:hover { border-color: var(--rpg); color: var(--rpg); }
  .btn--sm { height: 34px; font-size: 13px; padding: 0 14px; }

  .hint { margin-top: 14px; font-size: 12px; color: var(--dim); line-height: 1.5; }

  /* ================= Lore output ================= */
  .lore__world {
    margin: 0 0 14px;
    font-family: "Bebas Neue", sans-serif;
    font-size: 40px;
    letter-spacing: .02em;
    line-height: .95;
    background: linear-gradient(120deg, #fff, var(--rpg));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
  .lore__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
  @media (max-width: 600px) { .lore__grid { grid-template-columns: 1fr; } }
  .lore__block {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 14px;
    background: rgba(255,255,255,.02);
  }
  .lore__block--wide { grid-column: 1 / -1; }
  .lore__block h3 {
    margin: 0 0 8px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--rpg-2);
  }
  .lore__block p { margin: 0; font-size: 14px; line-height: 1.55; color: #d9d9df; }
  .lore__block ul { margin: 0; padding-left: 18px; font-size: 14px; line-height: 1.7; color: #d9d9df; }
  .lore__actions { margin-top: 16px; display: flex; gap: 10px; align-items: center; }
  .empty, .loading { color: var(--dim); font-size: 14px; padding: 8px 0; }

  /* ================= Wikipedia cards ================= */
  .wcard {
    display: flex;
    gap: 14px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(255,255,255,.02);
    text-decoration: none;
    color: inherit;
    margin-bottom: 10px;
    transition: border-color .15s, background .15s;
  }
  .wcard:hover { border-color: var(--cyan); background: rgba(34,211,238,.04); }
  .wcard img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 8px;
    flex: none;
    background: var(--panel);
  }
  .wcard__title { margin: 0 0 4px; font-weight: 700; font-size: 15px; }
  .wcard__extract {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: var(--muted);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  /* ================= Fast travel (GTA5) ================= */
  .sec { padding: 26px 0 8px; }
  .sec__head { padding: 0 40px; margin-bottom: 16px; }
  .sec__kicker {
    margin: 0;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .24em;
    text-transform: uppercase;
    color: var(--gta-2);
  }
  .sec__title {
    margin: 4px 0 0;
    font-family: "Bebas Neue", sans-serif;
    font-size: clamp(28px, 3.4vw, 44px);
    letter-spacing: .02em;
    line-height: 1;
  }
  .sec__title .accent { color: var(--gta); }
  .sec__head--tool .sec__kicker { color: var(--cyan); }
  .sec__head--tool .sec__title .accent { color: var(--rpg); }
  .fast-strip {
    margin: 0 40px 18px;
    padding: 18px 22px;
    border: 1px solid rgba(251,191,36,.25);
    border-radius: 12px;
    background: linear-gradient(120deg, rgba(251,191,36,.08), rgba(249,115,22,.04));
  }
  .fast-strip p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
  .fast-strip strong { color: var(--gta); }
  .ft-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 40px 16px; }
  .ft-chip {
    border: 1px solid rgba(251,191,36,.35);
    background: rgba(251,191,36,.06);
    color: var(--gta);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .03em;
    padding: 7px 14px;
    border-radius: 999px;
    cursor: pointer;
    transition: background .15s, color .15s;
  }
  .ft-chip:hover { background: var(--gta); color: #0b0b0e; }
  .row { position: relative; }
  .row__viewport { position: relative; }
  .row__track {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 4px 40px 18px;
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 44px), transparent);
    mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 44px), transparent);
  }
  .row__track::-webkit-scrollbar { display: none; }
  .row__arrow {
    position: absolute;
    top: 0;
    bottom: 18px;
    width: 46px;
    display: grid;
    place-items: center;
    border: 0;
    color: #fff;
    font-size: 34px;
    cursor: pointer;
    z-index: 6;
    opacity: 0;
    transition: opacity .2s ease;
  }
  .row__arrow--left  { left: 0; background: linear-gradient(to right, rgba(8,8,12,.92), transparent); }
  .row__arrow--right { right: 0; background: linear-gradient(to left, rgba(8,8,12,.92), transparent); }
  .row__viewport:hover .row__arrow { opacity: 1; }
  .loc-card {
    --i: 0;
    position: relative;
    flex: 0 0 clamp(240px, 26vw, 340px);
    width: clamp(240px, 26vw, 340px);
    scroll-snap-align: start;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: var(--surface);
    animation: rise .5s var(--ease-out-soft) both;
    animation-delay: calc(var(--i) * 40ms);
    transition: transform .18s ease-out, box-shadow .18s ease-out;
  }
  .loc-card:hover {
    transform: scale(1.04) translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,.6), 0 0 0 1px rgba(251,191,36,.35);
    z-index: 4;
  }
  .loc-card__media { aspect-ratio: 16 / 9; overflow: hidden; }
  .loc-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s var(--ease-out-soft); }
  .loc-card:hover .loc-card__media img { transform: scale(1.08); }
  .loc-card__overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 14px;
    background: linear-gradient(to top, rgba(0,0,0,.95), rgba(0,0,0,.5) 45%, transparent);
  }
  .loc-card__name { margin: 0; font-family: "Bebas Neue", sans-serif; font-size: 26px; letter-spacing: .04em; line-height: 1; }
  .loc-card__sub { margin: 4px 0 12px; font-size: 12px; color: rgba(255,255,255,.75); }
  .loc-card__join {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    height: 36px;
    padding: 0 16px;
    border-radius: 7px;
    background: var(--gta);
    color: #0b0b0e;
    font-weight: 800;
    font-size: 13px;
    text-decoration: none;
    transition: transform .15s, background .15s;
  }
  .loc-card__join:hover { background: #fcd34d; }
  .loc-card__join:active { transform: scale(.96); }
  .loc-flash { animation: flash 1.2s ease; }
  @keyframes flash {
    0%, 60% { box-shadow: 0 0 0 2px var(--gta), 0 12px 32px rgba(0,0,0,.6); }
    100% { box-shadow: 0 12px 32px rgba(0,0,0,.6); }
  }
  @keyframes rise {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  /* ================= Roleplay Movies ================= */
  .sec--movies .sec__kicker { color: var(--cyan); }
  .sec--movies .sec__title .accent { color: var(--rpg); }
  .movie-card {
    --i: 0;
    position: relative;
    flex: 0 0 clamp(170px, 16vw, 230px);
    width: clamp(170px, 16vw, 230px);
    scroll-snap-align: start;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: var(--surface);
    animation: rise .5s var(--ease-out-soft) both;
    animation-delay: calc(var(--i) * 40ms);
    transition: transform .18s ease-out, box-shadow .18s ease-out;
  }
  .movie-card:hover {
    transform: scale(1.04) translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,.6), 0 0 0 1px rgba(192,132,252,.4);
    z-index: 4;
  }
  .movie-card__media { aspect-ratio: 2 / 3; overflow: hidden; }
  .movie-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s var(--ease-out-soft); }
  .movie-card:hover .movie-card__media img { transform: scale(1.08); }
  .movie-card__overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 14px;
    background: linear-gradient(to top, rgba(0,0,0,.95), rgba(0,0,0,.5) 45%, transparent);
  }
  .movie-card__tag {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 8px;
    border-radius: 6px;
    background: rgba(8,8,12,.72);
    border: 1px solid var(--line);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--rpg-2);
  }
  .movie-card__name { margin: 0; font-family: "Bebas Neue", sans-serif; font-size: 22px; letter-spacing: .04em; line-height: 1; }
  .movie-card__sub { margin: 4px 0 12px; font-size: 12px; color: rgba(255,255,255,.75); }
  .movie-card__watch {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    height: 36px;
    padding: 0 16px;
    border-radius: 7px;
    background: linear-gradient(120deg, var(--rpg), var(--rpg-2));
    color: #0b0b0e;
    font-weight: 800;
    font-size: 13px;
    text-decoration: none;
    transition: transform .15s, filter .15s;
  }
  .movie-card__watch:hover { filter: brightness(1.08); }
  .movie-card__watch:active { transform: scale(.96); }

  /* ================= Roleplay studio refinement ================= */
  .hero-tool {
    min-height: 230px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding-top: 88px;
    padding-bottom: 28px;
  }
  .hero-tool .title { max-width: 820px; margin-bottom: 14px; }
  .hero-tool .sub { max-width: 760px; font-size: 16px; }

  .fast {
    margin: 0 40px 26px;
    padding: 22px 0 8px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }
  .fast .sec__head,
  .fast .ft-chips,
  .fast .row__track { padding-left: 0; padding-right: 0; }
  .fast-strip { margin-left: 0; margin-right: 0; border-radius: 4px; }
  .ft-chip { border-radius: 4px; }
  .ft-chip.is-selected {
    color: #08080c;
    background: var(--gta);
    border-color: var(--gta);
  }
  .fast__status {
    min-height: 20px;
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 12px;
  }
  .fast__status strong { color: var(--gta); }
  .loc-card,
  .movie-card { border-radius: 4px; }
  .loc-card { cursor: pointer; }
  .loc-card.is-selected { box-shadow: 0 0 0 2px var(--gta); }

  .story-studio { padding: 36px 40px 22px; }
  .studio-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 18px;
  }
  .studio-head__copy { max-width: 680px; }
  .studio-head__copy p:last-child { margin: 10px 0 0; color: var(--muted); line-height: 1.55; }
  .studio-head__meta {
    color: var(--dim);
    font-size: 12px;
    letter-spacing: .06em;
    text-transform: uppercase;
  }
  .studio-shell {
    display: grid;
    grid-template-columns: minmax(340px, .8fr) minmax(0, 1.35fr);
    min-height: 620px;
    border: 1px solid var(--line);
    background: #0c0c12;
  }
  .scene-builder {
    padding: 24px;
    border-right: 1px solid var(--line);
    background: #111119;
  }
  .builder-progress {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
  }
  .builder-progress span { font-size: 12px; font-weight: 700; }
  .builder-progress output { color: var(--rpg-2); font-size: 12px; font-weight: 800; }
  .builder-progress__track {
    grid-column: 1 / -1;
    height: 3px;
    overflow: hidden;
    background: rgba(255,255,255,.08);
  }
  .builder-progress__bar {
    display: block;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--rpg), var(--rpg-2));
    transition: width .24s ease;
  }
  .builder-step { padding: 0 0 22px; }
  .builder-step + .builder-step { padding-top: 22px; border-top: 1px solid var(--line); }
  .builder-step__label {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin: 0 0 12px;
    color: var(--text);
    font-size: 13px;
    font-weight: 800;
  }
  .builder-step__label span {
    color: var(--rpg-2);
    font-size: 10px;
    letter-spacing: .14em;
    text-transform: uppercase;
  }
  .choice-grid { display: flex; flex-wrap: wrap; gap: 7px; }
  .choice {
    min-height: 34px;
    padding: 7px 11px;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 4px;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
  }
  .choice:hover { color: #fff; border-color: rgba(255,255,255,.38); }
  .choice.is-selected {
    color: #0b0b0e;
    border-color: var(--rpg-2);
    background: var(--rpg-2);
  }
  .prompt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-bottom: 14px; }
  .prompt-card {
    min-height: 62px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: rgba(255,255,255,.025);
    color: var(--muted);
    text-align: left;
    font: inherit;
    font-size: 11px;
    line-height: 1.35;
    cursor: pointer;
  }
  .prompt-card:hover { color: #fff; border-color: var(--rpg); background: rgba(192,132,252,.07); }
  .scene-builder input[type="text"],
  .scene-builder textarea { border-radius: 4px; }
  .field + .field { margin-top: 11px; }
  .builder-actions { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 16px; }
  .builder-actions .btn { border-radius: 4px; justify-content: center; }
  .builder-actions__minor { display: flex; gap: 8px; margin-top: 8px; }
  .builder-actions__minor .btn { flex: 1; border-radius: 4px; justify-content: center; }
  .studio-results { min-width: 0; display: flex; flex-direction: column; }
  .result-tabs {
    display: flex;
    align-items: center;
    gap: 4px;
    min-height: 58px;
    padding: 0 20px;
    border-bottom: 1px solid var(--line);
  }
  .result-tab {
    height: 36px;
    padding: 0 14px;
    border: 0;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: var(--dim);
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
  }
  .result-tab.is-active { color: #fff; border-color: var(--rpg-2); }
  .result-tabs__status { margin-left: auto; color: var(--dim); font-size: 11px; }
  .result-pane { padding: 24px; }
  .result-pane[hidden] { display: none; }
  .result-empty {
    min-height: 500px;
    display: grid;
    place-content: center;
    max-width: 480px;
    margin: auto;
    text-align: center;
  }
  .result-empty__eyebrow {
    margin: 0 0 10px;
    color: var(--rpg-2);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .16em;
    text-transform: uppercase;
  }
  .result-empty h3 { margin: 0; font-size: 25px; }
  .result-empty p:last-child { margin: 10px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
  .lore__block { border-radius: 4px; }
  .lore__actions { flex-wrap: wrap; }
  .lore__actions .btn { border-radius: 4px; }
  .saved-scenarios { margin: 18px 0 0; }
  .saved-scenarios__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
  .saved-scenarios__head h3 { margin: 0; font-size: 13px; }
  .saved-scenarios__list { display: flex; gap: 8px; overflow-x: auto; padding: 10px 0 2px; }
  .saved-scenario {
    flex: 0 0 190px;
    padding: 11px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: rgba(255,255,255,.02);
    color: var(--muted);
    text-align: left;
    cursor: pointer;
  }
  .saved-scenario strong { display: block; margin-bottom: 4px; color: #fff; }
  .saved-scenario span { font-size: 11px; }
  .wcard { border-radius: 4px; }
  .wcard img { border-radius: 2px; }

  .movie-card__media { aspect-ratio: 16 / 10; }
  .movie-card {
    flex-basis: clamp(260px, 28vw, 390px);
    width: clamp(260px, 28vw, 390px);
  }
  .movie-card__name { font-size: 25px; }
  .movie-card__watch { border-radius: 4px; }

  .rp-preview[hidden] { display: none; }
  .rp-preview {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: grid;
    place-items: center;
    padding: 22px;
    background: rgba(0,0,0,.8);
    backdrop-filter: blur(12px);
  }
  .rp-preview__dialog {
    position: relative;
    display: grid;
    grid-template-columns: minmax(260px, .85fr) 1fr;
    width: min(920px, 100%);
    max-height: min(720px, 92vh);
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.16);
    background: #101016;
    box-shadow: 0 34px 100px rgba(0,0,0,.8);
  }
  .rp-preview__image { min-height: 460px; background: #08080c; }
  .rp-preview__image img { width: 100%; height: 100%; display: block; object-fit: cover; }
  .rp-preview__body { padding: 34px; align-self: end; }
  .rp-preview__tag { color: var(--rpg-2); font-size: 11px; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
  .rp-preview__body h2 { margin: 10px 0 8px; font-family: "Bebas Neue", sans-serif; font-size: clamp(42px, 7vw, 72px); line-height: .9; }
  .rp-preview__meta { color: var(--muted); font-size: 13px; }
  .rp-preview__synopsis { margin: 20px 0; color: #d9d9df; line-height: 1.65; }
  .rp-preview__actions { display: flex; gap: 8px; flex-wrap: wrap; }
  .rp-preview__actions .btn { border-radius: 4px; }
  .rp-preview__close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 50%;
    background: rgba(0,0,0,.7);
    color: #fff;
    font-size: 20px;
    cursor: pointer;
  }

  @media (max-width: 900px) {
    .hero-tool { min-height: 190px; padding: 72px 18px 24px; }
    .hero-tool .title { font-size: 54px; }
    .fast { margin: 0 18px 20px; }
    .story-studio { padding: 28px 18px 16px; }
    .studio-head { align-items: start; flex-direction: column; gap: 8px; }
    .studio-shell { grid-template-columns: 1fr; }
    .scene-builder { border-right: 0; border-bottom: 1px solid var(--line); }
    .result-empty { min-height: 300px; }
    .sec__head { padding-left: 18px; padding-right: 18px; }
    .row__track { padding-left: 18px; padding-right: 18px; }
  }
  @media (max-width: 620px) {
    .topbar { height: 62px; padding: 0 16px; }
    .brand { font-size: 23px; }
    .fast .row__track { padding-right: 0; }
    .fast-strip { padding: 14px; }
    .prompt-grid { grid-template-columns: 1fr; }
    .builder-actions { grid-template-columns: 1fr; }
    .builder-actions__minor { flex-direction: column; }
    .scene-builder, .result-pane { padding: 18px; }
    .result-tabs { padding: 0 10px; }
    .result-tabs__status { display: none; }
    .movie-card { flex-basis: min(82vw, 330px); width: min(82vw, 330px); }
    .rp-preview__dialog { display: block; overflow-y: auto; }
    .rp-preview__image { min-height: 270px; max-height: 38vh; }
    .rp-preview__body { padding: 24px; }
  }