:root {
  color-scheme: dark;
  /* Major vertical gaps between panels / cards (2× prior 16px) */
  --app-section-gap: 32px;
  /* Stacks inside member area, status, headings (2× prior 14px) */
  --app-stack-gap: 28px;
  --bg-top: #120022;
  --bg-bottom: #060113;
  --panel-purple: rgba(82, 17, 116, 0.72);
  --panel-border: rgba(255, 215, 109, 0.5);
  --gold-1: #fff1a5;
  --gold-2: #ffca55;
  --gold-3: #c87512;
  --violet-1: #dca7ff;
  --violet-2: #8c47f3;
  --violet-3: #4b127f;
  --card-bg: #ffffff;
  --text-main: #161616;
  --text-muted: #666666;
  --line-color: #d8d8d8;
  --success: #226442;
  --danger: #aa2d42;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", sans-serif;
  background:
    radial-gradient(circle at top, rgba(190, 88, 255, 0.34), transparent 28%),
    radial-gradient(circle at 20% 20%, rgba(255, 200, 96, 0.18), transparent 18%),
    radial-gradient(circle at 80% 10%, rgba(120, 180, 255, 0.15), transparent 15%),
    linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
  color: #fff;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.82) 0 1px, transparent 1px),
    radial-gradient(circle, rgba(255, 220, 153, 0.7) 0 1px, transparent 1px);
  background-size: 46px 46px, 72px 72px;
  background-position: 0 0, 20px 12px;
  opacity: 0.35;
  pointer-events: none;
}

.app-shell {
  width: min(100%, 430px);
  margin: 0 auto;
  padding: 40px 14px 64px;
  position: relative;
  overflow-x: clip;
}

.hero-panel,
.portal-panel,
.selector-panel,
.content-hub,
.status-message,
.reading-card,
.auth-card,
.member-reading-card,
.content-card {
  position: relative;
  z-index: 1;
}

.hero-panel {
  margin-bottom: var(--app-section-gap);
}

.hero-frame {
  position: relative;
  padding: 18px 14px 20px;
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(43, 5, 67, 0.92), rgba(24, 5, 43, 0.88)),
    var(--panel-purple);
  border: 1px solid rgba(255, 227, 151, 0.35);
  box-shadow:
    0 24px 50px rgba(0, 0, 0, 0.35),
    inset 0 0 30px rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.hero-menu {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  position: relative;
  z-index: 2;
}

.hero-menu-counter {
  flex: 1 1 100%;
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 8px;
  margin: 0 0 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(8, 4, 22, 0.45);
  border: 1px solid rgba(255, 228, 158, 0.22);
  font-family: "Inter", sans-serif;
  font-size: clamp(0.78rem, 2.6vw, 0.9rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: rgba(255, 244, 210, 0.98);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.55);
}

.hero-menu-counter-label {
  text-transform: uppercase;
  font-size: 0.88em;
  opacity: 0.92;
}

.hero-menu-counter-value {
  font-variant-numeric: tabular-nums;
  color: #fff8dc;
}

/* Space between pill nav and title block (legal / shop pages) */
.hero-frame > .hero-title {
  margin-top: clamp(18px, 4.5vw, 26px);
}

/* Home: extra gap so nav does not visually collide with hero PNG title art */
.hero-panel--full-bleed .hero-menu {
  margin-bottom: clamp(18px, 5vw, 28px);
}

.hero-panel--full-bleed .hero-frame {
  padding-top: clamp(18px, 4.5vw, 24px);
}

.hero-app-title {
  margin: 0 10px 10px;
  text-align: center;
  font-family: "Inter", sans-serif;
  font-size: clamp(0.68rem, 2.9vw, 0.82rem);
  font-weight: 600;
  letter-spacing: 0.035em;
  line-height: 1.4;
  color: rgba(255, 236, 200, 0.95);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.5);
}

.hero-menu-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 232, 173, 0.28);
  color: #fff2c0;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
}

.hero-menu-link:hover {
  background: rgba(255, 255, 255, 0.16);
}

.hero-menu-current {
  cursor: default;
  opacity: 0.92;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255, 232, 173, 0.35);
}

.charms-store-cta-wrap {
  margin-top: 18px;
}

/* Home: one title, painted on the hero card (PNG slot text masked via npm run mask-hero-title). */
.hero-title-on-hero {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  z-index: 2;
  margin: 0 !important;
  padding: 10px 12px 28px;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(6, 3, 14, 0.97) 0%,
    rgba(10, 5, 20, 0.9) 28%,
    rgba(18, 7, 31, 0.65) 48%,
    rgba(18, 7, 31, 0.18) 75%,
    rgba(18, 7, 31, 0) 100%
  );
}

.hero-title-home {
  margin: 6px 0 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  line-height: 1.08;
}

.hero-title-home .hero-title-line {
  display: block;
  letter-spacing: 0.06em;
}

.hero-title-home .hero-title-line--lucky {
  margin-top: 0;
  font-size: clamp(1.5rem, 6.2vw, 2.35rem);
  font-weight: 700;
  color: #fffefb;
  text-shadow:
    0 2px 8px rgba(0, 0, 0, 0.5),
    0 0 20px rgba(200, 180, 255, 0.25);
}

.hero-title-home .hero-title-line--charms {
  margin-top: 2px;
  font-size: clamp(1.65rem, 7vw, 2.72rem);
  font-weight: 700;
  letter-spacing: 0.05em;
  line-height: 1.02;
  background: linear-gradient(180deg, #ffffff 6%, #f2e4ff 35%, #c19cff 68%, #8648e8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-font-smoothing: antialiased;
  /* One glow only — two drop-shadows looked like a second “CHARMS &” behind the first */
  filter: drop-shadow(0 2px 6px rgba(20, 8, 45, 0.75));
}

.hero-title-home .hero-title-line--gold {
  margin-top: 8px;
  font-size: clamp(1.42rem, 5.4vw, 2.1rem);
  color: #ffcd4d;
  text-shadow: 0 2px 0 #6d1700, 0 5px 14px rgba(0, 0, 0, 0.45);
}

.hero-scene-wrap {
  position: relative;
  margin: 0 auto;
  border-radius: 24px;
  overflow: hidden;
  background: #12071f;
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.3);
  aspect-ratio: 1 / 1.24;
}

.hero-panel--full-bleed .hero-scene-wrap {
  width: 100%;
  max-width: none;
  margin-left: 0;
  margin-right: 0;
  border-radius: 0;
  box-shadow: none;
}

/* Home hero: portrait frame for phones (taller than wide); crops wide/landscape art to center column */
.hero-scene-wrap.hero-scene-wrap--portrait-phone {
  aspect-ratio: 9 / 16;
  width: 100%;
  max-width: 100%;
  max-height: min(78dvh, 720px);
  margin-left: auto;
  margin-right: auto;
}

.hero-panel--full-bleed .hero-scene-wrap.hero-scene-wrap--portrait-phone {
  max-height: min(78dvh, 720px);
}

.hero-panel--full-bleed .hero-scene-wrap::before {
  border-radius: 0;
}

/* Top scrim: menu contrast (home hero); keep a bit shorter so title art stays readable */
.hero-scene-wrap::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  z-index: 1;
  height: clamp(56px, 18%, 130px);
  pointer-events: none;
  border-radius: 24px 24px 0 0;
  background: linear-gradient(
    180deg,
    rgba(4, 2, 10, 0.58) 0%,
    rgba(10, 5, 20, 0.38) 45%,
    rgba(18, 7, 31, 0.08) 78%,
    rgba(18, 7, 31, 0) 100%
  );
}

.hero-panel--full-bleed .hero-scene-wrap::before {
  height: clamp(48px, 14%, 110px);
}

/* Covers baked-in footer/ghost text in the hero PNG; links stay in .hero-scene-caption (no asset swap). */
.hero-scene-wrap:has(.hero-scene-image--feng-shui-master)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  height: clamp(110px, 30%, 220px);
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(
    to top,
    #12071f 0%,
    #12071f 14%,
    rgba(18, 7, 31, 0.98) 38%,
    rgba(18, 7, 31, 0.72) 68%,
    rgba(18, 7, 31, 0.15) 92%,
    transparent 100%
  );
}

.hero-scene-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transform: scale(1.4);
  transform-origin: center top;
}

/* Home hero: fill frame edge-to-edge; extra scale on full-bleed to kill side gutters from asset. */
.hero-scene-wrap .hero-scene-image {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  transform: scale(1.16);
  transform-origin: center center;
}

.hero-panel--full-bleed .hero-scene-wrap .hero-scene-image {
  transform: scale(1.28);
  object-position: center 19%;
}

/* Feng Shui Master: portrait crop — fill 9:16 box; anchor top so baked-in arched title stays visible */
.hero-panel--full-bleed .hero-scene-wrap .hero-scene-image--feng-shui-master,
.hero-scene-wrap--portrait-phone .hero-scene-image--feng-shui-master {
  transform: none;
  object-fit: cover;
  object-position: center top;
}

/* Zoom slightly when asset is very wide — keep transform-origin top so title is not clipped under nav */
@media (max-width: 430px) {
  .hero-panel--full-bleed .hero-scene-wrap--portrait-phone .hero-scene-image--feng-shui-master {
    transform: scale(1.06);
    transform-origin: center top;
  }
}

/* Service strip on home hero (over image bottom) */
.hero-scene-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  margin: 0;
  padding: 12px 10px 14px;
  text-align: center;
  font-size: clamp(0.56rem, 2.35vw, 0.7rem);
  font-weight: 700;
  letter-spacing: 0.05em;
  line-height: 1.45;
  text-transform: uppercase;
  color: #fff3c9;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.95),
    0 0 12px rgba(120, 40, 180, 0.35);
  background: linear-gradient(
    0deg,
    rgba(6, 2, 14, 0.96) 0%,
    rgba(12, 4, 26, 0.82) 42%,
    rgba(20, 8, 40, 0.35) 72%,
    transparent 100%
  );
  pointer-events: none;
}

/* In-caption jump links: parent is non-interactive so the image stays swipe-safe. */
.hero-scene-caption-link {
  pointer-events: auto;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

.hero-scene-caption-link:hover {
  text-decoration: underline;
  color: #fff8e0;
}

.hero-scene-caption-sep {
  display: inline;
  opacity: 0.65;
  padding: 0 0.2em;
  font-weight: 600;
}

@media (max-width: 360px) {
  .hero-scene-caption {
    font-size: 0.52rem;
    letter-spacing: 0.035em;
    padding: 10px 6px 12px;
  }
}

/* Hero CTA: dark bar; copy centered; blue pill SIGN UP lower-right of last line (mockup) */
.hero-promo-signup {
  margin: 14px 0 0;
  padding: 18px 14px 20px;
  border-radius: 0 0 20px 20px;
  background: linear-gradient(180deg, #2d1248 0%, #1a0a2e 55%, #150828 100%);
  border: 1px solid rgba(255, 215, 140, 0.22);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 12px 28px rgba(0, 0, 0, 0.35);
}

.hero-promo-signup.hidden {
  display: none;
}

.hero-promo-body {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
}

.hero-promo-text {
  margin: 0 0 6px;
  text-align: center;
  font-family: "Inter", system-ui, sans-serif;
  font-weight: 800;
  font-size: clamp(0.58rem, 2.35vw, 0.74rem);
  line-height: 1.45;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  color: #fff8e8;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.55);
}

.hero-promo-line {
  display: block;
}

.hero-promo-last-row {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px 12px;
  width: 100%;
}

.hero-promo-last-text {
  font-family: "Inter", system-ui, sans-serif;
  font-weight: 800;
  font-size: clamp(0.58rem, 2.35vw, 0.74rem);
  line-height: 1.45;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  color: #fff8e8;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.55);
  text-align: right;
  flex: 1 1 auto;
  min-width: 0;
}

.hero-promo-button-shell {
  display: inline-flex;
  flex-shrink: 0;
  padding: 5px 7px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}

.hero-promo-button {
  margin: 0;
  padding: 10px 18px;
  font-family: "Inter", system-ui, sans-serif;
  font-weight: 800;
  font-size: clamp(0.68rem, 2.6vw, 0.82rem);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #ffffff;
  background: linear-gradient(180deg, #3b8cff 0%, #2563eb 40%, #1d4ed8 100%);
  border: 1px solid rgba(147, 197, 253, 0.45);
  border-radius: 999px;
  box-shadow: 0 2px 0 rgba(15, 40, 90, 0.5);
  cursor: pointer;
  transition:
    transform 0.08s ease,
    filter 0.12s ease;
}

.hero-promo-button:hover {
  filter: brightness(1.08);
}

.hero-promo-button:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 rgba(15, 40, 90, 0.45);
}

@media (max-width: 340px) {
  .hero-promo-last-row {
    justify-content: center;
  }

  .hero-promo-last-text {
    text-align: center;
    flex: 1 1 100%;
  }
}

.hero-title {
  margin-top: 16px;
  text-align: center;
  text-transform: uppercase;
  font-family: "Cinzel", serif;
  line-height: 0.92;
}

.hero-title-top,
.hero-title-bottom {
  display: block;
  letter-spacing: 0.04em;
}

.hero-title-top {
  font-size: clamp(1.7rem, 6vw, 2.35rem);
  color: #ffcd4d;
  text-shadow:
    0 2px 0 #6d1700,
    0 6px 12px rgba(0, 0, 0, 0.35);
}

.hero-title-bottom {
  margin-top: 6px;
  font-size: clamp(2.1rem, 8vw, 3rem);
  color: #efdcff;
  text-shadow:
    0 2px 0 #4b157d,
    0 6px 18px rgba(155, 80, 255, 0.45);
}

.hero-title-legal {
  line-height: 1;
}

.selector-panel,
.status-message,
.reading-card,
.auth-card,
.member-reading-card,
.content-card {
  border-radius: 24px;
  backdrop-filter: blur(10px);
}

.portal-panel,
.content-hub {
  margin-bottom: var(--app-section-gap);
}

.stacked-member-reading {
  margin-top: var(--app-section-gap);
}

.portal-grid,
.personalized-grid {
  display: grid;
  gap: var(--app-section-gap);
}

.content-stack {
  display: flex;
  flex-direction: column;
  gap: var(--app-section-gap);
}

.auth-card,
.member-reading-card,
.content-card {
  padding: 16px;
  background: rgba(14, 9, 34, 0.72);
  border: 1px solid rgba(255, 228, 158, 0.2);
}

.section-heading {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: var(--app-stack-gap);
}

.section-heading h2,
.section-heading h3,
.section-heading p,
.content-card h3,
.content-card h4 {
  margin: 0;
}

.section-heading p,
.muted-copy {
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.92rem;
}

.compact-heading {
  margin-top: 36px;
}

.stack-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.stack-form h3 {
  margin: 0;
}

/* Signup submit shows a long status line while the request runs */
#signup-form .primary-button:disabled {
  white-space: normal;
  line-height: 1.25;
  text-align: center;
  padding-block: 12px;
}

.text-control {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 223, 141, 0.34);
  border-radius: 14px;
  background: #fff;
  color: #161616;
  font: inherit;
}

