/* ─────────────────────────────────────────────────────────────────────────────
   The lobby: title menu (로그인 · 설정 · 만든이), 로그인 / 회원가입, the character list and
   character creation (lobby.js). The same handheld kit as the HUD: brass frames (--fr-brass), sunk
   screens, chunky two-pixel buttons, the Galmuri pixel font. No dark vignette anywhere. The character
   list and creation sit in the in-game phone (phone.css parts, phone.js skin): creation is that phone
   unfolded wide, a foldable whose hinge runs between its two columns.
   ───────────────────────────────────────────────────────────────────────────── */
#title, #create { position: fixed; inset: 0; z-index: 30; font: 12px/1.45 var(--pix); color: var(--cream); letter-spacing: 0; }
#title { overflow: hidden; background: #7cc4ea; }
#title.scenic { background: transparent; }
#title-cv { position: absolute; left: 0; top: 0; image-rendering: pixelated; pointer-events: none; }
.t-wrap { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; padding: max(14px, 3vh) 10px 0; gap: 6px; overflow-y: auto; }
.t-brand { display: flex; flex-direction: column; align-items: center; flex: none; filter: drop-shadow(0 3px 8px rgba(18, 12, 26, .55)); }
.t-h1 { margin: 0; line-height: 0; }
#t-logo { display: block; image-rendering: pixelated; animation: t-bob 2.4s steps(2, end) infinite; }
@keyframes t-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2px); } }
/* the subtitle is a pixel wordmark drawn by titlescene.js subtitle() at the logo's scale */
.t-sub { margin: 4px 0 0; line-height: 0; }
#t-sub { display: block; image-rendering: pixelated; max-width: calc(100vw - 20px); height: auto; }
.t-stack { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; flex: none; }

/* Studio splash. */
#studio-intro { position: fixed; inset: 0; z-index: 100; width: 100%; height: 100%; object-fit: contain; background: #000; }

