/* Tạo nhân vật: một màn duy nhất — đạo hiệu, công pháp, linh thú; một nút vào game. */
#starterChoice{box-sizing:border-box;width:min(920px,calc(100vw - 24px));max-width:none;height:min(600px,calc(100dvh - 24px));max-height:none;padding:0;border:1px solid #ad9155;background:#111b17;color:#e4d8b9;box-shadow:0 18px 80px #000b;font:13px/1.5 var(--f-body);overflow:hidden}
#starterChoice::backdrop{background:#050a08dc}
#starterChoice [hidden]{display:none!important}
.starter-form{display:flex;flex-direction:column;height:100%;min-height:0}
.starter-form header{padding:16px 22px 10px;flex:none;border-bottom:1px solid #a28b4a44}
.starter-form header>small{color:#c4a565;letter-spacing:.12em}
.starter-form h1{font:600 clamp(20px,3vw,26px)/1.25 var(--f-body);margin:2px 0 0;color:#f1d699}
.starter-body{flex:1;min-height:0;padding:16px 22px;display:flex;flex-direction:column;gap:14px;overflow:auto;overscroll-behavior:contain}
.starter-name{display:flex;align-items:center;gap:10px;margin:0;color:#c4a565;font-size:12px}
.starter-name input{flex:1;max-width:300px;min-width:0;box-sizing:border-box;padding:8px 10px;border:1px solid #59624477;background:#17231d;color:#e8dab6;font:14px var(--f-body)}
.starter-name input:focus-visible{outline:2px solid #f2d88f;outline-offset:2px;border-color:#b59d61}
.starter-random{flex:none;padding:8px 12px;border:1px solid #8f7a45;background:#1f2a1f;color:#e7cf92;font:600 12px var(--f-body);cursor:pointer}
.starter-random:hover{border-color:#e3c16b}
.starter-random:focus-visible{outline:2px solid #f2d88f;outline-offset:2px}
.starter-picks{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(0,1fr);gap:20px;align-items:start}
.starter-picks fieldset{border:0;padding:0;margin:0;min-width:0}
.starter-picks legend{padding:0;margin:0 0 8px;font:600 14px/1.3 var(--f-body);color:#ecd19a}
.starter-options{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.starter-pets .starter-options{grid-template-columns:repeat(auto-fit,minmax(96px,1fr))}
.starter-card{position:relative;cursor:pointer;min-width:0;display:block}
.starter-card input{position:absolute;opacity:0;width:1px;height:1px;overflow:hidden}
.starter-card-content{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;height:88px;padding:6px 4px;box-sizing:border-box;border:1px solid #59624477;background:#17231d;transition:background .15s,border-color .15s;min-width:0;text-align:center}
.starter-card-content>img{width:36px;height:44px;object-fit:contain;flex:none}
.starter-pets .starter-card-content{height:184px}
.starter-card-content>img.starter-pet-art{width:84px;height:84px}
.starter-card-content>span{min-width:0;overflow-wrap:anywhere}
.starter-card-content b{font-size:12px;line-height:1.25;color:#e8dab6;display:block}
.starter-card:hover .starter-card-content{border-color:#b59d61}
.starter-card input:checked+.starter-card-content{border-color:#e3c16b;background:#3b3820;box-shadow:inset 0 -3px #e3c16b}
.starter-card input:focus-visible+.starter-card-content{outline:2px solid #f2d88f;outline-offset:2px}
.starter-note{margin:8px 0 0;min-height:3.9em;padding:2px 0 2px 10px;border-left:2px solid #a28b4a77;font-size:12px;line-height:1.3;color:#b9bca9;overflow-wrap:anywhere}
.starter-note b{color:#ecd19a}
.starter-note small{display:block;color:#9eaf98;font-size:11px}
.starter-form footer{padding:10px 22px 16px;border-top:1px solid #a28b4a44;background:#121b16;flex:none;text-align:center}
.starter-navigation{display:flex;justify-content:center;gap:10px}
.starter-form .starter-hint{color:#c9b47c;margin:0 0 6px;font-size:12px}
.starter-form .starter-hint:empty{display:none}
.starter-form .starter-error{color:#ffa88f;margin:4px 0;font-size:12px}
.starter-form .starter-error:empty{display:none}
.starter-form footer button{font:600 14px var(--f-body);color:#ffe3a1;border:1px solid #bd9b4b;background:#44321a;min-height:44px;padding:8px 16px;cursor:pointer;flex:1;max-width:360px;min-width:0}
.starter-form footer button:disabled{opacity:.45;cursor:not-allowed}
.starter-form footer button:focus-visible{outline:2px solid #ffe9aa;outline-offset:3px}
#starterStripPrompt{position:fixed;inset:0;z-index:10000;border:1px solid #bb9953;background:#142119;color:#e7cf92;font:600 13px var(--f-body);cursor:pointer}
/* Điện thoại: toàn màn hình, công pháp và linh thú xếp dọc */
@media(max-width:620px){
  #starterChoice{width:100vw;height:100dvh;border:0}
  .starter-form header{padding:12px 12px 8px}
  .starter-body{padding:12px;gap:12px}
  .starter-name input{max-width:none}
  .starter-picks{grid-template-columns:minmax(0,1fr);gap:12px}
  .starter-options{gap:6px}
  .starter-card-content{height:76px}
  .starter-card-content>img{width:32px;height:38px}
  .starter-card-content b{font-size:11px}
  .starter-pets .starter-card-content{height:96px}
  .starter-card-content>img.starter-pet-art{width:56px;height:56px}
  .starter-note{min-height:0}
  .starter-form footer{padding:8px 12px calc(10px + env(safe-area-inset-bottom,0px))}
}
/* Màn thấp (ngang/cửa sổ nhỏ): giữ hai cột, thu gọn */
@media(max-height:480px){
  .starter-form header{padding:6px 12px}.starter-form header>small{display:none}.starter-form h1{font-size:18px}
  .starter-body{padding:8px 12px;gap:8px}
  .starter-picks{grid-template-columns:minmax(0,1.7fr) minmax(0,1fr);gap:12px}
  .starter-name input{padding:5px 8px}
  .starter-card-content{height:64px;gap:2px;padding:3px}
  .starter-card-content>img{width:28px;height:32px}
  .starter-pets .starter-card-content{height:134px}
  .starter-card-content>img.starter-pet-art{width:48px;height:48px}
  .starter-card-content b{font-size:10px}
  .starter-note{font-size:10.5px;min-height:0}
  .starter-form footer{padding:6px 12px}.starter-form footer button{min-height:36px;font-size:12px}
}
@media(prefers-reduced-motion:reduce){.starter-card-content{transition:none}}
