/* house (.hs-) + codex (.cx-) */
.hs-root, .cx-root { position: absolute; inset: 0; }
.hs-strip { position: absolute; left: 8px; right: 8px; top: 6px; display: flex; align-items: center; justify-content: space-between; z-index: 5; pointer-events: none; }
.hs-strip > * { pointer-events: auto; }
.hs-count { display: inline-flex; align-items: center; height: 40px; padding: 0 14px; border-radius: 999px; background: rgba(255,248,240,.9); border: 2px solid var(--gold); font-weight: 900; font-size: 15px; color: var(--ink); box-shadow: 0 2px 6px rgba(90,30,60,.25); }
.hs-floor { position: absolute; left: 0; right: 0; bottom: 0; height: 70%; overflow: hidden; }
.hs-sp { position: absolute; left: 0; top: 0; width: 112px; height: 176px; cursor: pointer; will-change: transform; }
.hs-sp .hs-in { position: absolute; left: 0; top: 0; width: 112px; height: 150px; will-change: transform; filter: drop-shadow(0 6px 4px rgba(90,30,60,.25)); }
.hs-sp .hs-flip { width: 100%; height: 100%; }
.hs-tag { position: absolute; left: 50%; top: 150px; transform: translateX(-50%); display: flex; align-items: center; gap: 3px; white-space: nowrap; max-width: 140px; padding: 1px 8px; border-radius: 999px; background: rgba(255,248,240,.92); border: 2px solid var(--gold-l); font-size: 13px; font-weight: 900; color: var(--ink); }
.hs-tag span.nm { overflow: hidden; text-overflow: ellipsis; }
.hs-bub { position: absolute; left: 50%; bottom: 100%; margin-bottom: -22px; transform: translateX(-50%) scale(.6); width: 150px; padding: 6px 8px; border-radius: 14px; background: #fff; border: 2px solid var(--pink); font-size: 13px; font-weight: 800; line-height: 1.3; color: var(--ink); text-align: center; opacity: 0; transition: opacity .2s, transform .25s cubic-bezier(.3,1.6,.5,1); pointer-events: none; z-index: 3; }
.hs-bub.on { opacity: 1; transform: translateX(-50%) scale(1); }
.hs-empty { position: absolute; left: 20px; right: 20px; top: 30%; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 18px; border-radius: 22px; background: rgba(255,248,240,.88); border: 3px solid var(--gold); font-size: 16px; font-weight: 800; line-height: 1.5; }
.hs-more { position: absolute; left: 50%; bottom: 6px; transform: translateX(-50%); font-size: 13px; font-weight: 900; color: #fff; text-shadow: var(--outline); }
/* panel */
.hs-head { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.hs-namerow { display: flex; align-items: center; gap: 6px; max-width: 100%; }
.hs-name { font-size: 22px; font-weight: 900; color: var(--rose); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hs-edit { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--gold); background: #fff; font-size: 18px; cursor: pointer; padding: 0; flex-shrink: 0; }
.hs-title { font-size: 14px; font-weight: 800; color: var(--ink-2); text-align: center; }
.hs-chips { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.hs-bar { position: relative; height: 18px; border-radius: 9px; background: rgba(93,47,72,.18); overflow: hidden; border: 2px solid var(--gold-l); }
.hs-bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 9px; }
.hs-bar b { position: absolute; inset: 0; text-align: center; font-size: 12px; line-height: 14px; color: #fff; text-shadow: var(--outline); }
.hs-barrow { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 900; }
.hs-barrow .lb { width: 64px; flex-shrink: 0; }
.hs-barrow .hs-bar { flex: 1; }
.hs-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 8px; justify-items: center; }
.hs-line { min-height: 20px; text-align: center; font-size: 14px; font-weight: 800; color: var(--pink-d); padding: 4px 8px; border-radius: 14px; background: rgba(255,255,255,.7); }
.hs-sec { font-size: 14px; font-weight: 900; color: var(--pink-d); margin-top: 4px; }
.hs-stat { display: flex; gap: 6px; justify-content: space-between; }
.hs-stat .chip { flex: 1; justify-content: center; }
.hs-trait { padding: 6px 10px; border-radius: 12px; background: rgba(255,255,255,.75); border: 2px solid var(--gold-l); font-size: 13px; line-height: 1.35; }
.hs-trait b { font-size: 14px; color: var(--rose); }
.hs-bio { font-size: 13px; line-height: 1.5; color: var(--ink); padding: 6px 8px; background: rgba(255,255,255,.6); border-radius: 12px; }
.hs-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.hs-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; border-radius: 16px; background: rgba(255,255,255,.8); border: 2px solid var(--gold-l); cursor: pointer; min-height: 44px; transition: transform .12s cubic-bezier(.3,1.6,.5,1); }
.hs-card:active { transform: scale(.94); }
.hs-card.dim { opacity: .5; }
.hs-card .nm { font-size: 13px; font-weight: 900; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 4px; }
.hs-card .lv { font-size: 12px; font-weight: 800; color: var(--ink-2); }
.hs-opt { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 14px; background: rgba(255,255,255,.8); border: 2px solid var(--gold-l); cursor: pointer; min-height: 56px; text-align: left; font-family: var(--font); color: var(--ink); width: 100%; }
.hs-opt.on { border-color: var(--pink); background: #fff0f5; box-shadow: 0 0 8px rgba(255,134,179,.6); }
.hs-opt .ic { font-size: 28px; width: 40px; text-align: center; }
.hs-opt .tt { font-weight: 900; font-size: 15px; }
.hs-opt .ds { font-size: 13px; color: var(--ink-2); line-height: 1.3; }
.hs-opt .rt { font-size: 13px; font-weight: 800; color: var(--mint-d); }
.hs-opts3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; }
.hs-look { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 76px; padding: 4px; border-radius: 14px; background: rgba(255,255,255,.8); border: 2px solid var(--gold-l); cursor: pointer; font-family: var(--font); color: var(--ink); font-size: 12px; font-weight: 800; }
.hs-look.on { border-color: var(--pink); background: #fff0f5; box-shadow: 0 0 8px rgba(255,134,179,.6); }
.hs-look.lock { opacity: .6; }
.hs-look img { width: 52px; height: 52px; object-fit: contain; border-radius: 8px; }
.hs-look .sm { font-size: 11px; font-weight: 700; color: var(--ink-2); text-align: center; line-height: 1.1; }
.hs-look .lk { position: absolute; top: 2px; right: 4px; font-size: 14px; }
/* codex */
.cx-tabs { position: absolute; left: 0; right: 0; top: 4px; height: 50px; display: flex; gap: 6px; padding: 3px 8px; overflow-x: auto; scrollbar-width: none; }
.cx-tabs::-webkit-scrollbar { display: none; }
.cx-tab { flex: 1 0 auto; min-width: 72px; min-height: 44px; padding: 0 12px; border-radius: 999px; border: 2px solid var(--gold-l); background: rgba(255,248,240,.92); font-family: var(--font); font-size: 14px; font-weight: 900; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.cx-tab.on { background: linear-gradient(180deg, #ffb3cf, var(--pink)); border-color: var(--gold); color: #fff; text-shadow: var(--outline); box-shadow: 0 2px 6px rgba(90,30,60,.3); }
.cx-body { position: absolute; left: 6px; right: 6px; top: 58px; bottom: 6px; padding: 8px; border-radius: 20px; background: rgba(255,248,240,.82); border: 3px solid var(--gold-l); display: flex; flex-direction: column; gap: 8px; }
.cx-body.scroll { display: flex; }
.cx-body > * { flex-shrink: 0; }
.cx-prog { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 900; }
.cx-prog .hs-bar { flex: 1; }
.cx-sec { font-size: 15px; font-weight: 900; color: var(--pink-d); display: flex; justify-content: space-between; }
.cx-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cx-card { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; border-radius: 16px; background: rgba(255,255,255,.85); border: 2px solid var(--gold-l); min-height: 44px; }
.cx-card[data-nav] { cursor: pointer; }
.cx-card .nm { font-size: 13px; font-weight: 900; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 4px; }
.cx-card.unk .nm { color: var(--ink-2); }
.cx-row { display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: 16px; background: rgba(255,255,255,.85); border: 2px solid var(--gold-l); }
.cx-ings { display: flex; flex-wrap: wrap; gap: 4px; flex: 1; min-width: 0; }
.cx-ing { position: relative; width: 32px; height: 32px; }
.cx-ing img { width: 32px; height: 32px; object-fit: contain; }
.cx-ing b { position: absolute; right: -4px; bottom: -4px; font-size: 11px; line-height: 14px; min-width: 16px; text-align: center; border-radius: 8px; background: var(--pink); color: #fff; border: 1px solid #fff; }
.cx-date { font-size: 12px; font-weight: 800; color: var(--ink-2); }
.cx-res { display: flex; flex-direction: column; align-items: center; width: 84px; flex-shrink: 0; gap: 2px; }
.cx-res .nm { font-size: 12px; font-weight: 900; text-align: center; line-height: 1.15; }
.cx-tags { display: flex; gap: 3px; flex-wrap: wrap; justify-content: center; }
.cx-tag { font-size: 11px; font-weight: 900; padding: 0 6px; border-radius: 999px; color: #fff; background: var(--lav-d); }
.cx-tag.legend { background: var(--gold); }
.cx-tag.fusion { background: var(--mint-d); }
.cx-empty { text-align: center; font-size: 15px; font-weight: 800; color: var(--ink-2); padding: 30px 12px; line-height: 1.5; }
.cx-hint { padding: 10px; border-radius: 16px; background: rgba(255,255,255,.85); border: 2px solid var(--gold-l); display: flex; flex-direction: column; gap: 6px; }
.cx-hint.lock { opacity: .7; }
.cx-hint .tt { font-size: 15px; font-weight: 900; color: var(--rose); }
.cx-hint .tx { font-size: 14px; line-height: 1.5; font-weight: 700; }
.cx-hint .row { justify-content: space-between; }
.cx-cgs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cx-cg { position: relative; border-radius: 14px; overflow: hidden; border: 3px solid var(--gold); aspect-ratio: 3 / 4; background: #e9d9ee; cursor: pointer; padding: 0; font-family: var(--font); }
.cx-cg img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cx-cg .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 6px 5px; font-size: 13px; font-weight: 900; color: #fff; text-shadow: var(--outline); text-align: center; background: linear-gradient(0deg, rgba(90,30,60,.6), transparent); }
.cx-cg.lock { cursor: default; background: linear-gradient(135deg, #e7dcf3, #f7e1ea); display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 6px; color: var(--ink-2); font-weight: 900; font-size: 13px; }
.cx-cg.lock .q { font-size: 34px; }
.cx-det { align-items: center; text-align: center; }
