/* Cheer banner display font — Figma KoreanEASGR (a음악시간) */
@font-face {
  font-family: 'KoreanEASGR';
  src:
    local('KoreanEASGR'),
    local('KoreanEASG-R'),
    local('a음악시간'),
    url('assets/fonts/KoreanEASGR.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Design tokens — Figma 행운세 */
:root {
  /* Color */
  --color-white: #ffffff;
  --color-black: #000000;
  --color-text: #202020;           /* typo/1 */
  --color-text-strong: #232323;
  --color-text-secondary: #6f6f6f; /* profile meta / tag */
  --color-text-body: #404040;
  --color-text-placeholder: #8e8e8e; /* gray/gray-50 */
  --color-text-muted: #1e1e1e;     /* tab */
  --color-text-subtle: #989898;
  --color-label-normal: #131313;
  --color-label-neutral: rgba(46, 47, 51, 0.88);
  --color-label-alt: rgba(55, 56, 60, 0.61);
  --color-lock-desc: #949597;
  --color-line-normal: #e0e0e2;
  --color-badge-bg: #fff6c2;
  --color-badge-border: #ffd37c;
  --color-cta-dark: #002130;
  --color-accent: #31a2d7;
  --color-primary: #bcf0ff;        /* atomic-lightBlue-90 */
  --color-primary-mid: #67d4ff;    /* atomic-lightBlue-70 */
  --color-primary-soft: #e4f5fa;
  --color-compat-banner: #def8ff;
  --color-bg-light: #f6fdff;
  --color-bg-coin: rgba(242, 242, 242, 0.96);
  --color-border: #e4e4e4;
  --color-border-strong: #c7c7c7;
  --color-border-light: #c8eeff;
  --color-border-tab: #e9e9e9;
  --color-login-bg: var(--color-primary);
  --color-chat-bg: #f0f9fc;
  --color-chat-user: var(--color-primary);
  --color-chat-assistant: #ffffff;
  --color-pillar: #ff9090;
  --color-flow: #9cd55f;
  --color-flow-active-bg: var(--color-bg-light);
  --color-flow-active-border: #75c8ee;
  /* 오행 칩 (Figma 189:18586) */
  --color-oheng-wood: #9cd55f;
  --color-oheng-fire: #ff9090;
  --color-oheng-earth: #ffdf78;
  --color-oheng-metal: #ffffff;
  --color-oheng-metal-border: #d4d4d4;
  --color-oheng-water: #AADAF8;
  --color-oheng-on-dark: #ffffff;
  --color-oheng-on-light: #232323;

  /* Radius */
  --radius-sm: 5px;
  --radius-md: 8px;
  --radius-lg: 10px;
  --radius-pill: 999px;

  /* Space */
  --space-4: 4px;
  --space-8: 8px;
  --space-12: 12px;
  --space-16: 16px;
  --space-20: 20px;
  --space-24: 24px;
  --space-28: 28px;
  --space-32: 32px;
  --space-60: 60px;
  --page-x: 16px;

  /* Type */
  --font-main: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-cheer: 'KoreanEASGR', var(--font-main);
  --font-card: var(--font-main);
  --fw-light: 300;
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fs-10: 10px;
  --fs-14: 14px;
  --fs-15: 15px;
  --fs-16: 16px;
  --fs-18: 18px;
  --fs-19: 19px;
  --fs-24: 24px;

  /* Motion */
  --ease-accordion: cubic-bezier(0.22, 1.15, 0.36, 1);
  --ease-accordion-chevron: cubic-bezier(0.34, 1.35, 0.64, 1);
  --dur-accordion: 0.42s;

  --shadow-app: none;
  --app-width: 390px;
  --nav-height: 60px;
  --tab-height: 94px;
  --content-width: 358px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-main);
  background: #eef2f5;
  color: var(--color-text);
  min-height: 100vh;
  -webkit-tap-highlight-color: transparent;
}

button,
input,
select,
textarea {
  font-family: inherit;
}

/* ── Typography utilities ── */
.text-name {
  font-size: var(--fs-16);
  font-weight: var(--fw-medium);
  line-height: 1;
  color: var(--color-black);
}

.text-tag {
  font-size: var(--fs-14);
  font-weight: var(--fw-regular);
  line-height: 1;
  color: var(--color-text-secondary);
}

.text-meta {
  font-size: var(--fs-16);
  font-weight: var(--fw-regular);
  line-height: 1;
  color: var(--color-text-secondary);
}

.text-body-sm {
  font-size: var(--fs-14);
  font-weight: var(--fw-regular);
  line-height: normal;
  color: var(--color-black);
}

/* ── Shared UI components ── */
.ui-card {
  display: flex;
  align-items: center;
  width: 100%;
  padding: var(--space-20);
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-sizing: border-box;
}

.ui-card--profile {
  justify-content: space-between;
  gap: var(--space-16);
  min-height: 86px;
  padding: 0;
  overflow: hidden;
}

.ui-card__filled {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-16);
  width: 100%;
  padding: var(--space-20);
  box-sizing: border-box;
}

.ui-card--empty {
  border-style: dashed;
  border-width: 1.5px;
  border-color: rgba(112, 115, 124, 0.22);
  background: var(--color-white);
}

.ui-card--empty .ui-card__filled {
  display: none;
}

.ui-card__empty {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  height: 86px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
}

.ui-card--empty .ui-card__empty {
  display: flex;
}

.ui-card__empty-text {
  font-size: var(--fs-16);
  font-weight: var(--fw-regular);
  line-height: 1.5;
  color: var(--color-black);
}

.ui-card__empty-icon {
  display: block;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.ui-card--inline {
  justify-content: space-between;
  gap: var(--space-12);
  padding: var(--space-24) var(--space-20);
}

.fortune-profile-card {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-16);
}

.fortune-profile-card__main {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.fortune-profile-card__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-12);
}

.fortune-profile-card__context {
  margin: 0;
  padding: 0;
  border: 0;
  line-height: 1.4;
  text-align: left;
  align-self: stretch;
}

.fortune-profile-card__context.hidden {
  display: none;
}

.fortune-profile-card .fortune__edit-btn {
  flex: 0 0 auto;
  align-self: center;
  margin: 0;
}

.fortune-edit-sheet {
  position: absolute;
  inset: 0;
  z-index: 120;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  pointer-events: none;
}

.fortune-edit-sheet:not([hidden]) {
  pointer-events: auto;
}

.fortune-edit-sheet[hidden] {
  display: none;
}

.fortune-edit-sheet__backdrop {
  position: absolute;
  inset: 0;
  border: none;
  padding: 0;
  margin: 0;
  background: #343434;
  opacity: 0.7;
  cursor: pointer;
}

.fortune-edit-sheet__panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-height: min(640px, 82vh);
  background: var(--color-white);
  border-radius: 10px 10px 0 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(100%);
  transition: transform 0.28s ease;
}

.fortune-edit-sheet--open .fortune-edit-sheet__panel {
  transform: translateY(0);
}

.fortune-edit-sheet__handle-wrap {
  display: flex;
  justify-content: center;
  padding: 12px 0 8px;
  flex-shrink: 0;
}

.fortune-edit-sheet__handle {
  width: 70px;
  height: 4px;
  border-radius: 999px;
  background: #f6f6f6;
}

.fortune-edit-sheet__header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 16px;
  flex-shrink: 0;
}

.fortune-edit-sheet__title {
  margin: 0;
  font-family: var(--font-main);
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
  color: #181818;
}

.fortune-edit-sheet__close {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fortune-edit-sheet__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-20);
  padding: 8px 16px 16px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.fortune-edit-sheet__profile {
  width: 100%;
}

.fortune-edit-panel__period {
  width: 100%;
}

.fortune-edit-panel__period .ui-field {
  flex: 1 1 100%;
}

.fortune-edit-sheet__footer {
  flex-shrink: 0;
  padding: 12px 16px calc(40px + env(safe-area-inset-bottom, 0px));
  background: var(--color-white);
}

.ui-card__text {
  display: flex;
  flex-direction: column;
  gap: var(--space-12);
  min-width: 0;
}

.ui-card__name-row {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.ui-card__meta {
  display: flex;
  align-items: center;
  gap: var(--space-16);
}

.ui-field-row {
  display: flex;
  gap: var(--space-20);
  width: 100%;
}

.ui-field {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

.ui-label {
  font-size: var(--fs-14);
  font-weight: var(--fw-regular);
  line-height: normal;
  color: var(--color-black);
}

.ui-input {
  width: 100%;
  height: 48px;
  padding: 0 var(--space-16);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background-color: var(--color-white);
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%238E8E8E' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  appearance: none;
  -webkit-appearance: none;
  font-size: var(--fs-16);
  font-weight: var(--fw-regular);
  line-height: 1.5;
  color: var(--color-text-placeholder);
  box-sizing: border-box;
}

.ui-input.has-value {
  color: var(--color-text);
}

.ui-input:focus {
  outline: none;
}

.ui-input.ui-input--alert,
.ui-input.ui-input--alert:focus {
  border-color: var(--color-accent);
  background-color: #def8ff;
  box-shadow: 0 0 0 1px var(--color-primary);
}

.ui-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: var(--radius-lg);
  font-size: var(--fs-16);
  font-weight: var(--fw-medium);
  line-height: 1;
  cursor: pointer;
  box-sizing: border-box;
}

.ui-btn--dark {
  width: 75px;
  height: 36px;
  padding: 10px 16px;
  background: var(--color-text-strong);
  color: var(--color-white);
  font-weight: var(--fw-regular);
}

.ui-btn--primary {
  height: 48px;
  padding: 14px 16px;
  background: var(--color-primary);
  color: var(--color-text-strong);
}

.ui-btn--block {
  width: 100%;
}

.ui-btn--dark.ui-btn--block {
  width: 100%;
  height: 52px;
}


.hidden {
  display: none !important;
}

/* App Shell — 390px fixed center (Figma Main) */
.app-container {
  max-width: var(--app-width);
  width: 100%;
  height: 100dvh;
  max-height: 100dvh;
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--color-white);
  border-left: 1px solid #ececec;
  border-right: 1px solid #ececec;
  box-shadow: none;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Nav Bar */
.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-height);
  padding: 0 16px;
  background: var(--color-white);
  flex-shrink: 0;
  position: relative;
  z-index: 10;
}

