:root{--bg:#030217;--ivory:#f4edde;--gold:#d5b684;--muted:#aaa0b9;--purple:#b747df}*{box-sizing:border-box}html{background:var(--bg);color:var(--ivory);scroll-behavior:smooth}body{margin:0;font-family:'Songti SC','Noto Serif CJK SC','STSong',Georgia,serif;min-height:100svh;overflow-x:hidden}button,a{-webkit-tap-highlight-color:transparent}button{font:inherit;color:inherit;cursor:pointer}button:focus-visible,a:focus-visible{outline:2px solid var(--gold);outline-offset:6px}button{border:0}header{height:90px;padding:20px 5vw;display:flex;align-items:center;justify-content:space-between;position:relative;z-index:5}.brand{background:none;font-family:Georgia,serif;color:var(--gold);font-size:34px;line-height:1;display:flex;align-items:center;gap:14px}.brand span{font-size:10px;letter-spacing:3px}.header-right{display:flex;gap:24px}.subtle{background:none;color:#c5b8cc;font-size:13px;letter-spacing:1px;padding:8px}.subtle:hover{color:var(--gold)}#stars{position:fixed;inset:0;z-index:0;pointer-events:none;background-image:radial-gradient(1px 1px at 12% 24%,#bfb0d0 70%,transparent),radial-gradient(1px 1px at 83% 48%,#bfb0d0 70%,transparent),radial-gradient(1px 1px at 44% 82%,#bfb0d0 70%,transparent),radial-gradient(1px 1px at 65% 12%,#bfb0d0 70%,transparent);background-size:430px 390px;opacity:.3}#scene{position:fixed;inset:0;pointer-events:none;z-index:0;background-position:center;background-size:cover;opacity:0;transition:opacity 1s}main{position:relative;z-index:1;min-height:calc(100svh - 155px);padding:0 24px 40px}footer{position:relative;text-align:center;font-family:system-ui,sans-serif;font-size:10px;letter-spacing:2px;color:#746b83;padding:15px 16px 25px}footer span{padding:0 12px;color:#bfa175}.landing{max-width:950px;margin:auto;text-align:center;padding:5px 0 20px}.eyebrow{text-transform:uppercase;font-family:Georgia,serif;color:var(--gold);font-size:11px;letter-spacing:5px;margin:20px 0}.landing h1{font-size:clamp(35px,5vw,66px);font-weight:400;letter-spacing:8px;margin:14px 0 18px}.landing .lead{font-size:15px;line-height:2;color:#c6bcd1;letter-spacing:2px}.hat-wrap{position:relative;width:230px;height:245px;margin:0 auto 10px;display:grid;place-items:center}.hat-wrap:before{content:'';position:absolute;width:280px;height:280px;background:radial-gradient(ellipse,#6c1a9766,transparent 67%);animation:breathe 5s infinite}.hat-wrap img{position:relative;width:200px;height:235px;object-fit:contain;animation:float 6s ease-in-out infinite;filter:drop-shadow(0 0 25px #8c268944)}.ornament{color:var(--gold);opacity:.7;font-size:18px;letter-spacing:10px;margin:24px 0}.primary{position:relative;min-width:220px;background:linear-gradient(120deg,#d7bc8a,#b78a52);color:#1d1228;padding:16px 30px;font-weight:600;font-size:16px;letter-spacing:4px;clip-path:polygon(10px 0,calc(100% - 10px) 0,100% 10px,100% calc(100% - 10px),calc(100% - 10px) 100%,10px 100%,0 calc(100% - 10px),0 10px);transition:filter .25s,transform .25s}.primary:hover{filter:brightness(1.15);transform:translateY(-2px)}.primary:disabled{opacity:.3;cursor:not-allowed;transform:none}.small-note{font-family:system-ui,sans-serif;color:#a398af;font-size:11px;letter-spacing:1px;margin:16px 0}.house-marks{display:flex;justify-content:center;gap:22px;margin:30px 0 0}.house-marks img{width:35px;height:42px;opacity:.75;object-fit:contain}.quiz{max-width:1100px;margin:auto;text-align:center;padding-top:12px;animation:appear .7s ease-out}.progress-meta{display:flex;justify-content:space-between;align-items:center;max-width:670px;margin:0 auto;color:var(--gold);font-size:11px;letter-spacing:3px}.progress-meta button{background:none;color:#a798b3;font-size:12px;padding:8px;letter-spacing:1px}.progress{max-width:650px;height:1px;background:#34243c;margin:10px auto 52px}.progress span{display:block;height:1px;background:var(--gold);transition:width .6s}.chapter{font-size:10px;letter-spacing:5px;color:#ac8fa8;margin-bottom:22px}.quiz h1{font-size:clamp(24px,3vw,36px);line-height:1.7;font-weight:400;letter-spacing:2px;margin:0 auto;max-width:850px;white-space:pre-line}.english{font-size:13px;font-family:Georgia,serif;color:#887b99;margin:12px auto 32px;max-width:770px;line-height:1.6}.options{display:flex;justify-content:center;gap:16px;max-width:1050px;margin:20px auto 28px;flex-wrap:wrap}.option{background:none;position:relative;width:160px;min-height:202px;padding:15px 8px 20px;border:1px solid transparent;border-radius:3px;transition:background .35s,border-color .35s,transform .35s;display:flex;align-items:center;flex-direction:column}.option:before{content:'';position:absolute;inset:5px;background:radial-gradient(ellipse at 50% 50%,#7b26963b,transparent 68%);opacity:0;transition:opacity .3s;pointer-events:none}.option:hover{transform:translateY(-5px)}.option:hover:before,.option.selected:before{opacity:1}.option.selected{border-color:#bb9b6f88;background:linear-gradient(150deg,#30113d44,transparent)}.option img{width:140px;height:140px;object-fit:contain;position:relative;transition:filter .3s}.option:hover img,.option.selected img{filter:drop-shadow(0 0 16px #a736ca66)}.option-label{position:relative;font-size:17px;letter-spacing:2px;line-height:1.6}.option-en{position:relative;color:#8e819e;font-family:Georgia,serif;font-size:10px;margin-top:7px}.option.selected:after{content:'✦';position:absolute;bottom:-8px;left:calc(50% - 8px);color:var(--gold);background:var(--bg);width:16px;font-size:14px}.options.two{gap:80px}.options.two .option{width:190px}.options.two img{width:175px;height:175px}.options.two .option{min-height:235px}.options.power .option{width:150px}.options.power img{height:130px;width:130px}.options.power .option-label{font-size:15px;letter-spacing:1px}.options.text .option{width:220px;border:1px solid #7f647c55;min-height:190px;justify-content:center;padding:24px 22px}.options.text .option-label{font-size:16px;letter-spacing:1px}.options.text .option-en{font-size:11px;line-height:1.7;margin-top:18px}.troll-banner{height:155px;width:min(100%,380px);object-fit:cover;object-position:center 25%;border-radius:50% 50% 0 0;margin:-22px auto 20px;mask-image:linear-gradient(#000 75%,transparent)}.quiz.troll h1{font-size:clamp(19px,2.2vw,26px)}.quiz.troll .progress{margin-bottom:30px}.quiz.troll .english{font-size:11px;margin-bottom:10px}.quiz.troll .options{margin-top:15px}.quiz .nav{margin:25px 0 0}.selection-hint{min-height:18px;font-size:12px;color:#a292ac;letter-spacing:2px;margin-top:16px}.pet-back{background:none;color:var(--gold);border-bottom:1px solid #6d536b;padding:4px;margin:0 0 14px;font-size:12px;letter-spacing:2px}.transition{height:calc(100svh - 240px);display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;animation:appear .6s}.transition p{font-size:25px;letter-spacing:5px;text-shadow:0 2px 20px #000}.transition .eyebrow{font-size:11px}.transition .hat-wrap{width:210px}.result{max-width:900px;margin:0 auto;text-align:center;animation:appear 1.5s}.result .eyebrow{margin-top:5px}.crest{width:230px;height:285px;object-fit:contain;filter:drop-shadow(0 0 30px var(--house-glow));margin:10px 0}.result h1{font-size:clamp(38px,6vw,58px);font-weight:400;letter-spacing:10px;margin:4px 0 8px}.result .house-en{font-family:Georgia,serif;color:var(--gold);font-size:15px;letter-spacing:6px}.traits{color:#d9c5a1;font-size:14px;letter-spacing:5px;margin:22px 0}.quote{font-size:21px;line-height:1.9;white-space:pre-line;margin:25px 0}.result-copy{max-width:620px;margin:0 auto;font-size:15px;line-height:2;color:#b6a8c1;letter-spacing:1px}.result-actions{display:flex;flex-wrap:wrap;justify-content:center;gap:15px;margin:30px 0}.outline{background:#0d071d77;border:1px solid #94795a88;padding:13px 24px;color:#d8bd91;font-size:13px;letter-spacing:2px}.outline:hover{background:#39223b66}.affinity{max-width:600px;margin:45px auto;text-align:left;padding:26px;border-top:1px solid #b59b6a44;border-bottom:1px solid #b59b6a44}.affinity h2,.details-title{font-weight:400;letter-spacing:3px;font-size:20px;margin:0 0 24px}.bar-row{display:grid;grid-template-columns:90px 1fr 44px;align-items:center;gap:16px;font-size:13px;margin:16px 0}.bar{height:3px;background:#35273c}.bar span{display:block;height:3px;background:var(--gold)}.affinity p{color:#90809b;font-size:11px;line-height:1.8;margin-bottom:0}.answer-details{text-align:left;max-width:700px;margin:35px auto}.answer-details details{border-bottom:1px solid #3f2d48;padding:18px 0}.answer-details summary{cursor:pointer;color:#d5c4df;font-size:14px;line-height:1.7}.answer-details p{font-family:system-ui,sans-serif;font-size:12px;line-height:1.9;color:#a899b5;margin:12px 0 0}.all-houses{max-width:650px;margin:45px auto}.all-houses h2{font-size:19px;font-weight:400;letter-spacing:3px}.house-tabs{display:flex;justify-content:center;gap:14px;flex-wrap:wrap}.house-tab{background:none;width:110px;padding:15px 5px;border:1px solid transparent}.house-tab:hover,.house-tab.active{border-color:#9c7b4e66;background:#30153c44}.house-tab img{width:55px;height:70px;object-fit:contain;display:block;margin:0 auto 10px}.house-tab span{font-size:12px;letter-spacing:1px}.house-preview{font-size:13px;line-height:2;color:#b5a5c0;min-height:62px;padding:10px}dialog{width:min(850px,92vw);max-height:85svh;background:#100b22;color:var(--ivory);border:1px solid #ab875455;padding:45px 35px;line-height:1.9}dialog::backdrop{background:#02010ec9;backdrop-filter:blur(8px)}.close{position:absolute;right:15px;top:10px;background:none;font-size:30px;color:var(--gold)}dialog h2{font-size:25px;font-weight:400;letter-spacing:3px}dialog h3{font-size:18px;font-weight:400;color:var(--gold);margin-top:30px}dialog p,dialog li{font-family:system-ui,sans-serif;font-size:13px;color:#bfb2ca}a{color:var(--gold);text-underline-offset:4px}dialog table{width:100%;border-collapse:collapse;font-family:system-ui,sans-serif;font-size:11px;text-align:left;margin:15px 0}dialog th,dialog td{border-bottom:1px solid #42304c;padding:8px 5px}dialog th{color:var(--gold)}#toast{position:fixed;z-index:20;bottom:30px;left:50%;transform:translateX(-50%);padding:12px 22px;background:#35233f;border:1px solid #a78455;color:#efdcb8;font-size:13px;opacity:0;transition:opacity .3s;pointer-events:none;max-width:90vw}#toast.visible{opacity:1}@keyframes float{50%{transform:translateY(-10px) rotate(2deg)}}@keyframes breathe{50%{opacity:.5;transform:scale(1.15)}}@keyframes appear{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:translateY(0)}}@media(max-width:650px){header{height:75px;padding:16px 20px}.brand span{display:none}.header-right{gap:6px}.subtle{font-size:11px}main{padding:0 15px 25px}.landing{padding-top:15px}.landing h1{letter-spacing:5px}.landing .lead{font-size:13px}.hat-wrap{height:210px}.hat-wrap img{height:200px;width:180px}.progress{margin-bottom:35px}.quiz{padding-top:4px}.quiz h1{letter-spacing:1px}.english{font-size:11px;margin:12px auto 22px}.options{gap:5px;margin:15px auto 22px}.option{width:calc(33.33% - 5px);min-height:160px;padding:12px 3px}.option img{width:100%;max-width:115px;height:110px}.option-label{font-size:15px;letter-spacing:1px}.option-en{font-size:9px;line-height:1.5}.options.two{gap:20px}.options.two .option{width:140px;min-height:205px}.options.two img{width:140px;height:150px}.options.power .option{width:calc(33.33% - 5px)}.options.power img{width:100px;height:110px}.options.power .option-label{font-size:13px}.options.text{gap:10px}.options.text .option{width:calc(50% - 7px);min-height:175px;padding:15px 12px}.options.text .option-label{font-size:14px}.options.text .option-en{font-size:10px}.quiz.troll .progress{margin-bottom:30px}.troll-banner{height:115px}.quiz.troll h1{font-size:18px}.quiz.troll .english{display:none}.quiz .nav{margin-top:15px}.crest{width:200px;height:240px}.result h1{letter-spacing:6px}.quote{font-size:18px}.result-copy{font-size:13px}.result-actions{gap:8px}.result-actions .primary{min-width:160px}.outline{padding:12px 16px}.affinity{padding:22px 5px}.bar-row{grid-template-columns:78px 1fr 38px;gap:10px}.house-tabs{gap:3px}.house-tab{width:80px}.house-tab img{width:45px}dialog{padding:35px 20px}.eyebrow{letter-spacing:3px;font-size:10px}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important}html{scroll-behavior:auto}}
@media(max-width:650px){.landing h1{font-size:30px;letter-spacing:3px}.options.two{gap:12px}.options.two .option{width:calc(50% - 10px)}.options.two img{width:100%;max-width:140px}.progress-meta{font-size:9px;letter-spacing:2px}}
@media(max-width:650px){.options:has(.option:nth-child(4)):not(:has(.option:nth-child(5))) .option{width:calc(50% - 7px)}.options.text .option{width:calc(50% - 7px)}}
