:root {
  --bg: #f1ece6;
  --card: #fbf8f6;
  --ink: #241a1c;
  --accent: #7a2e42;
  --accent-deep: #5f2033;
  --muted: #827572;
  --line: #e2d9d4;
  --tint: #f0e0e4;
  font-family: "Hanken Grotesk", sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
textarea,
select {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid #b68596;
  outline-offset: 3px;
}
button {
  color: inherit;
}
a {
  color: inherit;
  text-decoration: none;
}
[hidden] {
  display: none !important;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 210px;
  background: var(--card);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 32px 18px 20px;
  z-index: 5;
}
.wordmark {
  display: flex;
  gap: 11px;
  align-items: center;
  font-family: Fraunces, serif;
  font-size: 25px;
  line-height: 1;
}
.wordmark small {
  display: block;
  font-family: "Hanken Grotesk", sans-serif;
  font-size: 9px;
  letter-spacing: 5px;
  margin-top: 8px;
}
.brand-icon {
  width: 38px;
  height: 46px;
  font-size: 49px;
  color: var(--accent);
  position: relative;
}
.brand-icon span {
  font-family: serif;
  font-size: 24px;
  position: absolute;
  right: 0;
  bottom: 0;
}
.workspace-label {
  font-size: 9px;
  letter-spacing: 1.8px;
  color: var(--muted);
  margin: 54px 10px 18px;
}
.nav-item {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 12px;
  padding: 13px 12px;
  margin-bottom: 5px;
  border: 0;
  background: transparent;
  border-radius: 8px;
  font-size: 13px;
  text-align: left;
  color: #766865;
}
.nav-item span {
  font-size: 20px;
  width: 20px;
  text-align: center;
}
.nav-item.active {
  background: var(--tint);
  color: var(--accent);
  font-weight: 700;
}
.nav-item:hover {
  background: #f2ebe8;
}
.side-note {
  margin: auto 12px 38px;
  border-top: 1px solid var(--line);
  padding-top: 28px;
}
.tiny-star {
  font-size: 34px;
  color: var(--accent);
}
.side-note p {
  font-family: Fraunces, serif;
  font-size: 20px;
  line-height: 1.4;
  margin: 12px 0;
}
.side-note small {
  color: var(--muted);
  line-height: 1.7;
  font-size: 11px;
}
.help {
  margin: 0 0 18px;
}
.profile {
  display: flex;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
  align-items: center;
}
.avatar,
.ig-avatar {
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--accent);
  background: var(--tint);
  flex-shrink: 0;
  font-family: Fraunces, serif;
}
.avatar {
  width: 34px;
  height: 34px;
}
.profile strong {
  font-size: 12px;
  font-weight: 600;
}
.profile small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 3px;
}
main {
  margin-left: 210px;
  min-height: 100vh;
}
.topbar {
  height: 77px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 32px;
  gap: 20px;
}
.breadcrumb {
  font-size: 12px;
  color: var(--muted);
}
.breadcrumb span {
  padding: 0 12px;
  color: #bfb0a9;
}
.breadcrumb strong {
  color: var(--ink);
  font-weight: 500;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
#save-status {
  font-size: 11px;
  color: var(--muted);
  margin-right: 8px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 7px;
  min-height: 39px;
  padding: 10px 16px;
  font-size: 12px;
  font-weight: 600;
  transition:
    background 0.15s,
    transform 0.15s;
}
.button:hover {
  background: #eee4e0;
  transform: translateY(-1px);
}
.button.primary {
  background: var(--accent);
  color: #fbf8f6;
  border-color: var(--accent);
}
.button.primary:hover {
  background: var(--accent-deep);
}
.button.small {
  min-height: 34px;
  padding: 8px 13px;
  font-size: 11px;
}
.button.full {
  width: 100%;
  margin-top: 19px;
  justify-content: space-between;
  min-height: 43px;
}
#editor-view,
.secondary-view {
  padding: 0 30px 30px;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 33px 0 29px;
}
.eyebrow,
.section-kicker {
  color: var(--accent);
  font-size: 9px;
  letter-spacing: 1.7px;
  font-weight: 700;
}
h1 {
  font-family: Fraunces, serif;
  font-size: 32px;
  font-weight: 400;
  letter-spacing: -1px;
  line-height: 1.2;
  margin: 9px 0 9px;
}
h1 em {
  color: var(--accent);
  font-weight: 400;
}
p {
  line-height: 1.5;
}
.page-heading p {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}
h2 {
  font-family: Fraunces, serif;
  font-size: 17px;
  font-weight: 500;
  margin: 0;
}
.editor-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(320px, 1.5fr) minmax(
      210px,
      0.95fr
    );
  align-items: start;
  gap: 22px;
}
.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 21px 20px;
}
.panel-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
}
.step {
  font-size: 10px;
  color: #a6978f;
}
.tabs {
  display: flex;
  border-radius: 7px;
  background: #eee8e3;
  padding: 4px;
  margin-bottom: 23px;
}
.project-setup {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 14px;
  margin-bottom: 18px;
  background: #f7f1ee;
}
.project-setup .section-kicker {
  display: block;
  margin: 2px 0 8px;
}
.project-setup .section-kicker:not(:first-child) {
  margin-top: 14px;
}
.choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}
.choice-card {
  position: relative;
  margin: 0;
  padding: 10px 9px 9px 30px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--card);
  cursor: pointer;
}
.choice-card:has(input:checked) {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
  background: var(--tint);
}
.choice-card input {
  position: absolute;
  left: 9px;
  top: 12px;
  accent-color: var(--accent);
}
.choice-card strong,
.choice-card small {
  display: block;
}
.choice-card strong {
  font-size: 10px;
}
.choice-card small {
  font-size: 8px;
  color: var(--muted);
  margin-top: 3px;
}
.brand-before {
  width: 100%;
  margin-top: 13px;
  font-size: 10px;
}
.tabs button {
  flex: 1;
  border: 0;
  background: transparent;
  border-radius: 5px;
  padding: 9px 3px;
  font-size: 11px;
  color: var(--muted);
}
.tabs button.selected {
  background: var(--card);
  color: var(--accent);
  box-shadow: 0 1px 4px #241a1c0c;
  font-weight: 700;
}
label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  margin: 15px 0 7px;
}
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not(
    [type="color"]
  ),
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fefcfb;
  color: var(--ink);
  padding: 10px;
  font-size: 12px;
  line-height: 1.5;
}
textarea {
  resize: vertical;
  min-height: 55px;
}
textarea::placeholder,
input::placeholder {
  color: #a0938c;
  font-size: 11px;
}
select {
  padding-right: 4px;
}
.hint {
  font-size: 10px;
  color: var(--muted);
  margin: 8px 0;
  line-height: 1.65;
}
.optional {
  float: right;
  color: var(--muted);
  font-size: 9px;
  font-weight: 400;
}
.check {
  display: flex;
  align-items: center;
  font-size: 10px;
  font-weight: 400;
  line-height: 1.3;
  gap: 7px;
  margin-top: 16px;
}
.check input {
  accent-color: var(--accent);
}
.two-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.brand-shortcut {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--line);
  margin-top: 23px;
  padding-top: 22px;
}
.brand-shortcut .section-kicker {
  font-size: 8px;
  color: var(--muted);
  letter-spacing: 1.1px;
}
.brand-shortcut strong {
  display: block;
  font-size: 12px;
  margin: 9px 0;
}
.mini-palette {
  display: flex;
  gap: 5px;
}
.mini-palette i {
  display: block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid #241a1c16;
}
.icon-button {
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  background: var(--card);
  width: 31px;
  height: 31px;
  border-radius: 50%;
  font-size: 16px;
}
.tip {
  display: flex;
  gap: 11px;
  background: #f5eeea;
  padding: 13px;
  border-radius: 7px;
  margin-top: 25px;
}
.tip > span {
  color: var(--accent);
  font-size: 20px;
}
.tip p {
  font-size: 10px;
  color: var(--muted);
  margin: 0;
  line-height: 1.7;
}
.preview-area {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.preview-toolbar {
  display: flex;
  gap: 7px;
  width: 100%;
  max-width: 360px;
  align-items: center;
  font-size: 8px;
  letter-spacing: 1px;
  color: var(--muted);
  padding: 1px 0 15px;
}
.live-dot {
  background: var(--accent);
  width: 5px;
  height: 5px;
  border-radius: 50%;
}
.format-badge {
  margin-left: auto;
  font-size: 8px;
  letter-spacing: 0.3px;
  border: 1px solid var(--line);
  padding: 4px 7px;
  border-radius: 4px;
}
.instagram {
  width: 100%;
  max-width: 360px;
  background: var(--card);
  border: 1px solid #ded1c9;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 12px 30px #6049370a;
}
.ig-header {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px 15px;
}
.ig-avatar {
  width: 28px;
  height: 28px;
  font-size: 13px;
  overflow: hidden;
}
.ig-avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.ig-header strong {
  font-size: 10px;
  display: block;
}
.ig-header small {
  font-size: 8px;
  color: var(--muted);
  display: block;
  margin-top: 2px;
}
.ig-more {
  margin-left: auto;
  font-size: 11px;
  letter-spacing: 1px;
}
#viewport {
  width: 100%;
  aspect-ratio: 4/5;
  overflow: hidden;
  touch-action: pan-y;
  cursor: default;
  position: relative;
  transition: aspect-ratio 0.2s ease;
}
#safe-guide {
  position: absolute;
  pointer-events: none;
  border: 2px dotted rgba(122, 46, 66, 0.68);
  box-shadow: none;
  z-index: 2;
  color: var(--accent);
  text-shadow: none;
  font-size: 7px;
  letter-spacing: 1px;
}
#safe-guide span {
  position: absolute;
  top: -24px;
  left: -2px;
  padding: 4px 7px;
  border: 1px solid rgba(122, 46, 66, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  font-weight: 700;
  white-space: nowrap;
}
.safe-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0 4px 0 auto;
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--muted);
}
.safe-toggle input {
  accent-color: var(--accent);
}
.safe-toggle.number-toggle {
  margin-left: 0;
}
#slide-canvas {
  width: 100%;
  height: auto;
  display: block;
}
#track {
  width: 100%;
}
.ig-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 13px;
}
.social-icons {
  display: flex;
  gap: 11px;
  font-size: 22px;
  width: 86px;
}
.social-icons span:nth-child(3) {
  font-size: 17px;
  padding-top: 4px;
}
.bookmark {
  width: 86px;
  text-align: right;
  font-size: 22px;
}
.dots {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 140px;
}
.dot {
  width: 4px;
  height: 4px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #d9cfca;
}
.dot.active {
  background: var(--accent);
  width: 5px;
  height: 5px;
}
.ig-caption {
  font-size: 9px;
  line-height: 1.5;
  padding: 0 15px 12px;
  overflow-wrap: anywhere;
}
.ig-caption small {
  display: block;
  font-size: 7px;
  letter-spacing: 0.7px;
  color: var(--muted);
  margin-top: 7px;
}
.slide-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 15px 0;
  font-size: 10px;
  color: var(--muted);
}
.slide-nav .icon-button {
  width: 27px;
  height: 27px;
  font-size: 13px;
}
.export-panel {
  border-top: 1px solid var(--line);
  padding-top: 15px;
  width: 100%;
  max-width: 400px;
  text-align: center;
}
.export-panel strong {
  font-size: 11px;
  font-weight: 600;
}
.export-panel small {
  display: block;
  font-size: 9px;
  color: var(--muted);
  margin: 4px 0 10px;
}
.export-buttons {
  display: flex;
  gap: 8px;
  justify-content: center;
}
.export-buttons .button {
  font-size: 10px;
  padding: 9px 10px;
  min-height: 34px;
}
.properties {
  padding: 21px 17px;
}
.properties .panel-heading {
  margin-bottom: 18px;
}
.slide-indicator {
  display: flex;
  justify-content: space-between;
  font-size: 8px;
  letter-spacing: 1px;
  color: var(--accent);
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
}
.properties label {
  margin-top: 15px;
}
.properties textarea {
  font-size: 12px;
}
.range-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.range-label span {
  font-size: 9px;
  color: var(--muted);
  margin-top: 10px;
}
input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
  margin: 3px 0 13px;
  height: 5px;
}
.upload-button {
  display: block;
  padding: 12px 8px;
  text-align: center;
  border: 1px dashed #cdbcb6;
  border-radius: 6px;
  color: var(--accent);
  font-size: 10px;
  cursor: pointer;
  font-weight: 500;
}
.text-button {
  background: transparent;
  border: 0;
  color: var(--accent);
  font-size: 10px;
  padding: 7px 0;
}
.slide-tools {
  display: flex;
  gap: 8px;
  margin-top: 20px;
}
.slide-tools button {
  flex: 1;
}
details {
  border-top: 1px solid var(--line);
  margin-top: 20px;
  padding-top: 16px;
}
summary {
  font-size: 11px;
  cursor: pointer;
}
details textarea {
  margin-top: 12px;
}
.filmstrip-wrap {
  margin-top: 25px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.filmstrip-heading {
  display: flex;
  gap: 15px;
  align-items: center;
  margin-bottom: 12px;
}
.filmstrip-heading > span {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.5px;
}
.filmstrip-heading small {
  font-size: 10px;
  color: var(--muted);
}
.filmstrip-heading button {
  margin-left: auto;
}
.filmstrip {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 4px 3px 12px;
}
.thumb {
  flex: 0 0 100px;
  min-width: 0;
}
.thumb-select {
  padding: 4px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 5px;
  width: 100%;
  overflow: hidden;
}
.thumb.active .thumb-select {
  border: 2px solid var(--accent);
  padding: 3px;
}
.thumb canvas {
  width: 100%;
  display: block;
}
.thumb-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 9px;
  color: var(--muted);
  padding: 5px 2px;
}
.thumb-footer button {
  border: 0;
  background: transparent;
  font-size: 11px;
  color: var(--muted);
  padding: 0 4px;
}
.warning {
  background: var(--tint);
  padding: 10px;
  border-radius: 6px;
  color: var(--accent);
  font-size: 11px;
  margin-bottom: 10px;
  max-width: 400px;
}
.brand-grid {
  display: grid;
  grid-template-columns: minmax(300px, 470px) minmax(300px, 1fr);
  gap: 65px;
  max-width: 1100px;
}
.brand-form {
  padding: 28px;
}
.brand-form h2 {
  font-size: 24px;
  margin-bottom: 20px;
}
.brand-form label {
  font-size: 12px;
}
.color-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
  margin: 15px 0;
}
#image-controls {
  border-top: 1px solid var(--line);
  margin-top: 14px;
  padding-top: 3px;
}
#image-controls .two-cols {
  gap: 8px;
}
#image-controls input[type="range"] {
  margin-bottom: 5px;
}
.color-grid input {
  display: block;
  width: 100%;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--card);
  padding: 4px;
  margin: 8px 0;
}
.color-grid span {
  font-size: 10px;
  color: var(--muted);
}
.preset-row {
  border-top: 1px solid var(--line);
  padding-top: 20px;
  margin-top: 18px;
}
#presets {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}
#presets button {
  display: flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 20px;
  padding: 6px 8px;
  font-size: 9px;
}
#presets i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.brand-preview {
  text-align: center;
  padding-top: 15px;
}
.brand-preview canvas {
  display: block;
  width: min(100%, 340px);
  margin: 23px auto;
  border-radius: 8px;
  box-shadow: 0 15px 40px #241a1c12;
}
.brand-preview p {
  font-family: Fraunces, serif;
  font-size: 20px;
  color: var(--muted);
}
.library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 24px;
}
.admin-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.admin-metrics article,
.admin-panel {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.admin-metrics article {
  padding: 18px;
}
.admin-metrics span {
  display: block;
  color: var(--muted);
  font-size: 10px;
}
.admin-metrics strong {
  display: block;
  margin-top: 5px;
  color: var(--accent);
  font-family: Fraunces, serif;
  font-size: 24px;
}
.admin-layout {
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.admin-panel {
  min-width: 0;
  padding: 22px;
}
.admin-panel h2 {
  margin: 6px 0 18px;
  font-size: 22px;
}
.admin-panel label {
  display: block;
  margin-top: 12px;
}
.admin-panel-heading {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
}
.admin-panel-heading > span {
  color: var(--muted);
  font-size: 10px;
}
.admin-credentials {
  margin-top: 16px;
  padding: 14px;
  border-left: 3px solid var(--accent);
  background: var(--tint);
  border-radius: 0 9px 9px 0;
}
.admin-credentials code {
  display: block;
  margin: 8px 0 12px;
  white-space: pre-wrap;
  color: var(--ink);
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
}
.admin-table-wrap {
  overflow-x: auto;
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 10px;
}
.admin-table th {
  color: var(--muted);
  text-align: left;
  font-weight: 600;
}
.admin-table th,
.admin-table td {
  padding: 11px 8px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.admin-table td strong,
.admin-table td small {
  display: block;
}
.admin-table td small {
  color: var(--muted);
  margin-top: 3px;
}
.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 175px;
}
.admin-actions button {
  padding: 5px 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--accent);
  font-size: 9px;
}
.admin-status-pill {
  display: inline-block;
  padding: 4px 7px;
  border-radius: 20px;
  background: var(--tint);
  color: var(--accent);
}
.project-card {
  padding: 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  max-width: 350px;
}
.project-card canvas {
  width: 100%;
  display: block;
  border-radius: 6px;
}
.project-card h2 {
  font-size: 19px;
  margin: 16px 0 9px;
  overflow-wrap: anywhere;
}
.project-card p {
  font-size: 10px;
  color: var(--muted);
}
.project-card .card-actions {
  display: flex;
  gap: 8px;
}
.empty-state {
  padding: 45px;
  text-align: center;
  grid-column: 1/-1;
  color: var(--muted);
}
#toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent-deep);
  color: var(--card);
  padding: 14px 24px;
  border-radius: 9px;
  z-index: 100;
  font-size: 13px;
  box-shadow: 0 8px 25px #241a1c20;
  max-width: 90vw;
}
dialog {
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 16px;
  width: 540px;
  max-width: 92vw;
  padding: 38px;
}
dialog::backdrop {
  background: #241a1c35;
  backdrop-filter: blur(4px);
}
dialog h2 {
  font-size: 28px;
  margin: 20px 0;
}
dialog li {
  font-size: 13px;
  line-height: 1.65;
  padding: 7px 0;
}
dialog ol {
  padding-left: 20px;
}
.dialog-close {
  position: absolute;
  right: 14px;
  top: 14px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
@media (min-width: 1600px) {
  .editor-grid {
    grid-template-columns: 300px minmax(400px, 1fr) 285px;
    gap: 35px;
    max-width: 1450px;
    margin: auto;
  }
  .instagram,
  .preview-toolbar {
    max-width: 400px;
  }
  .page-heading h1 {
    font-size: 38px;
  }
  .panel {
    padding: 25px;
  }
  #editor-view,
  .secondary-view {
    padding-left: 42px;
    padding-right: 42px;
  }
}
@media (max-width: 1200px) {
  .sidebar {
    width: 175px;
    padding: 25px 12px;
  }
  .wordmark {
    font-size: 22px;
  }
  .workspace-label {
    font-size: 8px;
    letter-spacing: 1px;
  }
  .nav-item {
    font-size: 11px;
  }
  main {
    margin-left: 175px;
  }
  #editor-view,
  .secondary-view {
    padding: 0 20px 25px;
  }
  .editor-grid {
    gap: 14px;
    grid-template-columns: minmax(190px, 1fr) minmax(280px, 1.4fr) minmax(
        185px,
        0.95fr
      );
  }
  .panel {
    padding: 17px 13px;
  }
  .panel h2 {
    font-size: 15px;
  }
  h1 {
    font-size: 28px;
  }
  .topbar {
    padding: 0 20px;
  }
}
@media (max-width: 1020px) {
  .sidebar {
    width: 74px;
    padding: 22px 8px;
  }
  .wordmark {
    justify-content: center;
  }
  .wordmark > span:last-child,
  .workspace-label,
  .side-note,
  .profile {
    display: none;
  }
  .nav-item {
    font-size: 0;
    justify-content: center;
    padding: 13px 0;
  }
  .nav-item span {
    font-size: 23px;
  }
  .sidebar nav {
    margin-top: 45px;
  }
  .help {
    margin-top: auto;
  }
  .sidebar .help span {
    font-size: 17px;
  }
  main {
    margin-left: 74px;
  }
  .editor-grid {
    grid-template-columns: 220px minmax(280px, 1fr);
  }
  .properties {
    grid-column: 1;
    grid-row: 2;
  }
  .preview-area {
    grid-column: 2;
    grid-row: 1/3;
    position: sticky;
    top: 15px;
  }
  .creation {
    grid-column: 1;
  }
  .brand-grid {
    gap: 25px;
  }
  .topbar {
    padding: 0 20px;
  }
  #save-status {
    display: none;
  }
  .page-heading h1 {
    font-size: 26px;
  }
  .page-heading > .button {
    font-size: 10px;
  }
}
@media (max-width: 640px) {
  .sidebar {
    position: sticky;
    top: 0;
    width: 100%;
    height: 58px;
    flex-direction: row;
    padding: 7px 14px;
    justify-content: space-between;
    align-items: center;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .brand-icon {
    font-size: 34px;
    width: 30px;
    height: 34px;
  }
  .brand-icon span {
    font-size: 19px;
  }
  .sidebar nav {
    display: flex;
    margin: 0;
    gap: 8px;
  }
  .nav-item {
    width: 42px;
    height: 38px;
    margin: 0;
    padding: 6px;
  }
  .help {
    display: none;
  }
  main {
    margin: 0;
  }
  .topbar {
    height: 59px;
    padding: 0 15px;
  }
  .breadcrumb {
    font-size: 10px;
  }
  .breadcrumb > span {
    padding: 0 5px;
  }
  .top-actions {
    gap: 5px;
  }
  .top-actions .button {
    font-size: 9px;
    padding: 7px 8px;
  }
  .page-heading {
    padding: 25px 0 20px;
    align-items: flex-start;
  }
  .page-heading h1 {
    font-size: 27px;
    max-width: 260px;
  }
  .page-heading > .button {
    padding: 7px;
    font-size: 0;
    min-width: 30px;
  }
  .page-heading > .button::first-letter {
    font-size: 17px;
  }
  .page-heading p {
    font-size: 11px;
    max-width: 270px;
  }
  #editor-view,
  .secondary-view {
    padding: 0 16px 24px;
  }
  .editor-grid {
    display: flex;
    flex-direction: column;
    gap: 22px;
  }
  .panel {
    width: 100%;
    padding: 20px;
  }
  .preview-area {
    position: static;
    width: 100%;
    order: 1;
  }
  .creation {
    order: 0;
  }
  .properties {
    order: 2;
  }
  .instagram {
    max-width: 360px;
  }
  .filmstrip-heading small {
    display: none;
  }
  .filmstrip {
    gap: 8px;
  }
  .thumb {
    flex-basis: 80px;
  }
  .brand-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }
  .brand-form {
    padding: 22px;
  }
  .brand-preview {
    padding: 0;
  }
  .library-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .project-card {
    padding: 9px;
  }
  .project-card h2 {
    font-size: 16px;
  }
  .project-card .card-actions {
    flex-wrap: wrap;
  }
  .secondary-view .page-heading {
    flex-wrap: wrap;
  }
  .secondary-view .page-heading > .button {
    font-size: 11px;
  }
  .breadcrumb strong {
    font-size: 9px;
  }
  .color-grid {
    gap: 12px;
  }
}
.social-icons svg,
.bookmark svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.social-icons {
  align-items: center;
}
.bookmark {
  display: flex;
  justify-content: flex-end;
}