.nav-back {
  position: absolute;
  left: 8px;
  z-index: 2;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.nav-logo {
  display: flex;
  align-items: center;
  cursor: pointer;
}

.nav-logo.hidden {
  display: none;
}

.nav-title {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  font-family: var(--font-main);
  font-size: 17px;
  font-weight: 500;
  line-height: 1;
  color: #181818;
  pointer-events: none;
}

.nav-title.hidden {
  display: none;
}

.nav-add {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-add.hidden {
  display: none;
}

.nav-add img {
  display: block;
  width: 24px;
  height: 24px;
}


.logo-img {
  display: block;
  height: 36px;
  width: auto;
}

.btn-login {
  margin-left: auto;
  background: var(--color-login-bg);
  border: none;
  border-radius: var(--radius-pill);
  padding: 6px 16px;
  font-family: var(--font-main);
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text);
  cursor: pointer;
  line-height: 1.5;
}

.btn-coin {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  height: 30px;
  margin-left: auto;
  padding: 0 12px 0 4px;
  border: none;
  border-radius: var(--radius-pill);
  background: var(--color-bg-coin);
  cursor: pointer;
  font-size: var(--fs-14);
  font-weight: var(--fw-medium);
  color: var(--color-text);
  line-height: 1;
}

.btn-coin.hidden {
  display: none;
}

.btn-coin__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.btn-coin__icon img {
  display: block;
  width: 20px;
  height: 16px;
  object-fit: contain;
}

.btn-login.hidden {
  display: none;
}

/* Views */
.view {
  display: none;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-bottom: var(--tab-height);
  -webkit-overflow-scrolling: touch;
}

.view--active {
  display: block;
}

.view#view-input {
  padding-bottom: 0;
  overflow: hidden;
  display: none;
}

.view#view-input.view--active {
  display: flex;
  flex-direction: column;
}

.view#view-result {
  padding-bottom: calc(var(--tab-height) + 12px);
  display: none;
  overflow-y: auto;
}

.view#view-result.view--active {
  display: block;
}

.view#view-charge {
  padding-bottom: 0;
  overflow: hidden;
  display: none;
}

.view#view-charge.view--active {
  display: flex;
  flex-direction: column;
}

/* ── 운세 화면 (Figma 26:3290) ── */
.fortune {
  padding: 32px 0 40px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.fortune__block {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 0 16px;
}

.fortune__title {
  font-size: var(--fs-18);
  font-weight: var(--fw-semibold);
  line-height: 1;
  color: var(--color-black);
}

.fortune__title-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

/* 사주 정보 —— 변경 : 같은 줄 좌·우 */
.fortune__title-row.fortune__title-row--actions {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  box-sizing: border-box;
}

.fortune__title-row.fortune__title-row--actions .fortune__title {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
}

.fortune__title-row.fortune__title-row--actions .fortune__edit-btn {
  flex: 0 0 auto;
  margin-left: auto;
}

.fortune__edit-btn {
  flex-shrink: 0;
  width: 75px;
  height: 36px;
  padding: 8px 14px;
  font-size: var(--fs-14);
  line-height: 1.2;
}

.fortune__note {
  margin: 0;
  font-size: var(--fs-14);
  font-weight: var(--fw-regular);
  line-height: 1.2;
  color: #989898;
}

.fortune__note span {
  margin-right: 2px;
}

.fortune-pillars {
  display: flex;
  flex-direction: column;
  gap: var(--space-12);
}

.fortune-pillars__row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.fortune-pillars__label,
.fortune-pillars__stage {
  text-align: center;
  font-size: var(--fs-14);
  color: var(--color-text-subtle);
  line-height: 1;
}

.fortune-pillars__stage {
  font-size: var(--fs-15);
  font-weight: var(--fw-medium);
  color: var(--color-text-strong);
}

.fortune-pillars__row--sinsal {
  align-items: start;
  min-height: 28px;
}

.fortune-pillars__sinsal {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  min-height: 1em;
}

.fortune-sinsal-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  max-width: 100%;
  padding: 3px 6px;
  border: 1px solid var(--color-badge-border);
  border-radius: var(--radius-md);
  background: var(--color-badge-bg);
  font-size: 11px;
  font-weight: var(--fw-medium);
  color: var(--color-text-strong);
  line-height: 1.2;
  white-space: nowrap;
}

.fortune-sinsal-tag__basis {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: var(--fw-regular, 400);
  color: var(--color-text-subtle);
}

.fortune-sinsal-tag--special {
  border-color: #d4c4b0;
  background: #f7f1ea;
}

.fortune-sinsal-tag--guiin {
  border-color: #b8c9b0;
  background: #eef5ea;
}

.fortune-cell {
  position: relative;
  height: 95px;
  background: var(--color-pillar);
  border: 1px solid transparent;
  border-radius: var(--radius-lg);
  color: var(--color-oheng-on-dark);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 4px;
  box-sizing: border-box;
}

.fortune-cell--wood {
  background: var(--color-oheng-wood);
  color: var(--color-oheng-on-dark);
}

.fortune-cell--fire {
  background: var(--color-oheng-fire);
  color: var(--color-oheng-on-dark);
}

.fortune-cell--earth {
  background: var(--color-oheng-earth);
  color: var(--color-oheng-on-light);
}

.fortune-cell--metal {
  background: var(--color-oheng-metal);
  border-color: var(--color-oheng-metal-border);
  color: var(--color-oheng-on-light);
}

.fortune-cell--water {
  background: var(--color-oheng-water);
  color: var(--color-oheng-on-light);
}

.fortune-cell__hanja {
  font-size: 24px;
  font-weight: 500;
  line-height: 1;
}

.fortune-cell__elem {
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
}

.fortune-cell__god {
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
}

.fortune__divider {
  height: 1px;
  background: var(--color-border-tab);
  width: 100%;
}

.fortune-flow {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  overflow-x: auto;
  /* 블록 좌측 패딩 상쇄 → 스크롤 영역 왼쪽은 풀블리드, 콘텐츠는 좌·우 16px inset */
  margin-left: calc(-1 * var(--page-x));
  width: calc(100% + var(--page-x));
  max-width: none;
  padding: 0 var(--page-x) 4px var(--page-x);
  box-sizing: border-box;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.fortune-flow::-webkit-scrollbar {
  display: none;
}

.flow-col {
  flex: 0 0 53px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border: none;
  background: none;
  font-family: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  box-sizing: border-box;
}

.flow-col-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  flex: 0 0 auto;
  align-self: flex-end;
}

.flow-col__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  background: #f8f8f8;
  border: 1px solid #ededee;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 500;
  color: #131313;
  line-height: 1;
  white-space: nowrap;
}

.flow-col--viewing,
.flow-col--current {
  flex: 0 0 auto;
  width: 70px;
  padding: 8px;
  gap: 8px;
  border-radius: 5px;
  box-sizing: border-box;
}

.flow-col--viewing {
  background: var(--color-flow-active-bg);
  border: 1px solid var(--color-flow-active-border);
  cursor: default;
}

.flow-col--current {
  background: rgba(112, 115, 124, 0.05);
  border: 1px solid rgba(112, 115, 124, 0.08);
}

.flow-col--active {
  background: var(--color-flow-active-bg);
  border: 1px solid var(--color-flow-active-border);
  border-radius: var(--radius-sm);
  padding: 8px;
  flex-basis: 70px;
  cursor: default;
}

.flow-col__age {
  font-size: 16px;
  font-weight: 500;
  color: #151515;
  line-height: 1;
  text-align: center;
}

.flow-col__meta {
  font-size: 15px;
  font-weight: 500;
  color: #989898;
  line-height: 1;
  text-align: center;
}

.flow-block {
  width: 53px;
  height: 56px;
  background: var(--color-flow);
  border: 1px solid transparent;
  border-radius: 4px;
  color: var(--color-oheng-on-dark);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  box-sizing: border-box;
}

.flow-block--wood {
  background: var(--color-oheng-wood);
  color: var(--color-oheng-on-dark);
}

.flow-block--fire {
  background: var(--color-oheng-fire);
  color: var(--color-oheng-on-dark);
}

.flow-block--earth {
  background: var(--color-oheng-earth);
  color: var(--color-oheng-on-light);
}

.flow-block--metal {
  background: var(--color-oheng-metal);
  border-color: var(--color-oheng-metal-border);
  color: var(--color-oheng-on-light);
}

.flow-block--water {
  background: var(--color-oheng-water);
  color: var(--color-oheng-on-light);
}

.flow-block__hanja {
  font-size: 19px;
  font-weight: 500;
  line-height: 1;
}

.flow-block__elem {
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
}

.fortune-cheer {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 16px;
  width: calc(100% - 32px);
  max-width: 358px;
  height: 130px;
  border-radius: 10px;
  overflow: hidden;
  box-sizing: border-box;
  border: 1px solid #edffc3;
  background: rgba(255, 251, 211, 0.2);
}

.fortune-cheer__pattern {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.45;
  background-image: url("assets/fortune-cheer-clover.svg");
  background-size: 52px 52px;
  background-repeat: repeat;
}

.fortune-cheer__content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.fortune-cheer__mascot {
  position: relative;
  width: 131px;
  height: 107px;
  flex-shrink: 0;
}

