/* ==========================================================================
   Soulmate Portrait (tarot & astrology): birth form, arcana of the day, shuffle stage,
   tarot spread and birth-chart file
   ========================================================================== */
:root {
  --paper: #fffafb;
  --cream: #fff7f9;
  --cream-mid: #fcecf2;
  --cream-deep: #f8dfe8;
  --line: #f0d5df;
  --gold: #d7a2b6;
  --gold-soft: #f9e8ef;
  --vermilion: #ad174f;
  --vermilion-dark: #7e0d38;
  --vermilion-soft: #fff0f5;
  --sm-ink: #252232;
  --sm-muted: #7c7280;
  --sm-blue: #59697b;
}
body { background: #fffafb; color: var(--sm-ink); }
.nav { background: rgba(253,239,242,.88); }

/* Top banner uses the shared .subhero from style.css (same wings-and-heart backdrop as the Future Baby page); base tones match the baby page's face.css creams */
.sm-hero { --cream: #fefafb; --cream-deep: #f9e2ea; }
.sm-hero .wrap { position: relative; z-index: 1; }
.sm-hero h1 { margin-top: 0; }
.sm-hero p { max-width: 760px; }

/* Left form / right reveal panel: same ratio as .fxw-grid on the baby / face pages (1.25 : 1, 16px gap), so the right column is the same width across pages */
.sm-main { position: relative; padding-top: 34px; padding-bottom: 70px; }
/* Page-refresh loader: matches the Future Baby page mask, spinner and fade timing. */
.sm-main::before {
  content: ''; position: absolute; inset: 0; z-index: 50;
  background: rgba(251, 246, 238, .82);
  transition: opacity .4s ease, visibility 0s linear .4s;
  animation: qmLoadSafety 0s linear 6s forwards;
}
.sm-main::after {
  content: ''; position: absolute; z-index: 51;
  top: clamp(72px, 20vh, 240px); left: 50%; margin-left: -22px;
  width: 44px; height: 44px; border-radius: 50%;
  border: 4px solid var(--gold-soft); border-top-color: var(--vermilion);
  animation: qmSpin .7s linear infinite, qmLoadSafety 0s linear 6s forwards;
  transition: opacity .4s ease, visibility 0s linear .4s;
}
html.qm-loaded .sm-main::before,
html.qm-loaded .sm-main::after { opacity: 0; visibility: hidden; pointer-events: none; animation: none; }
@media (prefers-reduced-motion: reduce) {
  .sm-main::after { animation: qmLoadSafety 0s linear 6s forwards; }
}
.sm-shell {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: stretch; gap: 16px;
}
.sm-form, .sm-preview, .sm-faq {
  border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255,255,255,.72); box-shadow: 0 16px 40px rgba(102,35,63,.06);
}
.sm-form { display: flex; flex-direction: column; overflow: hidden; }
.sm-form-head { padding: 22px 18px 17px; border-bottom: 1px solid var(--line); background: rgba(255,250,252,.92); }
.sm-form-head h2 { margin: 7px 0 5px; font-family: var(--serif); font-size: clamp(20px, 2.3vw, 27px); line-height: 1.25; }
.sm-form-head h2 em { color: var(--vermilion); font-style: normal; }
.sm-form-head p { margin: 0; color: var(--sm-muted); font-size: 13px; }

/* Options area scrolls internally when it grows too tall; scrollbar matches .fxw-screen on the baby / face pages */
.sm-scroll, .sm-preview-screen { overflow-x: hidden; overflow-y: auto; scrollbar-gutter: stable; scrollbar-width: thin; scrollbar-color: var(--gold-soft) transparent; }
/* Reserve the gutter on both sides of the right panel so content is truly centred */
.sm-preview-screen { scrollbar-gutter: stable both-edges; }
.sm-scroll::-webkit-scrollbar, .sm-preview-screen::-webkit-scrollbar { width: 8px; }
.sm-scroll::-webkit-scrollbar-track, .sm-preview-screen::-webkit-scrollbar-track { border-radius: 99px; background: transparent; }
.sm-scroll::-webkit-scrollbar-thumb, .sm-preview-screen::-webkit-scrollbar-thumb { border: 2px solid transparent; border-radius: 99px; background: rgba(192,57,43,.28); background-clip: content-box; }
.sm-scroll:hover::-webkit-scrollbar-thumb, .sm-preview-screen:hover::-webkit-scrollbar-thumb { background: rgba(192,57,43,.45); background-clip: content-box; }
.sm-scroll { max-height: 660px; }

/* Arcana of the day box */
.sm-arcana {
  display: grid; grid-template-columns: 78px 1fr; gap: 14px; align-items: start;
  margin: 15px 18px 4px; padding: 14px; border: 1px solid #ecccd8; border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #fff6f9 0%, #fbe7ef 100%);
}
.sm-arcana-card { border-radius: 4px; overflow: hidden; box-shadow: 0 6px 16px rgba(80,30,50,.2); }
.sm-arcana-card img { display: block; width: 78px; height: 136px; object-fit: cover; }
.sm-arcana-body { min-width: 0; }
.sm-arcana-kicker { display: block; color: #b74270; font-size: 9px; font-weight: 800; letter-spacing: 1.4px; }
.sm-arcana-name { display: block; margin: 3px 0 3px; font-family: var(--serif); font-size: 19px; color: #3d2530; }
.sm-arcana-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.sm-arcana-tags span {
  display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px; border: 1px solid rgba(173,23,79,.18);
  border-radius: 3px; background: rgba(255,255,255,.7); color: #8b3a5c; font-size: 10.5px; font-weight: 600;
}
.sm-arcana-tags em { font-style: normal; font-size: 11px; }
.sm-arcana-note {
  width: 100%; box-sizing: border-box; margin-top: 10px; padding: 8px 10px; resize: vertical; min-height: 46px;
  border: 1px solid #e4cdd7; border-radius: 3px; background: #fff; color: #2c2733; font-family: inherit; font-size: 16px; line-height: 1.5;
}
.sm-arcana-note:focus { outline: 0; border-color: var(--vermilion); box-shadow: 0 0 0 3px rgba(173,23,79,.1); }
.sm-arcana-note::placeholder { color: #b6abb2; }

.sm-question { margin: 0; padding: 15px 18px 16px; border: 0; border-bottom: 1px solid var(--line); min-width: 0; }
.sm-question > legend + * { clear: both; }
.sm-question:first-of-type { border-top: 1px solid var(--line); }
.sm-question legend { float: left; display: flex; align-items: baseline; gap: 7px; width: 100%; margin: 0 0 4px; padding: 0; color: #24202e; font-size: 13px; font-weight: 800; line-height: 1.5; }
.sm-question legend b { color: var(--vermilion); font-size: 11px; letter-spacing: .5px; }
.sm-question legend i { margin-left: -4px; color: var(--vermilion); font-style: normal; font-size: 10.5px; font-weight: 700; }
.sm-question legend i.sm-q-limit { margin-left: auto; }
.sm-question.is-missing { background: #fff4f7; box-shadow: inset 3px 0 0 var(--vermilion); transition: background .2s; }
.sm-question.is-missing legend span { color: var(--vermilion); }
.sm-options { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.sm-opt-row { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 22px; margin-top: 14px; }
.sm-opt-row > .sm-options { margin-top: 0; }
.sm-option {
  padding: 7px 12px; border: 1px solid #ead6de; border-radius: 3px; background: #fff;
  color: #6b616d; font-family: inherit; font-size: 12.5px; line-height: 1.2; cursor: pointer;
  transition: border-color .18s, background .18s, color .18s, transform .18s;
}
.sm-option:hover { transform: translateY(-1px); }
.sm-option.active { border-color: var(--vermilion); background: var(--vermilion-soft); color: var(--vermilion); font-weight: 700; }
.sm-option:disabled { opacity: .42; cursor: not-allowed; }
.sm-check { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; color: #6b616d; font-size: 12px; cursor: pointer; }
.sm-check input { width: 14px; height: 14px; margin: 0; accent-color: var(--vermilion); cursor: pointer; }
.sm-check + .sm-question-note { margin-top: 6px; }
.sm-question-note { margin: 10px 0 0; color: #978b94; font-size: 11px; line-height: 1.65; }

/* Birth info inputs */
.sm-field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 200px)); gap: 10px; margin-top: 11px; }
.sm-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.sm-field > span { color: #4d4651; font-size: 11.5px; font-weight: 700; }
.sm-field input {
  width: 100%; box-sizing: border-box; padding: 9px 10px; border: 1px solid #e4cdd7; border-radius: 3px;
  background: #fff; color: #2c2733; font-family: inherit; font-size: 13px;
  transition: border-color .18s, box-shadow .18s;
}
.sm-field input:focus { outline: 0; border-color: var(--vermilion); box-shadow: 0 0 0 3px rgba(173,23,79,.1); }
.sm-field input::placeholder { color: #b6abb2; }
.sm-field input:disabled { background: #f7f1f4; color: #b6abb2; cursor: not-allowed; }

/* Birth date & time trigger: looks like an input, opens the five-column picker from birth-picker.js */
.sm-when {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; box-sizing: border-box;
  padding: 9px 10px; border: 1px solid #e4cdd7; border-radius: 3px; background: #fff; color: #b6abb2;
  font-family: inherit; font-size: 13px; line-height: 1.25; text-align: left; cursor: pointer;
  transition: border-color .18s, box-shadow .18s;
}
.sm-when::after { content: ''; flex: none; width: 6px; height: 6px; margin: -3px 2px 0 0; border: solid #b99aa8; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
.sm-when-val { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sm-when.filled { color: #2c2733; }
.sm-when:focus-visible, .sm-when.on { outline: 0; border-color: var(--vermilion); box-shadow: 0 0 0 3px rgba(173,23,79,.1); }

/* Birth date & time popup (ported from QimingBaodian ceming.css) */
.qm-mask { position: fixed; inset: 0; z-index: 998; background: rgba(32,29,43,.34); }
.qm-panel { position: fixed; z-index: 999; overflow: hidden; border: 1px solid var(--line); border-radius: 6px;
  background: var(--paper); box-shadow: 0 18px 48px rgba(90,30,55,.22); }
.qm-pick { width: 470px; max-width: calc(100vw - 24px); }
.qm-pick-date { width: 300px; }
.qm-head { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; padding: 11px 14px; border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, var(--cream), var(--paper)); }
.qm-cur { flex: 1 1 auto; color: var(--sm-ink); font-size: 13px; font-weight: 700; }
.qm-ok { margin-left: auto; padding: 6px 18px; border: 0; border-radius: 5px; background: var(--vermilion); color: #fff;
  font-family: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.qm-ok:hover { background: var(--vermilion-dark); }
.qm-cols { display: grid; grid-template-columns: repeat(5, 1fr); }
.qm-pick-date .qm-cols { grid-template-columns: repeat(3, 1fr); }
.qm-col { min-width: 0; }
.qm-col + .qm-col { border-left: 1px solid var(--line); }
.qm-col-t { padding: 6px 0; background: var(--cream); color: var(--sm-muted); font-size: 11.5px; text-align: center; }
.qm-col-list { position: relative; height: 212px; overflow-y: auto; }
.qm-col-i { padding: 6px 2px; color: #4d4651; font-size: 13px; text-align: center; cursor: pointer; }
.qm-col-i:hover { background: var(--cream); }
.qm-col-i.on { background: var(--vermilion); color: #fff; font-weight: 700; }

/* Right file panel: same pattern as .fxw-outcol / .fxw-out on the baby / face pages.
   The outer .sm-outcol is stretched to the row height and acts as the positioning box; the panel is pinned to all four edges,
   so it never takes part in the grid row height - the form alone sets it, and a long result only scrolls inside .sm-preview-screen */
.sm-outcol { position: relative; min-height: 520px; }
.sm-preview { position: absolute; inset: 0; display: flex; flex-direction: column; overflow: hidden; padding: 14px; }
.sm-preview-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.sm-preview-head b { margin: 0; color: var(--vermilion); font-family: var(--serif); font-size: 19px; font-weight: 700; }
.sm-preview-head i { margin-left: auto; padding: 3px 7px; border-radius: 3px; background: #f5eff2; color: #9a8d95; font-size: 9.5px; font-style: normal; }
.sm-preview-screen {
  flex: 1; min-height: 0; overflow-x: hidden; overflow-y: auto; padding: 12px;
  display: flex; flex-direction: column;
  border: 0; border-radius: var(--radius-sm);
  background: linear-gradient(155deg, #fffafd 0%, #f9e7ee 58%, #eee7ef 100%);
  box-shadow: inset 0 0 0 1px var(--line);
}
.sm-state { flex: 1 0 auto; padding: 12px 8px; box-sizing: border-box; }
.sm-loading[hidden], .sm-result[hidden], .sm-idle[hidden] { display: none; }

/* Idle: shuffle stage (oraseer-style) */
.sm-idle {
  position: relative; isolation: isolate;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding-bottom: 60px; text-align: center;
}
/* Match the baby page: a 40%-opacity image centred and covering the entire inner output frame. */
.sm-idle::before,
.sm-idle::after { content: ""; position: absolute; inset: -12px -21px; pointer-events: none; }
.sm-idle::before { z-index: 0; background: var(--paper); }
.sm-idle::after {
  z-index: 1;
  background: url('../img/soulmate.webp?v=20260929l') center / cover no-repeat;
  filter: brightness(.5);
  opacity: .4;
}
.sm-idle > * { position: relative; z-index: 2; }
.sm-stage-head { margin-bottom: 6px; }
.sm-stage-head b { display: block; font-family: var(--serif); font-size: 21px; color: #3d2530; }
.sm-stage-head p { max-width: 320px; margin: 8px auto 0; color: #40343b; font-size: 12px; font-weight: 600; line-height: 1.7; }

/* Horizontal card row: 21 equal columns + one card-wide column, so the row's edges line up with the Reveal button */
.sm-deck-fan {
  --dc-w: 46px;
  display: grid; grid-template-columns: repeat(21, minmax(0, 1fr)) var(--dc-w); align-items: end;
  width: 100%; padding: 34px 0 12px; min-height: 140px;
}
.sm-deck-fan .sm-dc {
  position: relative; width: var(--dc-w); aspect-ratio: 300 / 522;
  border-radius: 3px; border: 1px solid rgba(120,72,40,.45);
  background: url("/major-arcana/tarot.webp") center / cover no-repeat;
  box-shadow: -3px 6px 12px rgba(60,28,44,.22); transform-origin: 50% 100%;
  transition: transform .25s ease, margin .25s ease; cursor: pointer;
}
/* Hover lift only on mouse devices (a tap leaves :hover stuck on phones and looks like an extra draw); no lift once the spread is full */
@media (hover: hover) { .sm-deck-fan:not(.is-full) .sm-dc:not(.is-drawn):hover { transform: translateY(-8px); } }
.sm-deck-fan .sm-dc.is-drawn { transform: translateY(-16px); }
.sm-deck-fan.is-shuffling .sm-dc { animation: smRiffle .66s ease both; }
@keyframes smRiffle {
  0% { transform: translate(0,0) rotate(0); }
  30% { transform: translate(var(--sx,0), var(--sy,-16px)) rotate(var(--sr,0deg)); }
  62% { transform: translate(calc(var(--sx,0) * -0.45), 7px) rotate(calc(var(--sr,0deg) * -0.5)); }
  100% { transform: translate(0,0) rotate(0); }
}

/* Shuffle / refresh buttons */
.sm-deck-tools { display: flex; justify-content: center; gap: 10px; margin-top: 4px; }
.sm-tool {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border: 0; border-radius: 3px;
  color: #fff; font-family: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer;
  transition: transform .18s, box-shadow .18s, filter .18s;
}
.sm-tool i { font-style: normal; font-size: 14px; }
.sm-tool-refresh { background: #4a7bd6; box-shadow: 0 6px 15px rgba(52,96,178,.28); }
.sm-tool-shuffle { background: #9b46c9; box-shadow: 0 6px 15px rgba(123,44,168,.28); }
.sm-tool:hover { transform: translateY(-1px); filter: brightness(1.05); }
.sm-tool:active { transform: translateY(0); }

/* Card count selector */
.sm-count-row { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px 12px; margin-top: 18px; }
.sm-count-label { color: #3f3038; font-size: 12px; font-weight: 800; }
.sm-count { display: inline-flex; gap: 6px; }
.sm-count-btn {
  padding: 7px 14px; border: 1px solid #e0c4d0; border-radius: 3px; background: #f5eef1;
  color: #8a7c84; font-family: inherit; font-size: 12px; font-weight: 700; cursor: pointer; transition: all .18s;
}
.sm-count-btn.active { border-color: var(--vermilion); background: var(--vermilion); color: #fff; }

.sm-start {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 48px; margin-top: 20px;
  border: 0; border-radius: 3px; background: linear-gradient(135deg, #b31653, #7e0d38); color: #fff;
  font-family: inherit; font-size: 15px; font-weight: 800; letter-spacing: .3px; cursor: pointer;
  box-shadow: 0 9px 22px rgba(135,17,62,.24); transition: transform .2s, box-shadow .2s;
}
.sm-start:hover { transform: translateY(-1px); box-shadow: 0 12px 27px rgba(135,17,62,.3); }
.sm-start i { font-size: 19px; font-style: normal; }
.sm-idle-note { margin: 12px 0 0; color: #a83262; font-size: 11.5px; font-weight: 700; line-height: 1.65; }

/* Loading: reuses .ai-loading / .ai-step / .ai-bar / .ai-hint from style.css (the same progress bar as the baby / face pages) */
.sm-loading { display: flex; flex-direction: column; justify-content: center; }
.sm-loading .ai-loading { padding: 64px 6px; }
/* This page's background is pink, so the track and fill go one shade deeper to keep the progress visible; the percentage sits below */
.sm-loading .ai-bar { background: #f0cfdb; }
.sm-loading .ai-bar > i { background: linear-gradient(90deg, #d0668f, var(--vermilion)); }
.sm-pct { margin-top: 10px; color: var(--vermilion); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }

/* Result */
.sm-result { padding: 4px 2px; }
.sm-result-portrait { position: relative; display: grid; place-items: center; height: 200px; overflow: hidden; border: 1px solid rgba(176,91,123,.18); border-radius: var(--radius-sm); background: radial-gradient(circle at 50% 30%, #fff 0%, #f4dfe8 44%, #d9c7d1 100%); }
.sm-result-portrait img { width: 100%; height: 100%; object-fit: cover; }
.sm-result-portrait .sm-person { position: relative; width: 126px; height: 150px; filter: blur(2.5px); opacity: .74; }
.sm-result-portrait .sm-person i { position: absolute; top: 14px; left: 38px; width: 50px; height: 62px; border-radius: 48% 48% 44% 44%; background: linear-gradient(145deg, #8d7885, #c1a8b3); }
.sm-result-portrait .sm-person b { position: absolute; left: 12px; bottom: 0; width: 102px; height: 84px; border-radius: 52px 52px 12px 12px; background: linear-gradient(145deg, #83717e, #c4adb8); }
.sm-result-portrait > span { position: absolute; right: 8px; bottom: 8px; padding: 3px 7px; background: rgba(255,255,255,.72); color: #8b5268; font-size: 9px; }
.sm-result-title { padding: 15px 2px 4px; text-align: center; }
.sm-result-title small { color: #b34b73; font-size: 12px; font-weight: 800; letter-spacing: 1.6px; }
.sm-result-title h2 { margin: 4px 0 8px; font-family: var(--serif); font-size: 22px; }
.sm-result-title p { margin: 0; color: #756a73; font-size: 13.5px; line-height: 1.9; text-align: left; }

.sm-block { margin-top: 15px; padding-top: 13px; border-top: 1px solid rgba(203,150,170,.32); }
.sm-block > h3 { display: flex; align-items: center; gap: 7px; margin: 0 0 12px; font-family: var(--serif); font-size: 15px; color: #4a2f3b; }
.sm-block > h3 em { font-style: normal; font-size: 16px; }

/* Tarot spread: adapts to 1 / 3 / 5 cards */
.sm-tarot-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sm-tarot-cards.count-1 { grid-template-columns: minmax(0, 168px); justify-content: center; }
.sm-tarot-cards.count-3 { grid-template-columns: repeat(3, 1fr); }
.sm-tarot-cards.count-5 { grid-template-columns: repeat(5, 1fr); gap: 5px; }
.sm-tarot-card { min-width: 0; text-align: center; }
.sm-tarot-card .sm-tc-img { position: relative; overflow: hidden; border-radius: 5px; box-shadow: 0 6px 14px rgba(80,30,50,.18); }
.sm-tarot-card .sm-tc-img img { display: block; width: 100%; aspect-ratio: 300 / 522; object-fit: cover; }
.sm-tarot-card .sm-tc-pos { display: block; margin: 8px 0 3px; color: #b34b73; font-size: 11.5px; font-weight: 800; letter-spacing: .4px; }
.sm-tarot-card .sm-tc-name { display: block; color: #3f3543; font-size: 13.5px; font-weight: 700; line-height: 1.4; }
.sm-tarot-card .sm-tc-mean { display: block; margin-top: 4px; color: #7a6e77; font-size: 12px; line-height: 1.6; }
.sm-tarot-cards.count-5 .sm-tc-name { font-size: 11.5px; }
.sm-tarot-cards.count-5 .sm-tc-mean { display: none; }
.sm-tarot-cards.count-5 .sm-tc-pos { font-size: 10px; }

/* Birth chart */
.sm-astro-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.sm-astro-chip { padding: 9px 6px; border: 1px solid rgba(179,97,128,.22); border-radius: 3px; background: rgba(255,255,255,.62); text-align: center; }
.sm-astro-chip b { display: block; color: #9a8d95; font-size: 11.5px; font-weight: 700; letter-spacing: .5px; }
.sm-astro-chip span { display: block; margin-top: 4px; color: #a3164c; font-size: 14.5px; font-weight: 800; }
.sm-astro-note { margin: 12px 0 0; color: #776b73; font-size: 13.5px; line-height: 1.9; }

/* Combined analysis */
.sm-report-list { display: grid; gap: 10px; }
.sm-report-list article { padding: 12px 14px; border-radius: var(--radius-sm); background: rgba(255,255,255,.58); }
.sm-report-list b { display: block; margin-bottom: 6px; color: #4a3540; font-size: 14.5px; }
.sm-report-list p { margin: 0; color: #776b73; font-size: 13.5px; line-height: 1.9; }

/* Result buttons: reuse .ai-acts + .btn-ghost from style.css, always side by side (same as face.css) */
.sm-preview-screen .ai-acts { margin-top: 14px; padding-top: 12px; }
.sm-preview-screen .ai-acts.result-actions { flex-direction: row; flex-wrap: nowrap; gap: 10px; }
.sm-preview-screen .ai-acts.result-actions .btn { width: auto; flex: 1 1 0; text-align: center; }
.sm-disclaimer { margin: 12px 0 0; color: #998e96; font-size: 11.5px; line-height: 1.7; text-align: center; }

.sm-faq { margin-top: 26px; padding: 28px; }
/* Intro and guide sections have no outer frame; content aligns with the boxes above and below */
.sm-intro, .sm-sample, .sm-guide { margin-top: 32px; padding: 16px 0 0; }
/* Sample card sits close to the block above; Form guide title pulls up tight under it */
.sm-guide { margin-top: 20px; padding-top: 0; }
.sm-section-head { max-width: 720px; margin-bottom: 19px; }
.sm-section-head h2 { margin: 6px 0 6px; font-family: var(--serif); font-size: clamp(22px, 3vw, 30px); }
.sm-section-head p { margin: 0; color: #766c75; font-size: 13px; line-height: 1.75; }
/* What you get: 3 × 2 grid, number · category + title + description */
.sm-feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--line); }
.sm-feature-grid article { position: relative; padding: 17px 18px 16px; background: #fff; }
.sm-feature-grid i { display: block; color: #b74270; font-size: 10px; font-style: normal; font-weight: 800; letter-spacing: 1px; }
.sm-feature-grid h3 { margin: 9px 0 7px; font-family: var(--serif); font-size: 17px; color: #2b2530; }
.sm-feature-grid p { margin: 0; color: #796e77; font-size: 12px; line-height: 1.75; }
/* Sample report: keep the heading outside; place the copy and 450 × 450 image inside one fine-line frame. */
.sm-sample-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 450px); align-items: center; gap: 56px; overflow: hidden; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: transparent; }
.sm-sample-media { position: relative; order: 2; display: grid; place-items: center; width: 100%; height: 450px; min-height: 0; overflow: hidden; margin: 0; border: 0; border-radius: var(--radius); background: #f6ecf1; }
.sm-sample-ph { display: flex; flex-direction: column; align-items: center; gap: 8px; color: #b3899a; font-size: 11.5px; letter-spacing: .5px; }
.sm-sample-ph svg { width: 54px; height: 54px; opacity: .55; }
.sm-sample-media figcaption { display: none; }
.sm-sample-body { order: 1; display: flex; flex-direction: column; padding: 0; }
.sm-sample-body > small { color: var(--vermilion); font-size: 10px; font-weight: 800; letter-spacing: 1.5px; }
.sm-sample-body h3 { margin: 8px 0 10px; color: var(--vermilion-dark); font-family: var(--serif); font-size: clamp(22px, 2.6vw, 28px); line-height: 1.3; }
.sm-sample-lead { margin: 0; color: #6f656d; font-size: 13px; line-height: 1.85; }
.sm-sample-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 0; padding: 0; list-style: none; }
.sm-sample-tags li { padding: 4px 10px; border: 1px solid #ecd2dc; border-radius: 3px; background: var(--vermilion-soft); color: var(--vermilion-dark); font-size: 11.5px; }
.sm-sample-rows { margin: 16px 0 18px; border-top: 1px solid var(--line); }
.sm-sample-rows > div { display: grid; grid-template-columns: 124px minmax(0, 1fr); gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.sm-sample-rows dt { color: #3d3540; font-size: 12.5px; font-weight: 700; }
.sm-sample-rows dd { margin: 0; color: #776d75; font-size: 12.5px; line-height: 1.75; }
.sm-sample-cta { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: auto; padding: 14px 16px; border: 1px solid #efd9b8; border-radius: var(--radius-sm); background: #fffaf1; }
.sm-sample-cta b { display: block; color: #7a5a1e; font-size: 13px; }
.sm-sample-cta span { display: block; margin-top: 3px; color: #8f8174; font-size: 11.5px; line-height: 1.6; }
.sm-sample-cta a { flex: none; padding: 9px 16px; border-radius: 3px; background: var(--vermilion); color: #fff; font-size: 12px; font-weight: 700; text-decoration: none; }
#smFormTitle { scroll-margin-top: 96px; }
/* Accordion FAQ: number + question + plus/minus on the right */
.sm-faq-list { border-top: 1px solid var(--line); }
.sm-faq details { border-bottom: 1px solid var(--line); }
.sm-faq summary { display: flex; align-items: center; gap: 12px; padding: 16px 2px; color: #403943; font-size: 13.5px; font-weight: 700; line-height: 1.5; list-style: none; cursor: pointer; transition: color .2s; }
.sm-faq summary::-webkit-details-marker { display: none; }
.sm-faq summary b { flex: none; width: 22px; color: var(--vermilion); font-size: 11px; font-weight: 800; letter-spacing: .5px; }
.sm-faq summary span { flex: 1; min-width: 0; }
.sm-faq summary::after {
  content: ""; flex: none; width: 20px; height: 20px; border: 1px solid var(--line); border-radius: 3px; background-color: #fff;
  background-image: linear-gradient(var(--vermilion), var(--vermilion)), linear-gradient(var(--vermilion), var(--vermilion));
  background-position: center; background-repeat: no-repeat; background-size: 8px 1.5px, 1.5px 8px;
}
.sm-faq details[open] summary { color: var(--vermilion-dark); }
.sm-faq details[open] summary::after { border-color: rgba(173,23,79,.3); background-color: var(--vermilion-soft); background-size: 8px 1.5px, 0 0; }
.sm-faq details p { margin: -4px 0 16px; padding: 0 34px; color: #776d75; font-size: 12.5px; line-height: 1.8; }
.sm-faq summary:focus-visible { outline: 2px solid rgba(173,23,79,.35); outline-offset: 2px; }

/* Form & button guide: groups + grid cards */
.sm-guide-group + .sm-guide-group { margin-top: 26px; }
.sm-guide-group-head { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.sm-guide-group-head b { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 3px; background: var(--vermilion); color: #fff; font-size: 11px; font-weight: 800; }
.sm-guide-group-head h3 { margin: 0; font-family: var(--serif); font-size: 17px; color: #2b2530; }
.sm-guide-group-head span { color: #9b8f98; font-size: 11.5px; }
/* Single dividers: a 1px gap shows the backdrop as the line, so neighbours share one line */
.sm-guide-grid { display: grid; gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--line); }
.sm-guide-grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.sm-guide-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sm-guide-item { display: flex; flex-direction: column; min-width: 0; padding: 15px 15px 14px; background: #fff; }
.sm-guide-item.is-wide { grid-column: 1 / -1; }
.sm-guide-item header { display: flex; align-items: center; gap: 7px; }
.sm-guide-item header b { color: var(--vermilion); font-size: 11px; font-weight: 800; letter-spacing: .5px; }
.sm-guide-item h4 { margin: 0; min-width: 0; color: #2b2530; font-size: 13.5px; font-weight: 800; line-height: 1.4; }
.sm-guide-item header i {
  flex: 0 0 auto; margin-left: auto; padding: 2px 7px; border: 1px solid #ead6de; border-radius: 3px;
  background: #fdf7fa; color: #9c6a80; font-size: 10px; font-style: normal; font-weight: 700; white-space: nowrap;
}
.sm-guide-item header i.is-req { border-color: rgba(173,23,79,.3); background: var(--vermilion-soft); color: var(--vermilion); }
.sm-guide-item header i.is-opt { border-color: #e4dfe2; background: #f7f4f6; color: #8d8489; }
.sm-guide-item header i.is-auto { border-color: rgba(100,110,180,.25); background: #f3f4ff; color: #5d6a9a; }
.sm-guide-item p { margin: 8px 0 0; color: #776d75; font-size: 12.5px; line-height: 1.75; }
.sm-guide-opts { display: flex; flex-wrap: wrap; gap: 5px; margin: 11px 0 0; padding: 0; list-style: none; }
.sm-guide-opts li { padding: 3px 8px; border: 1px solid #ead6de; border-radius: 3px; background: #fdf8fa; color: #6b616d; font-size: 11.5px; line-height: 1.4; }
.sm-guide-defs { margin: 11px 0 0; padding: 0; list-style: none; border-top: 1px dashed #efdbe3; }
.sm-guide-defs li { display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 8px; padding: 6px 0; border-bottom: 1px dashed #efdbe3; color: #776d75; font-size: 12px; line-height: 1.5; }
.sm-guide-defs b { color: var(--vermilion); font-weight: 700; }
/* Button samples: mirror the real styles in the file panel */
.sm-guide-demo {
  display: flex; align-items: center; justify-content: center; gap: 6px; height: 54px; margin-bottom: 12px;
  border: 1px dashed #ecccd8; border-radius: var(--radius-sm); background: linear-gradient(155deg, #fffafd 0%, #f9e7ee 100%);
}
.sm-gd-count { padding: 4px 10px; border: 1px solid #e0c4d0; border-radius: 3px; background: #f5eef1; color: #8a7c84; font-size: 11px; font-weight: 700; }
.sm-gd-count.is-on { border-color: var(--vermilion); background: var(--vermilion); color: #fff; }
.sm-gd-btn { display: inline-flex; align-items: center; gap: 5px; padding: 6px 13px; border: 1px solid transparent; border-radius: 3px; color: #fff; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.sm-gd-btn.is-refresh { background: #4a7bd6; }
.sm-gd-btn.is-shuffle { background: #9b46c9; }
.sm-gd-btn.is-start { padding: 6px 24px; background: linear-gradient(135deg, #b31653, #7e0d38); }
.sm-gd-btn.is-ghost { border-color: #d7a8b9; background: #fff; color: #9c3159; }
.sm-gd-btn.is-dark { background: #961744; }
.sm-gd-cards { display: flex; align-items: flex-end; height: 42px; }
.sm-gd-cards i {
  width: 20px; aspect-ratio: 300 / 522; margin-left: -8px; border: 1px solid rgba(120,72,40,.45); border-radius: 2px;
  background: url("/major-arcana/tarot.webp") center / cover no-repeat; box-shadow: -2px 3px 6px rgba(60,28,44,.2);
}
.sm-gd-cards i:first-child { margin-left: 0; }
.sm-gd-cards i.is-up { transform: translateY(-6px); }


/* ==========================================================================
   Visual polish: multi-color accents, section band, selected states, card depth
   ========================================================================== */
:root {
  --sm-c1: #ad174f; --sm-t1: #fff0f5;   /* rose */
  --sm-c2: #7b45a8; --sm-t2: #f6effc;   /* violet */
  --sm-c3: #b07a22; --sm-t3: #fdf5e4;   /* amber */
  --sm-c4: #2f7f86; --sm-t4: #e9f5f5;   /* teal */
  --sm-c5: #4868c0; --sm-t5: #eef2fd;   /* star blue */
  --sm-c6: #cc5a3d; --sm-t6: #fdf0eb;   /* coral */
}

/* Section headings have no decorative bar underneath */
.sm-section-head h2 { margin-bottom: 12px; }
.sm-section-head h2::after { display: none; }

/* Form: soft pink fill; number badges and option buttons match the baby/face pages (thin border, light fill, red text + red border when selected), no hover color */
.sm-form { background: linear-gradient(180deg, #fdf1f5 0%, #fcf3f6 55%, #fbf0f4 100%); }
.sm-form-head { background: linear-gradient(120deg, #fceaf1 0%, #fbe8ef 60%, #f6ecf8 100%); }
.sm-question legend { align-items: center; }
.sm-question legend b {
  display: inline-grid; place-items: center; min-width: 22px; height: 20px; padding: 0 4px; box-sizing: border-box; border-radius: 3px;
  border: 1px solid rgba(173,23,79,.22); background: #fff; color: var(--vermilion); font-size: 10px; letter-spacing: .3px;
}
.sm-option { border-color: #ddb9c8; background: transparent; color: #5f5563; }
.sm-option.active, .sm-option.active:hover {
  border-color: var(--vermilion); background: var(--vermilion-soft); color: var(--vermilion); box-shadow: none;
}

/* What you get: one accent per card, soft tinted fill + faint large number */
.sm-feature-grid { counter-reset: smf; }
.sm-feature-grid article:nth-child(1) { --c: var(--sm-c1); --t: var(--sm-t1); }
.sm-feature-grid article:nth-child(2) { --c: var(--sm-c2); --t: var(--sm-t2); }
.sm-feature-grid article:nth-child(3) { --c: var(--sm-c3); --t: var(--sm-t3); }
.sm-feature-grid article:nth-child(4) { --c: var(--sm-c4); --t: var(--sm-t4); }
.sm-feature-grid article:nth-child(5) { --c: var(--sm-c5); --t: var(--sm-t5); }
.sm-feature-grid article:nth-child(6) { --c: var(--sm-c6); --t: var(--sm-t6); }
.sm-feature-grid article {
  counter-increment: smf; overflow: hidden; padding-top: 20px;
  background: linear-gradient(180deg, var(--t) 0%, #fff 58%);
}
.sm-feature-grid article::after {
  content: counter(smf, decimal-leading-zero); position: absolute; right: 14px; top: 10px;
  color: var(--c); font-family: var(--serif); font-size: 46px; font-weight: 700; line-height: 1; opacity: .1; pointer-events: none;
}
.sm-feature-grid i { display: inline-block; padding: 3px 8px; border-radius: 3px; background: #fff; color: var(--c); box-shadow: inset 0 0 0 1px var(--t); }
.sm-feature-grid h3 { margin-top: 12px; }

/* Sample report: full-width soft pink band, card lifted — keep band close to the block above, then guide sits tight below */
.sm-sample { margin-top: 14px; padding: 28px 0 28px; background: transparent; box-shadow: none; clip-path: none; }
.sm-sample-card { border-color: var(--line); box-shadow: none; }
.sm-sample-media {
  overflow: hidden;
  background:
    radial-gradient(circle at 28% 20%, rgba(255,255,255,.75), transparent 38%),
    radial-gradient(circle at 80% 82%, rgba(123,69,168,.2), transparent 46%),
    linear-gradient(150deg, #f4cfdd 0%, #efd3cf 46%, #e8dbf1 100%);
}
.sm-sample-media::before, .sm-sample-media::after { display: none; }
.sm-sample-image { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.sm-sample-media figcaption { z-index: 1; box-shadow: 0 4px 12px rgba(126,13,56,.12); }
.sm-sample-body > small { align-self: flex-start; padding: 3px 9px; border-radius: 3px; background: var(--vermilion-soft); }
.sm-sample-tags li { border-color: transparent; }
.sm-sample-tags li:nth-child(4n+1) { background: var(--sm-t1); color: var(--sm-c1); }
.sm-sample-tags li:nth-child(4n+2) { background: var(--sm-t2); color: var(--sm-c2); }
.sm-sample-tags li:nth-child(4n+3) { background: var(--sm-t4); color: var(--sm-c4); }
.sm-sample-tags li:nth-child(4n+4) { background: var(--sm-t3); color: var(--sm-c3); }
.sm-sample-rows > div { grid-template-columns: 140px minmax(0, 1fr); }
.sm-sample-rows dt { display: flex; align-items: center; gap: 7px; color: var(--vermilion-dark); }
.sm-sample-rows dt::before { content: ""; flex: none; width: 6px; height: 6px; transform: rotate(45deg); background: linear-gradient(135deg, #e0799f, var(--vermilion)); }
.sm-sample-cta { border-color: #f0d49f; background: linear-gradient(120deg, #fff9ee 0%, #fdf0d9 100%); box-shadow: inset 3px 0 0 #d9a441; }
.sm-sample-cta b { color: #83601a; font-size: 14px; }
.sm-sample-cta a { background: linear-gradient(135deg, #d0447a, var(--vermilion)); box-shadow: 0 6px 16px rgba(173,23,79,.28); transition: transform .2s; }
.sm-sample-cta a:hover { transform: translateY(-1px); }

/* Form & button guide: each group A–D gets its own accent */
.sm-guide-group:nth-child(2) { --gc: var(--sm-c1); --gt: var(--sm-t1); }
.sm-guide-group:nth-child(3) { --gc: var(--sm-c2); --gt: var(--sm-t2); }
.sm-guide-group:nth-child(4) { --gc: var(--sm-c3); --gt: var(--sm-t3); }
.sm-guide-group:nth-child(5) { --gc: var(--sm-c5); --gt: var(--sm-t5); }
.sm-guide-group + .sm-guide-group { margin-top: 30px; }
.sm-guide-group-head { padding-bottom: 0; border-bottom: 0; }
.sm-guide-group-head b { background: var(--gc); box-shadow: 0 3px 8px rgba(40,20,40,.16); }
.sm-guide-group-head span { padding: 2px 8px; border-radius: 3px; background: var(--gt); color: var(--gc); font-weight: 600; }
.sm-guide-item header b, .sm-guide-defs b { color: var(--gc); }
.sm-guide-opts li { border-color: transparent; background: var(--gt); }

/* FAQ: number badges, soft pink gradient behind the open item */
.sm-faq { background: linear-gradient(180deg, #fff 0%, rgba(255,248,251,.95) 100%); }
.sm-faq details { transition: background .2s; }
.sm-faq details[open] { background: linear-gradient(90deg, rgba(255,240,245,.9), rgba(255,255,255,0) 80%); }
.sm-faq summary { padding-left: 8px; padding-right: 8px; }
.sm-faq summary b { display: inline-grid; place-items: center; height: 20px; border-radius: 3px; background: var(--vermilion-soft); font-size: 10px; transition: background .2s, color .2s; }
.sm-faq details[open] summary b { background: var(--vermilion); color: #fff; }
.sm-faq details p { padding: 0 42px; }

@media (max-width: 1024px) {
  .sm-field-grid { grid-template-columns: repeat(2, 1fr); }
  .sm-feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sm-guide-grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .sm-shell { grid-template-columns: 1fr; }
  /* Single column: drop the absolute pinning; the panel gets a fixed height and scrolls inside (as the baby page does below 1100px) */
  .sm-outcol { min-height: 0; }
  .sm-preview { position: relative; inset: auto; }
  .sm-scroll { max-height: none; }
  .sm-preview-screen { flex: none; height: min(640px, 88vh); }
  .sm-idle { padding-bottom: 24px; }
  .sm-guide-grid.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sm-guide-grid.cols-3 > .sm-guide-item:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .sm-sample-card { grid-template-columns: 1fr; gap: 24px; padding: 16px; }
  .sm-sample-media { width: min(450px, 100%); height: auto; min-height: 0; aspect-ratio: 1 / 1; justify-self: center; border: 0; }
}
@media (max-width: 640px) {
  .sm-main { padding-top: 20px; padding-bottom: 42px; }
  .sm-form-head, .sm-question, .sm-arcana { padding-left: 12px; padding-right: 12px; }
  .sm-arcana { margin-left: 12px; margin-right: 12px; }
  .sm-question legend { flex-wrap: wrap; font-size: 12px; }
  .sm-field-grid { grid-template-columns: repeat(2, 1fr); }
  /* Keep every editable birth field at 16px on iPhone, preventing Safari focus zoom. */
  .sm-field input, .sm-when { font-size: 16px !important; }
  .sm-options { gap: 6px; }
  /* Mobile: popup becomes a full-width bottom drawer, no anchoring */
  .qm-panel { left: 0 !important; right: 0; top: auto !important; bottom: 0; border-radius: 6px 6px 0 0; }
  .qm-pick, .qm-pick-date { width: auto; max-width: none; }
  .qm-col-i { padding: 8px 1px; font-size: 12.5px; }
  .sm-option { padding: 7px 9px; font-size: 11.5px; }
  .sm-deck-fan { --dc-w: 34px; padding: 30px 0 12px; min-height: 128px; }
  .sm-deck-fan .sm-dc.is-drawn { transform: translateY(-14px); }
  .sm-faq { margin-top: 18px; padding: 21px 12px; }
  .sm-faq summary { gap: 9px; padding: 14px 0; font-size: 13px; }
  .sm-faq summary b { width: 20px; }
  .sm-faq details p { padding: 0 0 0 29px; font-size: 12px; }
  .sm-intro, .sm-sample, .sm-guide { margin-top: 18px; padding: 24px 0 4px; }
  .sm-sample-media { aspect-ratio: 1 / 1; }
  .sm-sample-body { padding: 0; }
  .sm-sample-rows > div { grid-template-columns: 1fr; gap: 2px; }
  .sm-sample-cta { flex-direction: column; align-items: stretch; }
  .sm-sample-cta a { text-align: center; }
  .sm-guide-grid.cols-4, .sm-guide-grid.cols-3 { grid-template-columns: 1fr; }
  .sm-guide-item { padding: 13px 12px; }
  .sm-guide-group + .sm-guide-group { margin-top: 20px; }
  .sm-feature-grid { grid-template-columns: 1fr; }
  .sm-feature-grid article { padding: 14px 12px; }
  .sm-feature-grid h3 { margin-top: 7px; font-size: 15px; }
  .sm-feature-grid p { font-size: 11.5px; }
  .sm-tarot-card .sm-tc-mean { font-size: 11px; }
}
@media (max-width: 390px) {
  .sm-astro-row { grid-template-columns: repeat(2, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .sm-deck-fan.is-shuffling .sm-dc { animation: none; }
  .sm-option, .sm-start, .sm-tool { transition: none; }
}

/* Narrow screens: keep vertical breathing room in the sample band */
@media (max-width: 640px) {
  .sm-sample { margin-top: 26px; padding: 30px 0 32px; }
  .sm-feature-grid article::after { font-size: 38px; }
}

/* AI result: partner portrait (3:4 vertical, face kept near the top), keyword tags, image-failure note */
.sm-result-portrait.has-img { height: 360px; background: #f6ecf1; }
.sm-result-portrait.has-img img { object-position: center 22%; }
.sm-result-portrait.has-img.is-full img { object-position: center; }
.sm-result-portrait > span.sm-portrait-mark { right: 12px; bottom: 9px; padding: 0; background: none; color: #d7000f; font-size: 12px; font-weight: 700; letter-spacing: .3px; text-shadow: none; }
.sm-portrait-dl { position: absolute; right: 8px; bottom: 34px; display: inline-flex; align-items: center; gap: 5px; padding: 6px 12px; border: 0; border-radius: 999px; background: rgba(255,255,255,.9); box-shadow: 0 4px 12px rgba(126,13,56,.16); color: var(--vermilion-dark); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; transition: background .2s, transform .2s; }
.sm-portrait-dl i { font-style: normal; font-size: 13px; line-height: 1; }
.sm-portrait-dl:hover { background: #fff; transform: translateY(-1px); }
.sm-portrait-dl:disabled { opacity: .6; cursor: wait; transform: none; }
/* Text first, image after: while painting, reserve the final image height so the page doesn't jump when it arrives */
.sm-result-portrait.is-drawing, .sm-result-portrait.is-failed { height: 360px; }
.sm-result-portrait.is-drawing::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.55) 50%, transparent 70%); background-size: 220% 100%; animation: smDrawSweep 1.8s linear infinite; pointer-events: none; }
.sm-result-portrait.is-drawing .sm-person { animation: smDrawPulse 1.8s ease-in-out infinite; }
.sm-result-portrait > span.sm-portrait-wait { left: 50%; right: auto; bottom: 22px; z-index: 1; transform: translateX(-50%); padding: 6px 14px; border-radius: 999px; background: rgba(255,255,255,.88); color: #8b5268; font-size: 12px; font-weight: 700; white-space: nowrap; }
.sm-portrait-retry { position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%); padding: 7px 16px; border: 0; border-radius: 999px; background: var(--vermilion-dark); color: #fff; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; box-shadow: 0 4px 12px rgba(126,13,56,.2); }
.sm-portrait-retry:hover { filter: brightness(1.08); }
@keyframes smDrawSweep { from { background-position: 120% 0; } to { background-position: -120% 0; } }
@keyframes smDrawPulse { 0%, 100% { opacity: .5; } 50% { opacity: .85; } }
.sm-result-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 9px; }
.sm-result-tags[hidden] { display: none; }
.sm-result-tags span { padding: 3px 9px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--vermilion); font-size: 10.5px; }
.sm-result .ai-note { margin-top: 10px; }

/* Print: undo the fixed height + inner scroll, otherwise only the visible screen would print (same as face.css) */
@media print {
  .sm-outcol { position: static; min-height: 0; }
  .sm-preview { position: static; inset: auto; display: block; box-shadow: none; }
  .sm-scroll, .sm-preview-screen { max-height: none; height: auto; overflow: visible; }
  .sm-preview-screen { padding: 0; border: 0; background: none; }
}