/* Joseon-style Saju MVP — Global Styles */ 
:root{ --paper:#fbf8f1; --ink:#1b1b1b; --ink-fade:#3a3a3a; --accent:#b71c1c; --accent-2:#0f766e; --accent-3:#b45309; --line:#e5dfcf; --muted:#6b7280;
--gold:#b8860b; --wood:#15803d; --water:#0ea5e9; --fire:#dc2626; --earth:#92400e; }
*{box-sizing:border-box} html,body{height:100%} html{scroll-behavior:smooth}
body{ margin:0; background:var(--paper); color:var(--ink);
font-family:"Noto Sans KR", system-ui, -apple-system, Segoe UI, Roboto, Arial, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif; line-height:1.65 }
h1,h2,h3,h4{ font-family:"Song Myung","Gowun Batang",serif; letter-spacing:0.02em; color:var(--ink) }
a{color:var(--accent); text-decoration:none} a:hover{text-decoration:underline}
.container{width:min(1200px, 92vw); margin:0 auto}
.btn{ display:inline-block; padding:12px 18px; border:1px solid var(--ink); background:#fff; color:var(--ink); border-radius:999px; transition:.2s; font-weight:700 }
.btn:hover{transform:translateY(-2px); box-shadow:0 8px 16px rgba(0,0,0,.08)}
.btn-primary{background:var(--ink); color:#fff; border-color:var(--ink)} .btn-primary:hover{background:#000}
.badge{padding:4px 10px; border-radius:999px; border:1px solid var(--line); color:var(--muted); font-size:.85rem}
.site-header{ position:fixed; inset:0 auto auto 0; right:0; height:64px; z-index:50; background:rgba(251,248,241,.8); backdrop-filter:saturate(1.2) blur(6px); border-bottom:1px solid var(--line) }
.nav{display:flex; align-items:center; justify-content:space-between; height:64px}
.brand{display:flex; align-items:center; gap:12px}
.brand .logo{ width:40px; height:40px; border-radius:999px; border:1px solid var(--line); background:radial-gradient(circle at 30% 30%, #fff, #f4ead6); position:relative; }
.brand .logo::after{ content:"卍"; position:absolute; inset:0; display:grid; place-items:center; font-family:"Song Myung",serif; color:var(--accent); font-size:18px; }
.brand b{font-family:"Song Myung","Gowun Batang",serif; font-size:18px}
.nav a{padding:6px 10px; border-radius:8px} .nav .actions{display:flex; align-items:center; gap:8px}
.hero{min-height:96vh; display:grid; place-items:center; position:relative; overflow:hidden}
.hero .inner{width:min(1100px,92vw); display:grid; gap:18px; text-align:center; z-index:2}
.hero h1{font-size:clamp(32px, 5vw, 56px); margin:0} .hero p{color:var(--ink-fade); margin:0 0 10px}
.hero .cta{display:flex; gap:12px; justify-content:center; flex-wrap:wrap}
.hero .seal{ position:absolute; right:5vw; bottom:10vh; width:120px; height:120px; border-radius:50%; border:2px solid var(--accent); color:var(--accent);
display:grid; place-items:center; font-family:"Song Myung",serif; transform:rotate(-8deg); background:rgba(255,255,255,.6); }
.swiper{position:absolute; inset:0; z-index:1}
.swiper .swiper-slide{ background-size:cover; background-position:center; filter:grayscale(.1) contrast(1.05); }
.swiper::after{ content:""; position:absolute; inset:0; background:linear-gradient(to top, rgba(251,248,241,.92), rgba(251,248,241,.45)); z-index:1 }
.section{padding:80px 0; border-top:1px solid var(--line)} .section.alt{background:#fff}
.grid{display:grid; gap:24px} .grid.cols-3{grid-template-columns:repeat(3, 1fr)} @media (max-width:980px){ .grid.cols-3{grid-template-columns:1fr} }
.card{ background:#fff; border:1px solid var(--line); border-radius:18px; padding:20px; box-shadow:0 8px 24px rgba(0,0,0,.04) } .card h3{margin-top:0}
.site-footer{padding:60px 0; border-top:1px solid var(--line); background:#fff} .site-footer .cols{display:grid; grid-template-columns:2fr 1fr 1fr; gap:24px}
@media (max-width:980px){ .site-footer .cols{grid-template-columns:1fr} }
.form{display:grid; gap:14px}
.input, select, .select, textarea{ width:100%; padding:12px 14px; border:1px solid var(--line); border-radius:12px; background:#fff; font-size:16px }
.label{font-weight:700; font-size:.95rem}
.row{display:grid; gap:14px; grid-template-columns:1fr 1fr} @media (max-width:780px){ .row{grid-template-columns:1fr} }
.progress{ display:grid; place-items:center; min-height:70vh; text-align:center; gap:18px } .loader{font-family:"Song Myung"; font-size:64px; letter-spacing:.15em; animation:blink 1.4s infinite}
@keyframes blink{ 0%,100%{opacity:.2} 50%{opacity:1} }
.result .pill{display:inline-flex; align-items:center; gap:8px; padding:6px 10px; border-radius:999px; background:#fff; border:1px solid var(--line); font-size:.9rem}
.kg{display:flex; flex-wrap:wrap; gap:8px} .kg .el{padding:8px 10px; border:1px dashed var(--line); border-radius:8px; font-weight:700}
.el.wood{color:var(--wood)} .el.fire{color:var(--fire)} .el.earth{color:var(--earth)} .el.metal{color:var(--gold)} .el.water{color:var(--water)}
.mobile-bar{ position:fixed; bottom:0; left:0; right:0; background:#fff; border-top:1px solid var(--line); display:flex; justify-content:space-around; padding:8px 12px; z-index:40; }
.mobile-bar a{display:grid; place-items:center; font-size:12px; color:var(--ink)} .mt-2{margin-top:8px} .mt-3{margin-top:12px} .mt-4{margin-top:18px} .mt-6{margin-top:28px}
.center{text-align:center} .hidden{display:none}


/* --- Extra for v2 --- */
.badge.gold{background:rgba(184,134,11,.08); border-color:rgba(184,134,11,.5); color:#8a6d1c}
.note{padding:14px 16px;border:1px dashed var(--line);border-radius:12px;background:#fff8ef}
.prose p{margin:.6rem 0}
.prose h4{margin:1.2rem 0 .4rem 0}
.expert-block{border:1px solid #e5d8b5;background:linear-gradient(180deg,#fffaf0,#fff);border-radius:16px;padding:18px; box-shadow:0 8px 28px rgba(184,134,11,.12)}
.expert-block .cap{display:flex; align-items:center; gap:8px; font-weight:800; color:#8a6d1c}
.expert-block .cap:before{content:"御"; display:inline-grid; place-items:center; width:28px; height:28px; border-radius:50%; background:#8a6d1c; color:#fff; font-family:"Song Myung";}
.card.company{display:flex; gap:16px; align-items:flex-start}
.card.company img.thumb{width:68px;height:68px;border-radius:12px;border:1px solid var(--line);object-fit:cover}
.company-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}
@media (max-width:980px){ .company-grid{grid-template-columns:1fr} }

/* Mini-home themes */
.theme-han .mh-hero{background:#faf4e6;border:1px solid var(--line);border-radius:20px;padding:24px}
.theme-han .mh-title{font-family:"Song Myung";font-size:28px}
.theme-modern .mh-hero{background:#0f172a; color:#e2e8f0; border-radius:20px; padding:24px}
.theme-modern .mh-title{font-weight:900; font-size:26px}
.mh-nav{display:flex; gap:10px; flex-wrap:wrap; margin:10px 0 0}
.mh-nav a{padding:6px 10px;border:1px solid var(--line);border-radius:999px}
.gallery{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}
.gallery img{width:100%;aspect-ratio:4/3;object-fit:cover;border-radius:10px;border:1px solid var(--line)}
@media (max-width:980px){ .gallery{grid-template-columns:repeat(2,1fr)} }
.reviews .review{border:1px solid var(--line);border-radius:12px;padding:12px;margin-top:10px;background:#fff}


/* v4 additions */
.bazi-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}
.bazi-col{display:grid;grid-template-rows:auto 1fr 1fr;gap:8px; align-items:center; text-align:center}
.bazi-box{border:2px solid var(--ink); border-radius:8px; font-family:"Song Myung"; font-size:42px; display:grid; place-items:center; height:86px; box-shadow:inset 0 0 0 3px rgba(255,255,255,.3)}
.bazi-box.small{font-size:32px;height:70px}
.bazi-wood{background:#e8f5e9; border-color:#166534; color:#14532d}
.bazi-fire{background:#fee2e2; border-color:#b91c1c; color:#7f1d1d}
.bazi-earth{background:#fef3c7; border-color:#b45309; color:#78350f}
.bazi-metal{background:#f3f4f6; border-color:#6b7280; color:#374151}
.bazi-water{background:#e0f2fe; border-color:#0369a1; color:#0c4a6e}
.bazi-unknown{background:#fff; border-style:dashed; color:#9ca3af}
.ten-table{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}
.ten-item{border:1px solid var(--line);border-radius:10px;background:#fff;padding:10px;text-align:center;font-weight:700}

.modal{position:fixed; inset:0; display:none; background:rgba(0,0,0,.4); z-index:60; }
.modal .panel{background:#fff; width:min(640px,92vw); margin:8vh auto; border-radius:16px; padding:18px; border:1px solid var(--line)}
.modal.show{display:block}
.slot-grid{display:grid;grid-template-columns:repeat(4,1fr); gap:8px}
.slot{padding:10px;border:1px solid var(--line);border-radius:10px;text-align:center;cursor:pointer}
.slot.selected{outline:2px solid var(--ink); font-weight:800}
.expert-list{display:grid;grid-template-columns:repeat(2,1fr); gap:8px}
.expert-item{border:1px solid var(--line); border-radius:12px; padding:10px; display:flex; gap:10px; align-items:center; background:#fff}
.expert-item img{width:48px;height:48px;object-fit:cover;border-radius:10px;border:1px solid var(--line)}
