/* Sakura Duel Forge — one light editor theme. No dark/three-column fallback. */
:root {
  color-scheme: light;
  --bg: #f1ede7; --panel: #fbf9f5; --field: #fffdfa; --muted-bg: #f4eee8;
  --ink: #342b36; --ink-soft: #4e404c; --ink-muted: #70636e;
  --panel-border: #d8cec6; --panel-border-strong: #c7b7ad;
  --accent: #a65f53; --accent-soft: #f2dfd9; --success: #56754f;
  --sans: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  --mono: Consolas, monospace;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--bg); color: var(--ink); font: 13px/1.5 var(--sans); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; color: var(--ink-soft); background: var(--field); border: 1px solid var(--panel-border); border-radius: 5px; padding: 7px 10px; }
button:hover { background: var(--muted-bg); border-color: var(--panel-border-strong); }
button:disabled { cursor: not-allowed; opacity: .6; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input, select, textarea { min-width: 0; color: var(--ink); background: var(--field); border: 1px solid var(--panel-border-strong); border-radius: 5px; padding: 8px 10px; }
input::placeholder, textarea::placeholder { color: var(--ink-muted); }
input:disabled, select:disabled { background: #eae5df; color: #766b73; }
input[type=checkbox] { width: 18px; height: 18px; padding: 0; accent-color: var(--accent); flex-shrink: 0; }
input[type=range] { width: 100%; height: 6px; padding: 0; accent-color: var(--accent); cursor: pointer; }
select option { color: var(--ink); background: var(--field); }
textarea { resize: vertical; line-height: 1.8; }
h1, h2, h3, p { margin: 0; }
small { color: var(--ink-muted); }
summary { cursor: pointer; font-weight: 600; }
.icon, .search-icon, .select-chevron { width: 16px; height: 16px; fill: none; flex-shrink: 0; }
.icon path, .icon circle, .search-icon path, .search-icon circle, .select-chevron path { stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.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; }

/* Shell and preview. The card itself is rendered only by Canvas. */
.app-shell { max-width: 1460px; margin: auto; padding: 0 24px 18px; }
.topbar { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-bottom: 1px solid var(--panel-border); }
.brand-lockup { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: transparent; }
.brand-mark img { display: block; width: 42px; height: 42px; }
.brand-title { font: 700 20px/1.2 "SimSun", "Songti SC", serif; letter-spacing: .12em; }
.top-actions, .canvas-actions, .footer-meta { display: flex; align-items: center; gap: 8px; }
.top-actions { flex-wrap: wrap; justify-content: flex-end; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 38px; padding: 7px 12px; font-weight: 600; white-space: nowrap; }
.button-quiet { background: transparent; }
.button-primary, #insertMoveButton { background: var(--accent); border-color: var(--accent); color: #fffaf6; }
.button-primary:hover, #insertMoveButton:hover { background: #934d43; border-color: #934d43; }
#exportScaleSelect { height: 38px; padding: 6px 8px; font-size: 12px; }
.shortcut { display: none; }
.workspace { display: grid; grid-template-columns: minmax(0,1.15fr) minmax(400px,.85fr); gap: 18px; height: calc(100dvh - 94px); min-height: 570px; padding-top: 12px; }
.panel { min-width: 0; min-height: 0; background: var(--panel); border: 1px solid var(--panel-border); border-radius: 8px; box-shadow: 0 3px 10px #31242a0f; }
.canvas-panel, .inspector-panel { display: flex; flex-direction: column; overflow: hidden; }
.canvas-heading { height: 58px; padding: 0 20px; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-shrink: 0; border-bottom: 1px solid var(--panel-border); }
.canvas-heading h2, .inspector-heading h2 { font-size: 16px; font-weight: 700; }
.icon-button { width: 30px; height: 30px; display: grid; place-items: center; padding: 0; background: transparent; border-color: transparent; }
.zoom-label { color: var(--ink-muted); font: 11px var(--mono); }
.action-divider { height: 18px; border-left: 1px solid var(--panel-border); }
#easyArtShortcut { font-size: 12px; }
.canvas-stage { flex: 1; min-height: 240px; position: relative; display: grid; place-items: center; overflow: hidden; background: #ebe6df; padding: 12px; }
.card-preview-wrap { width: 320px; max-width: 100%; flex-shrink: 0; transform-origin: center; filter: drop-shadow(0 8px 14px #37283122); }
.card-preview { margin: 0; width: 100%; aspect-ratio: 733 / 1024; border-radius: 12px; overflow: hidden; }
.card-canvas { display: block; width: 100%; height: 100%; cursor: pointer; }
.card-canvas.drag-art-enabled { cursor: grab; touch-action: none; }
.card-canvas.drag-art-enabled:active { cursor: grabbing; }
.easy-preview-hint { padding: 8px 14px; font-size: 11px; color: var(--ink-muted); text-align: center; flex-shrink: 0; }
.render-feedback, .easy-font-notice { flex-shrink: 0; padding: 9px 16px; font-size: 11px; line-height: 1.6; border-top: 1px solid var(--panel-border); color: var(--success); }
.render-feedback.has-warning, .easy-font-notice { color: #715433; background: #fcf3e4; }
.canvas-footer { display: flex; flex-shrink: 0; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; border-top: 1px solid var(--panel-border); color: var(--ink-muted); font-size: 11px; }
.meta-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--success); }
.footer-meta strong { font-family: var(--mono); font-size: 11px; font-weight: 400; }

/* Inspector and shared form controls. */
.inspector-heading { flex-shrink: 0; padding: 16px 22px 12px; }
.inspector-heading p { color: var(--ink-muted); font-size: 11px; margin-top: 4px; }
.easy-tabs { display: flex; flex-shrink: 0; padding: 0 16px; background: var(--muted-bg); border-bottom: 1px solid var(--panel-border); }
.easy-tabs button { flex: 1; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: transparent; height: 42px; padding: 0 6px; font-size: 12px; color: var(--ink-muted); }
.easy-tabs button.is-active { border-bottom-color: var(--accent); color: var(--accent); font-weight: 700; }
.inspector-scroll { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 16px 22px; scrollbar-width: thin; scrollbar-color: #c9b9af transparent; }
.easy-pane { display: flex; flex-direction: column; gap: 14px; }
#easy-content { gap: 10px; }
#easy-content .easy-field small { display: none; }
.easy-section-heading p, .editor-help { color: var(--ink-muted); font-size: 12px; line-height: 1.7; }
.easy-section-heading h3 { font-size: 14px; margin-bottom: 5px; }
.easy-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; color: var(--ink-soft); font-size: 12px; }
.easy-field-name { font-weight: 600; }
.easy-field small { font-size: 11px; }
.easy-input, .text-input { width: 100%; height: 38px; }
textarea.easy-input { height: 145px; min-height: 100px; }
#titleInput { height: 42px; font-size: 18px; }
.easy-grid-2, .easy-stats { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.easy-grid-2:has(.only-special:not([hidden])) { grid-template-columns: 1fr 1fr 72px; }
.easy-stats { grid-template-columns: repeat(3,minmax(0,1fr)); }
.easy-type-buttons { display: flex; gap: 8px; }
.easy-type-buttons button { flex: 1; min-height: 38px; }
.easy-type-buttons button.is-active { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.easy-template-summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 10px; border: 1px solid var(--panel-border); border-radius: 5px; background: var(--muted-bg); font-size: 11px; }
.easy-template-summary button { border: 0; background: transparent; color: var(--accent); padding: 2px; white-space: nowrap; }
.rule-tools, .effect-editor-actions, .easy-art-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.rule-tools button, .effect-editor-actions button { font-size: 12px; color: var(--accent); }
.easy-counter { font-size: 11px; color: var(--ink-muted); text-align: right; }
.easy-step-footer { flex-shrink: 0; border-top: 1px solid var(--panel-border); padding: 12px 22px; }
.easy-step-footer button { width: 100%; min-height: 42px; }
.easy-details { border-top: 1px solid var(--panel-border); padding-top: 12px; color: var(--ink-soft); font-size: 12px; }
.easy-details summary { margin-bottom: 10px; }
.easy-details .easy-field, .easy-details .range-row { margin: 12px 0; }
.range-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 9px; color: var(--ink-soft); font-size: 12px; }
.range-row input { grid-column: 1 / -1; }
.range-row output { color: var(--ink-muted); font-family: var(--mono); font-size: 11px; }
.simple-check, .toggle-row { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 12px; }
.toggle-row input { order: -1; }
.toggle-row small { display: block; }
.toggle-track { display: none; }
.upload-button { font-size: 12px; }
#duplicateButton { align-self: flex-start; }

/* Artwork tools, including the artwork-only feather mask. */
.easy-dropzone { border: 1px dashed #c4a79a; border-radius: 6px; padding: 22px 12px; display: flex; flex-direction: column; align-items: center; gap: 8px; background: #f8f3ed; font-size: 12px; }
.easy-dropzone .drop-plus { font-size: 26px; color: #a07a6c; }
.easy-dropzone strong { font-size: 14px; }
.easy-dropzone > span:not(.drop-plus), .easy-art-status { color: var(--ink-muted); font-size: 11px; }
.easy-art-status { text-align: center; }
.easy-art-zoom { display: flex; justify-content: center; align-items: center; gap: 24px; }
.easy-art-zoom button { width: 36px; height: 36px; padding: 0; font-size: 20px; }
.easy-art-zoom span { min-width: 60px; text-align: center; font-size: 18px; }
.easy-art-actions { justify-content: center; }
.is-drag-over { outline: 2px solid var(--accent); outline-offset: -2px; }
.art-blend-panel { border-top: 1px solid var(--panel-border); padding-top: 14px; }
.art-blend-panel h3 { font-size: 14px; }
.art-blend-panel p { color: var(--ink-muted); font-size: 12px; line-height: 1.7; margin: 8px 0 12px; }
.art-blend-panel .easy-field { margin: 10px 0; }

/* Whole-card suites and typography. */
.suite-builtins, .font-scheme-list, .suite-control-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.suite-builtins button, .font-scheme { display: flex; flex-direction: column; gap: 7px; padding: 11px; text-align: left; min-width: 0; }
.suite-builtins button[aria-pressed=true], .font-scheme[aria-pressed=true] { background: var(--accent-soft); border-color: var(--accent); box-shadow: inset 3px 0 var(--accent); }
.suite-builtins strong { font-size: 13px; }
.suite-builtins span, .font-scheme small { font-size: 11px; line-height: 1.7; color: var(--ink-muted); }
.suite-current { padding: 8px 10px; border-left: 3px solid var(--accent); background: var(--muted-bg); color: #714c4e; font-size: 12px; }
.suite-font-warning { padding: 8px 10px; color: #654a35; background: #fcf3e4; border: 1px solid #e1c5a7; border-radius: 5px; font-size: 11px; line-height: 1.7; }
.suite-region-row { display: flex; align-items: center; gap: 8px; position: sticky; top: -16px; z-index: 2; padding: 8px 0; background: var(--panel); border-bottom: 1px solid var(--panel-border); font-size: 12px; }
.suite-region-row select { flex: 1; width: 0; }
.suite-region-row button { color: var(--accent); white-space: nowrap; }
.suite-control-grid .easy-input { height: 36px; }
#suiteRegionHint { margin: 0; font-size: 11px; }
#suiteReferenceCode { align-self: flex-start; color: var(--accent); }
.suite-saved-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.suite-compat > :not(summary) { margin-top: 14px; }
.font-scheme[data-font-preset=auto] { grid-column: 1 / -1; }
.font-scheme[data-font-preset=auto] .font-scheme-sample { display: none; }
.font-scheme strong { font-size: 12px; }
.font-scheme-sample { font-size: 20px; line-height: 1.35; }

/* Crystal movement editor. */
.move-target-row { display: flex; align-items: center; gap: 10px; font-size: 12px; }
#moveTargetSelect { flex: 1; width: 0; font-size: 12px; }
.move-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.move-size-editor { display: flex; flex-direction: column; gap: 10px; }
.move-size-label { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.move-size-label small { display: block; font-size: 11px; }
#moveHeightInput, #moveGapNumber { width: 80px; }
.move-size-presets { display: flex; gap: 6px; }
.move-size-presets button { flex: 1; font-size: 12px; }
.move-live-preview { border: 1px solid var(--panel-border-strong); border-radius: 5px; background: #ebe5de; padding: 10px; overflow: auto; }
#moveVisualPreview { display: flex; align-items: center; justify-content: center; min-height: 52px; width: max-content; min-width: 100%; }
#moveVisualPreview img { width: auto; max-width: none; flex-shrink: 0; }
#moveVisualCaption { text-align: center; margin-top: 8px; font-size: 11px; }
.move-edit-actions { display: flex; gap: 8px; flex-wrap: wrap; }
#insertMoveButton { display: none; }
.existing-moves h3 { font-size: 14px; margin: 8px 0; }
#moveExistingList { display: grid; gap: 8px; }
.move-entry { display: flex; align-items: stretch; gap: 8px; }
.move-entry-select { display: flex; flex: 1; min-width: 0; align-items: center; gap: 10px; padding: 8px; text-align: left; font-size: 11px; }
.move-entry-select[aria-pressed=true] { background: var(--accent-soft); border-color: var(--accent); }
.move-entry-images { display: flex; align-items: center; flex-shrink: 0; padding: 4px; background: #ebe5de; border-radius: 4px; }
.move-entry-images img { width: auto; }
.move-delete { min-width: 44px; color: var(--accent); font-size: 12px; }

/* Pickers: the library is a dialog, not a third workspace column. */
.easy-dialog { width: min(740px,calc(100vw - 32px)); max-height: calc(100dvh - 40px); overflow-y: auto; padding: 24px; border: 1px solid var(--panel-border-strong); border-radius: 8px; color: var(--ink); background: var(--panel); box-shadow: 0 20px 70px #30232d44; }
.easy-dialog::backdrop { background: #21182088; }
.dialog-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 20px; }
.dialog-header h2 { font-size: 20px; margin-bottom: 6px; }
.dialog-header p { color: var(--ink-muted); font-size: 12px; line-height: 1.7; }
.dialog-close { border: 0; background: transparent; font-size: 24px; padding: 0 6px; }
.template-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.template-choice { display: flex; flex-direction: column; align-items: flex-start; gap: 9px; text-align: left; padding: 15px; }
.template-choice small { font-size: 11px; }
.template-symbol { width: 34px; height: 34px; display: grid; place-items: center; font: 700 18px "SimSun",serif; border-radius: 5px; }
.type-attack { color: #97443b; background: #f2dfd9; }
.type-action { color: #514985; background: #e7e4f3; }
.type-enhance { color: #456e4f; background: #e0ecdf; }
.library-panel { display: flex; flex-direction: column; height: 430px; min-height: 0; }
.search-field { display: flex; align-items: center; gap: 8px; border: 1px solid var(--panel-border-strong); border-radius: 5px; padding: 0 10px; background: var(--field); }
.search-field input { width: 100%; border: 0; background: transparent; height: 42px; }
.search-key { color: var(--ink-muted); font: 10px var(--mono); white-space: nowrap; }
.segmented-control { display: flex; gap: 6px; margin: 12px 0; }
.segment { flex: 1; }
.segment.is-active { background: var(--accent-soft); border-color: var(--accent); }
.library-filter-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.select-wrap { position: relative; }
.select-wrap select { width: 100%; }
.select-chevron { display: none; }
.results-count { color: var(--ink-muted); font-size: 11px; }
.card-list { flex: 1; min-height: 0; overflow: auto; scrollbar-width: thin; scrollbar-color: #c9b9af transparent; }
.library-card { width: 100%; display: grid; grid-template-columns: 28px minmax(0,1fr) 16px; gap: 10px; align-items: center; text-align: left; padding: 10px; border: 1px solid transparent; background: transparent; }
.library-card.is-selected { background: var(--accent-soft); border-color: var(--accent); }
.library-card-mark { display: grid; place-items: center; width: 28px; height: 28px; background: var(--muted-bg); border-radius: 4px; color: var(--accent); }
.library-card-title, .library-card-meta { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.library-card-title { font-size: 14px; font-weight: 600; }
.library-card-meta { font-size: 11px; color: var(--ink-muted); margin-top: 3px; }
.library-card-arrow svg { width: 14px; height: 14px; fill: none; stroke: currentColor; }
.library-empty { color: var(--ink-muted); text-align: center; padding: 20px; }
.library-file-row { display: flex; justify-content: flex-end; border-top: 1px solid var(--panel-border); padding-top: 14px; margin-top: 14px; }

/* Notifications and startup failures remain legible without editor initialization. */
.toast { position: fixed; right: 22px; bottom: 20px; z-index: 20; max-width: min(360px,calc(100vw - 32px)); padding: 11px 14px; color: var(--ink); background: #fff8f1; border: 1px solid #c99583; border-left: 4px solid var(--accent); border-radius: 5px; box-shadow: 0 8px 20px #3a282422; font-size: 12px; opacity: 0; pointer-events: none; transform: translateY(6px); transition: opacity .15s,transform .15s; }
.toast.is-visible { opacity: 1; transform: none; }
.startup-failure { position: fixed; inset: 25% 10% auto; z-index: 1000; padding: 24px; background: var(--field); color: var(--ink); border: 2px solid var(--accent); border-radius: 6px; box-shadow: 0 0 0 100vmax #19121bcc; font-size: 16px; }
.startup-failure button { margin-top: 12px; background: var(--accent); color: white; }

/* Single responsive layout, not competing legacy breakpoints. */
@media (max-width: 1100px) {
  .app-shell { padding: 0 14px 14px; }
  .workspace { grid-template-columns: minmax(300px,1fr) 390px; gap: 12px; }
  .topbar { flex-wrap: wrap; padding: 12px 0; gap: 10px; }
  .top-actions { justify-content: flex-start; }
  .workspace { height: calc(100dvh - 130px); }
}
@media (max-width: 780px) {
  .app-shell { padding: 0 10px 16px; }
  .topbar { align-items: flex-start; }
  .brand-title { font-size: 18px; }
  .top-actions { width: 100%; gap: 6px; }
  .button { font-size: 12px; min-height: 36px; padding: 6px 9px; }
  .workspace { display: flex; flex-direction: column; height: auto; min-height: 0; }
  .canvas-panel { height: 550px; flex: none; }
  .inspector-panel { min-height: 0; }
  .inspector-scroll { overflow: visible; padding: 16px; }
  .inspector-heading, .easy-step-footer { padding: 14px 16px; }
  .canvas-heading { padding: 0 12px; }
  .canvas-heading h2 { font-size: 14px; }
  .canvas-actions { gap: 4px; }
  .zoom-label, .action-divider { display: none; }
  .easy-tabs { padding: 0 10px; }
  .template-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .easy-dialog { padding: 18px; }
  .suite-region-row { top: 0; }
  .move-entry-select { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
/* Body font/effect tuning stays above the advanced region controls. */
.body-typography{margin:18px 0;padding:16px;border:1px solid var(--border,#d9d2ca);border-radius:12px;background:var(--surface,#fffaf5)}
.body-typography h3{margin:0 0 8px;font-size:15px}.body-type-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:10px 0}
.body-check{display:flex;align-items:center;gap:8px;margin:12px 0;font-size:13px;line-height:1.6}.body-check input{flex:0 0 auto}
.body-effect-presets{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.body-effect-presets button{padding:9px 6px;border:1px solid #d4c4b7;border-radius:6px;background:#f8efe7;color:#553e31;font:inherit;font-size:12px;cursor:pointer}
.body-effect-presets button:hover{background:#ecddcf}.body-effect-presets button:disabled{opacity:.5;cursor:not-allowed}
.body-typography fieldset{min-width:0;border:1px solid #ddd2c8;border-radius:8px;padding:10px;margin-top:14px}.body-typography legend{font-size:12px;padding:0 5px}.body-typography fieldset:disabled{opacity:.45}
.body-effect-slider{display:grid;grid-template-columns:minmax(0,1fr) 65px;gap:5px 10px;align-items:center;margin:12px 0}.body-effect-slider label{grid-column:1/-1;font-size:12px}.body-effect-slider input{min-width:0;width:100%}.body-effect-slider input[type=number]{padding:5px;border:1px solid #d4c4b7;border-radius:5px;background:#fff;color:#493d35}.body-typography input[type=color]{width:100%;height:32px;border:1px solid #d4c4b7;padding:2px;background:#fff;border-radius:5px}

.body-schemes{grid-template-columns:1fr!important}.body-schemes button{display:flex;flex-direction:column;align-items:flex-start;gap:3px;text-align:left}.body-schemes button strong{font-size:13px}.body-schemes button span{font-size:11px;color:#765f52}

.suite-builtins button{min-height:44px}.suite-builtins button span{display:none}.suite-current{padding:10px 12px;margin:12px 0;font-size:13px}

.body-typography-details{margin-top:16px}.body-typography-details>summary{font-weight:600;cursor:pointer;padding:4px 0}.body-typography-details .body-typography{margin:10px 0 0}

/* Public-resource preparation is independent from user draft storage. */
.resource-panel{max-width:1412px;margin:14px auto;padding:14px 18px;border:1px solid var(--panel-border);border-radius:8px;background:var(--panel,#fffaf5);font-size:13px;line-height:1.65}
.resource-panel-head{display:flex;justify-content:space-between;align-items:center;gap:12px}.resource-panel button{padding:7px 13px;flex-shrink:0}
.resource-panel progress{width:100%;height:10px;accent-color:var(--accent);margin:8px 0 3px}.resource-panel p{overflow-wrap:anywhere;color:var(--ink-muted)}
.resource-panel ul{padding-left:20px;margin:8px 0;color:#9d382e;max-height:180px;overflow:auto;overflow-wrap:anywhere}.resource-panel ul:empty{display:none}
.resource-panel[data-state=ready]{padding:8px 18px}.resource-panel[data-state=ready] progress,.resource-panel[data-state=ready] #resourceDetail{display:none}.resource-panel[data-state=ready] strong{color:#42613e}
.resource-panel[data-state=error]{border-color:#b54a3c;background:#fff4ef}
.saved-work-row{display:flex;gap:8px;align-items:center;margin:5px 0}.saved-work-row .library-card{min-width:0;flex:1}.delete-work-button{color:#9d382e;border:1px solid #d9b8b0;background:#fff7f4;padding:8px 12px;flex-shrink:0}
.draft-manager{border:1px solid var(--panel-border);border-radius:6px;padding:12px;margin:0 0 14px}.draft-manager p{margin:6px 0}.draft-manager h3{font-size:14px}.delete-confirm-dialog{max-width:460px}.delete-confirm-dialog p{line-height:1.8;margin:16px 0}.delete-confirm-actions{display:flex;justify-content:flex-end;gap:10px}.delete-confirm-actions button{padding:8px 16px}
@media(max-width:700px){.resource-panel{margin:10px 12px;padding:12px}.resource-panel-head{align-items:flex-start}.resource-panel[data-state=ready] #resourceCacheNote{display:none}}

.library-dialog .library-panel{height:auto;min-height:180px;max-height:min(430px,40dvh)}
