:root {
  color-scheme: only light;
  --paper: #fff3d7;
  --white: #fffdf9;
  --ink: #243145;
  --muted: #6e726d;
  --line: #e7dfd3;
  --jade: #27a996;
  --jade-soft: #daf8ef;
  --rose: #ff5f8f;
  --coral: #ff9b72;
  --gold: #ffc447;
  --lavender: #8c76ff;
  --shadow: 0 18px 48px rgba(29, 24, 16, 0.14);
  --content-max: 980px;
}

/* ─────────────────────────────────────────────────────
   HEUKYA / 조선 미스터리 테마
   참고: SAJU_UNBOXING_VIDEO_PLAN.md — 흑야·금사·핏빛 예언·수묵 새벽
   ───────────────────────────────────────────────────── */
:root {
  --midnight-ink: #101722;
  --palace-ink: #172231;
  --royal-gold: #c9a227;
  --blood-moon: #6f2530;
  --warm-ivory: #f6e5be;
  --hanji: #fff8e8;
  --paper: #f6e5be;
  --white: #fffaf0;
  --ink: #182235;
  --muted: #756b5b;
  --line: rgba(201, 162, 39, 0.28);
  --jade: #8f6f2a;
  --jade-soft: #f8ecd0;
  --rose: #6f2530;
  --coral: #b98335;
  --gold: #c9a227;
  --lavender: #26364b;
  --shadow: 0 22px 60px rgba(16, 23, 34, 0.18);
}

body {
  background:
    radial-gradient(circle at 78% 0%, rgba(201, 162, 39, 0.26), transparent 28rem),
    radial-gradient(circle at 16% 10%, rgba(111, 37, 48, 0.20), transparent 25rem),
    linear-gradient(180deg, #131c29 0%, #243244 36%, #f6e5be 100%);
  color: var(--ink);
}

.app-shell {
  background:
    linear-gradient(180deg, rgba(255, 250, 240, 0.97), rgba(251, 241, 219, 0.98)),
    repeating-linear-gradient(135deg, rgba(201, 162, 39, 0.06) 0 1px, transparent 1px 16px);
}

.topbar {
  border-bottom-color: rgba(201, 162, 39, 0.34);
  background: rgba(255, 250, 240, 0.92);
}

.brand-mark {
  color: var(--warm-ivory);
  background:
    radial-gradient(circle at 35% 20%, rgba(201, 162, 39, 0.55), transparent 38%),
    linear-gradient(145deg, var(--midnight-ink), var(--palace-ink));
  border: 1px solid rgba(201, 162, 39, 0.55);
  box-shadow: 0 8px 20px rgba(16, 23, 34, 0.20);
}

.brand-text {
  color: var(--midnight-ink);
  letter-spacing: -0.03em;
}

.auth-chip {
  color: var(--midnight-ink);
  background: linear-gradient(135deg, var(--warm-ivory), var(--royal-gold));
  border: 1px solid rgba(143, 111, 42, 0.45);
}

.banner-carousel {
  background:
    linear-gradient(135deg, var(--midnight-ink), var(--palace-ink));
  border-bottom: 1px solid rgba(201, 162, 39, 0.26);
}

.banner-slide::after {
  background:
    linear-gradient(90deg, rgba(16, 23, 34, 0.82), rgba(16, 23, 34, 0.30) 48%, rgba(246, 229, 190, 0.18)),
    radial-gradient(circle at 22% 68%, rgba(201, 162, 39, 0.32), transparent 32rem);
}

.banner-copy {
  color: var(--hanji);
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.48);
}

.banner-copy p {
  color: var(--royal-gold);
  letter-spacing: 0.08em;
}

.banner-copy h1,
.banner-copy h2 {
  max-width: 8.5em;
  color: #fff8e8;
  letter-spacing: -0.04em;
}