/* Figma 77:7170 relative to cat frame 77:7165 (left+33.74, top+29.2) */
.fortune-cheer__underlay {
  position: absolute;
  left: 33.74px;
  top: 29.2px;
  width: 57.12px;
  height: 70.7px;
  pointer-events: none;
  z-index: 0;
}

.fortune-cheer__cat {
  position: relative;
  z-index: 1;
  display: block;
  width: 131px;
  height: 107px;
  object-fit: cover;
  object-position: center;
}

.fortune-cheer__text {
  margin: 0;
  font-family: var(--font-cheer);
  font-size: 24px;
  font-weight: 400;
  line-height: 1.4;
  color: #000;
  letter-spacing: 0;
  white-space: nowrap;
}

.fortune__block--summary {
  gap: 16px;
  padding: 0 16px;
}

.fortune-period-banner {
  padding: 16px 16px 0;
  box-sizing: border-box;
}

.fortune-period-banner.hidden {
  display: none;
}

.fortune-period-banner__text {
  margin: 0;
  padding: 8px 16px;
  background: #def8ff;
  border-radius: 8px;
  font-size: 18px;
  font-weight: 600;
  line-height: 1;
  color: #000;
  text-align: center;
}

.fortune-guest-notice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 16px 16px 0;
  padding: 14px 14px 14px 16px;
  box-sizing: border-box;
  border: 1px solid #ececec;
  border-radius: 10px;
  background: #fafafa;
}

.fortune-guest-notice.hidden {
  display: none;
}

.fortune-guest-notice__copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.fortune-guest-notice__title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  color: #202020;
}

.fortune-guest-notice__text {
  margin: 0;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.45;
  color: #777;
  word-break: keep-all;
}

.fortune-guest-notice__login {
  flex-shrink: 0;
  align-self: center;
  min-width: 62px;
  height: 32px;
  padding: 0 12px;
  border: none;
  border-radius: 10px;
  background: var(--color-primary);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: #202020;
  cursor: pointer;
}

.fortune-summary-quote {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: -0.01em;
  word-break: keep-all;
  color: #9cd55f;
  text-align: left;
}

.fortune-summary-quote.hidden {
  display: none;
}

.fortune-summary-clip {
  position: relative;
  max-height: 72px;
  overflow: hidden;
}

.fortune-summary-clip--open {
  max-height: none;
  overflow: visible;
}

.fortune-summary {
  margin: 0;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.65;
  color: #000;
  white-space: pre-line;
  word-break: keep-all;
}

.fortune-accordion__content {
  margin: var(--space-16) 0 0;
  font-size: var(--fs-16);
  font-weight: var(--fw-regular);
  line-height: 1.65;
  color: var(--color-black);
  white-space: pre-line;
  word-break: keep-all;
}

.fortune-summary-fade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 56px;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.55) 35%,
    rgba(255, 255, 255, 0.92) 70%,
    #ffffff 100%
  );
}

.fortune-accordion {
  width: 100%;
  max-width: var(--content-width);
  margin: 0 auto;
  background: var(--color-white);
  border: 1px solid var(--color-line-normal);
  border-radius: var(--radius-sm);
  box-sizing: border-box;
  overflow: hidden;
}

.fortune-accordion__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-16);
  width: 100%;
  min-height: 68px;
  padding: 12px var(--space-20);
  border: none;
  background: transparent;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  box-sizing: border-box;
}

.fortune-accordion__chevron {
  display: block;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  transform: rotate(0deg);
  transition: transform var(--dur-accordion) var(--ease-accordion-chevron);
  will-change: transform;
}

.fortune-accordion--open > .fortune-accordion__head .fortune-accordion__chevron {
  transform: rotate(180deg);
}

.fortune-accordion__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--dur-accordion) var(--ease-accordion);
}

.fortune-accordion--open > .fortune-accordion__panel {
  grid-template-rows: 1fr;
}

.fortune-accordion__clip {
  overflow: hidden;
  min-height: 0;
}

.fortune-accordion__body {
  padding: 0 var(--space-20) var(--space-20);
  border-top: 1px solid var(--color-line-normal);
}

.fortune-accordion__content {
  margin: var(--space-16) 0 0;
  font-size: var(--fs-16);
  font-weight: var(--fw-regular);
  line-height: 1.65;
  color: var(--color-black);
  white-space: pre-line;
  word-break: keep-all;
}

.fortune-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px var(--space-8);
  background: var(--color-badge-bg);
  border: 1px solid var(--color-badge-border);
  border-radius: var(--radius-pill);
  font-size: var(--fs-14);
  font-weight: var(--fw-regular);
  line-height: 1.5;
  color: var(--color-black);
  white-space: nowrap;
}

.fortune-timeline {
  display: flex;
  flex-direction: column;
  gap: var(--space-28);
  padding: var(--space-32) var(--page-x) 24px;
  box-sizing: border-box;
}

.fortune-timeline.hidden {
  display: none;
}

.fortune-timeline__title {
  margin: 0;
}

.fortune-timeline__head {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fortune-timeline__note.hidden {
  display: none;
}

.fortune-timeline__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-16);
}

.fortune-wolun-wrap {
  display: flex;
  flex-direction: column;
  gap: 32px;
  width: 100%;
}

.fortune-wolun-wrap.hidden {
  display: none;
}

#fortune-solo {
  display: flex;
  flex-direction: column;
  gap: 32px;
  width: 100%;
}

#fortune-solo.hidden,
#fortune-compat.hidden {
  display: none;
}

.fortune-compat {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
}

.compat-stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-12);
  width: 100%;
}

.compat-relation {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-12);
  width: 100%;
  padding: var(--space-8) 0;
  background: var(--color-compat-banner);
  border-radius: var(--radius-lg);
  box-sizing: border-box;
  text-align: center;
}

.compat-relation__label,
.compat-relation__score {
  margin: 0;
  font-size: var(--fs-18);
  font-weight: var(--fw-semibold);
  line-height: 1.35;
  color: var(--color-black);
  padding: 0 var(--space-12);
  box-sizing: border-box;
  max-width: 100%;
}

.compat-relation__label {
  font-weight: var(--fw-regular);
}

.compat-duo {
  display: flex;
  gap: var(--space-12);
  width: 100%;
}

.compat-person {
  flex: 1 1 0;
  min-width: 0;
}

.compat-person__card {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
  width: 100%;
  padding: 24px var(--space-20);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-sizing: border-box;
  background: var(--color-white);
}

.compat-person__meta {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

.compat-pillars {
  display: flex;
  width: 100%;
  gap: 0;
}

.fortune-pillars--compat {
  flex: 1 1 0;
  min-width: 0;
  padding: 0 var(--page-x);
  box-sizing: border-box;
}

.fortune-pillars--compat .fortune-cell {
  height: 80px;
  padding: 8px 2px;
  border-radius: 3px;
}

.fortune-pillars--compat .fortune-cell__hanja {
  font-size: 18px;
}

.fortune-pillars--compat .fortune-cell__elem {
  font-size: 13px;
}

.fortune-pillars--compat .fortune-cell__god {
  font-size: 12px;
}

/* Figma 182:18561 — 월별 아코디언(열림): 헤더=월+서브, 배지는 본문 */
.monthly-head-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.monthly-month {
  font-size: var(--fs-18);
  font-weight: var(--fw-medium);
  line-height: 1.2;
  letter-spacing: normal;
  color: var(--color-label-normal);
  white-space: nowrap;
}

.monthly-desc {
  font-size: var(--fs-16);
  font-weight: var(--fw-light);
  line-height: 1.2;
  letter-spacing: normal;
  color: var(--color-lock-desc);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.fortune-accordion--monthly .fortune-accordion__head {
  align-items: center;
  min-height: 0;
  padding: var(--space-20);
}

.fortune-accordion--monthly.fortune-accordion--open .fortune-accordion__head {
  /* Figma 182:18561 — 헤더 ↔ 디바이더 gap 20 */
  padding-bottom: var(--space-20);
}

.fortune-accordion--monthly .fortune-accordion__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-20);
  /* Figma 본문 ≈ 325px @ 358 → 좌우 16 */
  padding: var(--space-16) var(--space-16) var(--space-20);
}

.fortune-accordion--monthly .fortune-accordion__content {
  margin-top: 0;
}

.monthly-body-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-16);
  width: 100%;
}

.monthly-detail-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: var(--space-8) var(--space-8) var(--space-8) var(--space-16);
  border: none;
  border-radius: var(--radius-pill);
  background: var(--color-text-strong);
  font-family: inherit;
  font-size: var(--fs-15);
  font-weight: var(--fw-regular);
  line-height: 1.5;
  color: var(--color-white);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.monthly-detail-btn img {
  display: block;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.fortune-accordion--timeline .fortune-accordion__head {
  padding: var(--space-20);
}

.fortune-accordion--timeline .fortune-accordion__body {
  padding: var(--space-16) var(--space-20) var(--space-20);
}

.timeline-years {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.timeline-year-pill {
  display: inline-flex;
  align-items: center;
  gap: 0;
  padding: 4px 0 4px 8px;
  background: #fafeff;
  border: 1px solid #bcf0ff;
  border-radius: 999px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.5;
  color: #000;
  cursor: pointer;
}

.timeline-year-pill img {
  display: block;
  width: 24px;
  height: 24px;
}

.timeline-years__hint {
  margin: 8px 0 0;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  color: rgba(55, 56, 60, 0.61);
}

.timeline-years__hint span {
  font-size: 16px;
}

.timeline-highlight {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.timeline-highlight__row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.timeline-highlight__year {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  color: #000;
}

.timeline-highlight__badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  background: var(--color-badge-bg);
  border: 1px solid var(--color-badge-border);
  border-radius: var(--radius-pill);
  font-size: var(--fs-15);
  font-weight: var(--fw-regular);
  line-height: 1.5;
  color: var(--color-black);
}

.timeline-highlight__text {
  margin: 0;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  color: #000;
}

.fortune-unlock-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 355px;
  height: 48px;
  margin: 8px auto 0;
  padding: 14px 16px;
  border: none;
  border-radius: 10px;
  background: #232323;
  color: #fff;
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  box-sizing: border-box;
}

.fortune-unlock-btn[hidden] {
  display: none;
}

.fortune-share {
  display: flex;
  justify-content: center;
  padding: 12px 20px 20px;
}

.fortune-share__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 8px 16px;
  border: 1px solid #e5e5e5;
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
  font-family: var(--font-main);
  font-size: 15px;
  font-weight: 500;
  color: #202020;
  line-height: 1;
}