/* UI refresh — fundo branco, foco na criação e melhor uso da largura */
:root {
  --bg: #ffffff;
  --card: #ffffff;
  --surface: #f7f7f7;
  --ink: #241a1c;
  --accent: #7a2e42;
  --accent-deep: #5f2033;
  --muted: #766d70;
  --line: #e8e2e4;
  --tint: #f8ecef;
  background: var(--bg);
}

html,
body,
main {
  background: #ffffff;
}

body {
  color: var(--ink);
}

.sidebar {
  width: 196px;
  padding: 26px 16px 18px;
  background: #ffffff;
  border-right-color: var(--line);
}

.workspace-label {
  margin-top: 42px;
}

.nav-item {
  min-height: 44px;
  border-radius: 10px;
  color: #62595c;
}

.nav-item.active {
  background: var(--tint);
  box-shadow: inset 3px 0 0 var(--accent);
}

.nav-item:hover {
  background: #f7f4f5;
}

main {
  margin-left: 196px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 4;
  height: 64px;
  padding: 0 28px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
}

#save-status {
  background: var(--surface);
  border-radius: 999px;
  padding: 7px 11px;
  margin-right: 2px;
}

.button {
  min-height: 42px;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(36, 26, 28, 0.04);
}

.button:hover {
  background: #f8f5f6;
}

