/* A short introduction shared by the dashboard, interview and help pages. */
.onboarding-modal {
  width: min(620px, calc(100vw - 24px)); max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px);
  padding: 24px 30px 20px; border: 1px solid #e0d3b9; border-radius: 24px;
  background: #fffdf7; color: var(--text, #293f38); margin: auto;
  box-shadow: 0 24px 100px #1a30294d; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain;
}
.onboarding-modal::backdrop { background: #24382fb3; backdrop-filter: blur(4px); }
.onboarding-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.onboarding-kicker { font-size: 11px; letter-spacing: .13em; color: #8a7044; }
.onboarding-close { border: none; background: transparent; color: #6f6657; padding: 10px 0 10px 10px; font: inherit; font-size: 12px; cursor: pointer; min-height: 44px; }
.onboarding-close span { font-size: 23px; vertical-align: -2px; margin-left: 6px; }
.onboarding-heading { margin-top: 8px; }
.onboarding-count { color: #a34e3b; font-size: 12px; font-weight: 700; letter-spacing: .13em; }
.onboarding-heading h2 { font-family: var(--serif, serif); font-size: clamp(21px, 4.8vw, 28px); margin: 8px 0 0; line-height: 1.5; letter-spacing: .025em; }
.onboarding-viewport { overflow: hidden; touch-action: pan-y pinch-zoom; }
.onboarding-track { display: flex; transition: transform 240ms ease; align-items: stretch; }
.onboarding-slide { flex: 0 0 100%; width: 100%; min-width: 0; padding: 0 1px; }
.onboarding-scene { display: flex; align-items: center; gap: 18px; min-height: 230px; }
.onboarding-mascot { flex: 0 0 128px; height: 214px; background-repeat: no-repeat; background-size: 500% 100%; }
.onboarding-speech { position: relative; padding: 16px 18px; background: #f3eddf; border: 1px solid #e8ddc5; border-radius: 17px; min-width: 0; }
.onboarding-speech::before { content: ''; position: absolute; left: -7px; top: 46%; width: 12px; height: 12px; background: #f3eddf; border-left: 1px solid #e8ddc5; border-bottom: 1px solid #e8ddc5; transform: rotate(45deg); }
.onboarding-speech > span { font-size: 11px; font-weight: 700; color: #856a42; }
.onboarding-speech p { font-size: 14px; line-height: 1.9; margin: 7px 0 0; overflow-wrap: anywhere; }
.onboarding-example { border: 1px solid #dfdccc; border-radius: 13px; padding: 15px; background: #fff; min-height: 93px; display: flex; flex-direction: column; justify-content: center; }
.onboarding-example-label { font-size: 11px; color: #6d6b5c; text-align: center; margin-bottom: 10px; }
.onboarding-choice-row, .onboarding-match-example { display: flex; gap: 10px; align-items: center; justify-content: center; }
.onboarding-choice-row > span { flex: 1; text-align: center; padding: 10px 6px; border: 1px solid #d9d6c5; border-radius: 9px; font-size: 12px; background: #f8f8f0; }
.onboarding-chat-example { font-size: 12px; line-height: 1.9; }
.onboarding-chat-example > span { display: block; color: #787366; }
.onboarding-chat-example > b { display: block; color: #375347; }
.onboarding-profile-example { display: grid; gap: 7px; font-size: 11px; color: #766e5d; }
.onboarding-profile-example > span { display: flex; justify-content: space-between; gap: 12px; }
.onboarding-profile-example b { font-size: 12px; color: #435e50; font-weight: 500; }
.onboarding-match-example > span { font-size: 12px; text-align: center; line-height: 1.8; }
.onboarding-match-example > i { font-style: normal; color: #a4824b; }
.onboarding-note { font-size: 12px; color: #6c685d; line-height: 1.9; margin: 14px 0 16px; min-height: 3.8em; }
.onboarding-navigation { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.onboarding-navigation > .btn { min-height: 44px; min-width: 96px; }
.onboarding-dots { display: flex; gap: 0; }
.onboarding-dots button { width: 28px; min-height: 44px; border: none; background: transparent; display: grid; place-items: center; cursor: pointer; padding: 0; }
.onboarding-dots span { width: 7px; height: 7px; background: #d5ccba; border-radius: 50%; }
.onboarding-dots [aria-current="step"] span { background: #b8513d; width: 19px; border-radius: 5px; }
.onboarding-instruction { margin: 14px 0 0; font-size: 10px; line-height: 1.8; color: #7b7262; text-align: center; }
.onboarding-modal button:focus-visible, .help-page a:focus-visible, .help-page button:focus-visible { outline: 3px solid #9a472f; outline-offset: 3px; }
.onboarding-announcement { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Help remains readable on mobile and offers a direct tutorial replay. */
.help-page { max-width: 940px; margin-top: 36px; margin-bottom: 48px; }
.help-welcome { display: grid; grid-template-columns: 1fr 145px; gap: 18px; align-items: center; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.help-welcome h1 { font-family: var(--serif); font-size: clamp(27px, 5vw, 38px); line-height: 1.5; margin: 8px 0 12px; }
.help-welcome p { line-height: 1.9; }
.help-welcome .onboarding-mascot { height: 220px; width: 132px; margin: auto; }
.help-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 18px; }
.help-actions .btn { min-height: 44px; text-decoration: none; }
.help-index { display: flex; gap: 8px; flex-wrap: wrap; margin: 24px 0; }
.help-index a { text-decoration: none; color: #486153; background: #eeeee2; padding: 10px 13px; border-radius: 20px; font-size: 12px; min-height: 40px; }
.help-section { scroll-margin-top: 140px; padding: 24px; }
.help-section.card h2 { font-family: var(--serif); font-size: 21px; margin-bottom: 15px; }
.help-section h3 { font-size: 15px; margin: 22px 0 8px; }
.help-section p, .help-section li { line-height: 1.95; font-size: 14px; }
.help-section p { margin: 8px 0; }
.help-section ol, .help-section ul { padding-left: 24px; margin: 12px 0; }
.help-section li { margin: 10px 0; padding-left: 3px; }
.help-section a { color: #9b4634; text-underline-offset: 3px; }
.help-section strong { color: #405b4c; }
.help-tip { background: #f5f0e4; border-left: 3px solid #b59a67; padding: 12px 15px; border-radius: 0 10px 10px 0; }
.help-section [hidden] { display: none !important; }
.help-tutorial-note { font-size: 12px; color: #746e61; }
@media (max-width: 480px) {
  .onboarding-modal { padding: 15px 18px 17px; border-radius: 20px; }
  .onboarding-scene { min-height: 217px; gap: 9px; }
  .onboarding-mascot { flex-basis: 96px; height: 160px; }
  .onboarding-speech { padding: 12px; }
  .onboarding-speech p { font-size: 13px; line-height: 1.8; }
  .onboarding-navigation { gap: 2px; }
  .onboarding-navigation > .btn { min-width: 82px; padding: 9px 11px; font-size: 12px; }
  .onboarding-dots button { width: 24px; }
  .onboarding-note { font-size: 11px; }
  .help-page { margin-top: 22px; }
  .help-welcome { grid-template-columns: 1fr 82px; gap: 8px; }
  .help-welcome .onboarding-mascot { width: 81px; height: 135px; }
  .help-welcome p { font-size: 12px; }
  .help-welcome .help-actions { grid-column: 1 / -1; }
  .help-section { padding: 20px 17px; }
  .help-section p, .help-section li { font-size: 13px; }
}
@media (max-height: 700px) {
  .onboarding-modal { padding-top: 10px; padding-bottom: 12px; }
  .onboarding-heading { margin-top: 0; }
  .onboarding-heading h2 { margin-top: 5px; }
  .onboarding-scene { min-height: 176px; }
  .onboarding-mascot { height: 160px; flex-basis: 96px; }
  .onboarding-note { margin: 10px 0; }
  .onboarding-instruction { margin-top: 8px; }
}
/* Keep the guide's short explanation and navigation together on small phones.
   The example is supplementary; the complete guide remains available in Help. */
@media (max-height: 650px) and (max-width: 480px) {
  .onboarding-heading h2 { font-size: 20px; line-height: 1.3; }
  .onboarding-scene { min-height: 150px; }
  .onboarding-mascot { height: 135px; flex-basis: 81px; }
  .onboarding-speech p { font-size: 12px; line-height: 1.7; }
  .onboarding-example { display: none; }
  .onboarding-note { min-height: 0; line-height: 1.7; margin: 8px 0; }
  .onboarding-instruction { font-size: 9px; line-height: 1.7; }
}
@media (prefers-reduced-motion: reduce) { .onboarding-track { transition: none; } }
@media (max-width: 350px) {
  .onboarding-navigation { gap: 2px; }
  .onboarding-navigation > .btn { min-width: 72px; padding-inline: 8px; }
  .onboarding-dots button { width: 22px; }
}