.fortune-share__btn:active {
  background: #f7f7f7;
}

.fortune-share__btn img {
  display: block;
  width: 20px;
  height: 20px;
}

.view#view-share {
  padding-bottom: 32px;
  display: none;
  overflow-y: auto;
}

.view#view-share.view--active {
  display: block;
}

.fortune--share .fortune-summary-quote {
  display: block;
}

.fortune--share .fortune-summary-quote:empty {
  display: none;
}

.fortune-share-cta {
  display: flex;
  justify-content: center;
  padding: 16px 16px 12px;
}

.fortune-share-cta__btn {
  width: 100%;
  max-width: none;
  min-height: 52px;
  border: none;
  border-radius: 14px;
  background: #202020;
  color: #fff;
  font-family: var(--font-main);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

.fortune-share-cta__btn:active {
  opacity: 0.88;
}

.nav-bar--share .nav-logo {
  position: absolute;
  left: 12px;
  z-index: 2;
}

.nav-bar--share .nav-title {
  max-width: calc(100% - 120px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fortune-locks {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 0 16px;
  box-sizing: border-box;
}

.fortune-lock {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  max-width: 358px;
  min-height: 68px;
  margin: 0 auto;
  padding: 12px 20px;
  background: #fff;
  border: 1px solid rgba(112, 115, 124, 0.22);
  border-radius: 5px;
  box-sizing: border-box;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  appearance: none;
  -webkit-appearance: none;
}

.fortune-lock:active {
  background: #fafafa;
}

.fortune-lock__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.fortune-lock__label {
  font-size: var(--fs-18);
  font-weight: var(--fw-regular);
  color: var(--color-label-alt);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.fortune-lock__label.fortune-lock__label--open {
  color: var(--color-label-normal);
  font-weight: var(--fw-medium);
}

.fortune-lock__desc {
  font-size: var(--fs-16);
  font-weight: var(--fw-light);
  color: var(--color-lock-desc);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.fortune-lock__lock {
  display: block;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  object-fit: contain;
}

/* 결제안내 팝업 — Figma 13:33 */
.pay-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}

.pay-modal:not([hidden]) {
  display: flex;
}

.pay-modal[hidden] {
  display: none !important;
}

.pay-modal__backdrop {
  position: absolute;
  inset: 0;
  border: none;
  padding: 0;
  background: #343434;
  opacity: 0.7;
  cursor: pointer;
}

.pay-modal__panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 330px;
  background: #fff;
  border: 1px solid #9f9f9f;
  border-radius: 10px;
  overflow: hidden;
  box-sizing: border-box;
}

.pay-modal__header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 54px;
  padding: 16px 16px 0;
  box-sizing: border-box;
}

.pay-modal__title {
  margin: 0;
  font-size: 16px;
  font-weight: 400;
  line-height: 1;
  color: #4b4b4b;
}

.pay-modal__close {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pay-modal__close img {
  display: block;
  width: 33px;
  height: 33px;
}

.pay-modal__body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 36px;
  padding: 19px 20px 28px;
  box-sizing: border-box;
}

.pay-modal__copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.pay-modal__desc {
  margin: 0;
  font-size: 16px;
  font-weight: 400;
  line-height: normal;
  color: #000;
  text-align: center;
}

.pay-modal__cost {
  margin: 0;
  font-size: 16px;
  font-weight: 400;
  line-height: normal;
  color: #0182b2;
  text-align: center;
}

.pay-modal__cost span {
  font-size: 20px;
  font-weight: 500;
}

/* 결제 잔액 박스 — Figma 90:8742 (결제 팝업-말랑부족) */
.pay-modal__balance {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 290px;
  height: 132px;
  padding: 16px 20px;
  box-sizing: border-box;
  border: 1px solid #9de6fb;
  border-radius: 5px;
  background: #fafeff;
}

.pay-modal__balance-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  width: 234px;
  max-width: 100%;
  box-sizing: border-box;
}

.pay-modal__balance-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  flex: 0 0 auto;
}

.pay-modal__balance-col--owned {
  width: 88px;
}

.pay-modal__balance-col--used {
  width: 80px;
}

.pay-modal__balance-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.pay-modal__balance-label {
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  color: #6b6b6b;
}

.pay-modal__balance-value {
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  color: #202020;
}

.pay-modal__balance-value em {
  display: inline-block;
  white-space: nowrap;
  font-style: normal;
  font-size: 16px;
  font-weight: 500;
}

.pay-modal__shortfall {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  color: #ff4d4d;
  white-space: nowrap;
}

.pay-modal__shortfall[hidden] {
  display: none !important;
}

.pay-modal__balance-divider {
  width: 1px;
  height: 48px;
  flex-shrink: 0;
  background: rgba(112, 115, 124, 0.22);
}

.pay-modal__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  max-width: 290px;
  min-height: 44px;
  padding: 8px 19px;
  border: none;
  border-radius: 10px;
  background: var(--color-primary);
  color: #232323;
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  cursor: pointer;
  box-sizing: border-box;
}

.pay-modal__btn-icon {
  display: block;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* Hero Banner — Figma Frame 34824 / Rectangle 5 polka dots on #f6fdff */
.hero-banner {
  position: relative;
  height: 146px;
  background-color: var(--color-bg-light);
  background-image: url("assets/hero-dots.png?v=6");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100% 100%;
  border-top: 1px solid var(--color-border-light);
  border-bottom: 1px solid var(--color-border-light);
  overflow: hidden;
}

.hero-illustration {
  position: absolute;
  left: 22px;
  top: 20px;
  width: 157px;
  height: 98px;
}

.hero-cats {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: left center;
  display: block;
}

.hero-text {
  position: absolute;
  left: 187px;
  right: auto;
  top: 35px;
  width: 167px;
  height: auto;
}

/* Service Grid — Figma: padding 16, row-gap 20, column-gap 16, card 171×164 */
.service-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 16px;
  row-gap: 20px;
  padding: 24px 16px;
  width: 100%;
}

.service-card {
  position: relative;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 5px;
  height: 164px;
  width: 100%;
  min-width: 0;
  padding: 0;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  transition: box-shadow 0.15s ease;
  font-family: inherit;
}

.service-card--static {
  cursor: default;
}

.service-card:not(.service-card--static):active {
  box-shadow: 0 2px 8px rgba(49, 162, 215, 0.2);
}

/* Title + description: left 18, top 24, gap 8 */
.service-card__body {
  position: absolute;
  left: 18px;
  top: 24px;
  right: 18px;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0;
  pointer-events: none;
}

.service-card__title {
  font-family: var(--font-card);
  font-size: 18px;
  font-weight: 500;
  line-height: normal;
  margin: 0;
  color: #000000;
}

.service-card__desc {
  font-family: var(--font-card);
  font-size: 13px;
  line-height: 1.4;
  color: #404040;
  margin: 0;
  word-break: keep-all;
}

/* Price: left 18, top 128 (bottom ~22) */
.service-card__price {
  position: absolute;
  left: 18px;
  top: 128px;
  z-index: 1;
  font-family: var(--font-card);
  font-size: 14px;
  font-weight: 400;
  line-height: 1;
  color: var(--color-accent);
  pointer-events: none;
}

/* Icon: Figma left ~104, top ~98 on 171px card → right ~18, bottom ~20 */
.service-card__icon {
  position: absolute;
  right: 18px;
  bottom: 20px;
  width: 49px;
  height: 46px;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  z-index: 0;
  pointer-events: none;
}

.cat-icon {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* Form Section (legacy helpers kept for other screens) */
.form-section {
  padding: 24px 16px;
}

.section-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--color-text);
}

.section-desc {
  font-size: 13px;
  color: var(--color-text-secondary);
  line-height: 1.5;
  margin-bottom: 24px;
}

/* 사주 정보 추가 — Figma 16:940 */
.saju-add {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

.saju-add__fields {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 8px 0 24px;
  -webkit-overflow-scrolling: touch;
}

.saju-add__field {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 0 16px;
}

.saju-add__label {
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
  color: var(--color-black);
}

.saju-add__label-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.saju-add__optional {
  font-size: 14px;
  font-weight: 400;
  line-height: 1;
  color: #ff5656;
}

.saju-add__input {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  box-sizing: border-box;
  border: 1px solid #e4e4e4;
  border-radius: 8px;
  font-family: var(--font-main);
  font-size: 16px;
  font-weight: 400;
  color: var(--color-text);
  background: var(--color-white);
  appearance: none;
  -webkit-appearance: none;
}

.saju-add__input::placeholder {
  color: #8e8e8e;
}

.saju-add select.saju-add__input {
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%238e8e8e' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
  color: #8e8e8e;
}

.saju-add select.saju-add__input.has-value {
  color: var(--color-text);
}

.saju-add__input:focus {
  outline: none;
  border-color: #8ce5ff;
}

.saju-add__input.ui-input--alert,
.saju-add__input.ui-input--alert:focus {
  border-color: var(--color-accent);
  background-color: #def8ff;
  box-shadow: 0 0 0 1px var(--color-primary);
}

.radio-chips {
  display: flex;
  gap: 8px;
  width: 100%;
}

.radio-chip {
  flex: 1;
  height: 48px;
  padding: 12px;
  box-sizing: border-box;
  border: 1px solid #c6c6c6;
  border-radius: 8px;
  background: var(--color-white);
  font-family: var(--font-main);
  font-size: 17px;
  font-weight: 400;
  color: rgba(55, 56, 60, 0.61);
  cursor: pointer;
}

.radio-chip.active {
  border-color: #8ce5ff;
  font-weight: 500;
  color: #1d1d1d;
}

#leap-month-field[hidden] {
  display: none;
}