.password-field-wrap {
  position: relative;
  width: 100%;
}

.password-field-wrap .password-field-input {
  padding-right: 48px;
}

.password-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: rgba(22, 22, 22, 0.55);
  cursor: pointer;
  transition:
    color 0.15s ease,
    background 0.15s ease;
}

.password-toggle:hover {
  color: #161616;
  background: rgba(0, 0, 0, 0.06);
}

.password-toggle:focus-visible {
  outline: 2px solid rgba(255, 196, 90, 0.95);
  outline-offset: 2px;
}

.password-toggle-icon {
  display: block;
  flex-shrink: 0;
}

.file-control {
  padding: 10px;
}

.inline-label {
  font-size: 0.9rem;
  font-weight: 700;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.signup-dob-hint {
  margin: -4px 0 2px;
  font-size: 0.86rem;
  line-height: 1.4;
}

.signup-dob-selects {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
}

.signup-dob-selects .signup-dob-control {
  flex: 1 1 calc(33.33% - 6px);
  min-width: 0;
  width: auto;
}

.selector-panel {
  padding: 16px;
  background: rgba(14, 9, 34, 0.72);
  border: 1px solid rgba(255, 228, 158, 0.2);
}

.selector-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.selector-instruction {
  margin: 0;
  padding: 0 2px;
  max-width: 100%;
  font-size: clamp(0.82rem, 2.8vw, 0.98rem);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0.02em;
  color: rgba(255, 237, 210, 0.96);
  text-align: center;
  text-wrap: balance;
  word-break: break-word;
  hyphens: manual;
}

.dropdown-control,
.primary-button {
  width: 100%;
  min-height: 48px;
  border-radius: 14px;
  border: 1px solid rgba(255, 223, 141, 0.34);
  font-size: 1rem;
}

.dropdown-control {
  padding: 0 14px;
  background: #fff;
  color: #161616;
}

.primary-button {
  border: none;
  font-weight: 800;
  color: #301049;
  cursor: pointer;
  background: linear-gradient(180deg, #ffe698, #fcbf3c 50%, #d17a16);
  box-shadow:
    0 4px 0 rgba(120, 62, 8, 0.45),
    0 10px 18px rgba(0, 0, 0, 0.22);
  transition:
    transform 0.08s ease,
    box-shadow 0.08s ease,
    filter 0.08s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
}

.primary-button:hover:not(:disabled) {
  filter: brightness(1.03);
}

.primary-button:active:not(:disabled) {
  transform: translateY(3px);
  box-shadow:
    0 1px 0 rgba(120, 62, 8, 0.35),
    0 4px 10px rgba(0, 0, 0, 0.2);
  filter: brightness(0.94);
}

.primary-button:focus-visible {
  outline: 2px solid var(--gold-2);
  outline-offset: 2px;
}

.primary-button:disabled {
  opacity: 0.7;
  cursor: wait;
  transform: none;
  filter: none;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.secondary-button {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(255, 223, 141, 0.34);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  box-shadow:
    0 3px 0 rgba(0, 0, 0, 0.2),
    0 6px 14px rgba(0, 0, 0, 0.12);
  transition:
    transform 0.08s ease,
    box-shadow 0.08s ease,
    background 0.08s ease,
    border-color 0.08s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
}

.secondary-button:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 223, 141, 0.48);
}

.secondary-button:active:not(:disabled) {
  transform: translateY(3px);
  box-shadow:
    0 1px 0 rgba(0, 0, 0, 0.18),
    0 2px 8px rgba(0, 0, 0, 0.12);
  background: rgba(255, 255, 255, 0.12);
}

.secondary-button:focus-visible {
  outline: 2px solid var(--gold-2);
  outline-offset: 2px;
}

.secondary-button:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Side-by-side language actions (Taglish primary + English secondary) */
.personalized-lang-row .secondary-button,
.profile-modal-lang-row .secondary-button,
.personalized-lang-row .primary-button,
.profile-modal-lang-row .primary-button {
  flex: 1 1 calc(50% - 4px);
  width: auto;
  min-width: 0;
}

.personalized-lang-row .secondary-button,
.profile-modal-lang-row .secondary-button {
  min-height: 48px;
}

.status-message {
  margin: var(--app-stack-gap) 0;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.92rem;
}

.readings-feed {
  display: flex;
  flex-direction: column;
  gap: var(--app-section-gap);
}

.readings-feed--idle {
  min-height: 0;
}

.readings-feed-hint {
  margin: 0;
  line-height: 1.5;
}

.personalized-enrichment-notice {
  margin: 0 0 12px;
}

.personalized-bring-along {
  margin: 0 0 12px;
}

.personalized-bring-along__lead {
  margin: 0;
  line-height: 1.55;
}

.personalized-bring-along__sub {
  margin: 10px 0 0;
  line-height: 1.5;
  font-size: 0.92em;
}

.legal-card {
  padding: 18px 16px;
  border-radius: 24px;
  background: #ffffff;
  color: var(--text-main);
  box-shadow: 0 25px 55px rgba(0, 0, 0, 0.28);
  position: relative;
  z-index: 1;
}

.legal-card .section-heading p {
  color: var(--text-muted);
}

.legal-section + .legal-section {
  margin-top: 36px;
  padding-top: 36px;
  border-top: 1px solid var(--line-color);
}

.legal-section h2 {
  margin: 0 0 10px;
  font-size: 1.05rem;
}

.legal-section p {
  margin: 0 0 10px;
  line-height: 1.7;
}

.legal-section p:last-child {
  margin-bottom: 0;
}

.legal-highlight {
  margin: 20px 0;
  padding: 12px 14px;
  border-left: 5px solid #8a6d3b;
  border-radius: 12px;
  background: #fcf8e3;
  color: #4a3b14;
}

.about-creator-line {
  text-align: center;
  font-size: clamp(0.95rem, 2.8vw, 1.12rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.5;
}

.legal-list {
  margin: 0;
  padding-left: 20px;
  line-height: 1.7;
}

.legal-list li + li {
  margin-top: 8px;
}

.contact-info {
  padding: 15px;
  border-radius: 12px;
  background: #f4f4f4;
}

.contact-info p {
  margin: 0 0 10px;
}

.contact-info p:last-child {
  margin-bottom: 0;
}

.legal-footer {
  margin-top: 40px;
  font-size: 0.9em;
  color: #777;
}

.auth-guest-view,
.auth-member-view,
.personalized-reading {
  display: flex;
  flex-direction: column;
  gap: var(--app-stack-gap);
}

.auth-flow-message {
  margin: 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.92rem;
  line-height: 1.45;
}

.auth-flow-message.error {
  background: rgba(170, 45, 66, 0.18);
  border-color: rgba(255, 141, 161, 0.35);
}

.auth-flow-message.success {
  background: rgba(34, 100, 66, 0.22);
  border-color: rgba(118, 222, 172, 0.3);
}

.auth-flow-message.info {
  background: rgba(255, 230, 140, 0.12);
  border-color: rgba(255, 223, 141, 0.28);
  color: rgba(255, 244, 200, 0.96);
}

.app-alert-modal {
  position: fixed;
  inset: 0;
  z-index: 2100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

/* Above profile / smart-face modals (2200) so success notices show immediately after Web Share */
#auth-alert-modal {
  z-index: 2400;
}

#signup-privacy-modal {
  z-index: 2150;
}

.app-alert-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 0, 14, 0.72);
  backdrop-filter: blur(4px);
}

.app-alert-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 380px);
  padding: 20px 18px 18px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(43, 5, 67, 0.98), rgba(24, 5, 43, 0.98));
  border: 1px solid rgba(255, 227, 151, 0.35);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.42);
}

.app-alert-panel h3 {
  margin: 0 0 10px;
  font-family: "Cinzel", serif;
  font-size: 1.08rem;
  color: #fff0bd;
}

.app-alert-message {
  margin: 0 0 16px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.92);
}

/* Long multi-line notices (e.g. Facebook Story unlock) — scoped so sign-up privacy modal layout is not affected */
#auth-alert-message.app-alert-message {
  white-space: pre-wrap;
  word-break: break-word;
}

.app-alert-panel .primary-button {
  width: 100%;
}

.app-alert-panel--privacy {
  width: min(100%, 440px);
}

/* Keep all three buttons in view on short phones: scroll the text, not the whole viewport blindly */
#signup-privacy-modal .app-alert-panel--privacy {
  max-height: min(92vh, 720px);
  display: flex;
  flex-direction: column;
  min-height: 0;
}

#signup-privacy-modal .app-alert-message--privacy {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 12px;
}

#signup-privacy-modal .app-alert-actions--privacy {
  flex-shrink: 0;
}

.app-alert-message--privacy {
  margin-bottom: 14px;
}

.app-alert-message--privacy p {
  margin: 0 0 10px;
}

.app-alert-message--privacy p:last-child {
  margin-bottom: 0;
}

.app-alert-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.app-alert-actions .primary-button {
  width: 100%;
}

.app-alert-actions--privacy {
  align-items: center;
}

#signup-privacy-modal .app-alert-actions--privacy .primary-button,
#signup-privacy-modal .app-alert-actions--privacy a.primary-button.app-alert-link-button {
  width: 100%;
  max-width: 260px;
  box-sizing: border-box;
}

a.app-alert-link-button {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-sizing: border-box;
}

#signup-privacy-modal .app-alert-actions--privacy a.primary-button.app-alert-link-button {
  padding-inline: 16px;
}

.signup-kabbalah-hint {
  margin: -4px 0 4px;
  font-size: 0.88rem;
  line-height: 1.45;
}

.auth-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.auth-switch-copy {
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.92rem;
}

.auth-switch-button {
  padding: 0;
  border: none;
  background: transparent;
  color: #fff2c0;
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
  transition:
    transform 0.08s ease,
    opacity 0.08s ease,
    color 0.08s ease;
  -webkit-tap-highlight-color: transparent;
}

.auth-switch-button:active {
  transform: translateY(2px);
  opacity: 0.82;
  color: #ffe08a;
}

.profile-block,
.personalized-enrichment-notice,
.personalized-bring-along,
.empty-state,
.missing-state,
.content-item,
.mini-card,
.tarot-wrap {
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.profile-block,
.personalized-enrichment-notice,
.personalized-bring-along,
.empty-state,
.missing-state,
.content-item,
.tarot-wrap {
  padding: 14px;
}

.content-item-feature-link {
  display: block;
  text-decoration: none;
  color: inherit;
  outline-offset: 2px;
}

.content-item--cod-feature .content-item-feature-link:hover {
  filter: brightness(1.06);
}

.tarot-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 10px 0 8px;
  justify-content: center;
}

.tarot-card-thumb {
  margin: 0;
  text-align: center;
  max-width: 120px;
}

a.tarot-card-img-link {
  display: block;
  line-height: 0;
  text-decoration: none;
  color: inherit;
  border-radius: 8px;
}

a.tarot-card-img-link:focus-visible {
  outline: 2px solid #fff1a5;
  outline-offset: 3px;
}

a.tarot-card-img-link:hover .tarot-card-img {
  filter: brightness(1.08);
}

