#book-editor { --desk-pink: #ff59cd; --desk-mint: #65f8d4; --desk-edge: rgba(183,109,239,.32); }
#book-editor h2, #book-editor h3 { font-family: Georgia, 'Times New Roman', serif; letter-spacing: .015em; }
#book-editor h2 { color: #f4ceff; }
#book-editor h3 { font-size: 1.45rem; margin: 0 0 1rem; }
#book-editor .book-desk-grid { display: grid; grid-template-columns: minmax(190px, .7fr) minmax(0, 2fr); gap: 1.4rem; margin: 1.3rem 0; }
#book-editor .book-desk-grid > *, #book-editor fieldset { min-width: 0; }
#book-editor .book-chapter-shelf { padding: 1rem; border: 1px solid var(--desk-edge); border-radius: 14px; background: radial-gradient(ellipse at top left, rgba(131,42,182,.24), transparent 75%), rgba(5,6,20,.55); }
#book-editor #book-chapters { width: 100%; min-height: 220px; max-width: 100%; }
#book-editor #book-content { font-family: Georgia, 'Times New Roman', serif; font-size: 1.1rem; line-height: 1.85; min-height: 370px; resize: vertical; }
#book-editor input[type=checkbox] { width: auto; accent-color: var(--desk-pink); }
#book-editor select, #book-editor input, #book-editor textarea { box-sizing: border-box; max-width: 100%; }
#book-editor .book-divider { margin-top: 1.8rem; padding-top: 1.5rem; border-top: 1px solid var(--desk-edge); }
#book-editor .book-preview-text { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 420px; overflow: auto; font: inherit; line-height: 1.75; padding: 1rem; border-radius: 12px; background: rgba(3,5,17,.65); }
#book-editor .book-ai-result { padding: 1rem; border: 1px solid rgba(101,248,212,.35); border-radius: 14px; background: linear-gradient(135deg,rgba(48,114,102,.16),rgba(90,29,127,.15)); }
#book-editor #book-word-count, #book-editor #book-publication-summary { color: var(--desk-mint); font-size: .85rem; }
#book-editor .admin-actions { flex-wrap: wrap; gap: .6rem; }
#book-editor .btn { white-space: normal; }
#book-editor button:focus-visible, #book-editor summary:focus-visible { outline: 2px solid var(--desk-mint); outline-offset: 4px; }
#book-editor [hidden] { display: none !important; }
@media (max-width: 700px) {
  #book-editor .book-desk-grid { grid-template-columns: 1fr; }
  #book-editor #book-chapters { min-height: 135px; }
  #book-editor #book-content { min-height: 310px; }
  #book-editor .admin-actions > .btn { flex: 1 1 140px; }
}

