:root {
  --accent: #3b2d6e;
  --highlight: #f2b30c;
  --surface: #faf6ec;
  --ink: #282333;
  --muted: #736c7d;
  --line: #e4dfe8;
  --white: #fff;
  --radius: 14px;
  font-family: Inter, 'Segoe UI', sans-serif;
  color: var(--ink);
  background: #f5f3f6;
  font-size: 14px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.5;
}
button,
a {
  transition:
    background 0.15s,
    color 0.15s;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--highlight);
  outline-offset: 3px;
}
button {
  border: 1px solid var(--line);
  background: white;
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--ink);
  font-weight: 600;
}
button:hover {
  background: #f3f0f8;
}
a {
  color: var(--accent);
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: 23px;
  letter-spacing: -0.7px;
  margin-bottom: 0;
}
h2 {
  font-size: 28px;
  letter-spacing: -0.8px;
}
h3 {
  font-size: 16px;
}
.eyebrow {
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.muted,
.hint {
  color: var(--muted);
  line-height: 1.65;
}
.hint {
  font-size: 12px;
}
.primary {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}
.primary:hover {
  background: color-mix(in srgb, var(--accent), black 15%);
}
.gold {
  background: var(--highlight);
  border-color: var(--highlight);
  color: #241e13;
}
.secondary {
  background: #f5f3f8;
}
.danger {
  color: #a02f41;
}
.text-button {
  border: 0;
  background: transparent;
  text-align: left;
  padding: 10px 0;
  font-weight: 500;
}
.badge {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 6px 10px;
  border-radius: 20px;
  background: #eee8f7;
  color: var(--accent);
  white-space: nowrap;
}
.gate {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.gate-art {
  background: var(--accent);
  color: var(--surface);
  padding: clamp(35px, 8vw, 130px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.gate-art:before,
.gate-art:after {
  content: '';
  position: absolute;
  width: 450px;
  height: 450px;
  border: 1px solid #ffffff17;
  border-radius: 50%;
  bottom: -160px;
  right: -140px;
}
.gate-art:after {
  width: 600px;
  height: 600px;
  bottom: -235px;
  right: -215px;
}
.gate-art h1 {
  font-size: clamp(40px, 4.3vw, 74px);
  line-height: 1.08;
  letter-spacing: -3px;
  margin-bottom: 25px;
}
.gate-art p {
  line-height: 1.7;
  max-width: 350px;
}
.star {
  color: var(--highlight);
  font-size: 75px;
  margin-bottom: 45px;
}
.gate-stamp {
  font-size: 10px;
  letter-spacing: 5px;
  margin-top: 70px;
  opacity: 0.65;
}
.gate-form {
  align-self: center;
  padding: 65px;
  max-width: 560px;
  width: 100%;
  justify-self: center;
}
.gate-form img {
  max-height: 100px;
  object-fit: contain;
  margin-bottom: 30px;
}
.gate-form a {
  display: block;
  margin-top: 20px;
  font-size: 12px;
}
.gate-form h2 {
  font-size: 36px;
}
label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 17px;
}
input,
select,
textarea {
  display: block;
  width: 100%;
  background: white;
  border: 1px solid #d9d2e0;
  border-radius: 7px;
  padding: 11px;
  margin-top: 7px;
  color: var(--ink);
}
textarea {
  resize: vertical;
  min-height: 92px;
  line-height: 1.5;
}
input[type='checkbox'] {
  display: inline;
  width: auto;
  margin: 0 9px 0 0;
  accent-color: var(--accent);
}
input[type='color'] {
  height: 43px;
  padding: 5px;
}
input[type='file'] {
  font-size: 12px;
}
.gate-form .primary {
  width: 100%;
  margin: 8px 0;
}
#login-note {
  font-size: 13px;
  line-height: 1.6;
}
.rail {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 84px;
  background: var(--accent);
  color: white;
  display: flex;
  align-items: center;
  flex-direction: column;
  padding: 21px 8px;
  z-index: 5;
}
.rail-logo {
  width: 51px;
  height: 51px;
  border-radius: 13px;
  background: var(--surface);
  padding: 6px;
  display: grid;
  place-items: center;
  margin-bottom: 40px;
}
.rail-logo img {
  max-width: 100%;
  max-height: 40px;
}
.rail nav {
  width: 100%;
  display: grid;
  gap: 12px;
}
.rail nav button,
.rail nav a,
.rail > button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  width: 100%;
  color: #eee7ff;
  background: transparent;
  border: 0;
  font-size: 10px;
  font-weight: 500;
  text-decoration: none;
  padding: 10px 4px;
  border-radius: 8px;
}
.rail nav span {
  font-size: 22px;
  font-weight: 500;
}
.rail nav .active,
.rail nav button:hover,
.rail nav a:hover {
  background: #ffffff1b;
  color: white;
}
.rail > button {
  margin-top: auto;
  font-size: 22px;
}
.rail small {
  font-size: 10px;
}
.shell {
  margin-left: 84px;
}
.topbar {
  height: 93px;
  padding: 22px 32px;
  border-bottom: 1px solid var(--line);
  background: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.topbar .eyebrow {
  color: var(--muted);
  margin-bottom: 5px;
}
.identity {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12px;
  color: var(--muted);
}
.toolbar {
  padding: 17px 25px;
  background: white;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.toolbar select {
  width: 190px;
  margin: 0;
}
.toolbar .spacer {
  flex: 1;
}
.save-state {
  font-size: 12px;
  color: var(--muted);
}
.editor-layout {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) 316px;
  min-height: calc(100vh - 170px);
}
.preview-area {
  padding: 24px;
  min-width: 0;
  display: flex;
  align-items: center;
  flex-direction: column;
  background: linear-gradient(140deg, #eeebf1, #f6f4f7);
}
.preview-caption {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
  gap: 10px;
}
.preview-caption small {
  color: var(--muted);
  font-size: 11px;
}
.view-toggle {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
}
.view-toggle button {
  padding: 7px 10px;
  border: 0;
  border-radius: 0;
  font-size: 11px;
}
.view-toggle button.active {
  color: var(--accent);
  background: #e9e2f1;
}
.frame-wrap {
  width: 100%;
  max-width: 1500px;
  min-height: 600px;
  box-shadow: 0 8px 25px #23192e12;
  border-radius: 10px;
  overflow: hidden;
  background: white;
  transition: max-width 0.2s;
}
.frame-wrap.mobile {
  max-width: 390px;
}
.frame-wrap.tablet {
  max-width: 768px;
}
iframe {
  width: 100%;
  height: calc(100vh - 267px);
  min-height: 570px;
  display: block;
  border: 0;
  background: white;
}
.inspector {
  background: white;
  border-left: 1px solid var(--line);
  padding: 22px;
  overflow-y: auto;
  max-height: calc(100vh - 170px);
}
.inspector h3 {
  margin-bottom: 7px;
}
.inspector .empty {
  padding: 20px 0;
  color: var(--muted);
  line-height: 1.7;
}
.inspector textarea {
  min-height: 100px;
}
.inspector .divider {
  border-top: 1px solid var(--line);
  margin: 24px 0;
}
.inspector .actions {
  display: flex;
  gap: 8px;
}
.inspector button {
  font-size: 12px;
}
.selection-badge {
  margin-bottom: 13px;
  display: inline-block;
}
.panel {
  padding: 32px;
  max-width: 1200px;
  margin: auto;
}
.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 20px;
}
.panel-head h2 {
  margin-bottom: 9px;
}
.panel-head p {
  margin-bottom: 0;
}
.card {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 25px;
  margin-bottom: 18px;
}
.card h3 {
  margin-bottom: 6px;
}
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 20px;
}
.card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.card-row + .card-row {
  border-top: 1px solid var(--line);
  padding-top: 20px;
  margin-top: 20px;
}
.card-row h3 {
  margin-bottom: 7px;
}
.card-row p {
  margin: 0;
}
.card-row .actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.card-row:has([data-person]) {
  flex-wrap: wrap;
  gap: 8px;
}
.card-row:has([data-person]) > div:first-child {
  flex-basis: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
}
.admin-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.admin-tabs button {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 11px 15px;
}
.admin-tabs .active {
  background: var(--accent);
  color: white;
}
.admin-form {
  max-width: 850px;
}
.toggle {
  padding: 12px 0;
  display: flex;
  align-items: center;
  font-weight: 500;
  margin: 0;
}
.toggle input {
  flex-shrink: 0;
}
.settings-footer {
  position: sticky;
  bottom: 0;
  background: #f5f3f6f2;
  padding: 15px 0;
  display: flex;
  gap: 15px;
  align-items: center;
}
.notice {
  padding: 14px 18px;
  border-radius: 9px;
  background: #fdf4d7;
  color: #635019;
  font-size: 12px;
  line-height: 1.7;
  margin-bottom: 20px;
}
.empty-card {
  text-align: center;
  padding: 65px 25px;
}
.empty-icon {
  font-size: 35px;
  color: var(--accent);
  margin-bottom: 15px;
}
.changes {
  display: grid;
  gap: 9px;
  font-size: 13px;
}
.changes div {
  padding: 10px 12px;
  background: #f6f3f9;
  border-radius: 7px;
}
.proposal {
  padding: 14px;
  border-radius: 10px;
  background: #f4f0f8;
  margin: 15px 0;
  line-height: 1.6;
  white-space: pre-wrap;
  font-size: 12px;
}
.proposal details {
  white-space: normal;
}
.proposal li {
  margin: 8px 0;
}
.media-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 20px 0;
  max-height: 450px;
  overflow: auto;
}
.media-grid button {
  padding: 5px;
}
.media-grid img {
  width: 100%;
  height: 110px;
  object-fit: cover;
  border-radius: 4px;
}
.media-grid small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 140px;
  font-size: 10px;
}
.error {
  color: #9c263d;
}
.table {
  width: 100%;
  border-collapse: collapse;
}
.table td,
.table th {
  text-align: left;
  padding: 13px 10px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.table th {
  color: var(--muted);
}
dialog {
  border: 0;
  border-radius: 18px;
  padding: 28px;
  width: min(720px, 94vw);
  max-height: 90vh;
  box-shadow: 0 25px 80px #1d0f3340;
}
dialog::backdrop {
  background: #20122e70;
  backdrop-filter: blur(3px);
}
dialog h2 {
  font-size: 24px;
}
dialog #modal-close {
  margin-top: 22px;
}
#toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  max-width: 480px;
  padding: 16px 22px;
  border-radius: 10px;
  background: var(--accent);
  color: white;
  z-index: 100;
  box-shadow: 0 6px 25px #0002;
  line-height: 1.5;
}
#toast.error {
  background: #8b263b;
}
.manual {
  max-width: 1080px;
  margin: 0 auto;
  padding: 35px;
}
.manual-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 55px;
}
.manual-logo {
  width: 65px;
}
.manual-hero {
  max-width: 740px;
  margin-bottom: 35px;
}
.manual-hero h1 {
  font-size: 48px;
  margin: 16px 0;
}
.manual-layout {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 35px;
}
.manual-nav {
  position: sticky;
  top: 20px;
  align-self: start;
  display: grid;
  gap: 14px;
}
.manual-nav a {
  font-size: 13px;
  text-decoration: none;
}
.manual article {
  scroll-margin-top: 25px;
  line-height: 1.85;
}
.manual article h2 {
  font-size: 24px;
}
.manual article li {
  margin: 8px 0;
}
.manual article code {
  background: #f2edf7;
  padding: 2px 5px;
  border-radius: 3px;
}
.manual .search {
  max-width: 550px;
}
.manual footer {
  padding: 35px 0;
  color: var(--muted);
  font-size: 12px;
}
.step-strip {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 20px 0;
  flex-wrap: wrap;
}
.step-strip span {
  padding: 9px 13px;
  border-radius: 8px;
  background: #eee8f6;
  color: var(--accent);
  font-size: 12px;
}
.step-strip b {
  color: var(--muted);
}
[hidden] {
  display: none !important;
}
@media (min-width: 1700px) {
  .editor-layout {
    grid-template-columns: minmax(320px, 1fr) 360px;
  }
  .inspector {
    padding: 28px;
  }
  .preview-area {
    padding: 30px;
  }
}
@media (max-width: 1050px) {
  .identity #user-email {
    display: none;
  }
  .editor-layout {
    grid-template-columns: minmax(300px, 1fr) 280px;
  }
  .toolbar {
    padding: 14px;
  }
  .toolbar .save-state {
    display: none;
  }
  .preview-area {
    padding: 14px;
  }
  .inspector {
    padding: 17px;
  }
  .grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 760px) {
  .gate {
    display: block;
  }
  .gate-art {
    display: none;
  }
  .gate-form {
    padding: 40px 25px;
    margin: auto;
  }
  .rail {
    width: 62px;
    padding: 15px 5px;
  }
  .rail-logo {
    width: 43px;
    margin-bottom: 24px;
  }
  .shell {
    margin-left: 62px;
  }
  .topbar {
    padding: 18px;
    height: 85px;
  }
  .topbar h1 {
    font-size: 19px;
  }
  .identity {
    display: none;
  }
  .toolbar select {
    width: 140px;
  }
  .toolbar button {
    padding: 9px;
    font-size: 11px;
  }
  .editor-layout {
    display: flex;
    flex-direction: column;
  }
  .inspector {
    max-height: none;
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  iframe {
    height: 560px;
    min-height: 0;
  }
  .frame-wrap {
    min-height: 560px;
  }
  .panel {
    padding: 22px 16px;
  }
  .panel-head {
    flex-direction: column;
  }
  .field-grid {
    grid-template-columns: 1fr;
  }
  .card {
    padding: 20px;
  }
  .card-row {
    align-items: flex-start;
    flex-direction: column;
  }
  .manual {
    padding: 25px;
  }
  .manual-hero h1 {
    font-size: 36px;
  }
  .manual-layout {
    display: block;
  }
  .manual-nav {
    position: static;
    margin-bottom: 30px;
    grid-template-columns: 1fr 1fr;
  }
  .media-grid {
    grid-template-columns: 1fr 1fr;
  }
  .table {
    display: block;
    overflow: auto;
  }
  .toolbar .spacer {
    display: none;
  }
  .preview-caption {
    flex-wrap: wrap;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
/* Reusable content lists keep authoring controls comfortable on narrow screens. */
.content-row {
  border: 1px solid var(--line, #ddd);
  border-radius: 12px;
  margin: 18px 0;
  padding: 16px;
  min-width: 0;
}
.row-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
[data-content-list] {
  display: block;
  width: 100%;
  margin-top: 8px;
  text-align: left;
}
#rows-error {
  color: #a12132;
}
.assistant-log {
  max-height: 560px;
  overflow: auto;
  overscroll-behavior: contain;
  margin: 16px 0;
}
.assistant-turn {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 12px;
  overflow-wrap: anywhere;
}
.assistant-user {
  background: var(--surface);
  margin-left: 18px;
}
.assistant-turn > strong {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.assistant-turn p {
  white-space: pre-wrap;
  font-size: 13px;
  margin: 8px 0;
}
.proposal-review {
  font-size: 12px;
  margin: 14px 0;
}
.proposal-review summary {
  cursor: pointer;
  font-weight: 600;
}
.proposal-change {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.proposal-change strong,
.proposal-change span {
  display: block;
  margin: 5px 0;
}
.proposal-change span {
  font-size: 10px;
  text-transform: uppercase;
  color: var(--muted);
}
.proposal-change pre {
  font-family: inherit;
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: #f7f5fa;
  margin: 0;
  padding: 8px;
  max-height: 200px;
  overflow: auto;
}
.visitor-preview {
  max-width: 760px;
  margin: 24px 0;
}
#visitor-preview-slot {
  max-width: 420px;
  margin-top: 20px;
}
.design-section {
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.design-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
}
.design-heading > button {
  flex-shrink: 0;
}
.palette-colors {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  gap: 14px;
  margin-top: 18px;
}
.palette-color {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  padding-bottom: 10px;
}
.palette-color label {
  margin: 12px 10px 0;
  font-size: 11px;
}
.palette-color input[type='text'] {
  font:
    13px ui-monospace,
    monospace;
  padding: 9px;
}
.palette-color .text-button {
  margin-left: 5px;
  font-size: 12px;
}
.palette-sample {
  height: 80px;
  display: grid;
  place-items: center;
  position: relative;
  font-size: 28px;
  font-weight: 600;
}
.palette-sample input[type='color'] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  margin: 0;
}
.palette-sample:focus-within {
  outline: 3px solid var(--accent);
  outline-offset: -4px;
}
.font-controls {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 16px;
  margin: 20px 0;
}
.font-controls label {
  margin: 0;
}
.font-controls label:last-child {
  grid-column: 1 / -1;
}
.font-controls input[type='range'] {
  display: block;
  padding: 0;
  width: min(100%, 300px);
  margin-top: 12px;
  accent-color: var(--accent);
}
.font-controls output {
  font-size: 12px;
  color: var(--muted);
  margin-left: 8px;
}
.font-catalog {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  max-height: 520px;
  overflow-y: auto;
  padding: 4px;
}
.font-option {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  margin: 0;
  cursor: pointer;
  min-width: 0;
}
.font-option.selected {
  border-color: var(--accent);
  background: #f5f2fa;
  box-shadow: inset 0 0 0 1px var(--accent);
}
.font-option:focus-within {
  outline: 3px solid var(--highlight);
  outline-offset: 1px;
}
.font-option-heading {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
}
.font-option-heading input[type='checkbox'] {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--accent);
}
.font-option-heading small {
  margin-left: auto;
  color: var(--muted);
  font-size: 10px;
}
.font-specimen {
  display: block;
  margin-top: 14px;
  line-height: 1.45;
  overflow-wrap: anywhere;
  font-weight: 400;
}
.selected-fonts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 18px;
}
.selected-fonts button {
  border-radius: 20px;
  padding: 7px 11px;
  font-size: 12px;
}
.color-pair {
  display: flex;
  gap: 10px;
}
.color-pair input[type='color'] {
  flex: 0 0 58px;
  width: 58px;
  height: 44px;
  padding: 3px;
  cursor: pointer;
}
.color-pair input[type='text'] {
  min-width: 0;
  font:
    14px ui-monospace,
    monospace;
}
.brand-preview {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 26px;
  margin-top: 24px;
}
.brand-preview h3,
.brand-preview .eyebrow {
  color: inherit;
}
.brand-preview .preview-copy {
  font-size: 14px;
  margin: 14px 0;
}
.brand-preview small {
  display: block;
  margin-top: 20px;
  font-size: 11px;
}
.preview-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.preview-buttons span {
  border-radius: 8px;
  padding: 10px 15px;
  font-size: 12px;
  font-weight: 600;
}
@media (max-width: 600px) {
  .font-catalog,
  .font-controls {
    grid-template-columns: 1fr;
  }
  .design-heading {
    flex-wrap: wrap;
  }
  .brand-preview {
    padding: 18px;
  }
}
.chat-focus #selection-panel,
.chat-focus #page-details,
.chat-focus .inspector > .divider {
  display: none;
}
.chat-focus .inspector {
  overflow: hidden;
}
.chat-focus #assistant-panel {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 214px);
  min-height: 400px;
}
.chat-focus .assistant-log {
  flex: 1;
  min-height: 100px;
  max-height: none;
}
.chat-focus #assistant-form,
.chat-focus #reset-assistant {
  flex-shrink: 0;
}
.selection-tools {
  position: relative;
  width: 100%;
  flex-shrink: 0;
  margin-bottom: 16px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  box-shadow: 0 3px 14px #28233308;
}
.selection-tools-row {
  padding-right: 30px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.selection-tools-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  margin: 0 6px;
}
.selection-tools button {
  padding: 8px 10px;
  font-size: 12px;
  min-height: 36px;
}
.selection-tools .close-selection-tools {
  position: absolute;
  top: 7px;
  right: 7px;
  padding: 4px;
  min-height: 28px;
  width: 28px;
  font-size: 20px;
  line-height: 1;
  border: 0;
  color: var(--muted);
}
#show-selection-tools {
  padding: 6px 9px;
  font-size: 11px;
  white-space: nowrap;
}
.selection-tools button[aria-pressed='true'] {
  background: var(--accent);
  color: white;
}
.selection-tools-row label {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 0;
  font-size: 10px;
  color: var(--muted);
}
.selection-tools-row select,
.selection-tools-row input {
  margin: 0;
  padding: 8px;
  font-size: 12px;
  min-height: 36px;
}
.quick-font-label select {
  width: 128px;
}
.quick-size-label input {
  width: 62px;
}
.quick-align-label select {
  width: 105px;
}
.selection-tools-popover {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 12px 4px 2px;
  margin-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 12px;
}
.quick-swatches,
.quick-ai-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.quick-swatches button[data-quick-color]:not([data-quick-color='']) {
  width: 36px;
  border: 1px solid #28233340;
}
.quick-edit-form {
  display: flex;
  flex: 1;
  gap: 10px;
  align-items: end;
  flex-wrap: wrap;
  min-width: 0;
}
.quick-edit-form label {
  flex: 1;
  min-width: 160px;
  margin: 0;
}
.quick-edit-form input {
  margin-bottom: 0;
}
.chat-resizer {
  display: none;
}
.invitation-preview {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 45vh;
  overflow-y: auto;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  line-height: 1.65;
}
@media (min-width: 761px) {
  .editor-layout.resizable-pane {
    grid-template-columns: minmax(320px, 1fr) 14px var(--chat-width, 420px);
  }
  .resizable-pane .chat-resizer {
    display: block;
    cursor: col-resize;
    touch-action: none;
    background: var(--line);
    position: relative;
  }
  .chat-resizer::after {
    content: '';
    position: absolute;
    top: 45%;
    left: 5px;
    width: 4px;
    height: 40px;
    border-radius: 4px;
    background: var(--muted);
  }
  .chat-resizer:hover,
  .chat-resizer:focus-visible,
  .resizing-chat .chat-resizer {
    background: var(--accent);
    outline: 2px solid var(--highlight);
    outline-offset: -2px;
  }
  .resizing-chat {
    cursor: col-resize;
    user-select: none;
  }
  .resizing-chat iframe {
    pointer-events: none;
  }
  .resizable-pane .inspector {
    min-width: 0;
  }
}
.publish-review h2 {
  font-size: 24px;
  margin: 0 0 12px;
}
.publish-review .eyebrow {
  margin-bottom: 8px;
}
.publish-pages {
  list-style: none;
  padding: 0;
  margin: 16px 0;
}
.publish-pages li {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}
.publish-pages li span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.publish-pages a {
  flex-shrink: 0;
}
.publish-review small {
  overflow-wrap: anywhere;
}
.publish-sharing {
  margin-top: 18px;
  font-size: 13px;
}
.publish-sharing summary,
.publish-checks summary {
  cursor: pointer;
}
.publish-sharing .actions {
  margin-top: 12px;
}
.publish-review .actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
dialog:has(.publish-review) {
  width: min(560px, calc(100vw - 32px));
}
dialog:has(
    .publish-review #keep-editing,
    .publish-review #publication-done,
    .publish-review #cancel-undo-publication
  )
  #modal-close {
  display: none;
}
.publish-error {
  color: #9d2638;
}
dialog:has(.map-editor) {
  width: min(1080px, calc(100vw - 32px));
}
dialog:has(.map-editor) #modal-close {
  display: none;
}
.map-editor h2 {
  margin: 0;
  font-size: 22px;
}
.map-editor {
  display: flex;
  flex-direction: column;
  max-height: calc(90vh - 56px);
}
.map-editor > header,
.map-actions {
  flex-shrink: 0;
}
.map-editor-layout {
  min-height: 0;
  overflow: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 255px;
  gap: 20px;
  align-items: start;
}
.map-canvas {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fcfaf5;
}
.map-canvas svg {
  display: block;
  width: 100%;
  max-height: 60vh;
  touch-action: none;
  user-select: none;
}
.map-canvas [data-map-id] {
  cursor: grab;
}
.map-canvas [data-map-id]:active {
  cursor: grabbing;
}
.map-canvas .map-marker-selected {
  outline: 2px dashed var(--accent);
  outline-offset: 5px;
}
.map-nudge,
.map-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.map-nudge {
  margin: 12px 0;
}
.map-nudge label {
  margin: 0;
  font-size: 12px;
}
.map-nudge button {
  min-width: 36px;
  padding: 8px;
}
.map-nudge select {
  padding: 6px;
}
.map-actions {
  border-top: 1px solid var(--line);
  padding-top: 14px;
  margin-top: 14px;
}
.map-actions button {
  font-size: 13px;
}
#map-fields {
  min-width: 0;
}
#map-fields label {
  margin-bottom: 10px;
}
#map-fields summary {
  cursor: pointer;
  font-size: 13px;
  margin-bottom: 12px;
}
#map-fields input,
#map-fields select,
#map-fields textarea {
  min-width: 0;
  max-width: 100%;
  font-size: 13px;
}
#map-error {
  color: #9d2638;
}
.map-page-tools {
  margin-bottom: 16px;
}
@media (max-width: 720px) {
  .map-editor {
    max-height: calc(90vh - 36px);
  }
  .map-editor-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .map-canvas svg {
    max-height: 42vh;
  }
  dialog:has(.map-editor) {
    padding: 18px;
  }
}
#ready-to-publish,
#working-drafts {
  margin-top: 22px;
}
@media (max-width: 900px) {
  .chat-focus #assistant-panel {
    height: 720px;
  }
  .chat-focus .inspector {
    max-height: none;
  }
}
.image-size-choice {
  border: 0;
  padding: 0;
  margin: 0 0 6px;
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}
.image-size-choice legend {
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 8px;
  padding: 0;
}
.image-size-choice label {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  font-weight: 500;
}
.image-size-choice input[type='radio'] {
  display: inline;
  width: auto;
  margin: 0;
  padding: 0;
  accent-color: var(--accent);
}
.image-details-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.draft-note {
  margin: 6px 0 0;
  font-size: 12px;
  color: #76531c;
  background: #f7edda;
  border-radius: 6px;
  padding: 6px 9px;
  display: inline-block;
}
.draft-reminder {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  margin: 0 0 12px;
  padding: 10px 14px;
  border-radius: 8px;
  background: #f7edda;
  color: #5d4214;
  font-size: 13px;
}
.draft-reminder button {
  font-size: 12px;
}
.find-form {
  display: flex;
  gap: 10px;
  align-items: flex-end;
}
.find-form label {
  flex: 1;
  margin-bottom: 0;
}
.find-page h3 {
  font-size: 14px;
  margin: 18px 0 8px;
}
.find-result {
  display: block;
  width: 100%;
  text-align: left;
  margin: 0 0 6px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.find-result:hover,
.find-result:focus-visible {
  border-color: var(--accent);
}
.find-result span {
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 2px;
}
.events-panel .event-card {
  margin-bottom: 18px;
}
.event-card-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.event-card-head h3 {
  margin: 0;
}
.event-image {
  margin: 4px 0 16px;
}
.event-image img {
  display: block;
  max-width: 220px;
  max-height: 260px;
  border-radius: 8px;
  margin-bottom: 10px;
}
.event-image-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.events-next {
  background: #f3eff8;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 14px;
  margin: 0 0 18px;
}
.event-link-note {
  background: #f3eff8;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 17px;
  font-size: 13px;
}
.event-link-note p {
  margin: 0 0 8px;
}
.event-link-note button {
  margin-right: 8px;
}
.event-link {
  margin-bottom: 14px;
}
