  /* 밝은 테마: 흰 바탕 + 도깨비의세계 금빛 하나만 강조로. 짙은 먹갈색은 글자에만 */
  :root {
    color-scheme: light;
    --white: #FFFFFF;
    --soft: #FAF7F1;         /* 한지빛 옅은 바탕 (입력칸·눌림) */
    --soft-2: #F3EEE4;
    --line: #ECE5D8;
    --line-2: #E0D5C1;       /* 황토빛 선 */
    --ink: #2B1B0D;          /* 먹갈색 (제목·본문) */
    --text: #33281D;
    --muted: #76695A;   /* 흰 바탕 대비 약 5:1 (보조 글자도 AA) */
    --gold: #FFC34D;         /* 호박 금빛: 주요 버튼·도장 */
    --gold-soft: #FFF4DA;
    --rust: #99540F;         /* 링크·숫자 강조 */
    --ok: #2F7A4A;
    --bad: #C0462A;
    --shade: rgba(43, 27, 13, .32);
    --display: 'Hahmlet', 'Nanum Myeongjo', serif;
    --ui: 'Pretendard Variable', Pretendard, -apple-system, 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
    --nav-h: 64px;
  }
  * { box-sizing: border-box; }
  html, body { margin: 0; }
  body { background: var(--soft); color: var(--text); font: 15px/1.55 var(--ui); -webkit-font-smoothing: antialiased; word-break: keep-all; overflow-wrap: anywhere; }
  button, input { font: inherit; color: inherit; }
  button { cursor: pointer; }
  :focus-visible { outline: 2px solid var(--rust); outline-offset: 2px; }

  /* ---------- 앱 틀 ---------- */
  .app { max-width: 480px; min-height: 100vh; margin: 0 auto; background: var(--white); position: relative; padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 16px); }
  @media (min-width: 520px) { .app { border-left: 1px solid var(--line); border-right: 1px solid var(--line); } }
  .appbar { position: sticky; top: 0; z-index: 5; background: rgba(255,255,255,.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); padding: calc(12px + env(safe-area-inset-top)) 16px 12px; display: flex; align-items: center; gap: 10px; }
  .brand { font-family: var(--display); font-size: 20px; margin: 0; font-weight: 700; color: var(--ink); display: flex; align-items: center; gap: 8px; }
  .brand .logo { width: 28px; height: 28px; border-radius: 8px; flex: none; box-shadow: 0 1px 3px rgba(120,66,10,.2); }
  .brand .seal { width: 24px; height: 24px; border-radius: 6px; background: var(--gold); display: grid; place-items: center; font-size: 13px; color: var(--ink); transform: rotate(-6deg); }
  .appbar .spacer { flex: 1; }
  .icon-btn[hidden] { display: none; }
  .icon-btn { width: 40px; height: 40px; border-radius: 12px; border: 0; background: transparent; color: var(--muted); display: grid; place-items: center; }
  .icon-btn:hover { background: var(--soft); color: var(--ink); }
  .icon-btn[aria-pressed=true] { background: var(--gold-soft); color: var(--rust); }
  .icon-btn svg { width: 22px; height: 22px; }

  .screen { display: none; padding: 18px 16px; }
  .screen.on { display: block; }
  .screen h2 { font-family: var(--display); font-weight: 700; font-size: 23px; line-height: 1.3; margin: 2px 0 6px; color: var(--ink); }
  .lead { color: var(--muted); margin: 0 0 16px; }
  .sec-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin: 26px 0 10px; }
  .sec-head h3 { font-size: 16px; margin: 0; color: var(--ink); }
  .small { font-size: 13px; color: var(--muted); }
  .num { font-variant-numeric: tabular-nums; }

  /* 하단 탭 */
  .tabbar { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; z-index: 6; background: rgba(255,255,255,.96); backdrop-filter: blur(8px); border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(5, 1fr); padding-bottom: env(safe-area-inset-bottom); }
  .tabbar button { height: var(--nav-h); border: 0; background: none; color: var(--muted); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 12px; font-weight: 500; }
  .tabbar svg { width: 24px; height: 24px; }
  .tabbar button[aria-selected=true] { color: var(--ink); font-weight: 700; }
  .tabbar button[aria-selected=true] svg .fill { fill: var(--gold); }

  /* 공통 입력 */
  .field { width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--soft); font-size: 16px; color: var(--ink); }
  .field::placeholder { color: #B3A796; }
  .field:focus { outline: none; border-color: var(--line-2); background: var(--white); box-shadow: 0 0 0 3px var(--gold-soft); }
  label.lbl { display: block; font-size: 13px; color: var(--muted); margin: 14px 0 6px; }
  .btn { border: 1px solid var(--line); border-radius: 12px; padding: 12px 18px; font-weight: 700; background: var(--white); color: var(--ink); white-space: nowrap; }
  .btn:hover { background: var(--soft); }
  .btn:disabled { opacity: .45; cursor: default; }
  .btn.gold { background: var(--gold); border-color: #F2B232; color: var(--ink); }
  .btn.gold:hover { background: #FFBC33; }
  .btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
  .btn.quiet { background: var(--soft); border-color: transparent; }
  .btn.block { width: 100%; }
  .btn.sm { padding: 8px 12px; font-size: 14px; border-radius: 10px; }
  .link { border: 0; background: none; padding: 0; color: var(--rust); font-weight: 700; position: relative; }
  .link::after { content: ''; position: absolute; inset: -11px -6px; }   /* 글자 링크도 누르기 쉽게 */
  .link.danger { color: var(--bad); }
  .row { display: flex; gap: 8px; align-items: center; }
  .row > .grow { flex: 1; min-width: 0; }
  .msg { font-size: 14px; margin: 10px 0 0; }
  .msg:empty { display: none; }
  .msg.ok { color: var(--ok); } .msg.err { color: var(--bad); }

  /* ---------- 쿠폰: 부적 쪽지 (밝은 한지 + 황토 두 줄 테두리) ---------- */
  .stat { display: flex; align-items: baseline; gap: 6px; margin: 0 0 16px; }
  .stat b { font-family: var(--display); font-weight: 700; font-size: 30px; color: var(--rust); }

  .slips { display: grid; gap: 12px; }
  .slip {
    position: relative; color: var(--text); background: #FFFDF8; border-radius: 12px; padding: 16px 16px 14px 18px;
    box-shadow: inset 0 0 0 1px var(--line-2), inset 0 0 0 5px #FFFDF8, inset 0 0 0 6px var(--line);
    display: grid; grid-template-columns: 1fr auto; gap: 4px 14px;
  }
  .slip.expired { opacity: .55; filter: grayscale(.7); }
  .slip .code { font-family: var(--display); font-weight: 700; font-size: 19px; line-height: 1.3; color: var(--ink); word-break: break-all; }
  .slip .rewards { list-style: none; margin: 4px 0 0; padding: 0; font-size: 13px; line-height: 1.55; color: var(--muted); }
  .slip .rewards li::before { content: ''; display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--gold); margin: 0 7px 2px 0; vertical-align: middle; }
  .slip .meta { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 10px; font-size: 12.5px; color: var(--muted); }
  .slip .meter { width: 90px; height: 5px; border-radius: 3px; background: var(--soft-2); overflow: hidden; }
  .slip .meter > i { display: block; height: 100%; background: var(--gold); }
  .slip .side { grid-row: 1 / 2; grid-column: 2; display: flex; flex-direction: column; align-items: center; gap: 6px; }
  .stamp {
    width: 58px; height: 58px; border-radius: 50%; border: 0; background: var(--gold); color: var(--ink);
    font-family: var(--display); font-weight: 700; font-size: 15px; line-height: 1.1; transform: rotate(-6deg);
    box-shadow: inset 0 0 0 3px var(--gold), inset 0 0 0 4.5px rgba(255,255,255,.8);
    transition: transform .12s;
  }
  .stamp:active { transform: rotate(-6deg) scale(.94); }
  .stamp.done { background: transparent; color: var(--muted); box-shadow: inset 0 0 0 1.5px var(--line-2); cursor: default; }
  .stamp:disabled:not(.done) { opacity: .6; cursor: default; }
  .slip .more { border: 0; background: none; color: var(--muted); width: 32px; height: 28px; border-radius: 8px; font-size: 18px; line-height: 1; }
  .slip .more:hover { background: var(--soft); }
  .busy { font-size: 12px; font-weight: 700; color: var(--rust); margin-left: 4px; }
  details.past > summary { cursor: pointer; color: var(--muted); font-size: 14px; margin: 22px 0 10px; list-style: none; }
  details.past > summary::-webkit-details-marker { display: none; }
  details.past > summary::after { content: ' 보기'; }
  details.past[open] > summary::after { content: ' 접기'; }

  /* ---------- 목록 (기록 · 도사) ---------- */
  .seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--soft); border-radius: 12px; padding: 4px; gap: 4px; margin-bottom: 12px; }
  .seg button { border: 0; background: none; padding: 8px 4px; border-radius: 9px; font-size: 14px; color: var(--muted); font-weight: 500; }
  .seg button[aria-pressed=true] { background: var(--white); color: var(--ink); font-weight: 700; box-shadow: 0 1px 2px rgba(43,27,13,.08); }
  .list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
  .list > li { border-bottom: 1px solid var(--line); }
  .item { width: 100%; border: 0; background: none; text-align: left; padding: 13px 4px; display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: center; }
  .item:hover { background: var(--soft); }
  .item .t { font-weight: 600; color: var(--ink); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .item .s { font-size: 13px; color: var(--muted); grid-column: 1; }
  .item .r { grid-row: 1 / 3; grid-column: 2; text-align: right; font-size: 13px; display: grid; gap: 4px; justify-items: end; }
  .counts { display: flex; gap: 10px; justify-content: flex-end; }
  .c-ok { color: var(--ok); } .c-used { color: var(--muted); } .c-fail { color: var(--bad); }
  .tag { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--soft-2); color: var(--muted); }
  .tag.live { background: var(--gold-soft); color: var(--rust); }
  .more-row { text-align: center; margin: 14px 0 0; }
  .empty { text-align: center; color: var(--muted); padding: 34px 16px; }
  .empty b { display: block; font-family: var(--display); font-weight: 700; font-size: 18px; color: var(--ink); margin-bottom: 4px; }
  .toolbar { display: grid; gap: 8px; margin-bottom: 12px; }
  .summary { font-size: 13px; color: var(--muted); margin: 0 0 8px; min-height: 1.2em; }

  /* ---------- 내 정보 ---------- */
  .card { background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
  .card + .card { margin-top: 12px; }
  .who { display: flex; align-items: center; gap: 12px; }
  .who .avatar { width: 44px; height: 44px; border-radius: 12px; background: var(--gold-soft); color: var(--rust); font-family: var(--display); font-weight: 700; font-size: 20px; display: grid; place-items: center; flex: none; }
  .who .t { font-weight: 700; font-size: 17px; color: var(--ink); }
  .status-list { list-style: none; margin: 12px 0 0; padding: 0; }
  .status-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14px; }
  .status-list .code { font-family: var(--display); font-weight: 500; font-size: 15px; color: var(--ink); }

  /* ---------- 서버 선택 ---------- */
  .sp { position: relative; width: 100%; }
  .sp-btn { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--soft); text-align: left; font-size: 16px; color: var(--ink); }
  .sp-btn .ph { color: #B3A796; }
  .sp-btn .caret { color: var(--muted); font-size: 11px; transition: transform .15s; }
  .sp.open .sp-btn { border-color: var(--line-2); background: var(--white); }
  .sp.open .sp-btn .caret { transform: rotate(180deg); }
  .sp-panel { display: none; position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 15; max-height: min(60vh, 420px); overflow: auto; padding: 10px 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); box-shadow: 0 12px 32px rgba(43,27,13,.14); }
  .sp.up .sp-panel { top: auto; bottom: calc(100% + 6px); }
  .sp.open .sp-panel { display: block; }
  .sp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 6px 10px; }
  .sp-row { display: flex; align-items: center; gap: 3px; }
  .sp-world { flex: 1; min-width: 0; font-size: 13px; color: var(--muted); white-space: nowrap; }
  .sp-chip { min-width: 30px; height: 32px; padding: 0 6px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); font-size: 13px; color: var(--ink); }
  .sp-chip:hover { border-color: var(--line-2); background: var(--soft); }
  .sp-chip[aria-pressed=true] { background: var(--gold); border-color: #F2B232; color: var(--ink); font-weight: 700; }
  .sp-extra { display: flex; gap: 6px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); flex-wrap: wrap; align-items: center; }
  .sp-extra .field { flex: 1; min-width: 140px; padding: 8px 10px; font-size: 14px; }

  /* ---------- 스티키: 앱 바 높이(--top)는 스크립트가 잼 ---------- */
  :root { --top: 56px; --dviews-h: 46px; }
  .dex-panel > input.field[type=search], .dex-panel.enc > input[data-q] { position: sticky; top: var(--top); z-index: 3; box-shadow: 0 0 0 6px var(--white), 0 6px 10px -6px rgba(43,27,13,.12); }
  .deck-views { position: sticky; top: var(--top); z-index: 4; box-shadow: 0 0 0 6px var(--white); }
  #recSits { position: sticky; top: calc(var(--top) + var(--dviews-h)); z-index: 3; background: var(--white); box-shadow: 0 6px 10px -8px rgba(43,27,13,.15); }
  .deck-stick { position: fixed; left: 50%; top: calc(var(--top) + var(--dviews-h)); width: 100%; max-width: 480px; z-index: 4; transform: translate(-50%, -8px); opacity: 0; pointer-events: none; transition: opacity .15s, transform .15s;
    display: flex; align-items: center; gap: 8px; padding: 6px 16px; background: rgba(255,255,255,.96); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); box-sizing: border-box; }
  .deck-stick.on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
  .deck-stick .dsm { display: flex; gap: 3px; flex: 1; min-width: 0; overflow: hidden; }
  .deck-stick .dsm img, .deck-stick .dsm .ph { width: 26px; height: 26px; border-radius: 6px; flex: none; }
  .deck-stick .dsm .ph { border: 1.5px dashed var(--line-2); box-sizing: border-box; }
  .deck-stick .dsm .u { box-shadow: 0 0 0 2px var(--gold); }
  .deck-stick .pw { text-align: right; line-height: 1.1; white-space: nowrap; } .deck-stick .pw small { display: block; font-size: 10px; color: var(--muted); } .deck-stick .pw b { color: var(--rust); font-size: 16px; }
  .deck-stick .btn { padding: 6px 10px; font-size: 13px; }
  .sheet .actions:last-child { position: sticky; bottom: calc(-20px - env(safe-area-inset-bottom)); background: var(--white); margin: 18px -16px calc(-20px - env(safe-area-inset-bottom)); padding: 10px 16px calc(14px + env(safe-area-inset-bottom)); box-shadow: 0 -8px 12px -10px rgba(43,27,13,.2); z-index: 2; }

  /* 편집 화면을 내려 요약 바가 뜨면 덱 탭 고정을 풀고(요약 바가 그 자리) 하위 탭을 그 아래에 고정 */
  body.deck-stuck .deck-views { position: static; }
  body.deck-stuck .deck-stick { top: var(--top); }
  body.deck-stuck .deck-subs { position: sticky; top: calc(var(--top) + 44px); z-index: 3; box-shadow: -16px 0 0 var(--white), 16px 0 0 var(--white), 0 -6px 0 var(--white), 0 6px 0 var(--white); }
  .deck-stick { min-height: 44px; }
  /* 추천 계산 중: 진행 막대 + 빈 카드 */
  .rec-prog { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); margin: 4px 0 8px; }
  .rec-prog .bar { flex: none; width: 90px; height: 6px; background: var(--soft-2); border-radius: 999px; overflow: hidden; } .rec-prog .bar i { display: block; height: 100%; background: var(--gold); transition: width .2s; }
  .rec.skel { height: 118px; position: relative; overflow: hidden; }
  .rec.skel::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.6), transparent); animation: skel 1.2s infinite; transform: translateX(-100%); }
  @keyframes skel { to { transform: translateX(100%); } }
  .rec.skel span { display: block; height: 12px; border-radius: 6px; background: var(--soft-2); margin: 6px 0 10px; } .rec.skel span:nth-child(2) { height: 34px; width: 80%; } .rec.skel span:nth-child(3) { width: 60%; }
  /* 칸 고르기: 다른 칸에 있는 도술 */
  .dplist button.inuse { background: var(--soft); } .dplist button.cur { background: var(--gold-soft); }
  .dplist .slotno { display: inline-block; font-style: normal; font-size: 11px; font-weight: 700; color: var(--rust); margin-left: 6px; }
  .dp-legend { margin: 2px 0 0; font-size: 12px; }
  /* 저장 안 한 편집 덱 */
  .draft { background: var(--gold-soft); border-radius: 14px; padding: 10px 12px; margin-bottom: 8px; }
  .draft .fh { display: flex; justify-content: space-between; align-items: center; } .draft .fh b { color: var(--ink); }
  .tag.warn { background: var(--white); color: var(--bad); font-size: 11px; font-weight: 700; border-radius: 999px; padding: 1px 8px; }
  .draft .row { gap: 6px; margin-top: 6px; }
  /* 내 도술: 미보유는 '+ 보유'만 */
  .mine-list .own-on { min-height: 36px; } .mine-list .own-off { display: block; font-size: 12px; padding: 6px 0 2px; color: var(--muted); font-weight: 500; }
  .mine-list select { min-height: 36px; }
  /* 쿠폰: 빠진 쿠폰 모두 입력 */
  .redeem-all { width: 100%; margin-top: 12px; min-height: 48px; }
  .empty .retry { margin-top: 10px; }
  /* 덱 미리보기 아이콘은 눌러서 도감 보기 */
  .deck-mini img[data-mini-skill] { cursor: pointer; }

  /* 도감: 검색칸 아래 1차 분류 칩도 고정 */
  .dex-panel.enc > [data-c1], #styleChips, #achCatChips, #titleCatChips { position: sticky; top: calc(var(--top) + 52px); z-index: 3; background: var(--white); box-shadow: 0 6px 10px -8px rgba(43,27,13,.15); }
  .dex-panel > input.field[type=search], .dex-panel.enc > input[data-q] { box-shadow: -16px 0 0 var(--white), 16px 0 0 var(--white), 0 -6px 0 var(--white), 0 6px 0 var(--white) !important; }
  .deck-views { box-shadow: -16px 0 0 var(--white), 16px 0 0 var(--white), 0 -6px 0 var(--white), 0 6px 0 var(--white) !important; }
  #recSits { box-shadow: 0 6px 10px -8px rgba(43,27,13,.15) !important; }   /* 칩 줄은 이미 좌우 -16px로 앱 폭을 꽉 채움: 옆 그림자를 더하면 앱 밖으로 삐져나옴 */
  #dv-list .actions { gap: 8px; } #dv-list .actions .btn { flex: 1; }
  input[type=search]::-webkit-search-cancel-button { -webkit-appearance: none; height: 16px; width: 16px; cursor: pointer;
    background: center / 16px no-repeat url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2376695A' stroke-width='2.4' stroke-linecap='round'><path d='M6 6l12 12M18 6L6 18'/></svg>"); }
  .permin { height: 96px; } .permin b { font-size: 10px; color: var(--muted); font-weight: 600; } .permin span { justify-content: flex-end; }
  .muted { color: var(--muted); font-weight: 400; }
  .seg button[aria-selected=true] { background: var(--white); color: var(--ink); font-weight: 700; box-shadow: 0 1px 2px rgba(43,27,13,.08); }

  .recs .rec .btn.quiet, .famous .btn.quiet, .goal-res .btn.quiet, .draft .btn.quiet { background: var(--white); border: 1px solid var(--line); }
  .cp-block { margin-top: 8px; } .cp-block .cp-d { margin: 0 0 6px; }

  /* 허수아비 수련장 */
  .dm-stage { background: linear-gradient(#f6efe2, #efe3cc); border-radius: 16px; padding: 10px 12px 8px; margin-top: 6px; position: relative; }
  .dm-arena { display: grid; grid-template-columns: 44px 1fr 120px; align-items: end; gap: 6px; height: 150px; margin-top: 6px; }
  .dm-me { font-size: 34px; text-align: center; padding-bottom: 8px; }
  .dm-dist { align-self: center; position: relative; height: 22px; } .dm-dist i { position: absolute; left: 0; top: 9px; height: 3px; background: var(--line-2); border-radius: 2px; transition: width .15s; }
  .dm-dist small { position: absolute; left: 0; top: -6px; font-size: 11px; color: var(--muted); }
  .dm-dummy { position: relative; height: 150px; display: flex; align-items: flex-end; justify-content: center; }
  .dm-dummy svg { width: 80px; height: 110px; transform-origin: 50% 100%; }
  .dm-dummy.hit svg { animation: dmhit .18s ease-out; } @keyframes dmhit { 30% { transform: rotate(-5deg) translateX(-2px); } 70% { transform: rotate(3deg); } }
  .dm-marks { display: flex; flex-wrap: wrap; gap: 3px; justify-content: flex-end; min-height: 46px; align-content: flex-end; margin-top: 6px; }
  .mk { font-size: 10.5px; font-weight: 700; border-radius: 999px; padding: 1px 6px; background: #fff; color: var(--rust); border: 1px solid var(--line-2); white-space: nowrap; }
  .mk.self { color: var(--ok); } .mk.buf { color: #6a4bb3; }
  .dm-pops { position: absolute; inset: 20px 0 30px; pointer-events: none; }
  .pop { position: absolute; bottom: 30%; font-weight: 900; font-size: 15px; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.6), 0 0 1px #000; animation: pop 1s ease-out forwards; white-space: nowrap; }
  .pop.ult { font-size: 22px; color: #ffd36b; } .pop.link { color: #e5c3ff; } .pop.dot { font-size: 12px; color: #f1e7d6; } .pop.reset { font-size: 14px; color: #8ef0b0; }
  @keyframes pop { from { transform: translateY(0) scale(.9); opacity: 0; } 15% { opacity: 1; transform: translateY(-6px) scale(1.05); } to { transform: translateY(-60px); opacity: 0; } }
  .dm-cast { text-align: center; font-size: 13px; font-weight: 700; color: var(--ink); min-height: 18px; margin-top: 4px; }
  .dm-bar { display: grid; grid-template-columns: repeat(9, 1fr); gap: 4px; margin-top: 8px; }
  .dm-sk { position: relative; aspect-ratio: 1; border-radius: 9px; overflow: hidden; border: 1.5px solid var(--line); background: var(--soft); }
  .dm-sk img { width: 100%; height: 100%; display: block; } .dm-sk.ult { border-color: var(--gold); }
  .dm-sk .cdv { position: absolute; inset: 0; } .dm-sk em { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-style: normal; font-weight: 800; font-size: 12px; color: #fff; text-shadow: 0 1px 2px #000; }
  .dm-sk.now { border-color: var(--rust); box-shadow: 0 0 0 2px var(--rust); }
  .dm-gauges { display: grid; gap: 4px; margin-top: 8px; }
  .gg { display: grid; grid-template-columns: 96px 1fr auto; gap: 8px; align-items: center; font-size: 12px; }
  .gg .gn { color: var(--text); font-weight: 600; white-space: nowrap; } .gg .gb { height: 8px; background: var(--soft-2); border-radius: 999px; overflow: hidden; } .gg .gb i { display: block; height: 100%; background: var(--gold); transition: width .12s; }
  .gg .gv { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; } .gg .gv b { color: var(--ok); }
  .dm-ctl { display: flex; gap: 6px; margin-top: 10px; } .dm-ctl .btn { flex: 1; }
  .dm-note { margin-top: 8px; }
  /* 수련장 도사 그림(입혀보기 외형, 무기 빼고) */
  .dm-me .dm-fig { position: relative; width: 100%; height: 100%; }
  .dm-me .dm-fig::after, .dm-dummy::after { content: ''; position: absolute; left: 50%; bottom: -3px; width: 46px; height: 8px; margin-left: -23px; border-radius: 50%; background: rgba(60,40,15,.16); pointer-events: none; }
  .dm-me .fig { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%) scale(var(--figk, .5)); transform-origin: 50% 100%; pointer-events: none; }
  .dm-me .fig img { position: absolute; image-rendering: pixelated; image-rendering: crisp-edges; }
  .dm-me:has(.dm-fig) { align-self: stretch; padding: 0; }
  .dm-me.cast .dm-fig { animation: dmcast .32s ease-out; } @keyframes dmcast { 40% { transform: translateX(5px) rotate(4deg); } }
  /* 수련장 두 덱 비교 */
  .dm-clock { font-size: 12px; color: var(--muted); white-space: nowrap; } .dm-clock b { font-size: 15px; color: var(--ink); font-variant-numeric: tabular-nums; }
  .dm-tag.A { background: var(--rust); } .dm-tag.B { background: #6a4bb3; } .dm-tag.C { background: #2f8f83; }
  .dm-tag { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 6px; color: #fff; font-size: 11px; font-weight: 800; margin-right: 4px; vertical-align: middle; }
  .dm-lanes { display: grid; gap: 8px; }
  .dm-lane-h { display: flex; align-items: baseline; gap: 4px; margin-bottom: 6px; min-width: 0; } .dm-lane-h b { font-size: 14px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 45%; } .dm-lane-h small { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

  .goal-box { margin-bottom: 6px; } .goal-box #goalGo { width: 100%; margin-top: 4px; } .goal-res { background: var(--gold-soft); margin-top: 10px; padding: 10px 12px; border-radius: 14px; list-style: none; }
  .goal-res .fh { display: flex; justify-content: space-between; align-items: center; gap: 8px; } .goal-res .fh b { color: var(--ink); font-size: 15px; }
  .goal-res .tag { font-size: 12px; background: var(--white); color: var(--rust); font-weight: 700; border-radius: 999px; padding: 1px 8px; white-space: nowrap; }
  .goal-res .why { margin: 6px 0 8px; padding-left: 18px; font-size: 13.5px; } .goal-res .row { gap: 6px; flex-wrap: wrap; } .goal-same { color: var(--ok); font-weight: 700; margin: 4px 0 0; }
  .goal-box .chips { padding-top: 4px; }

  /* ---------- 바텀 시트 ---------- */
  .scrim { position: fixed; inset: 0; background: var(--shade); z-index: 20; display: none; }
  .scrim.on { display: block; }
  .sheet {
    position: fixed; left: 50%; bottom: 0; z-index: 21; width: 100%; max-width: 480px; max-height: 88vh; overflow: auto;
    background: var(--white); border-radius: 20px 20px 0 0; padding: 8px 16px calc(20px + env(safe-area-inset-bottom));
    transform: translate(-50%, 105%); transition: transform .22s ease-out; visibility: hidden;
  }
  .sheet.on { transform: translate(-50%, 0); visibility: visible; }
  .more-rank { margin-top: 6px; }
  .share-btn { position: absolute; top: 14px; right: 12px; z-index: 2; width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--soft); color: var(--rust); }
  .share-btn[hidden] { display: none; } .share-btn:active { background: var(--soft-2); }
  .sheet.has-share #sheetBody .sk-head, .sheet.has-share #sheetBody > h3:first-child { padding-right: 38px; }
  .sheet .grab { width: 40px; height: 4px; border-radius: 2px; background: var(--line-2); margin: 4px auto 12px; }
  .sheet h3:focus { outline: none; }
  .sheet h3 { font-size: 18px; margin: 0 0 4px; color: var(--ink); word-break: break-all; }
  .actions { display: flex; gap: 8px; flex-wrap: wrap; }
  .sheet .actions { display: flex; gap: 8px; margin-top: 18px; }
  .sheet .actions .btn { flex: 1; }
  .sheet h4 { margin: 18px 0 6px; font-size: 14px; color: var(--muted); font-weight: 500; }
  .menu-list { list-style: none; margin: 6px 0 0; padding: 0; }
  .menu-list button { width: 100%; text-align: left; border: 0; background: none; padding: 14px 4px; font-size: 16px; border-top: 1px solid var(--line); color: var(--ink); }
  .menu-list li:first-child button { border-top: 0; }
  .menu-list .danger { color: var(--bad); }
  .bar { height: 6px; border-radius: 3px; background: var(--soft-2); overflow: hidden; margin: 14px 0 4px; }
  .bar > i { display: block; height: 100%; width: 0; background: var(--gold); transition: width .3s; }
  .results { list-style: none; margin: 12px 0 0; padding: 0; font-size: 14px; }
  .results li { display: grid; grid-template-columns: 1fr auto; gap: 0 10px; padding: 9px 0; border-top: 1px solid var(--line); }
  .results .why { grid-column: 1 / -1; font-size: 12.5px; color: var(--muted); }
  .hist { list-style: none; margin: 0; padding: 0; font-size: 14px; }
  .hist li { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); }
  dl.info { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 12px 0 0; font-size: 14px; align-items: start; }
  dl.info dt { color: var(--muted); } dl.info dd { margin: 0; min-width: 0; color: var(--ink); }

  .toast { position: fixed; left: 50%; bottom: calc(var(--nav-h) + 12px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 30; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 12px; font-size: 14px; max-width: calc(100% - 32px); opacity: 0; pointer-events: none; transition: opacity .2s; box-shadow: 0 8px 24px rgba(43,27,13,.18); }
  .toast.on { opacity: 1; }

  /* ---------- 도감 ---------- */
  .dex-panel { margin-top: 4px; }
  .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
  #s-dex { padding-top: 16px; }
  .dex-search[hidden] { display: none; }
  .dex-panel.search-hide { display: none !important; }
  .dex-search { margin-bottom: 10px; }
  .sres { margin-top: 6px; } .sres h3 { margin: 14px 0 2px; font-size: 15px; color: var(--ink); } .sres h3 .n { color: var(--muted); font-weight: 500; font-size: 13px; }
  .sres .more { margin-top: 4px; }
  #dexTabs { grid-auto-flow: row; grid-template-columns: repeat(5, 1fr); grid-auto-columns: unset; }   /* 9개를 5 · 4개 두 줄: 모두 한눈에 */
  #dexTabs::-webkit-scrollbar { display: none; }
  #dexTabs button { white-space: nowrap; }
  .tile.pic { background: var(--soft); }
  .tile.pic { position: relative; }
  .tile.pic img { position: absolute; inset: 0; object-fit: contain; padding: 2px; }
  .tile.none { font-size: 11px; color: var(--muted); font-family: var(--ui); font-weight: 500; }
  .pics { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
  .pics figure { margin: 0; text-align: center; font-size: 12px; color: var(--muted); }
  .pics img { width: 88px; height: 88px; object-fit: contain; background: var(--soft); border-radius: 12px; display: block; margin-bottom: 4px; }
  .sk-desc.pre { white-space: pre-line; }
  .warn { margin: 12px 0 0; padding: 8px 10px; border-radius: 10px; background: var(--soft-2); font-size: 13px; color: var(--text); }
  .outfit-cta { width: 100%; display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; align-items: center; text-align: left; margin-bottom: 12px; padding: 14px 16px; border: 1px solid var(--line-2); border-radius: 14px; background: var(--gold-soft); color: var(--ink); }
  .outfit-cta b { font-family: var(--display); font-size: 17px; } .outfit-cta span { grid-column: 1; font-size: 13px; color: var(--text); }
  .outfit-cta i { grid-column: 2; grid-row: 1 / 3; font-style: normal; font-size: 24px; color: var(--rust); }
  .outfit-head { display: flex; align-items: center; gap: 8px; }
  .about-link { display: block; margin: 28px auto 4px; padding: 6px 10px; border: 0; background: none; font-size: 12px; color: var(--muted); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
  .about-sec h4 { margin: 16px 0 4px; font-size: 14px; color: var(--ink); }
  .about-sec p { margin: 4px 0 0; font-size: 13px; line-height: 1.65; color: var(--text); }
  .install-steps { margin: 12px 0 0; padding-left: 20px; font-size: 15px; line-height: 1.8; color: var(--text); }
  .install-steps svg { vertical-align: -3px; color: var(--rust); }
  .ibtn { flex: none; width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 10px; background: var(--white); color: var(--ink); }
  .ibtn:disabled { opacity: .4; } .ibtn:active:not(:disabled) { background: var(--soft); }
  .slot.off { opacity: .55; cursor: not-allowed; } .slot.off .box:empty::after { content: '×'; } .slot small { display: block; font-size: 10px; color: var(--muted); } .outfit-head h3 { flex: 1; margin: 0; } .outfit-head .n { font-size: 13px; color: var(--muted); }
  .seg.mini { margin: 0; padding: 3px; } .seg.mini button { padding: 5px 14px; font-size: 13px; }
  .hint { font-size: 13px; color: var(--muted); margin: 6px 0 0; } .hint.center { text-align: center; margin: 14px 0 0; }
  .outfit-stage { position: relative; height: 296px; margin-top: 12px; border-radius: 16px; background: var(--soft); color: var(--line-2); overflow: hidden; }
  .outfit-stage .doll { position: absolute; left: 50%; top: 22px; height: 270px; transform: translateX(-50%); }
  .slot { position: absolute; width: 70px; border: 0; background: none; padding: 0; font-size: 11px; color: var(--muted); text-align: center; }
  .slot .box { position: relative; width: 58px; height: 58px; margin: 0 auto 3px; border-radius: 14px; background: var(--white); box-shadow: inset 0 0 0 1.5px var(--line-2); display: grid; place-items: center; overflow: hidden; }
  .slot .box:empty::after { content: '+'; font-size: 22px; color: var(--line-2); }
  .slot.on .box { box-shadow: inset 0 0 0 2px var(--gold); } .slot.on { color: var(--ink); font-weight: 700; }
  .slot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 3px; }
  .slot-head { top: 10px; left: 8px; } .slot-uface { top: 106px; left: 8px; } .slot-lface { top: 202px; left: 8px; }
  .slot-body { top: 10px; right: 8px; } .slot-weapon { top: 106px; right: 8px; } .slot-mat { top: 202px; right: 8px; }
  .outfit-stage .fig { position: absolute; left: 50%; top: 22px; transform: translateX(-50%); pointer-events: none; }
  .outfit-stage .fig img { position: absolute; image-rendering: pixelated; image-rendering: crisp-edges; }
  .outfit-cus { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin-top: 10px; }
  .outfit-cus .slot { position: static; width: auto; } .outfit-cus .slot .box { width: 50px; height: 50px; border-radius: 12px; }
  .outfit-list { list-style: none; margin: 14px 0 0; padding: 0; }
  .outfit-list li { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
  .outfit-list .k { display: block; font-size: 12px; color: var(--muted); } .outfit-list .mt { display: block; font-size: 12px; color: var(--muted); }
  .lnk { border: 0; background: none; padding: 0; font: inherit; font-weight: 700; color: var(--ink); text-align: left; text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
  .outfit-list .x { border: 0; background: var(--soft); width: 32px; height: 32px; border-radius: 50%; font-size: 18px; color: var(--muted); }
  .pick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px 6px; margin-top: 12px; }
  .pick { border: 0; background: none; padding: 0; font-size: 11px; line-height: 1.3; color: var(--text); text-align: center; word-break: keep-all; }
  .pick .box { position: relative; display: grid; place-items: center; aspect-ratio: 1; margin-bottom: 4px; border-radius: 12px; background: var(--soft); box-shadow: inset 0 0 0 1px var(--line); font-size: 12px; color: var(--muted); overflow: hidden; }
  .pick img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 4px; }
  .pick.legend .box { box-shadow: inset 0 0 0 2px var(--gold-soft), inset 0 0 0 1px var(--line-2); }
  .pick.on .box, .pick.on .box.gbg { box-shadow: 0 0 0 2.5px var(--gold) !important; }
  .slot.on .box.gbg { box-shadow: 0 0 0 2px var(--gold) !important; } .pick.on { font-weight: 700; color: var(--ink); }
  .pick small { display: block; color: var(--muted); font-size: 10px; }
  .egrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 8px; }
  .egrid > li { border: 0 !important; padding: 0 !important; } .egrid > li.empty, .egrid > li.more-sentinel { grid-column: 1 / -1; }
  .more-sentinel { height: 1px; }
  .ecard { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: stretch; gap: 2px; padding: 6px 6px 9px; border: 1px solid var(--line); border-radius: 14px; background: var(--white); text-align: center; }
  .ecard:hover { background: var(--soft); }
  .ecard .pic { position: relative; display: grid; place-items: center; aspect-ratio: 1; margin-bottom: 5px; border-radius: 10px; background: var(--soft); overflow: hidden; }
  .ecard.legend .pic { box-shadow: inset 0 0 0 2px var(--gold); }
  .gbg { background-position: center; background-size: cover; background-repeat: no-repeat; box-shadow: none !important; }
  /* 칸마다 배경색을 따로 주고 있어서 등급 배경은 !important */
  .g-normal { background-image: url(/img/g/normal.webp) !important; } .g-rare { background-image: url(/img/g/rare.webp) !important; } .g-heroic { background-image: url(/img/g/heroic.webp) !important; }
  .g-legendary { background-image: url(/img/g/legendary.webp) !important; } .g-basic { background-image: url(/img/g/basic.webp) !important; } .g-special { background-image: url(/img/g/special.webp) !important; }
  .gbg { background-size: cover !important; background-position: center !important; }
  #dexTabs[hidden] { display: none; }
  .ecard .pic.gbg { border-radius: 12px; }
  .ecard .pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 6px; }
  #dex-monsters .ecard .pic img { padding: 2px; }   /* 몬스터 초상은 원본부터 틀에 맞춰 잘린 그림이라 칸에 꽉 채움 */
  .ecard .none { font-size: 11px; color: var(--muted); }
  /* 거래 가능 저울: 카드 그림 오른쪽 위, 배경 없이 흰색 (밝은 등급 배경에서도 보이게 옅은 그림자) */
  .trade { position: absolute; right: 5px; top: 5px; z-index: 1; width: 16px; height: 16px; color: #fff; filter: drop-shadow(0 1px 1.5px rgba(43,27,13,.55)); }
  .trade svg { width: 100%; height: 100%; display: block; }
  .trade.inline { position: static; display: inline-block; width: 15px; height: 15px; margin-right: 5px; vertical-align: -2px; color: var(--ok); filter: none; }
  .ecard .bdg { position: absolute; left: 4px; top: 4px; max-width: calc(100% - 8px); padding: 1px 6px; border-radius: 999px; background: rgba(255,255,255,.92); font-size: 10px; font-weight: 700; color: var(--rust); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .ecard .nm { font-size: 13px; font-weight: 700; color: var(--ink); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: keep-all; }
  .ecard .mt { font-size: 11px; color: var(--muted); line-height: 1.35; }
  table.bt td:last-child { white-space: nowrap; vertical-align: top; }
  table.bt small.ad { display: block; font-size: 11px; color: var(--muted); line-height: 1.4; margin-top: 1px; }
  .drops { margin-top: 14px; } .drops h4 { margin: 0 0 6px; font-size: 14px; color: var(--ink); }
  .drops .grp { margin-top: 8px; font-size: 12px; color: var(--muted); }
  .drops .grp.key { display: inline-block; margin-top: 10px; padding: 3px 10px; border-radius: 999px; background: var(--gold-soft); color: var(--rust); font-weight: 700; }
  .dropchips { margin: 4px -16px 0; padding-top: 6px; }
  .drop-grid.icons [hidden] { display: none; }
  .drop-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px 6px; margin-top: 6px; }
  .drop-grid button { border: 0; background: none; padding: 0; font-size: 11px; line-height: 1.3; color: var(--text); text-align: center; word-break: keep-all; }
  .drop-grid .box { position: relative; display: block; aspect-ratio: 1; margin-bottom: 3px; border-radius: 10px; background: var(--soft); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
  .drop-grid .box img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 4px; }
  .drop-grid .amt { position: absolute; right: 3px; bottom: 2px; font-size: 10px; font-weight: 700; color: var(--ink); background: rgba(255,255,255,.85); border-radius: 6px; padding: 0 3px; }
  details.zone { margin-top: 6px; border-top: 1px solid var(--line); padding-top: 6px; }
  details.zone summary { cursor: pointer; font-size: 13px; font-weight: 700; color: var(--ink); padding: 4px 0; }
  details.zone summary .n { color: var(--muted); font-weight: 500; margin-left: 4px; }
  details.prob { margin-top: 10px; } details.prob > summary { cursor: pointer; font-size: 13px; font-weight: 700; color: var(--rust); padding: 4px 0; }
  details.prob > summary .n { color: var(--muted); font-weight: 500; }
  .pnote { margin: 6px 0; font-size: 12px; line-height: 1.5; color: var(--muted); background: var(--soft); border-radius: 10px; padding: 8px 10px; }
  .phead { margin: 12px 0 2px; font-size: 13px; color: var(--ink); } .phead b { color: var(--rust); }
  .tag { display: inline-block; margin-left: 4px; padding: 0 5px; border-radius: 6px; background: var(--soft-2); color: var(--muted); font-size: 10px; font-weight: 700; vertical-align: 1px; }
  table.prob-t { font-size: 12px; table-layout: fixed; } table.prob-t th:nth-child(1) { width: 46%; } table.prob-t th:nth-child(2) { width: 16%; }
  table.prob-t th:nth-child(3), table.prob-t th:nth-child(4) { width: 19%; } table.prob-t td:first-child { overflow: hidden; text-overflow: ellipsis; }
  .lnk.sm { font-size: 12px; font-weight: 500; text-align: left; }
  .blist { list-style: none; margin: 6px 0 0; padding: 0; }
  .blist li + li { border-top: 1px solid var(--line); }
  .brow { width: 100%; display: grid; grid-template-columns: auto 1fr auto auto; gap: 10px; align-items: center; padding: 6px 0; border: 0; background: none; text-align: left; color: var(--text); font-size: 13px; }
  .brow .tile { width: 36px; height: 36px; border-radius: 8px; } .brow .bn small { display: block; font-size: 11px; color: var(--muted); }
  .brow .ba { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; } .brow .bp { font-size: 13px; font-weight: 700; color: var(--rust); font-variant-numeric: tabular-nums; }
  .clist { margin: 4px 0 0; padding-left: 18px; font-size: 13px; line-height: 1.6; } .clist b { color: var(--rust); } .clist small { display: block; color: var(--muted); font-size: 12px; }
  .combine-cta { margin: -4px 0 12px; }
  .drop-grid.icons { grid-template-columns: repeat(6, 1fr); gap: 6px; }
  .drop-grid.icons .box { margin: 0; border-radius: 8px; } .drop-grid.icons .box img { padding: 3px; }
  .drop-grid.icons .amt { font-size: 9px; right: 2px; bottom: 1px; }
  .drop-grid .legend .box { box-shadow: inset 0 0 0 2px var(--gold); }
  .chips.variants { margin: 10px -16px 0; padding-top: 4px; }
  .sk-head .sub .cp { color: var(--rust); font-weight: 700; }
  .ecard .st { margin-top: auto; padding-top: 3px; font-size: 11px; font-weight: 700; color: var(--rust); font-variant-numeric: tabular-nums; }
  dl.raw { display: grid; grid-template-columns: minmax(96px, 38%) 1fr; gap: 3px 10px; margin: 6px 0 0; font-size: 12px; word-break: break-all; }
  dl.raw dt { color: var(--muted); } dl.raw dd { margin: 0; color: var(--text); }
  dl.raw .sep { grid-column: 1 / -1; margin-top: 8px; font-weight: 700; color: var(--ink); }
  .chips { display: flex; gap: 6px; overflow-x: auto; padding: 10px 0 2px; margin: 0 -16px; padding-left: 16px; padding-right: 16px; scrollbar-width: none; }
  .chips[hidden] { display: none; }
  .chips::-webkit-scrollbar { display: none; }
  .chips button { min-height: 38px; flex: none; border: 1px solid var(--line); background: var(--white); color: var(--text); border-radius: 999px; padding: 7px 12px; font-size: 14px; white-space: nowrap; }
  .chips button .n { color: var(--muted); font-size: 12px; margin-left: 4px; }
  .chips button[aria-pressed=true] { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 700; }
  .chips button[aria-pressed=true] .n { color: rgba(255,255,255,.7); }
  .chips.small button { padding: 5px 11px; font-size: 13px; min-height: 34px; position: relative; }
  .chips.small button::after { content: ''; position: absolute; inset: -5px -2px; }   /* 눈에 보이는 크기는 그대로, 누르는 영역은 44px 가까이 */
  .chips.small button[aria-pressed=true] .n { color: var(--rust); opacity: .65; }
  .chips select.sel { flex: none; width: auto; min-width: 200px; padding: 6px 12px; font-size: 16px; border-radius: 999px; background: var(--white); }   /* 16px: iOS 확대 방지 */
  .chips.small button[aria-pressed=true] { background: var(--gold-soft); border-color: var(--line-2); color: var(--rust); }
  .style-card { margin: 12px 0 4px; padding: 14px; border-radius: 14px; background: var(--soft); }
  .style-card .t { font-family: var(--display); font-weight: 700; font-size: 18px; color: var(--ink); }
  .style-card p { margin: 4px 0 0; font-size: 14px; color: var(--text); }
  .style-card dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 10px 0 0; font-size: 13px; }
  .style-card dt { color: var(--muted); } .style-card dd { margin: 0; }
  .style-card details { margin-top: 10px; font-size: 13px; }
  .style-card summary { cursor: pointer; color: var(--rust); font-weight: 700; }
  .style-card details p { font-size: 13px; color: var(--text); line-height: 1.6; }
  .tile { width: 44px; height: 44px; border-radius: 12px; flex: none; display: grid; place-items: center; background: var(--soft); color: var(--ink);
    font-family: var(--display); font-weight: 700; font-size: 18px; box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
  .tile img { width: 100%; height: 100%; object-fit: cover; }
  .tile.legend { box-shadow: inset 0 0 0 2px var(--gold); }
  .tile.ult { background: var(--gold); box-shadow: inset 0 0 0 2px var(--gold), inset 0 0 0 3.5px rgba(255,255,255,.8); }
  .sk { width: 100%; border: 0; background: none; text-align: left; padding: 11px 4px; display: grid; grid-template-columns: auto 1fr auto; gap: 0 12px; align-items: center; }
  .sk:hover { background: var(--soft); }
  .sk.ach { grid-template-columns: 1fr auto; }
  .sk.ttl { grid-template-columns: 1fr auto; align-items: center; }
  .sk.ttl .mt { margin-top: 5px; }
  .sk.ttl .per { color: var(--rust); font-weight: 700; }
  .sk.ttl .cf .av { display: block; white-space: nowrap; line-height: 1.5; }
  .sk.ttl .cf .av b { display: inline; font-size: 13px; }
  /* 도술 덱 */
  .back-link { display: inline-block; margin-bottom: 6px; font-size: 14px; }
  .deck-board { background: var(--soft); border-radius: 16px; padding: 12px; margin-top: 4px; }
  .deck-lab { font-size: 12px; color: var(--muted); margin: 2px 2px 6px; display: flex; justify-content: space-between; align-items: baseline; }
  .deck-lab .link { font-size: 12.5px; }
  .deck-slots { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
  .dslot { aspect-ratio: 1; border: 1.5px dashed var(--line-2); border-radius: 12px; background: var(--white); display: flex; align-items: center; justify-content: center; padding: 0; position: relative; overflow: hidden; }
  .dslot img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .dslot.on { border-style: solid; }
  .dslot.main { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold) inset; }
  .dslot .plus { color: var(--muted); font-size: 20px; line-height: 1; }
  .dslot .sl { position: absolute; left: 0; right: 0; bottom: 0; background: linear-gradient(transparent, rgba(43,27,13,.85) 35%); color: #fff; font-size: 11px; font-weight: 600; padding-top: 6px !important; text-align: center; padding: 1px 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .deck-ult { display: flex; gap: 10px; align-items: center; background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 10px; margin-top: 10px; }
  .deck-ult .ic { width: 46px; height: 46px; border-radius: 10px; overflow: hidden; flex: none; background: var(--soft-2); display: flex; align-items: center; justify-content: center; color: var(--muted); border: 0; padding: 0; }
  .deck-ult .ic img { width: 100%; height: 100%; display: block; }
  .deck-ult b { color: var(--ink); } .deck-ult small { display: block; color: var(--muted); font-size: 12.5px; line-height: 1.45; margin-top: 2px; }
  .deck-checks { list-style: none; padding: 0; margin: 12px 0 0; }
  .deck-checks li { display: grid; grid-template-columns: 22px 1fr; gap: 8px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14px; }
  .deck-checks li:first-child { border-top: 0; }
  .deck-checks .m { width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; color: #fff; margin-top: 1px; }
  .deck-checks .ok .m { background: var(--ok); } .deck-checks .warn .m { background: #D8902A; } .deck-checks .bad .m { background: var(--bad); } .deck-checks .info .m { background: var(--muted); }
  .deck-checks small { display: block; color: var(--muted); font-size: 12.5px; }
  .deck-act { margin-top: 6px; }
  .deck-tgt { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .deck-tgt button { border: 1px solid var(--line); background: var(--white); border-radius: 12px; padding: 6px 4px; font-size: 11.5px; color: var(--text); display: flex; flex-direction: column; align-items: center; gap: 3px; line-height: 1.25; }
  .deck-tgt button img, .deck-tgt .fz { width: 48px; height: 48px; object-fit: contain; }
  .deck-tgt .fz { border-radius: 10px; background: var(--soft-2); display: flex; align-items: center; justify-content: center; font-size: 22px; }
  .deck-tgt small { color: var(--muted); font-size: 11px; }
  .deck-tgt button[aria-pressed=true] { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold) inset; }
  .deck-card { background: var(--soft); border-radius: 16px; padding: 12px; margin-top: 10px; }
  .deck-card > b { color: var(--ink); }
  .deck-card .tag { display: inline-block; font-size: 11px; background: var(--soft-2); color: var(--muted); border-radius: 999px; padding: 0 7px; margin-left: 4px; vertical-align: 1px; }
  .deck-mini { display: flex; gap: 4px; margin: 8px 0; }
  .deck-mini img { width: 36px; height: 36px; border-radius: 8px; }
  .deck-mini .sep { width: 1px; background: var(--line-2); margin: 0 3px; }
  .deck-card .why { margin: 6px 0 10px; padding-left: 18px; font-size: 14px; } .deck-card .why li { margin: 3px 0; }
  .deck-cp { align-items: center; gap: 10px; } .deck-cp label { font-size: 14px; color: var(--text); white-space: nowrap; } .deck-cp .field { max-width: 180px; }
  .deck-yo { display: flex; align-items: center; gap: 6px; color: var(--ink); font-weight: 700; margin-top: 12px; } .deck-yo img { width: 26px; height: 26px; }
  .deck-farm { list-style: none; padding: 0; margin: 6px 0 0; }
  .deck-farm button { width: 100%; display: flex; justify-content: space-between; align-items: center; border: 0; border-bottom: 1px solid var(--line); background: none; padding: 8px 2px; text-align: left; font-size: 14px; color: var(--text); }
  .deck-farm small { color: var(--muted); font-size: 12px; margin-left: 6px; } .deck-farm b { color: var(--rust); white-space: nowrap; }
  .deck-mine { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: var(--gold-soft); border-radius: 12px; padding: 9px 12px; margin: 0 0 10px; font-size: 13.5px; color: var(--text); }
  .deck-mine .link { white-space: nowrap; font-size: 13.5px; }
  .deck-toggle { display: flex; align-items: center; gap: 8px; font-size: 14px; margin: 0 0 10px; color: var(--ink); font-weight: 600; }
  .deck-toggle input { width: 18px; height: 18px; accent-color: var(--rust); }
  .deck-toggle small { color: var(--muted); font-weight: 400; font-size: 12px; }
  .famous { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
  .famous > li { background: var(--soft); border-radius: 14px; padding: 10px 12px; }
  .famous .fh { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
  .famous .fh b { color: var(--ink); font-size: 15.5px; } .famous .fh .tag { font-size: 11px; background: var(--white); color: var(--muted); border-radius: 999px; padding: 0 7px; }
  .famous p { margin: 4px 0 0; font-size: 13.5px; } .famous small { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }
  .famous .row { gap: 8px; margin-top: 8px; }
  .btrank { list-style: none; padding: 0; margin: 0; counter-reset: r; }
  .btrank li { display: grid; grid-template-columns: 22px 40px minmax(0, 1fr) minmax(0, 104px); gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
  .btrank li::before { counter-increment: r; content: counter(r); color: var(--muted); font-weight: 700; text-align: center; }
  .btrank img { width: 40px; height: 40px; border-radius: 9px; }
  .btrank b { color: var(--ink); } .btrank small { display: block; color: var(--muted); font-size: 12px; }
  .btrank .gain { text-align: right; color: var(--rust); font-weight: 800; } .btrank .gain small { font-weight: 500; font-size: 11px; line-height: 1.3; display: inline-block; }
  .btrank .lb { white-space: nowrap; } .btrank .gain.neg { color: var(--muted); }
  .mine-list { list-style: none; padding: 0; margin: 6px 0 0; }
  .mine-list li { display: grid; grid-template-columns: 40px 1fr auto; gap: 10px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line); }
  .mine-list img { width: 40px; height: 40px; border-radius: 9px; } .mine-list li.off img { opacity: .35; filter: grayscale(1); }
  .mine-list b { font-size: 14px; color: var(--ink); } .mine-list label { font-size: 12.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 4px; }
  .mine-list .ctl { display: flex; gap: 6px; align-items: center; }
  .mine-list select { border: 1px solid var(--line-2); border-radius: 8px; padding: 4px 6px; font: inherit; font-size: 13px; background: var(--white); }
  .deck-views { margin-top: 4px; }
  .deck-name { gap: 8px; align-items: center; margin-bottom: 4px; }
  .deck-name .field { min-width: 0; }
  .deck-sits { padding-top: 4px; }
  .deck-power { margin: 12px 0 8px; padding: 10px 14px; border-radius: 14px; background: var(--gold-soft); } .deck-power:empty { display: none; }
  .deck-power .dp-main { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; } .deck-power .dp-main small { font-size: 13px; color: var(--text); }
  .deck-power .dp-main b { font-size: 26px; color: var(--rust); font-variant-numeric: tabular-nums; white-space: nowrap; line-height: 1.15; }
  .deck-power .dp-sub { display: flex; flex-wrap: wrap; gap: 2px 10px; margin-top: 2px; font-size: 12px; color: var(--muted); }
  .deck-subs { margin-top: 10px; }
  .deck-h4 { font-size: 15px; color: var(--ink); margin: 16px 0 2px; }
  .deck-mini .ph { width: 36px; height: 36px; border-radius: 8px; border: 1.5px dashed var(--line-2); box-sizing: border-box; }
  .dl-meta { color: var(--muted) !important; } .dl-meta b { color: var(--rust); }
  .pw-sits { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
  .pw-sits button { border: 1px solid var(--line); background: var(--white); border-radius: 10px; padding: 6px 2px; display: flex; flex-direction: column; align-items: center; line-height: 1.2; }
  .pw-sits button small { font-size: 10.5px; color: var(--muted); } .pw-sits button b { font-size: 14px; color: var(--ink); font-variant-numeric: tabular-nums; }
  .pw-sits button.on { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold) inset; }
  .pw-bars { list-style: none; padding: 0; margin: 4px 0 0; }
  .pw-bars li { display: grid; grid-template-columns: 96px 1fr 44px; gap: 8px; align-items: center; padding: 4px 0; font-size: 13px; }
  .pw-bars .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); }
  .pw-bars .bar { height: 10px; background: var(--white); border-radius: 999px; overflow: hidden; } .pw-bars .bar i { display: block; height: 100%; background: var(--gold); border-radius: 999px; }
  .pw-bars .v { text-align: right; font-variant-numeric: tabular-nums; color: var(--rust); font-weight: 700; }
  .recs { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
  .recs .rec { background: var(--soft); border-radius: 14px; padding: 10px 12px; }
  .recs .fh { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
  .recs .fh b { color: var(--ink); font-size: 15px; display: flex; align-items: center; gap: 6px; }
  .recs .rk { width: 20px; height: 20px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; }
  .recs .tag { font-size: 12px; background: var(--white); color: var(--rust); font-weight: 700; border-radius: 999px; padding: 1px 8px; white-space: nowrap; }
  .recs .why { margin: 4px 0 8px; padding-left: 18px; font-size: 13.5px; } .recs .why li { margin: 2px 0; }
  .recs .row, .famous .row { gap: 6px; flex-wrap: wrap; }
  .deck-tgt-box { margin: 4px 0 10px; } .deck-tgt-box summary { cursor: pointer; font-size: 14px; color: var(--rust); font-weight: 700; padding: 6px 0; }
  .deck-tgt-box .deck-tgt { margin-top: 6px; }
  .tree-top { display: flex; align-items: center; gap: 12px; font-size: 14px; } .tree-top .link { margin-left: auto; }
  .tree-top select, .tree-style select { border: 1px solid var(--line-2); border-radius: 8px; padding: 4px 6px; font: inherit; font-size: 13px; background: var(--white); }
  .tree-style { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; background: var(--soft); border-radius: 12px; padding: 8px 12px; margin: 4px 0 2px; font-size: 14px; }
  .tree-style b { color: var(--ink); white-space: nowrap; } .tree-style small { color: var(--muted); font-size: 12px; flex-basis: 100%; }
  .dplist .own { color: var(--ok); font-size: 11px; font-weight: 700; margin-left: 4px; font-style: normal; }
  .dplist .cd small { color: var(--rust); font-weight: 700; }
  .deck-view[hidden], .deck-sub[hidden] { display: none; }
  .deck-ult { display: block; } .ult-row { display: flex; gap: 10px; align-items: flex-start; }
  .ult-pick { display: flex; gap: 6px; margin: 6px 0 2px; flex-wrap: wrap; }
  .ult-pick button { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line); background: var(--white); border-radius: 999px; padding: 3px 10px 3px 3px; font-size: 13px; color: var(--text); }
  .ult-pick button img { width: 24px; height: 24px; border-radius: 50%; }
  .ult-pick button[aria-pressed=true] { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold) inset; color: var(--ink); font-weight: 700; }
  .deck-ult small b { color: var(--rust); }
  .deck-next { margin: 4px 0 6px; }
  .deck-next .nx-h { font-size: 14px; font-weight: 700; color: var(--ink); margin: 6px 2px; } .deck-next .nx-h small { font-weight: 400; color: var(--muted); font-size: 12px; margin-left: 4px; }
  .nx-list { display: flex; gap: 6px; overflow-x: auto; margin: 0 -16px; padding: 0 16px 4px; scrollbar-width: none; }
  .nx-list button { flex: none; width: 196px; display: grid; grid-template-columns: 34px minmax(0, 1fr); column-gap: 8px; row-gap: 3px; align-items: start; border: 1px solid var(--line); background: var(--white); border-radius: 12px; padding: 7px 10px 7px 7px; text-align: left; }
  .nx-list img { width: 34px; height: 34px; border-radius: 8px; grid-row: span 2; }
  .nx-list span { min-width: 0; }
  .nx-list b { display: block; font-size: 13px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  /* 설명은 두 줄까지만, 넘치면 … (전체는 길게 누르면 보이는 제목에) */
  .nx-list small { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; font-size: 11px; line-height: 1.35; color: var(--muted); word-break: keep-all; overflow-wrap: anywhere; }
  .nx-list em { grid-column: 2; display: flex; align-items: baseline; gap: 6px; font-style: normal; font-size: 12px; font-weight: 800; color: var(--ok); }
  .nx-list em i { font-style: normal; font-weight: 500; font-size: 11px; color: var(--muted); }
  .sin-notes { list-style: none; padding: 0; margin: 6px 0 0; font-size: 13px; }
  .sin-notes li { padding: 4px 0; border-top: 1px dashed var(--line-2); } .sin-notes li:first-child { border-top: 0; }
  .sin-notes li b { color: var(--rust); } .sin-notes li.off { color: var(--muted); } .sin-notes li.off b { color: var(--muted); }
  .pw-bars li.ult .bar i { background: var(--rust); } .pw-bars li.extra .bar i { background: var(--ok); }
  .dslot { touch-action: manipulation; -webkit-user-select: none; user-select: none; }
  .dslot .ono { position: absolute; left: 3px; top: 3px; min-width: 16px; height: 16px; border-radius: 8px; background: rgba(43,27,13,.75); color: #fff; font-size: 10px; font-weight: 800; display: flex; align-items: center; justify-content: center; padding: 0 3px; }
  .dslot.dragging, .ord li.dragging { opacity: .35; }
  .dslot.drop-to { box-shadow: 0 0 0 3px var(--rust) inset; } .ord li.drop-to { box-shadow: 0 -3px 0 var(--rust) inset; }
  .drag-ghost { position: fixed !important; left: 0; top: 0; z-index: 50; pointer-events: none; opacity: .9; box-shadow: 0 8px 20px rgba(43,27,13,.25); border-radius: 12px; list-style: none; background: var(--white); }
  body.sorting { -webkit-user-select: none; user-select: none; }
  .ord li { -webkit-user-select: none; user-select: none; touch-action: manipulation; grid-template-columns: 14px 22px 34px 1fr auto !important; }
  .ord .grip { color: var(--muted); cursor: grab; font-size: 14px; }
  .ord-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 4px 0; font-size: 14px; }
  .dm-zone { max-width: 100%; padding: 6px 10px; font-size: 16px; } .dm-row .hk { display: block; font-size: 11px; color: var(--rust); font-weight: 700; }
  .ord-find { display: flex; gap: 8px; align-items: center; margin: 2px 0 6px; } .ord-find .field { flex: 1; min-width: 0; padding: 7px 10px; font-size: 16px; } .ord-find .btn { flex: none; }
  .ord-head .ord-gap { display: block; color: var(--text); font-size: 12px; }
  .ord-head b { color: var(--rust); font-size: 17px; } .ord-head em { font-style: normal; font-weight: 800; font-size: 13px; } .ord-head em.up { color: var(--ok); } .ord-head em.down { color: var(--bad); }
  .layers { display: flex; align-items: center; gap: 6px; margin: 6px 0; flex-wrap: wrap; }
  .layers span { background: var(--white); border-radius: 10px; padding: 5px 9px; display: flex; flex-direction: column; line-height: 1.2; }
  .layers small { font-size: 10.5px; color: var(--muted); } .layers b { font-size: 15px; color: var(--ink); } .layers em { font-style: normal; font-size: 11px; color: var(--ok); font-weight: 700; }
  .layers i { font-style: normal; color: var(--muted); }
  .pw-bars .v small { color: var(--muted); font-weight: 400; font-size: 10.5px; }
  .pw-bars li { grid-template-columns: 96px 1fr 62px !important; }
  .upos { color: var(--muted); font-weight: 400; } .sin-open { display: block; font-size: 13px; color: var(--text); margin-top: 1px; }
  .deck-opts { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
  .deck-opts .chips { padding-top: 2px; padding-bottom: 2px; margin: 0; padding-left: 0; padding-right: 0; }
  .sim-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 6px 0; }
  .sim-stats span { background: var(--white); border-radius: 10px; padding: 6px 8px; display: flex; flex-direction: column; line-height: 1.25; }
  .sim-stats small { font-size: 11px; color: var(--muted); } .sim-stats b { font-size: 15px; color: var(--ink); }
  .permin { display: flex; align-items: flex-end; gap: 4px; height: 70px; padding: 4px 0; }
  .permin span { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 2px; }
  .permin i { width: 100%; background: var(--gold); border-radius: 4px 4px 0 0; display: block; }
  .permin small { font-size: 10px; color: var(--muted); }
  .inf-sit { margin-top: 6px; } .inf-sit .deck-h4 small { color: var(--muted); font-weight: 400; font-size: 12px; }
  .inf-sit .more { margin-top: 6px; } .inf-all { margin-top: 10px; }
  .chg-note { color: var(--muted); font-size: 11.5px; margin: 0 0 4px; }
  .deck-opts > span { white-space: nowrap; flex: none; } .deck-opts .chips { min-width: 0; }
  .eff-h { font-size: 13px; font-weight: 700; color: var(--ink); margin: 4px 0 0; }
  .btrank .lb { color: var(--rust); font-weight: 700; display: inline; font-size: 12px; }
  .deck-goal { gap: 12px; font-size: 14px; margin: 4px 0 8px; flex-wrap: wrap; }
  .deck-goal select { border: 1px solid var(--line-2); border-radius: 8px; padding: 4px 6px; font: inherit; font-size: 13px; background: var(--white); margin-left: 4px; }
  .bt tr.sum td { font-weight: 800; color: var(--rust); }
  .ord { list-style: none; padding: 0; margin: 6px 0 0; }
  .ord li { display: grid; grid-template-columns: 22px 34px 1fr auto; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
  .ord li.ult { background: var(--gold-soft); border-radius: 10px; padding: 6px; }
  .ord .no { color: var(--muted); font-weight: 700; text-align: center; } .ord img { width: 34px; height: 34px; border-radius: 8px; } .ord b { color: var(--ink); }
  .ord .mv { display: flex; gap: 4px; } .ord .mv button { width: 34px; height: 30px; border: 1px solid var(--line); background: var(--white); border-radius: 8px; color: var(--text); font-size: 11px; }
  .ord .mv button:disabled { opacity: .3; }
  .dplist { list-style: none; padding: 0; margin: 6px 0 0; }
  .dplist button { width: 100%; display: grid; grid-template-columns: 44px 1fr auto; gap: 10px; align-items: center; border: 0; border-bottom: 1px solid var(--line); background: none; padding: 8px 2px; text-align: left; }
  .dplist img, .dplist .tile { width: 44px; height: 44px; border-radius: 10px; }
  .dplist b { color: var(--ink); font-size: 14.5px; } .dplist small { display: block; color: var(--muted); font-size: 12px; }
  .dplist .cd { font-size: 12px; color: var(--muted); text-align: right; white-space: nowrap; }
  .dplist button:disabled { opacity: .35; }
  .dplist .cc { color: var(--bad); font-size: 11px; font-weight: 700; margin-left: 4px; font-style: normal; }
  .tplate { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; height: 30px; min-width: 64px; border-style: solid; color: #fff; font-weight: 700; font-size: 13.5px; letter-spacing: -.01em; white-space: nowrap; text-shadow: 0 1px 1px rgba(0,0,0,.45); }
  .tplate.gplate { border: 1.5px solid; border-radius: 6px; padding: 0 12px; text-shadow: none; }
  .tplate.big { height: 40px; font-size: 17px; min-width: 96px; }
  .tplate-wrap { margin: 14px 0 0; padding: 18px 12px; border-radius: 14px; background: var(--soft); text-align: center; }
  .sk .nm { font-weight: 700; color: var(--ink); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
  .sk .mt { font-size: 13px; color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; }
  .sk .cf { text-align: right; font-size: 13px; color: var(--muted); }
  .sk .cf b { display: block; font-size: 15px; color: var(--rust); font-variant-numeric: tabular-nums; }
  .badge { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--soft-2); color: var(--muted); }
  .badge.gold { background: var(--gold-soft); color: var(--rust); }
  .source { font-size: 12px; color: var(--muted); margin: 18px 0 0; line-height: 1.6; }
  .sk-head { display: flex; gap: 12px; align-items: center; }
  .sk-head .tile { width: 56px; height: 56px; font-size: 22px; border-radius: 14px; }
  .sk-head .sub { font-size: 13px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
  .sk-desc { margin: 14px 0 0; font-size: 15px; line-height: 1.6; color: var(--text); }
  .facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0 0; }
  .facts div { background: var(--soft); border-radius: 10px; padding: 8px 10px; }
  .facts dt { font-size: 12px; color: var(--muted); } .facts dd { margin: 2px 0 0; font-weight: 700; color: var(--ink); font-size: 14px; }
  .coef { margin: 12px 0 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
  .coef > div { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 10px 12px; }
  .coef > div + div { border-top: 1px solid var(--line); }
  .coef .k { font-size: 13px; color: var(--muted); } .coef .v { font-weight: 700; color: var(--ink); text-align: right; }
  .coef .x { grid-column: 1 / -1; font-size: 13px; color: var(--muted); }
  .kv { margin: 0; font-size: 14px; } .kv dt { color: var(--muted); font-size: 13px; margin-top: 10px; } .kv dd { margin: 2px 0 0; line-height: 1.55; }
  .sheet details { margin-top: 12px; } .sheet summary { cursor: pointer; font-size: 14px; font-weight: 700; color: var(--rust); padding: 6px 0; }
  table.bt { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 6px; font-variant-numeric: tabular-nums; }
  table.bt th, table.bt td { padding: 6px 4px; border-top: 1px solid var(--line); text-align: right; }
  table.bt th:first-child, table.bt td:first-child { text-align: left; }
  table.bt th { color: var(--muted); font-weight: 500; }
  table.bt td.rw { text-align: left; padding-left: 12px; color: var(--text); }
  table.bt th.rw { text-align: left; padding-left: 12px; }
  .codes { font-size: 12px; color: var(--muted); line-height: 1.7; word-break: break-all; }
  .codes code { font-size: 12px; background: var(--soft); padding: 1px 5px; border-radius: 5px; }

  /* ---------- 입력 중 장면: 금 나와라 뚝딱 ---------- */
  .ttak { position: relative; height: 150px; margin: 4px -16px 6px; background: var(--soft); border-bottom: 1px solid var(--line); overflow: hidden; }
  .ttak .ground { position: absolute; left: 50%; bottom: 26px; width: 120px; height: 10px; margin-left: -60px; border-radius: 50%; background: var(--soft-2); }
  .ttak .club { position: absolute; left: 50%; bottom: 34px; width: 96px; height: 96px; margin-left: -10px; transform-origin: 84% 88%; transform: rotate(12deg); }
  .ttak .word { position: absolute; left: 50%; bottom: 56px; margin-left: -104px; font-family: var(--display); font-weight: 700; font-size: 22px; color: var(--rust); opacity: 0; transform: translateY(6px) scale(.7) rotate(-8deg); }
  .ttak .coin { position: absolute; left: 50%; bottom: 30px; width: 18px; height: 18px; margin-left: -30px; opacity: 0; }
  .ttak .coin.c2 { margin-left: -14px; }
  .ttak .count { position: absolute; right: 16px; top: 12px; font-family: var(--display); font-weight: 700; font-size: 15px; color: var(--muted); }
  .ttak .seal { position: absolute; left: 50%; top: 50%; width: 86px; height: 86px; margin: -50px 0 0 -43px; border-radius: 50%; display: grid; place-items: center;
    font-family: var(--display); font-weight: 700; font-size: 20px; color: var(--ink); background: var(--gold);
    box-shadow: inset 0 0 0 4px var(--gold), inset 0 0 0 6px rgba(255,255,255,.85); opacity: 0; transform: rotate(-10deg) scale(1.6); }
  .ttak[data-state=run] .club { animation: swing 1.1s cubic-bezier(.5,0,.4,1) infinite; }
  .ttak[data-state=run] .word { animation: pop 1.1s ease-out infinite; }
  .ttak[data-state=run] .coin { animation: fly 1.1s ease-out infinite; }
  .ttak[data-state=run] .coin.c2 { animation-name: fly2; }
  .ttak[data-state=wait] .club { transform: rotate(-38deg); }
  .ttak[data-state=done] .club { opacity: .25; transform: rotate(-38deg); transition: opacity .3s, transform .3s; }
  .ttak[data-state=done] .seal { animation: stamp .45s cubic-bezier(.2,1.4,.4,1) forwards; }
  .ttak-line { min-height: 1.5em; margin: 0 0 2px; font-size: 14px; color: var(--muted); text-align: center; transition: opacity .25s; }
  @keyframes swing { 0% { transform: rotate(12deg); } 42% { transform: rotate(-38deg); } 50% { transform: rotate(-31deg); } 58% { transform: rotate(-38deg); } 100% { transform: rotate(12deg); } }
  @keyframes pop { 0%, 40% { opacity: 0; transform: translateY(6px) scale(.7) rotate(-8deg); } 48% { opacity: 1; transform: translateY(-4px) scale(1.1) rotate(-8deg); } 80% { opacity: 1; transform: translateY(-10px) scale(1) rotate(-8deg); } 100% { opacity: 0; transform: translateY(-14px) scale(1) rotate(-8deg); } }
  @keyframes fly { 0%, 42% { opacity: 0; transform: translate(0, 0) rotate(0); } 48% { opacity: 1; } 100% { opacity: 0; transform: translate(-46px, -78px) rotate(-160deg); } }
  @keyframes fly2 { 0%, 42% { opacity: 0; transform: translate(0, 0) rotate(0); } 48% { opacity: 1; } 100% { opacity: 0; transform: translate(30px, -70px) rotate(200deg); } }
  @keyframes stamp { to { opacity: 1; transform: rotate(-10deg) scale(1); } }

  @media (prefers-reduced-motion: reduce) {
    * { transition: none !important; }
    .ttak .club, .ttak .word, .ttak .coin { animation: none !important; }
    .ttak[data-state=run] .word { opacity: 1; transform: rotate(-8deg); }
    .ttak[data-state=done] .seal { animation: none; opacity: 1; transform: rotate(-10deg); }
  }

  /* 내 덱: 수련장 바로가기 · 카드(누르면 조회, 아이콘으로 편집 · 복사 · 삭제) */
  #dv-list > .actions { margin-top: 16px; }
  .dm-cta { display: flex; align-items: center; gap: 12px; width: 100%; margin: 4px 0 14px; padding: 12px 14px; border: 1px solid #ecd59f; border-radius: 16px; background: linear-gradient(135deg, #fff6df, #fbe7b8); color: var(--ink); text-align: left; cursor: pointer; min-height: 64px; }
  .dm-cta .ic { flex: none; width: 42px; height: 42px; border-radius: 12px; background: var(--white); color: var(--rust); display: grid; place-items: center; }
  .dm-cta .tx { flex: 1; min-width: 0; } .dm-cta b { display: block; font-size: 15.5px; } .dm-cta small { display: block; font-size: 12.5px; color: var(--muted); margin-top: 1px; }
  .dm-cta .go { font-size: 24px; color: var(--rust); line-height: 1; }
  .dm-cta:active { transform: scale(.99); }
  .dlist > li { position: relative; padding: 0; }
  .dl-main { display: block; width: 100%; padding: 12px 12px 12px; border: 0; background: none; text-align: left; color: inherit; font: inherit; cursor: pointer; border-radius: 14px; }
  .dl-main:active { background: var(--soft-2); }
  .dl-main .fh { justify-content: flex-start; min-height: 24px; align-items: center; }
  .dl-main .fh b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .dl-main .fh .tag { flex: none; }
  .dl-main .deck-mini { margin-top: 8px; }
  .dl-meta { display: flex; flex-wrap: wrap; gap: 2px 10px; margin-top: 8px; font-size: 13px; color: var(--muted); } .dl-meta b { color: var(--rust); font-variant-numeric: tabular-nums; }
  .dl-acts { display: flex; gap: 6px; padding: 0 12px 12px; }
  .dl-acts .btn { flex: 1; min-height: 40px; }
  .dl-acts .ib { flex: none; width: 44px; height: 40px; display: grid; place-items: center; border: 1px solid var(--line); background: var(--white); color: var(--text); border-radius: 12px; cursor: pointer; }
  .dl-acts .ib:active { background: var(--soft-2); }
  @media (hover: hover) { .dl-acts .ib:hover { background: var(--soft-2); } .dl-main:hover { background: rgba(0,0,0,.015); } }

  /* 덱 조회 시트 */
  .dv-head { display: flex; align-items: center; gap: 8px; } .dv-head h3 { margin: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .dv-head .tag { flex: none; font-size: 11.5px; background: var(--soft); color: var(--muted); border-radius: 999px; padding: 1px 8px; }
  .dv-stats { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 6px; margin-top: 12px; }
  .dv-stats span { background: var(--soft); border-radius: 12px; padding: 8px 10px; display: flex; flex-direction: column; } .dv-stats small { font-size: 11.5px; color: var(--muted); } .dv-stats b { font-size: 17px; color: var(--ink); font-variant-numeric: tabular-nums; }
  .dv-stats span:first-child b { color: var(--rust); }
  .dv-sin { margin: 8px 0 0; font-size: 13px; color: var(--text); }
  .dv-order { list-style: none; margin: 10px 0 0; padding: 0; }
  .dv-order button { display: grid; grid-template-columns: 22px 40px 1fr; gap: 10px; align-items: center; width: 100%; min-height: 52px; padding: 6px 4px; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; font: inherit; color: inherit; cursor: pointer; }
  .dv-order .no { font-weight: 800; color: var(--muted); text-align: center; font-variant-numeric: tabular-nums; } .dv-order img { width: 40px; height: 40px; border-radius: 9px; }
  .dv-order .nm b { display: block; color: var(--ink); font-size: 14.5px; } .dv-order .nm small { display: block; font-size: 12px; color: var(--muted); }

  /* 수련장 풀 모달(내비게이션까지 덮음) */
  body.dm-lock { overflow: hidden; }
  .dm-modal { position: fixed; inset: 0; z-index: 40; background: var(--white); display: flex; flex-direction: column; }
  .dm-modal[hidden] { display: none; }
  .dm-top { flex: none; display: flex; align-items: center; gap: 8px; padding: calc(8px + env(safe-area-inset-top)) 12px 8px; border-bottom: 1px solid var(--line); max-width: 480px; width: 100%; margin: 0 auto; }
  .dm-top h2 { margin: 0; font-size: 17px; color: var(--ink); } .dm-top .ibtn { width: 44px; height: 44px; border: 0; }
  .dm-body { flex: 1; overflow: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: 12px 16px 0; max-width: 480px; width: 100%; margin: 0 auto; }
  .dm-body > .empty { margin-top: 24px; }
  .dm-pick-h { display: flex; align-items: baseline; gap: 8px; } .dm-pick-h b { font-size: 14px; color: var(--ink); } .dm-pick-h small { font-size: 12px; color: var(--muted); }
  .dm-picks { display: flex; gap: 6px; overflow-x: auto; padding: 6px 0 8px; scrollbar-width: none; } .dm-picks::-webkit-scrollbar { display: none; }
  .dm-pk { flex: none; display: flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px 0 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--white); color: var(--text); font: inherit; font-size: 13.5px; cursor: pointer; max-width: 180px; }
  .dm-pk .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .dm-pk.on { border-color: var(--gold); background: var(--gold-soft); color: var(--ink); font-weight: 700; }
  .dm-tag.off { background: var(--soft-2); color: var(--muted); }
  .dm-modal .dm-ctl { position: sticky; bottom: 0; z-index: 3; background: var(--white); margin: 10px -16px 0; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
  .dm-modal .dm-ctl .btn { min-height: 46px; }

  /* 수련장: 내 도술 반영 스위치 · 결과 */
  .dm-tog { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px 0 6px; border: 1px solid var(--line); border-radius: 999px; background: var(--white); color: var(--ink); font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer; }
  .dm-tog .sw { position: relative; width: 34px; height: 20px; border-radius: 999px; background: var(--soft-2); transition: background .15s; }
  .dm-tog .sw::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s; }
  .dm-tog[aria-checked="true"] { border-color: var(--gold); background: var(--gold-soft); } .dm-tog[aria-checked="true"] .sw { background: var(--rust); } .dm-tog[aria-checked="true"] .sw::after { transform: translateX(14px); }
  .dm-result:empty { display: none; }
  .dm-result { margin-top: 8px; background: var(--soft); border-radius: 12px; padding: 10px 12px; font-size: 13px; } .dm-result b { display: block; color: var(--ink); font-size: 14px; } .dm-result small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }

  /* 간편 계정 */
  .acct .acct-h { margin: 0; font-size: 17px; color: var(--ink); }
  .acct { margin-bottom: 18px; } .acct .actions { margin-top: 12px; } .acct .actions .btn { flex: 1; }
  .acct-in { display: flex; align-items: center; gap: 12px; }
  .acct-in .ava { flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--gold-soft); color: var(--rust); display: grid; place-items: center; font-weight: 800; font-size: 18px; }
  .acct-who { min-width: 0; flex: 1; } .acct-who b { display: block; font-size: 16px; color: var(--ink); } .acct-who small { display: block; font-size: 12.5px; color: var(--muted); margin-top: 1px; }
  .acct-more { margin: 10px 0 0; font-size: 13px; color: var(--muted); text-align: center; } .acct-more .link { font-size: 13px; } .acct-more .link.danger { color: var(--bad); }
  .acct-hint { display: block; margin: -4px 0 12px; padding: 10px 12px; border-radius: 12px; background: var(--soft); color: var(--text); font-size: 13px; text-decoration: none; }
  .acct-hint b { color: var(--rust); } .acct-hint[hidden] { display: none; }

  /* 순서 탭: 자리 고정 */
  .ord .mv button.pin { display: grid; place-items: center; color: var(--muted); }
  .ord .mv button.pin[aria-pressed="true"] { background: var(--rust); border-color: var(--rust); color: #fff; }
  .ord li.pinned { background: var(--soft); border-radius: 10px; padding-left: 6px; padding-right: 6px; }
  .ord li.pinned .no { color: var(--rust); font-weight: 800; }
  .deck-name #deckShareTop { width: 42px; height: 42px; flex: none; }

  /* 내 정보: 내 능력치 · 내 도술 강화 */
  .stat-grid { display: grid; grid-template-columns: 1fr; gap: 8px; margin-top: 10px; }
  .stat-grid .stat { display: grid; gap: 4px; } .stat-grid .stat span { font-size: 13px; font-weight: 700; color: var(--ink); }
  @media (min-width: 420px) { .stat-grid { grid-template-columns: 1fr 1fr 1fr; } }
  .mine-lv { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; } .mine-lv span { background: var(--soft); border-radius: 999px; padding: 4px 10px; font-size: 13px; color: var(--text); } .mine-lv b { color: var(--ink); }
  .stat-sty { margin-top: 10px; } .stat-sty summary { cursor: pointer; font-size: 13.5px; font-weight: 700; color: var(--ink); min-height: 36px; display: flex; align-items: center; }
  .stat-grid.sty { grid-template-columns: repeat(3, 1fr); } @media (min-width: 420px) { .stat-grid.sty { grid-template-columns: repeat(4, 1fr); } }
  .stat-grid.sty .stat span { font-size: 12px; font-weight: 600; }
/* 목표로 찾기: 메인 · 서브 스타일 */
.goal-sub { margin: 10px 0 4px; font-weight: 700; font-size: 13.5px; } .goal-sub small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; margin-top: 2px; }
#goalStyle button { display: inline-flex; align-items: center; gap: 4px; }
.gs-badge { font-size: 10px; line-height: 1; padding: 3px 5px; border-radius: 6px; background: var(--white); color: var(--muted); border: 1px solid var(--line-2); font-weight: 700; }
.gs-badge.main { background: var(--ink); color: var(--white); border-color: var(--ink); }
.goal-hint { color: var(--rust); }
.goal-res .sim-stats { grid-template-columns: repeat(2, 1fr); }
.goal-only { display: flex; align-items: center; gap: 8px; min-height: 44px; font-size: 14px; } .goal-only input { width: 20px; height: 20px; accent-color: var(--ink); }
#recSurv { flex-wrap: wrap; overflow: visible; }
/* 표식 연계표 · 관리자 점검 */
.mark-table, .admin-audit { margin: 10px 0; border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; background: var(--white); }
.mark-table summary, .admin-audit summary { font-weight: 700; cursor: pointer; min-height: 32px; display: flex; align-items: center; gap: 6px; }
.mark-table summary small, .admin-audit summary small { font-weight: 400; color: var(--muted); font-size: 12px; }
.mk-row { display: grid; grid-template-columns: 44px 1fr; gap: 4px 8px; padding: 10px 0; border-top: 1px solid var(--line); }
.mk-name { grid-row: span 2; font-weight: 700; color: var(--rust); }
.mk-col small { display: block; color: var(--muted); font-size: 11.5px; margin-bottom: 2px; }
.mk-chip { display: inline-flex; align-items: center; gap: 4px; min-height: 32px; margin: 2px 4px 2px 0; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--white); font-size: 13px; color: var(--ink); }
.mk-chip small { color: var(--muted); font-size: 11px; } .mk-chip.on { background: var(--gold-soft); border-color: #F2B232; font-weight: 700; }
.mk-eff { display: inline; font-size: 12.5px; color: var(--text); margin-right: 8px; }
ul.lk { margin: 0; padding-left: 18px; } ul.lk li { margin: 2px 0; }
.admin-audit { background: var(--gold-soft); } .admin-audit code { font-size: 11px; word-break: break-all; }
.pop.crit { font-size: 20px; color: #ff8a5c; text-shadow: 0 0 6px rgba(255,120,60,.6); } .pop.ult.crit { font-size: 24px; }
.dm-nums { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.dm-num { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; }
.dm-num input { width: 64px; min-height: 40px; border: 1px solid var(--line-2); border-radius: 10px; padding: 6px 8px; font: inherit; font-size: 16px; text-align: center; background: var(--white); color: var(--ink); }
.dm-inf { min-height: 40px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--white); font-size: 13.5px; color: var(--ink); }
.dm-inf[aria-pressed=true] { background: var(--gold); border-color: #F2B232; font-weight: 700; }
/* 추천 화면(2026-11-18 정리): 상황 → 접힌 조건 → 목표 · 스타일 한 줄씩 → 결과 */
#dv-rec .deck-sits { padding-top: 4px; }
.rec-cond { margin: 6px 0 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); }
.rec-cond > summary { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 12px; cursor: pointer; list-style: none; font-size: 13.5px; }
.rec-cond > summary::-webkit-details-marker { display: none; }
.rec-cond .rc-k { font-weight: 700; color: var(--ink); flex: none; }
.rec-cond .rc-v { flex: 1; min-width: 0; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rec-cond .rc-go { flex: none; color: var(--rust); font-weight: 700; font-size: 12.5px; }
.rec-cond[open] .rc-go { visibility: hidden; }
.rec-cond[open] { padding-bottom: 8px; } .rec-cond > .deck-opts, .rec-cond > .deck-toggle, .rec-cond > .deck-tgt-box { margin-left: 12px; margin-right: 12px; }
.rec-cond .deck-opts .chips { margin: 0; padding-left: 0; padding-right: 0; }
.rec-row { display: flex; align-items: center; gap: 4px; }
.rec-lbl { flex: none; width: 46px; font-size: 13px; font-weight: 700; color: var(--muted); }
.rec-row .chips { flex: 1; min-width: 0; margin: 0 -16px 0 0; padding: 6px 16px 6px 0; }
.rec-hint { margin: 2px 0 8px; font-size: 12.5px; color: var(--muted); }
.rec-ord { margin: 6px 0 4px; font-size: 12.5px; color: var(--text); line-height: 1.45; }
.rec-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 6px 0; }
.rec-stats span { background: var(--soft); border-radius: 10px; padding: 5px 8px; display: flex; flex-direction: column; line-height: 1.25; }
.rec-stats small { font-size: 11px; color: var(--muted); } .rec-stats b { font-size: 14.5px; color: var(--ink); }
.rec-cmp { margin: 4px 0; font-size: 13px; font-weight: 700; } .rec-cmp.up { color: var(--ok); } .rec-cmp.down { color: var(--bad); } .rec-cmp.same { color: var(--muted); }
.rec-why summary { cursor: pointer; font-size: 13px; color: var(--rust); min-height: 32px; display: flex; align-items: center; }
.rec-act { flex-wrap: wrap; gap: 6px; }
.rec-trust { font-size: 12.5px; } .rec-err { color: var(--bad); }
.rec-more { margin: 12px 0; border-top: 1px solid var(--line); padding-top: 4px; }
.rec-more > summary { font-family: var(--display); font-weight: 700; font-size: 17px; color: var(--ink); min-height: 44px; display: flex; align-items: center; gap: 8px; cursor: pointer; }
.rec-more > summary small { font-family: var(--ui); font-weight: 400; font-size: 12.5px; color: var(--muted); }
/* 수련장 결과: 인게임 측정기 모양 표 */
.dm-meter-t { margin-top: 8px; background: var(--white); border-radius: 12px; padding: 8px 10px; }
.dm-meter-t .mh { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px; font-size: 13px; margin-bottom: 4px; } .dm-meter-t .mh span { color: var(--muted); }
.dm-meter-t table { width: 100%; border-collapse: collapse; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.dm-meter-t th { text-align: right; font-weight: 600; color: var(--muted); font-size: 11.5px; padding: 3px 4px; border-bottom: 1px solid var(--line); } .dm-meter-t th:first-child { text-align: left; }
.dm-meter-t td { text-align: right; padding: 3px 4px; border-bottom: 1px solid var(--soft-2); white-space: nowrap; }
.dm-meter-t td:first-child { text-align: left; display: flex; align-items: center; gap: 5px; white-space: normal; }
.dm-meter-t td i { font-style: normal; color: var(--muted); width: 18px; flex: none; text-align: right; font-size: 11px; }
.dm-meter-t td img, .dm-meter-t td .ba { width: 20px; height: 20px; border-radius: 5px; flex: none; }
.dm-meter-t td .ba { background: var(--soft-2); color: var(--muted); font-size: 10px; font-weight: 800; display: grid; place-items: center; }
.dm-meter-t tr.ult td { color: var(--rust); font-weight: 700; }
.conf { margin-left: 6px; font-size: 10.5px; font-weight: 700; padding: 2px 6px; border-radius: 6px; background: var(--soft-2); color: var(--muted); vertical-align: middle; } .conf.ok { background: #e3f1e7; color: var(--ok); }
.dv-meas { margin: 12px 0 4px; padding: 10px 12px; border-radius: 12px; background: var(--soft); } .dv-meas small { display: block; color: var(--muted); font-size: 12px; margin: 2px 0 6px; }
.dv-mrow { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 6px; } .dv-mrow label { display: grid; gap: 2px; font-size: 12px; color: var(--muted); } .dv-mrow .field { min-height: 40px; padding: 6px 8px; font-size: 16px; }
.dv-mout { margin: 6px 0 0; font-size: 13px; } .dv-mout .ok { color: var(--ok); } .dv-mout .bad { color: var(--bad); }
.rec-zone { flex-wrap: wrap; } .rec-zone select { flex: 1; min-width: 0; min-height: 40px; font-size: 14px; padding: 6px 8px; } .rec-zone .btn { flex: none; }
.rec-zone-line { margin: 4px 0; font-size: 12.5px; color: var(--text); background: var(--soft); border-radius: 8px; padding: 6px 8px; }
.hunt-box { margin: 10px 0 4px; padding: 10px 12px; border-radius: 12px; background: var(--soft); } .hunt-box .hb-h { display: flex; align-items: center; gap: 8px; } .hunt-box .hb-h b { flex: none; }
.hunt-box select { flex: 1; min-width: 0; min-height: 38px; font-size: 14px; padding: 4px 8px; } .hunt-box p { margin: 6px 0 0; font-size: 13px; } .hunt-box small { color: var(--muted); }
.must-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; max-height: 60vh; overflow: auto; margin: 8px 0; }
.must-grid button { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--white); text-align: left; font-size: 13px; color: var(--ink); }
.must-grid button img { width: 32px; height: 32px; border-radius: 7px; flex: none; } .must-grid button small { display: block; color: var(--muted); font-size: 11px; }
.must-grid button[aria-pressed=true] { background: var(--gold-soft); border-color: #F2B232; font-weight: 700; }
.rec-must .chips { flex-wrap: wrap; }

/* 허수아비 수련장(모바일 우선): 접는 설정 · 고정 점수판(덱 탭) · 한 덱씩 큰 무대 · 읽기 쉬운 순위 */
.dm-picks { padding: 6px 0 6px; }
.dm-set { margin: 2px 0 0; border: 1px solid var(--line); border-radius: 14px; background: var(--white); }
.dm-set > summary { list-style: none; display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; cursor: pointer; }
.dm-set > summary::-webkit-details-marker { display: none; }
.dm-set .sl { flex: none; font-size: 13px; font-weight: 800; color: var(--ink); }
.dm-set .sv { flex: 1; min-width: 0; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dm-set .chev { flex: none; color: var(--muted); transition: transform .15s; } .dm-set[open] .chev { transform: rotate(180deg); }
.dm-set-b { padding: 2px 12px 10px; border-top: 1px solid var(--line); display: grid; }
.dm-sr { display: grid; grid-template-columns: 64px 1fr; align-items: center; gap: 8px; min-height: 52px; border-bottom: 1px solid var(--soft-2); }
.dm-sr .k { font-size: 13.5px; font-weight: 700; color: var(--ink); }
.dm-sr .v { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; } .dm-sr .v small { font-size: 12px; color: var(--muted); }
.dm-sr .v.seg .dm-inf { min-width: 72px; }
.dm-fine { margin: 8px 0 0; font-size: 12px; line-height: 1.5; color: var(--muted); display: block; }
.dm-num input { width: 60px; }

.dm-board { position: sticky; top: -12px; z-index: 3; background: var(--white); margin: 8px -16px 0; padding: 8px 16px 8px; box-shadow: 0 6px 10px -8px rgba(43,27,13,.22); }
.dm-board .dm-clock { display: flex; align-items: baseline; gap: 4px; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.dm-board .dm-clock b { font-size: 16px; color: var(--ink); font-variant-numeric: tabular-nums; min-width: 40px; text-align: right; }
.dm-tbar { flex: 1; height: 4px; margin-left: 8px; align-self: center; background: var(--soft-2); border-radius: 999px; overflow: hidden; } .dm-tbar i { display: block; height: 100%; width: 0; background: var(--gold); }
.dm-sc { display: grid; gap: 4px; }
.dm-row { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto auto; align-items: center; gap: 8px; width: 100%; min-height: 44px; padding: 4px 10px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--white); font: inherit; color: var(--ink); text-align: left; overflow: hidden; cursor: pointer; }
.dm:not(.vs) .dm-row { cursor: default; grid-template-columns: minmax(0, 1fr) auto auto auto; }
.dm-row > * { position: relative; z-index: 1; }
.dm-row .rb { position: absolute; z-index: 0; left: 0; top: 0; bottom: 0; width: 0; background: var(--soft); transition: width .15s; }
.dm-row .dm-tag { margin: 0; }
.dm-row .nm { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; } .dm-row .nt { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dm-row .nv { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.15; }
.dm-row .nv b { font-size: 16px; font-variant-numeric: tabular-nums; } .dm-row .nv small { font-size: 10.5px; color: var(--muted); }
.dm-row .nv.sm b { font-size: 13px; color: var(--text); }
.dm-row .gap { font-size: 11px; font-weight: 700; color: var(--muted); } .dm-row .gap:empty { display: none; }
.dm-row.top1 .gap:empty { display: block; } .dm-row.top1 .gap:empty::before { content: '1위'; color: var(--rust); }
.dm.vs .dm-row.on { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
.dm.vs .dm-row.on .rb { background: var(--gold-soft); }
.dm-row.top1 .nv:not(.sm) b { color: var(--rust); }
@media (max-width: 360px) { .dm-row .nv.sm:last-of-type { display: none; } }

.dm-lanes { margin-top: 8px; }
.dm-stage[hidden] { display: none; }
.dm-stage { padding: 10px 12px 10px; margin-top: 0; }
.dm-arena { grid-template-columns: 72px 1fr 96px; height: 128px; margin-top: 2px; position: relative; }
.dm-dummy { height: 128px; } .dm-dummy svg { width: 70px; height: 96px; }
.dm-marks { position: absolute; left: 0; right: 0; top: 0; min-height: 0; margin: 0; justify-content: flex-end; z-index: 2; pointer-events: none; }
.mk { font-size: 11.5px; padding: 2px 7px; }
.dm-cast { font-size: 14px; min-height: 20px; margin-top: 6px; }
.dm-sk em { font-size: 13px; }
.dm-gauges .gg { grid-template-columns: auto 1fr auto; font-size: 12.5px; }
.dm-rank-h { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-top: 10px; } .dm-rank-h b { font-size: 13px; color: var(--ink); } .dm-rank-h small { font-size: 11px; color: var(--muted); }
.dm-rank { list-style: none; margin: 4px 0 0; padding: 6px 8px; background: rgba(255,255,255,.78); border-radius: 12px; display: grid; gap: 3px; }
.dm-rank li { display: grid; grid-template-columns: 16px 24px minmax(0, 1fr) auto 34px; gap: 6px; align-items: center; min-height: 26px; font-size: 13px; }
.dm-rank li i { font-style: normal; color: var(--muted); font-weight: 700; text-align: right; font-size: 12px; font-variant-numeric: tabular-nums; }
.dm-rank li img, .dm-rank li .ba { width: 24px; height: 24px; border-radius: 6px; }
.dm-rank li .ba { background: var(--soft-2); color: var(--muted); font-size: 11px; font-weight: 800; display: grid; place-items: center; }
.dm-rank li .rn { position: relative; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); padding-bottom: 4px; }
.dm-rank li .rn s { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--gold); border-radius: 2px; text-decoration: none; transition: width .15s; }
.dm-rank li b { text-align: right; color: var(--ink); font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dm-rank li em { font-style: normal; text-align: right; font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.dm-rank li.ult .rn, .dm-rank li.ult b { color: var(--rust); }

.dm-result { margin-top: 10px; background: var(--soft); border-radius: 14px; padding: 10px 12px; }
.dm-meter-t .mh .dm-tag { color: #fff; }
.dm-rh { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin-bottom: 6px; } .dm-rh b { display: inline; font-size: 14.5px; } .dm-rh small { display: inline; margin: 0; font-size: 12px; }
.dm-busy { color: var(--muted); font-size: 12.5px; }
.dm-rt { width: 100%; border-collapse: collapse; font-size: 13.5px; font-variant-numeric: tabular-nums; background: var(--white); border-radius: 10px; overflow: hidden; }
.dm-rt th { font-size: 11.5px; font-weight: 600; color: var(--muted); text-align: right; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.dm-rt td { text-align: right; padding: 7px 8px; border-bottom: 1px solid var(--soft-2); white-space: nowrap; } .dm-rt td:first-child, .dm-rt th:first-child { text-align: left; }
.dm-rt tr:last-child td { border-bottom: 0; } .dm-rt tr.best td b { color: var(--rust); }
.dm-meter-t table { font-size: 13px; } .dm-meter-t td img, .dm-meter-t td .ba { width: 22px; height: 22px; }
.dm-meter-t td:first-child span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 130px; }

.dm-modal .dm-ctl { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 6px; }
.dm-modal .dm-ctl .btn { padding: 0 6px; font-size: 14px; white-space: nowrap; }
.dm-modal .dm-ctl:not(:has(#dmEnd)) { grid-template-columns: 1.4fr 1fr 1fr; }
.dm-sp { font-variant-numeric: tabular-nums; }

/* 내 덱: 위 도구줄 · 더 보기 시트 */
.dl-top { display: flex; align-items: center; gap: 6px; margin: 2px 0 10px; }
.dl-tt { flex: 1; min-width: 0; font-size: 15px; color: var(--ink); } .dl-tt #deckCount { color: var(--rust); font-weight: 800; }
.dl-tt small { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dl-top .btn { min-height: 40px; }
#dv-list .dm-cta { min-height: 56px; padding: 8px 12px; margin: 0 0 10px; } #dv-list .dm-cta .ic { width: 38px; height: 38px; }
.dl-menu { display: grid; gap: 6px; margin-top: 10px; }
.dl-menu button { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); color: var(--ink); font: inherit; font-size: 15px; text-align: left; cursor: pointer; }
.dl-menu button small { display: block; font-size: 12px; color: var(--muted); }
.dl-menu button.danger { color: var(--bad); } .dl-menu button:disabled { opacity: .45; }

/* 편집: 계산 조건 접기 · 궁극기 신식 설명 3줄 */
.edit-cond { margin: 0 0 8px; }
.ult-row small:last-child { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.edit-cond > .chg-note { margin: 4px 12px 0; }
.rec-why .rec-ord { margin: 6px 0 4px; }

/* 내 도술: 강화 · 모두 보유 */
.tree-lead { margin-bottom: 8px; }
.tree-style label { display: inline-flex; align-items: center; gap: 8px; }
.tree-style #mineAll { margin-left: auto; min-height: 36px; }
#mineStyles .lv { font-size: 10.5px; color: var(--rust); font-weight: 800; margin-left: 3px; }
.tree-style select, .tree-top select { min-height: 36px; font-size: 15px; }
.tree-style .btn.quiet { background: var(--white); border: 1px solid var(--line); }

.mine-list li { grid-template-columns: minmax(0, 1fr) auto; }
.mine-list .own-t { display: flex; align-items: center; gap: 10px; min-width: 0; min-height: 44px; padding: 0; border: 0; background: none; font: inherit; text-align: left; cursor: pointer; color: inherit; }
.mine-list .own-t b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mine-list .oi { position: relative; flex: none; width: 40px; height: 40px; }
.mine-list .oi i { position: absolute; right: -4px; bottom: -4px; width: 18px; height: 18px; border-radius: 50%; background: var(--ok); color: #fff; font-style: normal; font-size: 11px; font-weight: 900; display: grid; place-items: center; border: 2px solid var(--white); }
.mine-list li.off b { color: var(--muted); font-weight: 600; }
.mine-list .ctl label { gap: 3px; } .mine-list .ctl select { min-width: 52px; }

/* 추천: 목표 · 스타일 고르기 버튼, 조건 적용, 결과 머리 · 카드 */
.rec-picks { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 8px 0 6px; }
.rec-pk { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; min-height: 56px; padding: 7px 26px 7px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); font: inherit; text-align: left; color: var(--ink); cursor: pointer; min-width: 0; }
.rec-pk small { font-size: 11.5px; color: var(--muted); } .rec-pk b { font-size: 15px; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rec-pk .dd { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 12px; }
.rec-pk:active { background: var(--soft); }
.gk-list { display: grid; gap: 6px; margin-top: 8px; }
.gk-list button { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); font: inherit; text-align: left; color: var(--ink); cursor: pointer; }
.gk-list button { position: relative; } .gk-list .gk-rank { position: absolute; top: 8px; right: 10px; font-style: normal; font-size: 11px; font-weight: 800; padding: 3px 7px; border-radius: 999px; background: var(--ink); color: var(--white); }
.gk-list button b { font-size: 15px; } .gk-list button b em { font-style: normal; font-size: 11px; color: var(--rust); margin-left: 4px; }
.gk-list button span { font-size: 13px; color: var(--text); } .gk-list button small { font-size: 12px; color: var(--muted); }
.gk-list button[aria-pressed=true] { border-color: var(--gold); background: var(--gold-soft); box-shadow: 0 0 0 1px var(--gold); }
.st-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 10px 0; }
.st-grid button { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 2px 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); font: inherit; color: var(--ink); cursor: pointer; min-width: 0; }
.st-grid .si { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; background: var(--soft); color: var(--rust); font-size: 18px; }
.st-grid button b { font-size: 13.5px; } .st-grid button small { font-size: 10.5px; color: var(--muted); min-height: 16px; display: flex; align-items: center; }
.st-grid button small em { font-style: normal; }
.st-grid button[aria-pressed=true] { border-color: var(--gold); background: var(--gold-soft); box-shadow: 0 0 0 1px var(--gold); }
.st-only { margin: 0 0 4px; } .st-only small { display: block; margin-left: 26px; }
.rec-apply { display: flex; flex-direction: column; gap: 6px; margin: 10px 12px 0; } .rec-apply small { font-size: 12px; color: var(--muted); }
.rec-apply .btn { width: 100%; }
#deckRecs.stale { opacity: .4; pointer-events: none; }
.rec-head { display: flex; flex-direction: column; margin: 10px 0 6px; } .rec-head b { font-size: 16px; color: var(--ink); } .rec-head small { font-size: 12.5px; color: var(--muted); }
.rc-top { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; }
.rc-top .rk { width: 24px; height: 24px; font-size: 12.5px; font-weight: 800; }
.rc-nm { min-width: 0; display: flex; align-items: center; } .rc-nm b { font-size: 15.5px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rc-dps { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.1; } .rc-dps b { font-size: 19px; color: var(--rust); font-variant-numeric: tabular-nums; } .rc-dps small { font-size: 10.5px; color: var(--muted); }
.rc-badges { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0 2px; }
.rb-cmp, .rb-lead { font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--white); border: 1px solid var(--line); }
.rb-cmp.up { color: var(--ok); border-color: #bfe0c8; } .rb-cmp.down { color: var(--bad); } .rb-cmp.same { color: var(--muted); }
.rb-lead { color: var(--rust); border-color: #ecd59f; background: var(--gold-soft); }
.recs .rec .deck-mini { margin-top: 8px; }
.st-only { display: grid; grid-template-columns: auto 1fr; align-items: start; gap: 2px 8px; font-size: 14px; font-weight: 700; color: var(--ink); }
.st-only input { margin-top: 3px; } .st-only small { grid-column: 2; margin: 0; font-weight: 400; }
.rec-wait { margin: 12px 0; padding: 14px; border-radius: 12px; background: var(--soft); text-align: center; }
.rec-cond > .chg-note { margin: 0 12px 8px; }
/* 내 덱: 상황별 보기 칩 */
.dl-sits { margin: 0 0 8px; } .dl-sits[hidden] { display: none; }
.dl-sits .n { font-size: 11px; color: var(--muted); font-weight: 700; margin-left: 2px; } .dl-sits [aria-pressed=true] .n { color: var(--rust); }
/* 내 덱: 광역 덱 사냥터 · 카드 처치 수 */
.dl-zone { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 0 0 8px; font-size: 13px; color: var(--muted); }
.dl-zone .field { flex: 1; min-width: 0; min-height: 40px; font-size: 14px; } .dl-zone small { flex-basis: 100%; font-size: 12px; }
.dl-meta .dl-dps { color: var(--rust); font-weight: 700; }
.dv-order .ba { width: 40px; height: 40px; border-radius: 9px; background: var(--soft-2); color: var(--muted); font-weight: 800; display: grid; place-items: center; } .dv-order button:disabled { cursor: default; color: inherit; opacity: 1; }
/* 수련장 4개 · 덱 줄 '다른 덱' 버튼 */
.dm-tag.D { background: #3d6fb6; }
.dm-pick .dm-picks { flex-wrap: wrap; overflow: visible; } .dm-pick .dm-pk { max-width: 100%; }   /* 고른 덱 4개 + 고르기 버튼이 한눈에(가로 스크롤 없이) */
.dm-pk .x { font-size: 11px; color: var(--muted); margin-left: 2px; }
.dm-plist { border: 1px solid var(--line); border-radius: 14px; padding: 8px; margin: 2px 0 8px; background: var(--soft); }
.dm-plist .field { margin-bottom: 6px; padding: 8px 12px; font-size: 16px; background: var(--white); }
.dm-prows { display: grid; gap: 4px; max-height: 44vh; overflow: auto; }
.dm-pr { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 1px solid transparent; border-radius: 10px; background: var(--white); font: inherit; text-align: left; color: var(--ink); cursor: pointer; }
.dm-pr[hidden] { display: none; } .dm-pr.on { border-color: var(--gold); background: var(--gold-soft); }
.dm-pr .nm { display: flex; flex-direction: column; min-width: 0; } .dm-pr .nm b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .dm-pr .nm small { font-size: 12px; color: var(--muted); } .dm-pr .st { color: var(--gold-deep, #C8941F); }
.dm-pk.more { color: var(--muted); border-style: dashed; padding: 0 14px; }
.dm.vs .dm-sc:has(> :nth-child(4)) .dm-row { min-height: 40px; padding-top: 2px; padding-bottom: 2px; }
.dm.vs .dm-sc:has(> :nth-child(4)) .dm-row .nv b { font-size: 15px; }
/* 무한 사냥 생존 추정 */
.rb-risk { font-size: 11.5px; font-weight: 800; padding: 2px 8px; border-radius: 999px; border: 1px solid; white-space: nowrap; }
.rb-risk.lv0 { color: var(--ok); border-color: #bfe0c8; background: #eef7f0; }
.rb-risk.lv1 { color: #a8660b; border-color: #ecd59f; background: #fff6df; }
.rb-risk.lv2 { color: var(--bad); border-color: #efc2b8; background: #fdeeea; }
.hb-risk { display: block; margin-top: 6px; } .hb-risk small { display: block; margin-top: 3px; font-size: 11.5px; color: var(--muted); }
.dl-meta .rb-risk { font-size: 11px; padding: 1px 7px; }
.rc-alt { flex: none; margin-left: 6px; font-size: 11px; font-weight: 700; color: var(--muted); }
.rec-diff { margin: 6px 0 0; font-size: 12.5px; color: var(--text); } .rec-diff b { color: var(--ink); }
.rec-more-btn { width: 100%; margin: 8px 0 4px; min-height: 46px; } .rec-more-btn small { color: var(--muted); font-weight: 500; margin-left: 4px; }
.dm-board .dm-clock .dm-cond { flex: none; margin-left: 8px; font-size: 11.5px; color: var(--muted); }
/* 정리 2단계 */
.hb-z { font-size: 12.5px; color: var(--muted); margin-left: 6px; }
.dp-dm { margin-left: auto; font-size: 12.5px; }
.rec-tgt { margin-left: 6px; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); background: var(--white); color: var(--text); cursor: pointer; vertical-align: middle; }
/* 정리 3단계: 추천 */
.rec-main { margin: 4px 0 2px; } .rec-main[hidden] { display: none; }
.rec-main .deck-opts { margin: 0; } .rec-main .chg-note { margin: 0 0 4px; }
.rec-main .rec-zone .field { flex: 1; min-width: 0; }
.rec-head .rec-note { display: block; margin-top: 2px; color: var(--rust); }
.deck-sits button { padding-left: 14px; padding-right: 14px; }

/* 정리 4단계: 편집 */
.dslot .sl { white-space: normal; line-height: 1.15; font-size: 10.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: keep-all; }
.deck-stick .dsm-name { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.deck-stick .dsm-name b { font-size: 14px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .deck-stick .dsm-name small { font-size: 11.5px; color: var(--muted); }
#ds-order:not(:empty) { margin-bottom: 12px; }
#ds-diag .deck-next:not(:empty) { margin-bottom: 10px; }
/* 내 정보: 능력치 2열 */
.stat-grid { grid-template-columns: 1fr 1fr; }
.stat-sty > summary { cursor: pointer; } .stat-sty > summary::after { content: ' ▾'; color: var(--muted); } .stat-sty[open] > summary::after { content: ' ▴'; }
.deck-lab .link { flex: none; white-space: nowrap; } .deck-lab > span { min-width: 0; }
.dv-meas-box { margin-top: 10px; border: 1px solid var(--line); border-radius: 12px; padding: 0 12px; }
.dv-meas-box > summary { min-height: 44px; display: flex; align-items: center; gap: 6px; font-weight: 700; color: var(--ink); cursor: pointer; list-style: none; }
.dv-meas-box > summary::-webkit-details-marker { display: none; } .dv-meas-box > summary small { color: var(--muted); font-weight: 500; }
.dv-meas-box[open] { padding-bottom: 10px; }
/* 수련장 점수판: 피해가 들어갈 때 줄 반짝(동시 시작이 보이게) */
.dm-row.pulse { animation: dmpulse .35s ease-out; }
@keyframes dmpulse { 0% { box-shadow: 0 0 0 2px rgba(196,138,46,.55); } 100% { box-shadow: 0 0 0 0 rgba(196,138,46,0); } }
.dm.vs .dm-row.on.pulse { animation-name: dmpulse-on; } @keyframes dmpulse-on { 0% { box-shadow: 0 0 0 3px var(--gold); } 100% { box-shadow: 0 0 0 1px var(--gold); } }
/* 추천 카드: 이름 아래 스타일 구성 */
.rc-nm { flex-wrap: wrap; row-gap: 0; } .rc-nm .rc-mix { flex-basis: 100%; font-size: 12px; color: var(--muted); font-weight: 600; margin-top: 1px; }
/* 내 덱 즐겨찾기(★ = 위로 · 지우기 잠금) */
.dlist > li { position: relative; }
.dl-fav { position: absolute; top: 6px; right: 6px; z-index: 1; width: 40px; height: 40px; border: 0; background: none; font-size: 22px; line-height: 1; color: var(--line-2); cursor: pointer; border-radius: 10px; }
.dl-fav[aria-pressed=true] { color: var(--gold); text-shadow: 0 1px 0 rgba(0,0,0,.08); }
.dlist > li.fav { box-shadow: inset 0 0 0 1.5px var(--gold); }
.dl-main .fh { padding-right: 40px; }
.dl-menu .dl-star { width: 20px; text-align: center; font-size: 18px; color: var(--gold); }
.dl-menu button:disabled small { color: var(--muted); }
/* 수련장 맨 위 사냥 방식 */
.dm-mode { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 2px 0 8px; }
.dm-mode button { display: flex; flex-direction: column; align-items: center; gap: 1px; min-height: 52px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--white); font: inherit; color: var(--text); cursor: pointer; }
.dm-mode button b { font-size: 15px; } .dm-mode button small { font-size: 11.5px; color: var(--muted); }
.dm-mode button[aria-pressed=true] { border-color: var(--gold); background: var(--gold-soft); color: var(--ink); box-shadow: 0 0 0 1px var(--gold); }
.st-max { display: grid; gap: 4px; margin: 4px 0 10px; } .st-max > span { font-size: 13.5px; font-weight: 700; color: var(--ink); } .st-max small { font-size: 12px; color: var(--muted); } .st-max .chips { margin: 0; padding: 0; }
.dm-rank li .rn .rcn { margin-left: 6px; font-size: 11.5px; color: var(--muted); font-weight: 600; }
.dm-sumrow { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; padding: 8px 10px; margin-top: 6px; background: var(--white); border-radius: 10px; font-size: 13px; }
.dm-sumrow > b { color: var(--ink); } .dm-sumrow span { color: var(--text); } .dm-sumrow span b { color: var(--rust); }
.dm-sumrow > span { flex-basis: 100%; }
.rv-act .btn { padding-left: 8px; padding-right: 8px; } .rv-share { display: inline-flex; align-items: center; justify-content: center; gap: 4px; }
.rb-risk.lvnp { color: #1f6f8b; border-color: #b9dbe6; background: #eaf5f9; }

/* 드롭 기댓값 계산(던전 시트 위에 뜨는 모달) */
.calc-modal { position: fixed; inset: 0; z-index: 25; background: rgba(43,27,13,.45); display: flex; align-items: flex-end; justify-content: center; padding: 16px; }
@media (min-width: 560px) { .calc-modal { align-items: center; } }
.calc-card { width: 100%; max-width: 460px; max-height: calc(100vh - 32px); overflow: auto; background: var(--white); border-radius: 18px; padding: 14px 16px 18px; box-shadow: 0 16px 40px rgba(43,27,13,.25); }
.calc-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.calc-head h3 { margin: 0; font-size: 17px; }
.calc-x { border: 0; background: var(--soft); border-radius: 10px; width: 36px; height: 36px; font-size: 20px; color: var(--ink); }
.calc-sub { margin: 4px 0 10px; color: var(--muted); }
.calc-form { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 8px; }
.calc-form label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); min-width: 0; }
.calc-form .field { padding: 10px; font-size: 16px; min-width: 0; width: 100%; }
@media (max-width: 400px) { .calc-form { grid-template-columns: 1fr 1fr; } .calc-form label:first-child { grid-column: 1 / -1; } }
.calc-quick { margin-top: 8px; }
.calc-sum { margin-top: 10px; }
.calc-t { margin-top: 10px; }
.calc-t td { vertical-align: middle; }
.calc-t td:not(:first-child) { text-align: right; white-space: nowrap; }
.calc-it { display: flex; align-items: center; gap: 8px; }
.calc-it img { width: 28px; height: 28px; border-radius: 6px; flex: none; }
.calc-it small { display: block; font-size: 11px; color: var(--muted); }
.dg-calc-cta { margin-top: 12px; } .dg-calc-cta .btn { width: 100%; }
.dg-notes { margin: 8px 0 0; padding-left: 18px; font-size: 13px; color: var(--muted); line-height: 1.5; white-space: pre-line; }