.saju-add__control {
  position: relative;
  width: 100%;
}

.saju-add__control .saju-add__input {
  padding-right: 44px;
}

.saju-add__control-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 1;
}

.saju-add__time {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  width: 100%;
}

.saju-add__time .saju-add__control {
  width: 100%;
}

.saju-add__check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 17px;
  font-weight: 400;
  line-height: 1;
  color: #989898;
  cursor: pointer;
  width: fit-content;
  align-self: flex-end;
}

.saju-add__check input {
  width: 20px;
  height: 20px;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  box-sizing: border-box;
  border: 1.5px solid #c6c6c6;
  border-radius: 4px;
  background: var(--color-white);
  cursor: pointer;
  flex-shrink: 0;
}

.saju-add__check input:checked {
  border-color: #67d4ff;
  background: #def8ff;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='10' viewBox='0 0 12 10' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 5L4.5 8.5L11 1.5' stroke='%231E1E1E' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}

.saju-add__footer {
  flex-shrink: 0;
  box-sizing: border-box;
  min-height: 94px;
  padding: 10px 16px;
  display: flex;
  flex-direction: column;
  border-top: 1px solid rgba(112, 115, 124, 0.22);
  background: var(--color-white);
}

.saju-add__submit {
  height: 40px;
  padding: 8px 19px;
  border-radius: 10px;
  margin: 0;
}

.saju-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-field label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--color-text);
}

.form-field input[type="text"],
.form-field input[type="date"],
.form-field select {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-family: var(--font-main);
  font-size: 15px;
  color: var(--color-text);
  background: var(--color-white);
  appearance: none;
  -webkit-appearance: none;
}

.form-field select {
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23404040' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.form-field input:focus,
.form-field select:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(49, 162, 215, 0.15);
}

.form-field--disabled {
  opacity: 0.4;
  pointer-events: none;
}

.segmented-control {
  display: flex;
  background: #f0f0f0;
  border-radius: var(--radius-md);
  padding: 3px;
  gap: 2px;
}

.segment {
  flex: 1;
  height: 40px;
  border: none;
  background: transparent;
  border-radius: 6px;
  font-family: var(--font-main);
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.segment.active {
  background: var(--color-white);
  color: var(--color-text);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.btn-primary {
  width: 100%;
  height: 48px;
  margin-top: 8px;
  background: var(--color-accent);
  color: var(--color-white);
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-main);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}

.btn-primary:active {
  opacity: 0.85;
}

/* Result — User Info */
.result-user-info {
  padding: 16px;
  background: var(--color-bg-light);
  border-bottom: 1px solid var(--color-border-light);
}

.user-info-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--color-white);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  padding: 16px 20px;
}

.user-info-name {
  font-size: 15px;
  font-weight: 600;
}

.user-info-name span {
  font-weight: 400;
  color: var(--color-text-secondary);
  font-size: 13px;
}

.user-info-date,
.user-info-time {
  font-size: 14px;
  color: var(--color-text-secondary);
}

/* Saju Table */
.saju-section {
  padding: 20px 16px 0;
  flex-shrink: 0;
}

.saju-table {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.saju-col-header {
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-secondary);
  padding-bottom: 4px;
}

.saju-cell {
  background: var(--color-bg-light);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-sm);
  padding: 10px 4px;
  text-align: center;
  min-height: 95px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.saju-stem {
  font-size: 24px;
  font-weight: 600;
  line-height: 1;
}

.saju-element {
  font-size: 12px;
  color: var(--color-text-secondary);
}

.saju-tengod {
  font-size: 12px;
  color: var(--color-accent);
}

.saju-stage {
  text-align: center;
  font-size: 12px;
  color: var(--color-text-secondary);
  padding-top: 4px;
}

/* Element colors */
.elem-wood { color: #2d8a4e; }
.elem-fire { color: #d64545; }
.elem-earth { color: #b8860b; }
.elem-metal { color: #6b7280; }
.elem-water { color: #2563eb; }

/* Chat Section */
.chat-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 16px;
  min-height: 0;
  background: var(--color-chat-bg);
}

.chat-section .section-title {
  flex-shrink: 0;
  margin-bottom: 12px;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 12px;
  -webkit-overflow-scrolling: touch;
}

.chat-bubble {
  display: flex;
  gap: 8px;
  max-width: 88%;
  animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.chat-bubble--assistant {
  align-self: flex-start;
}

.chat-bubble--user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.chat-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--color-border-light);
}

.chat-bubble__content {
  padding: 12px 14px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.55;
  word-break: keep-all;
}

.chat-bubble--assistant .chat-bubble__content {
  background: var(--color-chat-assistant);
  border: 1px solid var(--color-border-light);
  border-top-left-radius: 4px;
}

.chat-bubble--user .chat-bubble__content {
  background: var(--color-chat-user);
  border-top-right-radius: 4px;
}

.chat-input-bar {
  display: flex;
  gap: 8px;
  padding-top: 8px;
  flex-shrink: 0;
}

.chat-input-bar input {
  flex: 1;
  height: 44px;
  padding: 0 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  font-family: var(--font-main);
  font-size: 14px;
  background: var(--color-white);
}

.chat-input-bar input:focus {
  outline: none;
  border-color: var(--color-accent);
}

.btn-send {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-accent);
  color: var(--color-white);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.btn-send:active {
  opacity: 0.85;
}

/* Loading */
.loading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.92);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  z-index: 200;
}

.loading-overlay.hidden {
  display: none !important;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--color-border-light);
  border-top-color: var(--color-accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-overlay p {
  font-size: 14px;
  color: var(--color-text-secondary);
}

/* Tab Bar — Figma: h 94, pt 12 / pb 42, item h 40, icon 24, label y=28 (gap 4) */
.tab-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: flex-start;
  background: var(--color-white);
  border-top: 1px solid var(--color-border-tab);
  padding: 12px 0 42px;
  flex-shrink: 0;
  height: 94px;
  box-sizing: border-box;
}

.tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font-family: var(--font-main);
  font-size: 10px;
  font-weight: 400;
  line-height: 12px;
  color: #1e1e1e;
}

.tab-item img,
.tab-item .tab-icon {
  display: block;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  object-fit: contain;
  object-position: center;
  overflow: visible;
}

.tab-item span {
  display: block;
  width: 100%;
  text-align: center;
  line-height: 12px;
  height: 12px;
  color: #1e1e1e;
}

.tab-item--active {
  color: #1e1e1e;
}

/* 사주 목록 — Figma 43:4234 */
.saju-list {
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding: 8px 0 24px;
  width: 100%;
}

.saju-list__section {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 0 16px;
}

.saju-list__heading {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  line-height: 1;
  color: var(--color-black);
}

.saju-list__cards {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.saju-list-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  min-height: 94px;
  padding: 24px 20px;
  box-sizing: border-box;
  border: 1px solid rgba(112, 115, 124, 0.16);
  border-radius: 10px;
  background: var(--color-white);
  text-align: left;
  font-family: inherit;
}

.saju-list-card--primary {
  border: 2px solid #8ce5ff;
  min-height: 96px;
  padding: 23px 19px;
}

.saju-list-card__text {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.saju-list-card__name-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}

.saju-list-card__name {
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
  color: #131313;
}

.saju-list-card__tag {
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  color: rgba(46, 47, 51, 0.88);
}

.saju-list-card__meta-tag {
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  color: #989898;
}

.saju-list-card__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 16px;
  font-weight: 400;
  line-height: 1;
  color: rgba(55, 56, 60, 0.61);
}

.saju-list-card__more {
  width: 44px;
  height: 40px;
  flex-shrink: 0;
  border: none;
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.saju-list-card__more-dots {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
}

.saju-list-card__more-dots span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #1e1e1e;
}

.saju-list__empty {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 86px;
  padding: 0 20px;
  box-sizing: border-box;
  border: 1.5px dashed rgba(112, 115, 124, 0.22);
  border-radius: 10px;
  background: var(--color-white);
  cursor: pointer;
  font-family: inherit;
  font-size: 16px;
  font-weight: 400;
  color: var(--color-black);
}

.saju-list__empty img {
  display: block;
  width: 24px;
  height: 24px;
}

.saju-list__hint {
  margin: 0;
  padding: 12px 4px;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  color: #989898;
}

.saju-list-card:not(.saju-list-card--primary) {
  cursor: pointer;
}

/* 사주 목록 옵션 메뉴 / 보관함 삭제 메뉴 */
.saju-menu {
  position: absolute;
  inset: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  /* 스크롤과 무관하게 현재 보이는 앱 화면(뷰포트)에 고정 */
  pointer-events: none;
}

.saju-menu:not([hidden]) {
  display: flex;
  pointer-events: auto;
}

.saju-menu[hidden] {
  display: none;
}

.saju-menu__backdrop {
  position: absolute;
  inset: 0;
  border: none;
  padding: 0;
  margin: 0;
  background: #343434;
  opacity: 0.7;
  cursor: pointer;
}

