/* طرح بر اساس فایل فیگما «Mobile App Tarot Horoscope (Community)» — رنگ‌ها: Back #0e1420، Main #F2D050، Main_dark #DE9201، Gray #E1E1E1 */
@font-face{font-family:Vazirmatn;src:url(fonts/vazirmatn.woff2) format("woff2");font-weight:100 900;font-display:swap}
:root{--bg:#0e1420;--gold:#b69760;--gold2:#e0ca98;--text:#ece7dc;--mute:#aab0bd;--line:rgba(224,202,152,.35);--soft:rgba(224,202,152,.14);--panel:#18202f;
  --glass:rgba(16,23,37,.72);--card2:rgba(255,255,255,.06);--red:#e0735f;--green:#7cc39b;--r:24px;--card:var(--glass)}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html{background:var(--bg)}
html,body{margin:0;color:var(--text);font-family:Vazirmatn,Tahoma,sans-serif;font-size:15px;line-height:1.75}
body{padding-bottom:calc(76px + env(safe-area-inset-bottom));min-height:100vh}
body::before{content:"";position:fixed;inset:0;z-index:-1;background:url(img/bg.webp) center 30%/cover no-repeat;opacity:.3;pointer-events:none}
a{color:var(--gold2);text-decoration:none}
svg.i{width:24px;height:24px;display:block}

/* نوار بالا */
.topbar{position:sticky;top:0;z-index:5;display:flex;align-items:center;gap:8px;padding:calc(10px + env(safe-area-inset-top)) 16px 10px;background:rgba(14,20,32,.86);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px)}
.topbar h1{flex:1;margin:0;font-size:18px;font-weight:500;text-align:center;color:#fff}
.iconbtn{width:40px;height:40px;border:0;background:transparent;color:var(--text);font-size:22px;cursor:pointer;display:flex;align-items:center;justify-content:center;padding:0}
.iconbtn.on{color:var(--gold2)}
#view{max-width:720px;margin:0 auto;padding:12px 24px 16px}
@media(max-width:420px){#view{padding:12px 16px 16px}}

/* نوار پایین (۴ آیکون طبق طرح) */
.tabbar{position:fixed;bottom:0;inset-inline:0;z-index:6;display:flex;justify-content:space-around;align-items:center;height:calc(60px + env(safe-area-inset-bottom));padding-bottom:env(safe-area-inset-bottom);background:rgba(10,14,23,.9);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px)}
.tabbar a{flex:1;display:flex;flex-direction:column;align-items:center;gap:2px;color:var(--text);opacity:.4;font-size:10.5px}
.tabbar a.on{color:var(--gold2);opacity:1}
.tabbar a svg{width:24px;height:24px}

/* کارت‌های شیشه‌ای */
.card{background:var(--glass);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border:1px solid var(--line);border-radius:var(--r);padding:20px;margin:0 0 12px}
.card.gold{border-color:var(--gold)}
.card h2,.card h3{margin:0 0 8px;font-size:18px;font-weight:600;color:var(--gold2)}
.card h3{font-size:15px}
.sec{display:flex;justify-content:space-between;align-items:center;margin:22px 0 12px;font-size:16px;color:#fff;font-weight:400}
.sec a{color:var(--mute);font-size:20px;line-height:1}
.mute{color:var(--mute);font-size:13px}
.grid{display:grid;grid-template-columns:repeat(2,1fr);gap:12px}
.grid3{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.grid4{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}
@media(min-width:560px){.grid4{grid-template-columns:repeat(6,1fr)}.grid3{grid-template-columns:repeat(4,1fr)}}
.tile{display:flex;flex-direction:column;justify-content:flex-end;gap:2px;background:var(--glass);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border:1px solid var(--line);border-radius:var(--r);padding:16px;color:var(--text);cursor:pointer;min-height:120px}
.tile:active{border-color:var(--gold)}
.tile b{display:block;color:var(--text);font-size:13px;font-weight:500}
.tile small{color:var(--mute);font-size:11.5px}
.tile .ic{font-size:30px;color:var(--text);line-height:1.2;margin-bottom:auto}

/* دکمه‌ها */
.btn{display:flex;align-items:center;justify-content:center;gap:6px;background:linear-gradient(90deg,var(--gold2),var(--gold));color:#0e1420;border:0;border-radius:var(--r);min-height:48px;padding:10px 18px;font:inherit;font-size:16px;font-weight:500;cursor:pointer;width:100%}
.btn.ghost{background:transparent;color:var(--gold2);border:1px solid var(--gold2)}
.btn.sm{width:auto;min-height:34px;padding:4px 14px;font-size:13px;display:inline-flex}
.btn:disabled{opacity:.5}
input,select,textarea{width:100%;background:var(--card2);color:var(--text);border:1px solid transparent;border-radius:12px;padding:10px 14px;font:inherit;margin:4px 0 10px}
input:focus,select:focus,textarea:focus{outline:none;border-color:var(--gold)}
select option{background:#18202f}
label{font-size:13px;color:var(--mute)}
.search{position:relative}
.search input{padding-inline-start:40px;height:44px;margin:0 0 14px}
.search::before{content:"⌕";position:absolute;inset-inline-start:14px;top:7px;font-size:20px;color:var(--mute)}
.row{display:flex;gap:8px;align-items:center}
.row>*{flex:1}

/* چیپ‌ها (طرح: قاب نارنجی، فعال = پرشده) */
.chips{display:flex;gap:8px;overflow-x:auto;padding-bottom:6px;margin-bottom:10px;scrollbar-width:none}
.chips::-webkit-scrollbar{display:none}
.chip{flex:none;padding:6px 18px;border-radius:999px;border:1px solid var(--gold);background:transparent;color:var(--gold);font-size:14px;cursor:pointer;white-space:nowrap}
.chip.on{background:var(--gold);color:#0e1420}
.tag{display:inline-flex;align-items:center;gap:4px;font-size:12px;padding:2px 10px;border-radius:18px;border:1px solid var(--gold);color:var(--gold);margin:2px}
.tag.rev{border-color:var(--red);color:var(--red)}
.tag svg{width:14px;height:14px}

/* کارت تاروت */
.tcard{position:relative;border-radius:10px;overflow:hidden;background:#000;aspect-ratio:300/527}
.tcard img{width:100%;height:100%;object-fit:cover;display:block}
.tcard.rev img{transform:rotate(180deg)}
.tcard .lbl{position:absolute;bottom:0;inset-inline:0;background:linear-gradient(transparent,rgba(0,0,0,.85));font-size:11px;padding:16px 4px 4px;text-align:center}
.back{background:#2a3346;border-radius:10px;display:flex;align-items:center;justify-content:center;color:#fff;font-size:30px;font-weight:500;cursor:pointer}
.flip{animation:flip .6s ease}
@keyframes flip{from{transform:rotateY(90deg)}to{transform:rotateY(0)}}
.res{display:flex;gap:16px}
.res .tcard{flex:none;width:96px}

/* بخش‌های تاشو */
details{border-bottom:1px solid var(--soft);margin:0;padding:0 2px}
details summary{cursor:pointer;padding:12px 0;color:var(--text);font-size:15px;list-style:none;display:flex;justify-content:space-between;align-items:center}
details summary::-webkit-details-marker{display:none}
details summary::after{content:"‹";font-size:22px;color:var(--mute);transition:transform .2s}
details[open] summary::after{transform:rotate(-90deg)}
.txt{white-space:pre-wrap;font-size:14px;padding-bottom:10px;color:var(--mute)}
.en{direction:ltr;text-align:left;font-size:13.5px}
.txt b.mh{display:block;color:var(--text);font-size:14.5px;margin-top:6px}
.src{font-size:11.5px;color:var(--gold)}
.more{color:var(--gold);font-size:13px;cursor:pointer;display:inline-block;margin:-4px 0 10px}
.clamp{padding-bottom:0!important;margin-bottom:8px;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:4;overflow:hidden}
table{width:100%;border-collapse:collapse;font-size:13px}
th,td{padding:7px 4px;border-bottom:1px solid var(--soft);text-align:right;vertical-align:top}
th{color:var(--gold2);font-weight:500}
.scroll{overflow-x:auto}
.svgbox{background:radial-gradient(circle,#172033,#0a0e17);border-radius:16px;overflow:hidden;padding:6px}
.svgbox svg{width:100%;height:auto;display:block}
.spin{display:flex;justify-content:center;padding:40px;color:var(--gold)}
.spin::after{content:"";width:34px;height:34px;border:3px solid var(--soft);border-top-color:var(--gold2);border-radius:50%;animation:sp 1s linear infinite}
@keyframes sp{to{transform:rotate(360deg)}}
#toast{position:fixed;bottom:90px;inset-inline:20px;text-align:center;pointer-events:none;z-index:9}
#toast div{display:inline-block;background:#18202f;border:1px solid var(--gold);padding:8px 16px;border-radius:18px;animation:fade 3s forwards}
@keyframes fade{0%,80%{opacity:1}100%{opacity:0}}
.hero{border-color:var(--line)}
.kv{display:grid;grid-template-columns:auto 1fr;gap:4px 12px;font-size:13.5px}
.kv dt{color:var(--mute)}
.kv dd{margin:0}
hr{border:0;border-top:1px solid var(--soft);margin:12px 0}
.center{text-align:center}
.list a.item{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:12px 2px;border-bottom:1px solid var(--soft);color:var(--text)}
.list a.item small{color:var(--mute)}
.bar{height:4px;border-radius:4px;background:rgba(225,225,225,.25);overflow:hidden}
.bar i{display:block;height:100%;background:var(--gold2)}

/* ---- اجزای طرح ---- */
/* سربرگ پروفایل خانه */
.ph{display:flex;align-items:center;gap:20px;margin:8px 0 22px;color:var(--text)}
.ph .av{position:relative;flex:none;width:100px;height:100px;border-radius:50%;border:1px solid var(--gold);display:flex;align-items:center;justify-content:center}
.ph .av span{width:80px;height:80px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:40px;color:var(--gold2);background:radial-gradient(circle at 30% 30%,#3a3220,#0a0f19)}
.ph .av i{position:absolute;bottom:-4px;inset-inline-end:-4px;width:36px;height:36px;border-radius:50%;background:var(--bg);border:1px solid var(--gold);display:flex;align-items:center;justify-content:center;color:var(--gold2)}
.ph .av i svg{width:20px;height:20px}
.ph h2{margin:0 0 4px;font-size:20px;font-weight:400;color:#fff}
.ph h2 b{color:var(--gold2);font-weight:400}
.ph .ln{display:flex;align-items:center;gap:6px;font-size:12px;color:var(--text);margin:2px 0}
.ph .ln svg{width:16px;height:16px;flex:none}
/* کارت ویژه (تصویر + متن) */
.feat{display:flex;gap:16px;align-items:flex-start;color:var(--text)}
.feat .pic{flex:none;width:96px;height:148px;border-radius:12px;overflow:hidden;background:#111}
.feat .pic img{width:100%;height:100%;object-fit:cover;display:block}
.feat .pic.sym{display:flex;align-items:center;justify-content:center;font-size:56px;color:var(--gold2);background:radial-gradient(circle at 50% 35%,#463a22,#0a0f19)}
.feat .ttl{font-size:16px;font-weight:600;color:var(--text);margin:0 0 6px}
.feat .ttl.g{color:var(--gold2)}
.feat .big{font-size:20px;font-weight:700;color:var(--gold2);line-height:1.3}
.feat .sub{font-size:12px;font-weight:700;color:#fff;direction:ltr;text-align:right}
.feat p{font-size:12px;color:var(--mute);margin:8px 0 0;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:4;overflow:hidden;line-height:1.7}
/* اسکرول افقی */
.hs{display:flex;gap:8px;overflow-x:auto;margin:0 -24px;padding:0 24px 4px;scrollbar-width:none}
.hs::-webkit-scrollbar{display:none}
@media(max-width:420px){.hs{margin:0 -16px;padding:0 16px 4px}}
.hs>*{flex:none}
.pt{width:140px;height:134px;display:flex;flex-direction:column;justify-content:space-between;padding:16px;border-radius:var(--r);border:1px solid var(--line);background:var(--glass);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);color:var(--text);font-size:12px;font-weight:500}
.pt.w{width:160px}
.fav{width:240px;height:80px;display:flex;align-items:center;gap:12px;padding:8px 16px;border-radius:18px;border:1px solid var(--line);background:var(--glass);color:var(--text);font-size:12px;font-weight:500}
.fav svg.c{width:56px;height:56px;flex:none}
.fav span{flex:1}
/* شکل چیدمان (کارت‌های خاکستری) */
.shape{display:flex;flex-wrap:wrap;gap:4px;justify-content:center;align-content:center}
.shape i{display:block;width:20px;height:32px;border-radius:3px;background:#6f7890}
.shape.lg{gap:8px}
.shape.lg i{width:34px;height:52px;border-radius:6px;background:#2a3346}
/* شبکه چیدمان‌ها (دو ستونی) */
.sg{display:grid;grid-template-columns:1fr 1fr;gap:12px;align-items:start}
.sg>div{min-width:0}
.sg a{break-inside:avoid;display:block;margin:0 0 12px;padding:14px;border-radius:var(--r);border:1px solid var(--line);background:var(--glass);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);color:var(--text)}
.sg a.f{border-color:var(--gold)}
.sg .h{display:flex;justify-content:space-between;gap:6px;font-size:13px;line-height:1.5;margin-bottom:12px}
.sg .h small{display:block;color:var(--mute);font-size:11px}
.heart{flex:none;width:26px;height:26px;color:var(--text);cursor:pointer;background:none;border:0;padding:0}
.heart svg{width:24px;height:24px}
.heart.on{color:var(--gold2)}
/* صفحه جزئیات چیدمان */
.layout{display:grid;gap:12px;justify-content:center;margin:12px 0 24px}
.layout .back{width:72px;height:108px;font-size:40px}
.big-h{font-size:20px;font-weight:500;color:#fff;margin:20px 0 10px}
ol.qs{list-style:persian;margin:0;padding-inline-start:22px;color:var(--text);font-size:14px}
ol.qs li{margin:6px 0}
ol.qs small{display:block;color:var(--mute);font-size:12px}
/* سربرگ کارت */
.cardhead{display:flex;gap:20px;margin:8px 0 18px}
.cardhead .tcard{width:116px;flex:none;border-radius:12px}
.cardhead h2{font-size:24px;font-weight:500;color:#fff;margin:0 0 4px;line-height:1.3}
.cardhead .lab{font-size:13px;color:var(--text);margin:10px 0 4px}
.sh{font-size:20px;font-weight:500;color:#fff;margin:22px 0 8px}
.sub-h{font-size:14px;font-weight:600;color:#fff;margin:10px 0 4px}
/* اسپلش */
#splash{position:fixed;inset:0;z-index:20;background:#0e1420;display:flex;align-items:center;justify-content:center;transition:opacity .45s}
#splash img{width:min(240px,60vw);height:auto}
#splash.out{opacity:0;pointer-events:none}
/* پیشرفت آموزش */
.learn{width:140px;padding:14px 16px;border-radius:var(--r);border:1px solid var(--line);background:var(--glass);color:var(--text);font-size:13px}
.learn .t{display:flex;gap:8px;align-items:center;margin-bottom:10px;line-height:1.4}
.learn .t b{font-size:26px;font-weight:300;line-height:1}
.learn .p{display:flex;align-items:center;gap:8px;font-size:11px}
.learn .p .bar{flex:1}
.mcard{width:280px;display:flex;gap:12px;padding:20px;border-radius:var(--r);border:1px solid var(--line);background:var(--glass);color:var(--text)}
.mcard .tcard{width:66px;flex:none;border-radius:8px}
.mcard b{display:block;font-size:20px;color:var(--gold2);font-weight:600;line-height:1.3}
.mcard small{display:block;font-size:12px;color:#fff;font-weight:700;direction:ltr;text-align:right}
.mcard p{margin:6px 0 0;font-size:12px;color:var(--mute);display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden}
.pc{width:160px;padding:16px;border-radius:var(--r);border:1px solid var(--gold);background:var(--glass);color:var(--text)}
.pc .h{display:flex;justify-content:space-between;font-size:16px}
.pc .h svg{width:24px;height:24px;color:var(--gold2)}
.pc div{font-size:15px;color:var(--mute)}

/* ===== Stage 7: Behi Astrology ===== */
html,body{overflow-x:hidden}
img,svg,video,canvas{max-width:100%}
body{display:flex;flex-direction:column}
#view{width:100%;flex:1 0 auto}
.topbar .brand{display:none;align-items:center;flex:none}
.topbar .brand img{height:30px;width:auto;display:block}
.topbar .brandic{width:28px;height:28px;border-radius:50%;flex:none}
.topbar.home .brand{display:flex;flex:1;justify-content:center}
.topbar.home .brandic,.topbar.home h1{display:none}
.topbar h1{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
@media(min-width:900px){.topbar .brand{display:flex}.topbar .brandic{display:none}}
.skip{position:absolute;inset-inline-start:-9999px;top:8px;z-index:30;background:var(--gold2);color:var(--bg);padding:8px 14px;border-radius:10px}
.skip:focus{inset-inline-start:8px}
:focus-visible{outline:2px solid var(--gold2);outline-offset:2px}
.foot{max-width:720px;width:100%;margin:24px auto 0;padding:18px 16px 14px;border-top:1px solid var(--soft);text-align:center;color:var(--mute);font-size:12.5px}
.flinks{display:flex;flex-wrap:wrap;justify-content:center;gap:6px 14px;margin-bottom:10px}
.flinks a{color:var(--text);opacity:.85;padding:4px 2px}
.fbrand{display:flex;align-items:center;justify-content:center;gap:6px;color:var(--gold2)}
.fbrand img{border-radius:50%}
.by{margin-top:4px;letter-spacing:.3px}
.by b{color:var(--gold2);font-weight:600}
.page h2{font-size:20px}
.page p,.page li{font-size:14.5px;color:var(--text);line-height:1.95}
.page ul{padding-inline-start:20px;margin:6px 0 12px}
.page .upd{color:var(--mute);font-size:12px}
.faq details summary{font-weight:500}
.faq .a{color:var(--mute);font-size:14px;padding:0 0 12px;line-height:1.9}
.nf{text-align:center;padding:30px 10px}
.nf .code{font-size:64px;color:var(--gold2);font-weight:300;line-height:1}
.nf img{width:96px;height:96px;border-radius:50%;margin:0 auto 12px;display:block}
.setrow{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px 0;border-bottom:1px solid var(--soft)}
.setrow:last-child{border-bottom:0}
.setrow>span{flex:1;min-width:0}
.setrow small{display:block;color:var(--mute);font-size:12px}
.setrow select,.setrow input[type=checkbox]{width:auto;margin:0}
.setrow input[type=checkbox]{width:22px;height:22px;accent-color:var(--gold)}
.btn.danger{background:transparent;color:#e88a78;border:1px solid #e88a78}
.note{background:var(--soft);border-radius:12px;padding:10px 14px;font-size:13px;color:var(--text);margin:10px 0}
html.fs-l{font-size:16.5px}html.fs-l body{font-size:16.5px}
html.fs-xl body{font-size:18px}
html.rm *{animation:none!important;transition:none!important;scroll-behavior:auto!important}
@media(prefers-reduced-motion:reduce){*{animation-duration:.01ms!important;transition-duration:.01ms!important}}

/* ===== Stage 9 ===== */
.racts{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}
.racts .btn{flex:1 1 140px;width:auto}
.hitem{display:flex;align-items:center;gap:8px;border-bottom:1px solid var(--soft)}
.hitem a.item{flex:1;border-bottom:0!important;min-width:0}
.hitem a.item span{min-width:0;overflow-wrap:anywhere}
.hitem .x{flex:none;width:40px;height:40px;border:0;background:none;color:var(--mute);font-size:18px;cursor:pointer;border-radius:50%}
.hitem .x:hover{color:#e88a78}
.onb{text-align:center;padding:24px 18px}
.onb img{width:min(220px,60vw);height:auto;margin:0 auto 10px;display:block}
.onb .dots{display:flex;justify-content:center;gap:6px;margin:16px 0}
.onb .dots i{width:8px;height:8px;border-radius:50%;background:var(--soft)}
.onb .dots i.on{background:var(--gold2);width:22px;border-radius:4px}
.onb ul{text-align:right;display:inline-block;margin:6px auto}
.chip:focus-visible,.tile:focus-visible,a:focus-visible,button:focus-visible{outline:2px solid var(--gold2);outline-offset:2px}
.tabbar a:focus-visible{outline-offset:-4px}
textarea.note-in{min-height:110px}
.sharebox input{direction:ltr;text-align:left}
.layout{max-width:100%;overflow-x:auto}
.cardhead{flex-wrap:wrap}
.cardhead>div{min-width:0}
.res>div:last-child{min-width:0}
.kv dd{min-width:0;overflow-wrap:anywhere}
.txt,.card p{overflow-wrap:anywhere}
@media(max-width:360px){.grid4{grid-template-columns:repeat(3,1fr)}.feat .pic{width:76px;height:118px}.ph{gap:12px}.ph .av{width:80px;height:80px}.ph .av span{width:64px;height:64px;font-size:32px}.cardhead .tcard{width:96px}.sg{grid-template-columns:1fr}}
@media(min-width:1100px){#view{max-width:860px}.foot{max-width:860px}}
