/* ═════════════ سفرِ درون — استایل مینیمالِ لوکس v2 ═════════════ */

:root {
    --bg: #f7f4ee;
    --card: #fffdf9;
    --ink: #262321;
    --ink-soft: #4d4842;
    --muted: #948b7f;
    --line: #e8e1d5;
    --accent: #a8853f;
    --accent-2: #c9a86a;
    --accent-soft: rgba(168, 133, 63, 0.09);
    --shadow-sm: 0 1px 2px rgba(38, 35, 33, 0.05), 0 4px 14px rgba(38, 35, 33, 0.05);
    --shadow-lg: 0 2px 4px rgba(38, 35, 33, 0.06), 0 26px 52px -20px rgba(38, 35, 33, 0.18);
    --radius: 22px;
  }
  
  * { box-sizing: border-box; margin: 0; padding: 0; }
  
  html { scroll-behavior: smooth; }
  
  body {
    font-family: "Vazirmatn", Tahoma, "Segoe UI", sans-serif;
    color: var(--ink);
    line-height: 2.1;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    background:
      radial-gradient(900px 480px at 85% -8%, var(--accent-soft), transparent 65%),
      radial-gradient(700px 420px at 8% 108%, rgba(201, 168, 106, 0.07), transparent 60%),
      var(--bg);
    background-attachment: fixed;
  }
  
  ::selection { background: var(--accent); color: #fff; }
  
  ::-webkit-scrollbar { width: 10px; }
  ::-webkit-scrollbar-track { background: transparent; }
  ::-webkit-scrollbar-thumb {
    background: var(--line);
    border-radius: 8px;
    border: 2px solid var(--bg);
  }
  ::-webkit-scrollbar-thumb:hover { background: var(--accent-2); }
  
  :focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 6px;
  }
  
  .container {
    max-width: 740px;
    margin: 0 auto;
    padding: 56px 22px 90px;
  }
  
  /* ─── سیستم نمایش صفحات ─── */
  
  .view {
    display: none;
    animation: viewIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
  }
  .view.active { display: block; }
  
  @keyframes viewIn {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
  }
  
  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  }
  
  .muted { color: var(--muted); font-size: 0.9rem; }
  
  /* ─── صفحه‌ی خوش‌آمد ─── */
  
  .hero {
    text-align: center;
    padding: 30px 0 46px;
    position: relative;
  }
  
  /* قابِ ظریفِ تزئینی دورِ هیرو */
  .hero::before {
    content: "";
    position: absolute;
    inset: 0 6px;
    border: 1px solid var(--line);
    border-radius: 28px;
    pointer-events: none;
    mask: linear-gradient(180deg, #000 0%, transparent 18%, transparent 82%, #000 100%);
    -webkit-mask: linear-gradient(180deg, #000 0%, transparent 18%, transparent 82%, #000 100%);
  }
  
  .hero-mark {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    color: var(--muted);
    font-size: 0.82rem;
    margin-bottom: 20px;
  }
  .hero-mark::before,
  .hero-mark::after {
    content: "";
    width: 46px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-2));
  }
  .hero-mark::after { background: linear-gradient(90deg, var(--accent-2), transparent); }
  
  .hero-title {
    font-size: clamp(2.6rem, 9vw, 4rem);
    font-weight: 800;
    line-height: 1.45;
    background: linear-gradient(160deg, var(--ink) 30%, var(--accent) 85%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
  }
  
  .hero-tagline {
    color: var(--accent);
    font-size: 1.08rem;
    font-weight: 500;
    margin-top: 4px;
  }
  
  .ornament {
    color: var(--accent-2);
    margin: 24px 0;
    font-size: 0.85rem;
    letter-spacing: 0.6em;
    padding-right: 0.6em;
  }
  
  .hero-lead {
    max-width: 560px;
    margin: 0 auto;
    color: var(--ink-soft);
    text-align: justify;
    text-align-last: center;
    font-size: 0.98rem;
  }
  .hero-lead em { font-style: normal; font-weight: 700; color: var(--accent); }
  
  /* ─── چطور کار می‌کند ─── */
  
  .steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    padding: 38px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    margin-bottom: 54px;
    position: relative;
  }
  
  .step { text-align: center; padding: 0 10px; position: relative; }
  .step + .step::before {
    content: "";
    position: absolute;
    right: -15px;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 56px;
    background: linear-gradient(180deg, transparent, var(--line), transparent);
  }
  
  .step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px; height: 38px;
    border-radius: 50%;
    border: 1px solid var(--accent-2);
    color: var(--accent);
    font-weight: 700;
    margin-bottom: 12px;
    background: linear-gradient(180deg, #fff, var(--accent-soft));
    box-shadow: var(--shadow-sm);
  }
  
  .step h3 { font-size: 1rem; font-weight: 700; margin-bottom: 6px; }
  .step p { font-size: 0.84rem; color: var(--muted); line-height: 1.95; }
  
  /* ─── انتخاب داستان ─── */
  
  .section-head { text-align: center; margin-bottom: 30px; }
  .section-head h2 { font-size: 1.5rem; font-weight: 800; }
  .section-head .muted { margin-top: 2px; }
  
  .story-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 18px;
  }
  
  .story-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 30px 24px 22px;
    text-align: right;
    cursor: pointer;
    font-family: inherit;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s, border-color 0.3s;
    box-shadow: var(--shadow-sm);
  }
  
  /* خطِ رنگیِ بالای کارت با رنگِ همان داستان */
  .story-card::before {
    content: "";
    position: absolute;
    top: 0; right: 0; left: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--sc, var(--accent)), transparent);
    opacity: 0;
    transition: opacity 0.3s;
  }
  
  .story-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: color-mix(in srgb, var(--sc, var(--accent)) 45%, var(--line));
  }
  .story-card:hover::before { opacity: 1; }
  
  .story-glyph {
    width: 52px; height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    border-radius: 16px;
    background: color-mix(in srgb, var(--sc, var(--accent)) 10%, #fff);
    margin-bottom: 16px;
  }
  
  .story-card h3 { font-size: 1.1rem; font-weight: 800; margin-bottom: 8px; }
  .story-card p { font-size: 0.86rem; color: #6e675e; line-height: 1.95; }
  
  .story-meta {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px dashed var(--line);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.78rem;
    color: var(--muted);
  }
  
  .badge-resume {
    color: var(--sc, var(--accent));
    font-weight: 700;
  }
  
  /* ─── آخرین نتیجه ─── */
  
  .last-result {
    text-align: center;
    margin-top: 38px;
    font-size: 0.88rem;
    color: var(--muted);
  }
  .last-result button {
    background: none; border: none; cursor: pointer;
    font: inherit; color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 5px;
    text-decoration-color: var(--accent-2);
  }
  .last-result button:hover { color: var(--ink); }
  
  /* ─── پابرگ ─── */
  
  .footer {
    margin-top: 76px;
    padding-top: 28px;
    border-top: 1px solid var(--line);
    text-align: center;
    font-size: 0.85rem;
  }
  .footer .muted { font-size: 0.76rem; line-height: 1.9; }
  
  /* ─── بازی داستان ─── */
  
  .player-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
  }
  
  .player-title { display: flex; flex-direction: column; align-items: flex-end; }
  .player-title span:first-child { font-weight: 800; font-size: 0.98rem; }
  
  .btn-ghost {
    background: none;
    border: 1px solid transparent;
    cursor: pointer;
    font: inherit;
    font-size: 0.84rem;
    color: var(--muted);
    padding: 7px 14px;
    border-radius: 12px;
    transition: color 0.2s, background 0.2s, border-color 0.2s;
  }
  .btn-ghost:hover {
    color: var(--ink);
    background: #fff;
    border-color: var(--line);
    box-shadow: var(--shadow-sm);
  }
  
  .progress {
    height: 3px;
    background: var(--line);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 44px;
  }
  .progress-fill {
    height: 100%;
    width: 0%;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--accent-2), var(--accent));
    box-shadow: 0 0 10px var(--accent-soft);
    transition: width 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  }
  
  .scene { min-height: 40vh; }
  
  .scene-q {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: 0.22em;
    margin-bottom: 16px;
  }
  .scene-q::after {
    content: "";
    width: 54px;
    height: 1px;
    background: linear-gradient(90deg, var(--accent-2), transparent);
  }
  
  .scene p {
    margin-bottom: 24px;
    font-size: 1.04rem;
    color: #35322d;
    text-align: justify;
    animation: lineIn 0.7s ease both;
  }
  .scene p:last-of-type { margin-bottom: 34px; }
  
  @keyframes lineIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
  }
  
  .scene .echo {
    color: var(--muted);
    font-size: 0.88rem;
    border-right: 2px solid var(--accent-2);
    padding-right: 14px;
    margin-right: 2px;
    margin-bottom: 26px;
  }
  
  /* ─── انتخاب‌ها ─── */
  
  .choices { display: grid; gap: 13px; animation: lineIn 0.7s ease both; }
  
  .choice {
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.9;
    text-align: right;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 16px 20px;
    cursor: pointer;
    color: var(--ink-soft);
    position: relative;
    transition: border-color 0.25s, background 0.25s, transform 0.2s, box-shadow 0.25s;
    box-shadow: var(--shadow-sm);
  }
  .choice:hover {
    border-color: var(--accent);
    background: linear-gradient(180deg, #fff, var(--accent-soft));
    transform: translateX(-5px);
    box-shadow: var(--shadow-lg);
  }
  .choice:active { transform: scale(0.99); }
  
  .choice .muted { font-size: 0.8rem; color: var(--accent); font-weight: 700; }
  
  /* ─── نتیجه ─── */
  
  .result-wrap { animation: viewIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) both; }
  
  .result-eyebrow {
    text-align: center;
    color: var(--muted);
    font-size: 0.85rem;
    margin-bottom: 10px;
  }
  
  .result-title {
    text-align: center;
    font-size: clamp(2rem, 7vw, 3rem);
    font-weight: 800;
    line-height: 1.5;
    background: linear-gradient(160deg, var(--ink) 20%, var(--accent) 80%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 2px;
  }
  
  .result-trait {
    text-align: center;
    margin-bottom: 30px;
  }
  .result-trait .muted {
    display: inline-block;
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 999px;
    padding: 4px 18px;
    box-shadow: var(--shadow-sm);
  }
  
  .result-desc {
    max-width: 570px;
    margin: 0 auto 30px;
    text-align: justify;
    color: var(--ink-soft);
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 26px 28px;
    box-shadow: var(--shadow-sm);
  }
  
  .result-second {
    text-align: center;
    font-size: 0.92rem;
    color: var(--muted);
    margin-bottom: 44px;
  }
  .result-second strong { color: var(--accent); }
  
  .bars {
    display: grid;
    gap: 16px;
    margin-bottom: 48px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 26px 28px;
    box-shadow: var(--shadow-sm);
  }
  
  .bar-row { display: grid; grid-template-columns: 100px 1fr 46px; align-items: center; gap: 14px; }
  
  .bar-label { font-size: 0.86rem; font-weight: 700; }
  
  .bar-track {
    height: 7px;
    background: linear-gradient(180deg, var(--bg), var(--line));
    border-radius: 4px;
    overflow: hidden;
  }
  .bar-fill {
    height: 100%;
    width: 0%;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--accent-2), var(--accent));
    transition: width 1.1s cubic-bezier(0.22, 1, 0.36, 1);
  }
  
  .bar-pct { font-size: 0.78rem; color: var(--muted); text-align: left; }
  
  .trail h3 { font-size: 1.02rem; font-weight: 800; margin-bottom: 16px; }
  .trail ul { list-style: none; }
  .trail li {
    border-right: 2px solid var(--accent-2);
    padding: 3px 16px 3px 0;
    margin-bottom: 12px;
    font-size: 0.88rem;
    color: #6e675e;
  }
  
  .result-actions {
    display: flex;
    gap: 14px;
    justify-content: center;
    margin-top: 50px;
    flex-wrap: wrap;
  }
  
  .btn {
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 600;
    border-radius: 16px;
    padding: 13px 30px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.25s, background 0.25s, color 0.25s;
    border: 1px solid var(--accent);
  }
  .btn:active { transform: scale(0.97); }
  
  .btn-primary {
    background: linear-gradient(160deg, var(--accent-2), var(--accent));
    color: #fff;
    border: none;
    box-shadow: 0 10px 24px -8px color-mix(in srgb, var(--accent) 55%, transparent);
  }
  .btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -8px color-mix(in srgb, var(--accent) 60%, transparent); }
  
  .btn-outline {
    background: transparent;
    color: var(--accent);
  }
  .btn-outline:hover { background: var(--accent-soft); }
  
  /* ─── ریسپانسیو ─── */
  
  @media (max-width: 620px) {
    .container { padding: 36px 16px 64px; }
    .steps { grid-template-columns: 1fr; gap: 24px; }
    .step + .step::before { display: none; }
    .bar-row { grid-template-columns: 84px 1fr 40px; }
    .scene p { font-size: 0.98rem; }
    .result-desc { padding: 20px; }
    .hero::before { display: none; }
  }