/* Images stay secondary to the writing, with one obvious way to add them. */
.image-section-title{font-size:16px;font-weight:600;line-height:1.4;margin:0}
.image-count{font-size:12px;color:var(--muted);white-space:nowrap}
.image-drop{position:relative;display:flex;flex-direction:column;align-items:center;gap:9px;text-align:center;border:1px dashed var(--line);border-radius:10px;background:color-mix(in srgb,var(--paper) 60%,transparent);padding:24px 18px;margin:18px 0 12px;transition:border-color .15s,background .15s}
.image-drop:focus-visible,.image-drop:focus-within,.image-drop.is-dragging{outline:2px solid var(--green);outline-offset:3px;border-color:var(--green)}
.image-drop.is-dragging{background:var(--green-soft)}
.image-drop[aria-busy="true"]{opacity:.7}
.image-drop .btn{min-height:44px;font-size:15px;white-space:normal;justify-content:center;max-width:100%}
.image-drop-icon{width:34px;height:34px;display:grid;place-items:center;color:var(--green)}
.image-drop-icon svg{width:25px;height:25px}
.image-drop p,.entity-detail .image-drop p{font:14px/1.55 var(--sans);color:var(--muted);margin:0;max-width:390px}
.image-drop small{font-size:12px;line-height:1.5;color:var(--muted)}
.image-import-status{font-size:13px;color:var(--green)}
.image-import-status:empty{display:none}
.image-drop.compact{padding:17px 14px;gap:8px;margin-top:16px}
.image-drop.compact .image-drop-icon{display:none}
.image-local-note{color:var(--muted);font:13px/1.6 var(--sans);margin:16px 0 0}
.entity-visuals{border-block:1px solid var(--line);padding:20px 0;margin:22px 0}
.entity-visuals .entity-visual-cover{margin:14px 0 0;max-height:280px}
.entity-visuals .entity-actions{margin:4px 0 0}
.entity-visuals .text-btn{font-size:14px;min-height:44px;white-space:normal}
.visual-grid{margin-bottom:18px}
.visual-grid:empty{display:none}
.prompt-intro{font-size:15px;line-height:1.6;color:var(--muted);margin:0 0 20px}
.prompt-next{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:18px 0;border-top:1px solid var(--line)}
.prompt-next strong{font-size:16px;font-weight:600}
.prompt-next p{font-size:14px;line-height:1.6;color:var(--muted);max-width:440px;margin:5px 0 0}
.prompt-next .btn{flex-shrink:0;min-height:44px;font-size:15px}
.prompt-output[readonly]{font-size:14px;line-height:1.6;background:var(--paper);min-height:160px}
.project-cover-button{display:inline-flex;gap:7px;align-items:center;color:var(--muted);font-size:13px;min-height:44px;padding:8px 2px;text-align:left}
.project-cover-button svg{width:16px;height:16px;color:var(--green)}
.project-cover-button:hover{color:var(--green)}
.project-grid.list .project-cover-button{position:absolute;right:0;bottom:12px;padding:8px;min-height:40px}
.project-grid.list .project-card-info{padding-right:110px}
.book-cover.has-art{background:#333;color:#fff}
.book-cover.has-art .book-art{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center;max-height:none;display:block;border-radius:0}
.book-cover.has-art[data-cover-position="top"] .book-art{object-position:center top}
.book-cover.has-art[data-cover-position="bottom"] .book-art{object-position:center bottom}
.book-cover.has-art .book-art-shade{position:absolute;inset:0;background:linear-gradient(180deg,#03070bbf 0%,#03070ba6 65%,#03070b00 94%);z-index:1}
.book-cover.has-art .cover-title{color:#fff;text-shadow:0 1px 8px #0009;z-index:2;font-family:var(--serif);font-weight:600;letter-spacing:-.2px;display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden;max-height:4.6em}
.book-cover [hidden]{display:none!important}
.cover-editor{display:grid;grid-template-columns:230px minmax(0,1fr);gap:30px;align-items:start}
.cover-preview{min-width:0}
.cover-preview .cover-stage{height:320px;border-radius:10px}
.cover-preview .book-cover{width:174px;height:261px;transform:rotate(-2deg);box-shadow:8px 13px 20px #0002}
.cover-preview .cover-title{font-size:24px;left:22px;right:18px;top:34px}
.cover-preview .cover-mini-label{font-size:9px;bottom:50px}
.cover-preview .cover-author{font-size:8px;bottom:26px}
.cover-preview .cover-ornament{object-fit:cover}
.cover-choice{display:flex;flex-direction:column;gap:10px;margin-bottom:22px}
.cover-choice button{display:flex;align-items:flex-start;gap:13px;padding:16px;border:1px solid var(--line);border-radius:8px;text-align:left;min-height:74px;color:var(--ink);background:var(--paper)}
.cover-choice button>svg{width:22px;height:22px;flex-shrink:0;color:var(--green);margin-top:2px}
.cover-choice strong{font-size:16px;font-weight:600;display:block;line-height:1.4}
.cover-choice small{display:block;color:var(--muted);font-size:13px;line-height:1.5;margin-top:4px}
.cover-choice button[aria-pressed="true"]{border-color:var(--green);background:var(--green-soft);box-shadow:inset 0 0 0 1px var(--green)}
.cover-choice button:disabled{opacity:.5;cursor:default}
.cover-controls .check-line{font-size:14px;line-height:1.5;margin:0 0 18px}
.cover-controls .field{margin:0 0 6px}
.cover-controls .text-btn{font-size:14px;min-height:44px}
@media(max-width:600px){
  .cover-editor{grid-template-columns:1fr;gap:22px}
  .cover-preview{width:100%;max-width:250px;margin:auto}
  .cover-preview .cover-stage{height:286px}
  .cover-preview .book-cover{width:158px;height:237px}
  .cover-preview .cover-title{font-size:22px;top:28px}
  .cover-choice{gap:10px;margin-bottom:20px}
  .cover-choice button{padding:14px;min-height:78px}
  .cover-choice strong{font-size:17px}
  .cover-choice small{font-size:14px}
  .prompt-next{align-items:stretch;flex-direction:column;gap:14px}
  .prompt-next .btn{align-self:flex-start}
  .image-drop .btn{font-size:16px;min-height:48px}
  .image-section-title{font-size:18px}
  .image-drop p,.entity-detail .image-drop p{font-size:15px}
  .image-drop small,.image-local-note{font-size:13px}
  .entity-visuals .text-btn{font-size:16px;min-height:48px}
  .project-grid.list .project-card-info{padding-right:82px}
  .project-cover-button{font-size:14px}
}
@media(prefers-reduced-motion:reduce){.image-drop{transition:none}}

/* A portrait is a reference to inspect, never a decorative cropped banner. */
.entity-visuals .entity-visual-cover{height:var(--visual-height,320px);max-height:none;display:flex;align-items:center;justify-content:center;background:var(--soft);width:100%;overflow:hidden}
.entity-visuals .entity-visual-cover .codex-image{display:block;object-fit:contain;width:100%;height:100%;max-height:none}
.visual-grid .visual-item .codex-image{object-fit:contain;background:var(--soft);height:auto;max-height:520px}
.visual-size-control{display:grid;grid-template-columns:1fr auto;align-items:center;gap:8px 16px;font-size:14px;color:var(--muted);margin:16px 0}
.visual-size-control input{grid-column:1;grid-row:2;width:100%;accent-color:var(--green);min-height:32px}
.visual-size-control output{grid-column:2;grid-row:2;font-size:13px;white-space:nowrap}
.custom-cover-option{display:grid;place-items:center;border:1px dashed var(--green);border-radius:3px 7px 7px 3px;background:var(--green-soft);color:var(--green);min-height:48px;box-shadow:inset 5px 0 #0000000a}
.custom-cover-option svg{width:25px;height:25px}
.project-cover-open{display:block;width:100%;padding:0;text-align:left}
.project-cover-plus{position:absolute;top:155px;right:12px;z-index:3;width:44px;height:44px;display:grid;place-items:center;background:var(--paper);color:var(--green);border:1px solid var(--line);border-radius:50%;box-shadow:0 3px 12px #0002}
.project-cover-plus:hover{background:var(--green-soft)}
.project-cover-plus svg{width:21px;height:21px}
.project-text-open:hover .project-card-title{color:var(--green)}
.project-grid.list .project-cover-open{width:100px;flex-shrink:0}
.project-grid.list .project-cover-plus{top:58px;left:68px;right:auto;width:32px;height:32px;min-height:32px}
.project-grid.list .project-text-open{flex:1;min-width:0}
.project-grid.list .project-card-info{padding-right:40px}
.book-cover.has-art .book-art,.book-back .book-art,.flat-back .book-art{object-fit:var(--art-fit,cover);object-position:var(--art-x,50%) var(--art-y,50%);transform:translate(var(--art-shift-x,0%),var(--art-shift-y,0%)) scale(var(--art-zoom,1));transform-origin:center}
.book-cover.has-art[data-cover-position] .book-art{object-position:var(--art-x,50%) var(--art-y,50%)}
.cover-workshop{display:grid;grid-template-columns:minmax(260px,1fr) minmax(270px,1fr);gap:32px;align-items:start}
.book-showroom{min-width:0;position:sticky;top:0}
.book-turntable{height:390px;perspective:1200px;perspective-origin:50% 42%;display:grid;place-items:center;border-radius:14px;background:radial-gradient(ellipse at 50% 32%,var(--paper),var(--soft) 80%);cursor:grab;touch-action:none;overflow:hidden;outline-offset:-3px;position:relative}
.book-turntable:active{cursor:grabbing}
.book-turntable:before{content:'';position:absolute;bottom:20px;left:12%;width:76%;height:17px;border-radius:50%;background:#0002;filter:blur(13px)}
#cover-live-preview{width:100%;height:100%;display:grid;place-items:center;transform-style:preserve-3d}
.book-object{--book-w:210px;--book-h:315px;--book-d:24px;position:relative;width:var(--book-w);height:var(--book-h);transform-style:preserve-3d;transform:rotateX(var(--book-tilt,-8deg)) rotateY(var(--book-yaw,-24deg));user-select:none;pointer-events:none}
.book-face{position:absolute;inset:0;backface-visibility:hidden;border-radius:2px;overflow:hidden;background:var(--cover);color:var(--cover-ink)}
.book-front{transform:translateZ(calc(var(--book-d)/2))}
.book-back{transform:rotateY(180deg) translateZ(calc(var(--book-d)/2));background:var(--cover)}
.book-front .cover-stage{width:100%;height:100%;background:var(--cover-stage);border-radius:0;overflow:visible}
.book-front .cover-stage:after{display:none}
.book-front .book-cover{width:100%;height:100%;transform:none!important;box-shadow:none;border:0;border-radius:0;overflow:hidden}
.book-front .cover-title,.book-back .cover-title,.flat-back .cover-title{font-size:28px;left:22px;right:18px;top:36px}
.book-front .cover-mini-label{font-size:10px;bottom:66px}
.book-front .cover-author{font-size:9px;bottom:35px}
.book-back .book-art,.flat-back .book-art{position:absolute;inset:0;width:100%;height:100%;max-height:none;border-radius:0}
.book-back .cover-title,.flat-back .cover-title{color:white;text-shadow:0 1px 8px #0009;z-index:2}
.book-back-classic{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:22px;height:100%;padding:30px;color:var(--cover-ink);font:20px/1.4 var(--serif);text-align:center;overflow-wrap:anywhere;background:var(--cover)}
.book-back-classic>svg{width:35px;height:35px;opacity:.65}
.book-back-classic small{font:10px var(--sans);text-transform:uppercase;letter-spacing:.2em;opacity:.7}
.book-edge{position:absolute;backface-visibility:hidden;background:var(--cover);color:var(--cover-ink)}
.book-spine,.book-pages{height:var(--book-h);width:var(--book-d);top:0}
.book-spine{left:calc(var(--book-d)/-2);transform:rotateY(-90deg);background:linear-gradient(90deg,#0002,#fff1 22%,#0001 75%,#0003),var(--cover);display:flex;align-items:center;justify-content:center;padding:18px 3px}
.book-spine span{writing-mode:vertical-rl;font:14px/1.2 var(--serif);max-height:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.book-pages{left:calc(100% - var(--book-d)/2);transform:rotateY(90deg);background:repeating-linear-gradient(90deg,#d8d1bc 0px,#fff9e9 1px,#e4ddc9 2px,#f5efdc 3px);border-block:3px solid var(--cover)}
.book-top,.book-bottom{width:var(--book-w);height:var(--book-d);left:0;background:repeating-linear-gradient(0deg,#ded7c2 0px,#fff9e9 1px,#e4ddc9 2px,#f5efdc 3px);border-inline:3px solid var(--cover)}
.book-top{top:calc(var(--book-d)/-2);transform:rotateX(90deg)}
.book-bottom{top:calc(100% - var(--book-d)/2);transform:rotateX(-90deg)}
.book-gesture{font-size:14px;text-align:center;color:var(--muted);margin:15px 0}
.cover-range{display:block;margin:14px 0 18px;font-size:14px;color:var(--muted)}
.cover-range>span{display:flex;justify-content:space-between;align-items:center;gap:12px}
.cover-range output{font-size:13px;font-variant-numeric:tabular-nums;color:var(--ink)}
.cover-range input{width:100%;accent-color:var(--green);min-height:36px;margin-top:5px}
.book-view-actions{display:flex;justify-content:center;gap:10px;flex-wrap:wrap}
.book-view-actions .btn{min-height:44px;font-size:14px}
.cover-face-switch{display:flex;gap:8px;padding:4px;border:1px solid var(--line);border-radius:9px;background:var(--soft);margin-bottom:18px}
.cover-face-switch button{flex:1;font-size:16px;min-height:44px;border-radius:6px;color:var(--muted)}
.cover-face-switch button[aria-pressed="true"]{background:var(--paper);color:var(--ink);box-shadow:0 2px 6px #0001}
.compact-choice{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:12px}
.compact-choice button{min-height:64px;padding:12px;align-items:center;gap:8px}
.compact-choice strong{font-size:14px}
.compact-choice button>svg{width:19px;height:19px}
.cover-customizer{min-width:0}
.cover-customizer .studio-tabs{gap:18px;margin-top:0}
.cover-customizer .studio-tabs button{font-size:15px}
.cover-customizer .check-line{font-size:14px;margin:18px 0}
.cover-small-actions{gap:12px;flex-wrap:wrap}
.cover-small-actions .text-btn{min-height:44px;font-size:13px}
.cover-resolution{font-size:12px;line-height:1.6;color:var(--muted);margin:10px 0 20px}
.cover-resolution small{display:block;font-size:12px;color:var(--accent)}
.cover-position-details{border-bottom:1px solid var(--line);margin:5px 0 14px}
.cover-position-details summary{font-size:14px;cursor:pointer;padding:10px 0;min-height:44px;color:var(--muted)}
.book-turntable.is-flat{height:500px;cursor:default;touch-action:pan-y}
.book-turntable.is-flat:before{display:none}
.cover-flat-art{width:min(100%,310px);aspect-ratio:2/3;position:relative;overflow:hidden}
.cover-flat-art .cover-stage{height:100%;width:100%;background:transparent;border-radius:0}
.cover-flat-art .book-cover{width:100%;height:100%;transform:none!important;box-shadow:none;border-radius:0}
.cover-flat-art .cover-title{font-size:32px;top:45px}
.cover-flat-art .cover-mini-label{font-size:11px;bottom:65px}
.cover-flat-art .cover-author{font-size:10px;bottom:35px}
.flat-back{position:absolute;inset:0;overflow:hidden;background:var(--soft)}
.flat-back{background:var(--cover,var(--soft))}
.book-back .book-art-shade,.flat-back .book-art-shade{position:absolute;inset:0;background:linear-gradient(180deg,#03070bbf 0%,#03070ba6 65%,#03070b00 94%);z-index:1}
.book-back .cover-title,.flat-back .cover-title{overflow:hidden;display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;max-height:4.6em}
@media(max-width:760px){
  .cover-workshop{grid-template-columns:1fr;gap:28px}
  .book-showroom{position:static}
  .book-turntable{height:360px;max-width:420px;margin:auto}
  .book-object{--book-w:192px;--book-h:288px}
  .book-rotation-control{max-width:420px;margin-inline:auto}
  .book-front .cover-title,.book-back .cover-title{font-size:25px;top:30px}
  .cover-customizer .studio-tabs button{font-size:16px}
  .compact-choice strong{font-size:16px}
  .book-turntable.is-flat{height:440px}
  .cover-flat-art{width:min(100%,270px)}
  .project-grid.list .project-cover-plus{width:36px;height:36px;left:64px;top:54px}
}

.about-intro{font-size:16px;line-height:1.75;color:var(--muted);margin:8px 0 24px}.about-more{margin-top:22px;border-top:1px solid var(--line)}.about-more>summary{font-size:14px;min-height:48px;padding:14px 0;cursor:pointer;color:var(--muted)}.side-about{min-height:40px}

/* One contextual shortcut uses the room left by the old project list. */
.sidebar:not(.editor-sidebar){overflow-y:auto;overscroll-behavior:contain}.sidebar:not(.editor-sidebar)>.brand,.sidebar:not(.editor-sidebar)>.side-nav{flex-shrink:0}.side-return-space{flex:1;min-height:140px;display:flex;align-items:center;padding:24px 0}.side-return-card{width:100%;border:1px solid var(--side-line);border-radius:10px;padding:16px 14px;background:var(--side-hover)}.side-return-label{display:block;font-size:11px;line-height:1.5;color:var(--side-muted);margin-bottom:12px}.side-return-card>button{width:100%;text-align:left;color:var(--side-title);padding:0}.side-return-card strong{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:17px;line-height:1.35;font-weight:550}.side-return-card small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:12px;color:var(--side-muted);margin:6px 0 14px}.side-return-card button>span{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:13px;min-height:38px;color:var(--side-title)}.side-return-card button>span svg{width:17px;height:17px}.side-bottom{margin-top:0}.sidebar.editor-sidebar .side-bottom{margin-top:auto}@media(max-height:740px){.side-return-space{display:none}.sidebar:not(.editor-sidebar) .side-bottom{margin-top:20px}}

.radio-panel{padding:20px;background:var(--green-soft);border:1px solid var(--line);border-radius:12px;margin:0 0 24px}.radio-heading{display:flex;gap:12px;align-items:flex-start;margin-bottom:18px}.radio-heading>svg{width:24px;height:24px;flex-shrink:0;color:var(--green);margin-top:3px}.radio-heading h3{font-size:19px;font-weight:550;margin:0 0 5px}.radio-heading p{font-size:14px;color:var(--muted);margin:0;line-height:1.5}.radio-live-tag{margin-left:auto;font-size:10px;text-transform:uppercase;letter-spacing:.06em;border:1px solid var(--line);padding:5px 7px;white-space:nowrap;border-radius:4px;color:var(--green)}.radio-controls{display:flex;gap:12px;align-items:flex-end}.radio-controls .field{flex:1;min-width:0;margin:0}.radio-controls .btn{min-height:48px;white-space:nowrap;font-size:15px}.radio-controls select{background:var(--paper);width:100%;min-height:48px;font-size:16px}.radio-status{font-size:13px;line-height:1.6;color:var(--muted);margin:14px 0}.radio-source{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:6px 14px;font-size:12px;color:var(--muted)}.radio-source a{display:inline-flex;align-items:center;gap:6px;min-height:32px;color:var(--green);text-decoration:underline;text-underline-offset:3px}.radio-source svg{width:13px;height:13px}@media(max-width:420px){.radio-panel{padding:17px}.radio-heading{gap:10px}.radio-live-tag{font-size:9px;padding:4px}.radio-heading h3{font-size:18px}.radio-controls{align-items:stretch;flex-direction:column}.radio-controls .btn{align-self:flex-start}.radio-heading p{font-size:14px}}

.side-storage-nav{border-top:1px solid var(--side-line);padding-top:10px;margin-top:8px;display:grid;gap:3px}.archive-intro,.archive-empty p{font-size:15px;line-height:1.7;color:var(--muted)}.archive-empty{padding:24px 0 12px}.archive-empty h3{font-size:23px;line-height:1.3;font-weight:550}.sidebar:not(.editor-sidebar) .side-bottom{margin-top:auto}.side-return-space{min-height:100px;padding:16px 0}@media(max-height:950px){.side-return-space{display:none}}
