.ac-layout {
  display: grid;
  grid-template-columns: 1.38fr 0.92fr;
  gap: 28px;
  align-items: start;
}

.ac-stage-col { position: relative; min-width: 0; }
.ac-board-carousel {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ac-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 253, 248, 0.95);
  color: #102920;
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}
.ac-arrow:hover { background: #ffffff; transform: translateY(-50%) scale(1.06); }
.ac-arrow-prev { left: -12px; }
.ac-arrow-next { right: -12px; }

/* Unified Consistent Board Frame Across All 5 Themes */
.ac-board-wrap {
  width: 100%;
  border-radius: 20px;
  padding: 14px;
  background: linear-gradient(145deg, #623922 0%, #3d2113 100%);
  border: 3px solid #9c6a43;
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  position: relative;
  overflow: hidden;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.ac-board-wrap[data-theme="candycane"] {
  background: repeating-linear-gradient(135deg, #c93346 0 14px, #fff8ee 14px 28px);
  border-color: #f6cd63;
}
.ac-board-wrap.is-scene {
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  border: 3px solid #e0aa3e;
  padding: 14px;
}

.ac-board-head {
  position: relative;
  z-index: 4;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 2px 12px;
  color: #fffaf0;
}
.ac-board-title {
  margin: 0;
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 19px;
  color: #fffaf0;
  background: rgba(11, 28, 22, 0.8);
  padding: 5px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(4px);
  line-height: 1.25;
}
.ac-board-badge {
  font-size: 12px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(11, 28, 22, 0.84);
  color: #f6cd63;
  border: 1px solid rgba(246, 205, 99, 0.55);
  backdrop-filter: blur(4px);
  white-space: nowrap;
}

/* Unified Gift-Box Grid for ALL 5 Themes */
.ac-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 13px 10px;
  padding: 20px 14px 14px;
  border-radius: 13px;
  background-color: #6c1f2d;
  background-image:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.03) 0 1px, transparent 1px 14px),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.03) 0 1px, transparent 1px 14px);
  box-shadow: inset 0 4px 14px rgba(0, 0, 0, 0.35);
  transition: background-color 0.25s ease;
}
.ac-grid[data-cols="5"] {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.ac-board-wrap[data-theme="candycane"] .ac-grid {
  background-color: #16402e;
}
.ac-board-wrap.is-scene .ac-board-head {
  padding-bottom: 84px;
}
.ac-board-wrap.is-scene .ac-grid {
  background-color: rgba(14, 24, 40, 0.42);
  background-image: none;
  backdrop-filter: blur(1.5px);
  border: 1px solid rgba(255, 255, 255, 0.24);
  padding: 18px 12px 12px;
}
.ac-board-wrap[data-theme="gingerbread"].is-scene .ac-grid {
  background-color: rgba(74, 34, 14, 0.38);
}
.ac-board-wrap[data-theme="midnight"].is-scene .ac-grid {
  background-color: rgba(8, 28, 34, 0.42);
}

/* Tactile Wrapped Gift Box Doors */
.ac-door {
  position: relative;
  aspect-ratio: 1 / 1.04;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 9px;
  padding: 0;
  cursor: pointer;
  overflow: visible;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #102920;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.36), inset 0 2px 0 rgba(255, 255, 255, 0.26);
  -webkit-tap-highlight-color: transparent;
}
.ac-door:hover {
  transform: translateY(-4px) scale(1.04);
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.44);
  border-color: #f6cd63;
  z-index: 4;
}
.ac-door[data-wrap="0"] {
  background-color: #d94356;
  background-image: radial-gradient(rgba(255, 240, 210, 0.34) 2px, transparent 2.5px);
  background-size: 11px 11px;
}
.ac-door[data-wrap="1"] {
  background-color: #2c7c4f;
  background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.16) 0 5px, transparent 5px 12px);
}
.ac-door[data-wrap="2"] {
  background-color: #e4ac3b;
  background-image: radial-gradient(rgba(255, 255, 255, 0.4) 1.8px, transparent 2.2px);
  background-size: 12px 12px;
}
.ac-door[data-wrap="3"] {
  background-color: #316ea8;
  background-image: radial-gradient(rgba(255, 255, 255, 0.38) 1.6px, transparent 2.2px);
  background-size: 10px 10px;
}
.ac-door[data-wrap="4"] {
  background-color: #794ea3;
  background-image: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.14) 0 4px, transparent 4px 10px);
}