.button.primary {
  box-shadow: 0 7px 16px rgba(122, 46, 66, 0.18);
}

#editor-view,
.secondary-view {
  padding: 0 28px 40px;
}

.page-heading {
  max-width: 1380px;
  margin: 0 auto;
  padding: 24px 0 22px;
}

h1 {
  font-size: clamp(30px, 2.4vw, 38px);
  line-height: 1.1;
  margin: 7px 0 8px;
}

.page-heading p {
  font-size: 13px;
}

.editor-grid {
  grid-template-columns: minmax(280px, 320px) minmax(410px, 1fr) minmax(
      270px,
      300px
    );
  gap: 20px;
  max-width: 1380px;
  margin: 0 auto;
}

.panel {
  background: #ffffff;
  border-color: var(--line);
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 10px 32px rgba(36, 26, 28, 0.055);
}

.panel-heading {
  margin-bottom: 18px;
}

.panel-heading h2 {
  font-size: 19px;
}

.step {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--tint);
  color: var(--accent);
  font-weight: 700;
}

.project-setup {
  background: var(--surface);
  border-color: #e5dfe1;
  border-radius: 12px;
  padding: 16px;
}

.choice-grid {
  gap: 9px;
}

.choice-card {
  min-height: 68px;
  border-radius: 10px;
  background: #ffffff;
  padding: 12px 10px 11px 32px;
}

