:root {
  --navy: #0d1d2c;
  --navy-soft: #13283b;
  --gold: #b3913f;
  --gold-light: #d3b35c;
  --ivory: #f2eee5;
  --ink: #17202a;
  --muted: #707781;
  --line: #e4e0d8;
  --paper: #f6f4ef;
  --white: #ffffff;
  --danger: #9c3c3c;
  --success: #3f735e;
  --shadow: 0 24px 60px rgba(20, 26, 34, .12);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button, input, textarea, select { font: inherit; }
button { cursor: pointer; }

.app-shell { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 30px 22px;
  color: var(--ivory);
  background: var(--navy);
  display: flex;
  flex-direction: column;
}

.brand { display: flex; gap: 13px; align-items: center; padding: 0 8px 34px; }
.brand-mark {
  width: 45px; height: 45px; display: grid; place-items: center;
  color: var(--gold-light); border: 1px solid rgba(211,179,92,.55);
  font: 600 18px Georgia, serif;
}
.brand strong, .brand span { display: block; }
.brand strong { font: 600 17px Georgia, serif; letter-spacing: .02em; }
.brand span { color: rgba(242,238,229,.52); font-size: 11px; margin-top: 4px; letter-spacing: .08em; text-transform: uppercase; }

.nav { display: grid; gap: 7px; }
.nav-item {
  color: rgba(242,238,229,.62); background: transparent; border: 0; text-align: left;
  padding: 13px 15px; border-radius: 8px; transition: .2s ease;
}
.nav-item:hover, .nav-item.active { color: var(--ivory); background: rgba(255,255,255,.07); }
.nav-item.active::before { content: ""; display: inline-block; width: 4px; height: 4px; background: var(--gold-light); border-radius: 50%; margin: 0 10px 3px 0; }

.sidebar-footer {
  margin-top: auto; display: flex; align-items: center; gap: 8px; color: rgba(242,238,229,.5);
  padding: 12px 9px; font-size: 12px;
}
.logout-link { margin-left: auto; color: rgba(242,238,229,.55); text-decoration: none; font-size: 11px; }
.logout-link:hover { color: var(--ivory); }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #76a98d; box-shadow: 0 0 0 4px rgba(118,169,141,.12); }

.main { min-width: 0; }
.topbar {
  min-height: 105px; padding: 25px 38px; background: rgba(246,244,239,.9);
  border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 10; backdrop-filter: blur(12px);
}
.eyebrow { margin: 0 0 5px; color: var(--gold); text-transform: uppercase; letter-spacing: .15em; font-size: 10px; font-weight: 700; }
.topbar h1 { margin: 0; font: 600 28px Georgia, serif; }
.topbar-actions { display: flex; align-items: center; gap: 9px; }
.install-button { color: var(--gold); border-color: rgba(179,145,63,.48); }

.button {
  border: 1px solid transparent; border-radius: 7px; padding: 11px 17px; font-weight: 650; font-size: 13px;
}
.button.primary { color: var(--white); background: var(--navy); }
.button.primary:hover { background: var(--navy-soft); }
.button.ghost { color: var(--ink); background: transparent; border-color: #ccc6bc; }
.button.small { padding: 7px 10px; font-size: 11px; }
.button.danger { color: var(--danger); border-color: rgba(156,60,60,.25); background: transparent; }

.view { display: none; padding: 32px 38px 60px; }
.view.active { display: block; }
.studio-grid { display: grid; grid-template-columns: minmax(530px, 1fr) 390px; gap: 32px; align-items: start; }
.panel { background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 28px; box-shadow: 0 8px 25px rgba(25,30,35,.035); }

.step-heading { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 24px; }
.step-heading.compact { margin-top: 36px; margin-bottom: 17px; }
.step-heading > span { color: var(--gold); font-size: 11px; font-weight: 800; letter-spacing: .12em; padding-top: 5px; }
.step-heading h2 { margin: 0; font: 600 20px Georgia, serif; }
.step-heading p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px; }
label { display: grid; gap: 7px; color: #4b5158; font-size: 12px; font-weight: 650; }
label.full { grid-column: 1 / -1; }
input, textarea, select {
  width: 100%; color: var(--ink); background: #fbfaf7; border: 1px solid #dcd7ce;
  border-radius: 7px; padding: 11px 12px; outline: none; font-weight: 450;
}
textarea { resize: vertical; line-height: 1.5; }
input:focus, textarea:focus, select:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(179,145,63,.1); }

.ai-box {
  margin-top: 22px; padding: 17px; border: 1px solid rgba(179,145,63,.3); border-radius: 9px;
  background: #fcfaf3; display: flex; justify-content: space-between; gap: 20px; align-items: center;
}
.ai-box strong { font: 600 15px Georgia, serif; }
.ai-box p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.ai-badge { color: var(--gold); border: 1px solid rgba(179,145,63,.4); padding: 3px 5px; margin-right: 7px; font-size: 9px; border-radius: 4px; }

.thought-list { display: grid; gap: 10px; }
.thought-card { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: start; padding: 12px; border: 1px solid var(--line); border-radius: 8px; }
.thought-number { color: var(--gold); font: 600 12px Georgia, serif; padding-top: 12px; text-align: center; }
.thought-card textarea { min-height: 88px; max-height: 320px; border: 0; background: transparent; padding: 8px; overflow-y: auto; }
.thought-actions { display: flex; gap: 4px; padding-top: 7px; }
.thought-actions { flex-direction: column; }
.add-thought-button { width: 100%; margin-top: 11px; border-style: dashed; color: var(--gold); }
.manual-validation { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 9px; background: #fbfaf7; }
.manual-validation.validated { border-color: rgba(39,95,72,.35); background: #edf5f0; }
.manual-validation.validated #validation-status { color: var(--success); font-weight: 700; }
.icon-button { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 7px; background: var(--white); color: var(--ink); }
.icon-button:hover { border-color: var(--gold); }

.template-picker { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.template-option { border: 1px solid var(--line); background: var(--white); border-radius: 8px; padding: 7px; text-align: left; }
.template-option.active { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(179,145,63,.13); }
.template-mini { height: 93px; background: var(--navy); display: grid; grid-template-columns: 1fr 22%; overflow: hidden; }
.template-mini::after { content: ""; background: var(--gold); }
.template-mini span { align-self: center; color: var(--ivory); text-align: center; font: 8px Georgia, serif; padding: 5px; }
.template-option[data-template="portrait"] .template-mini,
.template-option[data-template="manifesto"] .template-mini,
.template-option[data-template="cinema"] .template-mini,
.template-option[data-template="gallery"] .template-mini,
.template-option[data-template="contrast"] .template-mini,
.template-option[data-template="chronicle"] .template-mini { display: block; position: relative; background: linear-gradient(180deg, #111a25, #060b11); }
.template-option[data-template="portrait"] .template-mini::after {
  position: absolute; content: ""; width: 52px; height: 52px; border-radius: 50%;
  left: 50%; top: 9px; transform: translateX(-50%); background: #56616b; border: 1px solid var(--gold);
}
.template-option[data-template="manifesto"] .template-mini::after {
  position: absolute; content: ""; inset: 0 0 0 43%; background: linear-gradient(90deg, rgba(13,29,44,.3), #56616b);
}
.template-option[data-template="cinema"] .template-mini::after { position: absolute; content: ""; inset: 0; background: linear-gradient(0deg, #07131f 0 20%, transparent 70%), linear-gradient(135deg, #52606c, #101924); }
.template-option[data-template="gallery"] .template-mini::after { position: absolute; content: ""; inset: 11px 18px 34px; border: 1px solid var(--gold); background: #4a545e; }
.template-option[data-template="contrast"] .template-mini::after { position: absolute; content: ""; inset: 0; background: linear-gradient(90deg, #07131f 0 49%, #b3913f 49% 52%, #59636c 52%); }
.template-option[data-template="chronicle"] .template-mini::after { position: absolute; content: ""; inset: 0 0 62%; background: #59636c; border-bottom: 2px solid var(--gold); }
.template-option[data-template="portrait"] .template-mini span,
.template-option[data-template="manifesto"] .template-mini span,
.template-option[data-template="cinema"] .template-mini span,
.template-option[data-template="gallery"] .template-mini span,
.template-option[data-template="contrast"] .template-mini span,
.template-option[data-template="chronicle"] .template-mini span {
  position: absolute; z-index: 2; left: 8px; right: 8px; bottom: 8px; padding: 4px;
  color: var(--navy); background: var(--gold); font: 700 6px Arial, sans-serif; text-transform: uppercase;
}
.template-option strong { display: block; font-size: 10px; margin-top: 7px; }
.thought-photo-row, .modal-photo-editor { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.photo-mode-field { display: grid; gap: 5px; min-width: 155px; font-size: 11px; font-weight: 700; }
.photo-mode-field select { padding: 9px 10px; }
.photo-button { cursor: pointer; }
.thought-photo-thumb { width: 48px; height: 48px; object-fit: cover; object-position: center; border-radius: 50%; filter: grayscale(1) contrast(1.08); border: 2px solid rgba(179,145,63,.55); }
.thought-photo-thumb[data-photo-mode="color"], .photo-foreground[data-photo-mode="color"] { filter: none; }
.photo-mode-select { min-width: 155px; padding: 8px 10px; font-size: 12px; }
.crop-editor { display: grid; gap: 22px; }
.crop-stage {
  position: relative; width: min(520px, 85vw); aspect-ratio: 1; margin: auto;
  overflow: hidden; border-radius: 10px; background: #111923; touch-action: none; cursor: move;
}
.crop-stage img { pointer-events: none; }
.photo-media { position: absolute; inset: 0; display: block; overflow: hidden; }
.photo-backdrop {
  position: absolute; z-index: 0; inset: -7%; width: 114%; height: 114%; object-fit: cover;
  transform: scale(1.08); filter: grayscale(1) contrast(1.08) blur(18px) brightness(.42); pointer-events: none;
}
.photo-backdrop[data-photo-mode="color"] { filter: blur(18px) brightness(.42) saturate(.78); }
.photo-foreground {
  position: absolute; z-index: 1; inset: 0; width: 100%; height: 100%; object-fit: contain;
  transform-origin: center; filter: grayscale(1) contrast(1.08); pointer-events: none;
}
.crop-stage > .photo-backdrop { z-index: 0; }
.crop-stage > .photo-foreground { z-index: 1; }
.crop-ring { position: absolute; z-index: 2; inset: 0; border: 3px solid var(--gold); border-radius: inherit; pointer-events: none; box-shadow: inset 0 0 0 1px rgba(7,19,31,.36); }
.crop-stage-portrait { width: min(420px, 85vw); aspect-ratio: 1; border-radius: 50%; }
.crop-stage-manifesto { width: min(300px, 66vw); aspect-ratio: .55; }
.crop-stage-cinema { width: min(390px, 76vw); aspect-ratio: .8; }
.crop-stage-gallery { aspect-ratio: 1.53; }
.crop-stage-contrast { width: min(300px, 66vw); aspect-ratio: .4; }
.crop-stage-chronicle { aspect-ratio: 2.35; }
.crop-controls { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.crop-controls label { display: grid; gap: 8px; font-size: 12px; font-weight: 700; }
.crop-controls input { padding: 0; accent-color: var(--gold); }
.editor-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 28px; }

.preview-column { position: sticky; top: 135px; }
.preview-toolbar { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 13px; }
.preview-toolbar span, .preview-toolbar strong { display: block; }
.preview-toolbar span { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .12em; }
.preview-toolbar strong { font: 600 14px Georgia, serif; margin-top: 3px; }
.preview-actions { display: flex; gap: 7px; align-items: center; }
.preview-actions select { width: 190px; padding: 8px; font-size: 10px; background: var(--white); }
.quick-post-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; min-width: 190px; }
.quick-post-actions .button { padding: 7px 8px; }

.poster {
  --poster-navy: #0d1d2c;
  --poster-gold: #b3913f;
  position: relative; aspect-ratio: 4 / 5; display: grid; grid-template-columns: 77% 23%; color: var(--ivory);
  background: var(--poster-navy); box-shadow: var(--shadow); overflow: hidden;
  font-family: Georgia, "Times New Roman", serif;
}
.poster-raster-preview {
  position: absolute; z-index: 50; inset: 0; width: 100%; height: 100%; object-fit: fill;
  display: block; pointer-events: none; background: var(--poster-navy);
}
.poster.format-portrait { aspect-ratio: 9 / 16; }
.poster.format-square { aspect-ratio: 1 / 1; }
.poster.format-feed { aspect-ratio: 4 / 5; }
.poster.format-portrait .poster-main { padding-top: 15%; padding-bottom: 10%; }
.poster.format-portrait .poster-index { margin-top: 30%; }
.poster.format-portrait blockquote { margin-top: 23%; }
.poster.format-square .poster-index { margin-top: 12%; }
.poster.format-square blockquote { margin-top: 8%; font-size: clamp(14px, 1.7vw, 21px); }
.poster-main { position: relative; padding: 9% 6% 7%; text-align: center; display: flex; flex-direction: column; align-items: center; }
.poster-band { background: var(--poster-gold); display: grid; place-items: center; }
.poster-header { color: var(--gold-light); font-size: clamp(9px, 1vw, 13px); letter-spacing: .09em; text-transform: uppercase; white-space: nowrap; }
.poster-top-rule { width: 34%; border-top: 1px solid rgba(211,179,92,.55); margin-top: 5%; }
.poster-index { color: var(--gold-light); font-size: clamp(16px, 2vw, 23px); font-weight: 700; margin-top: 21%; }
.quote-rule { width: 100%; display: flex; align-items: center; gap: 7px; color: var(--poster-gold); font-size: 22px; }
.quote-rule::after, .quote-rule::before { content: ""; height: 1px; background: rgba(211,179,92,.62); flex: 1; }
.quote-rule-top { margin-top: 13%; }
.quote-rule-top::before { max-width: 10px; }
.quote-rule-bottom { margin-top: 5%; }
.quote-rule-bottom::after { max-width: 10px; }
.poster blockquote { margin: 15% 3% 0; font-size: clamp(16px, 2.05vw, 25px); line-height: 1.18; font-weight: 600; }
.poster blockquote.text-medium { font-size: clamp(14px, 1.72vw, 21px); line-height: 1.25; }
.poster blockquote.text-long { font-size: clamp(11px, 1.38vw, 17px); line-height: 1.32; margin-top: 10%; }
.poster blockquote.text-very-long { font-size: clamp(9px, 1.08vw, 14px); line-height: 1.34; margin-top: 7%; }
.poster.format-portrait blockquote.text-long,
.poster.format-portrait blockquote.text-very-long { margin-top: 13%; }
.poster-author { color: var(--gold-light); font-size: clamp(10px, 1.2vw, 15px); margin-top: 8%; align-self: flex-end; margin-right: 8%; }
.poster-monogram { color: #806617; font-weight: 700; font-size: clamp(28px, 4vw, 48px); letter-spacing: -.17em; text-shadow: 1px 2px 1px rgba(0,0,0,.25); }
.poster-monogram.small { margin-top: auto; font-size: clamp(22px, 3vw, 34px); color: #806617; }
.poster-monogram.embossed { color: rgba(91,70,13,.58); text-shadow: 1px 1px rgba(255,255,255,.13), -1px -1px rgba(70,50,0,.2); }

.poster.template-modern .poster-main { align-items: flex-start; text-align: left; padding-left: 9%; }
.poster.template-modern .poster-top-rule { width: 74%; }
.poster.template-modern .poster-index { font-size: 15px; margin-top: 18%; letter-spacing: .12em; }
.poster.template-modern .quote-rule { width: 82%; }
.poster.template-modern blockquote { margin: 13% 13% 0 0; font-size: clamp(17px, 2.1vw, 26px); }
.poster.template-modern .poster-author { align-self: flex-start; margin-left: 0; }
.poster.template-modern .poster-monogram.small { align-self: flex-end; margin-right: 10%; }

.poster.template-monumental .poster-header { font-size: 9px; letter-spacing: .17em; }
.poster.template-monumental .poster-index { margin-top: 30%; font-size: clamp(23px, 3vw, 36px); }
.poster.template-monumental .quote-rule-top { margin-top: 23%; }
.poster.template-monumental blockquote { margin-top: 12%; font-size: clamp(15px, 1.8vw, 22px); max-width: 88%; }
.poster.template-monumental .poster-author { font-size: 10px; }
.poster.template-monumental .poster-monogram.small { opacity: .48; }

.poster.template-book .poster-main { padding: 8% 9%; border: 7px solid rgba(255,255,255,.015); }
.poster.template-book .poster-header { max-width: 85%; white-space: normal; line-height: 1.5; }
.poster.template-book .poster-index { margin-top: 17%; font-size: 18px; }
.poster.template-book blockquote { margin-top: 12%; font-weight: 400; line-height: 1.28; }
.poster.template-book .quote-rule-top { margin-top: 12%; }
.poster.template-book .poster-author { align-self: center; margin-right: 0; text-transform: uppercase; letter-spacing: .12em; font-size: 9px; }

.poster.template-portrait { display: block; background: linear-gradient(180deg, #131c27 0%, #060b11 100%); font-family: Arial, sans-serif; }
.portrait-layout { position: relative; height: 100%; padding: 7% 8% 6%; display: flex; flex-direction: column; }
.portrait-monogram { position: absolute; left: 8%; top: 4%; z-index: 2; color: var(--gold-light); font: 700 clamp(18px, 3vw, 38px) Georgia, serif; }
.portrait-photo { position: relative; width: 72%; aspect-ratio: 1; margin: 2% auto 0; border-radius: 50%; display: grid; place-items: center; overflow: hidden; color: rgba(242,238,229,.45); background: radial-gradient(circle at 50% 38%, #45515d, #202b36 60%, #111923); border: 2px solid rgba(179,145,63,.72); box-shadow: 0 0 0 8px rgba(179,145,63,.08); font-size: 11px; letter-spacing: .18em; }
.portrait-copy { margin-top: 6%; display: flex; flex-direction: column; min-height: 38%; align-items: flex-start; text-align: left; }
.portrait-category {
  display: block; width: 100%; box-sizing: border-box; padding: 3% 5%;
  color: var(--navy); background: var(--poster-gold);
  font-size: clamp(8px, 1.15vw, 15px); line-height: 1.12; font-weight: 800;
  text-transform: uppercase; white-space: normal; overflow-wrap: anywhere;
}
.poster.template-portrait .poster-index { margin-top: 3%; font: 700 clamp(9px, 1vw, 14px) Arial, sans-serif; letter-spacing: .12em; text-transform: uppercase; }
.poster.template-portrait blockquote { margin: 5% 0 0; font: 700 clamp(15px, 2.1vw, 28px)/1.08 Arial, sans-serif; max-width: 100%; }
.poster.template-portrait blockquote.text-medium { font-size: clamp(13px, 1.75vw, 23px); }
.poster.template-portrait blockquote.text-long { margin-top: 4%; font-size: clamp(10px, 1.4vw, 18px); line-height: 1.16; }
.poster.template-portrait blockquote.text-very-long { margin-top: 3%; font-size: clamp(8px, 1.1vw, 15px); line-height: 1.18; }
.poster.template-portrait .poster-author { margin: auto 0 0; align-self: flex-start; padding-top: 4%; width: 100%; border-top: 1px solid rgba(179,145,63,.62); color: var(--gold-light); font: 400 clamp(9px, 1.1vw, 14px) Georgia, serif; }
.poster.template-portrait.format-portrait .portrait-photo { width: 82%; margin-top: 11%; }
.poster.template-portrait.format-portrait .portrait-copy { margin-top: 10%; min-height: 39%; }
.poster.template-portrait.format-portrait blockquote { margin-top: 8%; }

.poster.template-manifesto {
  display: block; position: relative; background: #07131f; font-family: Arial, sans-serif;
}
.manifesto-layout { position: relative; width: 100%; height: 100%; overflow: hidden; background: #07131f; }
.manifesto-photo {
  position: absolute; inset: 0 0 0 39%; overflow: hidden; display: grid; place-items: center;
  color: rgba(242,238,229,.45); background: #263440; font-size: 10px; letter-spacing: .16em;
}
.manifesto-shade {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, #07131f 0%, #07131f 34%, rgba(7,19,31,.96) 48%, rgba(7,19,31,.1) 78%);
}
.manifesto-content {
  position: relative; z-index: 2; width: 58%; height: 100%; padding: 7% 0 5% 7%;
  display: flex; flex-direction: column; align-items: flex-start; text-align: left;
}
.manifesto-monogram { color: var(--gold-light); font: 700 clamp(19px, 3vw, 39px) Georgia, serif; }
.manifesto-category {
  width: 88%; margin-top: 12%; padding: 3.2% 4%;
  color: #07131f; background: var(--poster-gold); font: 800 clamp(7px, 1vw, 13px)/1.15 Arial, sans-serif;
  text-transform: uppercase; overflow-wrap: anywhere;
}
.poster.template-manifesto .poster-index {
  margin-top: 5%; color: var(--gold-light); font: 700 clamp(8px, 1vw, 13px) Arial, sans-serif;
  letter-spacing: .08em; text-transform: uppercase;
}
.poster.template-manifesto blockquote {
  width: 88%; margin: 5% 0 0; color: var(--ivory);
  font: 700 clamp(12px, 1.55vw, 20px)/1.16 Arial, sans-serif;
}
.poster.template-manifesto blockquote.text-medium { font-size: clamp(11px, 1.35vw, 17px); line-height: 1.2; }
.poster.template-manifesto blockquote.text-long { margin-top: 4%; font-size: clamp(9px, 1.12vw, 14px); line-height: 1.23; }
.poster.template-manifesto blockquote.text-very-long { margin-top: 3%; font-size: clamp(7px, .92vw, 12px); line-height: 1.25; }
.poster.template-manifesto .poster-author {
  width: 88%; margin: auto 0 0; padding-top: 4%; border-top: 1px solid rgba(195,154,60,.76);
  color: var(--gold-light); font: 400 clamp(8px, 1vw, 13px) Georgia, serif;
}
.poster.template-manifesto.format-portrait .manifesto-photo { left: 31%; }
.poster.template-manifesto.format-portrait .manifesto-content { width: 68%; padding-top: 10%; }
.poster.template-manifesto.format-portrait .manifesto-category { margin-top: 18%; }
.poster.template-manifesto.format-portrait blockquote { margin-top: 8%; }

.poster.template-cinema, .poster.template-gallery, .poster.template-contrast, .poster.template-chronicle { display: block; position: relative; font-family: Arial, sans-serif; }
.cinema-layout, .gallery-layout, .contrast-layout, .chronicle-layout { position: relative; width: 100%; height: 100%; overflow: hidden; }
.cinema-photo, .contrast-photo, .chronicle-photo, .gallery-art { position: relative; overflow: hidden; background: #24313d; color: rgba(242,238,229,.45); display: grid; place-items: center; letter-spacing: .16em; font-size: 9px; }

.cinema-photo { position: absolute; inset: 0; }
.cinema-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(5,13,22,.12), rgba(5,13,22,.28) 38%, rgba(5,13,22,.96) 82%); }
.cinema-content { position: relative; z-index: 2; height: 100%; padding: 7% 8% 6%; display: flex; flex-direction: column; }
.cinema-monogram { color: var(--gold-light); font: 700 clamp(18px,3vw,38px) Georgia,serif; }
.cinema-copy { margin-top: auto; width: 88%; }
.cinema-category { color: var(--gold-light); font: 800 clamp(9px,1.2vw,15px) Arial,sans-serif; letter-spacing: .08em; text-transform: uppercase; }
.poster.template-cinema .poster-index { margin-top: 3%; font: 700 clamp(8px,1vw,13px) Arial,sans-serif; text-transform: uppercase; }
.poster.template-cinema blockquote { margin: 4% 0 0; max-width: 92%; font: 700 clamp(16px,2.1vw,28px)/1.1 Arial,sans-serif; }
.poster.template-cinema blockquote.text-long, .poster.template-cinema blockquote.text-very-long { font-size: clamp(10px,1.3vw,17px); line-height: 1.2; }
.poster.template-cinema .poster-author { margin: 5% 0 0; align-self: flex-start; padding-top: 3%; width: 100%; border-top: 1px solid rgba(211,179,92,.6); }

.gallery-layout { padding: 7% 8% 6%; color: var(--ivory); background: #07131f; display: flex; flex-direction: column; }
.gallery-topline { display: flex; justify-content: space-between; align-items: center; color: var(--gold-light); }
.gallery-topline span { font: 700 clamp(18px,3vw,36px) Georgia,serif; }
.gallery-topline small { font-size: clamp(6px,.8vw,10px); letter-spacing: .18em; }
.gallery-art { width: 82%; height: 43%; margin: 5% auto 0; border: 1px solid var(--gold); box-shadow: 0 14px 36px rgba(0,0,0,.32); }
.gallery-copy { margin-top: 6%; border-top: 1px solid rgba(195,154,60,.74); padding-top: 4%; }
.poster.template-gallery .poster-index { margin: 0; color: var(--gold-light); font: 700 clamp(7px,.9vw,11px) Arial,sans-serif; text-transform: uppercase; }
.gallery-category { margin-top: 2%; color: var(--ivory); font: 700 clamp(12px,1.6vw,21px) Georgia,serif; text-transform: uppercase; }
.poster.template-gallery blockquote { margin: 3% 0 0; color: var(--ivory); font: 500 clamp(12px,1.55vw,20px)/1.25 Georgia,serif; }
.poster.template-gallery blockquote.text-long, .poster.template-gallery blockquote.text-very-long { font-size: clamp(9px,1.15vw,15px); }
.poster.template-gallery .poster-author { margin: 4% 0 0; color: var(--gold-light); align-self: flex-start; }

.contrast-photo { position: absolute; inset: 0 0 0 50%; }
.contrast-dark { position: absolute; inset: 0; background: linear-gradient(90deg,#07131f 0 48%,rgba(7,19,31,.93) 52%,rgba(7,19,31,.12) 82%); }
.contrast-content { position: relative; z-index: 2; width: 63%; height: 100%; padding: 7% 0 6% 7%; display: flex; flex-direction: column; }
.contrast-monogram { color: var(--gold-light); font: 700 clamp(18px,3vw,38px) Georgia,serif; }
.contrast-category { margin-top: 18%; padding-left: 4%; border-left: 5px solid var(--gold); color: var(--ivory); font: 900 clamp(13px,1.8vw,24px)/1.05 Arial,sans-serif; text-transform: uppercase; }
.poster.template-contrast .poster-index { margin-top: 5%; font: 700 clamp(8px,1vw,13px) Arial,sans-serif; text-transform: uppercase; }
.poster.template-contrast blockquote { margin: 6% 10% 0 0; font: 700 clamp(14px,1.8vw,24px)/1.15 Arial,sans-serif; }
.poster.template-contrast blockquote.text-long, .poster.template-contrast blockquote.text-very-long { font-size: clamp(9px,1.12vw,15px); }
.poster.template-contrast .poster-author { margin: auto 12% 0 0; align-self: flex-start; border-top: 1px solid var(--gold); width: 72%; padding-top: 4%; }

.chronicle-layout { background: #07131f; color: var(--ivory); }
.chronicle-photo { position: absolute; inset: 0 0 62% 0; border-bottom: 2px solid var(--gold); }
.chronicle-grid { position: relative; height: 100%; padding: 5% 7% 6%; display: flex; flex-direction: column; }
.chronicle-masthead { display: flex; justify-content: space-between; color: var(--gold-light); }
.chronicle-masthead span { font: 700 clamp(17px,2.8vw,36px) Georgia,serif; }
.chronicle-masthead small { letter-spacing: .18em; font-size: clamp(6px,.8vw,10px); }
.chronicle-category { margin-top: 42%; max-width: 82%; color: var(--ivory); font: 700 clamp(15px,2vw,27px)/1.05 Georgia,serif; text-transform: uppercase; }
.poster.template-chronicle .poster-index { margin-top: 3%; color: var(--gold-light); font: 700 clamp(7px,.9vw,12px) Arial,sans-serif; text-transform: uppercase; }
.poster.template-chronicle blockquote { margin: 4% 16% 0 0; color: var(--ivory); font: 500 clamp(11px,1.45vw,19px)/1.28 Georgia,serif; }
.poster.template-chronicle blockquote.text-long, .poster.template-chronicle blockquote.text-very-long { font-size: clamp(8px,1.05vw,14px); }
.chronicle-footer { margin-top: auto; padding-top: 3%; border-top: 1px solid rgba(195,154,60,.74); display: flex; justify-content: space-between; align-items: end; }
.poster.template-chronicle .poster-author { margin: 0; color: var(--gold-light); align-self: auto; }
.chronicle-footer > span { writing-mode: vertical-rl; color: var(--gold-light); font: 800 clamp(7px,.9vw,12px) Arial,sans-serif; letter-spacing: .15em; }

.history-toolbar { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.history-search-panel { padding: 18px; background: var(--white); border: 1px solid var(--line); border-radius: 12px; align-items: end; }
.history-search-panel label { color: var(--navy); font-size: 12px; font-weight: 700; }
.history-search-panel .search-field { display: grid; gap: 8px; max-width: none; }
.search-control { position: relative; }
.search-control .search-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--gold); font-size: 21px; line-height: 1; pointer-events: none; }
.search-control input { width: 100%; min-height: 48px; padding-left: 44px; border: 1px solid rgba(179,145,63,.55); background: #fff; box-shadow: 0 4px 18px rgba(13,29,44,.05); }
.history-filter { min-width: 190px; display: grid; gap: 8px; }
.history-intro { display: flex; justify-content: space-between; align-items: end; margin-bottom: 20px; }
.history-intro h2 { margin: 3px 0 0; font: 600 25px Georgia, serif; }
.app-version { color: var(--muted); font-size: 10px; }
.search-field { flex: 1; max-width: 560px; }
.history-content { display: grid; gap: 22px; }
.theme-group { background: var(--white); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.theme-header { padding: 20px 22px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); }
.theme-header h2 { margin: 0; font: 600 20px Georgia, serif; }
.theme-header p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.history-list { display: grid; }
.history-list.folder-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(245px, 1fr)); gap: 16px; padding: 20px; }
.project-card {
  min-height: 160px; padding: 20px; display: flex; flex-direction: column; justify-content: space-between;
  gap: 18px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; background: #fbfaf7;
  position: relative; overflow: hidden;
}
.project-card::before {
  content: ""; position: absolute; top: 0; left: 18px; width: 72px; height: 10px;
  background: rgba(179,145,63,.3); border-radius: 0 0 6px 6px;
}
.project-card:last-child { border-bottom: 0; }
.project-card:hover { background: #fff; border-color: var(--gold); transform: translateY(-2px); box-shadow: 0 12px 30px rgba(25,30,35,.08); }
.folder-icon { width: 42px; height: 32px; margin-top: 7px; color: var(--gold); }
.folder-icon svg { width: 100%; height: 100%; display: block; }
.project-card h3 { margin: 0; font: 600 17px Georgia, serif; }
.project-card p { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.project-meta { display: flex; justify-content: space-between; align-items: center; gap: 10px; color: var(--gold); font-size: 11px; width: 100%; }
.history-item { display: grid; grid-template-columns: 65px minmax(0,1fr) 120px auto; gap: 16px; padding: 17px 22px; align-items: center; border-bottom: 1px solid #efede8; }
.history-item:last-child { border-bottom: 0; }
.history-number { color: var(--gold); font: 700 15px Georgia, serif; }
.history-copy strong { display: block; font: 500 15px Georgia, serif; line-height: 1.35; }
.history-copy span { display: block; color: var(--muted); font-size: 11px; margin-top: 5px; }
.status { display: inline-block; width: fit-content; padding: 5px 8px; border-radius: 20px; font-size: 10px; background: #f1eee6; color: #6e685c; }
.status.approved { color: var(--success); background: #edf5f0; }
.history-actions { display: flex; gap: 6px; }
.empty-state { min-height: 500px; display: grid; place-content: center; justify-items: center; text-align: center; }
.empty-state.compact { min-height: 280px; grid-column: 1 / -1; padding: 30px; }
.empty-state span { color: var(--gold); text-transform: uppercase; letter-spacing: .15em; font-size: 10px; }
.empty-state h2 { margin: 12px 0; font: 600 28px Georgia, serif; }
.empty-state p { max-width: 560px; color: var(--muted); line-height: 1.6; }
.modal[hidden] { display: none; }
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(5,14,23,.76); backdrop-filter: blur(4px); }
.modal-card { position: relative; width: min(1040px, 96vw); max-height: 92vh; overflow: auto; border-radius: 14px; background: var(--paper); padding: 30px; box-shadow: 0 30px 100px rgba(0,0,0,.35); }
.modal-close { position: absolute; top: 13px; right: 15px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--white); font-size: 23px; z-index: 2; }
.modal-header { margin-bottom: 22px; padding-right: 45px; }
.modal-header h2 { margin: 0; font: 600 26px Georgia, serif; }
.modal-header p { color: var(--muted); }
.modal-thoughts { display: grid; gap: 10px; }
.modal-thought { display: grid; grid-template-columns: 70px 1fr auto; align-items: center; gap: 15px; padding: 14px; background: var(--white); border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.modal-thought:hover { border-color: var(--gold); }
.thought-detail { display: grid; grid-template-columns: minmax(300px, 430px) 1fr; gap: 28px; align-items: start; }
.thought-detail .poster { width: 100%; }
.thought-editor { display: grid; gap: 17px; }
.thought-editor h2 { margin: 0; font: 600 25px Georgia, serif; }
.thought-editor textarea { min-height: 180px; }
.schedule-layout { display: grid; grid-template-columns: 340px 1fr; gap: 24px; align-items: start; }
.schedule-form { display: grid; gap: 16px; }
.schedule-form h2, .schedule-preview h2 { margin: 0; font: 600 23px Georgia, serif; }
.schedule-preview-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.schedule-header-actions { display: flex; gap: 10px; align-items: center; }
.schedule-toolbar { display: flex; margin-bottom: 18px; }
.schedule-toolbar .search-field { max-width: none; width: 100%; }
.schedule-count { color: var(--gold); font-size: 12px; }
.schedule-list { display: grid; gap: 8px; max-height: 610px; overflow: auto; }
.schedule-list.folder-grid { grid-template-columns: repeat(auto-fill, minmax(245px, 1fr)); gap: 16px; padding: 2px; }
.schedule-folder { min-height: 170px; }
.schedule-project-nav { display: flex; justify-content: space-between; gap: 10px; align-items: center; margin-bottom: 8px; }
.schedule-item { display: grid; grid-template-columns: 170px 1fr auto; gap: 14px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; align-items: center; }
.schedule-item input { padding: 8px; font-size: 11px; }
.schedule-item-actions { display: flex; gap: 6px; align-items: center; }
.schedule-item-actions select { width: auto; min-width: 86px; padding: 7px; font-size: 10px; text-transform: capitalize; }
.schedule-item.due { border-color: rgba(179,145,63,.6); background: #fffdf6; }
.schedule-item.published { opacity: .68; background: #f2f5f3; }
.schedule-assistant { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 7px; padding-top: 8px; border-top: 1px solid var(--line); }
.schedule-ready-label { color: var(--success); font-weight: 800; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.schedule-item strong { font: 600 13px Georgia, serif; }
.schedule-item span { color: var(--muted); font-size: 11px; }
.schedule-slots-header { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 8px; }
.schedule-period { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.schedule-thought-picker { display: grid; gap: 7px; max-height: 230px; overflow: auto; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: #faf9f5; }
.schedule-thought-option { display: grid; grid-template-columns: 24px 54px minmax(0,1fr); align-items: center; gap: 7px; padding: 8px; border-radius: 7px; background: var(--white); cursor: pointer; }
.schedule-thought-option input { width: 17px; height: 17px; margin: 0; accent-color: var(--gold); }
.schedule-thought-option strong { color: var(--gold-dark); font-size: 11px; }
.schedule-thought-option span { overflow: hidden; color: var(--navy); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.schedule-picker-actions { display: flex; gap: 8px; position: sticky; top: 0; z-index: 1; padding-bottom: 5px; background: #faf9f5; }
.schedule-estimate { min-height: 58px; padding: 11px 12px; border-left: 3px solid var(--gold); border-radius: 0 8px 8px 0; background: rgba(179,145,63,.08); color: var(--muted); font-size: 11px; line-height: 1.55; }
.schedule-estimate strong { color: var(--navy); }
.schedule-estimate.warning { border-color: #b76b27; background: #fff2df; color: #8a5715; }
.schedule-slots { display: grid; gap: 9px; }
.schedule-slot { display: grid; grid-template-columns: 92px 1fr 1fr 38px; gap: 7px; align-items: center; padding: 9px; border: 1px solid var(--line); border-radius: 8px; background: #faf9f5; }
.schedule-slot input, .schedule-slot select { min-width: 0; padding: 8px; font-size: 11px; }
.carousel-toolbar { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; align-items: end; margin-bottom: 14px; }
.carousel-visual-direction { display: grid; gap: 6px; margin-bottom: 18px; }
.carousel-visual-direction textarea { min-height: 82px; }
.form-hint { margin: -4px 0 18px; padding: 12px 14px; border-left: 3px solid var(--gold); border-radius: 0 10px 10px 0; background: rgba(190, 148, 48, .08); color: var(--muted); line-height: 1.55; }
.carousel-card-list { display: grid; gap: 18px; }
.carousel-card-editor { display: grid; grid-template-columns: minmax(220px, 330px) 1fr; gap: 18px; align-items: start; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #faf9f5; }
.carousel-card-preview .poster { width: 100%; box-shadow: none; }
.carousel-card-fields { display: grid; gap: 10px; }
.carousel-card-fields textarea { min-height: 135px; }
.carousel-photo-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 11px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.58); }
.carousel-photo-state { flex: 1 0 100%; color: var(--muted); font-size: 11px; }
.studio-carousel-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px solid rgba(179,145,63,.32); border-radius: 9px; background: rgba(179,145,63,.07); }
.studio-carousel-row span, .carousel-history-state { color: var(--muted); font-size: 11px; }
.carousel-history-state { display: block; margin-top: 5px; color: var(--gold-dark); }
.generated-image-review { display: grid; grid-template-columns: minmax(260px, 1.3fr) 1fr; gap: 20px; align-items: start; }
.generated-image-review img { display: block; width: 100%; max-height: 64vh; object-fit: contain; border-radius: 12px; background: var(--navy); box-shadow: var(--shadow); }
.generated-image-copy { display: grid; gap: 10px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #faf9f5; }
.generated-image-copy p { margin: 0; color: var(--muted); line-height: 1.6; }
.carousel-card-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.carousel-page { position: absolute; right: 5%; bottom: 4%; z-index: 8; color: var(--gold-light); font: 700 clamp(8px, 1vw, 13px) Arial, sans-serif; letter-spacing: .08em; }
.carousel-progress { position: absolute; z-index: 9; left: 5%; right: 5%; bottom: 2.5%; height: 2px; background: rgba(242,238,229,.24); }
.carousel-progress i { display: block; height: 100%; background: var(--gold-light); }
.carousel-accent { color: var(--gold-light); }
.poster.template-gallery .carousel-accent, .poster.template-chronicle .carousel-accent { color: var(--gold-light); }
.scheduled-carousel-preview { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; }
.scheduled-carousel-preview .poster { min-width: min(330px, 78vw); scroll-snap-align: start; box-shadow: none; }
.settings-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.cron-status { margin: 10px 0 0; padding: 10px 12px; border-radius: 8px; background: #f3f0e8; color: var(--muted); font-size: 11px; line-height: 1.45; }
.cron-status.healthy { background: #edf5f0; color: var(--success); }
.cron-status.warning { background: #fff2df; color: #8a5715; }
.cron-guide { display: grid; gap: 5px; width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: #faf9f5; font-size: 11px; }
.cron-guide code { overflow-wrap: anywhere; padding: 8px; border-radius: 6px; background: var(--navy); color: var(--white); }
.settings-grid .panel { display: grid; gap: 18px; align-content: start; }
.settings-grid h2 { margin: 0; font: 600 21px Georgia, serif; }
.notification-panel { grid-column: 1 / -1; }
.notification-state { display: grid; gap: 8px; justify-items: start; }
.notification-state p { margin: 0; }
.notification-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.muted { color: var(--muted); font-size: 13px; line-height: 1.6; }
.toast {
  position: fixed; right: 25px; bottom: 25px; background: var(--navy); color: var(--white);
  padding: 13px 17px; border-radius: 8px; box-shadow: var(--shadow); opacity: 0; transform: translateY(12px);
  pointer-events: none; transition: .25s ease; font-size: 13px; z-index: 50;
}
.toast.show { opacity: 1; transform: translateY(0); }

.auth-page {
  min-height: 100vh; padding: 35px 18px; display: grid; place-items: center;
  background:
    radial-gradient(circle at 20% 10%, rgba(179,145,63,.12), transparent 28%),
    var(--navy);
}
.auth-card {
  width: min(430px, 100%); padding: 38px; background: var(--paper); border-radius: 14px;
  box-shadow: 0 35px 90px rgba(0,0,0,.3);
}
.auth-card .brand-mark { margin-bottom: 24px; background: var(--navy); }
.auth-card h1 { margin: 0; font: 600 29px Georgia, serif; }
.auth-card > p:not(.eyebrow) { color: var(--muted); line-height: 1.55; }
.auth-card form { display: grid; gap: 16px; margin-top: 25px; }
.auth-error, .auth-success { padding: 12px 14px; margin: 18px 0; border-radius: 7px; font-size: 13px; }
.auth-error { color: #7e2828; background: #fae9e7; border: 1px solid #efcbc7; }
.auth-success { color: #275f48; background: #e8f4ed; border: 1px solid #c9e3d5; }
.install-card { width: min(720px, 100%); }
.install-form fieldset { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; border: 1px solid var(--line); border-radius: 9px; padding: 18px; }
.install-form legend { padding: 0 8px; color: var(--gold); font: 600 15px Georgia, serif; }

@media (max-width: 1050px) {
  .app-shell { grid-template-columns: 80px 1fr; }
  .brand > div:last-child, .nav-item { font-size: 0; }
  .nav-item::first-letter { font-size: 14px; }
  .sidebar { padding-inline: 12px; }
  .sidebar-footer span:last-child { display: none; }
  .studio-grid { grid-template-columns: 1fr; }
  .preview-column { position: static; max-width: 460px; margin: auto; width: 100%; }
}

@media (max-width: 700px) {
  .app-shell { display: block; padding-bottom: calc(74px + env(safe-area-inset-bottom)); }
  .sidebar { position: fixed; inset: auto 0 0; width: 100%; height: calc(70px + env(safe-area-inset-bottom)); z-index: 30; padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); flex-direction: row; }
  .brand, .sidebar-footer { display: none; }
  .nav { width: 100%; grid-template-columns: repeat(4, 1fr); }
  .nav-item { text-align: center; padding: 12px 6px; font-size: 11px; }
  .nav-item::first-letter { font-size: inherit; }
  .nav-item.active::before { display: none; }
  .topbar { position: sticky; padding: 16px; min-height: 78px; }
  .topbar h1 { font-size: 23px; }
  .topbar-actions { gap: 5px; }
  .topbar-actions .button { padding: 9px 10px; font-size: 10px; }
  .view { padding: 20px 14px 95px; }
  .panel { padding: 18px 15px; border-radius: 14px; }
  .form-grid, .settings-grid { grid-template-columns: 1fr; }
  label.full { grid-column: auto; }
  .ai-box { align-items: stretch; flex-direction: column; }
  .ai-box .button { width: 100%; }
  .template-picker { grid-template-columns: repeat(2, 1fr); }
  .template-mini { height: 108px; }
  .crop-controls { grid-template-columns: 1fr; }
  .history-item { grid-template-columns: 48px 1fr; }
  .history-item .status, .history-actions { grid-column: 2; }
  .history-intro { align-items: flex-start; flex-direction: column; gap: 7px; }
  .history-toolbar { align-items: stretch; flex-direction: column; }
  .history-filter { min-width: 0; }
  .preview-toolbar { align-items: stretch; flex-direction: column; }
  .preview-actions { align-items: stretch; flex-direction: column; }
  .preview-actions select, .quick-post-actions { width: 100%; min-width: 0; }
  .quick-post-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .thought-detail, .schedule-layout { grid-template-columns: 1fr; }
  .thought-detail > .poster, .poster { width: min(100%, 430px); margin-inline: auto; }
  .schedule-preview-header { align-items: flex-start; flex-direction: column; gap: 10px; }
  .schedule-project-nav { align-items: stretch; flex-direction: column; }
  .modal { padding: 8px; }
  .modal-card { width: calc(100vw - 16px); max-height: calc(100vh - 28px); padding: 22px 15px; }
  .modal-photo-editor, .thought-photo-row, .editor-actions, .notification-actions { display: grid; grid-template-columns: 1fr; align-items: stretch; }
  .modal-photo-editor .button, .thought-photo-row .button, .editor-actions .button, .notification-actions .button { width: 100%; }
  .thought-card { grid-template-columns: 28px minmax(0, 1fr); }
  .thought-actions { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; padding-top: 0; }
  .modal-thought { grid-template-columns: 55px 1fr; }
  .modal-thought .status { grid-column: 2; }
  .schedule-item { grid-template-columns: 90px 1fr; }
  .schedule-slot { grid-template-columns: 85px 1fr; }
  .schedule-period { grid-template-columns: 1fr; }
  .schedule-thought-option { grid-template-columns: 24px 45px minmax(0, 1fr); }
  .schedule-slot .danger { grid-column: 2; justify-self: end; }
  .carousel-toolbar { grid-template-columns: 1fr; }
  .generated-image-review { grid-template-columns: 1fr; }
  .carousel-card-editor { grid-template-columns: 1fr; }
  .auth-card { padding: 28px 20px; }
  .install-form fieldset { grid-template-columns: 1fr; }
}

@media (max-width: 430px) {
  .topbar { gap: 10px; }
  .topbar-actions { flex-direction: column; align-items: stretch; }
  .step-heading { gap: 10px; }
  .step-heading h2 { font-size: 19px; }
  input, textarea, select { padding: 10px; }
  .button { padding: 10px 13px; }
  .quick-post-actions { grid-template-columns: 1fr; }
  .template-picker { gap: 8px; }
  .crop-stage { width: min(100%, 86vw); }
  .crop-stage-manifesto, .crop-stage-contrast { width: min(78vw, 320px); }
}