.tarot-card-img {
  display: block;
  width: 100%;
  max-width: 110px;
  height: auto;
  border-radius: 10px;
  border: 1px solid rgba(255, 227, 151, 0.35);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
  background: rgba(0, 0, 0, 0.2);
}

.tarot-card-thumb--missing {
  display: none;
}

.personalized-daily-tarot-cards .tarot-card-thumb--minor-arcana-placeholder .tarot-card-placeholder-box {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  padding: 12px 10px;
  text-align: center;
  font-size: 0.78rem;
  line-height: 1.35;
  font-weight: 600;
  color: rgba(255, 240, 210, 0.95);
  border-radius: 12px;
  border: 2px solid rgba(255, 227, 151, 0.5);
  background: linear-gradient(160deg, rgba(45, 20, 80, 0.95), rgba(15, 8, 35, 0.98));
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.tarot-card-caption {
  margin: 6px 0 0;
  font-size: 0.78rem;
  line-height: 1.35;
  color: rgba(255, 244, 220, 0.88);
}

.tarot-card-names {
  margin: 0;
  text-align: center;
}

.personalized-enrichment-notice p {
  margin: 0;
  line-height: 1.55;
}

.personalized-prompt {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
}

.personalized-prompt .muted-copy {
  margin: 0;
  line-height: 1.55;
}

.missing-state-text {
  margin: 0 0 10px;
  line-height: 1.55;
}

.personalized-refresh {
  margin-top: 10px;
  align-self: flex-start;
}

.personalized-lang-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 var(--app-stack-gap);
}

.personalized-result-stack {
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 227, 151, 0.15);
}

.personalized-section-heading {
  margin: 0 0 10px;
  font-family: "Cinzel", serif;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #f5d78a;
}

.personalized-reading-detail {
  margin-top: var(--app-stack-gap);
}

.personalized-daily-tarot-cards {
  margin-bottom: 0;
}

.personalized-luck-metadata {
  margin: 0 0 var(--app-section-gap);
}

.personalized-luck-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 12px;
}

.personalized-five-reel-heading {
  margin: 6px 0 6px;
  font-family: "Cinzel", serif;
  font-size: 1.05rem;
  color: rgba(255, 236, 200, 0.96);
}

.personalized-five-reel-lead {
  margin: 0 0 var(--app-stack-gap);
  line-height: 1.45;
}

.personalized-five-card-sequence {
  margin: 0 0 36px;
  padding: 14px 14px 12px;
  border-radius: 18px;
  background: rgba(40, 12, 72, 0.45);
  border: 1px solid rgba(255, 232, 173, 0.22);
}

.personalized-sequence-heading {
  margin: 0 0 10px;
  font-family: "Cinzel", serif;
  font-size: 0.95rem;
  color: rgba(255, 236, 200, 0.96);
}

.personalized-sequence-block {
  margin-bottom: 12px;
  line-height: 1.5;
  color: rgba(255, 248, 230, 0.92);
}

.personalized-sequence-block:last-child {
  margin-bottom: 0;
}

.personalized-sequence-label {
  margin: 0 0 6px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 210, 120, 0.85);
}

.personalized-harmony-reading {
  margin-bottom: var(--app-section-gap);
}

.personalized-harmony-body p {
  margin: 0 0 10px;
}

.personalized-harmony-body p:last-child {
  margin-bottom: 0;
}

.personalized-slot-machines {
  margin-bottom: var(--app-section-gap);
  padding: 14px 14px 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 227, 151, 0.18);
}

.personalized-slots-heading {
  margin: 0 0 12px;
  font-family: "Cinzel", serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: rgba(255, 236, 200, 0.96);
  letter-spacing: 0.04em;
}

.personalized-slot-machines-list {
  margin: 0;
  padding-left: 1.25rem;
  line-height: 1.55;
  font-size: 0.92rem;
  color: rgba(255, 248, 230, 0.94);
}

.personalized-slot-machine-item {
  margin-bottom: 10px;
}

.personalized-slot-machine-item:last-child {
  margin-bottom: 0;
}

.personalized-slot-machine-reel {
  font-weight: 700;
  color: rgba(255, 223, 141, 0.92);
}

.personalized-five-reel-spread {
  display: flex;
  flex-direction: column;
  gap: var(--app-section-gap);
}

.personalized-reel-card {
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.personalized-reel-slot-label {
  margin: 0 0 10px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 223, 141, 0.88);
}

.personalized-reel-body {
  display: flex;
  flex-wrap: wrap;
  gap: var(--app-stack-gap);
  align-items: flex-start;
}

.personalized-reel-copy {
  flex: 1;
  min-width: 200px;
}

.personalized-reel-card-name {
  margin: 0 0 8px;
  font-family: "Cinzel", serif;
  font-size: 1rem;
  color: rgba(255, 245, 220, 0.98);
}

.personalized-reel-paragraph {
  margin: 0 0 8px;
  line-height: 1.5;
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.88);
}

.personalized-reel-focus {
  color: rgba(255, 230, 170, 0.92);
}

.personalized-reel-figure {
  flex-shrink: 0;
}

.personalized-padrino-wrap {
  margin-top: 18px;
  padding: 16px;
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(80, 40, 120, 0.45), rgba(20, 8, 40, 0.65));
  border: 1px solid rgba(255, 227, 151, 0.28);
}

.personalized-padrino-heading {
  margin: 0 0 10px;
  font-family: "Cinzel", serif;
  font-size: 1rem;
  color: rgba(255, 236, 200, 0.95);
}

.personalized-padrino-text {
  margin: 0;
  line-height: 1.55;
  font-size: 0.95rem;
  color: rgba(255, 248, 225, 0.94);
}

.profile-modal-face-reading {
  margin: 16px 0 0;
  padding: 14px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.profile-modal-face-lang-row,
.profile-modal-palm-lang-row,
.profile-modal-bazi-lang-row,
.smart-face-lang-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}

.smart-face-lang-row {
  margin-top: 8px;
}

.profile-modal-face-lang-row .primary-button,
.profile-modal-face-lang-row .secondary-button,
.profile-modal-palm-lang-row .primary-button,
.profile-modal-palm-lang-row .secondary-button,
.profile-modal-bazi-lang-row .primary-button,
.profile-modal-bazi-lang-row .secondary-button,
.smart-face-lang-row .primary-button,
.smart-face-lang-row .secondary-button {
  flex: 1 1 calc(50% - 4px);
  width: auto;
  min-width: 0;
  min-height: 48px;
}

.profile-modal-palm-reading {
  margin: 16px 0 0;
  padding: 14px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.profile-modal-palm-reading-heading {
  margin: 0 0 6px;
}

.profile-modal-palm-lead {
  margin: 0 0 12px;
  line-height: 1.55;
}

.palm-reading-meta {
  margin: 0 0 10px;
  font-size: 0.88rem;
}

.palm-reading-microlead {
  margin: 0 0 14px;
  font-size: 0.86rem;
}

.palm-reading-field-notes {
  margin: 0 0 8px;
}

.palm-reading-subsection .reading-label {
  font-size: 0.92rem;
}

.palm-reading-destiny {
  margin: 8px 0 14px;
}

.profile-modal-lang-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}

.annual-reading-copy {
  margin: 0;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.9);
}

.profile-heading,
.personalized-header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: start;
  flex-wrap: wrap;
}

.profile-heading > div:first-child {
  min-width: 0;
  flex: 1 1 auto;
}

.profile-heading h3,
.personalized-header h3,
.content-item h4 {
  margin: 0 0 4px;
}

.pass-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffe698, #fcbf3c 50%, #d17a16);
  color: #301049;
  font-size: 0.86rem;
  font-weight: 800;
  white-space: nowrap;
}

.checkout-return-page .checkout-return-intro {
  margin: 0 0 36px;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 52rem;
}

a.checkout-return-home-link {
  font-weight: 800;
  color: #1a4f8c;
  text-decoration: underline;
}

.personalized-copy,
.mini-value,
.content-item p {
  margin: 0;
  line-height: 1.6;
}

.mini-card {
  padding: 12px 14px;
}

.mini-label {
  display: block;
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.84rem;
  font-weight: 700;
  text-transform: uppercase;
}

.content-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.jackpot-winner-card {
  display: flex;
  flex-direction: row;
  gap: 12px;
  align-items: flex-start;
  min-width: 0;
}

.jackpot-winner-card--with-venue {
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
}

.jackpot-winner-text--venue-label h4 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.95);
}

.jackpot-winner-card--text-only {
  display: block;
}

.jackpot-winner-venue-img {
  display: block;
  width: 100%;
  max-width: 648px;
  height: auto;
  box-sizing: border-box;
  object-fit: contain;
  border-radius: 16px;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.2);
}

.jackpot-winner-text {
  flex: 1;
  min-width: 0;
}

.jackpot-winner-text h4 {
  margin: 0 0 6px;
  font-size: 1rem;
  line-height: 1.3;
}

.jackpot-winner-text p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.88);
}

.content-item--jackpot-winner {
  padding: 14px;
}

.google-ad-holder {
  min-width: 0;
}

.google-ad-unfilled {
  border-radius: 18px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.google-ad-unfilled-label {
  display: block;
  padding: 6px 12px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.48);
  background: rgba(0, 0, 0, 0.22);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.google-ad-unfilled-frame {
  min-height: 250px;
  background: linear-gradient(180deg, rgba(58, 58, 68, 0.4), rgba(32, 32, 42, 0.5));
  display: flex;
  align-items: center;
  justify-content: center;
}

.google-ad-unfilled-frame::after {
  content: "";
  width: 72%;
  max-width: 300px;
  height: 128px;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  box-sizing: border-box;
}

.google-ad-holder .adsbygoogle {
  min-height: 120px;
  width: 100%;
}

.content-item.content-item--okada {
  padding: 0;
  background: transparent;
  border: none;
}

.content-item-okada-link,
.content-item-cod-link {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  text-decoration: none;
  color: inherit;
  border-radius: inherit;
  outline-offset: 2px;
}

.content-item-okada-link:hover,
.content-item-cod-link:hover {
  filter: brightness(1.04);
}

.content-item.content-item--cod-thumb {
  padding: 0;
}

.content-item-sponsor {
  display: block;
  margin: 0 0 8px;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 224, 170, 0.98);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

.content-item--cod-thumb h4 {
  font-family: "Cinzel", serif;
  font-size: 1.02rem;
  margin: 0 0 6px;
  letter-spacing: 0.02em;
  color: #fff8e8;
}

.content-item--cod-thumb .content-item-okada-body p {
  font-size: 0.92rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.88);
}

.content-item-okada-img {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 12px;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.content-item--okada h4 {
  font-family: "Cinzel", serif;
  font-size: 1.02rem;
  margin: 0 0 6px;
  letter-spacing: 0.02em;
  color: #fff8e8;
}

.content-item--okada .content-item-okada-body p {
  font-size: 0.92rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.88);
}

.content-item--okada.bulletin-holder--brass {
  background: linear-gradient(160deg, #2a2318 0%, #14110c 100%);
  border: 2px solid #c9a227;
  box-shadow:
    inset 0 1px 0 rgba(255, 220, 150, 0.12),
    0 10px 24px rgba(0, 0, 0, 0.35),
    0 0 20px rgba(201, 162, 39, 0.1);
}

.content-item--okada.bulletin-holder--neon {
  background: #120a1e;
  border: 1px solid rgba(64, 255, 236, 0.5);
  box-shadow:
    0 0 18px rgba(255, 0, 180, 0.22),
    0 0 22px rgba(64, 255, 236, 0.12),
    inset 0 0 28px rgba(60, 0, 90, 0.35);
}

.content-item--okada.bulletin-holder--velvet {
  background: linear-gradient(165deg, rgba(52, 22, 48, 0.96), rgba(18, 12, 32, 0.98));
  border: 1px solid rgba(180, 120, 200, 0.38);
  box-shadow:
    inset 0 2px 28px rgba(0, 0, 0, 0.38),
    0 8px 20px rgba(0, 0, 0, 0.28);
}

.site-footer {
  padding: 36px 12px 12px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.88rem;
  text-align: center;
}

.status-message.error {
  background: rgba(170, 45, 66, 0.18);
  border-color: rgba(255, 141, 161, 0.35);
}

.status-message.success {
  background: rgba(34, 100, 66, 0.22);
  border-color: rgba(118, 222, 172, 0.3);
}

.reading-card {
  padding: 0;
  background: var(--card-bg);
  color: var(--text-main);
  box-shadow: 0 25px 55px rgba(0, 0, 0, 0.28);
  overflow: hidden;
}

.reading-card-anchor {
  scroll-margin-top: var(--app-section-gap);
}

.reading-header {
  padding: 14px 16px 10px;
}

.sign-meta {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
}

.sign-emoji {
  font-size: 1.7rem;
  line-height: 1;
}

.sign-name {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 800;
}

.sign-range {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 0.94rem;
}

.reading-divider {
  height: 1px;
  background: var(--line-color);
}

.timestamp,
.description-text,
.luck-row {
  padding: 12px 16px;
}

.timestamp {
  margin: 0;
  font-size: 0.98rem;
}

.description-text {
  margin: 0;
  line-height: 1.6;
  font-size: 1rem;
}

.luck-grid {
  border-top: 1px solid var(--line-color);
}

.luck-row {
  display: grid;
  grid-template-columns: minmax(132px, 42%) 1fr;
  gap: 10px;
  align-items: start;
  border-top: 1px solid var(--line-color);
}

.luck-row:first-child {
  border-top: none;
}

.luck-label {
  font-weight: 800;
}

.luck-value {
  color: #222;
}

.profile-row {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.profile-row-main {
  flex: 1;
  min-width: 0;
}

.profile-avatar {
  position: relative;
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid rgba(255, 227, 151, 0.55);
  background: linear-gradient(145deg, rgba(80, 36, 120, 0.95), rgba(30, 8, 52, 0.98));
  box-shadow:
    0 3px 0 rgba(0, 0, 0, 0.35),
    0 8px 20px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff0bd;
  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease;
  -webkit-tap-highlight-color: transparent;
}

.profile-avatar:hover {
  transform: scale(1.04);
  box-shadow:
    0 3px 0 rgba(0, 0, 0, 0.3),
    0 10px 24px rgba(0, 0, 0, 0.4);
}

.profile-avatar:active {
  transform: scale(0.96);
  box-shadow:
    0 1px 0 rgba(0, 0, 0, 0.25),
    0 4px 12px rgba(0, 0, 0, 0.35);
}

.profile-avatar:focus-visible {
  outline: 2px solid var(--gold-2);
  outline-offset: 2px;
}

.profile-avatar-icon {
  position: absolute;
  width: 28px;
  height: 28px;
  opacity: 0.35;
  pointer-events: none;
}

.profile-avatar-initial {
  position: relative;
  z-index: 1;
  font-family: "Cinzel", serif;
  font-size: 1.35rem;
  font-weight: 700;
  text-shadow: 0 2px 0 #2a063d;
}

.profile-avatar-pending-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  z-index: 2;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ff3a4a;
  border: 2px solid #2a063d;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

body.profile-modal-open {
  overflow: hidden;
}

.profile-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 10px;
}

/* Fly layer: below card figures so PNGs / placeholders are never hidden behind it */
.personalized-daily-tarot-cards--dealing > .lt-deal-stage {
  position: relative;
  z-index: 1;
}

#personalized-daily-tarot-cards > .personalized-daily-tarot-fly-root {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  overflow: visible;
}