.choice-card strong {
  font-size: 12px;
}

.choice-card small {
  font-size: 9px;
  line-height: 1.35;
}

.choice-card input {
  top: 14px;
}

.tabs {
  background: var(--surface);
  border-radius: 11px;
  padding: 5px;
}

.tabs button {
  min-height: 40px;
  border-radius: 8px;
  font-size: 12px;
}

.tabs button.selected {
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(36, 26, 28, 0.07);
}

input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not(
    [type="color"]
  ),
textarea,
select {
  min-height: 44px;
  border-radius: 9px;
  background: #ffffff;
  font-size: 13px;
  padding: 11px 12px;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not(
    [type="color"]
  ):focus,
textarea:focus,
select:focus {
  border-color: rgba(122, 46, 66, 0.55);
  box-shadow: 0 0 0 3px rgba(122, 46, 66, 0.09);
  outline: none;
}

.choice-card input[type="radio"] {
  appearance: none;
  width: 17px;
  height: 17px;
  margin: 0;
  border: 1.5px solid #9c9295;
  border-radius: 50%;
  background: #ffffff;
}

.choice-card input[type="radio"]:checked {
  border: 5px solid var(--accent);
}

.tip {
  background: var(--surface);
  border: 1px solid var(--line);
}

.preview-area {
  position: sticky;
  top: 84px;
}

.instagram,
.preview-toolbar {
  max-width: 440px;
}

.preview-toolbar {
  min-height: 38px;
  padding: 0 2px 12px;
  font-size: 9px;
}

.format-badge {
  background: var(--surface);
  border: 0;
  border-radius: 999px;
  padding: 6px 9px;
}

.instagram {
  border-color: var(--line);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 18px 50px rgba(36, 26, 28, 0.09);
}

.ig-header {
  min-height: 58px;
  padding: 13px 16px;
  border-bottom: 1px solid #f1edef;
}

.ig-actions {
  padding: 11px 15px;
}

.properties {
  position: sticky;
  top: 84px;
  max-height: calc(100vh - 104px);
  overflow-y: auto;
  scrollbar-width: thin;
}

.filmstrip-wrap {
  max-width: 1380px;
  margin: 28px auto 0;
  padding: 20px 4px 0;
}

.thumb-select {
  background: #ffffff;
  border-radius: 8px;
}

.brand-form,
.project-card,
dialog {
  background: #ffffff;
}

@media (max-width: 1440px) {
  .side-note {
    display: none;
  }

  .help {
    margin-top: auto;
  }
}

@media (max-width: 1280px) {
  .sidebar {
    width: 78px;
    padding: 22px 9px;
  }

  .wordmark {
    justify-content: center;
  }

  .wordmark > span:last-child,
  .workspace-label,
  .side-note,
  .profile {
    display: none;
  }

  .sidebar nav {
    margin-top: 42px;
  }

  .nav-item {
    justify-content: center;
    padding: 12px 0;
    font-size: 0;
  }

  .nav-item span {
    font-size: 22px;
  }

  main {
    margin-left: 78px;
  }

  .editor-grid {
    grid-template-columns: minmax(270px, 310px) minmax(390px, 1fr);
    max-width: 980px;
    gap: 20px;
  }

  .creation {
    grid-column: 1;
    grid-row: 1;
  }

  .preview-area {
    grid-column: 2;
    grid-row: 1 / 3;
  }

  .properties {
    position: static;
    grid-column: 1;
    grid-row: 2;
    max-height: none;
    overflow: visible;
  }

  .instagram,
  .preview-toolbar {
    max-width: 420px;
  }
}

@media (max-width: 760px) {
  .admin-layout,.admin-metrics { grid-template-columns: minmax(0, 1fr); }
  .admin-table { min-width: 680px; }
  .admin-panel { padding: 16px; }
  .topbar {
    position: static;
  }

  .editor-grid {
    display: flex;
    flex-direction: column;
    max-width: none;
  }

  .preview-area,
  .properties {
    position: static;
  }

  .preview-area {
    order: 1;
  }

  .creation {
    order: 0;
  }

  .properties {
    order: 2;
  }
}

.color-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-top: 22px;
}

