:root{--purple:#4b3869;--orange:#f5a623;--bg:#f4f1ee;--ink:#302a36;--muted:#776e7b;--border:#e7dfeb}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font:15px/1.55 system-ui,-apple-system,'Noto Sans',sans-serif}a{color:var(--purple)}.shell{max-width:1150px;margin:auto;padding:20px}.top{background:#fff;border-bottom:1px solid var(--border)}.top .shell{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap}.brand{font-family:Georgia,serif;color:var(--purple);font-size:22px;font-weight:bold;text-decoration:none;letter-spacing:1px}.brand small{display:block;font:11px system-ui;color:#a47430;letter-spacing:2px}nav{display:flex;flex-wrap:wrap;gap:14px}nav a{text-decoration:none;font-weight:600}.card{background:white;border:1px solid var(--border);border-radius:16px;padding:23px;margin:15px 0;box-shadow:0 4px 20px #32183e0b}.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:15px}.grid .card{margin:0}.btn,button{display:inline-block;background:var(--purple);color:#fff;border:0;border-radius:9px;padding:10px 17px;font:inherit;font-weight:600;cursor:pointer;text-decoration:none}.btn.secondary,button.secondary{background:#eae3ef;color:var(--purple)}.btn.orange{background:var(--orange);color:#241727}input,select,textarea{display:block;width:100%;padding:10px 12px;border:1px solid #d6cedb;border-radius:9px;background:#fff;color:var(--ink);font:inherit}textarea{min-height:110px}label{display:block;font-weight:600;margin:12px 0 5px}.inline{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.inline input[type=checkbox]{width:auto}h1,h2,h3{color:var(--purple);line-height:1.2}h1{font-size:29px}h2{font-size:21px}.muted,small{color:var(--muted)}.alert{background:#fff0db;border:1px solid #e6c68b;padding:13px;border-radius:10px}.error{background:#ffe9e9;border-color:#ffb8b8}.tablewrap{overflow:auto}table{width:100%;border-collapse:collapse}td,th{padding:10px;border-bottom:1px solid var(--border);text-align:left;vertical-align:top}.pill{background:#eee7f3;padding:3px 9px;border-radius:100px;font-size:12px}.cardpick{display:grid;grid-template-columns:70px 1fr;gap:12px;align-items:center;padding:12px;border:1px solid var(--border);border-radius:12px;margin:10px 0}.tarotart{height:105px;border-radius:8px;background:linear-gradient(155deg,#39254d,#8e6a8c);border:4px double #f4cc87;color:#f4cc87;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;font-family:Georgia,serif;font-size:11px;padding:4px}.tarotart b{font-size:27px}.picker{max-height:330px;overflow:auto;border:1px solid var(--border);border-radius:12px;padding:7px}.pickrow{display:flex;align-items:center;gap:12px;padding:7px;cursor:pointer;border-bottom:1px solid #eee}.pickrow:hover{background:#f5f0f7}.pickrow .tarotart{height:65px;width:48px;flex:none;font-size:7px}.pickrow .tarotart b{font-size:17px}.report{max-width:790px;margin:20px auto;background:#fff;padding:42px;box-shadow:0 10px 40px #0001}.reportcover{text-align:center;padding:70px 10px;border:2px solid #d7b776;min-height:430px}.reportcover h1{font:36px Georgia,serif;letter-spacing:3px}.reportcover .tagline{color:#bb792a}.reportitem{break-inside:avoid;border-top:1px solid #e7d8c3;padding:20px 0}.reportitem .tarotart{width:105px;height:150px;float:left;margin:0 20px 10px 0}.reportfooter{font-size:12px;color:#6c5e70;border-top:1px solid #ddd;padding-top:15px}.no-print{}.stat{font-size:36px;font-weight:800;color:var(--purple)}@media(max-width:640px){.shell{padding:12px}.card{padding:15px}.report{padding:18px}.reportcover{min-height:280px;padding:45px 10px}}@media print{@page{size:A4;margin:15mm}body{background:white}.no-print,.top,button{display:none!important}.shell{max-width:none;padding:0}.report{box-shadow:none;max-width:none;margin:0;padding:0}.reportcover{page-break-after:always}.reportitem{break-inside:avoid}a{color:inherit;text-decoration:none}}

/* SvasthaSutra v2 */
:root{--bg:#f4f1ee;--purple:#4b3869;--border:#e8d8c3}body{font-family:Inter,'Noto Sans Malayalam','Noto Sans Tamil','Noto Sans Devanagari',system-ui,sans-serif;background:#f4f1ee}.top{background:#fbf7f3}.top .shell{max-width:1380px}.brand{display:flex;align-items:center;gap:10px}.brand img{width:175px;max-height:48px;object-fit:contain}.brand small{display:none}nav a{font-size:13px;color:#5d5362}.shell{max-width:1320px}.card{border-color:#e8d8c3;box-shadow:0 8px 25px #4b386909}.cardpick{grid-template-columns:100px 1fr;background:#fffaf5}.tarotart{width:100%;height:150px;object-fit:contain;background:#39254d;border:0;border-radius:7px;padding:0}.pickrow .tarotart{width:54px;height:86px;object-fit:cover;border:0}.audio-player{display:flex;align-items:center;gap:12px;padding:10px 15px;background:#fff7ed;border:1px solid #e8d8c3;border-radius:12px;margin:10px 0}.audio-player button{background:#4b3869}.audio-player span{color:#6a4e77;font-size:12px}.report{font-family:Inter,'Noto Sans Malayalam','Noto Sans Tamil','Noto Sans Devanagari',sans-serif;max-width:900px;padding:0;background:white}.report h1,.report h2,.report h3{color:#4b3869}.reportpage{padding:45px 45px 60px;min-height:930px;page-break-before:always;position:relative;background:#fffdf9;border-bottom:1px solid #e8d8c3}.reportpage h2{border-bottom:2px solid #f5a623;padding-bottom:13px}.reportcover{min-height:1050px;border:8px double #e8d8c3;background:#fffdf9 url('reading-board.png') center/cover no-repeat;display:flex;flex-direction:column;justify-content:space-between;align-items:center;padding:70px 30px}.reportcover h1{font-family:Georgia,serif;font-size:32px}.reportlogo{width:250px;max-height:100px;object-fit:contain}.reporttag{font-size:11px;letter-spacing:4px;color:#9d6b32}.covermain{margin:auto 0;background:#fffdf9e8;border-radius:18px;padding:30px}.ornament{font-size:40px;color:#ff914d}.detailgrid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.detailgrid>div{padding:14px;background:#f4f1ee;border-radius:9px}.detailgrid strong,.detailgrid small{display:block}.questionbox{border-left:4px solid #ff914d;background:#fff4e8;padding:18px;white-space:normal}.spreadgrid{display:grid;grid-template-columns:repeat(auto-fit,minmax(125px,1fr));gap:15px}.spreadcard{text-align:center}.spreadcard .tarotart{height:240px;object-fit:contain}.spreadcard strong,.spreadcard small{display:block}.reportcard{display:grid;grid-template-columns:190px 1fr;gap:22px;margin:20px 0}.reportcard .tarotart{height:300px}.readingtext{white-space:normal;line-height:1.85}.guidancebox{background:#edf4ec;border-left:4px solid #7a9e7e;padding:20px;border-radius:8px;margin:20px 0}.reportlast{text-align:center}.reportlast h2,.reportlast p{text-align:left}.reporthead{max-width:200px;height:auto}.reportfooter{margin-top:70px}.reportpage p{overflow-wrap:anywhere}@media(max-width:700px){.reportpage{padding:20px;min-height:auto}.reportcard{grid-template-columns:110px 1fr}.reportcard .tarotart{height:170px}.reportcover{min-height:640px}.audio-player{flex-wrap:wrap}}@media print{@page{size:A4;margin:0}body{background:#fff!important;-webkit-print-color-adjust:exact;print-color-adjust:exact}.report{max-width:none;width:210mm;margin:0;padding:0;box-shadow:none}.reportcover,.reportpage{width:210mm;min-height:297mm;break-before:page;break-after:page;box-sizing:border-box}.reportcover{break-before:auto}.reportpage{padding:18mm 17mm 20mm}.reportcard{break-inside:avoid}.spreadcard{break-inside:avoid}.reportpage:last-child{break-after:auto}.top,.audio-player,.no-print{display:none!important}}

/* v3: mobile-native navigation and printable A4 report */
.mobile-bottom-nav,.mobile-more{display:none}
@media(max-width:760px){
 body{padding-bottom:calc(76px + env(safe-area-inset-bottom,0px))}
 .top nav{display:none}
 .top .shell{padding:9px 15px}
 .brand img{width:155px;max-height:44px}
 .mobile-bottom-nav{position:fixed;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));bottom:0;left:0;right:0;z-index:1000;background:#fffaf7;border-top:1px solid #e8d8c3;box-shadow:0 -6px 24px #32183e16;padding:7px 5px calc(8px + env(safe-area-inset-bottom,0px));gap:0}
 .mobile-bottom-nav a,.mobile-bottom-nav button{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:1px;background:transparent;border:0;color:#6a4e77;font:600 11px/1.2 Inter,system-ui,sans-serif;text-decoration:none;padding:5px 0;border-radius:10px;min-height:48px}
 .mobile-bottom-nav span{font-size:24px;line-height:1.1}
 .mobile-bottom-nav button{font-size:25px;line-height:1}
 .mobile-bottom-nav button small{font-size:11px;color:inherit}
 .mobile-bottom-nav a[href="?page=new"]{color:#f07827}
 .mobile-more:not([hidden]){display:flex;flex-direction:column;position:fixed;bottom:calc(74px + env(safe-area-inset-bottom,0px));left:10px;right:10px;z-index:999;background:#fffaf7;border:1px solid #e8d8c3;border-radius:20px;padding:12px 18px;box-shadow:0 -12px 38px #241b3330}
 .mobile-more a{padding:13px 8px;border-bottom:1px solid #eee1d5;text-decoration:none;font-weight:600}
 .mobile-more-header{display:flex;justify-content:space-between;align-items:center}
 .mobile-more-header button{background:#f4f1ee;color:#4b3869;padding:6px 12px}
 .cardpick{grid-template-columns:85px minmax(0,1fr)}
 .cardpick .tarotart{height:132px}
 .report{width:100%;overflow:hidden}
 .reportcover{min-height:unset;aspect-ratio:210/297}
}
.reportcover{position:relative;isolation:isolate;background-image:url('reading-board.png');background-position:center center;background-size:100% 100%;padding:25mm 16mm 18mm;min-height:297mm}
.reportcover::before{content:"";position:absolute;inset:0;background:linear-gradient(to bottom,rgba(255,253,249,.20),rgba(255,253,249,.15));z-index:-1}
.reportcover .cover-brand,.reportcover .reporttag{display:none}
.reportcover .covermain{margin:85mm 0 20mm;padding:11mm 8mm;max-width:170mm;width:100%;background:rgba(255,253,249,.94);border:1px solid #eedcc7}
.reportcover .covermain h1{font-size:26px;line-height:1.25;letter-spacing:1px}
.reportcover .covermain h2{font-size:19px}
.reportpage{min-height:unset}
.reportpage h2{line-height:1.35}
.reportcard,.guidancebox,.detailgrid>div,.spreadcard{break-inside:avoid;page-break-inside:avoid}
@media print{
 @page{size:A4;margin:0}
 html,body{margin:0!important;padding:0!important;width:210mm}
 .report{width:210mm!important;margin:0!important}
 .reportcover{width:210mm!important;height:297mm!important;min-height:297mm!important;max-height:297mm!important;overflow:hidden!important;break-after:page;page-break-after:always}
 .reportpage{width:210mm!important;min-height:297mm!important;height:auto!important;overflow:visible!important;break-before:page;page-break-before:always;break-after:page;page-break-after:always;padding:18mm 17mm}
 .reportpage:last-child{break-after:auto;page-break-after:auto}
 .mobile-bottom-nav,.mobile-more{display:none!important}
 .reportcover .covermain{margin:85mm 0 20mm}
}

/* v4: use correct aspect-ratio logo and stop distorting landscape board */
.reportcover{background-size:cover!important;background-position:center center!important;justify-content:flex-start!important}
.reportcover .cover-brand{display:block!important;position:relative;z-index:2;width:min(125mm,90%)!important;max-width:100%!important;height:auto!important;max-height:none!important;object-fit:contain!important;aspect-ratio:1520/223;margin:5mm auto 0!important;padding:2mm 5mm;background:rgba(255,253,249,.98);border-radius:5mm;box-sizing:border-box}
.reportcover .covermain{margin:62mm auto 10mm!important}
@media print{.reportcover{background-size:cover!important}.reportcover .cover-brand{width:125mm!important;height:auto!important;max-height:none!important}.reportcover .covermain{margin:62mm auto 10mm!important}}