.personalized-daily-tarot-cards > .tarot-card-thumb--minor-arcana-spread,
.personalized-daily-tarot-cards > .tarot-card-thumb--minor-arcana-placeholder {
  position: relative;
  z-index: 3;
}

.profile-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 0, 14, 0.72);
  backdrop-filter: blur(4px);
}

.profile-modal-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  max-height: min(78vh, 620px);
  overflow-y: auto;
  margin-bottom: max(12px, env(safe-area-inset-bottom, 0px));
  padding: 18px 16px 20px;
  border-radius: 22px 22px 0 0;
  background: linear-gradient(180deg, rgba(43, 5, 67, 0.98), rgba(24, 5, 43, 0.98));
  border: 1px solid rgba(255, 227, 151, 0.35);
  border-bottom: none;
  box-shadow: 0 -20px 50px rgba(0, 0, 0, 0.45);
}

.profile-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 0.5rem;
}

.profile-modal-header h3 {
  margin: 0;
  font-family: "Cinzel", serif;
  font-size: 1.15rem;
  line-height: 1.35;
  color: #fff0bd;
}

.profile-modal-close {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  margin: -8px -8px 0 0;
  border: none;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.25);
  transition:
    transform 0.08s ease,
    box-shadow 0.08s ease,
    background 0.08s ease;
  -webkit-tap-highlight-color: transparent;
}

.profile-modal-close:hover {
  background: rgba(255, 255, 255, 0.18);
}

.profile-modal-close:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
  background: rgba(255, 255, 255, 0.14);
}

.profile-modal-empty {
  margin: 0.75rem 0 0;
  line-height: 1.55;
}

.profile-modal-actions {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.profile-modal-actions .primary-button,
.profile-modal-actions .secondary-button {
  width: 100%;
}

.personalized-daily-tarot-cards {
  position: relative;
  min-height: 100px;
  margin: 0 -16px;
  padding: 16px 10px 20px;
  width: calc(100% + 32px);
  max-width: none;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  overflow-x: hidden;
  overflow-y: visible;
  scroll-snap-type: none;
  background: rgba(0, 0, 0, 0.28);
  border-radius: 14px;
  border: 1px solid rgba(255, 227, 151, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

@media (max-width: 540px) {
  .personalized-daily-tarot-cards {
    padding: 12px 8px 14px;
    border-radius: 14px;
  }

  .lt-deal-stage {
    flex-direction: column;
    align-items: center;
    gap: 14px;
  }

  .lt-deal-track {
    flex: none;
    width: 100%;
    max-width: 100%;
  }

  .lt-deck-stack {
    width: 84px;
    height: 132px;
  }

  .lt-deck-sheet {
    width: 78px;
    height: 124px;
    margin-left: -39px;
  }
}

/* Viewport-wide strip when app column is full width (shell is min(100vw, 430px)) */
@media (max-width: 430px) {
  .personalized-daily-tarot-cards {
    width: calc(100% + 32px + 28px);
    margin-left: calc(-16px - 14px);
    margin-right: calc(-16px - 14px);
    padding-left: 8px;
    padding-right: 8px;
    padding-top: 12px;
    padding-bottom: 14px;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }
}

/* —— Daily Minor Arcana: deck → slot deal animation —— */
.personalized-daily-tarot-cards.personalized-daily-tarot-cards--dealing {
  flex-direction: column;
  align-items: stretch;
  overflow-x: hidden;
  min-height: 220px;
}

.lt-deal-stage {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: center;
  gap: 18px 24px;
  width: 100%;
  transition: opacity 0.35s ease;
}

.lt-deal-stage.lt-deal-stage--finishing .lt-deal-deck {
  opacity: 0;
  transform: scale(0.85) translateX(-12px);
  pointer-events: none;
}

.lt-deal-stage.lt-deal-stage--finishing .lt-slots-label {
  opacity: 0.4;
}

.lt-deal-deck {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 8px 12px 12px;
  transition:
    opacity 0.35s ease,
    transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.lt-deck-label {
  font-family: "Cinzel", serif;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(245, 215, 138, 0.75);
}

.lt-deck-stack {
  position: relative;
  width: 96px;
  height: 148px;
}

.lt-deck-sheet {
  position: absolute;
  left: 50%;
  width: 88px;
  height: 140px;
  margin-left: -44px;
  border-radius: 10px;
  border: 2px solid rgba(201, 162, 39, 0.85);
  background:
    linear-gradient(148deg, #1f0f38 0%, #3d1f5c 42%, #1a0d2e 100%);
  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.5),
    inset 0 0 24px rgba(255, 210, 120, 0.08);
  transform-origin: 50% 100%;
}

.lt-deck-sheet--a {
  bottom: 0;
  transform: rotate(-2deg);
  z-index: 3;
  animation: lt-deck-breathe 2.4s ease-in-out infinite;
}

.lt-deck-sheet--b {
  bottom: 5px;
  transform: rotate(2.5deg) translateY(-2px);
  z-index: 2;
  opacity: 0.92;
}

.lt-deck-sheet--c {
  bottom: 10px;
  transform: rotate(-1deg) translateY(-4px);
  z-index: 1;
  opacity: 0.82;
}

.lt-deck-sheet--a::after,
.lt-deck-sheet--b::after {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 6px;
  border: 1px solid rgba(255, 215, 138, 0.22);
  background: radial-gradient(circle at 50% 35%, rgba(255, 230, 160, 0.12), transparent 55%);
  pointer-events: none;
}

@keyframes lt-deck-breathe {
  0%,
  100% {
    transform: rotate(-2deg) translateY(0);
  }
  50% {
    transform: rotate(-1deg) translateY(-3px);
  }
}

.lt-deal-track {
  flex: 1 1 260px;
  min-width: 0;
}

.lt-slots-label {
  margin: 0 0 10px;
  font-family: "Cinzel", serif;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
  color: #f0d070;
}

.lt-deal-slots {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: flex-end;
  gap: clamp(6px, 1.8vw, 12px);
  overflow-x: auto;
  padding-bottom: 6px;
  -webkit-overflow-scrolling: touch;
}

/* Deal animation: one large slot per row (matches final spread layout). */
.personalized-daily-tarot-cards.personalized-daily-tarot-cards--dealing .lt-deal-slots {
  flex-direction: column;
  align-items: center;
  gap: 14px;
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
  padding-bottom: 10px;
}

.personalized-daily-tarot-cards.personalized-daily-tarot-cards--dealing .lt-slot {
  flex: none;
  width: 100%;
  max-width: min(100%, 360px);
  min-width: 0;
  padding: 0 4px 6px;
}

.personalized-daily-tarot-cards.personalized-daily-tarot-cards--dealing .lt-slot-well {
  min-height: 200px;
}

.lt-slot {
  position: relative;
  flex: 0 0 auto;
  width: min(22vw, 118px);
  min-width: 86px;
  max-width: 132px;
  padding: 0 2px 4px;
}

.lt-slot-chrome {
  display: block;
  position: absolute;
  inset: 0 0 0 0;
  bottom: 28px;
  border-radius: 12px;
  border: 2px solid rgba(255, 200, 80, 0.35);
  background: linear-gradient(180deg, rgba(40, 20, 70, 0.95), rgba(12, 6, 28, 0.98));
  box-shadow:
    inset 0 2px 12px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

.lt-slot-chrome::before {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  top: 8px;
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, rgba(255, 220, 120, 0.25), transparent);
  opacity: 0.7;
}

.lt-slot-well {
  position: relative;
  z-index: 1;
  min-height: 156px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 8px 4px 0;
}

.lt-slot-well .tarot-card-thumb--minor-arcana-spread {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0;
}

.lt-slot-num {
  display: block;
  margin-top: 6px;
  text-align: center;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: rgba(255, 230, 180, 0.55);
}

.lt-slot--nudge .lt-slot-chrome {
  animation: lt-slot-nudge 0.28s ease-out;
}

.lt-slot--active .lt-slot-chrome {
  border-color: rgba(255, 220, 120, 0.65);
  box-shadow:
    inset 0 2px 12px rgba(0, 0, 0, 0.45),
    0 0 16px rgba(255, 200, 80, 0.22);
}

.lt-slot--filled .lt-slot-chrome {
  border-color: rgba(255, 227, 151, 0.4);
}

@keyframes lt-slot-nudge {
  0% {
    transform: translateY(0);
  }
  35% {
    transform: translateY(5px);
  }
  100% {
    transform: translateY(0);
  }
}

.lt-flying-card {
  border-radius: 11px;
  overflow: hidden;
  box-shadow:
    0 14px 36px rgba(0, 0, 0, 0.55),
    0 0 0 2px rgba(201, 162, 39, 0.5);
}

.lt-flying-card .lt-card-back {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 10px;
  border: 2px solid rgba(201, 162, 39, 0.9);
  background:
    linear-gradient(152deg, #1c0e32 0%, #4a2880 45%, #1a0d2c 100%);
  box-shadow: inset 0 0 30px rgba(255, 200, 100, 0.1);
}

.lt-flying-card .lt-card-back::after {
  content: "✦";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -52%);
  font-size: clamp(1.4rem, 5vw, 2rem);
  color: rgba(255, 215, 138, 0.35);
  pointer-events: none;
}

.lt-landed-card.lt-landed-card--bounce {
  animation: lt-card-land 0.42s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes lt-card-land {
  0% {
    transform: scale(0.86) translateY(12px);
    opacity: 0.85;
  }
  100% {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lt-deck-sheet--a {
    animation: none;
  }

  .lt-slot--nudge .lt-slot-chrome {
    animation: none;
  }

  .lt-landed-card.lt-landed-card--bounce {
    animation: none;
  }
}

.personalized-daily-tarot-cards .tarot-card-thumb--minor-arcana-spread,
.personalized-daily-tarot-cards .tarot-card-thumb--minor-arcana-placeholder {
  margin: 0;
  flex: none;
  width: 100%;
  max-width: min(100%, 360px);
  min-width: 0;
  text-align: center;
}

.personalized-daily-tarot-cards .tarot-card-img--minor-arcana-spread {
  display: block;
  width: 100%;
  max-width: none;
  height: auto;
  border-radius: 12px;
  border: 2px solid rgba(255, 227, 151, 0.45);
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(0, 0, 0, 0.2);
}

.personalized-daily-tarot-cards .tarot-card-thumb--minor-arcana-spread .tarot-card-caption {
  margin-top: 10px;
  font-size: 0.82rem;
  line-height: 1.35;
  max-width: 100%;
  word-break: break-word;
}

@media (min-width: 480px) {
  .personalized-daily-tarot-cards .tarot-card-thumb--minor-arcana-spread .tarot-card-caption {
    font-size: 0.88rem;
  }
}

/* Final spread + dealing: one column, large card per row (app column ≤430px). */
@media (max-width: 900px) {
  .personalized-daily-tarot-cards.personalized-daily-tarot-cards--dealing {
    min-height: 0;
  }

  #personalized-daily-tarot-cards.tarot-cards.personalized-daily-tarot-cards:not(.personalized-daily-tarot-cards--dealing) {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 14px 10px 16px;
    overflow-x: hidden;
    scroll-snap-type: none;
    min-height: 0;
  }

  #personalized-daily-tarot-cards:not(.personalized-daily-tarot-cards--dealing) .tarot-card-thumb--minor-arcana-spread,
  #personalized-daily-tarot-cards:not(.personalized-daily-tarot-cards--dealing) .tarot-card-thumb--minor-arcana-placeholder {
    width: 100%;
    max-width: min(100%, 360px);
    min-width: 0;
    flex: none;
  }

  #personalized-daily-tarot-cards:not(.personalized-daily-tarot-cards--dealing)
    .tarot-card-thumb--minor-arcana-placeholder
    .tarot-card-placeholder-box {
    min-height: 200px;
    font-size: 0.78rem;
    padding: 12px 10px;
  }

  .personalized-daily-tarot-cards--dealing .lt-slot-chrome {
    bottom: 28px;
  }
}

.profile-reading-body-host {
  margin: 0;
}

.profile-reading-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.reading-hero {
  margin: 0 0 0.25rem;
  font-family: "Cinzel", serif;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.45;
  color: #fff4c8;
  text-align: center;
}

.reading-section {
  margin: 0;
  padding: 12px 12px 14px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 227, 151, 0.12);
}

.reading-label {
  margin: 0 0 10px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 227, 151, 0.85);
}

.reading-paragraph {
  margin: 0 0 0.65rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.94rem;
}

.reading-paragraph:last-child {
  margin-bottom: 0;
}

.reading-luck-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.reading-luck-list li {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: baseline;
  font-size: 0.92rem;
  line-height: 1.5;
}

.reading-k {
  color: rgba(255, 255, 255, 0.65);
  font-weight: 600;
}

.reading-v {
  color: #fff4d4;
  font-weight: 700;
}

.reading-safety {
  border-color: rgba(255, 180, 120, 0.25);
  background: rgba(80, 30, 20, 0.25);
}

.reading-legacy-note {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 0.86rem;
  line-height: 1.5;
  color: rgba(255, 235, 180, 0.92);
  background: rgba(255, 200, 80, 0.12);
  border: 1px solid rgba(255, 215, 109, 0.28);
}

.hidden {
  display: none;
}

.palm-upload-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 227, 151, 0.18);
}