.banner-button,
.primary-action,
.product-copy footer button,
.home-guide-panel button,
.order-actions button,
.support-contact .primary-action,
.payment-result-actions .primary-action,
.fortune-fab,
.bottom-nav .fortune-fab {
  background: linear-gradient(135deg, var(--blood-moon), #9c6034 48%, var(--royal-gold));
  color: #fff8e8;
  border: 1px solid rgba(255, 248, 232, 0.22);
  box-shadow: 0 16px 34px rgba(111, 37, 48, 0.22);
}

.filters button,
.story-points button,
.library-filters button,
.segmented button {
  color: #5f4c28;
  background: rgba(255, 248, 232, 0.72);
  border-color: rgba(201, 162, 39, 0.35);
}

.filters button.is-active,
.story-points button.is-active,
.library-filters button.is-active,
.segmented button.is-active {
  color: #fff8e8;
  background: linear-gradient(135deg, var(--midnight-ink), var(--blood-moon));
  border-color: rgba(201, 162, 39, 0.60);
}

.product-card,
.home-story,
.form-step,
.checkout-panel,
.orders-list > article,
.archive-card,
.support-card,
.calendar-panel,
.fortune-card,
.daily-card,
.followup-panel,
.chat-credit-card,
.chat-report-panel,
.chat-products-panel,
.chat-history-panel {
  border: 1px solid rgba(201, 162, 39, 0.32);
  background:
    linear-gradient(180deg, rgba(255, 250, 240, 0.97), rgba(249, 236, 205, 0.92)),
    repeating-linear-gradient(135deg, rgba(201, 162, 39, 0.06) 0 1px, transparent 1px 18px);
  box-shadow: 0 18px 38px rgba(16, 23, 34, 0.10);
}

.product-card:nth-child(2n) {
  transform: none;
}

.product-image {
  background: linear-gradient(135deg, var(--midnight-ink), #243244);
  border-bottom: 1px solid rgba(201, 162, 39, 0.35);
}

.product-image::after {
  background:
    radial-gradient(circle at 70% 18%, rgba(246, 229, 190, 0.30), transparent 30%),
    linear-gradient(180deg, transparent 35%, rgba(16, 23, 34, 0.52));
}

.product-image span {
  color: #fff8e8;
  background: rgba(16, 23, 34, 0.72);
  border: 1px solid rgba(201, 162, 39, 0.70);
}

.product-copy h2,
.home-story h2,
.view-title h1,
.report-title h1 {
  color: var(--midnight-ink);
}

.product-copy p,
.home-guide-intro,
.home-story p {
  color: #675b48;
}

.product-copy footer strong,
.point-tier b,
.daily-score strong,
.report-headline {
  color: var(--blood-moon);
}

.bottom-nav {
  background: rgba(255, 250, 240, 0.96);
  border-color: rgba(201, 162, 39, 0.30);
  box-shadow: 0 -14px 34px rgba(16, 23, 34, 0.13);
}

.bottom-nav > button.is-active {
  color: var(--blood-moon);
}

/* 포인트 충전·결제 */
.mypage-points {
  margin: 0 18px 14px;
  padding: 14px 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, #173f35, #236650);
  color: #fff;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
}
.mypage-points[hidden] { display: none; }
.mypage-points span, .mypage-points small { font-size: 12px; opacity: .82; }
.mypage-points b { font-size: 20px; }
.mypage-points small { grid-column: 1 / -1; }
.points-view { padding-bottom: 110px; }
.points-poster { background: linear-gradient(135deg, #173f35, #d8ae55); }
.points-balance-card {
  margin: 20px;
  padding: 22px;
  border-radius: 20px;
  background: #173f35;
  color: #fff;
  display: grid;
  gap: 6px;
}
.points-balance-card strong { font-size: 30px; }
.points-balance-card small { color: #d8e8e1; }
.point-tier-grid { display: grid; gap: 12px; margin: 20px; }
.point-tier {
  border: 1px solid #e5ded0;
  border-radius: 18px;
  background: #fff;
  padding: 18px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 5px 12px;
  text-align: left;
}
.point-tier b { color: #137a43; font-size: 20px; }
.point-tier small { grid-column: 1 / -1; color: #9b6b16; }
.point-history { margin: 26px 20px; border: 1px solid #e5ded0; border-radius: 16px; background: #fff; overflow: hidden; }
.point-history summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; color: var(--ink); cursor: pointer; list-style: none; font-size: 18px; font-weight: 900; }
.point-history summary::-webkit-details-marker { display: none; }
.point-history summary i { color: var(--jade); font-style: normal; font-size: 12px; font-weight: 900; }
.point-history summary i::before { content: "펼치기"; }
.point-history[open] summary { border-bottom: 1px solid #eee8dc; }
.point-history[open] summary i::before { content: "접기"; }
.point-history-body { padding: 0 18px 8px; }
.point-tx { display: flex; justify-content: space-between; align-items: center; padding: 14px 2px; border-bottom: 1px solid #eee8dc; }
.point-tx div { display: grid; gap: 3px; }
.point-tx small { color: #8b867e; }
.point-tx strong.plus { color: #137a43; }
.point-tx strong.minus { color: #b42318; }
.point-payment { display: grid; gap: 14px; }
.point-payment[hidden] { display: none; }
.point-payment-head, .point-payment-total { display: flex; justify-content: space-between; align-items: center; }
.point-payment label { display: grid; gap: 7px; font-weight: 700; }
.point-payment input { width: 100%; padding: 12px; border: 1px solid #d9d4ca; border-radius: 12px; font-size: 16px; }
.point-use-field { display: grid; gap: 7px; }
.point-use-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.point-use-row button { min-width: 84px; padding: 0 14px; border: 1px solid #d9d4ca; border-radius: 12px; background: #fff9e8; color: #6e5422; font-weight: 900; }
.point-use-row button:disabled { opacity: 0.45; cursor: not-allowed; }
.point-payment-total { padding-top: 12px; border-top: 1px solid #eee8dc; }
.daily-regen-card { margin: 16px; padding: 16px; border: 1px solid #d9d4ca; border-radius: 16px; background: #fff9e8; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.daily-regen-card[hidden] { display: none; }
.daily-regen-card div { display: grid; gap: 4px; }
.daily-regen-card small { color: #786b56; }
.daily-regen-card button { width: auto; flex: none; }
.points-daily-link { margin-top: 10px; }
.point-admin-grid { align-items: start; }
.admin-point-detail { display: grid; gap: 16px; }
.admin-point-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.admin-point-summary article { padding: 16px; border-radius: 14px; background: #f5f2ea; display: grid; gap: 5px; }
.admin-point-summary b { font-size: 20px; }
.admin-member-pick { border: 0; background: transparent; padding: 0; text-align: left; color: inherit; }
.admin-member-pick small { display: block; max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
.admin-member-pick.is-active { color: #137a43; }
.admin-point-search { display: grid; gap: 7px; margin-bottom: 10px; font-weight: 800; }
.admin-point-search input { width: 100%; border: 1px solid #d9d4ca; border-radius: 10px; padding: 10px 12px; }
.admin-point-quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.admin-point-quick button { border: 1px solid #d9d4ca; border-radius: 10px; padding: 10px 8px; background: #fff; font-weight: 800; cursor: pointer; }
.admin-point-quick button:hover { border-color: #137a43; color: #137a43; }
.admin-point-quick button:disabled { opacity: .45; cursor: not-allowed; }
@media (max-width: 760px) {
  .admin-point-quick { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 20% 10%, rgba(255, 95, 143, 0.18), transparent 26rem),
    radial-gradient(circle at 80% 0%, rgba(39, 169, 150, 0.2), transparent 24rem),
    #fff0b6;
  color: var(--ink);
  font-family:
    "Pretendard Variable",
    "Pretendard",
    "Noto Sans KR",
    system-ui,
    sans-serif;
  letter-spacing: 0;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  width: 100%;
  max-width: none;
  min-height: 100vh;
  margin: 0;
  overflow: hidden;
  background: var(--white);
  box-shadow: var(--shadow);
  position: relative;
  padding-bottom: 92px;
}

.topbar {
  height: 72px;
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.96);
  backdrop-filter: blur(12px);
}

.brand {
  width: 104px;
  height: 42px;
  border: 0;
  padding: 0;
  background: transparent;
}

.brand img {
  display: block;
  width: 100%;
  height: 100%;
}

.brand-wordmark {
  width: auto;
  min-width: 0;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  border-radius: 10px;
  color: #fff8e8;
  background: var(--ink);
  font-weight: 950;
  line-height: 1;
}

.brand-text {
  font-size: 18px;
  font-weight: 950;
  letter-spacing: 0;
  white-space: nowrap;
}

.top-tools,
.metric {
  display: flex;
  align-items: center;
}

.top-tools {
  gap: 8px;
}

.auth-chip {
  max-width: 92px;
  min-height: 32px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  padding: 0 10px;
  color: #392700;
  background: #fee500;
  font-size: 11px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metric,
.icon-button {
  border: 0;
  background: transparent;
}

.metric {
  gap: 5px;
  height: 34px;
  padding: 0 2px;
}

.metric strong {
  min-width: 10px;
  font-size: 16px;
}

.coin {
  width: 20px;
  height: 20px;
  display: inline-block;
  border-radius: 50%;
  position: relative;
}

.coin-sun {
  border: 3px double #f29c21;
}

.coin-sun::after {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: 2px solid #f29c21;
  content: "";
  position: absolute;
  inset: 4px;
}

.coin-orbit {
  border: 3px dotted var(--rose);
}

.coin-orbit::before {
  width: 6px;
  height: 6px;
  right: -3px;
  top: -3px;
  border-radius: 50%;
  background: var(--rose);
  content: "";
  position: absolute;
}

.icon-button {
  width: 30px;
  height: 34px;
  border-radius: 8px;
  position: relative;
}

.icon-button::before,
.icon-button::after {
  content: "";
  position: absolute;
}

.gift::before {
  inset: 9px 5px 5px;
  border: 3px solid var(--rose);
  border-radius: 3px;
}

.gift::after {
  left: 5px;
  right: 5px;
  top: 12px;
  height: 3px;
  background: var(--rose);
  box-shadow: 10px -5px 0 -1px var(--rose);
}

.help::before {
  inset: 4px;
  border: 3px solid var(--ink);
  border-radius: 50%;
}

.help::after {
  content: "?";
  inset: 5px 0 0;
  display: grid;
  place-items: center;
  color: var(--ink);
  font-size: 21px;
  font-weight: 800;
}

.menu::before {
  left: 4px;
  right: 4px;
  top: 8px;
  height: 3px;
  border-radius: 4px;
  background: var(--ink);
  box-shadow: 0 8px 0 var(--ink), 0 16px 0 var(--ink);
}

.view {
  display: none;
  min-height: calc(100vh - 164px);
  background: var(--white);
}

.view.is-active {
  display: block;
}

.banner-carousel {
  height: 304px;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.banner-slide {
  height: 100%;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  transition: opacity 240ms ease;
}

.banner-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.banner-slide img,
.slim-poster::before {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.banner-slide img {
  filter: saturate(1.04);
}

.banner-slide::after {
  inset: 0;
  position: absolute;
  content: "";
  background: linear-gradient(90deg, rgba(255, 250, 241, 0.9), rgba(255, 250, 241, 0.42), transparent);
}

.banner-copy {
  width: 52%;
  position: absolute;
  z-index: 1;
  left: 22px;
  bottom: 42px;
}

.banner-copy-right {
  left: auto;
  right: 18px;
  text-align: right;
}

.banner-copy p,
.slim-poster p {
  margin: 0 0 7px;
  color: var(--jade);
  font-size: 13px;
  font-weight: 800;
}

.banner-copy h1,
.banner-copy h2 {
  margin: 0 0 16px;
  line-height: 1.08;
  font-size: 34px;
  word-break: keep-all;
  overflow-wrap: break-word;
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.7);
}

.banner-copy h2 {
  font-size: 28px;
}

.banner-button,
.product-copy footer button,
.primary-action {
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--rose), #b44592);
  box-shadow: 0 10px 20px rgba(218, 87, 120, 0.24);
  font-weight: 800;
}

.banner-button {
  min-height: 40px;
  padding: 0 15px;
}

.carousel-dots {
  left: 0;
  right: 0;
  bottom: 14px;
  display: flex;
  justify-content: center;
  gap: 7px;
  position: absolute;
  z-index: 2;
}

.carousel-dots button {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  padding: 0;
  background: rgba(255, 255, 255, 0.72);
}

.carousel-dots button.is-active {
  width: 31px;
  background: #fff;
}

.filters,
.library-filters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.filters {
  padding: 16px 14px;
}

.filters button,
.library-filters button,
.choice-row button,
.answer-chips button,
.year-panel button,
.profile-strip button {
  min-height: 40px;
  white-space: nowrap;
  border: 0;
  border-radius: 999px;
  padding: 0 15px;
  color: #3c4540;
  background: #f3f2ee;
  font-weight: 800;
}

.filters button.is-active,
.library-filters button.is-active,
.choice-row button.is-active,
.year-panel button.is-active {
  color: #fff;
  background: var(--ink);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}

.product-card {
  min-width: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.product-card:nth-child(2n) {
  border-right: 0;
}

.product-card.is-hidden {
  display: none;
}

.product-image {
  width: 100%;
  aspect-ratio: 1;
  border: 0;
  padding: 0;
  position: relative;
  overflow: hidden;
  background: #efe7d9;
}

.product-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 240ms ease;
}

.product-image:hover img {
  transform: scale(1.03);
}

.product-image::after {
  inset: 0;
  position: absolute;
  content: "";
  background: linear-gradient(180deg, rgba(36, 49, 69, 0.02), rgba(36, 49, 69, 0.44));
}

.product-image span {
  left: 13px;
  right: 13px;
  bottom: 12px;
  z-index: 1;
  color: #fff;
  font-size: clamp(30px, 9vw, 42px);
  font-weight: 950;
  line-height: 1;
  position: absolute;
  text-align: left;
  text-shadow: 0 3px 14px rgba(0, 0, 0, 0.38);
}

.product-copy {
  min-height: 128px;
  padding: 12px 10px 13px;
}

.login-panel h2,
.payment-panel h2,
.payment-result h2,
.product-copy h2,
.fortune-card h2,
.purpose-panel h2,
.timeline-panel h2 {
  margin: 0 0 6px;
  font-size: 17px;
  line-height: 1.25;
}

.product-copy p,
.archive-list p {
  min-height: 40px;
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.product-copy footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
}

.product-copy strong {
  color: var(--rose);
  font-size: 13px;
}

.product-copy footer button {
  min-height: 34px;
  padding: 0 11px;
  font-size: 12px;
}

.product-card-wide {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  border-right: 0;
}

.product-card-wide .product-copy {
  display: grid;
  align-content: center;
}

.chat-product-card .product-image span {
  font-size: clamp(26px, 8vw, 38px);
}

.home-story {
  padding: 28px 18px 44px;
  background: linear-gradient(180deg, #fffdf8, #fff4d7);
}

.home-story h2 {
  margin: 0 0 10px;
  font-size: 22px;
}

.home-story p,
.year-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.story-points {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 14px;
}

.story-points button {
  border: 1px solid #d8c8ac;
  border-radius: 999px;
  padding: 8px 11px;
  color: #5a4727;
  background: #fff8e8;
  font-size: 12px;
  font-weight: 800;
}

.story-points button.is-active {
  border-color: #5a4727;
  color: #fff;
  background: #5a4727;
}

.home-guide-panel {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  padding: 18px;
  border: 1px solid #e4d6bc;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.88);
}

.home-guide-panel small {
  color: var(--rose);
  font-weight: 900;
}

.home-guide-panel h3 {
  margin: 0;
  font-size: 17px;
}

.home-guide-panel p {
  min-height: 48px;
}

.home-guide-panel button {
  justify-self: start;
  margin-top: 4px;
  padding: 10px 14px;
  border: 0;
  border-radius: 10px;
  color: #fff;
  background: var(--ink);
  font-weight: 900;
}

.view-title {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  color: var(--ink);
}

.view-title.emerald {
  color: #fff;
  background: var(--jade);
}

.view-title.rose {
  color: #fff;
  background: var(--rose);
}

.view-title h1,
.chat-head h1,
.slim-poster h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1;
}

.view-title button {
  width: 36px;
  height: 36px;
  border: 0;
  color: currentColor;
  background: transparent;
  font-size: 31px;
  line-height: 1;
}

.stack-form {
  display: grid;
  gap: 18px;
  padding: 24px 20px;
}

.stack-form label,
.fortune-card label {
  display: grid;
  gap: 9px;
  font-weight: 900;
}

input,
select {
  width: 100%;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 13px;
  color: var(--ink);
  background: #fff;
}

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

.primary-action {
  width: 100%;
  min-height: 52px;
  padding: 0 18px;
  border-radius: 6px;
  font-size: 16px;
}

.slim-poster {
  height: 142px;
  position: relative;
  overflow: hidden;
  padding: 24px 20px;
  display: grid;
  align-content: center;
}

.slim-poster::before {
  inset: 0;
  position: absolute;
  content: "";
  z-index: 0;
  opacity: 0.72;
  filter: saturate(1.08);
}

.slim-poster::after {
  inset: 0;
  position: absolute;
  content: "";
  background: linear-gradient(90deg, rgba(255, 253, 248, 0.94), rgba(255, 253, 248, 0.36));
}

.slim-poster > * {
  position: relative;
  z-index: 1;
}

.fortune-poster::before {
  background: url("./assets/generated/banners/heukya-premium-daily-flow.jpg") center / cover;
}

.wallet-poster::before,
.payment-poster::before {
  background: url("./assets/generated/banners/heukya-premium-hero.jpg") center / cover;
}

.calendar-poster::before {
  background: url("./assets/generated/banners/heukya-premium-auspicious-date.jpg") center / cover;
}

.cycle-poster::before {
  background: url("./assets/generated/thumbnails/heukya-premium-fortune-cycle.jpg") center / cover;
}

.year-poster::before {
  background: url("./assets/generated/thumbnails/heukya-premium-year-wheel.jpg") center / cover;
}

.library-poster::before {
  background: url("./assets/generated/thumbnails/heukya-premium-consult-chat.jpg") center / cover;
}

.profile-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: auto;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.profile-strip button {
  color: var(--jade);
  background: var(--jade-soft);
}

.purpose-panel,
.month-panel,
.fortune-card,
.timeline-panel,
.year-panel {
  margin: 18px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.purpose-panel {
  padding: 18px 14px;
}

.purpose-panel h2 b {
  width: 27px;
  height: 27px;
  margin-right: 5px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--rose);
  font-size: 14px;
}

.choice-row,
.answer-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.choice-row {
  padding-top: 12px;
}

.month-panel {
  padding: 18px 10px 14px;
}

.month-panel header {
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  align-items: center;
}

.month-panel header h2 {
  margin: 0;
  text-align: center;
  font-size: 18px;
}

.month-panel header button,
.calendar-grid button {
  border: 0;
  background: transparent;
}

.month-panel header button {
  height: 42px;
  font-size: 28px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  padding-top: 12px;
  text-align: center;
}

.calendar-grid span,
.calendar-grid button {
  height: 38px;
  display: grid;
  place-items: center;
}

.calendar-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.calendar-grid button {
  border-radius: 50%;
  color: var(--ink);
}

.calendar-grid .muted {
  color: #b9b6af;
}

.calendar-grid .picked {
  color: #fff;
  background: var(--jade);
}

.calendar-action {
  width: calc(100% - 32px);
  margin: 0 16px 28px;
}

.fortune-card {
  padding: 18px 16px;
}

.fortune-card header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
}

.fortune-card time {
  color: var(--muted);
  font-size: 12px;
}

.fortune-card h3 {
  margin: 20px 0 12px;
  font-size: 16px;
}

.answer-chips {
  margin-bottom: 20px;
}

.answer-chips button:last-child {
  color: var(--rose);
  background: #fff1f4;
}

.fortune-mood-custom {
  display: grid;
  gap: 8px;
  margin: -6px 0 16px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.fortune-mood-custom[hidden] {
  display: none !important;
}

.fortune-mood-custom input {
  width: 100%;
  min-height: 48px;
  box-sizing: border-box;
  padding: 0 13px;
  border: 1px solid #f0b0c6;
  border-radius: 12px;
  background: #fff9fb;
  font: inherit;
}

/* ---------- 흑야 문답(결제형) ---------- */
/* 한국어 단어 단위 줄바꿈(반갑습니/다 식 중간 잘림 방지). word-break는 자식에 상속됨. */
.followup-view,
.support-lead {
  word-break: keep-all;
}
.followup-wrap {
  padding: 4px 16px 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.followup-label {
  font-size: 13px;
  font-weight: 800;
  margin: 6px 0 -2px;
}
.followup-select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 12px;
  background: #fff;
  font-size: 14px;
  font-weight: 600;
}
.followup-ask {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #faf7f0;
}
.followup-input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  font-size: 14px;
  line-height: 1.55;
  resize: vertical;
  background: #fff;
  font-family: inherit;
  box-sizing: border-box;
}
.followup-hint {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  word-break: keep-all;
}
.followup-history {
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.followup-history h3 {
  font-size: 14px;
  margin: 8px 0 2px;
}
.qa-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  background: #fff;
  box-shadow: 0 6px 16px rgba(29, 24, 16, 0.05);
}
.qa-q {
  margin: 0 0 9px;
  font-weight: 700;
  line-height: 1.55;
  word-break: keep-all;
}
.qa-q b,
.qa-a b {
  color: var(--jade);
  margin-right: 5px;
}

/* ---------- 강무영 상담각(질의응답권형) ---------- */
.chat-view {
  word-break: keep-all;
}

.chat-poster {
  background: linear-gradient(135deg, #eaf7f2, #e8e1ff);
}

.chat-login-gate {
  margin: 20px 16px;
  padding: 24px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  text-align: center;
}

.chat-login-gate h2,
.chat-products-panel h2,
.chat-conversation h2 {
  margin: 0;
  font-size: 18px;
}

.chat-login-gate p,
.chat-credit-card p,
.chat-report-panel p {
  color: var(--muted);
  line-height: 1.55;
}

.chat-workspace {
  display: grid;
  gap: 14px;
  padding: 16px 16px 32px;
}

.chat-lobby {
  display: grid;
  gap: 14px;
}

.chat-lobby[hidden],
.chat-conversation[hidden] {
  display: none !important;
}

.chat-workspace[hidden] {
  display: none !important;
}

.chat-credit-card {
  padding: 18px;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(135deg, #16584d, #463c83);
  box-shadow: 0 12px 28px rgba(36, 49, 69, 0.14);
}

.chat-credit-card > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.chat-credit-card span {
  font-weight: 800;
}

.chat-credit-card strong {
  font-size: 28px;
}

.chat-credit-card p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
}

.chat-products-panel,
.chat-report-panel,
.chat-history-panel,
.chat-conversation {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  overflow: hidden;
}

.chat-products-panel > header,
.chat-history-panel > header,
.chat-report-panel,
.chat-conversation > header {
  padding: 16px;
}

.chat-products-panel small,
.chat-history-panel small,
.chat-conversation header small {
  display: block;
  margin-bottom: 4px;
  color: var(--jade);
  font-size: 11px;
  font-weight: 900;
}

.chat-product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  padding: 0 14px 16px;
}

.chat-credit-product {
  min-width: 0;
  display: grid;
  gap: 5px;
  padding: 13px 11px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  background: #fffaf0;
  text-align: left;
  cursor: pointer;
}

.chat-credit-product b {
  font-size: 15px;
}

.chat-credit-product span {
  color: var(--rose);
  font-size: 14px;
  font-weight: 900;
}

.chat-credit-product del,
.chat-credit-product small {
  color: var(--muted);
  font-size: 10.5px;
}

.chat-credit-product small {
  color: #9d4965;
  font-weight: 800;
}

.chat-report-panel label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 900;
}

.chat-report-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.chat-report-row select,
.chat-composer textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  font: inherit;
}

.chat-report-row select {
  min-width: 0;
  min-height: 44px;
  padding: 0 10px;
}

.chat-report-row button,
.chat-composer button {
  min-height: 44px;
  border: 0;
  border-radius: 12px;
  padding: 0 14px;
  color: #fff;
  background: var(--ink);
  font-weight: 900;
}

.chat-report-panel p {
  margin: 9px 0 0;
  font-size: 11.5px;
}

.chat-session-list {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.chat-history-panel > header {
  padding-bottom: 10px;
}

.chat-history-panel h2 {
  margin: 2px 0 0;
  font-size: 18px;
}

.chat-history-panel .chat-session-list {
  padding: 0 14px 16px;
}

.chat-session-list button {
  max-width: 220px;
  flex: 0 0 auto;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: #f4f2ec;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}

.chat-session-list button.is-active {
  border-color: var(--ink);
  color: #fff;
  background: var(--ink);
}

.chat-conversation > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--line);
}

.chat-room-back {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  background: #fff;
  font-size: 28px;
  line-height: 1;
}

.chat-room-leading {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.chat-room-copy {
  min-width: 0;
  flex: 1;
}

.chat-report-preview-trigger {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(37, 56, 81, 0.18);
  border-radius: 999px;
  color: var(--ink);
  background: #f4f2ec;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.chat-report-preview-trigger span {
  color: var(--jade);
}

.chat-room-header h2 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-room-header p {
  margin: 3px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-conversation > header > span {
  flex: 0 0 auto;
  color: var(--jade);
  font-size: 11px;
  font-weight: 900;
}

.chat-report-preview[hidden] {
  display: none !important;
}

.chat-report-preview {
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: grid;
  place-items: center;
}

.chat-report-preview-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: rgba(19, 31, 49, 0.56);
  opacity: 0;
  transition: opacity 280ms ease;
  backdrop-filter: blur(3px);
}

.chat-report-preview-panel {
  position: relative;
  width: min(70vw, 760px);
  height: 70dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 28px;
  background: #fffdf9;
  box-shadow: 0 28px 90px rgba(16, 29, 47, 0.34);
  opacity: 0;
  transform: translateY(28px) scale(0.96);
  transition: opacity 280ms ease, transform 280ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.chat-report-preview.is-open .chat-report-preview-backdrop {
  opacity: 1;
}

.chat-report-preview.is-open .chat-report-preview-panel {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.chat-report-preview-panel > header {
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 249, 0.96);
}

.chat-report-preview-panel > header small {
  color: var(--jade);
  font-weight: 900;
}

.chat-report-preview-panel > header h2 {
  margin: 3px 0 0;
  font-size: clamp(20px, 3vw, 28px);
}

.chat-report-preview-panel > header p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.chat-report-preview-close {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 50%;
  color: var(--ink);
  background: #eeece6;
  font-size: 28px;
  line-height: 1;
}

.chat-report-preview-body {
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 24px;
  scrollbar-gutter: stable;
}

.chat-report-preview-document {
  width: min(100%, 680px);
  margin: 0 auto;
  color: var(--ink);
}

.chat-report-preview-eyebrow {
  margin: 0 0 8px;
  color: var(--jade);
  font-size: 13px;
  font-weight: 900;
}

.chat-report-preview-document > h3 {
  margin: 0 0 18px;
  font-size: clamp(22px, 3vw, 32px);
  line-height: 1.35;
}

.chat-report-preview-summary {
  margin-bottom: 22px;
  padding: 16px 18px;
  border-radius: 16px;
  background: #f4f2ec;
  line-height: 1.7;
}

.chat-report-preview-summary p,
.chat-report-preview-copy p {
  margin: 0 0 12px;
}

.chat-report-preview-summary p:last-child,
.chat-report-preview-copy p:last-child {
  margin-bottom: 0;
}

.chat-report-preview-section {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
}

.chat-report-preview-section > span {
  color: var(--jade);
  font-size: 12px;
  font-weight: 900;
}

.chat-report-preview-section h4 {
  margin: 0 0 12px;
  font-size: 18px;
  line-height: 1.4;
}

.chat-report-preview-copy {
  color: #344157;
  font-size: 15px;
  line-height: 1.78;
  overflow-wrap: anywhere;
}

.chat-report-preview-empty {
  margin: 0;
  padding: 48px 16px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 640px) {
  .chat-room-header {
    gap: 7px;
  }

  .chat-room-leading {
    gap: 5px;
  }

  .chat-report-preview-trigger {
    max-width: 92px;
    padding: 0 9px;
    font-size: 10px;
    white-space: normal;
    line-height: 1.15;
  }

  .chat-room-header > span {
    display: none;
  }

  .chat-report-preview-panel {
    width: min(90vw, 760px);
    height: 72dvh;
    border-radius: 22px;
  }

  .chat-report-preview-panel > header,
  .chat-report-preview-body {
    padding-right: 18px;
    padding-left: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .chat-report-preview-backdrop,
  .chat-report-preview-panel {
    transition-duration: 1ms;
  }
}

.chat-messages {
  min-height: 220px;
  max-height: 52vh;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  padding: 16px;
  background: #faf8f3;
}

.chat-bubble {
  max-width: 86%;
  padding: 11px 13px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.62;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.chat-turn {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.chat-turn + .chat-turn {
  margin-top: 8px;
}

.chat-bubble.is-user {
  align-self: flex-end;
  border-bottom-right-radius: 5px;
  color: #fff;
  background: var(--ink);
}

.chat-bubble.is-assistant {
  align-self: flex-start;
  border: 1px solid var(--line);
  border-bottom-left-radius: 5px;
  background: #fff;
  white-space: normal;
  word-break: keep-all;
}

.chat-markdown {
  display: flex;
  flex-direction: column;
  gap: 11px;
  color: var(--ink);
  line-height: 1.72;
}

.chat-markdown p {
  margin: 0;
}

.chat-markdown strong {
  font-weight: 850;
  color: #17233a;
}

.chat-markdown hr {
  width: 100%;
  height: 1px;
  margin: 2px 0;
  border: 0;
  background: linear-gradient(90deg, transparent, #eadfce 12%, #eadfce 88%, transparent);
}

.chat-markdown ol,
.chat-markdown ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding-left: 1.25em;
}

.chat-markdown li {
  padding-left: 2px;
}

.chat-markdown li::marker {
  color: var(--teal);
  font-weight: 850;
}

.chat-markdown li ul {
  gap: 5px;
  margin-top: 7px;
  padding-left: 1.15em;
}

.chat-markdown code {
  padding: 1px 5px;
  border-radius: 7px;
  color: #0f5d50;
  background: #eef8f4;
  font-size: 0.94em;
}

.chat-md-heading {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px !important;
  font-size: 15px;
  font-weight: 850;
}

.chat-md-heading span {
  font-size: 17px;
  line-height: 1;
}

.chat-bubble.is-pending::after {
  content: " · 답변 작성 중";
  color: var(--muted);
  font-size: 11px;
}

.chat-bubble.is-error {
  color: #a62f49;
  background: #fff0f3;
}

.chat-empty-message {
  margin: auto;
  color: var(--muted);
  text-align: center;
  line-height: 1.6;
}

.chat-composer {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-top: 1px solid var(--line);
}

.chat-composer textarea {
  min-height: 78px;
  padding: 11px 12px;
  line-height: 1.55;
  resize: vertical;
}

.chat-composer > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.chat-composer span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.chat-composer button:disabled,
.chat-report-row button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.chat-status {
  min-height: 18px;
  margin: 0;
  text-align: center;
}

.chat-view.is-room-open {
  position: fixed;
  inset: 0;
  z-index: 1200;
  width: 100%;
  max-width: none;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #faf8f3;
}

.chat-view.is-room-open .chat-poster,
.chat-view.is-room-open .chat-login-gate {
  display: none;
}

.chat-view.is-room-open .chat-workspace {
  min-height: 0;
  flex: 1;
  display: flex;
  padding: 0;
}

.chat-view.is-room-open .chat-conversation {
  min-width: 0;
  min-height: 0;
  width: min(100%, 860px);
  height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  border: 0;
  border-radius: 0;
}

.chat-view.is-room-open .chat-room-header {
  min-height: 72px;
  box-sizing: border-box;
  padding-top: max(12px, env(safe-area-inset-top));
  background: rgba(255, 255, 255, 0.96);
}

.chat-view.is-room-open .chat-messages {
  min-height: 0;
  max-height: none;
  flex: 1;
}

.chat-view.is-room-open .chat-composer {
  padding-bottom: max(14px, env(safe-area-inset-bottom));
  background: #fff;
}

.chat-view.is-room-open .chat-status {
  position: absolute;
  right: 16px;
  bottom: calc(104px + env(safe-area-inset-bottom));
  left: 16px;
  z-index: 2;
  pointer-events: none;
}
.qa-a {
  line-height: 1.75;
  color: #36302a;
  word-break: keep-all;
}
.qa-a p {
  margin: 0 0 10px;
}
.qa-a p:last-child {
  margin-bottom: 0;
}
.qa-date {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 11px;
}

.library-filters {
  padding: 14px 16px;
}

.library-retention {
  margin: 0;
  padding: 12px 16px 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.6;
  word-break: keep-all;
}
.library-retention b {
  color: var(--jade);
}

.archive-list article {
  min-height: 92px;
  padding: 18px 16px;
  border-top: 1px solid var(--line);
  background: linear-gradient(90deg, #fff4cd, #fff);
}

.archive-list h2 {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 8px;
  font-size: 18px;
}

.archive-list h2 b {
  width: 21px;
  height: 21px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--gold);
  font-size: 12px;
}

.archive-list p {
  min-height: 0;
  margin: 0;
}

.login-panel,
.payment-panel,
.payment-result {
  margin: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fff;
}

.login-panel p,
.payment-panel p,
.payment-result p,
.plan-list p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.login-panel {
  display: grid;
  gap: 11px;
  background: linear-gradient(135deg, #fff8ca, #fff);
}

.kakao-action,
.ghost-action,
.plan-list button {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  font-weight: 900;
}

.kakao-action {
  color: #392700;
  background: #fee500;
}

.ghost-action {
  color: var(--ink);
  background: #f2f2ec;
}

.plan-list {
  display: grid;
  gap: 10px;
  padding: 0 16px;
}

.plan-list article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: linear-gradient(135deg, #fff, #f1fffb);
}

.plan-list b {
  display: block;
  font-size: 16px;
}

.plan-list button {
  min-width: 110px;
  padding: 0 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--rose), var(--lavender));
}

.payment-panel {
  background: #f7f4ff;
}

.payment-result dl {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 8px;
  margin: 18px 0;
  font-size: 13px;
}

.payment-result dt {
  color: var(--muted);
  font-weight: 900;
}

.payment-result dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.timeline-panel,
.year-panel {
  padding: 18px 16px;
}

.timeline-panel ol {
  display: grid;
  gap: 12px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.timeline-panel li {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 10px;
  align-items: center;
  border-radius: 7px;
  padding: 13px;
  background: #f5f1e8;
}

.timeline-panel span {
  color: var(--muted);
  font-size: 13px;
}

.year-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.year-panel p {
  width: 100%;
  margin-top: 7px;
}

.bottom-nav {
  height: 84px;
  position: fixed;
  z-index: 30;
  left: 50%;
  bottom: 0;
  width: 100%;
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: end;
  gap: 2px;
  border-top: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.96);
  backdrop-filter: blur(16px);
}

.bottom-nav > button {
  min-width: 0;
  min-height: 74px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 4px;
  border: 0;
  color: #444846;
  background: transparent;
  font-size: 12px;
}

.bottom-nav > button img {
  width: 28px;
  height: 28px;
}

.bottom-nav > button.is-active {
  color: var(--rose);
  font-weight: 900;
}

.bottom-nav .fortune-fab {
  align-content: start;
  padding-top: 0;
  transform: translateY(-20px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.fortune-fab span {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  border: 5px solid var(--white);
  border-radius: 50%;
  background: linear-gradient(135deg, var(--rose), var(--lavender), #45c0c6);
  box-shadow: 0 10px 25px rgba(77, 57, 124, 0.26);
}

.fortune-fab span img {
  filter: brightness(0) invert(1);
}

.fortune-fab em {
  color: #54554f;
  font-style: normal;
}

.fortune-fab.fab-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(0px) scale(0.8);
  transition: opacity 180ms ease, transform 180ms ease;
}

@media (max-width: 360px) {
  .topbar {
    padding-inline: 10px;
  }

  .brand {
    width: 90px;
  }

  .brand-wordmark {
    width: auto;
  }

  .brand-text {
    font-size: 15px;
  }

  .top-tools {
    gap: 4px;
  }

  .auth-chip {
    max-width: 72px;
    padding-inline: 7px;
  }

  .product-copy footer {
    align-items: start;
    flex-direction: column;
  }

  .field-grid {
    grid-template-columns: 1fr;
  }
}

.form-step {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffefb;
}

.step-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-weight: 900;
}

.step-heading b {
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--jade);
  font-size: 12px;
}

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

.segmented button,
.time-period-grid button {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  font-weight: 900;
}

.segmented.small button {
  min-height: 38px;
  font-size: 13px;
}

.segmented button.is-active,
.time-period-grid button.is-active {
  border-color: #242424;
  color: #111;
  background: var(--gold);
  box-shadow: 3px 3px 0 rgba(36, 49, 69, 0.12);
}

.time-period-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.time-period-grid b,
.time-period-grid span {
  display: block;
}

.time-period-grid span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.hint-box {
  border: 1px solid #e6ead8;
  border-radius: 8px;
  padding: 11px 12px;
  color: #465446;
  background: #f7faee;
  font-size: 13px;
  line-height: 1.5;
}

.form-status {
  min-height: 20px;
  margin: 0;
  color: var(--rose);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.5;
}

.member-modal {
  position: fixed;
  z-index: 80;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(17, 24, 39, 0.54);
  backdrop-filter: blur(5px);
}

.member-modal[hidden] {
  display: none;
}

.member-modal-card {
  width: min(100%, 400px);
  max-height: 82vh;
  position: relative;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto auto;
  overflow: hidden;
  border: 1px solid rgba(213, 170, 85, 0.24);
  border-radius: 20px;
  background: #fffdf8;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.26);
}

.member-modal-card header {
  padding: 24px 48px 14px 20px;
  text-align: left;
}

.member-modal-card h2 {
  margin: 5px 0 0;
  font-family: "Gowun Batang", serif;
  font-size: 21px;
  color: var(--midnight-ink);
}

.member-modal-card p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.member-modal-kicker {
  color: #9a7227;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.member-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 18px 8px;
  color: #3b4659;
  font-size: 12px;
}

.member-list-head span {
  min-width: 34px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #f1eadb;
  color: #77591f;
  text-align: center;
  font-weight: 900;
}

.modal-close {
  width: 32px;
  height: 32px;
  position: absolute;
  top: 12px;
  right: 12px;
  border: 0;
  border-radius: 50%;
  background: #f2f2ec;
  font-size: 24px;
  line-height: 1;
}

.member-list {
  overflow: auto;
  display: grid;
  gap: 8px;
  padding: 0 14px 8px;
}

.member-row {
  width: 100%;
  min-height: 62px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid #e6dfd1;
  border-radius: 14px;
  padding: 9px 10px;
  color: var(--ink);
  background: #fff;
  text-align: left;
  box-shadow: 0 4px 14px rgba(29, 36, 52, 0.04);
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.member-row:hover,
.member-row:focus-visible {
  border-color: #cba34f;
  background: #fffbef;
  box-shadow: 0 8px 22px rgba(116, 86, 28, 0.12);
  transform: translateY(-1px);
}

.member-row.is-priority {
  border-color: rgba(203, 163, 79, 0.7);
  background: linear-gradient(100deg, #fffaf0, #fff);
}

.avatar {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-weight: 950;
  flex: 0 0 auto;
}

.member-meta {
  min-width: 0;
}

.member-meta b,
.member-meta small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-meta small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.member-meta em {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 6px;
  border-radius: 999px;
  background: #efe1bd;
  color: #795817;
  font-size: 9px;
  font-style: normal;
  vertical-align: 2px;
}

.member-select-mark {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: #9a7227;
  font-weight: 900;
}

.member-select-mark small {
  font-size: 10px;
}

.member-select-mark i {
  font-size: 22px;
  font-style: normal;
  line-height: 1;
}

.member-select-guide {
  padding: 0 18px;
  color: #6f6558 !important;
  font-size: 11px !important;
  text-align: center;
}

.modal-add {
  min-height: 38px;
  margin: 6px 14px 14px;
  border: 1px dashed #cec4b3;
  border-radius: 10px;
  color: #756b5e;
  background: transparent;
  font-size: 12px;
  font-weight: 800;
}

.modal-add:hover {
  border-color: #a88a4d;
  background: #f8f2e7;
  color: #6f5118;
}

.member-modal-card.is-empty .member-list-head,
.member-modal-card.is-empty .member-select-guide {
  display: none;
}

.member-modal-card.is-empty .member-list {
  padding-top: 8px;
}

.member-modal-card.is-empty .modal-add {
  min-height: 46px;
  border-style: solid;
  border-color: var(--rose);
  color: #fff;
  background: var(--rose);
}

.checkout-view {
  min-height: calc(100vh - 92px);
  background: #f5f5f2;
}

.checkout-panel,
.terms-row,
.checkout-actions {
  margin: 12px 16px;
}

.checkout-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 15px;
  background: #fff;
}

.checkout-panel h2 {
  margin: 0 0 10px;
  font-size: 17px;
}

.checkout-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-radius: 8px;
  padding: 14px;
  background: #faf7ef;
}

.checkout-box span,
.amount-panel strong {
  color: var(--rose);
  font-weight: 950;
}

.checkout-profile {
  display: flex;
  align-items: center;
  gap: 12px;
}

.checkout-profile p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.amount-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.amount-panel strong {
  font-size: 24px;
}

.terms-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: #343a40;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.45;
}

.terms-row input {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
}

.checkout-actions {
  display: grid;
  gap: 9px;
}

.secondary-action {
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  font-weight: 950;
}

.analysis-view {
  background: #f4f1ea;
}

.analysis-hero {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 16px;
  background: var(--gold);
}

.analysis-hero > button {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  font-size: 32px;
  line-height: 1;
}

.analysis-hero p,
.analysis-hero h1 {
  margin: 0;
}

.analysis-hero p {
  font-size: 13px;
  font-weight: 900;
}

.analysis-hero h1 {
  margin-top: 5px;
  font-size: 21px;
}

.analysis-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.analysis-chips span {
  border: 1px solid rgba(0, 0, 0, 0.13);
  border-radius: 999px;
  padding: 5px 9px;
  background: rgba(255, 255, 255, 0.42);
  font-size: 12px;
  font-weight: 800;
}

/* ── 사이트 푸터 (사업자정보 + 약관 링크) ── */
.site-footer {
  margin: 28px 16px calc(80px + env(safe-area-inset-bottom));
  padding: 16px 4px 0;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  text-align: center;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 14px;
  margin-bottom: 10px;
}
.footer-links button {
  background: none;
  border: 0;
  padding: 2px 4px;
  font-size: 12px;
  font-weight: 800;
  color: #57564f;
  cursor: pointer;
  text-decoration: underline;
}
.footer-business {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.footer-business span {
  font-size: 11px;
  line-height: 1.5;
  color: #9a988f;
}
.footer-business:empty {
  display: none;
}

/* ── 약관/개인정보/환불 화면 ── */
.legal-view {
  padding-bottom: calc(90px + env(safe-area-inset-bottom));
}
.legal-body {
  padding: 4px 16px 0;
}
.legal-body p {
  margin: 0 0 8px;
  font-size: 13px;
  line-height: 1.7;
  color: #3f3e39;
  white-space: pre-wrap;
  word-break: keep-all;
}

.analysis-section {
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.analysis-section > h2 {
  margin: 0;
  padding: 12px 16px;
  color: #fff;
  background: var(--jade);
  text-align: center;
  font-size: 18px;
}

.manse-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  background: #fff;
}

.manse-column {
  min-width: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.7);
  text-align: center;
}

.manse-label {
  padding: 9px 4px;
  color: #5d625d;
  background: #f1f2ee;
  font-size: 13px;
  font-weight: 900;
}

.manse-cell {
  min-height: 86px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
  border-top: 1px solid rgba(255, 255, 255, 0.65);
}

.manse-cell strong {
  font-size: 31px;
  line-height: 1;
}

.manse-cell span,
.manse-cell small {
  font-size: 12px;
  font-weight: 800;
}

.manse-detail {
  min-height: 108px;
  display: grid;
  place-items: center;
  padding: 8px 4px;
  color: #666;
  background: #fbfaf7;
  font-size: 11px;
  line-height: 1.55;
}

.manse-detail hr {
  width: 24px;
  border: 0;
  border-top: 1px solid var(--line);
}

.manse-grid.is-compact .manse-cell {
  min-height: 64px;
}

.manse-grid.is-compact .manse-cell strong {
  font-size: 25px;
}

.analysis-loading {
  padding: 28px 20px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  text-align: center;
}

.analysis-loading p {
  min-height: 26px;
  margin: 0;
  font-size: 17px;
  font-weight: 950;
}

.progress-track {
  height: 28px;
  position: relative;
  overflow: hidden;
  margin: 20px 0 12px;
  border-radius: 999px;
  background: #ece8de;
}

.progress-track span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold), var(--rose));
  transition: width 0.25s ease;
}

.progress-track b {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 12px;
}

.analysis-loading small {
  color: var(--muted);
  font-weight: 800;
}

.accordion-hint {
  margin: 0;
  padding: 12px 16px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  text-align: center;
  font-size: 13px;
}

.analysis-item {
  border-bottom: 1px solid var(--line);
}

.analysis-toggle {
  width: 100%;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) 20px;
  gap: 10px;
  align-items: center;
  border: 0;
  padding: 16px;
  color: var(--ink);
  background: #fff;
  text-align: left;
}

.analysis-toggle span {
  color: var(--rose);
  font-weight: 950;
}

.analysis-toggle b {
  line-height: 1.45;
}

.analysis-toggle i {
  color: var(--muted);
  font-style: normal;
  font-size: 20px;
  transition: transform 0.2s ease;
}

.analysis-item.is-open .analysis-toggle i {
  transform: rotate(180deg);
}

.analysis-body {
  display: none;
  padding: 0 16px 18px 52px;
  color: #3d4540;
  font-size: 16px;
  line-height: 1.75;
}

.analysis-item.is-open .analysis-body {
  display: block;
}

.analysis-body p {
  margin: 0 0 14px;
}

.related-products {
  padding: 18px 16px 28px;
  background: #fff;
}

.related-products h2 {
  margin: 0 0 12px;
  font-size: 16px;
}

.related-products button {
  width: 100%;
  display: grid;
  gap: 4px;
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--ink);
  background: #fffdf8;
  text-align: left;
  font: inherit;
}

.related-products button b {
  font-size: 14px;
  font-weight: 950;
}

.related-products button small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.scroll-hint {
  position: sticky;
  top: 12px;
  z-index: 12;
  align-self: center;
  justify-self: center;
  margin: 14px auto 0;
  width: max-content;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--gold);
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 6px 18px rgba(36, 49, 69, 0.18);
  animation: scrollHintBob 1.6s ease-in-out infinite;
  pointer-events: none;
}

.scroll-hint[hidden] {
  display: none;
}

@keyframes scrollHintBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

.manse-info-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  background: #fff;
  border-top: 1px solid var(--line);
}

.manse-info-grid > div {
  padding: 8px 4px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: center;
  font-size: 11px;
  font-weight: 800;
  color: #545b54;
  line-height: 1.5;
}

.manse-info-grid > div:nth-child(4n) {
  border-right: 0;
}

.manse-info-grid > div:nth-child(8n+5),
.manse-info-grid > div:nth-child(8n+6),
.manse-info-grid > div:nth-child(8n+7),
.manse-info-grid > div:nth-child(8n+8) {
  background: #f8f6f0;
}

.manse-info-stars {
  font-size: 10.5px;
  color: #5b6157;
  font-weight: 700;
  line-height: 1.55;
}

.manse-grid-preview {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.archive-card {
  display: grid;
  gap: 6px;
  margin: 12px 16px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(135deg, #fffaef, #fff);
  box-shadow: 0 6px 16px rgba(29, 24, 16, 0.04);
}

.archive-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.archive-product {
  color: var(--rose);
  font-size: 12px;
  font-weight: 950;
}

.archive-status {
  color: #116c5c;
  background: #dcf7ef;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 900;
}

.archive-card b {
  font-size: 17px;
}

.archive-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.payment-result.is-success h2,
[data-view="payment"].is-success h2 {
  color: var(--jade);
}

@media (max-width: 360px) {
  .analysis-body {
    padding-left: 16px;
  }

  .analysis-toggle {
    grid-template-columns: 22px minmax(0, 1fr) 18px;
  }
}

.clean-top {
  gap: 6px;
}

.top-link {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 10px;
  color: #4d5149;
  background: #fffdf8;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.profile-card {
  width: 100%;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  color: var(--ink);
  background: #fff;
  text-align: left;
}

.profile-card.is-active {
  border-color: var(--jade);
  box-shadow: 0 0 0 3px rgba(39, 169, 150, 0.12);
}

.profile-card b,
.profile-card small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-card small {
  margin-top: 3px;
  color: var(--muted);
}

.time-chip {
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  color: var(--ink);
  background: #fff;
  text-align: center;
}

.time-chip.is-active {
  border-color: var(--gold);
  background: #fff6d7;
}

.time-chip b,
.time-chip span {
  display: block;
}

.time-chip span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.report-section {
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.report-section summary {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) 24px;
  gap: 10px;
  align-items: center;
  padding: 16px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 950;
  line-height: 1.45;
  cursor: pointer;
  list-style: none;
}

.report-section summary::-webkit-details-marker {
  display: none;
}

.report-section summary span {
  color: var(--rose);
}

/* 접기/펼치기 chevron — 명시적 표시. 닫힘=›(오른쪽), 열림=아래로 회전 */
.report-section summary .report-chevron {
  color: var(--muted);
  font-style: normal;
  font-size: 22px;
  line-height: 1;
  text-align: center;
  transition: transform 0.2s ease;
}
.report-section[open] summary .report-chevron {
  transform: rotate(90deg);
}

/* 리포트 공유 */
.report-share {
  padding: 22px 16px 8px;
  text-align: center;
}
.report-share h3 {
  margin: 0 0 4px;
  font-size: 16px;
}
.report-share-sub {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 13px;
}
.report-share-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.report-share-buttons button {
  flex: 1;
  min-width: 72px;
  padding: 12px 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
}
.report-share-buttons button:active {
  transform: translateY(1px);
}

.report-section p {
  margin: 0;
  padding: 0 16px 18px 16px;
  color: #3d4540;
  white-space: pre-wrap;
  font-size: 16px;
  line-height: 1.75;
}

/* 섹션 본문 로딩(점진적 렌더 — 본문 도착 전 표시) */
.section-loading {
  display: flex;
  gap: 6px;
  padding: 4px 16px 20px 52px;
}
.section-loading span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--rose);
  opacity: 0.35;
  animation: section-dot 1s ease-in-out infinite;
}
.section-loading span:nth-child(2) { animation-delay: 0.15s; }
.section-loading span:nth-child(3) { animation-delay: 0.3s; }
@keyframes section-dot {
  0%, 100% { opacity: 0.25; transform: translateY(0); }
  50% { opacity: 0.9; transform: translateY(-3px); }
}

.section-error {
  margin: 0 16px 18px 52px;
  padding: 14px;
  border: 1px solid rgba(255, 82, 130, 0.28);
  border-radius: 14px;
  background: #fff4f7;
}
.report-section .section-error p {
  margin: 0 0 6px;
  padding: 0;
  color: var(--ink);
  font-weight: 850;
  line-height: 1.5;
}
.section-error small {
  display: block;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.section-retry-button {
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  padding: 10px 14px;
  font-weight: 900;
  cursor: pointer;
}
.section-retry-button:disabled {
  opacity: 0.55;
  cursor: wait;
}

/* 해설 리드 한 줄 */
.report-headline {
  margin: 0;
  padding: 16px 18px;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.6;
  color: var(--ink);
  background: linear-gradient(180deg, #fff7ef, #fff);
  border-bottom: 1px solid var(--line);
}

/* 만세력 근거 칩 */
.report-evidence {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 16px 16px 52px;
}
.report-evidence span {
  font-size: 11px;
  font-weight: 700;
  color: #7a6a52;
  background: #f4efe4;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 9px;
}

/* 개운 처방 카드 (용신/희신 파생 — 사주마다 달라짐) */
.report-lucky {
  margin: 14px 16px 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, #f6f3ff, #fff);
}
.report-lucky-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.report-lucky-head b {
  font-size: 16px;
  font-weight: 950;
  color: var(--ink);
}
.lucky-badge {
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  background: var(--rose);
  border-radius: 999px;
  padding: 4px 10px;
}
.report-lucky-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.report-lucky-grid article {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 8px;
  text-align: center;
  background: var(--white);
}
.report-lucky-grid small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-bottom: 4px;
}
.report-lucky-grid b {
  font-size: 14px;
  font-weight: 900;
}
.lucky-assist {
  display: block;
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
}
.lucky-why {
  margin: 10px 0 0;
  font-size: 14px;
  line-height: 1.65;
  color: #3d4540;
}
/* 대운 타임라인 / 연도 카드 */
.report-timeline {
  margin: 14px 16px 18px;
}
.report-timeline h3 {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 800;
  color: var(--muted);
}
.tl-track {
  display: flex;
  gap: 0;
  overflow-x: auto;
  padding: 4px 2px 8px;
}
.tl-node {
  position: relative;
  flex: 0 0 auto;
  min-width: 58px;
  text-align: center;
  padding-top: 14px;
}
.tl-node::before {
  content: "";
  position: absolute;
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--line);
}
.tl-node::after {
  content: "";
  position: absolute;
  top: 8px;
  left: 50%;
  width: 100%;
  height: 2px;
  background: var(--line);
  z-index: -1;
}
.tl-node:last-child::after { display: none; }
.tl-node.is-now::before {
  background: var(--rose);
  box-shadow: 0 0 0 4px #ffe1ea;
}
.tl-age {
  font-size: 12px;
  color: #6b6258;
  font-weight: 700;
}
.tl-now {
  display: block;
  font-size: 11px;
  font-weight: 900;
  color: var(--rose);
}
.yr-track {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 8px;
}
.yr-card {
  flex: 0 0 auto;
  min-width: 64px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 8px;
  background: var(--white);
}
.yr-card.is-now {
  border-color: var(--rose);
  background: #fff0f4;
}
.yr-card b {
  display: block;
  font-size: 15px;
  font-weight: 900;
  color: var(--ink);
}
.yr-card small {
  font-size: 10px;
  color: var(--muted);
}

.lucky-note {
  margin: 8px 0 0;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.6;
  color: #6b4ea0;
}

/* 궁합 점수 카드 */
.report-compat {
  margin: 14px 16px 18px;
  padding: 18px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, #fff0f4, #fff);
  text-align: center;
}
.compat-score {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
}
.compat-score b {
  font-size: 44px;
  font-weight: 950;
  color: var(--rose);
  line-height: 1;
}
.compat-score small {
  font-size: 15px;
  color: var(--muted);
  font-weight: 800;
}
.compat-gauge {
  margin: 12px auto 0;
  width: 100%;
  height: 10px;
  background: #f0e3e7;
  border-radius: 999px;
  overflow: hidden;
}
.compat-gauge i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #ff9bb6, var(--rose));
  transition: width 0.6s ease;
}
.compat-label {
  margin: 12px 0 0;
  font-size: 16px;
  font-weight: 900;
  color: var(--ink);
  line-height: 1.5;
}
.compat-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-top: 10px;
}
.compat-tags span {
  font-size: 12px;
  font-weight: 700;
  color: var(--rose);
  background: #ffe6ee;
  border-radius: 999px;
  padding: 4px 10px;
}

.order-card {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 14px 16px;
  background: #fff;
}

.order-card b,
.order-card span,
.order-card strong,
.order-card small {
  display: block;
}

.order-card span,
.order-card small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.order-card strong {
  text-align: right;
}

.order-card small.ok,
.status-pill {
  display: inline-block;
  border-radius: 999px;
  padding: 4px 8px;
  color: #116c5c;
  background: #dcf7ef;
  font-weight: 900;
}

.empty-box {
  margin: 14px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 18px;
  color: var(--muted);
  background: #fffdf8;
  text-align: center;
  font-size: 14px;
  font-weight: 800;
}

/* =====================================================================
   사주연구소 Admin — 토스(Toss) 스타일 디자인 시스템
   밝고 친근한 핀테크 톤: 라이트 그레이 캔버스 + 화이트 카드 + 토스 블루,
   부드러운 그림자, 넉넉한 라운딩, 또렷한 위계. (웹폰트 없이 시스템 스택)
   ===================================================================== */
.admin-body {
  /* surfaces */
  --bg: #f7f8fa;
  --card: #ffffff;
  --inset: #f2f4f6;
  --inset-2: #edeff2;
  /* lines */
  --line: #f2f4f6;
  --line-2: #e5e8eb;
  /* text */
  --ink: #191f28;
  --ink-2: #333d4b;
  --text: #4e5968;
  --muted: #6b7684;
  --faint: #8b95a1;
  --fainter: #b0b8c1;
  /* brand: toss blue */
  --blue: #3182f6;
  --blue-press: #1b64da;
  --blue-soft: #e8f3ff;
  /* status */
  --green: #15c47e;
  --green-ink: #0fa968;
  --green-soft: #e7f9f1;
  --red: #f04452;
  --red-ink: #d63a47;
  --red-soft: #fdecee;
  --amber: #f59f00;
  --amber-ink: #c97f00;
  --amber-soft: #fff4e0;
  /* shape */
  --r-xs: 6px;
  --r-sm: 8px;
  --r-md: 10px;
  --r-lg: 12px;
  --r-xl: 16px;
  --r-2xl: 20px;
  --shadow-sm: 0 1px 2px rgba(17, 24, 39, 0.04);
  --shadow: 0 1px 3px rgba(17, 24, 39, 0.05), 0 6px 16px rgba(17, 24, 39, 0.05);
  --ring: 0 0 0 4px rgba(49, 130, 246, 0.16);
  --font: "Pretendard Variable", Pretendard, "Noto Sans KR", system-ui, sans-serif;

  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.01em;
}

/* ---------- Shell / layout ---------- */
.admin-layout {
  width: min(1340px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  background: var(--bg);
}

/* ---------- Sidebar (light) ---------- */
.admin-sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 20px 14px 16px;
  background: var(--card);
  border-right: 1px solid var(--line);
  overflow-y: auto;
}

.admin-sidebar .admin-wordmark {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 2px 6px 22px;
  padding: 0;
  color: var(--ink);
  text-decoration: none;
  font-size: 16px;
  font-weight: 700;
}

.admin-sidebar .admin-wordmark span {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 10px;
  color: #fff;
  background: var(--blue);
  font-size: 17px;
  font-weight: 700;
}

.admin-sidebar .admin-wordmark b {
  font-weight: 700;
}

.admin-side-nav {
  display: grid;
  gap: 2px;
  flex: 1 1 auto;
  align-content: start;
}

/* top-level item (대시보드) + items inside groups */
.admin-side-nav button {
  width: 100%;
  height: 42px;
  border: 0;
  border-radius: var(--r-md);
  padding: 0 12px;
  color: var(--muted);
  background: transparent;
  text-align: left;
  font-family: var(--font);
  font-size: 14.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease;
}

.admin-side-nav button:hover {
  background: var(--inset);
  color: var(--ink-2);
}

.admin-side-nav button.is-active {
  color: var(--blue);
  background: var(--blue-soft);
  font-weight: 700;
}

/* group header — clearly the parent: bigger & bolder than its items */
.admin-side-nav .nav-group-head {
  width: 100%;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 14px 12px 7px;
  margin: 4px 0 0;
  color: var(--ink-2);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 700;
  text-align: left;
}

.admin-side-nav .nav-group-head:hover {
  background: transparent;
  color: var(--blue);
}

.admin-side-nav .nav-group-head::after {
  content: "";
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  margin-right: 3px;
  border-right: 2px solid var(--fainter);
  border-bottom: 2px solid var(--fainter);
  transform: rotate(45deg) translate(-1px, -1px);
  transition: transform 160ms ease;
}

.nav-group.is-collapsed .nav-group-head::after {
  transform: rotate(-45deg) translate(-1px, 1px);
}

/* items sit visually under their header */
.nav-group {
  display: grid;
  gap: 2px;
}

.nav-group-items {
  display: grid;
  gap: 2px;
}

.nav-group-items button {
  height: 38px;
  padding-left: 22px;
  font-size: 14px;
}

.nav-group.is-collapsed .nav-group-items {
  display: none;
}

.admin-sidebar .admin-back {
  margin-top: 14px;
  text-align: center;
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  padding: 11px 12px;
  background: var(--card);
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: background 120ms ease;
}

.admin-sidebar .admin-back:hover {
  background: var(--inset);
}

/* mobile hamburger (hidden on desktop) */
.nav-toggle-mobile {
  display: none;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  background: var(--card);
  cursor: pointer;
}

.nav-toggle-mobile i,
.nav-toggle-mobile i::before,
.nav-toggle-mobile i::after {
  width: 17px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink-2);
}

.nav-toggle-mobile i {
  position: relative;
  display: block;
}

.nav-toggle-mobile i::before,
.nav-toggle-mobile i::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle-mobile i::before {
  top: -5px;
}
.nav-toggle-mobile i::after {
  top: 5px;
}

/* ---------- Main column ---------- */
.admin-main {
  min-width: 0;
  padding: 28px 32px 64px;
}

.admin-page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 22px;
  margin-bottom: 24px;
}

.admin-page-head p {
  margin: 0 0 7px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 700;
}

.admin-page-head h1 {
  margin: 0;
  color: var(--ink);
  font-size: 26px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.03em;
}

.admin-refresh {
  width: auto;
  min-height: 0;
  height: 42px;
  padding: 0 18px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  background: var(--card);
  color: var(--text);
  font-family: var(--font);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 120ms ease;
}

.admin-refresh:hover {
  background: var(--inset);
}

.admin-head-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.admin-updated {
  color: var(--faint);
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
}

/* ---------- Metric cards ---------- */
.admin-metrics-wide {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
  margin: 0 0 14px;
  padding: 0;
}

.admin-metrics-wide[hidden] {
  display: none;
}

.admin-metrics-wide article {
  position: relative;
  display: grid;
  gap: 4px;
  padding: 18px;
  border-radius: var(--r-xl);
  background: var(--card);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line);
  transition: box-shadow 160ms ease, transform 160ms ease, border-color 160ms ease;
}

/* 좌상단 컬러 아이콘 칩 — 카드마다 다른 색/이모지로 한눈에 구분 */
.admin-metrics-wide article::before {
  width: 36px;
  height: 36px;
  margin-bottom: 9px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  font-size: 18px;
  line-height: 1;
  background: var(--chip-bg, var(--blue-soft));
}

.admin-metrics-wide article:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
  border-color: var(--line-2);
}

/* 1행(핵심 지표) 아이콘·색 */
.admin-metrics-wide:not(.admin-metrics-kpi) article:nth-child(1) { --chip-bg: var(--green-soft); }
.admin-metrics-wide:not(.admin-metrics-kpi) article:nth-child(1)::before { content: "💰"; }
.admin-metrics-wide:not(.admin-metrics-kpi) article:nth-child(2) { --chip-bg: var(--blue-soft); }
.admin-metrics-wide:not(.admin-metrics-kpi) article:nth-child(2)::before { content: "👣"; }
.admin-metrics-wide:not(.admin-metrics-kpi) article:nth-child(3) { --chip-bg: var(--green-soft); }
.admin-metrics-wide:not(.admin-metrics-kpi) article:nth-child(3)::before { content: "🧾"; }
.admin-metrics-wide:not(.admin-metrics-kpi) article:nth-child(4) { --chip-bg: var(--amber-soft); }
.admin-metrics-wide:not(.admin-metrics-kpi) article:nth-child(4)::before { content: "📈"; }
.admin-metrics-wide:not(.admin-metrics-kpi) article:nth-child(5) { --chip-bg: var(--blue-soft); }
.admin-metrics-wide:not(.admin-metrics-kpi) article:nth-child(5)::before { content: "✨"; }
.admin-metrics-wide:not(.admin-metrics-kpi) article:nth-child(6) { --chip-bg: var(--red-soft); }
.admin-metrics-wide:not(.admin-metrics-kpi) article:nth-child(6)::before { content: "🚪"; }

/* 2행(보조 KPI) 아이콘·색 */
.admin-metrics-kpi article:nth-child(1) { --chip-bg: var(--red-soft); }
.admin-metrics-kpi article:nth-child(1)::before { content: "📉"; }
.admin-metrics-kpi article:nth-child(2) { --chip-bg: var(--blue-soft); }
.admin-metrics-kpi article:nth-child(2)::before { content: "🆕"; }
.admin-metrics-kpi article:nth-child(3) { --chip-bg: var(--green-soft); }
.admin-metrics-kpi article:nth-child(3)::before { content: "🔁"; }
.admin-metrics-kpi article:nth-child(4) { --chip-bg: var(--amber-soft); }
.admin-metrics-kpi article:nth-child(4)::before { content: "🧮"; }
.admin-metrics-kpi article:nth-child(5) { --chip-bg: var(--blue-soft); }
.admin-metrics-kpi article:nth-child(5)::before { content: "💎"; }

/* 고객 계정 출처 배지 */
.acct-badge {
  display: inline-block;
  margin-left: 5px;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  vertical-align: middle;
}
.acct-kakao { background: #fee500; color: #3a2e00; }
.acct-email { background: var(--blue-soft); color: var(--blue-press); }
.acct-guest { background: var(--inset); color: var(--muted); }

.admin-metrics-wide span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.admin-metrics-wide strong {
  color: var(--ink);
  font-size: 27px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.admin-metrics-wide small {
  color: var(--fainter);
  font-size: 11.5px;
  font-weight: 500;
}

.admin-metrics-kpi {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: 0;
  margin-bottom: 24px;
}

/* ---------- Panels (white cards on gray canvas) ---------- */
.admin-panel {
  margin: 0 0 18px;
  border-radius: var(--r-xl);
  background: var(--card);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.admin-panel[hidden] {
  display: none;
}

.admin-panel h2 {
  margin: 0;
  padding: 20px 22px 4px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.admin-panel h2 ~ h2 {
  margin-top: 10px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.admin-help {
  margin: 0;
  padding: 7px 22px 16px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.admin-help b {
  color: var(--ink-2);
  font-weight: 600;
}

/* ---------- Tables ---------- */
.admin-table {
  margin: 4px 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--card);
  overflow: auto hidden;
}

.admin-table table {
  width: 100%;
  border-collapse: collapse;
  min-width: 480px;
}

.admin-table thead th {
  position: sticky;
  top: 0;
  text-align: left;
  padding: 12px 18px;
  background: var(--inset);
  border-bottom: 1px solid var(--line-2);
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}

.admin-table tbody td {
  padding: 14px 18px;
  border-top: 1px solid var(--line);
  vertical-align: middle;
  color: var(--text);
  font-size: 13.5px;
}

.admin-table tbody tr:first-child td {
  border-top: 0;
}

.admin-table tbody tr:hover td {
  background: var(--inset);
}

.admin-table b {
  display: block;
  color: var(--ink);
  font-weight: 600;
}

.admin-table small {
  display: block;
  margin-top: 3px;
  color: var(--faint);
  font-size: 11.5px;
}

/* ---------- Status pills (Toss soft chips) ---------- */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: var(--r-sm);
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  color: var(--muted);
  background: var(--inset);
}

.status-pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.status-pill.is-ok {
  color: var(--green-ink);
  background: var(--green-soft);
}

.status-pill.is-warn {
  color: var(--amber-ink);
  background: var(--amber-soft);
}

.status-pill.is-danger {
  color: var(--red-ink);
  background: var(--red-soft);
}

.status-pill.is-info {
  color: var(--blue-press);
  background: var(--blue-soft);
}

/* ---------- Empty states ---------- */
.admin-main .empty-box,
.admin-panel .empty-box {
  margin: 16px;
  border: 1px dashed var(--line-2);
  border-radius: var(--r-lg);
  padding: 32px 18px;
  background: var(--inset);
  color: var(--muted);
  text-align: center;
  font-size: 13.5px;
  font-weight: 500;
}

/* ---------- Card grids (checklist / support / settings) ---------- */
.admin-checklist,
.support-cards,
.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 8px 22px 22px;
}

.support-cards {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-checklist article,
.support-cards article,
.settings-grid article {
  border-radius: var(--r-lg);
  padding: 16px 18px;
  background: var(--inset);
}

.admin-checklist b,
.support-cards b,
.settings-grid b {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.admin-checklist p,
.support-cards p,
.settings-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

/* ---------- Forms ---------- */
.product-admin-grid,
.prompt-admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 12px 22px 22px;
}

.product-admin-grid.is-narrow,
.prompt-admin-grid.is-narrow {
  grid-template-columns: minmax(0, 580px);
}

.admin-product-card {
  display: grid;
  gap: 12px;
  border-radius: var(--r-lg);
  padding: 16px 18px;
  background: var(--inset);
}

.admin-product-card label,
.admin-product-card > header {
  display: grid;
  gap: 7px;
  color: var(--text);
  font-size: 12.5px;
  font-weight: 600;
}

.product-admin-grid > label {
  display: grid;
  gap: 7px;
  padding: 16px 18px;
  border-radius: var(--r-lg);
  background: var(--inset);
  color: var(--text);
  font-size: 12.5px;
  font-weight: 600;
}

.admin-product-card input,
.admin-product-card textarea,
.product-admin-grid > label input,
.product-admin-grid > label textarea {
  width: 100%;
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  padding: 12px 13px;
  color: var(--ink);
  background: var(--card);
  font: inherit;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

.admin-product-card input::placeholder,
.admin-product-card textarea::placeholder,
.product-admin-grid > label input::placeholder {
  color: var(--fainter);
  font-weight: 500;
}

.admin-product-card input:focus,
.admin-product-card textarea:focus,
.product-admin-grid > label input:focus,
.product-admin-grid > label textarea:focus {
  outline: 0;
  border-color: var(--blue);
  box-shadow: var(--ring);
}

.admin-product-card textarea {
  resize: vertical;
  min-height: 88px;
}

.admin-product-card img {
  max-width: 100%;
  max-height: 180px;
  object-fit: contain;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--card);
}

.prompt-card > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.prompt-card > header b {
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.prompt-card > header span {
  color: var(--fainter);
  font-size: 11.5px;
  font-weight: 500;
}

.admin-product-card input[type="file"] {
  padding: 10px 13px;
  font-size: 12.5px;
  color: var(--muted);
  cursor: pointer;
}

/* form status line — colored dot + readable text */
.admin-main .form-status {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  padding: 0 22px 20px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 500;
  min-height: 14px;
}

.admin-main .form-status.is-ok {
  color: var(--green-ink);
}

.admin-main .form-status.is-error {
  color: var(--red-ink);
}

.admin-main .form-status.is-ok::before,
.admin-main .form-status.is-error::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  flex: 0 0 auto;
}

/* ---------- Buttons (Toss: friendly, rounded, not uppercase) ---------- */
.admin-main .primary-action,
.admin-main .secondary-action {
  width: auto;
  min-height: 0;
  height: 48px;
  padding: 0 22px;
  border-radius: var(--r-lg);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease;
}

.admin-main .primary-action {
  border: 0;
  color: #fff;
  background: var(--blue);
}

.admin-main .primary-action:hover {
  background: var(--blue-press);
}

.admin-main .secondary-action {
  border: 1px solid var(--line-2);
  color: var(--ink-2);
  background: var(--card);
}

.admin-main .secondary-action:hover {
  background: var(--inset);
}

.admin-save {
  grid-column: 1 / -1;
  justify-self: start;
}

.btn-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 2px;
}

/* ---------- Overview: trends (blue) ---------- */
.admin-trend {
  display: grid;
  gap: 12px;
  padding: 16px 22px 22px;
}

.admin-trend + .admin-trend {
  padding-top: 4px;
}

.admin-trend header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.admin-trend header h3 {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.admin-trend header span {
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 500;
}

.trend-bars {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  align-items: end;
  gap: 6px;
  height: 108px;
  padding: 8px 8px 22px;
  border-radius: var(--r-lg);
  background: var(--inset);
}

.trend-bars span {
  display: block;
  border-radius: 6px 6px 3px 3px;
  background: linear-gradient(180deg, var(--blue) 0%, #5b9bf8 100%);
  min-height: 4px;
  position: relative;
  transition: filter 120ms ease, transform 120ms ease;
}

.trend-bars span:hover {
  filter: brightness(1.07);
  transform: scaleY(1.03);
  transform-origin: bottom;
}

.trend-bars span[data-zero="true"] {
  background: var(--inset-2);
}

.trend-bars span::after {
  content: attr(data-label);
  position: absolute;
  bottom: -19px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--fainter);
  font-size: 10.5px;
  font-weight: 500;
  white-space: nowrap;
}

.trend-bars span:hover::before {
  content: attr(data-value);
  position: absolute;
  top: -28px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: var(--r-sm);
  white-space: nowrap;
  z-index: 2;
}

.trend-bars .trend-empty {
  grid-column: 1 / -1;
  align-self: center;
  justify-self: center;
  min-height: 0;
  background: none;
  color: var(--fainter);
  font-size: 12.5px;
  font-weight: 500;
}

.trend-bars .trend-empty::after {
  content: none;
}

/* ---------- Overview: distribution ---------- */
.distribution-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 6px 22px 22px;
}

.distribution-grid section {
  border-radius: var(--r-lg);
  background: var(--inset);
  padding: 16px;
}

.distribution-grid section h3 {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.distribution-grid ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.distribution-grid li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  font-size: 13px;
  color: var(--text);
}

.distribution-grid li b {
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.distribution-grid li span {
  color: var(--muted);
  font-weight: 700;
}

.distribution-grid .bar {
  height: 6px;
  margin-top: 2px;
  border-radius: 999px;
  background: var(--inset-2);
  overflow: hidden;
  grid-column: 1 / -1;
}

.distribution-grid .bar i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--blue);
}

.distribution-grid li.is-empty {
  display: block;
  color: var(--muted);
  font-weight: 500;
}

/* ---------- Funnel ---------- */
.funnel-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
  padding: 16px 22px 10px;
}

.funnel-grid article {
  display: grid;
  gap: 6px;
  padding: 14px 14px 15px;
  border-radius: var(--r-lg);
  background: var(--inset);
}

.funnel-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.funnel-grid strong {
  color: var(--ink);
  font-size: 23px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.funnel-grid .funnel-rate {
  color: var(--fainter);
  font-size: 11px;
  font-weight: 500;
}

.funnel-grid div {
  height: 6px;
  border-radius: 999px;
  background: var(--inset-2);
  overflow: hidden;
}

.funnel-grid i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--blue);
  font-style: normal;
}

/* ---------- Split grid (sources/utm) ---------- */
.split-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 4px 22px 18px;
}

.split-grid .admin-table {
  margin: 0;
}

/* ---------- Visitor journeys ---------- */
.journey-list {
  margin: 0;
  padding: 4px 22px 18px;
  display: grid;
  gap: 10px;
}

.journey-card {
  display: grid;
  gap: 8px;
  border-radius: var(--r-lg);
  padding: 14px 16px;
  background: var(--inset);
}

.journey-card header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.journey-card header b {
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.journey-card header span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.journey-card .journey-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.journey-card .journey-steps span {
  background: var(--card);
  border-radius: var(--r-sm);
  padding: 4px 10px;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 500;
}

.journey-card .journey-steps span.is-paid {
  background: var(--green-soft);
  color: var(--green-ink);
  font-weight: 700;
}

/* ---------- Login overlay ---------- */
.admin-login {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(25, 31, 40, 0.5);
  backdrop-filter: blur(4px);
}

.admin-login form {
  width: min(360px, 100%);
  display: grid;
  gap: 14px;
  padding: 30px 28px;
  background: var(--card);
  border-radius: var(--r-2xl);
  box-shadow: 0 20px 48px rgba(17, 24, 39, 0.22);
}

.admin-login .admin-login-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-login .admin-login-brand span {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 11px;
  color: #fff;
  background: var(--blue);
  font-size: 19px;
  font-weight: 700;
}

.admin-login h2 {
  margin: 0;
  color: var(--ink);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.admin-login p.sub {
  margin: -6px 0 2px;
  color: var(--muted);
  font-size: 13px;
}

.admin-login input {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  font: inherit;
  font-family: var(--font);
  font-size: 14.5px;
  color: var(--ink);
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

.admin-login input:focus {
  outline: 0;
  border-color: var(--blue);
  box-shadow: var(--ring);
}

.admin-login button {
  padding: 14px;
  border: 0;
  border-radius: var(--r-lg);
  background: var(--blue);
  color: #fff;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background 120ms ease;
}

.admin-login button:hover {
  background: var(--blue-press);
}

.admin-login .admin-login-msg {
  margin: 0;
  min-height: 14px;
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--red-ink);
  font-size: 12.5px;
  font-weight: 500;
}

.admin-login .admin-login-msg:not(:empty)::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red);
  flex: 0 0 auto;
}

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .admin-layout {
    grid-template-columns: 220px minmax(0, 1fr);
  }
  .admin-metrics-wide {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .admin-metrics-kpi {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .funnel-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .distribution-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .admin-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    align-content: start;
    min-height: auto;
  }
  .admin-sidebar {
    position: sticky;
    top: 0;
    z-index: 50;
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0;
    padding: 12px 16px;
    overflow: visible;
    box-shadow: var(--shadow-sm);
  }
  .admin-sidebar .admin-wordmark {
    flex: 1 1 auto;
    margin: 0;
  }
  .nav-toggle-mobile {
    display: inline-flex;
  }
  .admin-side-nav {
    display: none;
    flex-basis: 100%;
    width: 100%;
    grid-auto-flow: row;
    margin-top: 12px;
  }
  .admin-sidebar.nav-open .admin-side-nav {
    display: grid;
  }
  .admin-side-nav button {
    width: 100%;
  }
  .admin-sidebar .admin-back {
    display: none;
  }
  .admin-sidebar.nav-open .admin-back {
    display: block;
    flex-basis: 100%;
    width: 100%;
    margin-top: 12px;
  }
  .admin-main {
    padding: 20px 16px 48px;
  }
  .admin-metrics-wide,
  .admin-metrics-kpi,
  .admin-checklist,
  .support-cards,
  .settings-grid,
  .distribution-grid,
  .split-grid,
  .product-admin-grid,
  .prompt-admin-grid {
    grid-template-columns: 1fr;
  }
  .funnel-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .admin-page-head h1 {
    font-size: 22px;
  }
}

@media (max-width: 420px) {
  .admin-metrics-wide {
    grid-template-columns: repeat(2, 1fr);
  }
}
/* ---------- P0 fixes additions ---------- */
.calendar-grid button.today {
  outline: 2px solid var(--rose, #d97373);
  outline-offset: -2px;
  font-weight: 800;
}

.calendar-grid button.muted {
  color: #c4c8d0;
}

.calendar-grid button[disabled] {
  cursor: default;
  background: transparent;
}

.calendar-status {
  margin: 8px 16px 0;
  color: #c0394d;
  font-size: 12.5px;
  min-height: 16px;
}

.timeline-panel ol li {
  cursor: pointer;
  transition: background 120ms ease;
}

.timeline-panel ol li.is-active {
  background: #fff4cd;
  border-radius: 8px;
}

.year-panel button.is-active {
  background: #ffd97c;
  color: #463a16;
}

.compatibility-form [data-compat-status] {
  margin: 4px 0 0;
  color: #c0394d;
  font-size: 12.5px;
  min-height: 14px;
}

.compat-profile-field {
  display: grid;
  gap: 8px;
}

.compat-profile-field label {
  margin: 0;
}

.compat-profile-field > button {
  justify-self: start;
  padding: 8px 12px;
  border: 1px solid #f05a8a;
  border-radius: 999px;
  color: #c63e70;
  background: #fff4f8;
  font-weight: 800;
}

.checkout-pair {
  display: grid;
  gap: 8px;
}

.checkout-pair .pair-x {
  text-align: center;
  font-weight: 700;
  color: #6c7382;
  font-size: 14px;
}

.archive-card[data-archive-id] {
  width: calc(100% - 32px);
  box-sizing: border-box;
  text-align: left;
  border: 0;
  border-top: 1px solid var(--line);
  cursor: pointer;
  display: grid;
  gap: 4px;
  padding: 18px 16px;
  background: linear-gradient(90deg, #fff4cd, #fff);
  font: inherit;
}

.archive-card[data-archive-id]:hover {
  background: linear-gradient(90deg, #ffe8a3, #fff);
}

/* ===================================================================
   Phase 1 — 마이페이지 / 인원관리 / 결제내역 / 문의 / 결제결과
   =================================================================== */

/* 상단 로그인 칩: 이름이 길어도 "..."로 잘리지 않게 넓힘 */
.auth-chip {
  max-width: 150px;
}

/* ---------- 마이페이지 드로어 ---------- */
.mypage-drawer {
  position: fixed;
  inset: 0;
  z-index: 1200;
}
.mypage-drawer[hidden] {
  display: none;
}
.mypage-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 18, 12, 0.42);
  opacity: 0;
  transition: opacity 0.22s ease;
}
.mypage-drawer.is-open .mypage-backdrop {
  opacity: 1;
}
.mypage-panel {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: min(86%, 340px);
  background: var(--white);
  box-shadow: -18px 0 48px rgba(29, 24, 16, 0.22);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.26s cubic-bezier(0.22, 1, 0.36, 1);
  overflow-y: auto;
}
.mypage-drawer.is-open .mypage-panel {
  transform: translateX(0);
}
.mypage-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  padding: 0 18px;
  background: linear-gradient(120deg, #1d2f4d, #16233c);
  border-bottom: 1px solid rgba(213, 170, 85, 0.4);
  color: #fff8e8;
  position: sticky;
  top: 0;
}
.mypage-head h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 900;
}
.mypage-x {
  border: 0;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 18px;
  line-height: 1;
}
.mypage-id {
  padding: 18px;
  border-bottom: 8px solid #f3efe6;
}
.mypage-id-card {
  display: flex;
  align-items: center;
  gap: 12px;
}
.mypage-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 900;
  color: #fff;
  font-size: 18px;
  flex: none;
}
.mypage-id-text {
  min-width: 0;
}
.mypage-id-text b {
  display: block;
  font-size: 15px;
  font-weight: 900;
}
.mypage-id-text small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 210px;
}
.mypage-login-btn {
  margin-top: 12px;
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 11px;
  background: #fee500;
  color: #391b1b;
  font-weight: 900;
  font-size: 14px;
}
.mypage-menu {
  display: flex;
  flex-direction: column;
}
.mypage-menu button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: var(--white);
  padding: 15px 18px;
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
  text-align: left;
}
.mypage-menu button:hover {
  background: #fbf7ee;
}
.mypage-menu button i {
  color: #c8c2b6;
  font-style: normal;
  font-weight: 700;
}
.mypage-menu-sub button {
  font-weight: 700;
  font-size: 13px;
  color: var(--muted);
  padding: 13px 18px;
}
.mypage-divider {
  height: 8px;
  background: #f3efe6;
}
.mypage-foot {
  margin-top: auto;
  padding: 18px;
}
.mypage-logout {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  padding: 11px;
  font-weight: 800;
  color: var(--muted);
}
.mypage-note {
  margin: 12px 2px 0;
  font-size: 11px;
  line-height: 1.6;
  color: #a59f93;
}

/* ---------- 사주 인원 관리 ---------- */
.people-poster {
  background: linear-gradient(120deg, #dff7ef, #fef0c9);
}
.people-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 16px;
}
.people-toolbar span {
  font-size: 13px;
  font-weight: 800;
  color: var(--muted);
}
.people-add {
  width: auto;
  padding: 10px 14px;
  font-size: 13px;
}
.people-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 16px 24px;
}
.person-card {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  background: var(--white);
}
.person-avatar {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  font-weight: 900;
  color: #fff;
  font-size: 18px;
  flex: none;
}
.person-info {
  flex: 1;
  min-width: 0;
}
.person-info b {
  font-size: 15px;
  font-weight: 900;
}
.person-info small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}
.person-del {
  border: 0;
  background: #fbeaea;
  color: #c0392b;
  border-radius: 10px;
  padding: 8px 11px;
  font-size: 12px;
  font-weight: 800;
  flex: none;
}
.people-empty,
.orders-empty {
  text-align: center;
  color: var(--muted);
  padding: 48px 16px;
  font-size: 14px;
}

/* 계정 데이터 로딩 중 표시(부팅·로그인 직후 "없음" 대신) */
.is-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.inline-spinner {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 3px solid #eee3cf;
  border-top-color: var(--jade);
  animation: daily-spin 0.9s linear infinite;
  display: inline-block;
}

/* ---------- 결제 내역 ---------- */
.orders-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
}
.order-card {
  display: block;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--white);
  overflow: hidden;
}
.order-card-summary {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 14px 16px;
  text-align: left;
  cursor: pointer;
}
.order-card-summary header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.order-card-summary header b {
  font-size: 15px;
  font-weight: 900;
}
.order-amount {
  font-size: 15px;
  font-weight: 900;
  color: var(--jade);
}
.order-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
}
.order-status {
  font-size: 11px;
  font-weight: 900;
  padding: 3px 9px;
  border-radius: 999px;
}
.order-status.ok {
  background: #e7f8ee;
  color: #137a43;
}
.order-status.fail {
  background: #fdecec;
  color: #b42318;
}
.order-status.pending {
  background: #fff3d6;
  color: #9a6b00;
}
.order-report-status { display: inline-block; margin-top: 9px; font-size: 11px; font-weight: 900; }
.order-report-status.ok { color: #137a43; }
.order-report-status.fail { color: #b42318; }
.order-report-status.pending { color: #9a6b00; }
.order-detail { padding: 14px 16px 16px; border-top: 1px solid var(--line); background: #fffdf8; }
.order-detail dl { display: grid; gap: 8px; margin: 0; }
.order-detail dl div { display: flex; justify-content: space-between; gap: 14px; font-size: 12px; }
.order-detail dt { color: var(--muted); }
.order-detail dd { margin: 0; font-weight: 800; text-align: right; word-break: break-all; }
.order-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.order-actions button { flex: 1 1 120px; border: 0; border-radius: 10px; padding: 11px; background: var(--jade); color: #fff; font-weight: 900; cursor: pointer; }
.order-actions button.is-danger { background: #fff; color: #b42318; border: 1px solid #efb5b0; }
.order-error { margin: 12px 0 0; padding: 10px; border-radius: 10px; background: #fdecec; color: #b42318; font-size: 12px; }

/* ---------- 문의하기 ---------- */
.support-lead {
  text-align: center;
  background: #fff0b6;
  margin: 0;
  padding: 12px;
  font-size: 13px;
  font-weight: 800;
}
.support-types {
  display: flex;
  flex-direction: column;
}
.support-types button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: var(--white);
  padding: 16px;
  text-align: left;
}
.support-types button:hover {
  background: #fbf7ee;
}
.support-types b {
  font-size: 14px;
  font-weight: 900;
}
.support-types small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}
.support-types i {
  color: #c8c2b6;
  font-style: normal;
}
.support-contact {
  margin: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  background: #fbf7ee;
}
.support-contact[hidden] {
  display: none;
}
.support-contact h3 {
  margin: 0 0 8px;
  font-size: 15px;
}
.support-contact p {
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}
.support-contact .primary-action {
  width: 100%;
}
.support-contact .support-line {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding: 7px 0;
  border-top: 1px dashed var(--line);
}
.support-contact .support-line b {
  font-weight: 800;
}

/* ---------- 결제 결과 폴리시 ---------- */
/* ===== 결제 결과 페이지 (리디자인) — 영수증 카드 ===== */
.payment-view {
  padding: 30px 18px 44px;
}
.payment-result {
  max-width: 380px;
  margin: 0 auto;
  text-align: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 32px 22px 24px;
  box-shadow: 0 18px 44px rgba(29, 24, 16, 0.1);
}
.payment-status-icon {
  font-size: 50px;
  line-height: 1;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 6px;
}
.payment-view.is-success .payment-status-icon {
  animation: pay-pop 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes pay-pop {
  0% { transform: scale(0.4); opacity: 0; }
  60% { transform: scale(1.15); }
  100% { transform: scale(1); opacity: 1; }
}
.payment-result h2 {
  margin: 4px 0 0;
  font-size: 20px;
  font-weight: 950;
  color: var(--ink);
}
.payment-view.is-success .payment-result h2 {
  color: #137a43;
}
.payment-result > p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.6;
  word-break: keep-all; /* 한국어 어절 단위로 줄바꿈(어색한 '요.' 단독 줄 방지) */
  text-wrap: balance;
}

/* 결제 확인 중 스피너 */
.payment-spinner {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 4px solid #eee3cf;
  border-top-color: var(--jade);
  animation: daily-spin 0.9s linear infinite;
  display: inline-block;
}

/* 영수증 스타일 상세 */
.payment-receipt {
  margin: 22px 0 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #faf7f0;
  padding: 4px 16px;
  text-align: left;
}
.receipt-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px dashed #e6ddcc;
  font-size: 14px;
}
.receipt-row:last-child {
  border-bottom: 0;
}
.receipt-row span {
  color: var(--muted);
}
.receipt-row b {
  font-weight: 800;
  color: var(--ink);
}
.receipt-row.is-amount b {
  font-size: 19px;
  font-weight: 950;
  color: var(--rose);
}

/* 단순 안내 문구(로딩·실패) */
.payment-note {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  word-break: keep-all;
  text-wrap: balance;
}

/* 액션 버튼 */
.payment-result-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 22px;
}
.payment-result-actions .primary-action {
  min-height: 52px;
  font-size: 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--rose), var(--lavender));
  box-shadow: 0 10px 24px rgba(140, 118, 255, 0.26);
}
.payment-result-actions .secondary-action {
  min-height: 46px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  font-weight: 800;
}

/* ===================================================================
   Phase 2 — 오늘의 흑야 전갈 (리치)
   =================================================================== */
.daily-title {
  position: sticky;
  top: 72px;
  z-index: 5;
  background: var(--white);
  color: var(--ink); /* 흰 배경 위 — .view-title 의 흰 글자(#fff) 오버라이드 */
}
.daily-title button {
  color: var(--ink); /* 뒤로(‹) 버튼도 어둡게 — 흰 배경에서 보이도록 */
}
.daily-body {
  display: flex;
  flex-direction: column;
}
.daily-loading {
  text-align: center;
  padding: 80px 24px;
  color: var(--muted);
}
.daily-loading p {
  font-weight: 800;
  color: var(--ink);
  margin: 16px 0 4px;
}
.daily-loading small {
  font-size: 12px;
}
.daily-spinner {
  width: 42px;
  height: 42px;
  margin: 0 auto;
  border-radius: 50%;
  border: 4px solid #eee3cf;
  border-top-color: var(--jade);
  animation: daily-spin 0.9s linear infinite;
}
@keyframes daily-spin {
  to { transform: rotate(360deg); }
}

/* 히어로 */
.daily-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 14px;
  padding: 22px 18px 20px;
  background:
    radial-gradient(circle at 88% 12%, rgba(255, 196, 71, 0.5), transparent 42%),
    linear-gradient(135deg, #ffe0e8, #ffe9d4 55%, #fbf3c9);
}
.daily-hero-top {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #7a6a55;
  font-weight: 700;
}
.daily-headline {
  grid-column: 1;
  margin: 10px 0 0;
  font-size: 20px;
  font-weight: 950;
  line-height: 1.4;
  color: #2c2317;
  max-width: none;
}
.daily-tags {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}
.daily-tags span {
  font-size: 11px;
  font-weight: 800;
  color: #8a5a3a;
  background: rgba(255, 255, 255, 0.65);
  padding: 3px 9px;
  border-radius: 999px;
}
.daily-score {
  position: static;
  grid-column: 2;
  grid-row: 2;
  align-self: center;
  text-align: right;
}
.daily-score b {
  font-size: 40px;
  font-weight: 950;
  color: #2c2317;
  line-height: 1;
}
.daily-score small {
  font-size: 12px;
  color: #8a7a63;
  font-weight: 700;
}

@media (max-width: 420px) {
  .daily-hero {
    grid-template-columns: minmax(0, 1fr);
  }
  .daily-headline,
  .daily-score,
  .daily-tags {
    grid-column: 1;
    grid-row: auto;
  }
  .daily-score {
    margin-top: 8px;
    text-align: left;
  }
}

/* 분야 점수 막대 */
.daily-cats {
  display: flex;
  flex-direction: column;
  gap: 11px;
  padding: 18px;
  border-bottom: 8px solid #f3efe6;
}
.daily-cat {
  display: flex;
  align-items: center;
  gap: 9px;
}
.cat-emoji {
  width: 18px;
  text-align: center;
}
.cat-label {
  flex: 0 0 auto;
  min-width: 34px;
  max-width: 72px;
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cat-bar {
  flex: 1;
  height: 8px;
  border-radius: 999px;
  background: #efe7d6;
  overflow: hidden;
}
.cat-bar i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--jade), #5fd0bd);
  transition: width 0.7s ease;
}
.daily-cat.cat-love .cat-bar i { background: linear-gradient(90deg, #ff7ea3, #ffb0c4); }
.daily-cat.cat-work .cat-bar i { background: linear-gradient(90deg, #ff9b59, #ffc486); }
.daily-cat.cat-money .cat-bar i { background: linear-gradient(90deg, #f0b429, #ffd766); }
.daily-cat.cat-health .cat-bar i { background: linear-gradient(90deg, #34c98a, #8fe6bf); }
.daily-cat.cat-study .cat-bar i { background: linear-gradient(90deg, #7c6bf0, #b3a8f5); }
.daily-cat b {
  width: 26px;
  text-align: right;
  font-size: 12px;
  font-weight: 900;
  color: var(--ink);
}

/* 럭키 카드 */
.daily-lucky {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 16px;
}
.daily-lucky article {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px 8px;
  text-align: center;
  background: var(--white);
}
.daily-lucky small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-bottom: 4px;
}
.daily-lucky b {
  font-size: 14px;
  font-weight: 900;
}

/* 블록 공통 */
.daily-block {
  padding: 18px;
  border-top: 8px solid #f3efe6;
}
.daily-block > h3 {
  margin: 0 0 14px;
  font-size: 15px;
  font-weight: 900;
}

/* 원국 미니 보드 */
.manse-mini {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.mcell {
  background: var(--white);
  text-align: center;
}
.mcell-label {
  font-size: 10px;
  color: var(--muted);
  padding: 5px 0;
  background: #faf6ee;
}
.mcell-gz {
  padding: 9px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.1;
}
.mcell-gz .gz-han {
  font-size: 18px;
  font-weight: 900;
}
.mcell-gz .gz-ko {
  font-size: 9px;
  opacity: 0.85;
}
.mcell-unknown {
  min-height: 74px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}
.el-wood { background: #e7f3da; color: #3f7d2f; }
.el-fire { background: #fde2e0; color: #c43d3d; }
.el-earth { background: #fbeed0; color: #99701b; }
.el-metal { background: #eef0f2; color: #5a6470; }
.el-water { background: #e1ecfb; color: #3a5ea8; }
.mcell-gz.el-wood, .mcell-gz.el-fire, .mcell-gz.el-earth, .mcell-gz.el-metal, .mcell-gz.el-water { color: #2c2c2c; }

.daily-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.daily-meta-row span {
  font-size: 11px;
  color: var(--muted);
  background: #faf6ee;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 9px;
}
.daily-meta-row b {
  color: var(--ink);
  font-weight: 900;
}

/* 오행 분포 */
.el-dist {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  margin-top: 14px;
  height: 76px;
}
.el-bar {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
}
.el-bar > span {
  order: 3;
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}
.el-bar > b {
  order: 1;
  font-size: 11px;
  font-weight: 900;
  margin-bottom: 3px;
}
.el-track {
  order: 2;
  flex: 1;
  width: 16px;
  background: #efe7d6;
  border-radius: 6px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.el-track i {
  width: 100%;
  border-radius: 6px;
  min-height: 4px;
}
.el-track i.el-wood { background: #6aa84f; }
.el-track i.el-fire { background: #e06666; }
.el-track i.el-earth { background: #e8b04b; }
.el-track i.el-metal { background: #9aa0a6; }
.el-track i.el-water { background: #5b7fc7; }

/* 해설 아코디언(전체 펼침) */
.daily-acc {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.daily-acc-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  background: var(--white);
}
.daily-acc-item header {
  font-size: 14px;
  font-weight: 900;
  margin-bottom: 6px;
}
.daily-acc-item p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.7;
  color: #4a4a44;
  white-space: pre-wrap;
}

/* 분야별 한마디 */
.cat-notes {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cat-note b {
  font-size: 13px;
  font-weight: 900;
}
.cat-note p {
  margin: 4px 0 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}

/* 오늘의 작은 실천 */
.daily-quests {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.daily-quests li {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  background: #faf6ee;
}
.daily-quests b {
  display: block;
  font-size: 13px;
  font-weight: 900;
}
.daily-quests span {
  font-size: 12.5px;
  color: var(--muted);
}

/* 음식 추천 */
.daily-food {
  display: flex;
  flex-direction: column;
}
.food-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  background: var(--white);
  margin-bottom: 10px;
}
.food-card small {
  font-size: 11px;
  color: var(--rose);
  font-weight: 800;
}
.food-card b {
  display: block;
  font-size: 15px;
  font-weight: 900;
  margin: 2px 0 4px;
}
.food-card p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--muted);
}
.spot-place {
  font-size: 15px;
  font-weight: 900;
}
.spot-reason {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}

/* 마무리 */
.daily-closing {
  padding: 22px 18px;
  border-top: 8px solid #f3efe6;
  background: linear-gradient(135deg, #fff7e4, #fdeef0);
}
.daily-closing h3 {
  margin: 0 0 8px;
  font-size: 15px;
}
.daily-closing p {
  margin: 0;
  font-size: 14px;
  line-height: 1.8;
  color: #3c352b;
}

/* 교차 추천 */
.daily-cross {
  padding: 18px;
  border-top: 8px solid #f3efe6;
}
.daily-cross h3 {
  margin: 0 0 12px;
  font-size: 14px;
  color: var(--muted);
}
.daily-cross button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--white);
  padding: 13px 15px;
  margin-bottom: 8px;
  text-align: left;
}
.daily-cross button b {
  font-size: 14px;
  font-weight: 900;
}
.daily-cross button small {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}
.daily-cross button i {
  color: #c8c2b6;
  font-style: normal;
}
.daily-foot {
  text-align: center;
  font-size: 11px;
  color: #a59f93;
  padding: 6px 18px 28px;
  line-height: 1.6;
}

/* 인라인 토스 결제위젯 */
.toss-widget {
  margin: 4px 0 12px;
}
.toss-widget[hidden] {
  display: none;
}
#toss-payment-method,
#toss-agreement {
  margin-bottom: 8px;
}

/* 분석 로딩 비주얼 (기본: 귀여운 애니메이션 오브 / 가맹점이 gif·mp4 업로드 시 교체) */
.loading-visual {
  display: flex;
  justify-content: center;
  margin: 6px 0 18px;
}
.loading-orb {
  position: relative;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--rose), var(--lavender), #45c0c6);
  box-shadow: 0 14px 34px rgba(77, 57, 124, 0.28);
  animation: orb-bounce 1.6s ease-in-out infinite;
}
.loading-orb span {
  font-size: 44px;
  font-weight: 900;
  color: #fff;
}
.loading-orb::before,
.loading-orb::after {
  content: "✦";
  position: absolute;
  color: var(--gold);
  animation: orb-twinkle 1.6s ease-in-out infinite;
}
.loading-orb::before {
  top: -6px;
  right: 2px;
  font-size: 18px;
}
.loading-orb::after {
  bottom: 2px;
  left: -4px;
  font-size: 13px;
  animation-delay: 0.8s;
}
@keyframes orb-bounce {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-12px) scale(1.04); }
}
@keyframes orb-twinkle {
  0%, 100% { opacity: 0.25; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.2); }
}
.loading-media {
  width: min(80%, 280px);
  border-radius: 18px;
  display: block;
}

/* 결제 결과 — 주문번호(은은한 칩) */
.payment-ref {
  display: inline-block;
  font-size: 11px;
  color: #8a8576;
  background: #f3efe6;
  border-radius: 999px;
  padding: 5px 12px;
  margin: 16px 0 0;
}
.payment-ref[hidden] {
  display: none;
}

/* 입력 내용 확인(가짜 만세력 미리보기 대체) */
.input-recap {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  background: #fbf7ee;
}
.recap-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.recap-row:last-of-type {
  border-bottom: 0;
}
.recap-row span {
  color: var(--muted);
}
.recap-row b {
  font-weight: 800;
}
.recap-note {
  margin: 10px 0 0;
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
}

/* 인원관리 — 수정/삭제 버튼 */
.person-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: none;
}
.person-edit {
  border: 0;
  background: #eef4ff;
  color: #2f6fd0;
  border-radius: 10px;
  padding: 8px 11px;
  font-size: 12px;
  font-weight: 800;
}

/* 드로어 이메일 로그인/회원가입 폼 */
.email-auth {
  margin-top: 14px;
}
.email-auth-or {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 2px 0 10px;
  color: #a59f93;
  font-size: 11px;
  white-space: nowrap;
}
.email-auth-or::before,
.email-auth-or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
.email-auth-input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
  margin-bottom: 8px;
}
.email-auth-actions {
  display: flex;
  gap: 8px;
}
.email-auth-login,
.email-auth-signup {
  flex: 1;
  border: 0;
  border-radius: 10px;
  padding: 10px;
  font-weight: 800;
  font-size: 13px;
}
.email-auth-login {
  background: var(--jade);
  color: #fff;
}
.email-auth-signup {
  background: #eef0f2;
  color: var(--ink);
}
.email-auth-msg {
  margin: 8px 2px 0;
  font-size: 12px;
  color: #b42318;
  min-height: 14px;
}

/* 인원관리 — 로그인 후 이전(게스트) 데이터 가져오기 안내 */
.import-guest {
  border: 1px solid #d8e6ff;
  background: #f1f6ff;
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 12px;
}
.import-guest p {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.6;
  color: #2f4a7a;
}
.import-guest .primary-action {
  width: 100%;
}

/* ---------- Responsive shell for foldables/tablets ---------- */
.wide-content {
  width: calc(100% - 32px);
  max-width: var(--content-max);
  margin-right: auto;
  margin-left: auto;
}

@media (min-width: 760px) {
  .app-shell {
    min-height: 100dvh;
  }

  .topbar {
    padding-inline: clamp(18px, 3vw, 34px);
  }

  .bottom-nav {
    left: 50%;
  }

  .banner-carousel {
    height: clamp(320px, 34vw, 420px);
  }

  .banner-copy {
    width: min(44%, 430px);
    left: clamp(28px, 5vw, 68px);
  }

  .banner-copy-right {
    right: clamp(28px, 5vw, 68px);
  }

  .product-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }

  .product-card,
  .product-card:nth-child(2n) {
    border-right: 1px solid var(--line);
  }

  .product-card-wide {
    grid-column: span 2;
  }

  .home-story,
  .checkout-panel,
  .checkout-actions,
  .orders-list,
  .people-list,
  .archive-list,
  .library-filters,
  .point-tier-grid,
  .point-history,
  .points-balance-card,
  .report-view > .year-panel,
  .report-view > .primary-action,
  .support-card,
  .calendar-panel,
  .fortune-card,
  .daily-card,
  .followup-panel {
    width: calc(100% - 32px);
    max-width: var(--content-max);
    margin-right: auto;
    margin-left: auto;
  }

  .orders-list,
  .archive-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    align-items: start;
  }

  .archive-card[data-archive-id] {
    width: calc(100% - 32px);
    box-sizing: border-box;
    justify-self: center;
    border: 1px solid var(--line);
    border-radius: 18px;
  }

  .checkout-view,
  .pay-view,
  .payment-view,
  .people-view,
  .orders-view,
  .points-view,
  .support-view,
  .library-view,
  .report-view,
  .calendar-view,
  .fortune-view,
  .daily-view,
  .followup-view {
    padding-inline: clamp(0px, 1.5vw, 16px);
  }

  .chat-workspace {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.82fr);
    align-items: start;
    max-width: var(--content-max);
    margin-inline: auto;
  }

  .chat-credit-card,
  .chat-report-panel {
    grid-column: 1;
  }

  .chat-products-panel,
  .chat-history-panel {
    grid-column: 2;
  }

  .chat-conversation {
    grid-column: 1 / -1;
  }
}

/* HEUKYA premium redesign — 상용 모바일 포스터형 UI 최종 오버라이드
   v3 '여명(黎明) 흑야': 칠흑 대신 새벽빛 남색 + 금빛 광원. 어둡고 칙칙하지 않게. */
:root {
  --midnight-ink: #1a2942;
  --palace-ink: #263a58;
  --royal-gold: #d5aa55;
  --soft-gold: #f3dc9f;
  --blood-moon: #8b3a48;
  --warm-ivory: #f7e8c3;
  --hanji: #fff8e8;
  --paper: #f4e3bb;
  --white: #fffaf0;
  --ink: #172033;
  --muted: #7a705f;
  --line: rgba(213, 170, 85, 0.30);
  --jade: #8d6828;
  --jade-soft: #f8ecd0;
  --rose: #742834;
  --coral: #b98236;
  --gold: #d5aa55;
  --lavender: #26364b;
}

body {
  background:
    radial-gradient(circle at 70% -10%, rgba(213, 170, 85, 0.30), transparent 26rem),
    radial-gradient(circle at 12% 8%, rgba(139, 58, 72, 0.22), transparent 22rem),
    linear-gradient(180deg, #1e2f4f 0%, #33486e 42%, #6d82a8 100%);
}

.app-shell {
  width: 100%;
  max-width: none;
  background:
    radial-gradient(circle at 82% 0%, rgba(213, 170, 85, 0.20), transparent 15rem),
    linear-gradient(180deg, #fffaf0 0%, #f7e8c3 54%, #f0d7a1 100%);
  box-shadow: 0 0 0 1px rgba(213, 170, 85, 0.22), 0 28px 90px rgba(0, 0, 0, 0.42);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 72px;
  padding: 14px 18px;
  background: rgba(255, 250, 240, 0.88);
  border-bottom: 1px solid rgba(213, 170, 85, 0.24);
  backdrop-filter: blur(18px);
}

.brand-text {
  font-size: 20px;
  letter-spacing: -0.04em;
  color: #101826;
}

.brand-mark {
  color: var(--warm-ivory);
  width: 44px;
  height: 44px;
  border-radius: 15px;
  background:
    radial-gradient(circle at 35% 20%, rgba(255, 248, 232, 0.22), transparent 35%),
    linear-gradient(145deg, #16233c, #2c4165);
  border: 1px solid rgba(213, 170, 85, 0.62);
  box-shadow: 0 10px 24px rgba(8, 13, 21, 0.20);
}

.auth-chip {
  color: var(--midnight-ink);
  background: linear-gradient(135deg, #f9e9b7, var(--royal-gold));
  border: 1px solid rgba(116, 75, 20, 0.16);
  box-shadow: 0 10px 20px rgba(213, 170, 85, 0.22);
}

.banner-carousel {
  height: min(132vw, 568px);
  margin: 14px 16px 0;
  border-radius: 34px;
  overflow: hidden;
  background: #22344f;
  border: 1px solid rgba(213, 170, 85, 0.48);
  box-shadow: 0 22px 52px rgba(8, 13, 21, 0.30);
}

.banner-slide {
  height: 100%;
}

.banner-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.banner-slide::after {
  background:
    linear-gradient(180deg, rgba(23, 35, 58, 0.04) 0%, rgba(23, 35, 58, 0.10) 40%, rgba(23, 35, 58, 0.86) 100%),
    radial-gradient(circle at 24% 72%, rgba(213, 170, 85, 0.28), transparent 16rem);
}

.banner-copy,
.banner-copy.banner-copy-right {
  inset: auto 22px 42px 22px;
  max-width: none;
  padding: 0;
}

.banner-copy {
  color: var(--hanji);
  text-shadow: 0 8px 24px rgba(0, 0, 0, 0.66);
}

.banner-copy p {
  display: inline-flex;
  width: fit-content;
  margin: 0 0 10px;
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--soft-gold);
  background: rgba(26, 41, 66, 0.55);
  border: 1px solid rgba(213, 170, 85, 0.40);
  font-size: 11px;
  letter-spacing: 0.10em;
}

.banner-copy h1,
.banner-copy h2 {
  max-width: 320px;
  margin: 0 0 18px;
  font-size: clamp(34px, 10vw, 44px);
  line-height: 0.98;
  letter-spacing: -0.07em;
}

.banner-button {
  width: auto;
  min-width: 148px;
  height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 15px;
  box-shadow: 0 14px 30px rgba(116, 40, 52, 0.34);
}

.carousel-dots {
  bottom: 18px;
  right: 20px;
  left: auto;
  transform: none;
  width: auto;
  padding: 5px;
  border-radius: 999px;
  background: rgba(26, 41, 66, 0.45);
  backdrop-filter: blur(8px);
}

.filters {
  gap: 8px;
  padding: 16px 16px 8px;
  border: 0;
  background: transparent;
}

.filters button {
  flex: 0 0 auto;
  min-height: 42px;
  padding: 0 15px;
  border-radius: 999px;
  border: 1px solid rgba(213, 170, 85, 0.20);
  background: rgba(255, 250, 240, 0.66);
  color: #493b27;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.56);
}

.banner-button,
.primary-action,
.product-copy footer button,
.home-guide-panel button,
.order-actions button,
.payment-result-actions .primary-action,
.bottom-nav .fortune-fab {
  background: linear-gradient(135deg, #7d2e3d 0%, #a86c38 48%, var(--royal-gold) 100%);
  color: #fff8e8;
  border: 1px solid rgba(255, 248, 232, 0.22);
}

.filters button.is-active,
.story-points button.is-active,
.library-filters button.is-active,
.segmented button.is-active,
.bottom-nav > button.is-active {
  color: #fff8e8;
  background: linear-gradient(135deg, var(--midnight-ink), var(--blood-moon));
}

.product-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
  padding: 10px 16px 120px;
}

.product-card,
.form-step,
.checkout-panel,
.archive-card,
.support-card,
.calendar-panel,
.fortune-card,
.daily-card,
.followup-panel,
.chat-credit-card,
.chat-report-panel,
.chat-products-panel,
.chat-history-panel {
  border: 1px solid rgba(213, 170, 85, 0.24);
  background:
    linear-gradient(180deg, rgba(255, 252, 244, 0.96), rgba(246, 230, 190, 0.92));
}

.product-card {
  overflow: hidden;
  border-radius: 26px;
  box-shadow: 0 18px 38px rgba(91, 62, 24, 0.12);
}

.product-card:nth-child(2n) {
  transform: none;
}

.product-image {
  position: relative;
  aspect-ratio: 1 / 1.05;
  min-height: 0;
  background: #22344f;
  border-bottom: 1px solid rgba(213, 170, 85, 0.28);
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: none;
  filter: saturate(0.96) contrast(1.03);
}

.product-image::after {
  background:
    linear-gradient(180deg, rgba(23, 35, 58, 0) 52%, rgba(23, 35, 58, 0.42) 100%);
}

.product-image span {
  position: absolute;
  top: 10px;
  left: 10px;
  width: auto;
  min-width: 0;
  height: auto;
  padding: 5px 9px;
  border-radius: 999px;
  color: #fff8e8;
  background: rgba(26, 41, 66, 0.62);
  border: 1px solid rgba(213, 170, 85, 0.58);
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.04em;
  box-shadow: none;
}

.product-copy {
  padding: 13px 13px 14px;
}

.product-copy h2 {
  margin: 0 0 6px;
  color: #101826;
  font-size: 17px;
  line-height: 1.18;
  letter-spacing: -0.05em;
}

.product-copy p {
  min-height: 42px;
  margin: 0 0 12px;
  color: #756b5b;
  font-size: 12px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-copy footer {
  display: grid;
  gap: 8px;
  align-items: stretch;
}

.product-copy footer strong {
  color: #742834;
  font-size: 14px;
}

.product-copy footer button {
  min-height: 38px;
  border-radius: 14px;
  font-size: 13px;
  box-shadow: 0 10px 18px rgba(116, 40, 52, 0.18);
}

.product-card-wide {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 42% 1fr;
  min-height: 178px;
}

.product-card-wide .product-image {
  aspect-ratio: auto;
  height: 100%;
}

.product-card-wide .product-copy {
  padding: 16px;
}

.home-story {
  margin: 6px 16px 18px;
  border: 1px solid rgba(213, 170, 85, 0.28);
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(30, 47, 79, 0.96), rgba(45, 64, 100, 0.92)),
    repeating-linear-gradient(135deg, rgba(213, 170, 85, 0.12) 0 1px, transparent 1px 18px);
  color: #fff8e8;
}

.home-story h2 {
  color: #f3dc9f;
}

.home-story p,
.home-guide-panel p {
  color: rgba(255, 248, 232, 0.76);
}

.bottom-nav {
  left: 50%;
  bottom: 12px;
  width: min(398px, calc(100% - 24px));
  transform: translateX(-50%);
  border: 1px solid rgba(213, 170, 85, 0.26);
  border-radius: 28px;
  background: rgba(255, 250, 240, 0.88);
  box-shadow: 0 20px 48px rgba(8, 13, 21, 0.24);
  backdrop-filter: blur(18px);
}

.bottom-nav > button {
  color: #51442f;
}

.bottom-nav .fortune-fab {
  width: 62px;
  height: 62px;
  margin-top: -30px;
  box-shadow: 0 18px 36px rgba(8, 13, 21, 0.24);
}

@media (min-width: 720px) {
  .banner-carousel {
    height: 610px;
  }

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

  .product-card-wide {
    grid-column: span 2;
  }
}

/* ─────────────────────────────────────────────────────
   HEUKYA v4 '청월(淸月)' — 상용 프리미엄 폴리시
   포스터형 히어로(9:16 근접 노출) + 명조 디스플레이 서체 + 카드 정제
   ───────────────────────────────────────────────────── */
:root {
  --font-display: "Gowun Batang", "Noto Serif KR", "AppleMyungjo", serif;
}

.brand-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 21px;
  letter-spacing: -0.02em;
}

/* 배너: 세로 포스터 비율로 키워 원본 구도(상단 여백+하단 인물)를 살린다 */
.banner-carousel {
  height: min(158vw, 680px);
  border-radius: 30px;
  border: 1px solid rgba(213, 170, 85, 0.42);
}

.banner-slide img {
  object-position: center 22%;
}

/* 카피를 상단 하늘 여백으로 이동 */
.banner-copy,
.banner-copy.banner-copy-right {
  inset: 30px 22px auto 22px;
}

.banner-slide::after {
  background:
    linear-gradient(180deg, rgba(23, 35, 58, 0.34) 0%, rgba(23, 35, 58, 0.08) 26%, rgba(23, 35, 58, 0) 42%),
    linear-gradient(0deg, rgba(23, 35, 58, 0.30) 0%, rgba(23, 35, 58, 0) 24%);
}

.banner-copy p {
  margin: 0 0 12px;
  padding: 6px 11px;
  max-width: 100%;
  color: #f6e3ae;
  background: rgba(22, 33, 55, 0.34);
  border: 1px solid rgba(213, 170, 85, 0.34);
  backdrop-filter: blur(6px);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.banner-copy h1,
.banner-copy h2 {
  max-width: 300px;
  margin: 0 0 16px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(29px, 8vw, 36px);
  line-height: 1.18;
  letter-spacing: -0.015em;
  color: #fffdf6;
  text-shadow: 0 3px 22px rgba(12, 20, 36, 0.55);
}

.banner-button {
  min-width: 132px;
  height: 46px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: 1px solid rgba(255, 248, 232, 0.34);
  box-shadow: 0 12px 26px rgba(22, 33, 55, 0.36);
}

.carousel-dots {
  bottom: 16px;
  right: 18px;
  background: rgba(22, 33, 55, 0.38);
}

/* 상품 카드 — 청월당급 정제 */
.product-card {
  border-radius: 22px;
  border: 1px solid rgba(213, 170, 85, 0.30);
  box-shadow: 0 12px 28px rgba(43, 58, 88, 0.10);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 40px rgba(43, 58, 88, 0.16);
}

.product-image {
  background: #24365370;
}

.product-image img {
  filter: saturate(1.0) contrast(1.01);
  transition: transform 0.4s ease;
}

.product-card:hover .product-image img {
  transform: scale(1.035);
}

.product-image::after {
  background: linear-gradient(180deg, rgba(23, 35, 58, 0) 62%, rgba(23, 35, 58, 0.30) 100%);
}

.product-image span {
  top: 10px;
  left: 10px;
  right: auto;
  bottom: auto;
  width: fit-content;
  height: auto;
  padding: 5px 10px;
  background: rgba(22, 33, 55, 0.52);
  border: 1px solid rgba(213, 170, 85, 0.50);
  backdrop-filter: blur(6px);
  letter-spacing: 0.06em;
}

.product-copy h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16.5px;
  letter-spacing: -0.02em;
  color: #14203a;
}

.product-copy footer strong {
  font-size: 15px;
  letter-spacing: -0.01em;
}

/* 섹션 제목 서체 통일 */
.home-story h2,
.view-title h1,
.analysis-hero h1,
.home-guide-panel h2,
.daily-hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.015em;
}

/* 입장 모션 — 첫 페인트 한 번만, 절제된 스태거 */
@keyframes heukya-rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

.banner-copy {
  animation: heukya-rise 0.6s ease 0.05s both;
}

[data-view="home"].is-active .product-card {
  animation: heukya-rise 0.55s ease both;
}

[data-view="home"].is-active .product-card:nth-child(1) { animation-delay: 0.06s; }
[data-view="home"].is-active .product-card:nth-child(2) { animation-delay: 0.12s; }
[data-view="home"].is-active .product-card:nth-child(3) { animation-delay: 0.18s; }
[data-view="home"].is-active .product-card:nth-child(4) { animation-delay: 0.24s; }
[data-view="home"].is-active .product-card:nth-child(5) { animation-delay: 0.30s; }
[data-view="home"].is-active .product-card:nth-child(6) { animation-delay: 0.36s; }
[data-view="home"].is-active .product-card:nth-child(7) { animation-delay: 0.42s; }
[data-view="home"].is-active .product-card:nth-child(8) { animation-delay: 0.48s; }

@media (prefers-reduced-motion: reduce) {
  .banner-copy,
  [data-view="home"].is-active .product-card {
    animation: none;
  }

  .product-card,
  .product-image img {
    transition: none;
  }
}

@media (min-width: 720px) {
  .banner-carousel {
    height: 640px;
  }

  .banner-slide img {
    object-position: center 30%;
  }
}

/* 설명 2줄 클램프 강제(부분 노출 방지) — min-height가 2줄 높이보다 크면
   3번째 줄 상단이 슬쩍 보이므로 min-height를 푼다 */
.product-copy p {
  min-height: 0;
  max-height: calc(1.55em * 2);
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

/* ─────────────────────────────────────────────────────
   HEUKYA v5 '묵선(墨線)' — 에디토리얼 럭셔리 오버라이드
   둥근 라운드·그라데이션 캔디 제거: 직선에 가까운 radius,
   헤어라인 보더, 플랫 잉크+골드. 서체·이미지는 v4 유지.
   ───────────────────────────────────────────────────── */

/* 1) 라운드 평탄화 */
.banner-carousel { border-radius: 12px; }
.product-card { border-radius: 6px; }
.brand-mark { border-radius: 7px; }
.bottom-nav { border-radius: 12px; }
.home-story { border-radius: 10px; }
.carousel-dots { border-radius: 2px; }

.form-step,
.checkout-panel,
.archive-card,
.support-card,
.calendar-panel,
.fortune-card,
.daily-card,
.followup-panel,
.chat-credit-card,
.chat-report-panel,
.chat-products-panel,
.chat-history-panel {
  border-radius: 8px;
}

/* 2) 버튼 — 플랫 잉크 + 골드 헤어라인 (그라데이션 제거) */
.banner-button,
.primary-action,
.product-copy footer button,
.home-guide-panel button,
.order-actions button,
.payment-result-actions .primary-action,
.support-contact .primary-action {
  background: var(--midnight-ink);
  color: #f3dc9f;
  border: 1px solid rgba(213, 170, 85, 0.52);
  border-radius: 3px;
  box-shadow: none;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.banner-button:hover,
.primary-action:hover,
.product-copy footer button:hover {
  background: #24365a;
}

.product-copy footer button { border-radius: 3px; min-height: 40px; }
.banner-button { height: 46px; min-width: 128px; border-radius: 3px; }

/* 3) 칩·필터 — 직사각 헤어라인 태그 */
.filters button,
.story-points button,
.library-filters button,
.segmented button {
  border-radius: 3px;
  background: transparent;
  border: 1px solid rgba(26, 41, 66, 0.24);
  color: #33415e;
  box-shadow: none;
  letter-spacing: 0.03em;
}

.filters button.is-active,
.story-points button.is-active,
.library-filters button.is-active,
.segmented button.is-active,
.bottom-nav > button.is-active {
  background: var(--midnight-ink);
  color: #f6e3ae;
  border-color: var(--midnight-ink);
}

.auth-chip {
  border-radius: 3px;
  background: transparent;
  border: 1px solid rgba(143, 111, 42, 0.55);
  color: #1c2a44;
  box-shadow: none;
  font-weight: 700;
  letter-spacing: 0.04em;
}

/* 4) 배너 카피 — pill 박스 대신 골드 룰 라인 + 트래킹 텍스트 */
.banner-copy h1::before,
.banner-copy h2::before {
  content: "";
  display: block;
  width: 34px;
  height: 2px;
  margin: 0 0 14px;
  background: var(--royal-gold);
}

.banner-copy p {
  padding: 0;
  background: transparent;
  border: 0;
  backdrop-filter: none;
  border-radius: 0;
  color: #f3dc9f;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-shadow: 0 2px 12px rgba(12, 20, 36, 0.6);
}

.product-image span {
  border-radius: 2px;
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  background: rgba(16, 24, 42, 0.58);
}

/* 5) 그림자 절제 */
.banner-carousel { box-shadow: 0 10px 30px rgba(8, 13, 21, 0.16); }

.product-card {
  box-shadow: 0 4px 14px rgba(26, 32, 51, 0.08);
}

.product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(26, 32, 51, 0.13);
}

.bottom-nav { box-shadow: 0 10px 28px rgba(8, 13, 21, 0.16); }

/* 6) FAB — 티얼 캔디 제거, 잉크 + 골드 링 */
.fortune-fab span {
  border: 4px solid #fffaf0;
  background: linear-gradient(150deg, #22344f, #1a2942);
  box-shadow: 0 0 0 1px rgba(213, 170, 85, 0.55), 0 10px 22px rgba(8, 13, 21, 0.28);
}

.bottom-nav .fortune-fab {
  background: transparent;
  border: 0;
  box-shadow: none;
}

/* ─────────────────────────────────────────────────────
   HEUKYA v6 — 프리미엄 가로 카드 · 이용 안내 리디자인 · 푸터 메뉴
   ───────────────────────────────────────────────────── */

/* 1) 운명 완전개봉 프리미엄 — 히어로 직하단 가로 배너형 카드 */
.premium-unboxing-card {
  display: grid;
  grid-template-columns: 38% 1fr;
  margin: 14px 16px 4px;
  border: 1px solid rgba(213, 170, 85, 0.55);
  border-radius: 10px;
  overflow: hidden;
  background:
    radial-gradient(circle at 88% 12%, rgba(213, 170, 85, 0.16), transparent 12rem),
    linear-gradient(150deg, #1a2942 0%, #16233c 58%, #101a30 100%);
  box-shadow: 0 10px 26px rgba(8, 13, 21, 0.22);
}

.premium-unboxing-card .product-image {
  aspect-ratio: auto;
  height: 100%;
  min-height: 172px;
  border: 0;
  border-right: 1px solid rgba(213, 170, 85, 0.34);
  background: #101a30;
}

.premium-unboxing-card .product-image::after {
  background: linear-gradient(90deg, rgba(16, 26, 48, 0) 70%, rgba(16, 26, 48, 0.55) 100%);
}

.premium-unboxing-card .product-copy {
  padding: 16px 16px 14px;
  min-height: 0;
}

.premium-unboxing-card .premium-flag {
  display: block;
  margin: 0 0 8px;
  color: var(--royal-gold);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
}

.premium-unboxing-card .product-copy h2 {
  margin: 0 0 7px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: #fff8e8;
}

.premium-unboxing-card .product-copy p {
  display: block;
  min-height: 0;
  max-height: none;
  -webkit-line-clamp: unset;
  line-clamp: none;
  margin: 0 0 12px;
  color: rgba(246, 229, 190, 0.78);
  font-size: 12px;
  line-height: 1.62;
}

.premium-unboxing-card .product-copy footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(213, 170, 85, 0.22);
}

.premium-unboxing-card .product-copy footer strong {
  color: var(--soft-gold);
  font-size: 16px;
  letter-spacing: 0.02em;
}

.premium-unboxing-card .product-copy footer button {
  min-height: 40px;
  padding: 0 16px;
  background: var(--royal-gold);
  color: #16233c;
  border: 0;
  border-radius: 3px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.premium-unboxing-card .product-copy footer button:hover {
  background: #e0b964;
}

/* 2) 상품 그리드 하단 죽은 공간 제거 (120px → 20px) */
.product-grid {
  padding: 10px 16px 20px;
}

/* 3) '처음이어도 막히지 않게' — 한지 위 잉크 패널로 완전 리디자인 */
.home-story {
  margin: 8px 16px 26px;
  padding: 24px 18px 18px;
  border: 1px solid rgba(26, 41, 66, 0.16);
  border-radius: 10px;
  background:
    repeating-linear-gradient(0deg, rgba(26, 41, 66, 0.028) 0 1px, transparent 1px 22px),
    linear-gradient(180deg, #fffdf6 0%, #f8eed4 100%);
  color: var(--ink);
}

.home-story h2 {
  margin: 0 0 6px;
  color: #16233c;
  font-size: 21px;
}

.home-story h2::before {
  content: "";
  display: block;
  width: 30px;
  height: 2px;
  margin: 0 0 12px;
  background: var(--royal-gold);
}

.home-story p,
.home-story .home-guide-intro {
  margin: 0 0 14px;
  color: #5c6a85;
  font-size: 13px;
  line-height: 1.6;
}

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

.home-story .story-points button {
  min-height: 38px;
  padding: 0 4px;
  font-size: 12px;
  border: 1px solid rgba(26, 41, 66, 0.22);
  background: rgba(255, 253, 246, 0.7);
  color: #33415e;
}

.home-story .story-points button.is-active {
  background: var(--midnight-ink);
  border-color: var(--midnight-ink);
  color: #f6e3ae;
}

.home-guide-panel {
  gap: 7px;
  margin-top: 12px;
  padding: 18px 16px;
  border: 1px solid rgba(213, 170, 85, 0.38);
  border-radius: 8px;
  background: linear-gradient(160deg, #1d2f4d, #16233c);
}

.home-guide-panel small {
  color: var(--royal-gold);
  font-weight: 700;
  letter-spacing: 0.16em;
}

.home-guide-panel h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  color: #fff8e8;
}

.home-guide-panel p {
  margin: 0 0 6px;
  color: rgba(246, 229, 190, 0.75);
  font-size: 13px;
  line-height: 1.6;
}

.home-guide-panel button {
  width: fit-content;
  min-height: 40px;
  padding: 0 18px;
  background: var(--royal-gold);
  color: #16233c;
  border: 0;
  border-radius: 3px;
  font-weight: 700;
}

/* 4) 푸터 — 메뉴 바로가기 복원 + 바텀내브 여유 */
.site-footer {
  padding-bottom: 132px;
}

.footer-menu {
  max-width: 430px;
  margin: 0 auto;
  padding: 20px 18px 4px;
}

.footer-menu b {
  display: block;
  margin: 0 0 10px;
  color: #3d4a66;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.footer-menu-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.footer-menu-grid button {
  min-height: 38px;
  padding: 0 8px;
  border: 1px solid rgba(26, 41, 66, 0.18);
  border-radius: 3px;
  background: rgba(255, 253, 246, 0.6);
  color: #33415e;
  font-size: 12px;
  letter-spacing: 0.02em;
  text-align: center;
}

.footer-menu-grid button:hover {
  border-color: rgba(26, 41, 66, 0.4);
}

/* 한국어 제목 단어 단위 줄바꿈 */
.premium-unboxing-card .product-copy h2,
.product-copy h2,
.banner-copy h1,
.banner-copy h2,
.home-story h2,
.home-guide-panel h3 {
  word-break: keep-all;
}

/* ─────────────────────────────────────────────────────
   HEUKYA v7 — 바텀내브 활성 상태: 잉크 슬랩 제거,
   골드 언더바 인디케이터 (에디토리얼)
   ───────────────────────────────────────────────────── */
.bottom-nav > button {
  position: relative;
  transition: color 160ms ease;
}

.bottom-nav > button.is-active {
  background: transparent;
  border-color: transparent;
  color: #16233c;
  font-weight: 700;
}

.bottom-nav > button:not(.fortune-fab).is-active::after {
  content: "";
  position: absolute;
  bottom: 9px;
  left: 50%;
  width: 18px;
  height: 2px;
  transform: translateX(-50%);
  background: var(--royal-gold);
}

.bottom-nav > button:not(.fortune-fab).is-active img {
  filter: none;
}

/* ─────────────────────────────────────────────────────
   HEUKYA v8 — 서브페이지 테마·서체 통일
   구테마 잔재(emerald/rose 색바, 핑크 pill) 제거,
   홈과 동일한 잉크+금+한지 팔레트 + 고운바탕 디스플레이 서체
   ───────────────────────────────────────────────────── */

/* 1) 뷰 타이틀 — 색바 제거, 한지 위 잉크 헤더 + 금 헤어라인 */
.view-title {
  position: sticky;
  top: 72px;
  z-index: 6;
  height: 60px;
  padding: 0 16px;
  background: rgba(255, 250, 240, 0.94);
  border-bottom: 1px solid rgba(213, 170, 85, 0.30);
  backdrop-filter: blur(12px);
}

.view-title.emerald,
.view-title.rose,
.view-title.daily-title {
  background: rgba(255, 250, 240, 0.94);
  color: var(--ink);
}

.view-title h1,
.chat-head h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.02em;
  color: #16233c;
}

.view-title button {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 3px;
  color: #16233c;
  font-size: 26px;
}

.view-title button:hover {
  background: rgba(26, 41, 66, 0.06);
}

/* 2) 서브페이지 패널 — 한지 카드 통일 */
.form-step,
.checkout-panel,
.calendar-panel,
.fortune-card,
.followup-panel,
.support-card,
.points-card,
.order-card,
.report-section {
  border: 1px solid rgba(213, 170, 85, 0.24);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 253, 246, 0.96), rgba(248, 238, 212, 0.7));
}

/* 3) 스텝 번호 뱃지 — 잉크+금 */
.step-heading b {
  background: var(--midnight-ink);
  color: var(--soft-gold);
  border: 1px solid rgba(213, 170, 85, 0.5);
}

.step-heading span {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* 4) 세그먼트 토글 — 잉크 활성(홈과 동일) */
.segmented {
  border: 1px solid rgba(26, 41, 66, 0.16);
  border-radius: 4px;
  background: rgba(255, 253, 246, 0.6);
}

.segmented button {
  border-radius: 3px;
}

.segmented button.is-active {
  background: var(--midnight-ink);
  color: #f6e3ae;
}

/* 5) 고스트/보조 pill 버튼(핑크 잔재 등) → 잉크·금 헤어라인 사각 */
.compat-profile-field > button,
.year-panel button {
  border: 1px solid rgba(26, 41, 66, 0.22);
  border-radius: 3px;
  color: #33415e;
  background: rgba(255, 253, 246, 0.7);
  font-weight: 700;
}

.compat-profile-field > button:hover {
  border-color: rgba(213, 170, 85, 0.6);
  color: #16233c;
}

.year-panel button.is-active {
  background: var(--midnight-ink);
  color: #f6e3ae;
}

.compatibility-form [data-compat-status] {
  color: var(--blood-moon);
}

/* 6) 연도 카드 현재 표시 → 금 */
.yr-card.is-now {
  border-color: rgba(213, 170, 85, 0.7);
  background: #fbf1d9;
}

/* 7) 폼 라벨·제목 가독성 */
.stack-form label,
.fortune-card label,
.compat-profile-field label {
  color: #2a3550;
}

/* 8) 리포트/분석 제목 서체 통일 */
.analysis-hero h1,
.report-title h1,
.report-headline,
.daily-hero h1,
.chat-report-title,
.section-title,
.report-section h2 {
  font-family: var(--font-display);
  letter-spacing: -0.015em;
}

/* v8 후속 — 포인트 녹색 카드 · 슬림포스터 헤더 통일 */
.mypage-points,
.points-balance-card {
  background: linear-gradient(150deg, #1d2f4d, #16233c);
  border: 1px solid rgba(213, 170, 85, 0.34);
}

.points-poster,
.points-hero {
  background: linear-gradient(135deg, #16233c, #b98236) !important;
}

/* 슬림포스터(챗봇·리포트 등 서브 헤더) → 잉크 그라데이션 + 한지 스크림 제거 */
.slim-poster {
  height: auto;
  min-height: 96px;
  padding: 20px;
  background: linear-gradient(135deg, #1d2f4d 0%, #16233c 62%, #101a30 100%);
  border-bottom: 1px solid rgba(213, 170, 85, 0.34);
}

.slim-poster::before,
.slim-poster::after {
  display: none;
}

.slim-poster p {
  color: var(--soft-gold);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.slim-poster h1 {
  font-family: var(--font-display);
  font-weight: 700;
  color: #fff8e8;
}

/* ─────────────────────────────────────────────────────
   HEUKYA v9 — 히어로 CSS 시네마그래프 (움직임)
   정적 리치 이미지 위에 떠오르는 금빛 입자·숨쉬는 광원·별 반짝임.
   grok webp 대체(용량 0, reduced-motion 대응).
   ───────────────────────────────────────────────────── */
.hero-fx {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.banner-slide .banner-copy {
  z-index: 3;
}

/* 함에서 번지는 숨쉬는 금빛 광원 */
.hero-glow {
  position: absolute;
  left: 50%;
  bottom: 20%;
  width: 68%;
  height: 34%;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(255, 201, 94, 0.34), rgba(255, 201, 94, 0.10) 45%, transparent 72%);
  mix-blend-mode: screen;
  animation: heroGlow 4.8s ease-in-out infinite;
}

@keyframes heroGlow {
  0%, 100% { opacity: 0.5; transform: translateX(-50%) scale(1); }
  50% { opacity: 0.95; transform: translateX(-50%) scale(1.09); }
}

/* 위로 떠오르는 금빛 입자 */
.hero-motes {
  position: absolute;
  left: 0;
  right: 0;
  top: -25%;
  height: 150%;
  background-image:
    radial-gradient(2.4px 2.4px at 18% 82%, rgba(255, 226, 150, 0.95), transparent 60%),
    radial-gradient(1.8px 1.8px at 32% 68%, rgba(255, 214, 128, 0.85), transparent 60%),
    radial-gradient(2.2px 2.2px at 47% 90%, rgba(255, 232, 170, 0.9), transparent 60%),
    radial-gradient(1.6px 1.6px at 58% 74%, rgba(255, 210, 120, 0.8), transparent 60%),
    radial-gradient(2.6px 2.6px at 68% 86%, rgba(255, 228, 158, 0.95), transparent 60%),
    radial-gradient(1.5px 1.5px at 78% 66%, rgba(255, 216, 132, 0.8), transparent 60%),
    radial-gradient(2px 2px at 40% 60%, rgba(255, 222, 146, 0.85), transparent 60%),
    radial-gradient(1.7px 1.7px at 62% 54%, rgba(255, 208, 118, 0.75), transparent 60%),
    radial-gradient(2.3px 2.3px at 27% 48%, rgba(255, 230, 162, 0.85), transparent 60%),
    radial-gradient(1.6px 1.6px at 72% 44%, rgba(255, 214, 128, 0.7), transparent 60%);
  background-repeat: no-repeat;
  animation: heroRise 8.5s linear infinite;
  will-change: transform, opacity;
}

@keyframes heroRise {
  0% { transform: translateY(6%); opacity: 0; }
  18% { opacity: 1; }
  82% { opacity: 1; }
  100% { transform: translateY(-16%); opacity: 0; }
}

/* 별 반짝임 */
.hero-twinkle {
  position: absolute;
  inset: 0 0 55% 0;
  background-image:
    radial-gradient(1.5px 1.5px at 22% 24%, rgba(255, 255, 255, 0.95), transparent 60%),
    radial-gradient(1.2px 1.2px at 66% 16%, rgba(255, 255, 255, 0.85), transparent 60%),
    radial-gradient(1.4px 1.4px at 84% 30%, rgba(255, 246, 220, 0.9), transparent 60%),
    radial-gradient(1.1px 1.1px at 44% 12%, rgba(255, 255, 255, 0.8), transparent 60%);
  background-repeat: no-repeat;
  animation: heroTwinkle 3.6s ease-in-out infinite;
}

@keyframes heroTwinkle {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-glow, .hero-motes, .hero-twinkle { animation: none; }
  .hero-motes { opacity: 0.6; transform: none; }
}

/* ─────────────────────────────────────────────────────
   HEUKYA v10 — 헤딩 전역 고운바탕(명조) 통일
   제목/헤딩은 고운바탕, 본문·버튼·입력·라벨은 Pretendard 산세리프.
   ───────────────────────────────────────────────────── */

/* 사용자 요청: 앱 전역 고운바탕(명조) 통일 — 제목뿐 아니라 본문·메뉴·
   버튼·입력까지 전부 고운바탕. --font 를 전역에서 고운바탕 스택으로
   정의하면 var(--font) 를 쓰는 모든 본문/컨트롤이 함께 명조로 바뀐다.
   (.admin-body 는 데이터 밀집 내부 화면이라 자체 Pretendard 유지) */
:root {
  --font: "Gowun Batang", "Noto Serif KR", "AppleMyungjo", serif;
}
h1, h2, h3, h4,
.slim-poster h1,
.points-poster h1,
.view-title h1,
.chat-head h1,
.analysis-hero h1,
.report-title h1,
.report-headline,
.daily-hero h1,
.home-story h2,
.home-guide-panel h3,
.product-copy h2,
.premium-unboxing-card .product-copy h2,
.banner-copy h1,
.banner-copy h2,
.mypage-head h2,
.mypage-id-text b,
.points-balance-card strong,
.compat-score b,
.daily-score strong,
.section-title,
.step-heading span {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.015em;
}

/* 전역 고운바탕: 본문·컨트롤·라벨도 명조로 통일.
   (var(--font) 가 이제 고운바탕이라 명시 목록도 함께 명조가 된다) */
body,
button,
input,
select,
textarea,
p,
small,
label,
.mypage-menu button,
.bottom-nav > button,
.footer-menu-grid button,
.filters button,
.segmented button,
.product-copy p,
.banner-copy p,
.premium-flag,
.step-heading b,
[data-points-tokens] {
  font-family: var(--font-display);
}

/* ─────────────────────────────────────────────────────
   ACCOUNT + SUPPORT — compact drawer, signup, private Q&A
   ───────────────────────────────────────────────────── */
.mypage-panel {
  width: min(100%, 420px);
  max-width: 420px;
  background: #fffaf0;
  box-shadow: -12px 0 38px rgba(12, 20, 36, 0.24);
}

.mypage-head {
  z-index: 2;
  flex: 0 0 64px;
  height: 64px;
  padding: 0 20px;
}

.mypage-head h2 {
  font-size: 22px;
  line-height: 1;
}

.mypage-x {
  width: 36px;
  height: 36px;
  font-size: 23px;
}

.mypage-id {
  padding: 20px 22px;
  border-bottom-width: 6px;
}

.mypage-id-text b {
  font-size: 18px;
  line-height: 1.3;
}

.mypage-id-text small,
.mypage-auth-intro small {
  max-width: none;
  margin-top: 5px;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  word-break: keep-all;
  line-height: 1.55;
}

.mypage-login-btn {
  min-height: 50px;
  margin-top: 16px;
  border-radius: 8px;
  font-size: 15px;
}

.email-auth {
  margin-top: 16px;
}

.email-auth-input {
  min-height: 48px;
  border-radius: 8px;
  padding: 0 13px;
  font-size: 14px;
}

.email-auth-login,
.email-auth-signup {
  min-height: 46px;
  border-radius: 8px;
  font-size: 14px;
}

.mypage-menu button {
  min-height: 56px;
  padding: 13px 20px;
  font-size: 15px;
}

.mypage-menu-sub button {
  min-height: 48px;
  padding-block: 11px;
}

.mypage-foot {
  padding: 16px 20px 22px;
}

.signup-view,
.support-view {
  min-height: calc(100vh - 72px);
}

.signup-card,
.support-board {
  margin-top: 22px;
  margin-bottom: 130px;
  border: 1px solid rgba(213, 170, 85, 0.28);
  background: rgba(255, 253, 246, 0.92);
  box-shadow: 0 18px 42px rgba(26, 41, 66, 0.09);
}

.signup-card {
  max-width: 760px;
  padding: clamp(24px, 5vw, 44px);
}

.signup-intro span,
.support-board-head > div > span {
  color: #9a6d24;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.signup-intro h2,
.support-board-head h2 {
  margin: 7px 0 8px;
  color: #16233c;
  font-size: clamp(24px, 4vw, 31px);
}

.signup-intro p,
.support-board-head p {
  max-width: 620px;
  margin: 0;
  color: #6f6759;
  font-size: 14px;
  line-height: 1.7;
  word-break: keep-all;
}

.signup-form {
  display: grid;
  gap: 16px;
  margin-top: 28px;
}

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

.signup-form label,
.support-form label {
  display: grid;
  gap: 8px;
  color: #2a3550;
  font-size: 13px;
  font-weight: 700;
}

.signup-form input,
.support-form input,
.support-form select,
.support-form textarea {
  width: 100%;
  border: 1px solid rgba(26, 41, 66, 0.18);
  border-radius: 5px;
  background: #fffdf8;
  color: #172033;
  font: inherit;
}

.signup-form input,
.support-form input,
.support-form select {
  min-height: 52px;
  padding: 0 14px;
}

.support-form textarea {
  min-height: 150px;
  padding: 13px 14px;
  resize: vertical;
  line-height: 1.65;
}

.signup-consent {
  grid-template-columns: auto minmax(0, 1fr) !important;
  align-items: start;
  gap: 10px !important;
  padding: 14px;
  background: #f7f0df;
}

.signup-consent input {
  width: 18px;
  min-height: 18px;
  margin: 1px 0 0;
}

.signup-consent b {
  color: #8b3a48;
}

.signup-submit {
  min-height: 54px;
}

.signup-status {
  min-height: 20px;
  margin: 0;
  text-align: center;
}

.signup-login-hint {
  margin: 20px 0 0;
  color: #756b5b;
  font-size: 13px;
  text-align: center;
}

.signup-login-hint button {
  border: 0;
  background: transparent;
  color: #1d2f4d;
  font-weight: 700;
  text-decoration: underline;
}

.support-board {
  max-width: 900px;
  overflow: hidden;
}

.support-board-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 30px;
  border-bottom: 1px solid rgba(213, 170, 85, 0.26);
}

.support-board-head button,
.support-login-gate button {
  flex: none;
  min-height: 44px;
  padding: 0 17px;
  border: 1px solid #1a2942;
  border-radius: 4px;
  background: #1a2942;
  color: #f6e3ae;
  font-weight: 700;
}

.support-login-gate,
.support-empty {
  margin: 24px;
  padding: 34px 20px;
  background: #f7f0df;
  color: #675f52;
  text-align: center;
}

.support-login-gate[hidden],
.support-form[hidden],
.support-detail[hidden] {
  display: none;
}

.support-login-gate b,
.support-empty b {
  display: block;
  color: #172033;
  font-size: 17px;
}

.support-login-gate p,
.support-empty p {
  margin: 8px auto 18px;
  max-width: 500px;
  line-height: 1.65;
  word-break: keep-all;
}

.support-form {
  display: grid;
  gap: 16px;
  margin: 24px 30px;
  padding: 24px;
  border: 1px solid rgba(213, 170, 85, 0.28);
  background: #fbf4e5;
}

.support-form-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.support-form-head h3 {
  margin: 0;
  color: #172033;
  font-size: 20px;
}

.support-form-head button,
.support-detail header > button {
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  color: #596172;
  font-size: 25px;
}

.support-list {
  display: grid;
}

.support-list-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 82px;
  padding: 15px 30px;
  border: 0;
  border-bottom: 1px solid rgba(213, 170, 85, 0.22);
  background: transparent;
  color: #172033;
  text-align: left;
}

.support-list-item:hover,
.support-list-item.is-active {
  background: #f8efd9;
}

.support-list-item div {
  min-width: 0;
}

.support-list-item small,
.support-list-item b {
  display: block;
}

.support-list-item small {
  margin-bottom: 5px;
  color: #817766;
  font-size: 11px;
}

.support-list-item b {
  overflow: hidden;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.support-list-item i {
  color: #b7ad9b;
  font-style: normal;
}

.support-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 62px;
  min-height: 28px;
  padding: 0 8px;
  border: 1px solid #d8ccb3;
  background: #fffaf0;
  color: #706858;
  font-size: 11px;
  font-weight: 700;
}

.support-status.is-in_progress { color: #8b5e16; border-color: #d9b66f; background: #fff3d5; }
.support-status.is-answered { color: #216745; border-color: #8bc8aa; background: #edf8f1; }
.support-status.is-closed { color: #626a78; background: #eef0f3; }

.support-detail {
  margin: 24px 30px 30px;
  padding: 24px;
  border: 1px solid rgba(26, 41, 66, 0.16);
  background: #fffdf8;
}

.support-detail header,
.support-detail-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.support-detail header span {
  color: #9a6d24;
  font-size: 11px;
}

.support-detail h3 {
  margin: 4px 0 0;
  color: #172033;
  font-size: 21px;
}

.support-detail-meta {
  margin: 16px 0;
  padding-bottom: 16px;
  border-bottom: 1px solid #e7deca;
}

.support-detail-meta time {
  color: #817766;
  font-size: 12px;
}

.support-detail section {
  margin-top: 18px;
}

.support-detail section > b {
  color: #172033;
  font-size: 13px;
}

.support-detail section > p {
  margin: 8px 0 0;
  color: #554f46;
  font-size: 14px;
  line-height: 1.75;
}

.support-answer {
  padding: 18px;
  background: #f3efe6;
}

.support-answer.has-answer {
  border-left: 3px solid #d5aa55;
  background: #f9f0d9;
}

.admin-support-grid {
  align-items: start;
}

.admin-support-detail {
  display: grid;
  gap: 14px;
}

.admin-support-content {
  min-height: 120px;
  padding: 16px;
  border: 1px solid var(--line);
  background: var(--inset, #f7f5ef);
  color: var(--text, #172033);
  line-height: 1.7;
  white-space: pre-wrap;
}

@media (max-width: 640px) {
  .mypage-panel {
    width: 100%;
    max-width: none;
  }

  .signup-card,
  .support-board {
    width: calc(100% - 24px);
    margin-top: 12px;
  }

  .signup-card {
    padding: 24px 18px;
  }

  .signup-grid {
    grid-template-columns: 1fr;
  }

  .support-board-head {
    align-items: flex-start;
    padding: 22px 18px;
  }

  .support-board-head p {
    display: none;
  }

  .support-form,
  .support-detail {
    margin-right: 14px;
    margin-left: 14px;
    padding: 18px;
  }

  .support-list-item {
    gap: 10px;
    padding: 14px 16px;
  }

  .support-status {
    min-width: 54px;
  }
}

/* ─────────────────────────────────────────────────────
   HEUKYA v10 — UI/UX 정비 패스
   ① 헤더 완전 고정 ② 하단 여백 축소(푸터 메뉴 제거 후)
   ③ 360px 좌우 여백 축소·버튼 줄바꿈 방지
   ④ 히어로 화살표 ⑤ 밝은 배경 흰 글자 교정
   ⑥ 마이페이지 개인정보 수정 폼
   ───────────────────────────────────────────────────── */

/* ① overflow: hidden이 스크롤 컨테이너를 만들어 .topbar position: sticky를
   무력화했다. clip은 동일하게 잘라내되 스크롤 컨테이너를 만들지 않는다. */
.app-shell {
  overflow: clip;
}

/* ② 푸터 메뉴 바로가기 제거 후 남은 과도한 하단 여백 정리.
   고정 바텀내브(84px) 클리어런스는 .app-shell padding-bottom: 92px가 담당. */
.site-footer {
  margin: 24px 16px 0;
  padding: 16px 4px calc(8px + env(safe-area-inset-bottom));
}

.points-view,
.legal-view {
  padding-bottom: 24px;
}

.signup-card,
.support-board {
  margin-bottom: 32px;
}

/* ③ 360px 이하 — 좌우 여백 축소 + 단계 버튼 줄바꿈 방지 */
.home-story .story-points button,
.filters button,
.library-filters button {
  white-space: nowrap;
}

@media (max-width: 380px) {
  .banner-carousel {
    margin: 10px 8px 0;
  }

  .premium-unboxing-card {
    margin: 12px 8px 4px;
  }

  .filters {
    padding: 14px 8px 8px;
  }

  .product-grid {
    padding: 10px 8px 20px;
  }

  .home-story {
    margin: 8px 8px 22px;
    padding: 20px 10px 14px;
  }

  .home-story .story-points {
    gap: 4px;
  }

  .home-story .story-points button {
    padding: 0 2px;
    font-size: 11px;
    letter-spacing: 0;
  }

  .chat-workspace {
    padding: 12px 8px 24px;
  }

  .chat-product-grid {
    gap: 6px;
    padding: 0 10px 14px;
  }

  .site-footer {
    margin-inline: 8px;
  }
}

/* ④ 히어로 배너 좌우 화살표 */
.carousel-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 38px;
  height: 44px;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(213, 170, 85, 0.42);
  border-radius: 3px;
  background: rgba(16, 24, 42, 0.44);
  color: #f3dc9f;
  font-size: 26px;
  line-height: 1;
  backdrop-filter: blur(6px);
}

.carousel-arrow.prev {
  left: 10px;
}

.carousel-arrow.next {
  right: 10px;
}

.carousel-arrow:hover {
  background: rgba(16, 24, 42, 0.68);
}

/* ⑤ 라이트 한지 카드로 오버라이드된 뒤에도 남아 있던 흰 글자 교정 */
.chat-credit-card {
  color: #16233c;
}

.chat-credit-card strong {
  color: #7d2e3d;
}

.chat-credit-card p {
  color: #6a614f;
}

/* ⑥ 마이페이지 — 개인정보 수정 */
.mypage-id-card {
  flex-wrap: wrap;
}

.mypage-edit-toggle {
  min-height: 34px;
  margin-left: auto;
  padding: 0 12px;
  border: 1px solid rgba(26, 41, 66, 0.24);
  border-radius: 3px;
  background: rgba(255, 253, 246, 0.7);
  color: #33415e;
  font-size: 12px;
  font-weight: 700;
}

.account-edit-form {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(213, 170, 85, 0.32);
  border-radius: 6px;
  background: #fbf4e5;
}

.account-edit-form[hidden] {
  display: none;
}

.account-edit-form label {
  display: grid;
  gap: 6px;
  color: #2a3550;
  font-size: 12px;
  font-weight: 700;
}

.account-edit-form input {
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid rgba(26, 41, 66, 0.18);
  border-radius: 5px;
  background: #fffdf8;
  color: #172033;
  font: inherit;
}

.account-edit-divider {
  margin-top: 4px;
  color: #9a6d24;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.account-edit-note {
  margin: 0;
  color: #756b5b;
  font-size: 12px;
}

.account-edit-actions {
  display: flex;
  gap: 8px;
}

.account-edit-actions button[type="submit"] {
  flex: 1;
  min-height: 44px;
  border: 1px solid rgba(213, 170, 85, 0.52);
  border-radius: 3px;
  background: var(--midnight-ink);
  color: #f3dc9f;
  font-weight: 700;
}

.account-edit-actions button[type="button"] {
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid rgba(26, 41, 66, 0.22);
  border-radius: 3px;
  background: transparent;
  color: #33415e;
}

.account-edit-form .form-status {
  min-height: 16px;
  margin: 0;
}

/* ─────────────────────────────────────────────────────
   Admin — 팝오버 레이어 (고객 포인트 관리 · 1:1 문의 상세)
   토스 스타일 어드민 디자인 시스템에 맞춘 센터 모달.
   ───────────────────────────────────────────────────── */
.admin-body .admin-popover {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
}

.admin-body .admin-popover[hidden] {
  display: none;
}

.admin-body.admin-popover-open {
  overflow: hidden;
}

.admin-popover-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(25, 31, 40, 0.46);
  backdrop-filter: blur(2px);
}

.admin-popover-card {
  position: relative;
  z-index: 1;
  width: min(640px, 100%);
  max-height: min(84vh, 860px);
  display: flex;
  flex-direction: column;
  border-radius: var(--r-xl, 16px);
  background: var(--card, #fff);
  box-shadow: 0 24px 64px rgba(17, 24, 39, 0.24);
  overflow: hidden;
}

.admin-popover-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line-2, #e5e8eb);
}

.admin-popover-head h3 {
  margin: 0;
  font-size: 18px;
  color: var(--ink, #191f28);
}

.admin-popover-x {
  width: 34px;
  height: 34px;
  flex: none;
  border: 0;
  border-radius: 50%;
  background: var(--inset, #f2f4f6);
  color: var(--muted, #6b7684);
  font-size: 20px;
  line-height: 1;
}

.admin-popover-x:hover {
  background: var(--inset-2, #edeff2);
}

.admin-popover-body {
  overflow-y: auto;
  display: grid;
  gap: 14px;
  padding: 20px 22px 24px;
}

.admin-popover-body h3 {
  margin: 8px 0 0;
  font-size: 15px;
  color: var(--ink-2, #333d4b);
}

.admin-point-open {
  min-height: 34px;
  padding: 0 12px;
  white-space: nowrap;
  border: 1px solid var(--line-2, #e5e8eb);
  border-radius: var(--r-sm, 8px);
  background: var(--card, #fff);
  color: var(--blue, #3182f6);
  font-size: 12px;
  font-weight: 700;
}

.admin-point-open:hover {
  background: var(--blue-soft, #e8f3ff);
}

@media (max-width: 640px) {
  .admin-body .admin-popover {
    padding: 12px;
  }

  .admin-popover-card {
    max-height: 92vh;
  }
}

/* ─────────────────────────────────────────────────────
   외부 심층 리포트 생성 대기 — 흑야 금사(金絲) 프로그레스
   결제 완료 화면에서 사용자를 붙잡아 두는 실시간 진행 카드.
   ───────────────────────────────────────────────────── */
.report-progress {
  margin: 18px auto 4px;
  max-width: 420px;
  padding: 22px 20px 18px;
  border-radius: 18px;
  background:
    radial-gradient(120% 90% at 50% -20%, rgba(201, 162, 39, 0.18), transparent 55%),
    linear-gradient(168deg, var(--midnight-ink) 0%, var(--palace-ink) 82%);
  border: 1px solid rgba(201, 162, 39, 0.38);
  box-shadow: 0 18px 44px rgba(16, 23, 34, 0.35), inset 0 1px 0 rgba(246, 229, 190, 0.12);
  color: var(--warm-ivory);
  text-align: left;
  position: relative;
  overflow: hidden;
}
.report-progress::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(201, 162, 39, 0.16);
  border-radius: 13px;
  pointer-events: none;
}
.report-progress-story {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin-bottom: 18px;
}
.report-progress-visual {
  position: relative;
  min-width: 0;
}
.report-progress-visual img {
  width: 112px;
  height: 112px;
  display: block;
  object-fit: cover;
  border: 1px solid rgba(213, 170, 85, 0.38);
  border-radius: 14px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.3);
}
.report-progress-live {
  position: absolute;
  left: 7px;
  right: 7px;
  bottom: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 4px 6px;
  border: 1px solid rgba(246, 229, 190, 0.2);
  border-radius: 999px;
  background: rgba(11, 20, 36, 0.82);
  color: rgba(255, 249, 230, 0.9);
  font-size: 8px;
  font-weight: 800;
  white-space: nowrap;
  backdrop-filter: blur(4px);
}
.report-progress-live i {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #69d69b;
  box-shadow: 0 0 8px rgba(105, 214, 155, 0.8);
  animation: report-live-pulse 1.8s ease-in-out infinite;
}
@keyframes report-live-pulse {
  0%, 100% { opacity: 0.45; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.15); }
}
.report-progress-story-copy {
  min-width: 0;
}
.report-progress-story-copy small,
.report-progress-story-copy strong,
.report-progress-story-copy p {
  display: block;
}
.report-progress-story-copy small {
  margin-bottom: 5px;
  color: var(--royal-gold);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.08em;
}
.report-progress-story-copy strong {
  color: var(--warm-ivory);
  font-family: "Gowun Batang", serif;
  font-size: 0.98rem;
  line-height: 1.4;
}
.report-progress-story-copy p {
  margin: 7px 0 0;
  color: rgba(246, 229, 190, 0.7);
  font-size: 0.75rem;
  line-height: 1.55;
}
.report-progress-story.is-changing img,
.report-progress-story.is-changing .report-progress-story-copy {
  animation: report-story-enter 0.55s ease both;
}
@keyframes report-story-enter {
  from { opacity: 0.35; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}
.report-progress.is-long-wait .report-progress-live {
  border-color: rgba(213, 170, 85, 0.4);
}
.report-progress.is-long-wait .report-progress-hint {
  color: rgba(246, 229, 190, 0.78);
}
.report-progress-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.report-progress-phase {
  font-family: "Gowun Batang", serif;
  font-size: 1.02rem;
  letter-spacing: 0.02em;
  color: var(--warm-ivory);
}
.report-progress-pct {
  font-family: "Gowun Batang", serif;
  font-size: 1.35rem;
  color: var(--royal-gold);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 14px rgba(201, 162, 39, 0.35);
}
.report-progress-track {
  height: 10px;
  border-radius: 999px;
  background: rgba(246, 229, 190, 0.12);
  border: 1px solid rgba(201, 162, 39, 0.22);
  overflow: hidden;
}
.report-progress-fill {
  position: relative;
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #8f6f2a, var(--royal-gold) 55%, #f0d47a);
  box-shadow: 0 0 12px rgba(201, 162, 39, 0.55);
  transition: width 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
.report-progress-sheen {
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(255, 250, 230, 0.55) 50%, transparent 80%);
  transform: translateX(-100%);
  animation: gold-sheen 2.4s ease-in-out infinite;
}
@keyframes gold-sheen {
  0% { transform: translateX(-100%); }
  60%, 100% { transform: translateX(100%); }
}
.report-progress.is-indeterminate .report-progress-fill {
  width: 38%;
  animation: seek-fill 1.8s ease-in-out infinite alternate;
}
@keyframes seek-fill {
  from { margin-left: 0; }
  to { margin-left: 62%; }
}
.report-progress-section {
  margin: 12px 0 0;
  font-size: 0.92rem;
  color: rgba(246, 229, 190, 0.92);
  min-height: 1.3em;
}
.report-progress-hint {
  margin: 6px 0 0;
  font-size: 0.8rem;
  color: rgba(246, 229, 190, 0.55);
}
.report-progress.is-failed {
  border-color: rgba(111, 37, 48, 0.65);
}
.report-progress.is-failed .report-progress-fill {
  background: linear-gradient(90deg, #6f2530, #a03a48);
  box-shadow: 0 0 12px rgba(111, 37, 48, 0.55);
}
.report-progress.is-failed .report-progress-sheen { animation: none; }
@media (max-width: 390px) {
  .report-progress-story {
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 11px;
  }
  .report-progress-visual img {
    width: 92px;
    height: 104px;
  }
  .report-progress-live span {
    display: none;
  }
  .report-progress-live {
    right: auto;
    padding: 5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .report-progress-live i,
  .report-progress-story.is-changing img,
  .report-progress-story.is-changing .report-progress-story-copy {
    animation: none;
  }
}

/* ─────────────────────────────────────────────────────
   무통장입금 충전 카드 (포인트 화면)
   ───────────────────────────────────────────────────── */
.deposit-area { display: grid; gap: 12px; }
.deposit-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 10px 26px rgba(29, 24, 16, 0.08);
}
.deposit-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.deposit-badge {
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--jade-soft);
  color: var(--jade);
  white-space: nowrap;
}
.deposit-card dl { display: grid; gap: 8px; margin: 0 0 10px; }
.deposit-card dl div { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.deposit-card dt { color: var(--muted); font-size: 0.85rem; white-space: nowrap; }
.deposit-card dd { margin: 0; text-align: right; font-size: 0.92rem; }
.deposit-code {
  font-family: "Gowun Batang", serif;
  font-size: 1.05rem;
  color: var(--blood-moon);
  letter-spacing: 0.04em;
}
.deposit-copy {
  border: 1px solid var(--line);
  background: var(--hanji);
  border-radius: 8px;
  padding: 2px 8px;
  font-size: 0.72rem;
  cursor: pointer;
}
.deposit-note {
  margin: 0 0 12px;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.5;
  background: var(--jade-soft);
  border-radius: 10px;
  padding: 10px 12px;
}
.deposit-actions { display: flex; gap: 8px; }
.deposit-method-grid { display: grid; gap: 8px; margin-bottom: 10px; }
.deposit-method {
  display: grid;
  gap: 3px;
  text-align: left;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--hanji);
  cursor: pointer;
}
.deposit-method.is-primary {
  border-color: var(--royal-gold);
  background: linear-gradient(160deg, rgba(201, 162, 39, 0.12), var(--hanji));
}
.deposit-method:disabled {
  border-color: var(--line);
  background: #f3f1ec;
  color: #8b867e;
  cursor: not-allowed;
  opacity: 0.72;
}
.deposit-method small { color: var(--muted); font-size: 0.78rem; }
.deposit-form { display: grid; gap: 10px; }
.deposit-form label { display: grid; gap: 6px; font-size: 0.85rem; color: var(--muted); }
.deposit-form input {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 1rem;
}
.deposit-history { display: grid; gap: 8px; }
.deposit-history-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
}
.deposit-history-row small { color: var(--muted); margin-left: 8px; }
.deposit-status { font-size: 0.78rem; padding: 3px 9px; border-radius: 999px; background: var(--hanji); color: var(--muted); }
.deposit-status.is-confirmed { background: var(--jade-soft); color: var(--jade); }
.deposit-status.is-rejected, .deposit-status.is-expired { background: rgba(111, 37, 48, 0.1); color: var(--blood-moon); }

/* 어드민 무통장입금 행 */
.deposit-admin-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  margin-bottom: 8px;
}
.deposit-admin-row small { display: block; color: var(--muted); margin-top: 3px; }
.deposit-admin-row.is-muted { opacity: 0.85; }
.deposit-admin-row .admin-row-actions { display: flex; gap: 8px; flex-shrink: 0; }
.deposit-admin-row .admin-warn { color: var(--blood-moon); }

/* ─────────────────────────────────────────────────────
   2026-07 상담 · 결제 · 보관함 · 입금관리 UX 정리
   ───────────────────────────────────────────────────── */
.chat-credit-card {
  padding: 15px 16px;
  color: #16233c;
  border: 1px solid rgba(22, 88, 77, 0.16);
  background: linear-gradient(135deg, #f1fbf7, #f5f1ff);
  box-shadow: 0 10px 24px rgba(36, 49, 69, 0.08);
}
.chat-credit-summary > div { display: grid; gap: 2px; }
.chat-credit-summary span { color: #51605d; font-size: 12px; font-weight: 800; }
.chat-credit-summary strong { color: #16584d; font-size: 24px; line-height: 1.1; }
.chat-store-open {
  min-height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 12px;
  background: #16233c;
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}

.chat-report-panel,
.chat-history-panel { padding: 0; }
.chat-section-heading {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 16px 16px 12px;
}
.chat-section-heading > span {
  width: 28px;
  height: 28px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #16233c;
  color: #f3dc9f;
  font-size: 12px;
  font-weight: 900;
}
.chat-section-heading small { margin: 0 0 2px; color: #7c6c4f; font-size: 10px; letter-spacing: 0.08em; }
.chat-section-heading h2 { margin: 0; color: #16233c; font-size: 18px; }
.chat-report-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; padding: 0 16px; }
.chat-report-choice {
  min-width: 0;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fffdf8;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.chat-report-choice:hover { border-color: rgba(22, 88, 77, 0.42); background: #f8fcfa; }
.chat-report-choice.is-selected { border-color: #16584d; background: #edf8f4; box-shadow: inset 0 0 0 1px #16584d; }
.chat-report-choice-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: #f4ead1;
  color: #7d2e3d;
  font-family: "Gowun Batang", serif;
  font-size: 18px;
  font-weight: 900;
}
.chat-report-choice.is-selected .chat-report-choice-mark { background: #16584d; color: #fff; }
.chat-report-choice-copy { min-width: 0; display: grid; gap: 3px; }
.chat-report-choice-copy b,
.chat-report-choice-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-report-choice-copy b { font-size: 13px; }
.chat-report-choice-copy small { color: var(--muted); font-size: 11px; }
.chat-report-choice > i { color: #16584d; font-style: normal; font-weight: 900; text-align: center; }
.chat-report-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding: 13px 16px 16px;
  border-top: 1px solid #eee8dc;
}
.chat-report-action p { margin: 0; }
.chat-report-action button,
.chat-report-empty button,
.chat-store-error button {
  min-height: 40px;
  flex: none;
  padding: 0 14px;
  border: 0;
  border-radius: 11px;
  background: #16584d;
  color: #fff;
  font-weight: 900;
}
.chat-report-action button:disabled { opacity: 0.45; cursor: not-allowed; }
.chat-report-empty,
.chat-session-empty { grid-column: 1 / -1; padding: 22px 16px; color: var(--muted); text-align: center; }
.chat-report-empty b,
.chat-session-empty b { display: block; margin-bottom: 5px; color: var(--ink); }
.chat-report-empty p,
.chat-session-empty p { margin: 0 0 12px; font-size: 12px; }

.chat-history-panel .chat-session-list {
  display: grid;
  gap: 8px;
  padding: 0 16px 16px;
  overflow: visible;
}
.chat-session-list .chat-session-card {
  width: 100%;
  max-width: none;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto 16px;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid #e8e1d5;
  border-radius: 13px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  white-space: normal;
}
.chat-session-list .chat-session-card:hover { border-color: #c9a227; background: #fffdf7; }
.chat-session-list .chat-session-card.is-active { border-color: #16584d; background: #edf8f4; color: var(--ink); }
.chat-session-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #f5ecd7;
  color: #7d2e3d;
  font-family: "Gowun Batang", serif;
  font-weight: 900;
}
.chat-session-copy { min-width: 0; display: grid; gap: 3px; }
.chat-session-copy b,
.chat-session-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-session-copy b { font-size: 13px; }
.chat-session-copy small { color: var(--muted); font-size: 11px; }
.chat-session-state { color: #52606d; font-size: 11px; font-weight: 900; }
.chat-session-state.is-running { color: #9a6b00; }
.chat-session-state.is-failed { color: #b42318; }
.chat-session-card > i { color: #8b8171; font-style: normal; font-size: 18px; }

body.chat-store-open { overflow: hidden; }
.chat-store-popover {
  position: fixed;
  inset: 0;
  z-index: 1350;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 18px;
}
.chat-store-popover[hidden] { display: none; }
.chat-store-backdrop { position: absolute; inset: 0; border: 0; background: rgba(15, 22, 34, 0.52); opacity: 0; transition: opacity 0.24s ease; }
.chat-store-panel {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  max-height: min(82dvh, 700px);
  overflow-y: auto;
  padding: 20px;
  border: 1px solid rgba(201, 162, 39, 0.32);
  border-radius: 24px 24px 16px 16px;
  background: #fffdf8;
  box-shadow: 0 28px 70px rgba(16, 23, 34, 0.32);
  transform: translateY(32px);
  opacity: 0;
  transition: transform 0.24s ease, opacity 0.24s ease;
}
.chat-store-popover.is-open .chat-store-backdrop { opacity: 1; }
.chat-store-popover.is-open .chat-store-panel { transform: translateY(0); opacity: 1; }
.chat-store-panel > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.chat-store-panel > header small { color: #7d6b4d; font-size: 11px; font-weight: 900; }
.chat-store-panel > header h2 { margin: 3px 0 0; color: #16233c; font-size: 22px; }
.chat-store-close { width: 38px; height: 38px; border: 0; border-radius: 50%; background: #f1ece2; color: #4d5665; font-size: 22px; }
.chat-store-balance { margin: 16px 0 10px; padding: 10px 12px; border-radius: 11px; background: #edf8f4; color: #36504b; font-size: 12px; }
.chat-store-balance b { color: #16584d; }
.chat-store-panel .chat-product-grid { padding: 0; }
.chat-credit-product i {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: #16233c;
  color: #f3dc9f;
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
}
.chat-credit-product:hover { border-color: #c9a227; transform: translateY(-1px); }
.chat-store-note { margin: 12px 0 0; color: var(--muted); font-size: 11px; text-align: center; }
.chat-product-skeleton { min-height: 118px; display: grid; gap: 9px; padding: 13px 11px; border-radius: 14px; background: #f3f0e9; overflow: hidden; }
.chat-product-skeleton i,
.chat-product-skeleton b,
.chat-product-skeleton span { display: block; border-radius: 6px; background: linear-gradient(100deg, #e6e1d7 20%, #f7f4ee 50%, #e6e1d7 80%); background-size: 200% 100%; animation: chat-skeleton 1.2s ease-in-out infinite; }
.chat-product-skeleton i { width: 30px; height: 30px; }
.chat-product-skeleton b { width: 72%; height: 15px; }
.chat-product-skeleton span { width: 48%; height: 12px; }
@keyframes chat-skeleton { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.chat-store-error { grid-column: 1 / -1; padding: 20px; border: 1px dashed #d9b5ae; border-radius: 14px; text-align: center; }
.chat-store-error p { margin: 0 0 10px; color: #8f3a3a; font-size: 12px; }

.library-vault-intro {
  position: relative;
  overflow: hidden;
  margin: 16px 16px 10px;
  padding: 18px 20px;
  border: 1px solid rgba(201, 162, 39, 0.46);
  border-radius: 8px;
  background: radial-gradient(circle at 88% 12%, rgba(201, 162, 39, 0.2), transparent 30%), linear-gradient(145deg, #192641, #263653);
  box-shadow: 0 14px 30px rgba(16, 23, 34, 0.2);
  color: #f8efd8;
}
.library-vault-intro::after { content: "藏"; position: absolute; right: 18px; bottom: -20px; color: rgba(243, 220, 159, 0.1); font-family: "Gowun Batang", serif; font-size: 88px; }
.library-vault-intro div { position: relative; z-index: 1; display: grid; gap: 4px; }
.library-vault-intro small { color: #d9bd74; font-size: 10px; font-weight: 900; letter-spacing: 0.12em; }
.library-vault-intro strong { font-family: "Gowun Batang", serif; font-size: 23px; }
.library-vault-intro p { position: relative; z-index: 1; margin: 10px 0 0; color: rgba(248, 239, 216, 0.72); font-size: 12px; line-height: 1.55; }
.library-retention { margin-top: 0; }
.archive-list { display: grid; gap: 10px; padding: 4px 0 22px; }
.archive-card[data-archive-id] {
  width: calc(100% - 32px);
  box-sizing: border-box;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
  margin: 0 16px;
  padding: 0;
  border: 1px solid #e1d5bd;
  border-radius: 10px;
  background: linear-gradient(110deg, #fbf2df, #fffdf8 36%, #fff);
  box-shadow: 0 8px 20px rgba(55, 43, 25, 0.07);
  overflow: hidden;
}
.archive-card[data-archive-id]:hover { border-color: #c9a227; background: linear-gradient(110deg, #f8e8c6, #fffdf8 42%, #fff); transform: translateY(-1px); }
.archive-card-seal { display: grid; place-items: center; background: #7d2e3d; color: #f4dfac; font-family: "Gowun Batang", serif; font-size: 25px; text-shadow: 0 1px 0 rgba(0,0,0,0.2); }
.archive-card-body { min-width: 0; display: grid; gap: 5px; padding: 14px 14px 12px 0; }
.archive-card-top,
.archive-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.archive-product { overflow: hidden; color: #7d2e3d; text-overflow: ellipsis; white-space: nowrap; }
.archive-status { flex: none; font-size: 10px; }
.archive-status.is-generating { color: #9a6b00; background: #fff3d6; }
.archive-status.is-failed { color: #b42318; background: #fdecec; }
.archive-card-body > b { overflow: hidden; color: #202a3b; font-size: 16px; text-overflow: ellipsis; white-space: nowrap; }
.archive-card-body > small { color: #827969; }
.archive-card-foot { margin-top: 5px; padding-top: 9px; border-top: 1px solid #eee4d2; color: #88785e; font-size: 10px; }
.archive-card-foot strong { color: #16584d; font-size: 11px; }
.archive-card-foot i { font-style: normal; }

.orders-list { gap: 14px; }
.orders-overview { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid #dfe4e7; border-radius: 14px; background: #f7f9fa; overflow: hidden; }
.orders-overview > div { min-width: 0; display: grid; gap: 4px; padding: 13px 14px; border-right: 1px solid #dfe4e7; }
.orders-overview > div:last-child { border-right: 0; }
.orders-overview small { color: #6b7684; font-size: 10px; font-weight: 800; }
.orders-overview strong { overflow: hidden; color: #191f28; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.orders-overview .needs-attention strong { color: #b42318; }
.order-ledger { border: 1px solid #e5e8eb; border-radius: 14px; background: #fff; overflow: hidden; }
.order-ledger .order-card { border: 0; border-bottom: 1px solid #edf0f2; border-radius: 0; }
.order-ledger .order-card:last-child { border-bottom: 0; }
.order-card-summary { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto 18px; align-items: center; gap: 11px; padding: 14px; }
.order-card-summary:hover { background: #f9fafb; }
.order-card-mark { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 11px; background: #eef3f5; color: #16584d; font-family: "Gowun Batang", serif; font-weight: 900; }
.order-card-copy { min-width: 0; display: grid; gap: 3px; }
.order-card-copy b,
.order-card-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order-card-copy b { color: #191f28; font-size: 14px; }
.order-card-copy small { color: #8b95a1; font-size: 11px; }
.order-card-payment { display: grid; justify-items: end; gap: 5px; }
.order-card-badges { display: flex; align-items: center; justify-content: flex-end; gap: 5px; }
.order-card-badges .order-report-status { margin: 0; padding: 3px 7px; border-radius: 999px; background: #f2f4f6; font-size: 10px; }
.order-card-chevron { color: #8b95a1; font-style: normal; transition: transform 0.2s ease; }
.order-card-summary[aria-expanded="true"] .order-card-chevron { transform: rotate(180deg); }
.order-ledger .order-detail { background: #fafbfc; }

.deposit-bank-inline {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(130px, 0.8fr) minmax(230px, 1.4fr) minmax(130px, 0.8fr) auto;
  align-items: end;
  gap: 10px;
  margin: 12px 0 30px;
  padding: 12px 14px;
  border: 1px solid var(--line-2, #e5e8eb);
  border-radius: 12px;
  background: #f7f9fa;
}
.deposit-bank-inline > strong { align-self: center; padding-right: 4px; color: #333d4b; font-size: 13px; white-space: nowrap; }
.deposit-bank-inline label { min-width: 0; display: grid; gap: 4px; color: #6b7684; font-size: 10px; font-weight: 800; }
.deposit-bank-inline input { width: 100%; min-width: 0; box-sizing: border-box; height: 36px; padding: 0 10px; border: 1px solid #d1d6db; border-radius: 8px; background: #fff; font: inherit; }
.deposit-bank-inline > button { min-height: 36px; padding: 0 16px; white-space: nowrap; }
.deposit-bank-inline .form-status { position: absolute; left: 14px; top: calc(100% + 5px); margin: 0; font-size: 11px; }
.deposit-history-table-wrap { width: 100%; overflow-x: auto; border: 1px solid #e5e8eb; border-radius: 12px; }
.admin-table .deposit-history-table { min-width: 780px; margin: 0; border: 0; }
.deposit-history-table caption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.deposit-history-table .is-numeric { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.deposit-history-table tbody td { vertical-align: middle; }
.deposit-history-table .deposit-status { display: inline-flex; white-space: nowrap; }
.deposit-status.is-unknown { background: #f2f4f6; color: #6b7684; }

@media (max-width: 720px) {
  .chat-report-choices { grid-template-columns: 1fr; }
  .chat-report-action { align-items: flex-start; flex-direction: column; }
  .chat-report-action button { width: 100%; }
  .chat-store-popover { padding: 0; }
  .chat-store-panel { width: 100%; max-height: 88dvh; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); border-radius: 24px 24px 0 0; }
  .order-card-summary { grid-template-columns: 38px minmax(0, 1fr) 16px; }
  .order-card-payment { grid-column: 2 / 3; justify-items: start; }
  .order-card-badges { justify-content: flex-start; flex-wrap: wrap; }
  .order-card-chevron { grid-column: 3; grid-row: 1 / span 2; }
  .deposit-bank-inline { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end; }
  .deposit-bank-inline > strong { grid-column: 1 / -1; }
  .deposit-bank-inline label.is-account { grid-column: 1 / -1; }
  .deposit-bank-inline > button { width: 100%; }
}

@media (max-width: 420px) {
  .chat-session-list .chat-session-card { grid-template-columns: 36px minmax(0, 1fr) 14px; }
  .chat-session-state { grid-column: 2; }
  .chat-session-card > i { grid-column: 3; grid-row: 1 / span 2; }
  .orders-overview { grid-template-columns: 1fr; }
  .orders-overview > div { grid-template-columns: 1fr auto; align-items: center; border-right: 0; border-bottom: 1px solid #dfe4e7; }
  .orders-overview > div:last-child { border-bottom: 0; }
  .archive-card[data-archive-id] { width: calc(100% - 32px); box-sizing: border-box; grid-template-columns: 48px minmax(0, 1fr); }
  .archive-card-top { align-items: flex-start; flex-direction: column; gap: 5px; }
  .archive-card-seal { font-size: 21px; }
}