.saju-menu__panel {
  position: relative;
  z-index: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 0 calc(16px + env(safe-area-inset-bottom, 0px));
  box-sizing: border-box;
  background: var(--color-white);
  border-radius: 10px 10px 0 0;
}

.saju-menu__handle-wrap {
  display: flex;
  justify-content: center;
  padding: 12px 0 8px;
  flex-shrink: 0;
}

.saju-menu__handle {
  width: 70px;
  height: 4px;
  border-radius: 999px;
  background: #f6f6f6;
}

.saju-menu__list {
  display: flex;
  flex-direction: column;
  margin: 0 16px;
  border: 1px solid rgba(112, 115, 124, 0.12);
  border-radius: 12px;
  overflow: hidden;
  background: var(--color-white);
}

.saju-menu__item {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border: none;
  border-radius: 0;
  background: var(--color-white);
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
  color: #1e1e1e;
  cursor: pointer;
}

.saju-menu__list .saju-menu__item + .saju-menu__item {
  border-top: 1px solid rgba(112, 115, 124, 0.12);
}

.saju-menu__item--danger {
  color: #e5484d;
}

.saju-menu__item--cancel {
  width: calc(100% - 32px);
  margin: 0 16px;
  border-radius: 12px;
  border: 1px solid rgba(112, 115, 124, 0.12);
  font-weight: 400;
  color: #989898;
}

/* 앱 내 확인 다이얼로그 */
.app-confirm {
  position: absolute;
  inset: 0;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
}

.app-confirm:not([hidden]) {
  display: flex;
}

.app-confirm[hidden] {
  display: none;
}

.app-confirm__backdrop {
  position: absolute;
  inset: 0;
  border: none;
  background: rgba(0, 0, 0, 0.4);
  cursor: pointer;
}

.app-confirm__panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 300px;
  padding: 24px 20px 16px;
  border-radius: 14px;
  background: var(--color-white);
  box-sizing: border-box;
}

.app-confirm__title {
  margin: 0 0 10px;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  color: #1e1e1e;
  word-break: keep-all;
}

.app-confirm__title[hidden] {
  display: none;
}

.app-confirm__message {
  margin: 0 0 20px;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  text-align: center;
  color: #1e1e1e;
  word-break: keep-all;
  white-space: pre-line;
}

.app-confirm--with-title .app-confirm__message {
  margin-top: 0;
  font-size: 14px;
  font-weight: 400;
  color: #666;
}

.app-confirm__actions {
  display: flex;
  gap: 8px;
}

.app-confirm__btn {
  flex: 1;
  min-height: 44px;
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
}

.app-confirm__btn--cancel {
  background: #f2f3f5;
  color: #1e1e1e;
}

.app-confirm__btn--ok {
  background: var(--color-primary);
  color: var(--color-text-strong);
}

.app-confirm--alert .app-confirm__actions {
  justify-content: center;
}

.app-confirm--alert .app-confirm__btn--ok {
  flex: 1;
  max-width: 100%;
  background: var(--color-primary);
  border: 1px solid var(--color-primary-mid);
  color: var(--color-text-strong);
}

/* 종합운세 — 사주 정보 확인 (Figma 123:13331) */
.saju-info {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--space-60);
  padding: 35px var(--page-x) 24px;
  width: 100%;
}

.saju-info__main {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-20);
  width: 100%;
}

.saju-info__hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-28);
  width: 240px;
  max-width: 100%;
}

.saju-info__visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-20);
  width: 100%;
}

.ui-field--full {
  width: 100%;
}

.saju-info__title-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  width: fit-content;
  max-width: 100%;
  height: 17px;
  padding: 0 4px;
  background: var(--color-primary-soft);
  border-left: 1px solid var(--color-primary-mid);
  border-right: 1px solid var(--color-primary-mid);
  box-sizing: content-box;
}

.saju-info__title-text span {
  font-size: 24px;
  font-weight: var(--fw-semibold);
  line-height: 1;
  color: var(--color-black);
  white-space: nowrap;
  margin-bottom: -4px;
}

.saju-info__title-text[hidden],
.saju-info__badge-wrap[hidden],
.ui-field--full[hidden],
.ui-field-row[hidden],
.ui-card--profile[hidden] {
  display: none !important;
}

#period-year-field[hidden],
#fortune-edit-period-year-field[hidden],
#fortune-edit-period-row[hidden],
#fortune-edit-relation-field[hidden],
#fortune-edit-context-row[hidden],
.ui-field[hidden] {
  display: none !important;
}

.saju-info__badge-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  width: 85px;
  height: 17px;
  background: var(--color-primary-soft);
  border-left: 1px solid var(--color-primary-mid);
  border-right: 1px solid var(--color-primary-mid);
  overflow: visible;
}

.saju-info__badge {
  display: block;
  width: 77px;
  height: 25px;
  margin-bottom: -4px;
  object-fit: contain;
}

.saju-info__illust {
  width: 100%;
  height: 108px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.saju-info__cat {
  display: block;
  height: 108px;
  width: auto;
  max-width: 173px;
  object-fit: contain;
}

.saju-info__hint {
  text-align: center;
  width: 100%;
  margin: 0;
}

.saju-info__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-20);
  width: 100%;
}

/* Login Bottom Sheet — Figma 73:6803 / Frame 34653 */
.login-sheet {
  position: absolute;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  pointer-events: none;
}

.login-sheet:not([hidden]) {
  pointer-events: auto;
}

.login-sheet[hidden] {
  display: none;
}

.login-sheet__backdrop {
  position: absolute;
  inset: 0;
  border: none;
  padding: 0;
  margin: 0;
  background: #343434;
  opacity: 0.7;
  cursor: pointer;
}

.login-sheet__panel {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 442px;
  background: var(--color-white);
  border-radius: 10px 10px 0 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(100%);
  transition: transform 0.28s ease;
}

.login-sheet--open .login-sheet__panel {
  transform: translateY(0);
}

.login-sheet__handle-wrap {
  display: flex;
  justify-content: center;
  padding: 12px 0 8px;
  flex-shrink: 0;
}

.login-sheet__handle {
  width: 70px;
  height: 4px;
  border-radius: 999px;
  background: #f6f6f6;
}

.login-sheet__header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 54px;
  flex-shrink: 0;
}

.login-sheet__title {
  font-family: var(--font-main);
  font-size: 16px;
  font-weight: 400;
  line-height: normal;
  color: #000;
  margin: 0;
}

.login-sheet__close {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-sheet__close img {
  display: block;
  width: 40px;
  height: 40px;
}

.login-sheet__actions {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 350px;
  max-width: calc(100% - 40px);
  margin: 30px auto 0;
}

.login-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 48px;
  padding: 12px 20px;
  border-radius: 5px;
  border: none;
  cursor: pointer;
  font-family: var(--font-main);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  box-sizing: border-box;
}

.login-btn__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.login-btn__icon img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.login-btn--kakao {
  background: #fee500;
  color: #000;
  padding-left: 28px;
  padding-right: 28px;
}

.login-btn--naver {
  background: #03c75a;
  color: #fff;
}

.login-btn--google,
.login-btn--email {
  background: #fff;
  color: #000;
  border: 1px solid #ddd;
}

.login-btn--email[hidden] {
  display: none !important;
}

.login-btn--email-submit {
  background: var(--color-primary);
  color: #131313;
  border: none;
}

.login-email {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 350px;
  max-width: calc(100% - 40px);
  margin: 24px auto 0;
}

.login-email--page {
  width: 100%;
  max-width: 350px;
  margin: 0;
}

.email-login {
  padding: 24px 20px 40px;
  box-sizing: border-box;
}

.email-login__heading {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 700;
  color: #191919;
}

.email-login__desc {
  margin: 0 0 24px;
  font-size: 14px;
  line-height: 1.5;
  color: #6b6b6b;
}

.login-email[hidden] {
  display: none;
}

.login-email__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.login-email__field[hidden] {
  display: none;
}

.login-email__label {
  font-size: 13px;
  font-weight: 600;
  color: #404040;
}

.login-email__input {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid #dadce0;
  border-radius: 8px;
  box-sizing: border-box;
  font-family: inherit;
  font-size: 15px;
  color: #191919;
  background: #fff;
}

.login-email__input:focus {
  outline: none;
  border-color: #4285f4;
}

.login-email__error {
  margin: 0;
  font-size: 13px;
  color: #d93025;
}

.login-email__error[hidden] {
  display: none;
}

.login-email__toggle,
.login-email__back {
  border: none;
  background: transparent;
  color: #5f6368;
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  padding: 4px 0;
}

.login-email__toggle {
  color: #1a73e8;
  font-weight: 600;
}

.email-verify {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}

.email-verify[hidden] {
  display: none;
}

.email-verify__message {
  margin: 0;
  padding: 14px 12px;
  border-radius: 10px;
  background: #f3fbff;
  color: #204a5c;
  font-size: 14px;
  line-height: 1.5;
}

.email-verify__link {
  text-decoration: none;
  text-align: center;
}

.email-verify__link[hidden] {
  display: none;
}

/* 사주 추가/변경 Bottom Sheet — Figma 21:3082 */
.saju-sheet {
  position: absolute;
  inset: 0;
  z-index: 130;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  pointer-events: none;
}

.saju-sheet:not([hidden]) {
  pointer-events: auto;
}

.saju-sheet[hidden] {
  display: none;
}

.saju-sheet__backdrop {
  position: absolute;
  inset: 0;
  border: none;
  padding: 0;
  margin: 0;
  background: #343434;
  opacity: 0.7;
  cursor: pointer;
}

.saju-sheet__panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-height: min(560px, 75vh);
  background: var(--color-white);
  border-radius: 10px 10px 0 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(100%);
  transition: transform 0.28s ease;
}

