* { box-sizing: border-box; }
body { margin: 0; display: flex; height: 100vh; color: #dbe4f0; font-family: 'Malgun Gothic', sans-serif; overflow: hidden; background: #0b0f17; }
#stage { flex: 1; position: relative; background: radial-gradient(ellipse at 50% 40%, #3b4456 0%, #1c2230 55%, #0d1018 100%); }
#gl, #floor, #overlay { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#overlay { pointer-events: none; }
a.btn { text-decoration: none; }
.btn.game { background: #b91c1c; border-color: #ef4444; font-weight: bold; }
.keyrow label { font-size: 12px; display: flex; align-items: center; gap: 4px; margin-right: 10px; }
.keyrow input[type=number] { background: #1f2937; color: #e5e7eb; border: 1px solid #334155; border-radius: 4px; padding: 3px; }
#keyList div { font-size: 11px; color: #94a3b8; padding: 2px 0; }
#topbar { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; gap: 8px; align-items: center; z-index: 2; }
#topbar .views, #topbar .styles, .motions { display: flex; gap: 4px; }
#topbar .styles { margin-left: auto; padding-right: 8px; border-right: 1px solid #334155; }
.card.missing img { opacity: .35; }
#angleLabel { min-width: 92px; text-align: center; font-size: 12px; align-self: center; color: #67e8f9; }
#gl { cursor: grab; }
#gl.drag { cursor: grabbing; }
#viewNote { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); font-size: 12px; color: #fbbf24; background: rgba(0,0,0,.5); padding: 5px 10px; border-radius: 6px; }
#viewNote:empty { display: none; }
#toOutfit { width: 100%; margin-top: 18px; }
.card .name small { color: #fbbf24; }
#hint { position: absolute; left: 12px; bottom: 12px; font-size: 12px; color: #94a3b8; background: rgba(0,0,0,.45); padding: 6px 10px; border-radius: 6px; }
#toast { position: absolute; top: 60px; left: 50%; transform: translateX(-50%); background: #0e7490; color: #fff; padding: 8px 14px; border-radius: 8px; font-size: 13px; opacity: 0; transition: opacity .3s; pointer-events: none; z-index: 3; }
#toast.show { opacity: 1; }

select { background: #1f2937; color: #e5e7eb; border: 1px solid #334155; border-radius: 6px; padding: 6px 8px; font-size: 13px; }
button, .btn { padding: 6px 10px; font-size: 12px; background: #1f2937; color: #e5e7eb; border: 1px solid #334155; border-radius: 6px; cursor: pointer; }
button:hover, .btn:hover { background: #334155; }
button.on { background: #0e7490; border-color: #22d3ee; }
button:disabled { opacity: .4; cursor: not-allowed; }
.btn.wide { display: block; text-align: center; margin-top: 12px; padding: 9px; background: #7c3aed; border: none; }

#panel { width: 360px; background: #111827; border-left: 1px solid #1f2a3d; overflow-y: auto; padding: 0 14px 24px; }
.tabs { position: sticky; top: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 12px 0; background: #111827; z-index: 1; }
.presets { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.presets.reset { padding-bottom: 8px; margin-bottom: 8px; border-bottom: 1px solid #1f2a3d; }
.presets.reset button { background: #3f1d2b; border-color: #7f1d3a; }
.sub { font-size: 11px; color: #8a97ab; margin: 8px 0; line-height: 1.55; }
.group { font-size: 11px; color: #a5b4fc; margin: 16px 0 0; font-weight: bold; }
.slider label { display: block; font-size: 12px; margin: 9px 0 2px; }
.slider label span { float: right; color: #67e8f9; font-family: monospace; }
input[type=range] { width: 100%; accent-color: #22d3ee; }
details { margin-top: 18px; font-size: 12px; }
summary { cursor: pointer; color: #94a3b8; }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.card { position: relative; background: #1e293b; border: 2px solid transparent; border-radius: 8px; overflow: hidden; cursor: pointer; aspect-ratio: 3 / 4; display: flex; align-items: center; justify-content: center; }
.card.on { border-color: #22d3ee; }
.card img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.card .none { font-size: 12px; color: #94a3b8; }
.card .name { position: absolute; left: 0; right: 0; bottom: 0; font-size: 10px; padding: 3px 4px; background: rgba(0,0,0,.65); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .del { position: absolute; top: 2px; right: 2px; padding: 0 5px; font-size: 11px; background: rgba(0,0,0,.6); border: none; }
#inbox div { font-size: 11px; color: #c4b5fd; padding: 3px 0; }