.ac-door::before,
.ac-door::after {
  content: "";
  position: absolute;
  pointer-events: none;
  background: linear-gradient(90deg, #e5aa36, #ffe08a, #d89722);
}
.ac-door::before { top: 0; bottom: 0; left: 50%; width: 7px; transform: translateX(-50%); }
.ac-door::after { left: 0; right: 0; top: 52%; height: 7px; transform: translateY(-50%); background: linear-gradient(180deg, #ffe08a, #d89722); }
.ac-door[data-wrap="2"]::before,
.ac-door[data-wrap="2"]::after { background: linear-gradient(90deg, #c93346, #f05a6d, #a82637); }

.ac-bow {
  position: absolute;
  top: -9px;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 13px;
  pointer-events: none;
  z-index: 3;
}
.ac-bow::before,
.ac-bow::after {
  content: "";
  position: absolute;
  top: 0;
  width: 14px;
  height: 11px;
  border-radius: 50% 50% 20% 50%;
  background: linear-gradient(135deg, #ffe08a 0%, #d89722 100%);
  border: 1px solid rgba(110, 65, 10, 0.35);
}
.ac-bow::before { left: 1px; transform: rotate(-18deg); }
.ac-bow::after { right: 1px; border-radius: 50% 50% 50% 20%; transform: rotate(18deg); }
.ac-door[data-wrap="2"] .ac-bow::before,
.ac-door[data-wrap="2"] .ac-bow::after {
  background: linear-gradient(135deg, #f36275 0%, #b52437 100%);
}

.ac-door-tag {
  position: relative;
  z-index: 3;
  min-width: 36px;
  padding: 4px 8px 4px 12px;
  border-radius: 5px;
  background: #fffaf0;
  color: #1f1a16;
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 16px;
  line-height: 1.05;
  transform: rotate(-4deg);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.28);
}
.ac-door-tag::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: #c93346;
}

.ac-door-badge {
  position: absolute;
  z-index: 4;
  top: 3px;
  right: 3px;
  font-size: 12px;
  line-height: 1;
  background: rgba(16, 41, 32, 0.85);
  color: #fffaf0;
  border-radius: 999px;
  padding: 2px 4px;
}
.ac-door-sub {
  position: absolute;
  z-index: 4;
  bottom: 3px;
  left: 3px;
  right: 3px;
  font-size: 9px;
  font-weight: 700;
  text-align: center;
  color: #fffaf0;
  background: rgba(11, 28, 22, 0.82);
  border-radius: 4px;
  padding: 1px 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ac-door.is-today {
  border: 2px solid #f6cd63 !important;
  box-shadow: 0 0 0 3px rgba(246, 205, 99, 0.48), 0 6px 16px rgba(0, 0, 0, 0.38);
}
.ac-door.is-openable { animation: acPulse 2.1s infinite; }
.ac-door.is-opened {
  background: linear-gradient(145deg, #fffdf6 0%, #f2e5cb 100%) !important;
  background-image: none !important;
  border: 2px solid #e0aa3e !important;
}
.ac-door.is-opened::before,
.ac-door.is-opened::after,
.ac-door.is-opened .ac-bow { display: none; }
.ac-door.is-opened .ac-door-tag { color: #102920; }

@keyframes acPulse {
  0%, 100% { box-shadow: 0 0 0 2px rgba(246, 205, 99, 0.5), 0 4px 12px rgba(0,0,0,0.3); }
  50% { box-shadow: 0 0 0 5px rgba(246, 205, 99, 0.85), 0 8px 18px rgba(0,0,0,0.4); }
}
@media (prefers-reduced-motion: reduce) {
  .ac-door.is-openable { animation: none; }
}

/* Single-Row 5-Column Theme Strip Matching Board Width */
.ac-thumb-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}
.ac-thumb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  padding: 5px 8px;
  border-radius: 999px;
  border: 1.5px solid rgba(255, 255, 255, 0.22);
  background: rgba(11, 28, 22, 0.72);
  color: #fffaf0;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.ac-thumb-btn:hover { border-color: rgba(246, 205, 99, 0.7); }
.ac-thumb-btn.is-active {
  border-color: #f6cd63;
  background: rgba(246, 205, 99, 0.22);
  color: #f6cd63;
}
.ac-thumb-dot {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(255, 255, 255, 0.55);
  flex-shrink: 0;
}

/* Right Control Panel */
.ac-panel {
  min-width: 0;
  background: #fffdf8;
  color: #1b281e;
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.38);
  border: 1px solid rgba(255, 255, 255, 0.6);
}
.ac-panel h2 {
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 26px;
  color: #1b281e;
  margin: 0 0 8px;
}
.ac-panel-lead { font-size: 14px; color: #536457; margin: 0 0 18px; }
.ac-field { margin-bottom: 16px; }
.ac-field label { display: block; font-size: 13px; font-weight: 700; color: #1b281e; margin-bottom: 6px; }
.ac-input, .ac-textarea {
  width: 100%; min-width: 0; min-height: 44px; padding: 10px 12px;
  border-radius: 10px; border: 1px solid #cbd7c8;
  background: #f5f8f3; color: #1b281e; font: inherit; font-size: 16px;
}
.ac-textarea { min-height: 96px; resize: vertical; }

.ac-lastday-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ac-lastday-btn {
  display: flex; flex-direction: column; align-items: center; padding: 10px 8px;
  border-radius: 12px; border: 2px solid #d5dfd2; background: #f5f8f3; color: #1b281e; cursor: pointer;
}
.ac-lastday-btn strong { font-family: "DM Serif Display", Georgia, serif; font-size: 17px; font-weight: 400; }
.ac-lastday-btn span { font-size: 12px; color: #536457; font-weight: 600; }
.ac-lastday-btn.is-active { border-color: #c93346; background: #fff5f6; }
.ac-lastday-btn.is-active strong { color: #a82637; }

.ac-btn-main {
  width: 100%; min-height: 50px; padding: 12px 20px; border: 0; border-radius: 999px;
  background: linear-gradient(180deg, #e2475a 0%, #bd263a 100%);
  color: #ffffff; font-size: 16px; font-weight: 700; cursor: pointer;
  box-shadow: 0 8px 18px rgba(189, 38, 58, 0.36);
}
.ac-btn-main:hover { background: linear-gradient(180deg, #cf3447 0%, #9f1d2e 100%); }
.ac-btn-main:disabled { opacity: 0.65; cursor: wait; }
.ac-btn-sec {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 8px 14px; border-radius: 999px;
  border: 1px solid #cbd7c8; background: #ffffff; color: #1b281e;
  font-size: 13px; font-weight: 700; cursor: pointer; text-decoration: none;
  flex-shrink: 0;
}
.ac-btn-sec:hover { border-color: #256f46; color: #1d5736; text-decoration: none; }
.ac-btn-green { background: #256f46; color: #ffffff; border-color: #256f46; }
.ac-btn-green:hover { background: #1d5736; color: #ffffff; }

.ac-divider { margin: 18px 0 14px; border: 0; border-top: 1px solid #e4ece2; }
.ac-code-row { display: flex; gap: 8px; }
.ac-code-row .ac-input { flex: 1; text-transform: lowercase; }
.ac-saved-wrap { margin-top: 14px; }
.ac-saved-title { font-size: 12px; font-weight: 700; color: #536457; margin: 0 0 8px; text-transform: uppercase; letter-spacing: 0.04em; }
.ac-saved-list { display: flex; flex-wrap: wrap; gap: 8px; }
.ac-saved-pill {
  min-height: 36px; padding: 6px 12px; border-radius: 999px;
  background: #e8efe5; color: #1b281e; border: 1px solid #cbd7c8;
  font-size: 13px; font-weight: 600; cursor: pointer;
}
.ac-saved-pill:hover { border-color: #256f46; }

.ac-progress-bar { height: 10px; border-radius: 999px; background: #e4ece2; overflow: hidden; margin: 8px 0 14px; }
.ac-progress-fill { height: 100%; background: linear-gradient(90deg, #256f46 0%, #e0aa3e 100%); width: 0%; transition: width 0.3s ease; }
.ac-action-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.ac-code-chip {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  background: #fbf4e4; border: 1px dashed #e0aa3e; border-radius: 10px;
  padding: 8px 12px; margin-bottom: 12px; font-size: 13px;
}
.ac-code-chip strong { font-size: 15px; letter-spacing: 0.08em; color: #1b281e; font-family: ui-monospace, SFMono-Regular, monospace; }
.ac-tiny-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; font-size: 12px; margin-top: 10px; }
.ac-link-btn { background: none; border: 0; padding: 6px 0; color: #536457; font-size: 12px; font-weight: 600; cursor: pointer; text-decoration: underline; }
.ac-link-btn:hover { color: #c93346; }
.ac-error-msg { margin: 10px 0 0; font-size: 13px; font-weight: 600; color: #b42318; }
.ac-info-msg { margin: 10px 0 0; font-size: 13px; font-weight: 600; color: #1d5736; }

/* Convenience Share Modal */
.ac-share-modal { text-align: center; }
.ac-share-env { width: 108px; height: 80px; margin: 4px auto 10px; display: block; }
.ac-share-pill-row { display: flex; gap: 8px; margin-bottom: 14px; }
.ac-share-pill-row input {
  flex: 1; min-width: 0; padding: 10px 14px; border-radius: 999px;
  border: 1px solid #cbd7c8; background: #ffffff; color: #1b281e; font-size: 14px; font-weight: 600;
}
.ac-social-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin: 18px 0; }
.ac-social-item {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  background: none; border: 0; padding: 0; cursor: pointer; text-decoration: none; color: #536457;
  font-size: 11px; font-weight: 600;
}
.ac-social-item:hover { color: #1b281e; text-decoration: none; }
.ac-social-icon {
  width: 46px; height: 46px; border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  color: #ffffff; font-weight: 700; font-size: 20px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.14);
}
.ac-ic-email { background: linear-gradient(145deg, #4b9aff 0%, #246ce0 100%); }
.ac-ic-ig { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fd5949 45%, #d6249f 60%, #285aeb 90%); }
.ac-ic-fb { background: #1877f2; }
.ac-ic-wa { background: #25d366; }
.ac-ic-tg { background: #26a5e4; }
.ac-share-code-line {
  margin-top: 14px; font-size: 13px; color: #536457;
  display: flex; align-items: center; justify-content: center; gap: 10px;
}
.ac-share-code-line code {
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-size: 15px; font-weight: 700; color: #1b281e; letter-spacing: 0.06em;
}

/* Toast & Modal */
.ac-toast {
  position: fixed; top: 74px; left: 50%; transform: translateX(-50%); z-index: 90;
  max-width: calc(100vw - 32px); text-align: center;
  background: #0b1c16; color: #fffaf0; border: 1px solid #f6cd63; border-radius: 999px;
  padding: 10px 18px; font-size: 14px; font-weight: 600; box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4);
}
.ac-modal-backdrop {
  position: fixed; inset: 0; z-index: 80; background: rgba(11, 28, 22, 0.74);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.ac-modal {
  width: 100%; max-width: 460px; max-height: 90vh; overflow-y: auto;
  background: #ffffff; color: #1b281e; border-radius: 20px; padding: 26px 24px;
  box-shadow: 0 24px 54px rgba(0, 0, 0, 0.48); position: relative;
}
.ac-modal-close {
  position: absolute; top: 14px; right: 14px; width: 36px; height: 36px;
  border-radius: 999px; border: 1px solid #e2e8e0; background: #ffffff;
  color: #536457; font-size: 20px; line-height: 1; cursor: pointer;
}
.ac-stickers { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.ac-sticker-btn {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 8px 4px; border-radius: 10px; border: 2px solid #d5dfd2;
  background: #f4f7f2; color: #1b281e; font-size: 11px; font-weight: 600; cursor: pointer;
}
.ac-sticker-btn span.ac-em { font-size: 22px; line-height: 1.2; }
.ac-sticker-btn.is-active { border-color: #256f46; background: #e8efe5; }
.ac-note-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
.ac-note-card {
  background: #fbf8ef; border: 1px solid #e6dcc2; border-radius: 12px;
  padding: 20px; margin: 14px 0 18px;
  background-image: repeating-linear-gradient(transparent, transparent 27px, rgba(29, 42, 31, 0.08) 28px);
}
.ac-note-sticker { font-size: 36px; line-height: 1; margin-bottom: 10px; }
.ac-note-body { font-size: 18px; line-height: 1.55; color: #1b281e; margin: 0 0 14px; white-space: pre-wrap; word-break: break-word; }
.ac-note-from { font-size: 14px; font-weight: 700; color: #256f46; margin: 0; }
.ac-check-row { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #1b281e; margin-bottom: 10px; cursor: pointer; }
.ac-poster-preview { width: 100%; max-height: 360px; object-fit: contain; border-radius: 12px; border: 1px solid #d5dfd2; margin: 12px 0; background: #102920; }

/* Tablet (<= 960px) */
@media (max-width: 960px) {
  .ac-layout { grid-template-columns: 1fr; gap: 20px; }
  .ac-arrow-prev { left: 6px; }
  .ac-arrow-next { right: 6px; }
}

/* Mobile-First Polish (<= 640px — iPhone / Android) */
@media (max-width: 640px) {
  .ac-arrow { display: none; }
  .ac-board-wrap { padding: 10px; border-radius: 16px; border-width: 2px; }
  .ac-board-head { padding: 0 0 8px; gap: 6px; }
  .ac-board-title { font-size: 15px; padding: 4px 10px; }
  .ac-board-badge { font-size: 11px; padding: 4px 10px; }
  .ac-board-wrap.is-scene .ac-board-head { padding-bottom: 52px; }

  .ac-grid, .ac-grid[data-cols="5"] {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px 7px;
    padding: 14px 8px 10px;
  }
  .ac-bow { width: 22px; height: 10px; top: -7px; }
  .ac-bow::before, .ac-bow::after { width: 10px; height: 9px; }
  .ac-door::before { width: 5px; }
  .ac-door::after { height: 5px; }
  .ac-door-tag { min-width: 28px; padding: 3px 6px 3px 10px; font-size: 13px; }
  .ac-door-tag::before { left: 4px; width: 3px; height: 3px; }

  /* Thumb-friendly horizontal snap strip */
  .ac-thumb-strip {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    justify-content: flex-start;
    gap: 8px;
    margin-top: 12px;
    padding-bottom: 2px;
  }
  .ac-thumb-strip::-webkit-scrollbar { display: none; }
  .ac-thumb-btn {
    flex: 0 0 auto;
    min-height: 40px;
    padding: 6px 12px 6px 8px;
    font-size: 13px;
    scroll-snap-align: start;
  }

  .ac-panel { padding: 18px 16px; border-radius: 16px; }
  .ac-panel h2 { font-size: 23px; }
  .ac-lastday-btn { padding: 9px 6px; }
  .ac-lastday-btn strong { font-size: 15px; }
  .ac-lastday-btn span { font-size: 11px; }
  .ac-action-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  /* Native-style bottom sheet modal on mobile */
  .ac-modal-backdrop {
    align-items: flex-end;
    padding: 0;
  }
  .ac-modal {
    max-width: 100%;
    max-height: 88vh;
    border-radius: 22px 22px 0 0;
    padding: 22px 18px calc(22px + env(safe-area-inset-bottom, 0px));
  }
  .ac-share-env { width: 88px; height: 66px; }
  .ac-share-pill-row input { font-size: 16px; }
  .ac-social-row { gap: 4px; }
  .ac-social-icon { width: 44px; height: 44px; font-size: 18px; }
  .ac-social-item { font-size: 10px; }
}