.member-hub-card.palm-upload-section {
  margin-top: 0;
  padding-top: 16px;
  border-top: none;
}

/* Ba Zi hub card (mockup: blue panel, purple frame, purple action buttons) */
#bazi-reading-section,
#member-face,
#palm-upload-section {
  scroll-margin-top: var(--app-section-gap);
  flex-shrink: 0;
}

.member-hub-card--bazi {
  padding: 18px 16px 16px;
  border-radius: 22px;
  background: #3d5a9e;
  border: 5px solid #6b3d9e;
  box-shadow:
    0 14px 36px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.member-hub-card--bazi .member-hub-card-title--bazi {
  margin: 0 0 12px;
  font-family: "Inter", system-ui, sans-serif;
  font-size: clamp(0.72rem, 2.8vw, 0.88rem);
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #ffffff;
  text-align: left;
}

/* Ba Zi only — purple gradient primaries (face/palm use their own themes below) */
.member-hub-card--bazi .primary-button {
  color: #14081f;
  background: linear-gradient(180deg, #d4c4ff, #8b6ae0 48%, #5c32b0);
  box-shadow:
    0 4px 0 rgba(40, 12, 80, 0.48),
    0 10px 18px rgba(0, 0, 0, 0.22);
}

.member-hub-card--bazi .primary-button:active:not(:disabled) {
  box-shadow:
    0 1px 0 rgba(40, 12, 80, 0.38),
    0 4px 10px rgba(0, 0, 0, 0.2);
}

.member-hub-card--bazi .primary-button:focus-visible {
  outline-color: rgba(200, 170, 255, 0.95);
}

/*
 * Ba Zi hub only: Save, READ chart, START reading — one chrome (lavender 3D gradient).
 * Specificity beats .member-hub-actions--split .primary-button so weight/letter-spacing match Save.
 */
.member-hub-card--bazi .primary-button.bazi-hub-action-btn {
  width: 100%;
  box-sizing: border-box;
  flex: 0 0 auto;
  min-height: 48px;
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.045em;
  text-transform: uppercase;
  line-height: 1.25;
  padding-top: 12px;
  padding-bottom: 12px;
}

#bazi-ai-report-button:disabled {
  white-space: normal;
  text-align: center;
}

.member-hub-card--bazi .member-hub-actions--bazi-stack {
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}

/* Ba Zi hub: one button embossed (primary CTA), the other flat grey */
.member-hub-card--bazi .primary-button.bazi-hub-action-btn.bazi-hub-action-btn--embossed {
  box-shadow:
    0 5px 0 rgba(40, 12, 80, 0.55),
    0 14px 26px rgba(0, 0, 0, 0.3),
    inset 0 2px 0 rgba(255, 255, 255, 0.32);
}

.member-hub-card--bazi .primary-button.bazi-hub-action-btn.bazi-hub-action-btn--embossed:active:not(:disabled) {
  box-shadow:
    0 1px 0 rgba(40, 12, 80, 0.4),
    0 5px 12px rgba(0, 0, 0, 0.22);
}

.member-hub-card--bazi .primary-button.bazi-hub-action-btn.bazi-hub-action-btn--flat {
  opacity: 1;
  cursor: pointer;
  background: linear-gradient(180deg, #9a9aac, #6e6e7e);
  color: rgba(255, 255, 255, 0.95);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 1px 0 rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(0, 0, 0, 0.18);
  filter: none;
  transform: none;
}

.member-hub-card--bazi .primary-button.bazi-hub-action-btn.bazi-hub-action-btn--flat:hover:not(:disabled) {
  filter: brightness(1.04);
}

.member-hub-card--bazi .primary-button.bazi-hub-action-btn.bazi-hub-action-btn--flat:active:not(:disabled) {
  box-shadow:
    inset 0 2px 8px rgba(0, 0, 0, 0.22),
    0 1px 0 rgba(0, 0, 0, 0.18);
}

.member-hub-card-bazi-lead {
  margin: 0 0 16px;
  text-align: center;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.92);
}

.bazi-fields {
  margin: 0 0 14px;
  padding: 12px 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.22);
  border: 2px solid rgba(10, 10, 10, 0.25);
}

.bazi-fields-legend {
  margin: 0 0 10px;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #0a0a0a;
}

.bazi-field-label {
  display: block;
  margin: 10px 0 4px;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  color: #0a0a0a;
}

.bazi-field-label:first-of-type,
.bazi-fields .bazi-field-label:first-of-type {
  margin-top: 0;
}

.bazi-field-control {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.9rem;
  color: #111;
  background: #f8f7ff;
  border: 2px solid #0a0a0a;
  border-radius: 10px;
}

.bazi-field-control::placeholder {
  color: rgba(0, 0, 0, 0.45);
}

.bazi-time-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.bazi-time-row .bazi-field-control.bazi-time-hour,
.bazi-time-row .bazi-field-control.bazi-time-ampm {
  width: auto;
  min-width: 4.25rem;
  flex: 0 1 auto;
}

.bazi-time-row .bazi-field-control.bazi-time-minute {
  width: auto;
  min-width: 4rem;
  flex: 0 1 auto;
  text-align: center;
}

.bazi-time-sep {
  font-weight: 800;
  font-size: 1rem;
  color: #0a0a0a;
  user-select: none;
}

.daily-tarot-progress-modal .daily-tarot-progress-panel {
  max-width: 420px;
}

.daily-tarot-progress-message {
  margin: 0 0 10px;
  line-height: 1.55;
}

.daily-tarot-progress-hint {
  margin: 0;
}

.profile-modal-panel--bazi {
  max-width: 36rem;
}

.bazi-reading-modal-body {
  max-height: min(70vh, 520px);
  overflow-y: auto;
}

.bazi-report-root .bazi-report-title {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
}

.bazi-report-root .bazi-report-h3 {
  margin: 1.25rem 0 0.5rem;
  font-size: 1rem;
}

.bazi-report-root .bazi-report-h4 {
  margin: 0.85rem 0 0.35rem;
  font-size: 0.95rem;
  font-weight: 600;
  opacity: 0.95;
}

.bazi-pillar-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.75rem 0 1rem;
  font-size: 0.9rem;
}

.bazi-pillar-table th,
.bazi-pillar-table td {
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 8px 6px;
  text-align: center;
}

.bazi-pillar-table th {
  background: rgba(0, 0, 0, 0.25);
}

.bazi-pillar-cell .bazi-gan {
  font-weight: 700;
}

@media (min-width: 600px) {
  .app-shell {
    padding-top: 64px;
  }

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

  /* Member bulletin: keep one full-width column (no side-by-side halves). */
  .personalized-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .selector-row {
    max-width: 100%;
  }
}

/* Member readings hub: separate cards per reading type */
.member-readings-hub {
  display: flex;
  flex-direction: column;
  gap: var(--app-section-gap);
}

.member-readings-hub--form {
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
}