/* the title menu: three items, the one under the cursor (focus or hover) gold with a blinking ▶ */
#t-menu { margin-top: 3vh; width: min(240px, calc(100vw - 16px)); display: flex; flex-direction: column; gap: 6px; padding: 4px 6px 8px; }
#t-menu .btn { position: relative; width: 100%; outline: none; }
#t-menu .btn:is(:hover, :focus) { color: #2a1806; background: var(--b-mid); box-shadow: inset 2px 2px 0 var(--b-hi), inset -2px -2px 0 var(--b-lo); }
#t-menu .btn:is(:hover, :focus)::before { content: "▶"; position: absolute; left: 12px; animation: t-blink 1.1s steps(1, end) infinite; }
#t-menu small { margin-top: 2px; text-align: center; font: 11px/1.3 var(--pix9); color: #b4aac4; }
@keyframes t-blink { 50% { opacity: .15; } }
@media (pointer: coarse) { #t-menu small { display: none; } }

/* 설정 and 만든이 */
#t-set, #t-cred { width: min(420px, calc(100vw - 16px)); }
.ls-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 38px; padding: 2px 4px; border-bottom: 2px solid #3e344d; }
.ls-row > span { color: var(--b-hi); }
.ls-row input[type="range"] { flex: 0 1 190px; min-width: 0; accent-color: var(--b-mid); }
.ls-row .btn { min-width: 68px; }
#title .ls-row .btn.off { color: #8a8098; background: #241e2e; box-shadow: inset 2px 2px 0 #1a1522, inset -2px -2px 0 #3a3146; }
.cred { margin: 0 0 10px; display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 8px 10px; }
.cred dt { color: var(--b-hi); font-weight: 700; }
.cred dd { margin: 0; color: var(--cream); font: 12px/1.5 var(--pix); }

/* panels */
.t-panel { width: min(440px, calc(100vw - 16px)); padding: 4px 10px 10px; border: 14px solid transparent; border-image: var(--fr-brass) 14 fill / 14px / 0 stretch; image-rendering: pixelated; }
.t-panel h2 { margin: 2px 0 8px; font: 700 13px/1.3 var(--pix); color: var(--b-hi); letter-spacing: 0; text-align: center; }
.t-tabs { display: flex; gap: 0; margin: -2px -2px 8px; }
.t-tabs button { flex: 1; padding: 7px 4px 6px; font: 700 13px/1 var(--pix); color: var(--cream); background: #3a3146; border: 2px solid var(--ink); box-shadow: inset 2px 2px 0 #5b4d6c, inset -2px -2px 0 #1f1a28; border-radius: 0; }
.t-tabs button + button { border-left: 0; }
.t-tabs button.on { color: #2a1806; background: var(--b-mid); box-shadow: inset 2px 2px 0 var(--b-hi), inset -2px -2px 0 var(--b-lo); }
.fld { display: flex; align-items: center; gap: 0; position: relative; }
.fld > span { flex: none; width: 92px; color: var(--b-hi); font-size: 12px; }
.fld input, #c-name {
  flex: 1; min-width: 0; height: 34px; padding: 0 10px; font: 14px var(--pix); color: var(--cream); letter-spacing: 0;
  background: var(--scr); border: 2px solid var(--ink); border-radius: 0; box-shadow: inset 2px 2px 0 #07060b; outline: none;
  user-select: text; -webkit-user-select: text; touch-action: manipulation;
}
.fld input::placeholder, #c-name::placeholder { color: #7a7088; }
.fld input:focus, #c-name:focus { border-color: var(--b-mid); box-shadow: inset 2px 2px 0 #07060b, 0 0 0 2px rgba(244, 223, 164, .35); }
.fld input.bad, #c-name.bad { border-color: #c8505a; }
.fld .eye { position: absolute; right: 4px; top: 4px; height: 26px; padding: 0 8px; font: 11px/1 var(--pix); color: var(--cream); background: #3a3146; border: 2px solid var(--ink); border-radius: 0; box-shadow: inset 2px 2px 0 #5b4d6c, inset -2px -2px 0 #1f1a28; }
.fld .eye.on { color: #2a1806; background: var(--b-mid); box-shadow: inset 2px 2px 0 var(--b-hi), inset -2px -2px 0 var(--b-lo); }
#a-pw { padding-right: 68px; }
.fmsg { margin: 2px 0 6px 92px; min-height: 15px; font: 11px/1.35 var(--pix9); color: #b4aac4; }
.fmsg.bad { color: #ff9a9a; }
.fmsg.good { color: #9ae6a0; }
.t-note { margin: 4px 0 8px; padding: 6px 8px; font: 12px/1.4 var(--pix); color: #2a1806; background: #f4dfa4; border: 2px solid var(--ink); box-shadow: inset -2px -2px 0 #cf9f55; }
.t-note::before { content: "★ "; color: #9a5a2a; }
.t-err { margin: 0 0 6px; min-height: 17px; text-align: center; color: #ff9a9a; font: 12px/1.4 var(--pix); }
.t-btns { display: flex; gap: 8px; justify-content: space-between; align-items: center; }
.t-hint { margin: 8px 0 0; text-align: center; font: 11px/1.4 var(--pix9); color: #b4aac4; }

/* the kit's buttons, here too */
#title .btn, #create .btn {
  font: 12px/1 var(--pix); letter-spacing: 0; padding: 6px 10px; color: var(--cream); border-radius: 0;
  background: #3a3146; border: 2px solid var(--ink); box-shadow: inset 2px 2px 0 #5b4d6c, inset -2px -2px 0 #1f1a28; touch-action: manipulation;
}
#title .btn:hover:not(:disabled), #create .btn:hover:not(:disabled) { background: #463b55; color: #fff6dc; box-shadow: inset 2px 2px 0 #6c5d80, inset -2px -2px 0 #1f1a28; }
#title .btn:active:not(:disabled), #create .btn:active:not(:disabled) { transform: translate(1px, 1px); box-shadow: inset 2px 2px 0 #1f1a28, inset -2px -2px 0 #463b55; }
#title .btn.gold, #create .btn.gold { color: #2a1806; background: var(--b-mid); box-shadow: inset 2px 2px 0 var(--b-hi), inset -2px -2px 0 var(--b-lo); }
#title .btn.gold:hover:not(:disabled), #create .btn.gold:hover:not(:disabled) { background: #dcae62; color: #2a1806; }
#title .btn.big, #create .btn.big { font: 700 15px/1 var(--pix); padding: 10px 26px; letter-spacing: 1px; }
#title .btn.small, #create .btn.small { padding: 4px 8px; font-size: 12px; }
#title .btn.busy, #create .btn.busy { filter: none; opacity: 1; animation: t-busy .6s steps(2, end) infinite; }
@keyframes t-busy { 50% { background: #b88a46; } }
#a-submit { flex: 1; }

/* the status line under the panels */
#title-msg { margin: 0; min-height: 18px; max-width: min(440px, calc(100vw - 16px)); padding: 0 8px; text-align: center; font: 12px/1.5 var(--pix); }
#title-msg.err, #title-msg.ok, #title-msg.info { padding: 3px 10px; border: 2px solid var(--ink); }
#title-msg.err { color: #fff; background: #a83848; }
#title-msg.ok { color: #10301a; background: #9ae6a0; }
#title-msg.info { color: #2a1806; background: #f4dfa4; }
#title-msg:empty { visibility: hidden; }
#t-ver { position: absolute; right: 8px; bottom: 4px; text-align: right; font: 11px/1.2 var(--pix9); color: #fff; text-shadow: 1px 0 0 #2a3a28, -1px 0 0 #2a3a28, 0 1px 0 #2a3a28, 0 -1px 0 #2a3a28; pointer-events: none; }

/* ── servers ── */
.sv-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 4px; color: var(--b-hi); }
.sv-top b { color: var(--cream); font-weight: 700; }
.sv-btns { display: flex; gap: 4px; }
#sv-list { display: grid; grid-template-columns: 1fr; gap: 8px; }
.sv-card { display: flex; flex-direction: column; gap: 6px; padding: 6px; background: #2b2436; border: 2px solid var(--ink); box-shadow: inset 2px 2px 0 #3e344d, inset -2px -2px 0 #1a1522; }
.sv-card.last { box-shadow: inset 2px 2px 0 #3e344d, inset -2px -2px 0 #1a1522, 0 0 0 2px var(--b-mid); }
.sv-hd { display: flex; align-items: baseline; justify-content: space-between; }
.sv-hd b { font: 700 14px/1.2 var(--pix); color: #2a1806; background: var(--b-mid); padding: 3px 8px 2px; border: 2px solid var(--ink); box-shadow: inset 2px 2px 0 var(--b-hi), inset -2px -2px 0 var(--b-lo); }
.sv-hd small { font: 11px var(--pix9); color: #b4aac4; }
.sv-char { display: flex; align-items: center; gap: 8px; min-height: 58px; padding: 4px; background: var(--scr); border: 2px solid var(--ink); box-shadow: inset 2px 2px 0 #07060b; }
.sv-slots { display: flex; flex-direction: column; gap: 6px; }
.sv-slot { display: flex; align-items: center; gap: 6px; min-height: 56px; padding: 4px; background: var(--scr); border: 2px solid var(--ink); box-shadow: inset 2px 2px 0 #07060b; }
.sv-slot.on { border-color: var(--b-mid); box-shadow: inset 2px 2px 0 #07060b, 0 0 0 1px var(--b-hi); background: #221d2c; }
.sv-slot.locked { flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; padding: 8px 10px; min-height: 46px; background: #1a1622; border: 2px dashed #4a3f5a; color: #9c92ac; text-align: left; cursor: pointer; }
.sv-slot.locked:hover:not(:disabled) { border-color: var(--b-lo); background: #221c2c; color: var(--cream); }
.sv-slot.locked .sv-sl-tag { font: 10px var(--pix9); color: #7e7490; }
.sv-slot.locked b { font: 700 12px var(--pix); color: #c8bdd8; }
.sv-slot.locked small { font: 10px var(--pix9); color: #9a88b0; }
.sv-char-btn { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 0; border: 0; background: none; color: inherit; text-align: left; cursor: pointer; }
.sv-del { flex: none; padding: 5px 7px; font: 700 11px/1 var(--pix); color: #ffd4d4; background: #5a2228; border: 2px solid var(--ink); box-shadow: inset 1px 1px 0 #8a3a44, inset -1px -1px 0 #341216; cursor: pointer; }
.sv-del:hover:not(:disabled) { background: #782c36; color: #fff; }
.sv-face { width: 44px; height: 44px; flex: none; image-rendering: pixelated; background: #6cbf5e; border: 2px solid #1f4430; box-shadow: inset 0 -6px 0 #57a850; }
.sv-ct { display: flex; flex-direction: column; min-width: 0; }
.sv-ct b { font: 700 14px/1.3 var(--pix); color: var(--cream); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sv-ct span { font: 12px var(--pix); color: var(--b-hi); }
.sv-empty { color: #8a8098; padding: 0 6px; }
.sv-new { flex: 1; display: grid; grid-template-columns: 40px 1fr; grid-template-rows: auto auto; align-items: center; column-gap: 8px; padding: 4px; border: 2px dashed #5b4d6c; background: none; color: var(--cream); text-align: left; border-radius: 0; }
.sv-new i { grid-row: 1 / 3; width: 40px; height: 40px; display: grid; place-items: center; font: 700 22px/1 var(--pix); font-style: normal; color: #2a1806; background: var(--b-mid); border: 2px solid var(--ink); box-shadow: inset 2px 2px 0 var(--b-hi), inset -2px -2px 0 var(--b-lo); }
.sv-new span { font: 11px var(--pix9); color: #b4aac4; }
.sv-new b { font: 700 13px var(--pix); color: var(--b-hi); }
.sv-new:hover:not(:disabled) { border-color: var(--b-mid); background: rgba(244, 223, 164, .06); }
.sv-chs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.sv-ch { position: relative; display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; align-items: center; gap: 2px 6px; padding: 7px 8px 6px; text-align: left; border-radius: 0;
  font: 13px/1.1 var(--pix); color: var(--cream); background: #3a3146; border: 2px solid var(--ink); box-shadow: inset 2px 2px 0 #5b4d6c, inset -2px -2px 0 #1f1a28; touch-action: manipulation; }
.sv-ch:hover:not(:disabled) { background: #4a3e5a; }
.sv-ch:active:not(:disabled) { transform: translate(1px, 1px); }
.sv-ch.on { background: #4a3e2a; box-shadow: inset 2px 2px 0 #7c6a44, inset -2px -2px 0 #1f1a28; }
.sv-ch .nm { font-weight: 700; white-space: nowrap; }
.sv-ch small { grid-column: 1 / -1; font: 11px var(--pix9); color: #b4aac4; min-height: 12px; }
.sv-ch em { position: absolute; right: -2px; top: -9px; font: 10px/1 var(--pix9); font-style: normal; padding: 2px 4px; color: #2a1806; background: var(--b-hi); border: 2px solid var(--ink); }
.bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.bars i { width: 4px; background: #241e2e; border: 1px solid #0d0b12; }
.bars i:nth-child(1) { height: 5px; } .bars i:nth-child(2) { height: 8px; } .bars i:nth-child(3) { height: 12px; }
.bars.l1 i:nth-child(1) { background: #6ad46e; }
.bars.l2 i:nth-child(-n+2) { background: #f0c44a; }
.bars.l3 i { background: #f0605a; }

/* ── the phones: the character list (portrait) and creation (unfolded) ── */
#t-servers .ph-body, #create .ph-body {
  box-sizing: border-box; border: solid transparent; border-width: 36px 18px 56px 18px;
  border-image: var(--ph-bezel) 36 18 56 18 fill / 36px 18px 56px 18px / 0 round; image-rendering: pixelated;
}
#t-servers .ph-screen, #create .ph-screen { background-color: #1e2545; }
#t-servers .ph-body { position: relative; width: min(352px, calc(100vw - 8px)); height: min(640px, calc(100vh - 56px)); animation: ph-pop .16s ease-out; }
body[data-lobby="servers"] .t-brand { display: none; }
#t-servers .ph-bar { height: 34px; padding: 0 4px 0 2px; }
.lb-ttl { flex: 1; padding-left: 6px; font: 700 13px/1 var(--pix); color: #ffe9a8; text-shadow: 1px 1px 0 #000; white-space: nowrap; }
.lb-scroll { flex: 1 1 0; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 8px 6px 6px; scrollbar-width: thin; scrollbar-color: var(--b-mid) transparent; }
.ph-status b { color: #ffe9a8; font-weight: 400; }

/* ── character creation ── */
#create { background: #2a2234; background-image: repeating-linear-gradient(45deg, rgba(255, 255, 255, .025) 0 2px, transparent 2px 8px); }
/* the phone opened flat: a clip from the hinge outwards (clip-path, not a transform, so sizeStage reads the real box) */
.cr-wrap { position: absolute; inset: 8px max(8px, calc(50vw - 580px)); display: flex; flex-direction: column; min-height: 0; animation: lb-unfold .28s steps(7, end); }
@keyframes lb-unfold { from { clip-path: inset(0 42% 0 42%); } to { clip-path: inset(0 0 0 0); } }
@media (prefers-reduced-motion: reduce) { .cr-wrap, #t-servers .ph-body { animation: none; } }
/* the hinge across the bezel, top and bottom; the camera keeps to the left half, the home button to the right */
#create .cr-wrap::before, #create .cr-wrap::after { content: ""; position: absolute; left: calc(50% - 2px); width: 4px; background: #0d0b12; box-shadow: 2px 0 0 rgba(255, 255, 255, .12); pointer-events: none; }
#create .cr-wrap::before { top: -36px; height: 36px; }
#create .cr-wrap::after { bottom: -56px; height: 56px; }
#create .ph-top { width: calc(50% + 18px); }
#create .ph-hbtn { left: 75%; }
#create .ph-screen { padding: 0; }
.cr-head { flex: none; display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 6px 0 4px; }
.cr-head h2 { flex: 1; margin: 0; text-align: center; font: 700 15px/1.2 var(--pix); color: #ffe9a8; letter-spacing: 1px; text-shadow: 1px 1px 0 #000; }
.cr-sv { font: 700 12px/1 var(--pix); color: #2a1806; padding: 5px 8px 4px; background: var(--b-hi); border: 2px solid var(--ink); white-space: nowrap; }
.cr-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0; padding: 6px 6px 0; }
.cr-body > .cr-l { padding-right: 10px; }
.cr-body > .cr-r { padding-left: 10px; border-left: 4px solid #0d0b12; box-shadow: inset 2px 0 0 #3d3450; }
.cr-col { min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 6px; padding: 0 2px 4px; }
.cr-l { overflow: hidden; }
.cr-col > * { flex-shrink: 0; }
.cr-col > #cr-stage { flex-shrink: 1; }
#cr-stage { position: relative; flex: 1 1 auto; min-height: 180px; overflow: hidden; background: #6cbf5e; touch-action: pan-y; cursor: grab; }
#cr-cv { position: absolute; left: 0; top: 0; image-rendering: pixelated; }
.cr-turn { position: absolute; top: 42%; width: 34px; height: 40px; padding: 0; font: 14px/1 var(--pix); color: var(--cream); background: rgba(42, 34, 52, .82); border: 2px solid var(--ink); border-radius: 0; box-shadow: inset 2px 2px 0 #5b4d6c; touch-action: manipulation; }
.cr-turn.l { left: 6px; } .cr-turn.r { right: 6px; }
.cr-turn:hover { background: #463b55; }
#cr-modes { position: absolute; left: 6px; right: 6px; bottom: 6px; display: flex; justify-content: center; gap: 0; }
#cr-modes button { padding: 5px 10px 4px; font: 12px/1 var(--pix); color: var(--cream); background: rgba(42, 34, 52, .85); border: 2px solid var(--ink); border-radius: 0; box-shadow: inset 2px 2px 0 #5b4d6c; touch-action: manipulation; }
#cr-modes button + button { border-left: 0; }
#cr-modes button.on { color: #2a1806; background: var(--b-mid); box-shadow: inset 2px 2px 0 var(--b-hi), inset -2px -2px 0 var(--b-lo); }
.cr-name { flex: none; display: flex; align-items: center; gap: 6px; }
.cr-name label { color: var(--b-hi); font-weight: 700; flex: none; }
.cr-name #c-name { height: 36px; font-size: 15px; }
#c-name-msg { margin: -2px 0 0; min-height: 15px; }
.cr-lab { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 2px; color: var(--b-hi); font-weight: 700; }
.cr-lab small { font: 11px var(--pix9); color: #b4aac4; font-weight: 400; }
.cr-tools { display: flex; gap: 4px; }
#c-presets { flex: none; display: flex; gap: 4px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
#c-presets .pr { flex: none; width: 56px; padding: 2px 0 1px; border: 2px solid var(--ink); border-radius: 0; background: #5a8a50; display: flex; flex-direction: column; align-items: center; touch-action: manipulation; }
#c-presets .pr canvas { width: 40px; height: 34px; image-rendering: pixelated; }
#c-presets .pr small { font: 9px/1.1 var(--pix9); color: #f3e8cc; text-shadow: 0 1px 0 #000; white-space: normal; max-width: 52px; overflow: hidden; }
#c-presets .pr.on { outline: 2px solid var(--b-hi); outline-offset: -2px; background: #7ab06a; }
#c-cls { flex: none; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
#c-cls .cls { display: flex; flex-direction: column; gap: 3px; padding: 6px 8px 7px; text-align: left; border-radius: 0; color: var(--cream);
  background: #3a3146; border: 2px solid var(--ink); box-shadow: inset 2px 2px 0 #5b4d6c, inset -2px -2px 0 #1f1a28; touch-action: manipulation; }
#c-cls .cls:hover { background: #463b55; }
#c-cls .cls.on { background: #4e4030; box-shadow: inset 2px 2px 0 #8a7448, inset -2px -2px 0 #1f1a28, 0 0 0 2px var(--b-hi); }
.cls-hd { display: flex; align-items: center; gap: 6px; }
.cls-ic { width: 24px; height: 24px; flex: none; display: grid; place-items: center; background: var(--b-mid); border: 2px solid var(--ink); box-shadow: inset 2px 2px 0 var(--b-hi), inset -2px -2px 0 var(--b-lo); }
.cls-ic img.gi { width: 16px; height: 16px; }
.cls-hd b { flex: 1; font: 700 14px/1 var(--pix); }
.cls-diff { font: 11px/1 var(--pix9); color: var(--b-hi); letter-spacing: 1px; }
.cls-meta { font: 12px var(--pix); color: var(--b-hi); }
.cls-mech { margin: 0; font: 11px/1.4 var(--pix9); color: #d8cfe6; min-height: 2.8em; }
.cls-st { display: grid; grid-template-columns: repeat(5, 1fr); gap: 3px; }
.cls-st span { display: flex; flex-direction: column; gap: 1px; }
.cls-st small { font: 9px/1 var(--pix9); color: #b4aac4; }
.cls-st i { height: 5px; background: #1a1522; border: 1px solid #0d0b12; position: relative; }
.cls-st i::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: calc(var(--v) * 20%); background: #8ad46e; box-shadow: inset 0 1px 0 #c4f0a0; }
#c-cls .cls.on .cls-st i::after { background: #f0c44a; box-shadow: inset 0 1px 0 #fff0b0; }
#create #c-parts { display: block; flex: none; }
#create .lk-page { max-height: none; overflow: visible; }
#create .lk-tabs button { padding: 6px 2px 5px !important; font-size: 12px !important; }
#create .lk-thumb { width: 48px; height: 42px; }
#create .lk-thumb.wide { width: 60px; height: 54px; }
#create .lk-sw button { width: 24px; height: 24px; }
.cr-foot { flex: none; display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-top: 2px solid #0d0b12; background: rgba(8, 6, 14, .6); }
#create-msg { flex: 1; margin: 0; min-height: 18px; font: 12px/1.4 var(--pix); color: #d8cfe6; }
#create-msg.bad { color: #ff9a9a; }
#create-msg.info { color: var(--b-hi); }
#b-create { min-width: 150px; }

/* ── phones and small windows ── */
@media (max-width: 640px) {
  #sv-list { grid-template-columns: 1fr; }
  .fld > span { width: 78px; }
  .fmsg { margin-left: 78px; }
  .cr-wrap { inset: 2px; }
  .cr-body { grid-template-columns: 1fr; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
  .cr-body > .cr-l, .cr-body > .cr-r { padding: 0; border: 0; box-shadow: none; }
  #create .cr-wrap::before, #create .cr-wrap::after { display: none; }
  #create .ph-top { width: calc(100% + 36px); }
  #create .ph-hbtn { left: 50%; }
  .cr-col { overflow: visible; flex: none; }
  #cr-stage { flex: none; height: 32vh; min-height: 170px; }
  .cr-head h2 { font-size: 13px; }
  #b-create { min-width: 120px; }
}
@media (max-height: 520px) and (min-width: 560px) {
  /* a phone on its side: the brand on the left, the panel on the right */
  .t-wrap { flex-direction: row; align-items: flex-start; justify-content: center; gap: 18px; padding: 10px 10px 0; }
  .t-brand { margin-top: 4vh; }
  .t-sub { font-size: 12px; }
  .t-stack { width: auto; flex: 0 1 auto; }
  #t-menu { margin-top: 12vh; }
  .t-panel { width: min(400px, 52vw); padding-top: 0; padding-bottom: 6px; }
  #t-servers .ph-body { height: calc(100vh - 40px); }
  .sv-char { min-height: 46px; }
  .sv-face { width: 36px; height: 36px; }
  .sv-ch { padding: 6px 6px 5px; }
  .sv-ch .bars { display: none; }
  .t-panel h2 { margin: 0 0 4px; }
  .fmsg { min-height: 13px; margin-bottom: 2px; }
  .fld input { height: 30px; }
  .t-hint { display: none; }
  .cr-wrap { inset: 2px max(2px, calc(50vw - 580px)); }
  .cr-head { height: 32px; }
  .cr-body { grid-template-columns: minmax(0, 42fr) minmax(0, 58fr); }
  .cr-l { overflow: hidden; }
  #cr-stage { flex: 1 1 110px; min-height: 110px; }
  #c-name-msg { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .cr-l .cr-lab { display: none; }
  #c-presets .pr { width: 42px; }
  #c-presets .pr canvas { width: 32px; height: 27px; }
  #c-presets .pr small { max-width: 100%; }
  .cr-name #c-name { height: 30px; }
  #cr-modes { top: 4px; bottom: auto; }
  #cr-modes button { padding: 3px 6px 2px; font-size: 11px; }
  .cr-turn { width: 26px; height: 30px; top: 38%; }
  .cls-mech { display: none; }
  .cr-foot { padding-top: 4px; margin-top: 2px; }
}

/* ── creation (J3): no class to pick; the 모험가 card shows the six weapons and the way on ── */
#c-cls { grid-template-columns: 1fr; }
#c-cls .cls.start { cursor: default; }
#c-cls .cls.start:hover { background: #4e4030; }
#c-cls .cls.start .cls-meta { font: 11px var(--pix9); }
.cr-wk { display: grid; grid-template-columns: repeat(var(--n, 6), minmax(0, 1fr)); gap: 3px; margin-top: 2px; }
.cr-wk.two img { width: 32px; height: 32px; }
.cr-wk button { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; padding: 5px 0 4px; background: #1a1522; border: 2px solid #0d0b12; border-radius: 0; color: #d8cfe6; cursor: pointer; touch-action: manipulation; }
.cr-wk button:hover { background: #2a2236; }
.cr-wk button.on { background: #6a5430; border-color: var(--ink); color: #fff3c8; box-shadow: inset 2px 2px 0 var(--b-hi), inset -2px -2px 0 var(--b-lo), 0 0 0 2px var(--b-hi); }
.cr-wk img { width: 48px; height: 48px; image-rendering: pixelated; }
.cr-wk small { font: 11px/1 var(--pix9); color: inherit; white-space: nowrap; }
.cr-feel { margin: 3px 0 0; min-height: 2.9em; display: flex; flex-wrap: wrap; align-items: center; gap: 3px 5px; font: 11px/1.3 var(--pix9); color: #d8cfe6; }
.cr-feel b { font: 700 13px/1 var(--pix); color: #fff3c8; }
.cr-feel .tag { padding: 2px 4px 1px; background: #1a1522; border: 1px solid #0d0b12; color: #f0e2b8; white-space: nowrap; }
.cr-feel .tag.d1 { color: #a8e890; } .cr-feel .tag.d2 { color: #f0c44a; } .cr-feel .tag.d3 { color: #f08a6a; }
.cr-feel .fl { flex-basis: 100%; }
@media (max-width: 640px), (max-height: 620px) { .cr-wk img { width: 32px; height: 32px; } }
.cr-steps { margin: 2px 0 0; padding-left: 18px; font: 11px/1.45 var(--pix9); color: #f0e2b8; }
.cr-steps li::marker { color: var(--b-hi); }
@media (max-height: 520px) { .cr-steps { display: none; } .cr-wk img { width: 24px; height: 24px; } .cr-wk button { padding: 2px 0; } .cr-feel { min-height: 0; } .cr-feel .fl { display: none; } }
