/* Candlelit Keepsake Advent Maker — De-SaaS Atelier Chest + Desk Folio Rail */

.ac-app {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  min-width: 0;
}

/* TOP ATELIER FINISH BAR */
.ac-finish-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  max-width: 100%;
}

.ac-finish-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.ac-mobile-jump {
  display: none;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 3px;
  border: 1px solid rgba(217, 164, 65, 0.45);
  background: rgba(184, 50, 50, 0.24);
  color: #fdf6e6;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
}

.ac-mobile-jump:hover {
  border-color: #d9a441;
  background: rgba(184, 50, 50, 0.4);
}

.ac-finish-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.ac-swatch-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
}

.ac-swatch {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 11px;
  border-radius: 3px;
  border: 1px solid rgba(217, 164, 65, 0.24);
  background: rgba(14, 33, 26, 0.58);
  color: #dfe8e2;
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 150ms ease, background-color 150ms ease, color 150ms ease;
}

.ac-swatch:hover {
  border-color: rgba(217, 164, 65, 0.56);
}

.ac-swatch.is-active {
  background: rgba(217, 164, 65, 0.14);
  border-color: #d9a441;
  color: #fff7e6;
  box-shadow: inset 0 -2px 0 #d9a441;
}

.ac-swatch-dot {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  flex-shrink: 0;
}