.member-hub-card {
  margin: 0;
  padding: 16px 16px 14px;
  border-radius: 20px;
  background: linear-gradient(152deg, rgba(72, 38, 108, 0.52), rgba(14, 6, 32, 0.94));
  border: 1px solid rgba(255, 227, 151, 0.26);
  box-shadow:
    0 14px 38px rgba(0, 0, 0, 0.36),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.member-hub-card-title {
  margin: 0 0 6px;
  font-family: "Cinzel", serif;
  font-size: 1.02rem;
  font-weight: 700;
  color: rgba(255, 236, 200, 0.96);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.member-hub-card-lead {
  margin: 0 0 12px;
  font-size: 0.88rem;
  line-height: 1.45;
}

.member-hub-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.member-hub-actions--split .primary-button,
.member-hub-actions--split .secondary-button {
  flex: 1 1 148px;
  min-height: 46px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.report-unlock-actions {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.report-unlock-lead {
  margin: 0 0 8px;
  font-size: 0.88rem;
  line-height: 1.45;
}

.report-unlock-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.report-unlock-buttons .primary-button,
.report-unlock-buttons .secondary-button {
  flex: 1 1 168px;
  min-height: 44px;
  font-weight: 600;
}

/* Order on top, social unlocks below — full width for long labels */
.report-unlock-buttons--order-messenger {
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: stretch;
}

.report-unlock-buttons--order-messenger .report-unlock-pay,
.report-unlock-buttons--order-messenger .report-unlock-messenger,
.report-unlock-buttons--order-messenger .report-unlock-story {
  flex: 0 0 auto;
  width: 100%;
  max-width: 100%;
}

.report-unlock-buttons--order-messenger .report-unlock-story {
  position: relative;
  z-index: 2;
  cursor: pointer;
  background: linear-gradient(165deg, #1877f2 0%, #0c63d4 100%);
  border-color: rgba(24, 119, 242, 0.95);
  box-shadow:
    0 10px 24px rgba(24, 119, 242, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.member-hub-primary-btn {
  width: 100%;
  min-height: 46px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.member-hub-status {
  margin: 12px 0 0;
  font-size: 0.86rem;
  line-height: 1.45;
}

.section-heading--with-action {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.section-heading--with-action > div:first-child {
  flex: 1 1 220px;
  min-width: 0;
}

.member-hub-tarot-jump-btn {
  flex: 0 0 auto;
  align-self: flex-start;
  min-height: 44px;
  font-weight: 600;
  white-space: nowrap;
}

@media (max-width: 520px) {
  .member-hub-tarot-jump-btn {
    width: 100%;
  }
}

/* Member hub: color-coded card frames + buttons per reading type */
.member-hub-card--theme-zodiac {
  border-color: rgba(100, 220, 150, 0.62);
  box-shadow:
    0 14px 38px rgba(0, 0, 0, 0.36),
    inset 0 1px 0 rgba(120, 235, 170, 0.14);
}

.member-hub-card--theme-zodiac .member-hub-card-title {
  color: rgba(186, 255, 212, 0.98);
}

.member-hub-card--theme-zodiac .primary-button {
  color: #082818;
  background: linear-gradient(180deg, #c8ffd8, #4ecf88 48%, #1f9d5c);
  box-shadow:
    0 4px 0 rgba(8, 60, 36, 0.5),
    0 10px 18px rgba(0, 0, 0, 0.22);
}

.member-hub-card--theme-zodiac .primary-button:active:not(:disabled) {
  box-shadow:
    0 1px 0 rgba(8, 60, 36, 0.4),
    0 4px 10px rgba(0, 0, 0, 0.2);
}

.member-hub-card--theme-zodiac .primary-button:focus-visible {
  outline-color: rgba(140, 255, 190, 0.95);
}

.member-hub-card--theme-zodiac .secondary-button {
  border-color: rgba(120, 230, 170, 0.55);
  background: rgba(20, 80, 50, 0.38);
  color: rgba(240, 255, 248, 0.96);
}

.member-hub-card--theme-zodiac .secondary-button:hover:not(:disabled) {
  border-color: rgba(140, 255, 200, 0.65);
  background: rgba(30, 100, 65, 0.45);
}

.member-hub-card--theme-zodiac .secondary-button:focus-visible {
  outline-color: rgba(140, 255, 190, 0.9);
}

.face-palm-chart-image,
.hub-card-symbol {
  display: block;
  width: 50%;
  max-width: 50%;
  height: auto;
  margin: 0 auto 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.24);
  object-fit: contain;
}

/* Palm hub: palmistry chart at 90% of card content width */
.member-hub-card--theme-palm .face-palm-chart-image {
  width: 90%;
  max-width: 90%;
}

.selector-row-text {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.selector-slot-display {
  display: block;
  width: 50%;
  max-width: 50%;
  height: auto;
  margin: 6px auto 0;
  border-radius: 12px;
  border: 1px solid rgba(255, 228, 158, 0.28);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.28);
  object-fit: contain;
  background: rgba(0, 0, 0, 0.2);
}

/* Face reading — pink / coral accent (distinct from Ba Zi purple) */
.member-hub-card--theme-face {
  border-color: rgba(255, 120, 130, 0.62);
  box-shadow:
    0 14px 38px rgba(0, 0, 0, 0.36),
    inset 0 1px 0 rgba(255, 150, 150, 0.12);
}

.member-hub-card--theme-face .member-hub-card-title {
  color: rgba(255, 210, 210, 0.98);
}

/* Instruction copy: no panel box — plain text, left-aligned */
.member-hub-card--theme-face .face-palm-hub-instruction {
  margin: 0 0 14px;
  padding: 0;
  border: none;
  border-radius: 0;
  background: none;
  box-shadow: none;
  font-family: "Inter", system-ui, sans-serif;
  font-size: clamp(0.68rem, 2.4vw, 0.78rem);
  font-weight: 700;
  letter-spacing: 0.07em;
  line-height: 1.5;
  text-transform: uppercase;
  text-align: left;
  color: rgba(255, 245, 245, 0.96);
}

.member-hub-card--theme-face .member-hub-actions--face-palm-stack {
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}

.member-hub-card--theme-face .member-hub-actions--face-palm-stack .primary-button,
.member-hub-card--theme-face .member-hub-actions--face-palm-stack .secondary-button {
  width: 100%;
  flex: 0 0 auto;
}

.member-hub-card--theme-face .primary-button {
  color: #2a0a0a;
  background: linear-gradient(180deg, #ffc8c0, #f06858 48%, #c42820);
  box-shadow:
    0 4px 0 rgba(90, 20, 16, 0.48),
    0 10px 18px rgba(0, 0, 0, 0.22);
}

.member-hub-card--theme-face .primary-button:active:not(:disabled) {
  box-shadow:
    0 1px 0 rgba(90, 20, 16, 0.38),
    0 4px 10px rgba(0, 0, 0, 0.2);
}

.member-hub-card--theme-face .primary-button:focus-visible {
  outline-color: rgba(255, 160, 160, 0.95);
}

/* Start face capture / upload: extra emboss when a reading already exists (preview or full) */
.member-hub-card--theme-face #face-open-camera.face-start-capture-btn--has-reading,
.member-hub-card--theme-face #face-upload-photo.face-start-capture-btn--has-reading {
  box-shadow:
    0 5px 0 rgba(90, 20, 16, 0.55),
    0 14px 26px rgba(0, 0, 0, 0.3),
    inset 0 2px 0 rgba(255, 255, 255, 0.38);
}

.member-hub-card--theme-face #face-open-camera.face-start-capture-btn--has-reading:active:not(:disabled) {
  box-shadow:
    0 1px 0 rgba(90, 20, 16, 0.4),
    0 5px 12px rgba(0, 0, 0, 0.22);
}

.member-hub-card--theme-face .secondary-button {
  border-color: rgba(255, 130, 140, 0.55);
  background: rgba(90, 28, 32, 0.38);
  color: rgba(255, 240, 240, 0.96);
}

.member-hub-card--theme-face .secondary-button:hover:not(:disabled) {
  border-color: rgba(255, 160, 170, 0.65);
  background: rgba(110, 36, 40, 0.48);
}

.member-hub-card--theme-face .secondary-button:focus-visible {
  outline-color: rgba(255, 150, 150, 0.9);
}

/* READ Face reading: embossed primary look when a reading exists (preview or full) */
.member-hub-card--theme-face #face-view-last-reading.secondary-button.face-read-btn--embossed {
  border: none;
  color: #2a0a0a;
  background: linear-gradient(180deg, #ffc8c0, #f06858 48%, #c42820);
  box-shadow:
    0 4px 0 rgba(90, 20, 16, 0.48),
    0 10px 18px rgba(0, 0, 0, 0.22);
}

.member-hub-card--theme-face #face-view-last-reading.secondary-button.face-read-btn--embossed:hover:not(:disabled) {
  filter: brightness(1.03);
  border-color: transparent;
  background: linear-gradient(180deg, #ffc8c0, #f06858 48%, #c42820);
}

.member-hub-card--theme-face #face-view-last-reading.secondary-button.face-read-btn--embossed:active:not(:disabled) {
  box-shadow:
    0 1px 0 rgba(90, 20, 16, 0.38),
    0 4px 10px rgba(0, 0, 0, 0.2);
  filter: brightness(0.94);
}

.member-hub-card--theme-face #face-view-last-reading.secondary-button.face-read-btn--embossed:focus-visible {
  outline-color: rgba(255, 160, 160, 0.95);
}

/* Palm reading — blue accent (distinct from Ba Zi purple) */
.member-hub-card--theme-palm {
  border-color: rgba(120, 190, 255, 0.62);
  box-shadow:
    0 14px 38px rgba(0, 0, 0, 0.36),
    inset 0 1px 0 rgba(150, 200, 255, 0.14);
}

.member-hub-card--theme-palm .member-hub-card-title {
  color: rgba(205, 230, 255, 0.98);
}

.member-hub-card--theme-palm .face-palm-hub-instruction {
  margin: 0 0 14px;
  padding: 0;
  border: none;
  border-radius: 0;
  background: none;
  box-shadow: none;
  font-family: "Inter", system-ui, sans-serif;
  font-size: clamp(0.68rem, 2.4vw, 0.78rem);
  font-weight: 700;
  letter-spacing: 0.07em;
  line-height: 1.5;
  text-transform: uppercase;
  text-align: left;
  color: rgba(235, 245, 255, 0.96);
}

.member-hub-card--theme-palm .member-hub-actions--face-palm-stack {
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}

.member-hub-card--theme-palm .member-hub-actions--face-palm-stack .primary-button,
.member-hub-card--theme-palm .member-hub-actions--face-palm-stack .secondary-button {
  width: 100%;
  flex: 0 0 auto;
}

.member-hub-card--theme-palm .primary-button {
  color: #061830;
  background: linear-gradient(180deg, #b8e0ff, #58a8f0 48%, #2a78c8);
  box-shadow:
    0 4px 0 rgba(12, 50, 100, 0.48),
    0 10px 18px rgba(0, 0, 0, 0.22);
}

.member-hub-card--theme-palm .primary-button:active:not(:disabled) {
  box-shadow:
    0 1px 0 rgba(12, 50, 100, 0.38),
    0 4px 10px rgba(0, 0, 0, 0.2);
}

.member-hub-card--theme-palm .primary-button:focus-visible {
  outline-color: rgba(160, 210, 255, 0.95);
}

/* Start palm capture: extra emboss when a reading already exists (preview or full) */
.member-hub-card--theme-palm #palm-smart-capture.palm-start-capture-btn--has-reading {
  box-shadow:
    0 5px 0 rgba(12, 50, 100, 0.55),
    0 14px 26px rgba(0, 0, 0, 0.3),
    inset 0 2px 0 rgba(255, 255, 255, 0.38);
}

.member-hub-card--theme-palm #palm-smart-capture.palm-start-capture-btn--has-reading:active:not(:disabled) {
  box-shadow:
    0 1px 0 rgba(12, 50, 100, 0.4),
    0 5px 12px rgba(0, 0, 0, 0.22);
}

.member-hub-card--theme-palm .secondary-button {
  border-color: rgba(130, 190, 255, 0.55);
  background: rgba(25, 55, 110, 0.4);
  color: rgba(240, 248, 255, 0.96);
}

.member-hub-card--theme-palm .secondary-button:hover:not(:disabled) {
  border-color: rgba(160, 210, 255, 0.65);
  background: rgba(35, 70, 130, 0.48);
}

.member-hub-card--theme-palm .secondary-button:focus-visible {
  outline-color: rgba(160, 210, 255, 0.9);
}

/* READ Palm reading: embossed primary look when a reading exists (preview or full) */
.member-hub-card--theme-palm #palm-view-saved-reading.secondary-button.palm-read-btn--embossed {
  border: none;
  color: #061830;
  background: linear-gradient(180deg, #b8e0ff, #58a8f0 48%, #2a78c8);
  box-shadow:
    0 4px 0 rgba(12, 50, 100, 0.48),
    0 10px 18px rgba(0, 0, 0, 0.22);
}

.member-hub-card--theme-palm #palm-view-saved-reading.secondary-button.palm-read-btn--embossed:hover:not(:disabled) {
  filter: brightness(1.03);
  border-color: transparent;
  background: linear-gradient(180deg, #b8e0ff, #58a8f0 48%, #2a78c8);
}

.member-hub-card--theme-palm #palm-view-saved-reading.secondary-button.palm-read-btn--embossed:active:not(:disabled) {
  box-shadow:
    0 1px 0 rgba(12, 50, 100, 0.38),
    0 4px 10px rgba(0, 0, 0, 0.2);
  filter: brightness(0.94);
}

.member-hub-card--theme-palm #palm-view-saved-reading.secondary-button.palm-read-btn--embossed:focus-visible {
  outline-color: rgba(160, 210, 255, 0.95);
}

.member-hub-card--theme-tarot {
  border-color: rgba(255, 210, 120, 0.72);
  box-shadow:
    0 14px 38px rgba(0, 0, 0, 0.36),
    inset 0 1px 0 rgba(255, 220, 140, 0.16);
}

.member-hub-card--theme-tarot .member-hub-card-title,
.member-hub-card--theme-tarot .section-heading h2 {
  color: rgba(255, 236, 188, 0.98);
}

.tarot-preview-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  max-width: 100%;
  margin: 0 0 14px;
  min-height: 60px;
}

.tarot-preview-card {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 200 / 350;
  border-radius: 10px;
  border: 1px solid rgba(255, 225, 155, 0.38);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.24);
  object-fit: cover;
  background: rgba(0, 0, 0, 0.25);
}

.member-hub-card--theme-tarot .primary-button {
  color: #301049;
  background: linear-gradient(180deg, #fff0b8, #f0c040 48%, #c07012);
  box-shadow:
    0 4px 0 rgba(120, 62, 8, 0.45),
    0 10px 18px rgba(0, 0, 0, 0.22);
}

.member-hub-card--theme-tarot .primary-button:active:not(:disabled) {
  box-shadow:
    0 1px 0 rgba(120, 62, 8, 0.35),
    0 4px 10px rgba(0, 0, 0, 0.2);
}

.member-hub-card--theme-tarot .primary-button:focus-visible {
  outline-color: rgba(255, 220, 120, 0.95);
}

/* READ tarot: flat grey when no spread loaded, or when loaded spread is not for today (see EXPIRED line) */
.member-hub-card--theme-tarot #member-open-tarot-reading.primary-button.member-hub-tarot-read-btn--flat {
  background: linear-gradient(180deg, #9a9aac, #6e6e7e);
  color: rgba(255, 255, 255, 0.95);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 1px 0 rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(0, 0, 0, 0.18);
  filter: none;
}

.member-hub-card--theme-tarot #member-open-tarot-reading.primary-button.member-hub-tarot-read-btn--flat:hover {
  filter: brightness(1.05);
}

.member-hub-card--theme-tarot .member-tarot-reading-status {
  margin: 8px 0 0;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #ff9e7a;
  line-height: 1.35;
}

.member-hub-card--theme-tarot .secondary-button {
  border-color: rgba(255, 210, 130, 0.52);
  background: rgba(80, 55, 20, 0.35);
  color: rgba(255, 248, 230, 0.96);
}

.member-hub-card--theme-tarot .secondary-button:hover:not(:disabled) {
  border-color: rgba(255, 225, 150, 0.62);
  background: rgba(100, 70, 28, 0.42);
}

.member-hub-card--theme-tarot .secondary-button:focus-visible {
  outline-color: rgba(255, 210, 120, 0.9);
}

.member-hub-card--theme-tarot .personalized-result-stack {
  border-top-color: rgba(255, 200, 100, 0.28);
}

.member-hub-card--theme-tarot .personalized-section-heading,
.member-hub-card--theme-tarot .personalized-five-reel-heading,
.member-hub-card--theme-tarot .personalized-slots-heading,
.member-hub-card--theme-tarot .personalized-padrino-heading {
  color: #ffd978;
}

.member-hub-card--theme-tarot .personalized-slot-machines {
  border-color: rgba(255, 210, 120, 0.28);
}

/* Live capture (face / palm) with circular guide */
.capture-slot-status {
  margin: 0;
  font-size: 0.86rem;
}

.capture-open-camera-button {
  width: 100%;
}

body.capture-camera-open {
  overflow: hidden;
}

.capture-camera-modal {
  position: fixed;
  inset: 0;
  z-index: 2100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 10px;
}

.capture-camera-modal.hidden {
  display: none;
}

.capture-camera-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 0, 14, 0.82);
  backdrop-filter: blur(5px);
}