.color-heading small {
  color: var(--muted);
  font-size: 10px;
  text-align: right;
}

.color-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.brand-color-item {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.brand-color-item label {
  min-height: 30px;
  margin: 0;
  font-size: 11px;
}

.color-grid .brand-color-item input[type="color"] {
  height: 52px;
  margin: 8px 0 7px;
  border-radius: 9px;
  background: #ffffff;
}

.brand-color-item > span {
  display: block;
  min-width: 0;
  overflow: hidden;
  font-family: "IBM Plex Mono", monospace;
  font-size: 9px;
  text-overflow: ellipsis;
}

.color-order-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 9px;
}

.color-order-actions button {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--accent);
  font-size: 14px;
}

.color-order-actions button:hover:not(:disabled) {
  border-color: var(--accent);
  background: var(--tint);
}

.color-order-actions button:disabled {
  color: #b8b0b2;
  background: #f1f1f1;
}

.fixed-color > small {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 9px;
}

@media (max-width: 430px) {
  .color-heading {
    display: block;
  }

  .color-heading small {
    display: block;
    margin-top: 6px;
    text-align: left;
  }

  .color-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Inteligência Editorial */
.editorial-account {
  display: flex;
  align-items: center;
  gap: 8px;
}

.credit-balance {
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.editorial-status {
  min-height: 0;
  margin: 0;
  color: var(--accent);
  font-size: 11px;
}

.editorial-flow {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.editorial-flow.is-loading {
  opacity: 0.68;
  pointer-events: none;
}

.editorial-flow button:disabled {
  opacity: 0.5;
}

.editorial-step {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
}

.editorial-step-heading {
  display: flex;
  align-items: center;
  gap: 9px;
}

.editorial-step-heading .step {
  color: var(--accent);
  font-family: "IBM Plex Mono", monospace;
}

.editorial-step h3 {
  font-family: Fraunces, serif;
  font-size: 16px;
  font-weight: 500;
  margin: 0;
}

.editorial-step > p {
  color: var(--muted);
  font-size: 11px;
  margin: 7px 0 13px;
}

.editorial-angle {
  display: block;
  width: 100%;
  margin: 8px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #ffffff;
  text-align: left;
}

.editorial-angle:hover,
.editorial-angle:focus-visible {
  border-color: rgba(122, 46, 66, 0.55);
}

.editorial-angle.selected {
  border-color: var(--accent);
  background: var(--tint);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.editorial-angle strong,
.editorial-angle span {
  display: block;
}

.editorial-angle strong {
  font-size: 12px;
}

.editorial-angle span {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
  margin-top: 4px;
}

#editorial-plan {
  display: grid;
  gap: 8px;
  margin: 0 0 13px;
  padding: 0;
  list-style: none;
}

.editorial-plan-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 9px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
}

.editorial-plan-item > span:first-child {
  color: var(--accent);
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
}

.editorial-plan-item strong,
.editorial-plan-item small {
  display: block;
}

.editorial-plan-item strong {
  font-size: 11px;
}

.editorial-plan-item small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
  margin-top: 2px;
}

.plan-move {
  display: inline-grid;
  gap: 4px;
}

.plan-move button {
  width: 26px;
  min-height: 24px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--accent);
}