/* Studio layout extends the existing violet, pink, and mint forest palette. */
.owner-studio { --studio-ink:#090b17; --studio-pink:#ff68ce; --studio-mint:#78f1d0; --studio-edge:#85669955; background:radial-gradient(ellipse at 15% 0,#3b184a88,transparent 60%),radial-gradient(ellipse at 100% 70%,#0d4a4644,transparent 60%),#090b17; }
.owner-studio .site-admin { max-width:1480px; margin:25px auto; padding:0 28px 35px; }
.owner-studio [hidden], .owner-login [hidden] { display:none !important; }
.studio-header { display:flex; align-items:center; justify-content:space-between; gap:24px; padding:10px 0 22px; }
.studio-header .personal-eyebrow { margin-top:22px; }
.studio-header h1 { font-size:clamp(26px,3vw,38px); margin:8px 0; }
.studio-seal { color:#cebadf; font:11px/1.5 Consolas,monospace; letter-spacing:.13em; border:1px solid var(--studio-edge); padding:16px 22px; border-radius:45% 10% / 30%; transform:rotate(-4deg); }
.studio-session { display:flex; flex-wrap:wrap; align-items:center; gap:10px 24px; padding:12px 20px; margin-bottom:20px; border:1px solid var(--studio-edge); border-radius:14px; background:#141425; }
.studio-session [role=status] { flex:1 1 320px; margin:0; font-size:13px; }
.studio-session .admin-actions { margin:0; }
.studio-session details { flex-basis:100%; font-size:12px; color:#c6bdd4; }
.owner-workspace { display:grid; grid-template-columns:210px minmax(0,1fr); gap:24px; align-items:start; }
.studio-sidebar { position:sticky; top:18px; padding:22px 14px; border:1px solid var(--studio-edge); border-radius:18px; background:linear-gradient(160deg,#26192ddd,#111b26ee); }
.studio-sidebar nav { display:flex; flex-direction:column; gap:6px; }
.studio-sidebar button { width:100%; border:1px solid transparent; border-radius:10px; padding:13px 12px; text-align:left; background:transparent; color:#d2c7dc; font:700 15px 'Trebuchet MS',sans-serif; }
.studio-sidebar button small { display:block; font-size:11px; font-weight:400; margin-top:5px; color:#baafc7; }
.studio-sidebar button[aria-selected=true] { border-color:#c785cc77; background:linear-gradient(110deg,#73306b66,#264c5355); color:#fff4fc; box-shadow:inset 3px 0 var(--studio-mint); }
.studio-sidebar-note { padding:18px 10px 8px; color:#b9b3c9; font:14px/1.8 Georgia,serif; }
.studio-sidebar > a { display:block; padding:8px 10px; font-size:12px; }
.studio-panels, .studio-panels [role=tabpanel] { min-width:0; }
.owner-studio .studio-panels .personal-panel { margin:0; padding:clamp(18px,2.3vw,32px); }
.studio-section-heading { display:flex; gap:20px; align-items:flex-start; justify-content:space-between; }
.studio-private-label { white-space:nowrap; border:1px solid #63c9b355; border-radius:30px; color:#9cebd4; padding:8px 12px; font:10px Consolas,monospace; }
.studio-caution { border-left:3px solid #ffc47b; color:#f2d3ad; background:#9b652022; padding:12px 16px; font-size:13px; }
.owner-studio .site-admin input:not([type=checkbox]), .site-voice-dialog input:not([type=checkbox]) { box-sizing:border-box; width:100%; min-width:0; padding:11px 13px; border:1px solid #79548c; border-radius:10px; background:#100e20; color:#f5eeff; font:14px 'Trebuchet MS',sans-serif; }
.owner-studio .site-admin textarea { font:15px/1.65 'Trebuchet MS',sans-serif; min-height:75px; }
.owner-studio .site-admin select { max-width:100%; }
.owner-studio #book-editor .book-desk-grid { grid-template-columns:minmax(155px,.6fr) minmax(0,2.4fr); margin:12px 0; gap:22px; }
.owner-studio #book-editor #book-content { min-height:260px; height:clamp(260px,37vh,480px); font:18px/1.8 Georgia,serif; }
.owner-studio #book-editor #book-chapters { min-height:170px; }
.book-studio-tabs { display:flex; gap:5px; flex-wrap:wrap; margin:20px 0 10px; border-bottom:1px solid var(--studio-edge); padding-bottom:10px; }
.book-studio-tabs button { border:1px solid transparent; padding:10px 13px; border-radius:8px; color:#c9bfd7; background:transparent; font:700 13px 'Trebuchet MS',sans-serif; }
.book-studio-tabs button[aria-selected=true] { background:#4b355766; color:#a4ffdf; border-color:#c381d15c; }
.owner-studio .site-admin summary { cursor:pointer; padding:9px 0; color:#d8cce4; }
.book-savebar { display:flex; flex-wrap:wrap; gap:14px; align-items:center; border-top:1px solid var(--studio-edge); margin:20px 0; padding-top:16px; }
.book-savebar details { flex:1; font-size:12px; }
.studio-book-footer { display:flex; gap:12px; flex-wrap:wrap; align-items:center; font-size:12px; padding-top:20px; border-top:1px solid var(--studio-edge); }
.owner-studio .site-admin .studio-primary { background:linear-gradient(125deg,#983b88,#306663); color:#fff; border-color:#cf83d3; }
.book-quick-tasks { display:flex; flex-wrap:wrap; gap:10px; }
.owner-studio .dictate-field { display:inline-flex; margin:6px 0 0; border:1px solid #79d1c15c; border-radius:18px; padding:5px 11px; background:#10473d44; color:#a0edd6; font:12px 'Trebuchet MS',sans-serif; }
.owner-studio .dictate-field::before { content:''; width:7px; height:7px; background:currentColor; border-radius:50%; margin:4px 7px 0 0; }
.owner-studio :focus-visible, .owner-login :focus-visible { outline:2px solid #78f1d0; outline-offset:4px; }
.owner-login-card { max-width:580px; margin:12vh auto; padding:30px; }
.site-voice-dialog { box-sizing:border-box; width:min(620px,calc(100vw - 32px)); max-height:90vh; overflow:auto; padding:28px; border:1px solid #b980cc; border-radius:22px; background:linear-gradient(150deg,#26182e,#0c2025); color:#f6eefb; box-shadow:0 20px 100px #0009; }
.site-voice-dialog::backdrop { background:#04030dcc; backdrop-filter:blur(6px); }
.site-voice-dialog h2 { font:30px Georgia,serif; margin-top:0; }
.site-voice-dialog audio, .site-voice-dialog textarea, .site-voice-dialog select { width:100%; }
.owner-studio .site-voice-dialog .admin-actions { margin:14px 0; }
@media (max-width:950px) {
  .owner-workspace { grid-template-columns:minmax(0,1fr); }
  .studio-sidebar { position:static; padding:12px; }
  .studio-sidebar nav { flex-direction:row; flex-wrap:wrap; }
  .studio-sidebar button { width:auto; padding:10px 13px; }
  .studio-sidebar button small, .studio-sidebar-note, .studio-sidebar > a, .studio-sidebar > .personal-eyebrow { display:none; }
}
@media (max-width:650px) {
  .owner-studio .site-admin { padding:0 12px 24px; }
  .studio-header { align-items:flex-start; } .studio-seal, .studio-private-label { display:none; }
  .owner-studio #book-editor .book-desk-grid { grid-template-columns:minmax(0,1fr); }
  .owner-studio #book-editor #book-chapters { min-height:95px; height:110px; }
  .studio-session .admin-actions { gap:10px; }
  .site-voice-dialog { padding:18px; }
}
@media (prefers-reduced-motion:no-preference) { .studio-panels > :not([hidden]) { animation:studio-arrive .22s ease-out; } @keyframes studio-arrive { from { opacity:0; transform:translateY(5px); } to { opacity:1; transform:none; } } }
