:root { color-scheme: light; --forest: #12312b; --teal: #0d7776; --gold: #c39a4a; --ink: #21392f; --muted: #768078; --line: #dedfd4; --paper: #fcfbf7; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body { margin: 0; font-family: 'Segoe UI', Arial, sans-serif; color: var(--ink); background: #f2f2eb; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; cursor: pointer; }
a { color: var(--teal); text-decoration: none; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid #b78938; outline-offset: 4px; }
button:disabled { cursor: default; opacity: .45; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
.skip-link { position: fixed; top: -100px; left: 20px; padding: 12px; background: white; z-index: 30; }
.skip-link:focus { top: 10px; }
.library-header { min-height: 72px; background: var(--paper); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 22px; padding: 14px max(28px, calc((100vw - 1480px)/2)); }
.brand img { width: 158px; display: block; }
.header-divider { height: 34px; border-left: 1px solid #d9d7c9; }
.eyebrow { display: block; font-size: 10px; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; color: var(--teal); }
.workspace-name { font-size: 16px; font-weight: 600; }
.library { max-width: 1480px; margin: auto; padding: 8px 28px 28px; }
.library-count { margin-left: auto; color: var(--muted); font-size: 11px; white-space: nowrap; }
.publication-nav { position: sticky; top: 0; z-index: 20; display: flex; gap: 8px; overflow-x: auto; padding: 12px 2px; margin-bottom: 18px; background: #f2f2eb; }
.publication-button { flex: 0 0 auto; max-width: 100%; text-align: left; background: transparent; border: 1px solid #d9dfd3; border-radius: 7px; padding: 12px 15px; display: flex; align-items: center; gap: 10px; color: var(--ink); transition: background .15s; }
.publication-button:hover { background: #e9eee4; }
.publication-button[aria-current='true'] { background: var(--forest); color: #f8f7ec; border-color: var(--forest); }
.publication-button .post-number { color: #9b7a39; font-size: 12px; font-weight: 600; }
.publication-button[aria-current='true'] .post-number { color: #d9b76f; }
.publication-button strong { display: block; font-size: 13px; line-height: 1.3; font-weight: 600; }
.publication-heading { display: flex; justify-content: space-between; align-items: end; gap: 25px; margin-bottom: 22px; }
.publication-meta { display: flex; align-items: center; gap: 13px; margin-bottom: 10px; }
.badge { display: inline-block; font-size: 9px; font-weight: 650; border-radius: 4px; padding: 5px 8px; background: #e9e1ce; color: #8f6c2e; white-space: nowrap; }
.badge.published { background: #dfebe1; color: #456c50; }
.publication-heading h2 { font-family: Georgia, serif; font-size: 30px; letter-spacing: -.025em; font-weight: 500; }
.publication-heading p { color: var(--muted); font-size: 12px; line-height: 1.5; margin-top: 9px; max-width: 670px; }
.workspace-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(270px, 34%); gap: 20px; align-items: start; }
.artwork-panel, .message-panel { background: var(--paper); border: 1px solid #dce1d5; border-radius: 15px; overflow: hidden; min-width: 0; }
.panel-header { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 20px 22px 16px; }
.panel-header h3 { font-size: 16px; font-weight: 600; }
.format-label { color: #8c9387; font-size: 10px; }
.preview-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid #e3e5da; border-bottom: 1px solid #dbe0d2; padding: 13px 22px; }
.page-controls { display: flex; align-items: center; gap: 10px; }
.icon-button { border: 1px solid #dde2d6; background: transparent; width: 29px; height: 29px; border-radius: 6px; color: var(--forest); font-size: 16px; }
#page-status { font-size: 11px; font-weight: 650; color: #677e6c; white-space: nowrap; }
.preview-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.text-button { font-size: 11px; font-weight: 600; white-space: nowrap; }
.button { border: 1px solid #d1dcd0; border-radius: 7px; background: #e6eee4; color: var(--forest); display: inline-flex; gap: 11px; align-items: center; justify-content: center; padding: 9px 12px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.button:hover { background: #d6e2d4; }
.button.primary { background: var(--forest); border-color: var(--forest); color: #f8f8ee; }
.button.primary:hover { background: #2a4b3f; }
.page-stage { position: relative; display: grid; place-items: start center; min-height: 180px; background: #dfe4db; padding: 0; }
.frame-shell { position: relative; }
.page-frame { width: 1080px; height: 1350px; border: none; position: absolute; top: 0; left: 0; transform-origin: top left; box-shadow: 0 14px 32px #18382520; background: #f7f4ec; }
.preview-loading { position: absolute; inset: 0; background: #dfe4beeb; display: grid; place-items: center; font-size: 12px; color: var(--muted); }
.message-panel .panel-header { padding-bottom: 18px; border-bottom: 1px solid #e3e5da; }
.message-tools { display: flex; justify-content: space-between; align-items: center; padding: 15px 22px 20px; gap: 12px; }
.message-copy { border-top: 1px solid #e6e8de; padding: 22px; font-size: 13px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; color: #41584a; }
.message-copy.error { color: #9b552f; }
.message-footer { border-top: 1px solid #e6e8de; padding: 15px 22px; display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; font-size: 10px; color: #89927f; }
.toast { position: fixed; bottom: 25px; left: 50%; transform: translate(-50%, 8px); background: var(--forest); color: #f4f3e8; border: 1px solid #617968; padding: 13px 19px; border-radius: 9px; font-size: 12px; max-width: calc(100vw - 36px); box-shadow: 0 12px 28px #18322425; opacity: 0; pointer-events: none; transition: .16s; z-index: 50; }
.toast.visible { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 1000px) {
  .library { padding-left: 18px; padding-right: 18px; }
  .workspace-grid { gap: 14px; grid-template-columns: minmax(0, 1fr) 270px; }
  .preview-toolbar { padding: 12px; flex-wrap: wrap; }
  .preview-actions { gap: 10px; }
  .message-tools, .message-copy, .message-footer, .message-panel .panel-header { padding: 16px; }
  .message-tools { flex-wrap: wrap; }
}
@media (max-width: 650px) {
  .workspace-grid { grid-template-columns: 1fr; }
  .library-header { padding: 16px 18px; gap: 15px; }
  .brand img { width: 126px; }
  .workspace-name { font-size: 13px; }
  .library-count { display: none; }
  .publication-button { padding: 11px 12px; }
  .publication-heading h2 { font-size: 27px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

.publication-picker { display: flex; align-items: center; gap: 12px; padding: 12px 2px 0; }
.publication-picker label { font-size: 11px; color: var(--muted); }
.publication-picker select { min-width: 0; max-width: 100%; padding: 9px 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); color: var(--ink); font: 12px 'Segoe UI',Arial,sans-serif; }
.publication-picker select:focus-visible { outline: 3px solid #b78938; outline-offset: 3px; }
.badge.planned { background: #e7eae3; color: #69786b; }
.publication-button.planned { border-style: dashed; }
.publication-button.planned[aria-current='true'] { border-style: solid; }
.planned-artwork { min-height: 360px; padding: 40px; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; background: #f7f4ec; }
.planned-artwork h3 { font: 30px Georgia,serif; margin: 12px 0; }
.planned-artwork p { max-width: 300px; font-size: 13px; line-height: 1.6; color: var(--muted); }
.message-panel.planned .message-copy { min-height: 160px; border-top: 0; }
.message-panel.planned .message-tools,.message-panel.planned .message-footer { display: none; }
@media (max-width: 650px) { .publication-picker { align-items: stretch; flex-direction: column; gap: 6px; } .planned-artwork { min-height: 280px; padding: 28px; } }