.capture-camera-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  margin-bottom: max(12px, env(safe-area-inset-bottom, 0px));
  padding: 16px 16px 18px;
  border-radius: 22px 22px 0 0;
  background: linear-gradient(180deg, rgba(43, 5, 67, 0.98), rgba(24, 5, 43, 0.98));
  border: 1px solid rgba(255, 227, 151, 0.35);
  border-bottom: none;
  box-shadow: 0 -20px 50px rgba(0, 0, 0, 0.45);
}

.capture-camera-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 0.35rem;
}

.capture-camera-header h3 {
  margin: 0;
  font-family: "Cinzel", serif;
  font-size: 1.1rem;
  color: #fff0bd;
}

.capture-camera-hint {
  margin: 0 0 10px;
  font-size: 0.88rem;
  line-height: 1.45;
}

.capture-camera-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  max-height: min(62vh, 380px);
  margin: 0 auto;
  border-radius: 18px;
  overflow: hidden;
  background: #0a0514;
}

.capture-camera-stage video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.capture-camera-ring {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 72%;
  height: 72%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 3px solid rgba(255, 230, 160, 0.92);
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5);
  pointer-events: none;
}

.capture-camera-canvas {
  display: none;
}

.capture-camera-error {
  margin: 10px 0 0;
  color: #ffb4b4;
  font-size: 0.9rem;
}

.capture-camera-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.capture-camera-actions .primary-button,
.capture-camera-actions .secondary-button {
  width: 100%;
}

body.smart-face-open {
  overflow: hidden;
}

.smart-face-modal {
  z-index: 2200;
}

.smart-face-subtitle {
  margin: 0 0 10px;
  font-size: 0.86rem;
  line-height: 1.45;
}

.smart-face-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  max-height: min(58vh, 360px);
  margin: 0 auto;
  border-radius: 18px;
  overflow: hidden;
  background: #0a0514;
}

.smart-face-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}

.smart-face-circle {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 72%;
  height: 72%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 4px solid #e53935;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.52);
  pointer-events: none;
  transition: border-color 0.2s ease;
}

.smart-face-circle--bad {
  border-color: #e53935;
}

.smart-face-circle--good {
  border-color: #43a047;
}

.smart-face-instruction {
  margin: 12px 0 0;
  text-align: center;
  font-size: 1rem;
  font-weight: 700;
  color: #fff0bd;
  min-height: 1.4em;
}

.smart-face-panel.smart-face-panel--reading {
  max-height: min(92vh, 820px);
  display: flex;
  flex-direction: column;
}

.smart-face-post-flow {
  padding: 8px 0 4px;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.smart-face-reading-body {
  flex: 1;
  min-height: 120px;
  max-height: min(52vh, 440px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 0 14px;
  padding: 12px 12px 14px;
  border-radius: 14px;
  background: rgba(8, 2, 18, 0.55);
  border: 1px solid rgba(255, 215, 109, 0.22);
  text-align: left;
  color: #ede6f7;
  font-size: 0.86rem;
  line-height: 1.52;
}

.smart-face-reading-body .reading-partial-banner {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 196, 72, 0.12);
  border: 1px solid rgba(255, 210, 120, 0.35);
}

.smart-face-reading-body .reading-partial-banner__title {
  margin: 0 0 6px;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #ffe08a;
  line-height: 1.35;
}

.smart-face-reading-body .reading-partial-banner__body {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: rgba(255, 244, 220, 0.92);
}

.smart-face-reading-body .reading-partial-banner__body strong {
  color: #fff4c8;
}

.smart-face-reading-body.hidden {
  display: none;
}

.smart-face-reading-body .reading-section {
  margin-bottom: 14px;
}

.smart-face-reading-body .reading-section:last-child {
  margin-bottom: 0;
}

.smart-face-reading-body .reading-label {
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #ffcd4d;
  margin: 0 0 6px;
}

.smart-face-reading-body .reading-paragraph {
  margin: 0 0 0.55em;
  color: #e8dff5;
}

.smart-face-post-status {
  margin: 0 0 10px;
  text-align: center;
  font-size: 1.08rem;
  font-weight: 800;
  color: #fff0bd;
  line-height: 1.35;
}

.smart-face-post-detail {
  margin: 0 0 16px;
  text-align: center;
  font-size: 0.92rem;
  line-height: 1.5;
}

.smart-face-post-actions .primary-button,
.smart-face-post-actions .secondary-button {
  width: 100%;
}

body.smart-palm-open {
  overflow: hidden;
}

.smart-palm-modal {
  z-index: 2200;
}

.smart-palm-pre-start {
  margin: 0 0 12px;
  padding: 12px 12px 14px;
  border-radius: 14px;
  background: rgba(255, 227, 151, 0.08);
  border: 1px solid rgba(255, 215, 109, 0.28);
}

.smart-palm-pre-start-lead {
  margin: 0 0 10px;
  font-size: 0.88rem;
  line-height: 1.55;
}

.smart-palm-continue-camera {
  width: 100%;
  margin-top: 4px;
}

.smart-palm-upload-entry {
  width: 100%;
  margin-top: 8px;
}

.smart-palm-upload-flow {
  margin: 0 0 12px;
  padding: 12px 12px 14px;
  border-radius: 14px;
  background: rgba(120, 200, 255, 0.06);
  border: 1px solid rgba(120, 200, 255, 0.22);
}

.smart-palm-upload-instruction {
  margin: 0 0 10px;
  font-size: 0.88rem;
  line-height: 1.55;
}

.smart-face-upload-flow {
  margin: 0 0 12px;
  padding: 12px 12px 14px;
  border-radius: 14px;
  background: rgba(120, 200, 255, 0.06);
  border: 1px solid rgba(120, 200, 255, 0.22);
}

.smart-face-upload-instruction {
  margin: 0 0 10px;
  font-size: 0.88rem;
  line-height: 1.55;
}

.smart-face-upload-preview-wrap {
  margin: 0 0 10px;
  text-align: center;
}

.smart-face-upload-preview {
  max-width: 100%;
  max-height: min(38vh, 220px);
  border-radius: 12px;
  border: 1px solid rgba(255, 215, 109, 0.28);
  object-fit: contain;
}

.smart-face-upload-validate {
  margin: 0 0 10px;
  min-height: 1.35em;
  font-size: 0.86rem;
  line-height: 1.45;
  color: rgba(255, 200, 160, 0.95);
}

.smart-face-upload-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* File input must not use display:none — many browsers block the picker. Overlay sibling input on label. */
.smart-face-pick-file-wrap {
  position: relative;
  display: block;
  width: 100%;
}

.smart-face-pick-file-label {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  margin: 0;
  cursor: pointer;
  text-align: center;
  width: 100%;
}

.smart-face-pick-file-wrap .smart-face-file-input-native {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  /* Slightly non-zero opacity: some WebKit builds are stingy about change/events on fully invisible inputs. */
  opacity: 0.02;
  cursor: pointer;
  font-size: 16px;
}

.smart-face-upload-actions .primary-button,
.smart-face-upload-actions .secondary-button {
  width: 100%;
}

.smart-face-upload-back {
  width: 100%;
  margin-top: 10px;
}

.smart-palm-live-zone.hidden,
.smart-face-live-zone.hidden {
  display: none;
}

.smart-palm-dominant-live-summary {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(67, 160, 71, 0.12);
  border: 1px solid rgba(129, 199, 132, 0.35);
  font-size: 0.86rem;
  line-height: 1.5;
}

.smart-palm-dominant-row {
  margin: 0 0 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.smart-palm-dominant-select {
  width: 100%;
  max-width: 100%;
}

.smart-palm-dominant-select:disabled {
  opacity: 1;
  color: inherit;
  border-color: rgba(255, 227, 151, 0.35);
}

.smart-palm-subtitle {
  margin: 0 0 12px;
  font-size: 0.86rem;
  line-height: 1.5;
}

.smart-palm-frame {
  border-radius: 18px;
  padding: 4px;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
  border: 4px solid #e53935;
  background: rgba(0, 0, 0, 0.35);
}

.smart-palm-frame--bad {
  border-color: #e53935;
}

.smart-palm-frame--good {
  border-color: #43a047;
}

.smart-palm-frame--dark {
  border-color: #c62828;
  box-shadow: 0 0 0 2px rgba(198, 40, 40, 0.45);
}

.smart-palm-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  max-height: min(58vh, 360px);
  margin: 0 auto;
  border-radius: 14px;
  overflow: hidden;
  background: #0a0514;
}

.smart-palm-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.smart-palm-phase-banner {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  margin: 0;
  padding: 12px 10px 10px;
  font-size: 0.78rem;
  line-height: 1.4;
  text-align: center;
  font-weight: 600;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85);
  background: linear-gradient(to top, rgba(0, 0, 0, 0.78) 0%, rgba(0, 0, 0, 0.35) 55%, transparent 100%);
  pointer-events: none;
}

.smart-palm-silhouette {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 1;
}

.smart-palm-guide-img {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transform: scale(1.06);
  transform-origin: center bottom;
  /* PNG is transparent except white line art; subtle edge for dark/light video */
  filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.85)) drop-shadow(0 0 1px rgba(255, 255, 255, 0.4));
}

/* Must beat `.smart-palm-guide-img { display: block }` (same specificity as `.hidden`, but later in file). */
.smart-palm-silhouette .smart-palm-guide-img.hidden {
  display: none !important;
}

/* Step 2: JS also sets inline !important; these ID rules are a fallback if stylesheets win. */
#smart-palm-stage[data-palm-step="1"] #smart-palm-guide-left-img {
  display: block !important;
}
#smart-palm-stage[data-palm-step="1"] #smart-palm-guide-right-img {
  display: none !important;
}
#smart-palm-stage[data-palm-step="2"] #smart-palm-guide-left-img {
  display: none !important;
}
#smart-palm-stage[data-palm-step="2"] #smart-palm-guide-right-img {
  display: block !important;
}

.smart-palm-light-hint {
  margin: 8px 0 0;
  text-align: center;
  font-weight: 800;
  color: #ff8a80;
  font-size: 0.95rem;
}

.daily-purchase-lead {
  margin: 0 0 12px;
  line-height: 1.55;
}

.daily-purchase-gate .daily-purchase-actions {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  gap: var(--app-stack-gap);
  margin-top: 0;
}

.daily-purchase-gate .daily-purchase-actions .primary-button {
  width: 100%;
}

/* —— Charms / CJ storefront —— */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.inline-text-link {
  color: #e8d4ff;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.inline-text-link:hover {
  color: #fff;
}

.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 232, 173, 0.22);
  background: rgba(255, 255, 255, 0.06);
  color: #f5ecff;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
}

.ghost-button:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
}

.ghost-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.cj-store-card .small-copy {
  font-size: 0.88rem;
}

.cj-store-status {
  margin-top: 8px;
}

.cj-auth-hint {
  margin-top: 6px;
}

.cj-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
  margin: 18px 0 14px;
}

.cj-search-label {
  flex: 1 1 200px;
  min-width: 0;
}

.cj-search-input {
  width: 100%;
}

.cj-toolbar-button {
  flex: 0 0 auto;
}

.cj-toolbar-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: rgba(255, 245, 220, 0.75);
}

.cj-page-label {
  min-width: 72px;
  text-align: center;
}

.cj-banner {
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 0.9rem;
  margin-bottom: 24px;
}

.cj-banner--error {
  background: rgba(180, 40, 60, 0.22);
  border: 1px solid rgba(255, 120, 140, 0.35);
  color: #ffc9d2;
}

.cj-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: var(--app-stack-gap);
  margin-bottom: 56px;
}

.cj-product-card {
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(12, 6, 24, 0.55);
  border: 1px solid rgba(255, 232, 173, 0.14);
}

.cj-product-image-wrap {
  aspect-ratio: 1;
  background: #0a0514;
}

.cj-product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cj-product-body {
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.cj-product-title {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.3;
  color: #fff8ec;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cj-product-price {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 800;
  color: #ffcd4d;
}

.cj-add-button {
  width: 100%;
  margin-top: auto;
}

.cj-cart-section,
.cj-checkout-section {
  margin-top: 56px;
  padding-top: 44px;
  border-top: 1px solid rgba(255, 232, 173, 0.12);
}

.cj-subheading {
  margin: 0 0 10px;
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff4dc;
}

.cj-cart-lines {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cj-cart-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 232, 173, 0.1);
}

.cj-cart-line-title {
  flex: 1 1 140px;
  font-weight: 600;
  font-size: 0.9rem;
}