.dot-pine { background: #1c4a38; box-shadow: inset 0 0 0 2px #b83232; }
.dot-linen { background: #e8dec8; box-shadow: inset 0 0 0 2px #9a6b1f; }
.dot-frost { background: #142842; box-shadow: inset 0 0 0 2px #8eb8dc; }
.dot-ginger { background: #7e4726; box-shadow: inset 0 0 0 2px #f2c683; }

.ac-banner {
  padding: 11px 16px;
  border-radius: 3px;
  background: rgba(217, 164, 65, 0.12);
  border: 1px solid rgba(217, 164, 65, 0.45);
  color: #fdf6e6;
  font-size: 13.5px;
  font-weight: 500;
}

.ac-banner.is-warn {
  background: rgba(184, 50, 50, 0.24);
  border-color: rgba(235, 110, 110, 0.55);
}

/* C-POSITION ASYMMETRIC STAGE */
.ac-stage-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.82fr) minmax(320px, 0.98fr);
  gap: 24px;
  align-items: start;
}

/* KEEPSAKE CHEST BOARD + 4 DIFFERENTIATED FINISHES */
.ac-board-wrap {
  position: relative;
  scroll-margin-top: 72px;
  border-radius: 6px;
  padding: 24px;
  background: var(--b-surface);
  border: var(--b-border);
  color: var(--b-ink);
  box-shadow:
    inset 0 0 0 1px rgba(245, 224, 178, 0.12),
    inset 0 18px 36px rgba(0, 0, 0, 0.22),
    0 26px 60px rgba(2, 9, 7, 0.5);
  transition: background 240ms ease, border-color 240ms ease, color 240ms ease;
}

.ac-board-wrap.theme-pine-wax {
  --b-surface: linear-gradient(155deg, #17362b 0%, #10261e 100%);
  --b-border: 2px solid rgba(217, 164, 65, 0.48);
  --b-ink: #f7f0e0;
  --b-muted: #b7cabe;
  --b-divider: rgba(217, 164, 65, 0.24);
  --b-eyebrow: #e0b052;
  --b-door-bg: linear-gradient(160deg, #214a3b, #173429);
  --b-door-border: 1px solid rgba(217, 164, 65, 0.36);
  --b-door-ink: #f7f0e0;
  --b-inside-bg: #f6edda;
  --b-inside-border: #d4b882;
  --b-inside-ink: #1e2923;
  --b-seal: radial-gradient(circle at 35% 30%, #d44343, #961e1e 72%, #6e1212);
}

.ac-board-wrap.theme-nordic-linen {
  --b-surface: linear-gradient(165deg, #f6f0e3 0%, #ebe1cc 100%);
  --b-border: 2px solid #c9b58e;
  --b-ink: #202922;
  --b-muted: #5a594d;
  --b-divider: #d6c8ad;
  --b-eyebrow: #9a6b1f;
  --b-door-bg: linear-gradient(165deg, #fffcf6, #efe5d1);
  --b-door-border: 1.5px solid #c5ad7f;
  --b-door-ink: #24332a;
  --b-inside-bg: #ffffff;
  --b-inside-border: #c5ad7f;
  --b-inside-ink: #1e2822;
  --b-seal: radial-gradient(circle at 35% 30%, #c83a3a, #8d1d1d 74%, #6a1313);
}

.ac-board-wrap.theme-midnight-frost {
  --b-surface: radial-gradient(circle at 82% 12%, rgba(126, 179, 224, 0.22), transparent 45%),
               linear-gradient(160deg, #102138 0%, #0b1627 100%);
  --b-border: 2px solid rgba(154, 198, 232, 0.4);
  --b-ink: #eef5fc;
  --b-muted: #9eb7cf;
  --b-divider: rgba(154, 198, 232, 0.22);
  --b-eyebrow: #a9d2f2;
  --b-door-bg: linear-gradient(160deg, #1b3454, #13253e);
  --b-door-border: 1px solid rgba(156, 202, 238, 0.34);
  --b-door-ink: #eef5fc;
  --b-inside-bg: #eff5fb;
  --b-inside-border: #9cb9d4;
  --b-inside-ink: #102238;
  --b-seal: radial-gradient(circle at 35% 30%, #4b7eb3, #244a75 74%, #153152);
}

.ac-board-wrap.theme-gingerbread {
  --b-surface: linear-gradient(155deg, #6b3b20 0%, #4d2814 100%);
  --b-border: 2px solid #e2b174;
  --b-ink: #fff4e4;
  --b-muted: #e6c6a2;
  --b-divider: rgba(242, 198, 131, 0.28);
  --b-eyebrow: #f3c678;
  --b-door-bg: linear-gradient(160deg, #8b4e2b, #6f3b1e);
  --b-door-border: 1.5px dashed rgba(255, 240, 214, 0.56);
  --b-door-ink: #fff6e8;
  --b-inside-bg: #fff7eb;
  --b-inside-border: #d9a462;
  --b-inside-ink: #3b2010;
  --b-seal: radial-gradient(circle at 35% 30%, #c84a2c, #8e2812 74%, #641a0a);
}

.ac-orn {
  position: absolute;
  width: 20px;
  height: 20px;
  border-color: rgba(217, 164, 65, 0.7);
  border-style: solid;
  pointer-events: none;
}
.ac-orn-tl { top: 9px; left: 9px; border-width: 2px 0 0 2px; }
.ac-orn-tr { top: 9px; right: 9px; border-width: 2px 2px 0 0; }
.ac-orn-bl { bottom: 9px; left: 9px; border-width: 0 0 2px 2px; }
.ac-orn-br { bottom: 9px; right: 9px; border-width: 0 2px 2px 0; }

.ac-board-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--b-divider);
}

.ac-board-meta {
  flex: 1 1 300px;
  min-width: 0;
}

.ac-board-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--b-eyebrow);
  margin-bottom: 5px;
}

.ac-board-badge::before {
  content: "\2726  ";
}

.ac-board-title {
  font-family: var(--font-display);
  font-size: clamp(24px, 2.6vw, 32px);
  font-weight: 600;
  line-height: 1.12;
  color: var(--b-ink);
  margin: 0 0 4px;
}

.ac-board-sub {
  margin: 0;
  font-size: 13.5px;
  color: var(--b-muted);
}

.ac-board-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.ac-link-action {
  border: 0;
  background: transparent;
  padding: 5px 2px;
  border-bottom: 1px solid rgba(217, 164, 65, 0.38);
  color: var(--b-ink, #f4ecd9);
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  opacity: 0.88;
}

.ac-link-action:hover {
  opacity: 1;
  border-bottom-color: #d9a441;
}

.ac-link-danger {
  color: #e5938e;
  border-bottom-color: rgba(229, 147, 142, 0.45);
}

.ac-wax-mini {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 14px;
  border-radius: 3px;
  border: 0;
  background: linear-gradient(180deg, #bf3636, #982222);
  box-shadow: inset 0 0 0 1px rgba(246, 217, 152, 0.45), 0 4px 12px rgba(0, 0, 0, 0.25);
  color: #fdf6e6;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
}

.ac-wax-mini:hover {
  filter: brightness(1.07);
}

/* 3D HINGED KEEPSAKE DOOR GRID */
.ac-door-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
  perspective: 1100px;
}

.ac-door-grid.is-24 {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 9px;
}

.ac-door {
  position: relative;
  aspect-ratio: 1 / 0.96;
  min-height: 118px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
  perspective: 900px;
}

.ac-door-grid.is-24 .ac-door {
  min-height: 94px;
}

.ac-door-under {
  position: absolute;
  inset: 0;
  border-radius: 4px;
  padding: 11px 10px;
  background-color: var(--b-inside-bg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='90' height='90'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='90' height='90' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  border: 1px solid var(--b-inside-border);
  color: var(--b-inside-ink);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.14);
}

.ac-door-under-day {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.65;
}

.ac-door-under-snippet {
  font-size: 12px;
  line-height: 1.35;
  font-weight: 500;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ac-door-grid.is-24 .ac-door-under-snippet {
  font-size: 11px;
  -webkit-line-clamp: 2;
}

.ac-door-under-from {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 14px;
  font-weight: 700;
  color: #9e2626;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ac-door-cover {
  position: absolute;
  inset: 0;
  border-radius: 4px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: var(--b-door-bg);
  border: var(--b-door-border);
  color: var(--b-door-ink);
  box-shadow: 0 6px 16px rgba(4, 12, 9, 0.34);
  transform-origin: left center;
  transition: transform 520ms cubic-bezier(0.22, 1, 0.36, 1), opacity 320ms ease, box-shadow 200ms ease;
  backface-visibility: hidden;
  overflow: hidden;
}

.ac-door-cover::before {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 2px;
  border: 1px solid rgba(217, 164, 65, 0.34);
  pointer-events: none;
}

.ac-door:hover .ac-door-cover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(4, 12, 9, 0.46);
}

.ac-door.is-opened .ac-door-cover {
  transform: rotateY(-108deg);
  opacity: 0.14;
  pointer-events: none;
}

.ac-door.is-empty .ac-door-cover {
  opacity: 0.72;
  border-style: dashed;
}

.ac-door-date {
  position: relative;
  z-index: 2;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.78;
}

.ac-door.is-milestone .ac-door-date::after {
  content: " \2726";
  color: #e4b659;
}

.ac-door-num {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--b-seal);
  color: #fdf6e6;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  box-shadow: inset 0 0 0 2px rgba(247, 214, 148, 0.44), 0 4px 10px rgba(0, 0, 0, 0.32);
}

.ac-door-grid.is-24 .ac-door-num {
  width: 34px;
  height: 34px;
  font-size: 17px;
}

.ac-door.is-empty .ac-door-num {
  background: rgba(217, 164, 65, 0.2);
  color: var(--b-door-ink);
  box-shadow: none;
}

.ac-door-meta {
  position: relative;
  z-index: 2;
  font-size: 10.5px;
  font-weight: 500;
  opacity: 0.85;
  text-align: center;
}

.ac-board-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--b-divider);
  font-size: 12.5px;
  color: var(--b-muted);
}

.ac-code-tag {
  font-family: var(--font-mono);
  font-size: 11.5px;
  padding: 3px 9px;
  border-radius: 2px;
  border: 1px solid var(--b-divider);
  color: var(--b-eyebrow);
}

/* RIGHT: DE-SAAS DESK FOLIO RAIL */
.ac-rail {
  scroll-margin-top: 72px;
  border-radius: 6px;
  padding: 20px 22px 24px;
  background: linear-gradient(180deg, rgba(22, 46, 37, 0.94), rgba(16, 36, 29, 0.96));
  border: 1px solid rgba(217, 164, 65, 0.34);
  box-shadow:
    inset 0 0 0 1px rgba(245, 224, 178, 0.08),
    0 24px 54px rgba(3, 9, 7, 0.48);
  color: var(--ink-primary);
}

.ac-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  border-bottom: 1px solid rgba(217, 164, 65, 0.24);
  margin-bottom: 16px;
}

.ac-tab {
  border: 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  background: transparent;
  color: var(--ink-muted);
  padding: 5px 2px 10px;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: color 150ms ease, border-color 150ms ease;
}

.ac-tab:hover {
  color: #fff6e3;
}

.ac-tab.is-active {
  color: #fff6e3;
  border-bottom-color: #d9a441;
}

.ac-form {
  display: grid;
  gap: 12px;
}

.ac-muted {
  color: var(--ink-muted);
  font-size: 13.5px;
  line-height: 1.52;
  margin: 0;
}

.ac-hint {
  color: var(--ink-muted);
  font-size: 12.5px;
  margin: 6px 0 0;
}

.ac-field {
  display: grid;
  gap: 5px;
}

.ac-row-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.ac-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #c8b68c;
  margin: 0;
}

.ac-input {
  width: 100%;
  padding: 9px 10px;
  border-radius: 2px;
  border: 0;
  border-bottom: 1px solid rgba(217, 164, 65, 0.36);
  background-color: rgba(7, 18, 14, 0.4);
  color: var(--ink-primary);
  font-size: 14px;
}

.ac-input-serif {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  padding-top: 6px;
  padding-bottom: 6px;
}

.ac-input:focus {
  border-bottom-color: #d9a441;
  background-color: rgba(7, 18, 14, 0.62);
}

.ac-check {
  display: inline-flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12.5px;
  color: var(--ink-muted);
  cursor: pointer;
}

.ac-check strong {
  color: var(--ink-primary);
}

.ac-check input {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: #b83232;
}

.ac-check-inline {
  align-items: center;
  color: var(--b-muted);
  font-size: 12px;
}

.ac-check-align {
  display: flex;
  align-items: flex-end;
  padding-bottom: 8px;
}

.ac-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 14px;
  border-radius: 3px;
  border: 1px solid rgba(217, 164, 65, 0.36);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink-primary);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease, filter 150ms ease;
}

.ac-btn:hover {
  border-color: #d9a441;
  background: rgba(217, 164, 65, 0.12);
}

.ac-btn-primary {
  border: 0;
  background: linear-gradient(180deg, #bf3636, #982222);
  box-shadow: inset 0 0 0 1px rgba(246, 217, 152, 0.45), 0 8px 20px rgba(0, 0, 0, 0.28);
  color: #fdf6e6;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 11px 16px;
}

.ac-btn-primary:hover {
  filter: brightness(1.07);
  background: linear-gradient(180deg, #c93b3b, #a12525);
}

.ac-btn-sm {
  padding: 7px 11px;
  font-size: 12.5px;
  font-family: var(--font-body);
}

.ac-btn-full {
  width: 100%;
}

.ac-copy-row {
  display: flex;
  gap: 8px;
}

.ac-copy-row .ac-input {
  flex: 1 1 auto;
  min-width: 0;
}

.ac-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ac-divider {
  height: 1px;
  background: rgba(217, 164, 65, 0.22);
  margin: 14px 0;
}

.ac-code-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  margin-bottom: 12px;
  border-radius: 3px;
  background: rgba(7, 18, 14, 0.56);
  border: 1px solid rgba(217, 164, 65, 0.36);
}

.ac-code-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #c8b68c;
}

.ac-code-val {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 0.06em;
  color: #fff6e3;
}

.ac-story-mini-box {
  display: grid;
  grid-template-columns: 106px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-top: 12px;
  padding: 10px;
  border-radius: 3px;
  background: rgba(7, 18, 14, 0.42);
  border: 1px solid rgba(217, 164, 65, 0.24);
}

.ac-story-mini-canvas {
  display: block;
  width: 106px;
  height: auto;
  border-radius: 6px;
  border: 1px solid rgba(217, 164, 65, 0.35);
}

.ac-story-mini-actions {
  display: grid;
  gap: 8px;
}

.ac-story-center {
  display: flex;
  justify-content: center;
}

.ac-story-preview-canvas {
  display: block;
  width: 204px;
  height: auto;
  border-radius: 12px;
  border: 1px solid rgba(217, 164, 65, 0.4);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.4);
}

.ac-vault-box {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed rgba(217, 164, 65, 0.24);
}

.ac-saved-wrap {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(217, 164, 65, 0.22);
}

.ac-saved-items {
  display: grid;
  gap: 7px;
  margin-top: 8px;
}

.ac-saved-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 3px;
  background: rgba(7, 18, 14, 0.42);
  border: 1px solid rgba(217, 164, 65, 0.2);
  font-size: 13px;
}

.ac-card-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ac-count-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  color: #e0b052;
}

.ac-mini-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.ac-mini-door {
  padding: 7px 4px;
  border-radius: 3px;
  border: 1px solid rgba(217, 164, 65, 0.24);
  background: rgba(7, 18, 14, 0.42);
  color: var(--ink-primary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}

.ac-mini-door.is-filled {
  border-color: #d9a441;
  background: rgba(217, 164, 65, 0.14);
}

.ac-mini-door.is-selected {
  background: #b83232;
  border-color: #f0c97a;
  color: #fff8ee;
}

.ac-editor-box {
  display: grid;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(217, 164, 65, 0.22);
}

.ac-editor-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: #fff6e3;
}

.ac-icon-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ac-icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 3px;
  border: 1px solid rgba(217, 164, 65, 0.26);
  background: rgba(7, 18, 14, 0.42);
  font-size: 17px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ac-icon-btn.is-active {
  border-color: #d9a441;
  background: rgba(184, 50, 50, 0.34);
}

.ac-share-result {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 3px;
  background: rgba(217, 164, 65, 0.08);
  border: 1px solid #d9a441;
}

/* REVEAL PARCHMENT POSTCARD MODAL */
.ac-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(8, 16, 13, 0.76);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.ac-modal-card {
  width: 100%;
  max-width: 500px;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: #f6eedc;
  color: #1e2621;
  border: 2px solid #c9983a;
  border-radius: 6px;
  padding: 28px;
  box-shadow: 0 32px 72px rgba(0, 0, 0, 0.48);
}

.ac-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.ac-modal-day {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 2px;
  background: #b83232;
  color: #fdf6e6;
}

.ac-modal-close-btn {
  padding: 6px 12px;
  border-radius: 3px;
  border: 1px solid rgba(30, 38, 33, 0.24);
  background: rgba(30, 38, 33, 0.05);
  color: #1e2621;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

.ac-modal-close-btn:hover {
  background: rgba(30, 38, 33, 0.12);
}

.ac-modal-seal-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.ac-modal-stamp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #d44343, #961e1e 72%, #6e1212);
  color: #fdf6e6;
  font-size: 22px;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 2px rgba(247, 214, 148, 0.45), 0 4px 12px rgba(0, 0, 0, 0.2);
}

.ac-modal-title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  line-height: 1.15;
  color: #1e2621;
  margin: 0;
}