.clinical-warnings {
  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
  background: #f9f2f4;
  color: var(--ink);
  font-size: 11px;
  line-height: 1.5;
  padding: 11px 12px;
}

.clinical-warnings ul {
  margin: 0;
  padding-left: 17px;
}

.clinical-warnings strong {
  color: var(--accent);
}

.editorial-scores {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-top: 10px;
}

.editorial-score {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
  color: var(--muted);
  font-size: 9px;
}

.editorial-score strong {
  color: var(--ink);
  font-family: "IBM Plex Mono", monospace;
}

.account-dialog,
.credit-dialog {
  width: min(440px, calc(100vw - 32px));
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #ffffff;
  color: var(--ink);
}

.account-dialog::backdrop,
.credit-dialog::backdrop {
  background: rgba(122, 46, 66, 0.14);
}

.account-dialog h2,
.credit-dialog h2 {
  margin: 8px 0;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 18px;
}

.credit-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 18px 0 0;
}

.credit-summary div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
}

.credit-summary dt {
  color: var(--muted);
  font-size: 10px;
}

.credit-summary dd {
  margin: 4px 0 0;
  color: var(--accent);
  font-family: Fraunces, serif;
  font-size: 17px;
}

@media (max-width: 760px) {
  .editorial-account {
    width: 100%;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--line);
  }

  .top-actions {
    flex-wrap: wrap;
  }

  .editorial-step {
    padding: 14px;
  }
}

