@font-face{font-family:"LH Editorial";src:url("/fonts/lh-editorial.woff2") format("woff2");font-style:normal;font-weight:400;font-display:swap}
:root{color-scheme:light;--paper:#f5f3ed;--surround:#ebe9e2;--card:#fbfaf6;--ink:#30322f;--muted:#656760;--faint:#8c8d84;--rule:#dfdbd0;--accent:#926b56;--button:#373c32;--button-hover:#535c49;--tint:#ece8df;--deep:#5c6155;--serif:"LH Editorial",ui-serif,Georgia,serif;--sans:-apple-system,BlinkMacSystemFont,"PingFang SC","Hiragino Sans GB","Microsoft YaHei","Noto Sans CJK SC",sans-serif;font-synthesis:none}
/* The four groups borrow the homepage card colours: trio. (NT), StudyRoom (NF), LiveClicker (SJ) and duo. (SP). */
[data-group="NT"]{--tint:#e6e4ec;--deep:#585670}
[data-group="NF"]{--tint:#e7e9de;--deep:#56684a}
[data-group="SJ"]{--tint:#dfe7e8;--deep:#435c60}
[data-group="SP"]{--tint:#eee7d6;--deep:#66593c}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;min-height:100vh;min-height:100dvh;background:var(--paper);color:var(--ink);font:15px/1.7 var(--sans);-webkit-font-smoothing:antialiased;touch-action:manipulation}
button{font:inherit;color:inherit;cursor:pointer;border:0;background:none;padding:0;-webkit-tap-highlight-color:transparent}
button:disabled{cursor:default}
a{color:inherit;-webkit-tap-highlight-color:transparent}
:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
h1,h2,h3,p,ul,dl,dd{margin:0}
ul{padding:0;list-style:none}
[hidden]{display:none!important}
svg{width:22px;height:22px;flex-shrink:0;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.icon-library{position:absolute;width:0;height:0;overflow:hidden}
.numeral{font-family:var(--serif);font-weight:400;font-variant-numeric:lining-nums tabular-nums}
.sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
.offscreen{position:fixed;top:0;left:-9999px;opacity:0}

.app-shell{width:100%;max-width:480px;min-height:100vh;min-height:100dvh;margin:0 auto;display:flex;flex-direction:column;background:var(--paper);padding:max(10px,env(safe-area-inset-top)) 20px max(18px,env(safe-area-inset-bottom))}
.topbar{display:flex;align-items:center;justify-content:space-between;height:48px;margin:0 -8px 6px;flex-shrink:0}
.icon-button{width:44px;height:44px;border-radius:50%;display:grid;place-items:center;text-decoration:none;transition:background .15s}
.icon-button:hover{background:#ebe8df}
.wordmark{font-family:var(--serif);font-size:27px;line-height:1;letter-spacing:-.02em}
.wordmark span{color:var(--accent)}
.screens{flex:1;display:flex;flex-direction:column}
.screen{flex:1;display:flex;flex-direction:column}

.primary-button{width:100%;display:flex;align-items:center;justify-content:center;gap:10px;min-height:52px;padding:0 16px;border-radius:12px;background:var(--button);color:#f8f7f2;font-size:15px;transition:background .2s}
.primary-button:hover:not(:disabled){background:var(--button-hover)}
.primary-button:disabled{opacity:.45}
.primary-button svg{width:18px;height:18px}
.secondary-button{width:100%;display:flex;align-items:center;justify-content:center;gap:8px;min-height:48px;padding:0 16px;border:1px solid var(--rule);border-radius:12px;background:var(--card);font-size:14px;transition:background .15s}
.secondary-button:hover{background:#f3efe6}
.secondary-button svg{width:18px;height:18px}
.text-button{width:100%;min-height:44px;color:var(--accent);font-size:13.5px}
.text-button:hover{text-decoration:underline;text-underline-offset:4px}

/* Intro */
.intro{padding-top:14px}
.intro h1{font-size:26px;font-weight:600;letter-spacing:.03em;line-height:1.4}
.edition{display:grid;grid-template-columns:1fr 1fr;gap:4px;margin-top:16px;padding:4px;border-radius:14px;background:#ebe7de}
.edition-option{display:flex;align-items:baseline;justify-content:center;gap:2px;min-height:46px;padding:0 8px;border-radius:10px;color:var(--muted);font-size:14px;transition:background .15s,color .15s,box-shadow .15s}
.edition-option .numeral{margin-right:1px;font-size:21px}
.edition-option small{margin-left:8px;font-size:12px}
.edition-option[aria-pressed="true"]{background:var(--card);color:var(--ink);box-shadow:0 1px 3px rgba(40,36,30,.13)}
.lede{margin-top:12px;color:var(--muted);font-size:14px;line-height:1.85}
.type-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;margin:26px 0 30px}
.type-cell{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:58px;padding:8px 2px 7px;border-radius:11px;background:var(--tint);color:var(--deep);line-height:1.3;transition:transform .15s,box-shadow .15s}
.type-cell .numeral{font-size:17px;letter-spacing:.03em}
.type-cell small{font-size:11px}
.type-cell img{width:46px;height:46px;margin-bottom:3px}
.type-cell.mine{box-shadow:inset 0 0 0 1.5px var(--deep)}
@media(hover:hover){.type-cell:hover{box-shadow:inset 0 0 0 1px var(--deep)}}
.type-cell:active{transform:scale(.97)}
.intro-actions{display:flex;flex-direction:column;gap:4px}

/* Questions */
.quiz{padding-top:8px}
.progress{display:flex;align-items:center;gap:14px}
.count{min-width:4.2em;font-size:17px;line-height:1;white-space:nowrap}
.count .total{color:var(--muted);font-size:14px}
.track{flex:1;height:4px;border-radius:2px;background:#e4dfd4;overflow:hidden}
.track i{display:block;height:100%;background:var(--accent);transform-origin:0 50%;transform:scaleX(0);transition:transform .35s ease}
.question{flex:1;display:flex;align-items:center;min-height:190px;padding:28px 2px}
.statement{font-size:21px;font-weight:500;line-height:1.75;letter-spacing:.01em}
.question.turn .statement{animation:turn .34s cubic-bezier(.2,.7,.3,1)}
.answer{padding-bottom:6px}
.scale{display:flex;align-items:center;justify-content:space-between}
.choice{--d:28px;--c:#a8745a;--s:#f0e4dc;flex:0 0 auto;width:44px;height:54px;display:grid;place-items:center;border-radius:12px}
.choice i{display:block;width:var(--d);height:var(--d);border-radius:50%;border:2px solid var(--c);transition:background .15s,transform .15s}
.choice:nth-child(-n+3){--c:#6b8791;--s:#e0e8ea}
.choice:nth-child(4){--d:22px;--c:#8f8b7e;--s:#e9e7e0}
.choice:nth-child(1),.choice:nth-child(7){--d:42px}
.choice:nth-child(2),.choice:nth-child(6){--d:34px}
.choice:focus-visible{outline:none}
.choice:focus-visible i{outline:2px solid var(--accent);outline-offset:3px}
@media(hover:hover){.choice:hover i{background:var(--s)}}
.choice[aria-pressed="true"] i{background:var(--c);transform:scale(1.08)}
.choice:active i{transform:scale(.92)}
.scale-ends{display:grid;grid-template-columns:1fr auto 1fr;align-items:baseline;margin-top:6px;font-size:12.5px;color:var(--muted)}
.scale-ends span:first-child{color:#5a737c}
.scale-ends span:last-child{text-align:right;color:#8d5f48}
.scale-label{color:var(--ink);font-size:13px}
.quiz-nav{display:flex;justify-content:space-between;margin:26px -6px 0}
.nav-button{display:inline-flex;align-items:center;gap:6px;min-height:44px;padding:0 6px;color:var(--muted);font-size:14px}
.nav-button svg{width:17px;height:17px}
.nav-button:disabled{opacity:.35}
@media(hover:hover){.nav-button:hover:not(:disabled){color:var(--ink)}}

/* Result */
.result{padding-top:6px}
.result-hero{padding:24px 20px 22px;border-radius:20px;background:var(--tint);color:var(--deep);text-align:center}
.eyebrow{font-size:12px;letter-spacing:.06em}
.person{display:block;width:168px;height:168px;margin:6px auto 0}
.type-code{margin-top:2px;font-size:60px;line-height:1.1;letter-spacing:.03em}
.type-code .suffix{margin-left:.04em;font-size:.6em;letter-spacing:.02em;opacity:.78}
.type-name{margin-top:2px;font-size:22px;font-weight:600;letter-spacing:.1em;color:var(--ink)}
.type-group{margin-top:6px;font-size:13px}
.summary{margin:22px 2px 0;font-size:15px;line-height:1.95}
.block{margin-top:30px}
.block h3{margin-bottom:12px;font-size:13px;font-weight:600;letter-spacing:.06em}
.dims{display:flex;flex-direction:column;gap:20px}
.dim-head{display:flex;justify-content:space-between;gap:12px;font-size:12.5px;color:var(--muted)}
.bar{position:relative;height:10px;margin:9px 0 8px;border-radius:5px;background:#e6e1d6}
.bar .mid{position:absolute;top:-4px;bottom:-4px;left:50%;width:2px;margin-left:-1px;border-radius:1px;background:#cdc6b8}
.bar .fill{position:absolute;top:0;bottom:0;left:var(--from,50%);right:var(--to,50%);border-radius:5px;background:var(--deep);transition:left .8s cubic-bezier(.2,.7,.3,1),right .8s cubic-bezier(.2,.7,.3,1)}
.bar .knob{position:absolute;top:50%;left:var(--at,50%);width:20px;height:20px;margin:-10px 0 0 -10px;border-radius:50%;background:var(--paper);border:3px solid var(--deep);transition:left .8s cubic-bezier(.2,.7,.3,1)}
.dim-foot{display:flex;justify-content:space-between;align-items:baseline;font-size:13px;color:var(--muted)}
.dim-foot .win{color:var(--ink);font-weight:600}
.dim-foot .numeral{font-size:15px;font-weight:400}
.dim-foot b{margin:0 .35em;font-family:var(--serif);font-weight:400}
.pole-lines{display:grid;gap:10px;margin-top:18px}
.pole-lines div{display:grid;grid-template-columns:3em 1fr;gap:10px;align-items:baseline}
.pole-lines dt{color:var(--deep);font-size:13px;font-weight:600}
.pole-lines dd{font-size:14px;line-height:1.8}
.more{padding:18px 18px 16px;border-radius:16px;background:var(--tint)}
.more h3{margin-bottom:6px}
.more p{color:var(--muted);font-size:13.5px;line-height:1.8}
.more .secondary-button{margin-top:14px}
.note{margin-top:16px;padding:10px 14px;border-radius:10px;background:#efeae0;color:var(--muted);font-size:12.5px;line-height:1.8}
.traits{display:grid;gap:26px}
@media(min-width:420px){.traits{grid-template-columns:1fr 1fr;gap:20px}}
.list li{position:relative;padding-left:16px;font-size:14px;line-height:1.8}
.list li+li{margin-top:6px}
.list li::before{content:"";position:absolute;top:.72em;left:1px;width:6px;height:6px;border-radius:50%;background:var(--deep)}
.list.hollow li::before{background:none;box-shadow:inset 0 0 0 1.5px var(--deep)}
.scene-card{padding:15px 18px;border-radius:14px;background:var(--card);border:1px solid var(--rule);font-size:14px;line-height:1.85}
.scene-card b{margin-right:.6em;color:var(--deep);font-weight:600}
.result-actions{display:flex;flex-direction:column;gap:8px;margin-top:34px}
.result-actions .text-button{margin-top:2px}
.action-row{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.action-row .secondary-button{padding:0 10px}
.share-text{padding:12px 14px;border-radius:10px;border:1px dashed #cfc7b8;background:var(--card);font-size:13px;line-height:1.8;-webkit-user-select:all;user-select:all;word-break:break-all}

.fine-print{margin-top:28px;padding-top:14px;border-top:1px solid var(--rule);color:var(--muted);font-size:11.5px;line-height:1.75}
.fine-print p+p{margin-top:4px}
.app-shell[data-screen="quiz"] .fine-print{display:none}

.notice{position:fixed;left:50%;bottom:max(24px,calc(env(safe-area-inset-bottom) + 12px));z-index:10;width:max-content;max-width:calc(100% - 40px);padding:8px 16px;border-radius:18px;background:rgba(48,50,47,.9);color:#f8f7f2;font-size:13px;line-height:1.6;text-align:center;pointer-events:none;transform:translateX(-50%);animation:toast .2s ease-out}
.notice:empty{display:none}

/* Dialogs */
dialog{color:var(--ink);background:var(--paper);border:0;padding:22px;box-shadow:0 24px 80px rgba(40,36,30,.24);overscroll-behavior:contain}
dialog::backdrop{background:rgba(48,50,47,.34);backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px)}
.sheet{width:min(460px,calc(100% - 24px));max-height:86vh;max-height:86dvh;border-radius:22px;margin:auto}
.sheet-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.sheet-heading h2{font-size:20px;font-weight:600}
.sheet-heading .icon-button{margin-right:-10px}
.legend{display:grid;grid-template-columns:1fr 1fr;gap:6px 14px;padding:12px 14px;border-radius:12px;background:var(--card);border:1px solid var(--rule);font-size:12.5px}
.legend dt{color:var(--muted);font-size:11.5px}
.legend dd b{margin-right:2px;font-family:var(--serif);font-weight:400;font-size:15px}
.legend .slash{margin:0 .45em;color:var(--faint)}
.type-group{margin-top:22px}
.group-head{display:flex;align-items:baseline;gap:8px;color:var(--deep)}
.group-head h3{font-size:15px;font-weight:600}
.group-head .numeral{font-size:15px}
.group-blurb{margin:2px 0 8px;color:var(--muted);font-size:12.5px}
.type-item{border-radius:12px;background:var(--tint);scroll-margin-top:14px}
.type-item+.type-item{margin-top:6px}
.type-item summary{display:flex;align-items:center;gap:12px;min-height:50px;padding:6px 14px;color:var(--deep);cursor:pointer;list-style:none;border-radius:12px}
.type-item summary::-webkit-details-marker{display:none}
.type-item summary::after{content:"";width:7px;height:7px;margin:0 3px 4px 0;border-right:1.5px solid;border-bottom:1.5px solid;transform:rotate(45deg);transition:transform .2s}
.type-item[open] summary::after{margin-bottom:-2px;transform:rotate(-135deg)}
.type-item summary img{width:40px;height:40px;margin:0 -4px 0 -6px}
.type-item .code{min-width:2.9em;font-size:18px;letter-spacing:.03em}
.type-item .name{flex:1;font-size:14px;font-weight:600}
.mine-tag{padding:0 8px;border-radius:9px;background:var(--deep);color:#fff;font-size:11px;line-height:18px}
.type-item:not(.mine) .mine-tag{display:none}
.type-body{padding:0 16px 16px;font-size:13.5px;line-height:1.85}
.type-body .person{width:120px;height:120px;margin:0 auto 8px}
.type-body h4{margin:12px 0 4px;color:var(--deep);font-size:12px;font-weight:600;letter-spacing:.06em}
.type-body .list li{font-size:13px}
.type-body .list li+li{margin-top:2px}
.type-body .variants{display:grid;grid-template-columns:1fr 1fr;gap:6px}
.variant{display:flex;flex-direction:column;align-items:center;gap:2px;min-width:0;padding:8px 4px 7px;border-radius:10px;background:rgba(255,255,255,.45);text-align:center;scroll-margin:60px}
.type-body .variant .person{width:52px;height:52px;margin:0}
.variant-label{display:flex;flex-direction:column;min-width:0;line-height:1.4}
.variant-label .numeral{color:var(--deep);font-size:13.5px}
.variant-label span:last-child{font-size:12.5px;white-space:nowrap}
.variant.mine{box-shadow:inset 0 0 0 1.5px var(--deep)}
.variant.target{background:var(--card);box-shadow:inset 0 0 0 1.5px var(--accent)}
.type-body .pole-lines{gap:6px;margin-top:10px}
.type-body .pole-lines dd{font-size:13px}
.type-scene{margin-top:12px;padding-top:10px;border-top:1px solid rgba(48,50,47,.1)}
.type-scene b{margin-right:.6em;color:var(--deep);font-weight:600}
.share-sheet{width:min(420px,calc(100% - 24px))}
.share-frame{position:relative;aspect-ratio:3/4;overflow:hidden;border-radius:14px;background:#ece8df;box-shadow:0 0 0 1px var(--rule),0 10px 28px rgba(40,36,30,.1)}
.share-frame img{display:block;width:100%;height:100%}
.share-status{position:absolute;inset:0;display:grid;place-items:center;padding:20px;color:var(--muted);font-size:13px;text-align:center}
.share-hint{margin-top:12px;color:var(--muted);font-size:12.5px;text-align:center}
.share-actions{display:flex;flex-direction:column;gap:8px;margin-top:14px}
.confirm{width:min(340px,calc(100% - 40px));padding:26px 22px 14px;border-radius:22px;text-align:center}
.confirm h2{font-size:19px;font-weight:600}
.confirm p{margin-top:8px;color:var(--muted);font-size:13.5px}
.confirm .actions{display:flex;flex-direction:column;gap:4px;margin-top:20px}

@keyframes turn{from{opacity:0;transform:translateY(8px)}}
@keyframes toast{from{opacity:0;transform:translate(-50%,6px)}}

@media(min-width:640px){
  body{padding:24px 0;background:var(--surround)}
  .app-shell{min-height:calc(100vh - 48px);min-height:calc(100dvh - 48px);border:1px solid #dcd8cd;border-radius:28px;padding:18px 32px 24px}
}
@media(max-height:680px){
  .question{min-height:150px;padding:18px 2px}
  .statement{font-size:19px}
  .quiz-nav{margin-top:14px}
}
@media(max-width:359px){
  .app-shell{padding-left:14px;padding-right:14px}
  .choice{width:40px}
  .choice:nth-child(1),.choice:nth-child(7){--d:36px}
  .choice:nth-child(2),.choice:nth-child(6){--d:30px}
  .choice:nth-child(3),.choice:nth-child(5){--d:25px}
  .choice:nth-child(4){--d:20px}
  .statement{font-size:19px}
  .type-code{font-size:52px}
  .person{width:144px;height:144px}
  .type-cell img{width:40px;height:40px}
  .type-cell .numeral{font-size:15px}
}
@media(prefers-reduced-motion:reduce){
  *,*::before,*::after{animation:none!important;transition:none!important}
}
