.app-choice-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.app-choice-plot { background: linear-gradient(145deg, rgba(109,91,208,.12), rgba(79,154,135,.08)); border-color: rgba(109,91,208,.35); }

body.plot-mode { overflow: hidden; background: #f2f0eb; }
body.plot-mode .topbar, body.plot-mode .footer { display: none; }
body.plot-mode .app-main { width: 100%; max-width: none; margin: 0; padding: 0; }
.plot-studio { height: 100vh; display: flex; flex-direction: column; color: #22252b; background: #f1efe9; }
.plot-topbar { min-height: 66px; display: flex; align-items: center; gap: 1rem; padding: .65rem 1.1rem; border-bottom: 1px solid #d8d5cd; background: rgba(250,249,245,.94); backdrop-filter: blur(12px); }
.plot-title-group { min-width: 220px; flex: 1; display: flex; flex-direction: column; }
.plot-kicker { font: 600 .58rem/1.2 monospace; letter-spacing: .13em; color: #77746d; }
.plot-title { border: 0; background: transparent; color: inherit; font: 600 1.1rem/1.4 Georgia, serif; padding: .1rem 0; }
.plot-title:focus { outline: 0; }
.plot-top-actions { display: flex; align-items: center; gap: .45rem; }
.plot-save-state { color: #77746d; font-size: .72rem; margin-right: .35rem; }
.plot-commandbar { min-height: 54px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .6rem 1rem; padding: .55rem 1.1rem; background: #fff; border-bottom: 1px solid #dedbd4; }
.plot-add-group, .plot-view-tools { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem; }
.plot-add-group { flex: 1 1 auto; min-width: 0; }
.plot-view-tools { margin-left: auto; }
.plot-add-group button { border: 1px solid #dcd9d1; background: #f8f7f3; border-radius: 999px; padding: .36rem .62rem; font: 600 .72rem inherit; color: #34363b; cursor: pointer; white-space: nowrap; }
.plot-add-group button:hover { border-color: #7657d6; transform: translateY(-1px); }
.plot-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; margin-right: .35rem; background: var(--type, #8490a0); }
.plot-view-tools label { display: flex; align-items: center; gap: .4rem; color: #77746d; font-size: .7rem; }.plot-view-tools input { width: 80px; }
.plot-layout { flex: 1; min-height: 0; display: grid; grid-template-columns: 220px minmax(0, 1fr) 290px; }
.plot-sidebar, .plot-inspector { min-height: 0; overflow-y: auto; background: #f9f8f4; padding: 1rem; }
.plot-sidebar { border-right: 1px solid #d8d5cd; }.plot-inspector { border-left: 1px solid #d8d5cd; }
.plot-side-head { display: flex; justify-content: space-between; align-items: center; font: 700 .62rem/1 monospace; letter-spacing: .12em; color: #77746d; margin-bottom: .7rem; }.plot-side-head-spaced { margin-top: 1.6rem; }
.plot-character-list { display: flex; flex-direction: column; gap: .35rem; }
.plot-character { width: 100%; border: 1px solid transparent; background: transparent; display: flex; align-items: center; gap: .55rem; padding: .45rem; border-radius: 10px; text-align: left; cursor: pointer; color: inherit; }
.plot-character:hover, .plot-character.selected { background: #fff; border-color: #ddd9d0; }.plot-character.filtered { box-shadow: inset 3px 0 #7657d6; }
.plot-character > i { width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--character); color: white; font: 700 .72rem inherit; font-style: normal; }
.plot-character span { min-width: 0; flex: 1; }.plot-character strong, .plot-character small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.plot-character strong { font-size: .78rem; }.plot-character small { color: #85817a; font-size: .63rem; margin-top: .1rem; }.plot-character b { color: #aaa69e; }
.plot-side-empty { color: #8c8880; font-size: .75rem; line-height: 1.5; }
.plot-filter { width: 100%; text-align: left; border: 0; background: transparent; color: #66635d; padding: .43rem .5rem; border-radius: 7px; font: .76rem inherit; cursor: pointer; }.plot-filter.active { color: #7657d6; background: rgba(118,87,214,.09); font-weight: 700; }
.plot-board-wrap { position: relative; min-width: 0; min-height: 0; display: flex; flex-direction: column; overflow: hidden; background-color: #eeece6; background-image: radial-gradient(#cfcbc2 1px, transparent 1px); background-size: 24px 24px; }
.plot-board-head { height: 58px; flex: none; padding: .8rem 1.3rem; display: flex; align-items: center; justify-content: space-between; background: rgba(244,242,237,.92); border-bottom: 1px solid #d8d5cd; }.plot-board-head div { display: flex; align-items: baseline; gap: .7rem; }.plot-board-head span { font: 700 .62rem monospace; letter-spacing: .12em; color: #5e5a54; }.plot-board-head strong { font-size: .72rem; color: #918d85; }.plot-board-head p { color: #85817a; font-size: .67rem; }
.plot-board-scroll { flex: 1; overflow: auto; padding: 1.6rem; }
.plot-board { --plot-scale: 1; min-width: max-content; transform-origin: top left; }
.plot-beats { display: flex; align-items: stretch; gap: 1rem; min-height: 245px; position: relative; padding-bottom: 1.5rem; }
.plot-beats::after { content: ""; position: absolute; left: 0; right: 0; bottom: 4px; height: 1px; background: #bcb7ae; }
.plot-card { width: calc(190px * var(--plot-scale)); min-height: calc(205px * var(--plot-scale)); position: relative; background: #fffdf8; border: 1px solid #d9d4ca; border-top: 4px solid var(--type, #8490a0); border-radius: 4px 4px 12px 12px; padding: .85rem; box-shadow: 0 8px 22px rgba(39,36,29,.08); cursor: grab; transition: transform .16s, box-shadow .16s, opacity .16s; }
.plot-card:hover { transform: translateY(-3px); box-shadow: 0 13px 28px rgba(39,36,29,.13); }.plot-card.selected { outline: 2px solid #7657d6; outline-offset: 3px; }.plot-card.dragging { opacity: .35; }.plot-card.drag-over { transform: translateX(8px); }.plot-card.resolved { opacity: .62; }
.plot-card-top { display: grid; grid-template-columns: 1fr auto auto; gap: .4rem; align-items: center; color: #88837b; }.plot-card-top span { font: .62rem monospace; }.plot-card-top i { color: var(--type, #7657d6); font-style: normal; }.plot-card-top small { font: 700 .57rem monospace; letter-spacing: .08em; }
.plot-card h3 { margin: .8rem 0 .45rem; font: 600 1rem/1.2 Georgia, serif; color: #292a2e; }.plot-card p { margin: 0; color: #6f6c66; font-size: .7rem; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.plot-card-people { min-height: 24px; display: flex; margin-top: .75rem; }.plot-card-people span { width: 22px; height: 22px; margin-right: -5px; display: grid; place-items: center; border: 2px solid #fffdf8; border-radius: 50%; background: var(--character); color: white; font: 700 .54rem inherit; }
.plot-card-foot { position: absolute; left: .85rem; right: .85rem; bottom: .7rem; display: flex; align-items: center; gap: .4rem; color: #918d85; font-size: .57rem; }.plot-card-foot b { display: grid; place-items: center; width: 20px; height: 20px; background: color-mix(in srgb, #7657d6 calc(var(--level) * 8%), #eee); border-radius: 50%; color: #fff; }.plot-card-foot em { margin-left: auto; color: #7657d6; font-style: normal; }
.plot-lanes { min-width: 100%; }.plot-lane { height: 34px; display: grid; grid-template-columns: 130px auto; align-items: center; border-bottom: 1px solid rgba(100,95,86,.12); }.plot-lane-name { display: flex; align-items: center; gap: .45rem; color: #5f5c56; font-size: .67rem; }.plot-lane-name i { width: 7px; height: 7px; border-radius: 50%; background: var(--character); }.plot-lane-track { display: flex; gap: 1rem; position: relative; }.plot-lane-track::before { content: ""; position: absolute; top: 50%; left: 0; right: 0; border-top: 1px solid #cbc6bd; }.plot-lane-track button { z-index: 1; width: calc(190px * var(--plot-scale)); height: 9px; border: 0; background: transparent; cursor: pointer; position: relative; }.plot-lane-track button.present::after { content: ""; position: absolute; left: 50%; top: 0; width: 9px; height: 9px; border-radius: 50%; background: var(--character); box-shadow: 0 0 0 3px #eeece6; }
.plot-empty { position: absolute; inset: 58px 0 0; display: grid; place-content: center; justify-items: center; text-align: center; }.plot-empty[hidden] { display: none; }.plot-empty > span { font-size: 2rem; color: #7657d6; }.plot-empty h3 { font: 500 1.55rem Georgia, serif; margin: .5rem 0; }.plot-empty p { max-width: 420px; color: #77736c; font-size: .82rem; line-height: 1.5; }
.plot-inspector-empty > span, .plot-inspector-heading span { font: 700 .62rem monospace; letter-spacing: .12em; color: #7657d6; }.plot-inspector-empty p { color: #77736c; font-size: .8rem; line-height: 1.55; }
.plot-inspector form { display: flex; flex-direction: column; gap: .9rem; }.plot-inspector-heading { display: flex; justify-content: space-between; align-items: center; }.plot-inspector-heading button { border: 0; background: transparent; color: #a14f62; font-size: 1.3rem; cursor: pointer; }
.plot-inspector label { display: flex; flex-direction: column; gap: .32rem; color: #68645e; font-size: .68rem; font-weight: 600; }.plot-inspector input:not([type="checkbox"]), .plot-inspector textarea, .plot-inspector select { width: 100%; border: 1px solid #d8d4cb; background: #fff; border-radius: 8px; padding: .55rem .6rem; color: #292a2e; font: .78rem/1.45 inherit; resize: vertical; }.plot-inspector input:focus, .plot-inspector textarea:focus, .plot-inspector select:focus { outline: 2px solid rgba(118,87,214,.25); border-color: #7657d6; }
.plot-form-grid { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: .5rem; }.plot-form-grid output { font: 700 .7rem monospace; color: #7657d6; padding-bottom: .3rem; }
.plot-check-list { display: flex; flex-wrap: wrap; gap: .35rem; }.plot-check-list label { display: inline-flex; flex-direction: row; align-items: center; gap: .25rem; border: 1px solid #ddd9d0; background: #fff; border-radius: 999px; padding: .3rem .48rem; font-size: .64rem; cursor: pointer; }.plot-check-list i { width: 6px; height: 6px; border-radius: 50%; background: var(--character); }.plot-resolved { flex-direction: row !important; align-items: center; }.plot-duplicate { width: 100%; }
.plot-statusbar { min-height: 30px; display: flex; justify-content: space-between; align-items: center; padding: 0 1rem; border-top: 1px solid #d5d1c8; background: #faf9f5; color: #7d7971; font-size: .63rem; }

[data-theme="dark"] .plot-studio { background: #181a1f; color: #ececf0; }[data-theme="dark"] .plot-topbar,[data-theme="dark"] .plot-commandbar,[data-theme="dark"] .plot-sidebar,[data-theme="dark"] .plot-inspector,[data-theme="dark"] .plot-statusbar { background: #1f2229; border-color: #363a43; }[data-theme="dark"] .plot-board-wrap { background-color: #191c22; background-image: radial-gradient(#343944 1px, transparent 1px); }[data-theme="dark"] .plot-board-head { background: rgba(31,34,41,.92); border-color: #363a43; }[data-theme="dark"] .plot-card { background: #272b34; border-color: #404550; }[data-theme="dark"] .plot-card h3 { color: #f0f0f3; }[data-theme="dark"] .plot-card p { color: #b0b4bd; }[data-theme="dark"] .plot-inspector input:not([type="checkbox"]),[data-theme="dark"] .plot-inspector textarea,[data-theme="dark"] .plot-inspector select,[data-theme="dark"] .plot-add-group button { background: #292d35; border-color: #414650; color: #ececf0; }

@media (max-width: 1000px) { .plot-layout { grid-template-columns: 180px minmax(0,1fr); }.plot-inspector { position: absolute; right: 0; top: 120px; bottom: 30px; width: 280px; z-index: 8; box-shadow: -10px 0 30px rgba(0,0,0,.12); }.plot-board-wrap { grid-column: 2; }.plot-top-actions .plot-save-state { display: none; } }
@media (max-width: 720px) { body.plot-mode { overflow: auto; }.plot-studio { height: auto; min-height: 100vh; }.plot-topbar, .plot-commandbar { align-items: flex-start; flex-wrap: wrap; }.plot-title-group { order: 3; width: 100%; }.plot-layout { display: block; }.plot-sidebar { border: 0; border-bottom: 1px solid #d8d5cd; }.plot-inspector { position: static; width: auto; box-shadow: none; border-top: 1px solid #d8d5cd; }.plot-board-wrap { min-height: 520px; }.plot-statusbar { flex-wrap: wrap; padding: .45rem 1rem; }.app-choice-grid { grid-template-columns: 1fr; } }