@media (max-width: 430px) {
  .credit-balance {
    font-size: 10px;
  }

  .dialog-actions,
  .credit-summary {
    grid-template-columns: 1fr;
  }

  .dialog-actions {
    display: grid;
  }
}

/* Editorial controls retain the existing light workspace and brand accent. */
.editorial-plan-item input, .editorial-plan-item textarea { width: 100%; min-width: 0; }
.editorial-actions, #cover-options { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.deep-review { display: flex; align-items: center; gap: 8px; margin: 16px 0; color: var(--accent); }
#source-list button, .clinical-warnings button { margin: 4px 8px; color: var(--accent); background: var(--card); border: 1px solid var(--line); border-radius: 6px; }
#composition-advice { padding-left: 20px; color: var(--accent); }

/* A inteligência editorial vive em uma página própria; o estúdio visual permanece intacto. */
.ai-page-grid {
  display: grid;
  grid-template-columns: minmax(300px, 390px) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.ai-brief-panel {
  position: sticky;
  top: 92px;
}

.ai-brief-panel #create-form {
  margin-top: 20px;
}

.ai-flow-panel {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.ai-flow-panel .editorial-flow {
  margin-top: 0;
}

.ai-flow-panel .editorial-step {
  padding: 22px;
  border-radius: 18px;
}

.ai-rewrite-step {
  border-color: rgba(122, 46, 66, 0.3);
}

@media (max-width: 980px) {
  .ai-page-grid {
    grid-template-columns: 1fr;
  }

  .ai-brief-panel {
    position: static;
  }
}

/* Login final do piloto: sem sessão, somente o acesso é visível. */
body.login-required { min-height: 100vh; background: #ffffff; }
body.login-required .sidebar, body.login-required main { display: none; }
body.login-required #account-dialog { position: fixed; inset: 50% auto auto 50%; transform: translate(-50%,-50%); margin: 0; }
body.login-required #account-dialog::backdrop { background: rgba(122,46,66,.12); }

/* Text tools share the ARTE palette and stay usable on narrow screens. */
.text-style-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 5px;
  margin: -8px 0 18px; padding: 6px; border: 1px solid rgba(36,26,28,.13);
  border-radius: 10px; background: #f1ece6; color: #241a1c;
}
.text-style-toolbar button {
  min-width: 34px; min-height: 34px; padding: 5px 8px;
  border: 1px solid rgba(36,26,28,.13); border-radius: 7px;
  background: #fbf8f6; color: #241a1c; font: inherit; font-size: 13px; cursor: pointer;
}
.text-style-toolbar button[aria-pressed="true"] { background: #7a2e42; color: #f1ece6; border-color: #7a2e42; }
.text-style-toolbar .text-color-label { display: flex; align-items: center; gap: 4px; margin: 0; font-size: 12px; }
.text-style-toolbar input[type="color"] { width: 30px; height: 32px; padding: 2px; margin: 0; border: 0; background: #fbf8f6; cursor: pointer; }
.text-style-toolbar :focus-visible { outline: 2px solid #7a2e42; outline-offset: 2px; }

/* Navegação da prévia mantém o cursor comum solicitado. */
#prev, #next { cursor: default; }

/* Guia não modal: os campos reais continuam disponíveis para praticar. */
.tutorial-panel {
  position: fixed; z-index: 80; bottom: 18px; right: 24px;
  width: min(460px, calc(100vw - 32px)); padding: 20px;
  border: 1px solid #7a2e42; border-radius: 20px;
  background: #fbf8f6; color: #241a1c;
  box-shadow: 0 8px 32px rgba(122,46,66,.15);
}
.tutorial-top, .tutorial-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tutorial-top .eyebrow { font-size: 10px; }
.tutorial-panel h2 { font: 500 25px/1.15 Fraunces, serif; margin: 12px 0; }
.tutorial-panel p { font-size: 15px; line-height: 1.5; margin: 0 0 18px; }
.tutorial-actions .button { min-height: 42px; }
.tutorial-active { padding-bottom: 360px; }
.tutorial-target { outline: 3px solid #7a2e42; outline-offset: 5px; scroll-margin-top: 110px; }
@media (max-width: 600px) {
  .tutorial-panel { right: 16px; bottom: 12px; padding: 16px; }
  .tutorial-panel h2 { font-size: 22px; }
  .tutorial-panel p { font-size: 14px; }
  #start-tutorial { font-size: 10px; padding: 7px 9px; }
}