.saju-sheet--open .saju-sheet__panel {
  transform: translateY(0);
}

.saju-sheet__handle-wrap {
  display: flex;
  justify-content: center;
  padding: 12px 0 8px;
  flex-shrink: 0;
}

.saju-sheet__handle {
  width: 70px;
  height: 4px;
  border-radius: 999px;
  background: #f6f6f6;
}

.saju-sheet__header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 16px;
  flex-shrink: 0;
}

.saju-sheet__title {
  margin: 0;
  font-family: var(--font-main);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.2;
  color: var(--color-black);
}

.saju-sheet__close {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.saju-sheet__close img {
  display: block;
  width: 40px;
  height: 40px;
}

.saju-sheet__body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 8px 16px 0;
  -webkit-overflow-scrolling: touch;
}

.saju-sheet__list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.saju-sheet__empty {
  margin: 8px 0 0;
  padding: 24px 12px;
  text-align: center;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  color: #989898;
}

.saju-pick {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  min-height: 94px;
  padding: 24px 20px;
  box-sizing: border-box;
  border: 1px solid rgba(112, 115, 124, 0.16);
  border-radius: 10px;
  background: var(--color-white);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
}

.saju-pick--active {
  border-color: #8ce5ff;
  border-width: 2px;
  padding: 23px 19px;
}

.saju-pick__text {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.saju-pick__name-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}

.saju-pick__name {
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
  color: #131313;
}

.saju-pick__tag {
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  color: rgba(46, 47, 51, 0.88);
}

.saju-pick__meta-tag {
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  color: #989898;
}

.saju-pick__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 16px;
  font-weight: 400;
  line-height: 1;
  color: rgba(55, 56, 60, 0.61);
}

.saju-pick__check {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  display: block;
}

.saju-sheet__add {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: calc(100% - 32px);
  margin: 16px 16px;
  min-height: 51px;
  padding: 12px 16px;
  box-sizing: border-box;
  border: 1.5px dashed rgba(112, 115, 124, 0.22);
  border-radius: 10px;
  background: var(--color-white);
  cursor: pointer;
  font-family: inherit;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--color-black);
  flex-shrink: 0;
}

.saju-sheet__add img {
  display: block;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.saju-sheet__footer {
  flex-shrink: 0;
  box-sizing: border-box;
  min-height: 94px;
  padding: 10px 16px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  border-top: 1px solid rgba(112, 115, 124, 0.22);
  background: var(--color-white);
}

.saju-sheet__confirm {
  height: 40px;
  padding: 8px 19px;
  border-radius: 10px;
  margin: 0;
  flex-shrink: 0;
}

/* Scrollbar */
.chat-messages::-webkit-scrollbar,
.view::-webkit-scrollbar {
  width: 4px;
}

.chat-messages::-webkit-scrollbar-thumb,
.view::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 2px;
}

/* 마이페이지 — Figma 44:4668 */
.mypage {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding-bottom: 8px;
}

.mypage__login-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  padding: 12px 16px;
  box-sizing: border-box;
}

.mypage__login-text {
  margin: 0;
  font-size: 16px;
  font-weight: 400;
  line-height: 1;
  color: #404040;
}

.mypage__login-text strong {
  font-weight: 700;
}

.mypage__login-btn {
  flex-shrink: 0;
  min-width: 62px;
  height: 32px;
  padding: 0 12px;
  border: none;
  border-radius: 10px;
  background: var(--color-primary);
  font-family: inherit;
  font-size: 15px;
  font-weight: 400;
  color: #202020;
  cursor: pointer;
}

.mypage__profile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px 16px 20px;
  box-sizing: border-box;
}

.mypage__profile-text {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.mypage__profile-name-row {
  display: flex;
  align-items: center;
  gap: 4px;
}

.mypage__profile-name {
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
  color: #000;
}

.mypage__profile-tag {
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  color: #000;
}

.mypage__profile-meta {
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  color: #989898;
}

.mypage__edit-btn {
  flex-shrink: 0;
  height: 30px;
  padding: 0 12px;
  border: 1px solid rgba(112, 115, 124, 0.22);
  border-radius: 999px;
  background: rgba(112, 115, 124, 0.08);
  font-family: inherit;
  font-size: 14px;
  font-weight: 400;
  color: rgba(55, 56, 60, 0.61);
  cursor: pointer;
}

.mypage__coin-wrap {
  padding: 12px 16px;
}

.mypage__coin-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  width: 100%;
  min-height: 115px;
  padding: 16px 12px;
  box-sizing: border-box;
  border: 1px solid #bcf0ff;
  border-radius: 10px;
  background: #fafeff;
  box-shadow: 1px 2px 2px rgba(217, 217, 217, 0.25);
}

.mypage__coin-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0 8px;
  box-sizing: border-box;
}

.mypage__coin-label {
  font-size: 16px;
  font-weight: 400;
  line-height: 1;
  color: #202020;
}

.mypage__coin-balance {
  display: flex;
  align-items: center;
  gap: 4px;
}

.mypage__coin-balance img {
  display: block;
  width: 20px;
  height: 16px;
  flex-shrink: 0;
  object-fit: contain;
}

.mypage__coin-value {
  font-size: 22px;
  font-weight: 600;
  line-height: 1;
  color: #202020;
}

.mypage__coin-unit {
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
  color: #202020;
}

.mypage__charge-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  max-width: 334px;
  min-height: 48px;
  padding: 16px 20px;
  border: none;
  border-radius: 10px;
  background: var(--color-primary);
  box-shadow: 0 4px 4px rgba(235, 235, 235, 0.25);
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  color: #404040;
  cursor: pointer;
}

.mypage__charge-btn img {
  display: block;
  width: 14px;
  height: 14px;
}

.mypage__stats {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 24px 16px;
  box-sizing: border-box;
}

.mypage__stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: 56px;
  border: none;
  background: none;
  padding: 0;
  font-family: inherit;
  cursor: pointer;
}

.mypage__stat-label {
  font-size: 14px;
  font-weight: 400;
  line-height: 1;
  color: #404040;
}

.mypage__stat-value {
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  color: #202020;
}

.mypage__stat-unit {
  font-weight: 400;
}

.mypage__stat-divider {
  width: 1px;
  height: 52px;
  flex-shrink: 0;
  background: #e9e9e9;
}

.mypage__divider {
  width: 100%;
  height: 4px;
  background: #f3f3f3;
  border: none;
  margin: 0;
}

.mypage__menu {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.mypage__menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 56px;
  padding: 16px;
  box-sizing: border-box;
  border: none;
  border-bottom: 1px solid #f3f3f3;
  background: var(--color-white);
  font-family: inherit;
  font-size: 16px;
  font-weight: 400;
  line-height: 1;
  color: #404040;
  cursor: pointer;
  text-align: left;
}