.cj-cart-line-qty {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.cj-qty-btn {
  min-width: 36px;
  min-height: 32px;
  padding: 0 8px;
}

.cj-qty-value {
  min-width: 22px;
  text-align: center;
  font-weight: 700;
}

.cj-remove-btn {
  margin-left: auto;
}

.cj-quote-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  margin-bottom: 12px;
}

.cj-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(255, 245, 220, 0.82);
}

.cj-field--grow {
  flex: 1 1 160px;
}

.cj-logistics-fieldset {
  margin: 0 0 var(--app-section-gap);
  padding: 0;
  border: none;
}

.cj-logistics-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cj-logistics-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  cursor: pointer;
  border: 1px solid rgba(255, 232, 173, 0.12);
  background: rgba(0, 0, 0, 0.2);
}

.cj-logistics-row:has(input:checked) {
  border-color: rgba(255, 205, 77, 0.45);
  background: rgba(255, 205, 77, 0.08);
}

.cj-logistics-row-text {
  font-size: 0.88rem;
  line-height: 1.4;
  color: #f7f0ff;
}

.cj-checkout-form .cj-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 520px) {
  .cj-checkout-form .cj-form-row {
    grid-template-columns: 1fr;
  }
}

.cj-pay-button {
  margin-top: 8px;
  width: 100%;
  max-width: 320px;
}

/* —— Full shop (products.html) —— */
.store-app .store-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  gap: 40px;
  align-items: start;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px 40px;
  box-sizing: border-box;
}

@media (max-width: 900px) {
  .store-app .store-layout {
    grid-template-columns: 1fr;
  }
}

/* Shop page: catalog only (no cart column) */
.store-app .store-layout.store-layout--catalog-only {
  grid-template-columns: minmax(0, 1fr);
  max-width: 1100px;
}

.store-intro-card {
  margin-bottom: 0;
}

.store-section {
  margin-top: 36px;
}

.store-transaction-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-top: var(--app-stack-gap);
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 232, 173, 0.14);
}

.store-transaction-link {
  font-weight: 800;
  font-size: 0.88rem;
  color: #ffe8a8;
  text-decoration: none;
}

.store-transaction-link:hover {
  text-decoration: underline;
  color: #fff;
}

.store-transaction-sep {
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.85rem;
}

.store-featured-grid {
  margin-top: 12px;
}

/* Hand-picked products (HTML in products.html) */
.store-handpicked-grid {
  display: flex;
  flex-direction: column;
  gap: 40px;
  margin-top: 24px;
}

.store-listing-card {
  display: grid;
  grid-template-columns: minmax(0, 200px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--line-color);
  background: #faf8fc;
}

@media (max-width: 560px) {
  .store-listing-card {
    grid-template-columns: 1fr;
  }
}

.store-listing-media {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #0a0514;
  aspect-ratio: 1;
  max-width: 220px;
}

.store-listing-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.store-listing-img-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8px;
  font-size: 0.85rem;
}

.store-listing-title {
  margin: 0 0 8px;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
}

.store-listing-desc {
  margin: 0 0 10px;
}

.store-listing-price {
  margin: 0 0 10px;
  font-size: 1.1rem;
  font-weight: 800;
  color: #6b3fa0;
}

.store-listing .store-add-btn {
  width: auto;
  min-width: 140px;
}

.cj-product-card--featured {
  border: 1px solid rgba(255, 205, 77, 0.45);
  box-shadow: 0 0 0 1px rgba(255, 205, 77, 0.12), 0 12px 28px rgba(0, 0, 0, 0.35);
}

.cj-product-meta {
  margin: 0 0 4px;
  font-size: 0.78rem;
  line-height: 1.35;
}

.store-card-checkout-link {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #e8d4ff;
  text-decoration: none;
}

.store-card-checkout-link:hover {
  color: #fff;
  text-decoration: underline;
}

.store-aside {
  position: relative;
}

@media (min-width: 901px) {
  .store-aside-card {
    position: sticky;
    top: 12px;
  }
}

.store-aside-section + .store-aside-section {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 232, 173, 0.12);
}

.store-pay-btn {
  max-width: none;
  width: 100%;
}

.small-copy {
  font-size: 0.86rem;
  line-height: 1.45;
}

/* Shop page: full width (app-shell defaults to 430px for the slot home layout) */
.app-shell.store-app {
  width: 100%;
  max-width: 1200px;
}

/* White legal-card + CJ “dark theme” tokens = invisible text. Force readable contrast. */
.store-app .legal-card .section-heading h1,
.store-app .legal-card .section-heading h2 {
  color: var(--text-main);
}

.store-app .legal-card .section-heading p,
.store-app .legal-card .muted-copy {
  color: var(--text-muted);
}

.store-app .legal-card .cj-subheading {
  color: #1a0d24;
}

.store-app .legal-card .cj-field {
  color: #3a3540;
}

.store-app .legal-card .cj-cart-line {
  background: #f3f1f6;
  border-color: var(--line-color);
}

.store-app .legal-card .cj-cart-line-title {
  color: var(--text-main);
}

.store-app .legal-card .cj-qty-value {
  color: var(--text-main);
}

.store-app .legal-card .cj-logistics-row-text {
  color: #242028;
}

.store-app .legal-card .cj-logistics-row {
  background: #f0eef3;
  border-color: var(--line-color);
}

.store-app .legal-card .cj-logistics-row:has(input:checked) {
  border-color: rgba(140, 71, 243, 0.55);
  background: #f3edfc;
}

.store-app .legal-card .cj-cart-section,
.store-app .legal-card .cj-checkout-section,
.store-app .legal-card .store-aside-section + .store-aside-section {
  border-top-color: var(--line-color);
}

.store-app .legal-card .inline-text-link {
  color: #5c2d96;
  font-weight: 700;
}

.store-app .legal-card .inline-text-link:hover {
  color: #3a1d62;
}

.store-app .legal-card .ghost-button {
  border-color: rgba(0, 0, 0, 0.18);
  background: rgba(0, 0, 0, 0.04);
  color: #2a2430;
}

.store-app .legal-card .ghost-button:hover:not(:disabled) {
  background: rgba(0, 0, 0, 0.08);
}

.store-app .legal-card .store-transaction-nav {
  background: #f0eef3;
  border-color: var(--line-color);
}

.store-app .legal-card .store-transaction-link {
  color: #5c2d96;
}

.store-app .legal-card .store-transaction-link:hover {
  color: #3a1d62;
}

.store-app .legal-card .store-transaction-sep {
  color: rgba(0, 0, 0, 0.35);
}

.store-app .legal-card .cj-banner--error {
  color: #6b1a24;
  background: rgba(180, 40, 60, 0.1);
  border-color: rgba(180, 40, 60, 0.35);
}

/* Shop admin — desktop / laptop first (full width; never use the shop’s 2-col cart grid) */
.adminshop-page {
  font-family: "Segoe UI", system-ui, -apple-system, "Inter", sans-serif;
}

/* Widen shell — base .app-shell is phone-sized (430px); admin needs a real monitor width */
body.adminshop-page .app-shell.store-app {
  width: 100%;
  max-width: min(1680px, 98vw);
  padding-left: clamp(1rem, 3vw, 2.5rem);
  padding-right: clamp(1rem, 3vw, 2.5rem);
  box-sizing: border-box;
}

/* Override .store-app .store-layout two-column grid so cards stack full width (banner + editor were sharing a row with a fake “sidebar”) */
.store-app .adminshop-shell.store-layout {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 1.25rem;
  width: 100%;
  max-width: none;
  margin-left: auto;
  margin-right: auto;
  padding: 0 0 2.5rem;
  box-sizing: border-box;
}

@media (max-width: 900px) {
  .store-app .adminshop-shell.store-layout {
    /* Keep single column even when generic .store-layout stacks at 900px */
    display: flex;
  }
}

.adminshop-card--login {
  max-width: 26rem;
  margin-left: 0;
  margin-right: auto;
}

.adminshop-login-form .adminshop-input {
  font-size: 1rem;
  padding: 0.55rem 0.65rem;
}

.adminshop-card--editor {
  width: 100%;
  min-width: 0;
}

.adminshop-editor-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--line-color);
}

.adminshop-editor-title {
  margin-bottom: 0.25rem;
}

.adminshop-editor-hint {
  margin: 0 0 1rem;
  line-height: 1.5;
}

.adminshop-rows {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.adminshop-row.legal-card {
  display: grid;
  grid-template-columns: 152px minmax(360px, 1.2fr) minmax(280px, 1fr);
  gap: 1.5rem 2rem;
  align-items: start;
  padding: 1.5rem 2rem;
  margin-bottom: 1rem;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
}

.adminshop-row-col--thumb {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.adminshop-row-col .stack-form {
  gap: 0.75rem;
}

.adminshop-row-file-actions {
  margin-top: 0.25rem;
}

.adminshop-thumb-wrap {
  width: 136px;
  height: 136px;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.adminshop-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.adminshop-input,
.adminshop-page .text-control {
  font-size: 1rem;
  line-height: 1.45;
}

.adminshop-desc {
  min-height: 8rem;
  resize: vertical;
  font-family: inherit;
  line-height: 1.5;
}

.adminshop-file {
  font-size: 0.9rem;
  padding: 0.35rem 0;
}

.adminshop-add-more-wrap {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line-color);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
}

.adminshop-btn-add-more:not(:disabled) {
  font-weight: 600;
}

.adminshop-add-more-hint {
  max-width: 40rem;
  margin: 0;
}

.adminshop-save-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line-color);
}

.adminshop-btn-save {
  min-width: 10rem;
  padding: 0.65rem 1.25rem;
  font-size: 1rem;
}

/* Stack each product row only on narrow windows — not laptop/split-screen widths */
@media (max-width: 720px) {
  .adminshop-row.legal-card {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 1.25rem 1.25rem;
  }

  .adminshop-row-col--thumb {
    flex-direction: row;
    align-items: center;
    gap: 1rem;
  }

  .adminshop-row-col--thumb .adminshop-thumb-wrap {
    width: 96px;
    height: 96px;
  }
}

.store-listing--lazada .store-lazada-link--disabled {
  pointer-events: none;
  opacity: 0.55;
  cursor: not-allowed;
}

.store-catalog-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-top: 0.75rem;
}

.store-catalog-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.store-catalog-table--mobile {
  table-layout: fixed;
}

.store-catalog-table th,
.store-catalog-table td {
  border: 1px solid var(--line-color);
  padding: 0.65rem 0.75rem;
  vertical-align: top;
  text-align: left;
}

.store-catalog-table thead th {
  background: rgba(0, 0, 0, 0.04);
  font-weight: 600;
}

.store-catalog-th-num,
.store-catalog-td-num {
  width: 2.25rem;
  text-align: center;
  white-space: nowrap;
  padding-left: 0.4rem;
  padding-right: 0.4rem;
}

.store-catalog-th-media,
.store-catalog-td-media {
  width: 38%;
  max-width: 11rem;
  min-width: 6.5rem;
}

.store-catalog-td-product {
  max-width: none;
  min-width: 0;
  width: auto;
}

.store-catalog-media-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
}

.store-catalog-url-below-photo {
  width: 100%;
  max-width: 10.5rem;
  word-break: break-all;
  font-size: 0.85rem;
  line-height: 1.35;
}

.store-catalog-price-under-url {
  width: 100%;
  max-width: 10.5rem;
  font-size: 0.95rem;
  line-height: 1.4;
}

.store-catalog-price-under-url--set {
  font-weight: 700;
  font-size: 1rem;
  color: #1a1520;
}

.store-catalog-price-under-url--empty {
  font-weight: 400;
  font-size: 0.9rem;
  color: rgba(0, 0, 0, 0.35);
}

.store-catalog-table--mobile .store-catalog-thumb {
  width: 100%;
  max-width: 7.5rem;
  height: auto;
  aspect-ratio: 1;
}

.store-catalog-table--mobile .store-catalog-photo-placeholder {
  width: 100%;
  max-width: 7.5rem;
  aspect-ratio: 1;
  height: auto;
  min-height: 5rem;
}

@media (max-width: 520px) {
  .store-catalog-table--mobile {
    font-size: 0.88rem;
  }

  .store-catalog-table--mobile th,
  .store-catalog-table--mobile td {
    padding: 0.5rem 0.45rem;
  }

  .store-catalog-product-title {
    font-size: 0.95rem;
  }
}

.store-catalog-product-title {
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.35;
  margin: 0;
  color: #1a1520;
}

.store-app .legal-card .store-catalog-product-title .store-catalog-empty {
  font-weight: 400;
}

.store-catalog-desc-text {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.45;
}

.store-catalog-desc-text.store-catalog-desc-below-title {
  margin-top: 0.4rem;
}

.store-catalog-empty {
  color: rgba(0, 0, 0, 0.35);
}

.store-catalog-thumb {
  display: block;
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.06);
}

.store-catalog-photo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 96px;
  height: 96px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.06);
  font-size: 0.8rem;
  text-align: center;
  padding: 0.25rem;
}

.store-catalog-url-link {
  word-break: break-all;
}

.adminshop-row-head {
  margin-bottom: 0.5rem;
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.5);
}