.ac-modal-sub {
  margin: 0 0 14px;
  font-size: 14px;
  color: #525d56;
}

.ac-modal-note {
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1.5;
  color: #1e2621;
  margin: 0 0 16px;
  white-space: pre-wrap;
  word-break: break-word;
}

.ac-modal-gift {
  padding: 11px 14px;
  border-radius: 4px;
  background: #ede2ca;
  border: 1.5px dashed #b8872c;
  color: #1e2621;
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 16px;
}

.ac-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid #d6c8ad;
}

.ac-modal-author {
  margin: 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 17px;
  font-weight: 700;
  color: #46534b;
}

.ac-modal-label {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #525d56;
}

.ac-modal-select {
  width: 100%;
  padding: 9px 10px;
  border-radius: 3px;
  border: 1px solid #c9b58e;
  background: #ffffff;
  color: #1e2621;
  font-size: 14px;
  margin-bottom: 14px;
}

@media (max-width: 1020px) {
  .ac-stage-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }
  .ac-finish-top {
    width: 100%;
  }
  .ac-mobile-jump {
    display: inline-flex;
  }
  .ac-swatch-row {
    flex-wrap: wrap;
  }
}

@media (max-width: 640px) {
  .ac-app {
    gap: 12px;
  }
  .ac-finish-bar {
    gap: 8px;
  }
  .ac-swatch-row {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
    gap: 7px;
  }
  .ac-swatch-row::-webkit-scrollbar {
    display: none;
  }
  .ac-swatch {
    min-height: 38px;
    padding: 6px 11px;
    font-size: 12.5px;
    flex-shrink: 0;
  }
  .ac-row-2 {
    grid-template-columns: minmax(0, 1fr);
  }
  .ac-board-wrap {
    padding: 16px 12px 18px;
    scroll-margin-top: 66px;
  }
  .ac-orn {
    width: 12px;
    height: 12px;
  }
  .ac-orn-tl { top: 5px; left: 5px; }
  .ac-orn-tr { top: 5px; right: 5px; }
  .ac-orn-bl { bottom: 5px; left: 5px; }
  .ac-orn-br { bottom: 5px; right: 5px; }
  .ac-board-header {
    gap: 10px;
    margin-bottom: 12px;
    padding-bottom: 12px;
  }
  .ac-board-meta {
    flex: 1 1 100%;
  }
  .ac-board-badge {
    font-size: 10px;
    letter-spacing: 0.1em;
    margin-bottom: 4px;
  }
  .ac-board-title {
    font-size: 23px;
  }
  .ac-board-sub {
    font-size: 13px;
  }
  .ac-board-controls {
    width: 100%;
    justify-content: space-between;
    gap: 8px 10px;
  }
  .ac-link-action {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    padding: 4px 2px;
  }
  .ac-wax-mini {
    min-height: 38px;
    padding: 7px 13px;
    font-size: 12.5px;
  }
  .ac-door-grid,
  .ac-door-grid.is-24 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
  .ac-door {
    aspect-ratio: 1 / 1.04;
    min-height: 104px;
  }
  .ac-door-grid.is-24 .ac-door {
    min-height: 98px;
  }
  .ac-door-cover {
    padding: 8px 6px;
    gap: 4px;
  }
  .ac-door-cover::before {
    inset: 4px;
  }
  .ac-door-date {
    font-size: 9px;
  }
  .ac-door-num {
    width: 38px;
    height: 38px;
    font-size: 19px;
  }
  .ac-door-grid.is-24 .ac-door-num {
    width: 34px;
    height: 34px;
    font-size: 17px;
  }
  .ac-door-meta {
    font-size: 10px;
  }
  .ac-door-under {
    padding: 9px 8px;
  }
  .ac-door-under-snippet {
    font-size: 11.5px;
    line-height: 1.3;
    -webkit-line-clamp: 3;
  }
  .ac-door-under-from {
    font-size: 13px;
  }
  .ac-board-foot {
    margin-top: 12px;
    padding-top: 10px;
    gap: 8px;
    font-size: 12px;
  }
  .ac-rail {
    padding: 16px 14px 20px;
    scroll-margin-top: 66px;
  }
  .ac-tabs {
    gap: 2px;
    margin-bottom: 14px;
  }
  .ac-tab {
    min-height: 44px;
    padding: 8px 2px 10px;
    font-size: 14.5px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .ac-input,
  .ac-modal-select {
    font-size: 16px;
    padding: 10px 11px;
  }
  .ac-input-serif {
    font-size: 19px;
    padding-top: 8px;
    padding-bottom: 8px;
  }
  .ac-check input {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
  }
  .ac-btn {
    min-height: 44px;
    padding: 10px 14px;
  }
  .ac-btn-primary {
    min-height: 48px;
    font-size: 17.5px;
    padding: 11px 14px;
    white-space: normal;
    text-align: center;
    line-height: 1.2;
  }
  .ac-btn-sm {
    min-height: 42px;
    padding: 8px 12px;
  }
  .ac-actions-row > .ac-btn {
    flex: 1 1 135px;
  }
  .ac-mini-door {
    min-height: 48px;
    padding: 7px 4px;
  }
  .ac-icon-btn {
    width: 40px;
    height: 40px;
    font-size: 19px;
  }
  .ac-story-mini-box {
    grid-template-columns: minmax(0, 1fr);
  }
  .ac-story-mini-canvas {
    margin: 0 auto;
  }
  .ac-modal-backdrop {
    padding: 14px;
  }
  .ac-modal-card {
    padding: 20px 18px;
  }
  .ac-modal-close-btn {
    min-height: 38px;
    padding: 7px 14px;
  }
  .ac-modal-title {
    font-size: 22px;
  }
  .ac-modal-note {
    font-size: 19px;
    line-height: 1.45;
  }
  .ac-modal-footer .ac-wax-mini {
    min-height: 42px;
    padding: 8px 16px;
  }
}

@media (max-width: 390px) {
  .ac-tab {
    font-size: 13.5px;
  }
  .ac-prompt-bar .ac-copy-row {
    flex-wrap: wrap;
  }
  .ac-prompt-bar .ac-copy-row .ac-btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ac-door-cover {
    transition: none !important;
  }
}