.mypage__menu-item img {
  display: block;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

/* 결제 내역 — Figma 38:3852 */
.payment {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.payment__tabs {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 22px;
  height: 46px;
  padding: 0 16px;
  box-sizing: border-box;
  border-bottom: 1px solid #f3f3f3;
}

.payment__tab {
  flex: 1;
  max-width: 168px;
  height: 46px;
  padding: 12px 0 0;
  border: none;
  border-bottom: 2px solid transparent;
  background: none;
  font-family: inherit;
  font-size: 16px;
  font-weight: 400;
  line-height: 1;
  color: #9b9b9b;
  cursor: pointer;
}

.payment__tab--active {
  font-weight: 500;
  color: #202020;
  border-bottom-color: #8ce5ff;
}

.payment__list {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.payment__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 84px;
  padding: 21px 16px;
  box-sizing: border-box;
  border-bottom: 1px solid #f3f3f3;
}

.payment__item-left {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.payment__item-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.payment__item-title {
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
  color: #404040;
}

.payment__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border: 1px solid rgba(112, 115, 124, 0.22);
  border-radius: 8px;
  background: rgba(112, 115, 124, 0.05);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.5;
  color: rgba(46, 47, 51, 0.88);
}

.payment__item-date {
  font-size: 14px;
  font-weight: 400;
  line-height: 1;
  color: #a0a0a0;
}

.payment__item-order {
  font-size: 12px;
  font-weight: 400;
  line-height: 1.3;
  color: #b0b0b0;
  word-break: break-all;
}

.payment__item-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  flex-shrink: 0;
}

.payment__item-amount {
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
  color: #3a3a3a;
}

.payment__item-price {
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  color: #3cb0ef;
}

.payment__empty {
  margin: 48px 16px;
  text-align: center;
  font-size: 15px;
  font-weight: 400;
  color: #989898;
}

/* 운세 보관함 — Figma 37:3788 */
.archive {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding-bottom: 16px;
}

.archive__chips {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.archive__chips::-webkit-scrollbar {
  display: none;
}

.archive-chip {
  flex-shrink: 0;
  height: 40px;
  padding: 8px 16px;
  border: none;
  border-radius: 999px;
  background: rgba(112, 115, 124, 0.08);
  font-family: inherit;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  color: #000;
  cursor: pointer;
}

.archive-chip--active {
  background: #bcf0ff;
}

.archive__chips-divider {
  width: 100%;
  height: 1px;
  margin: 0;
  border: none;
  background: #f3f3f3;
}

/* 종류 선택 — 텍스트 + 글자 아래 검정 인디케이터 (칩/버튼 아님) */
.archive__tabs {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 4px 20px 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  box-sizing: border-box;
}

.archive__tabs::-webkit-scrollbar {
  display: none;
}

.archive__tabs .archive-tab,
button.archive-tab {
  all: unset;
  position: relative;
  box-sizing: border-box;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  padding: 12px 0 10px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.2;
  color: #8e8e8e;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.archive__tabs .archive-tab::after,
button.archive-tab::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2.5px;
  border-radius: 1px;
  background: transparent;
}

.archive__tabs .archive-tab--active,
button.archive-tab.archive-tab--active {
  font-weight: 400;
  color: #111;
}

.archive__tabs .archive-tab--active::after,
button.archive-tab.archive-tab--active::after {
  background: #111;
}

.archive__body {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 24px 0 8px;
}

.archive-section {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 0 16px;
}

.archive-section__title {
  margin: 0;
  font-size: 18px;
  font-weight: 500;
  line-height: 1;
  color: #000;
}

.archive-section__list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.archive-entry {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.archive-badge {
  align-self: flex-start;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
}

.archive-badge--blue {
  background: #def8ff;
  color: #008dcf;
}

.archive-badge--green {
  background: #e7ffde;
  color: #449101;
}

.archive-badge--yellow {
  background: #fffcde;
  color: #cf7500;
}

.archive-badge--purple {
  background: #f4e4ff;
  color: #a952b7;
}

.archive-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  min-height: 94px;
  padding: 24px 20px;
  box-sizing: border-box;
  border: 1px solid rgba(112, 115, 124, 0.16);
  border-radius: 10px;
  background: var(--color-white);
  cursor: pointer;
}

.archive-card--pair {
  align-items: center;
}

.archive-card__pair {
  display: flex;
  align-items: center;
  gap: 20px;
  min-width: 0;
}

.archive-card__pair-divider {
  width: 2px;
  height: 52px;
  flex-shrink: 0;
  background: #f3f3f3;
}

.archive-card__text {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.archive-card__name-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}

.archive-card__name {
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
  color: #131313;
}

.archive-card__tag {
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  color: rgba(46, 47, 51, 0.88);
}

.archive-card__meta-tag {
  font-size: 14px;
  font-weight: 400;
  line-height: 1;
  color: #989898;
}

.archive-card__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 16px;
  font-weight: 400;
  line-height: 1;
  color: rgba(55, 56, 60, 0.61);
}

.archive-card__more {
  width: 44px;
  height: 40px;
  flex-shrink: 0;
  border: none;
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.archive-card__more-dots {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
}

.archive-card__more-dots span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #1e1e1e;
}

.archive-divider {
  width: 100%;
  height: 4px;
  margin: 0;
  border: none;
  background: #f3f3f3;
}

.archive__empty {
  margin: 40px 16px;
  text-align: center;
  font-size: 15px;
  color: #989898;
}

/* 충전 — Figma 20:2838 */
.charge {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 32px 0 24px;
  box-sizing: border-box;
}

.charge__balance {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: calc(100% - 32px);
  margin: 0 16px;
  padding: 16px 20px;
  box-sizing: border-box;
  border-radius: 10px;
  background: rgba(112, 115, 124, 0.05);
}

.charge__balance-label {
  margin: 0;
  font-size: 18px;
  font-weight: 400;
  line-height: 1;
  color: #202020;
}

.charge__balance-label strong {
  font-weight: 500;
}

.charge__balance-value {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.charge__balance-value img {
  display: block;
  width: 20px;
  height: 16px;
  object-fit: contain;
}

.charge__balance-num {
  font-size: 22px;
  font-weight: 500;
  line-height: 1;
  color: #202020;
}

.charge__balance-unit {
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
  color: #202020;
}

.charge__section {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  margin-top: 10px;
}

.charge__section-title {
  width: 100%;
  margin: 0;
  padding: 24px 16px;
  box-sizing: border-box;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  color: #202020;
}

.charge__list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: calc(100% - 32px);
  max-width: 358px;
}

.charge-option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 16px 20px;
  box-sizing: border-box;
  border: 1px solid rgba(112, 115, 124, 0.16);
  border-radius: 10px;
  background: var(--color-white);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}

.charge-option--selected {
  border: 2px solid #b4ecfc;
  background: #fafeff;
  padding: 15px 19px;
}

.charge-radio {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  box-sizing: border-box;
  background: rgba(112, 115, 124, 0.16);
  border: 1px solid transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.charge-option--selected .charge-radio {
  background: var(--color-white);
  border-color: #8ce5ff;
}

.charge-option--selected .charge-radio::after {
  content: '';
  display: block;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #8ce5ff;
  flex-shrink: 0;
}

.charge-option__body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  gap: 8px;
}

.charge-option__won {
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  color: #131313;
}

.charge-option--selected .charge-option__won {
  color: #404040;
}

.charge-option__mallang {
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
  color: rgba(55, 56, 60, 0.61);
  white-space: nowrap;
}

.charge-option--selected .charge-option__mallang {
  color: #12b8f0;
}

.charge-option__method {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.charge-option__logo {
  display: block;
  width: 42px;
  height: 16px;
  object-fit: contain;
  flex-shrink: 0;
  image-rendering: -webkit-optimize-contrast;
}

.charge-option__label {
  font-size: 16px;
  font-weight: 400;
  line-height: 1;
  color: #404040;
}

.charge-option--selected .charge-option__label {
  font-weight: 700;
}

.charge-footer {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: var(--color-white);
  border-top: 1px solid #e9e9e9;
}

.charge-footer__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 72px;
  padding: 24px 16px;
  box-sizing: border-box;
}

.charge-footer__label {
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  color: #404040;
}

.charge-footer__total {
  font-size: 24px;
  font-weight: 600;
  line-height: 1;
  color: #202020;
}

.charge-footer__total span {
  font-size: 16px;
  font-weight: 500;
}

.charge-footer__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: calc(100% - 32px);
  max-width: 355px;
  height: 44px;
  margin: 0 auto 42px;
  padding: 10px 16px;
  border: none;
  border-radius: 10px;
  background: var(--color-primary);
  box-sizing: border-box;
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
  color: #131313;
  cursor: pointer;
}

/* ──── 고객센터 ──── */
.support {
  padding: 16px 20px 40px;
  box-sizing: border-box;
}

.support__section {
  margin-bottom: 28px;
}

.support__section-title {
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 12px;
  color: #202020;
}

.support__accordion {
  border-bottom: 1px solid #eee;
}

.support__accordion-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 14px 4px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-main);
  font-size: 15px;
  font-weight: 500;
  color: #333;
  text-align: left;
}

.support__accordion-arrow {
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.support__accordion--open .support__accordion-arrow {
  transform: rotate(90deg);
}

.support__accordion-body {
  padding: 0 4px 14px;
  font-size: 14px;
  line-height: 1.7;
  color: #666;
}

.support__accordion-body[hidden] {
  display: none;
}

.support__contact {
  text-align: center;
  padding: 24px 0;
  background: #f9f9fb;
  border-radius: 12px;
  margin-top: 8px;
}

.support__contact-text {
  font-size: 14px;
  color: #888;
  margin: 8px 0 12px;
  line-height: 1.6;
}

.support__contact-email {
  display: inline-block;
  font-size: 15px;
  font-weight: 600;
  color: var(--color-primary, #6b4eff);
  text-decoration: none;
  padding: 8px 20px;
  border: 1px solid var(--color-primary, #6b4eff);
  border-radius: 8px;
}

.support__contact-hint {
  margin: 12px 16px 0;
  font-size: 12px;
  line-height: 1.5;
  color: #999;
}

.support__accordion-body ul {
  margin: 8px 0;
  padding-left: 1.2em;
}

.support__accordion-body li {
  margin-bottom: 4px;
  font-size: 14px;
  line-height: 1.6;
  color: #666;
}

.support__app-info {
  text-align: center;
  padding: 16px 0 0;
}

.support__app-info p {
  margin: 0 0 4px;
  font-size: 12px;
  color: #bbb;
}

.support__legal {
  max-height: min(60vh, 480px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.support__legal-meta {
  margin: 0 0 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid #eee;
  font-size: 13px;
  color: #888;
}

.support__legal h3 {
  margin: 16px 0 8px;
  font-size: 14px;
  font-weight: 700;
  color: #202020;
}

.support__legal p,
.support__legal li {
  margin: 0 0 8px;
  font-size: 13px;
  line-height: 1.7;
  color: #555;
}

.support__legal ol,
.support__legal ul {
  margin: 0 0 8px;
  padding-left: 1.2em;
}

.support__legal a {
  color: var(--color-primary, #6b4eff);
}

.site-footer {
  margin-top: 20px;
  padding: 28px 20px 32px;
  text-align: left;
  width: 100%;
  box-sizing: border-box;
  background-color: #fafafa;
  border-top: 1px solid #f0f0f0;
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 8px;
}

.site-footer__link {
  background: none;
  border: none;
  padding: 0;
  font-family: var(--font-main);
  font-size: 12px;
  color: #999;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.site-footer__dot {
  font-size: 12px;
  color: #ccc;
}

.site-footer__brand {
  margin: 0 0 16px;
  font-size: 11px;
  color: #bbb;
  text-align: center;
}

.site-footer__copy {
  margin: 0;
  font-size: 11px;
  color: #bbb;
  line-height: 1.9;
  text-align: left;
}

.site-footer__copy a {
  color: inherit;
  text-decoration: none;
}

.login-sheet__terms {
  margin: 16px 20px 8px;
  padding-bottom: 8px;
  font-size: 12px;
  line-height: 1.5;
  color: #999;
  text-align: center;
}

.login-sheet__terms-link {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: #666;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.app-toast {
  position: absolute;
  left: 50%;
  bottom: calc(var(--tab-height) + 16px);
  transform: translateX(-50%) translateY(8px);
  z-index: 200;
  max-width: calc(100% - 32px);
  padding: 12px 18px;
  border-radius: 999px;
  background: rgba(32, 32, 32, 0.92);
  color: #fff;
  font-family: var(--font-main);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  text-align: center;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.38s ease, transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

.app-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
