/* 조달 · 고용소 · 정보원 · 돈 쓴 기록 */
.shop { display: grid; gap: var(--gap); min-width: 0; }
.shop-side, .shop-main, .shop-detail { display: grid; gap: 10px; align-content: start; min-width: 0; }
.shop-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px 2px; }
.shop-tabs::-webkit-scrollbar { display: none; }
.shop-tabs button { flex: 0 0 auto; display: flex; align-items: center; gap: 6px; min-height: var(--tap); padding: 4px 12px 4px 6px; background: var(--panel-2); border: 1px solid var(--line); color: var(--ink); cursor: pointer; font: inherit; white-space: nowrap; }
.shop-tabs button.on { border-color: var(--amber); color: var(--amber); background: var(--amber-bg); }
.shop-tabs .ico { width: 34px; height: 24px; object-fit: contain; }
.merch { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 10px; padding: 10px; border: 1px solid var(--line); background: var(--panel); align-items: start; }
.merch-art { width: 84px; height: 110px; object-fit: cover; object-position: top; border: 1px solid var(--line-soft); }
.merch-say { display: grid; gap: 4px; min-width: 0; }
.merch-n { display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; } .merch-n b { font-weight: 400; color: var(--ink-strong); font-size: var(--fs-lg); } .merch-n span { font-size: var(--fs-xs); color: var(--amber); }
.merch-line { text-align: left; padding: 8px 10px; background: var(--shade-30); border: 1px solid var(--line-soft); color: var(--ink); font: inherit; font-size: var(--fs-sm); line-height: 1.6; cursor: pointer; min-height: var(--tap); }
.merch-line:hover { border-color: var(--amber); }
.sp-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sp-tools .field.grow { flex: 1 1 200px; } .sp-tools input, .sp-tools select { width: 100%; min-height: var(--tap); }
.sp-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 8px; }
.sp-card { display: grid; gap: 6px; align-content: start; padding: 8px; border: 1px solid var(--line-soft); background: var(--panel); min-width: 0; }
.sp-card.on { border-color: var(--amber); } .sp-card.lock { opacity: .6; }
.sp-pick { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 8px; align-items: center; min-height: 52px; padding: 0; background: transparent; border: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.sp-ico { display: grid; place-items: center; height: 46px; background: var(--shade-25); }
.sp-ico .ico { width: 68px; height: 42px; object-fit: contain; }
.sp-t { display: grid; gap: 1px; min-width: 0; } .sp-t b { font-weight: 400; color: var(--ink-strong); overflow-wrap: anywhere; } .sp-t small { font-size: var(--fs-xs); color: var(--ink-dim); }
.sp-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
.sp-stats > div, .sd-stats > div { display: grid; gap: 1px; padding: 4px 6px; border: 1px solid var(--line-soft); min-width: 0; }
.sp-stats span, .sd-stats span { font-size: var(--fs-xs); color: var(--ink-dim); }
.sp-stats b, .sd-stats b { font-weight: 400; color: var(--ink-strong); font-size: var(--fs-sm); overflow-wrap: anywhere; }
.sp-card .btnrow .btn { flex: 1 1 auto; }
.pager { display: flex; align-items: center; justify-content: center; gap: 10px; font-size: var(--fs-sm); }
.sd-hero { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 10px; padding: 10px; align-items: center; }
.sd-art { display: grid; place-items: center; height: 90px; background: var(--shade-25); } .sd-art .ico { width: 116px; height: 80px; object-fit: contain; }
.sd-t { display: grid; gap: 2px; min-width: 0; } .sd-t h2 { font-weight: 400; font-size: var(--fs-lg); color: var(--ink-strong); overflow-wrap: anywhere; }
.sd-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 110px), 1fr)); gap: 4px; }
.sd-price { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; } .sd-price span { color: var(--ink-dim); font-size: var(--fs-sm); } .sd-price strong { font-weight: 400; font-size: var(--fs-xl); color: var(--amber); }
.sd-buy .btnrow .btn { flex: 1 1 auto; }
.cmpgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 120px), 1fr)); gap: 4px; }
.cmpgrid > div { display: grid; gap: 1px; padding: 4px 6px; border: 1px solid var(--line-soft); font-size: var(--fs-xs); }
.cmpgrid span { color: var(--ink-dim); } .cmpgrid small { font-size: var(--fs-xs); } .cmpgrid b { font-weight: 400; color: var(--ink-strong); font-size: var(--fs-sm); }
.cmpline { font-size: var(--fs-sm); color: var(--ink-dim); }

/* 각인 재설정 */
.rune-reset { display: grid; gap: 12px; padding: 12px; border: 1px solid var(--line); background: var(--panel); }
.rune-reset-pick, .rune-reset-main { display: grid; gap: 8px; min-width: 0; }
.rune-reset-pick select { width: 100%; min-height: var(--tap); }
.rune-reset-selected { display: flex; align-items: center; gap: 8px; } .rune-reset-selected .ico { width: 40px; height: 40px; }
.rune-reset-selected div { display: grid; } .rune-reset-selected small { font-size: var(--fs-xs); color: var(--ink-dim); }
.rune-reset-art { position: relative; display: grid; justify-items: center; gap: 4px; }
.rune-reset-art img { width: 100%; max-height: 180px; object-fit: cover; border: 1px solid var(--line-soft); }
.rune-reset-art h3 { font-weight: 400; color: var(--ink-strong); }
.rune-reset.busy .rune-reset-art img { animation: wsSpin 2.4s linear infinite; }
.rune-reset-comparison { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 8px; align-items: center; }
.rune-reset-effect { display: grid; gap: 2px; padding: 8px; border: 1px solid var(--line-soft); min-height: 64px; align-content: center; text-align: center; }
.rune-reset-effect span { font-size: var(--fs-xs); color: var(--ink-dim); } .rune-reset-effect strong { font-weight: 400; color: var(--ink-strong); }
.rune-reset-effect .unknown { font-size: var(--fs-xl); color: var(--ink-dim); font-weight: 400; }
.rune-reset-arrow { color: var(--amber); }
.cw-max { color: var(--blue-sky); } .cw-max-tag { margin-left: 4px; font-size: var(--fs-xs); color: var(--blue-sky); font-weight: 400; }
.rune-reset-rules { font-size: var(--fs-xs); color: var(--ink-dim); text-align: center; }
.rune-reset-cost { display: flex; justify-content: space-between; } .rune-reset-cost strong { font-weight: 400; color: var(--amber); }

/* 고용소 — 카드 안 단추는 카드 바닥 */
.hirep, .infp, .ledg { display: grid; gap: var(--gap); min-width: 0; }
.hiregrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 8px; }
.hirecard { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 10px; padding: 10px; border: 1px solid var(--line-soft); background: var(--shade-20); min-width: 0; }
.hirecard.on { border-color: var(--green-mid); }
.hface { width: 76px; height: 96px; object-fit: cover; object-position: top; border: 1px solid var(--line-soft); }
.hbody { display: grid; gap: 4px; min-width: 0; align-content: start; }
.hirecard .hbody { display: flex; flex-direction: column; gap: 6px; }
.hirecard .hbody > .btn:last-child, .hirecard .hbody > .btnrow:last-child { margin-top: auto; }
.hire-h { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; } .hire-h > b:first-child { font-weight: 400; color: var(--ink-strong); font-size: var(--fs); }
.hire-h .amber { margin-left: auto; font-weight: 400; }
.hstats { display: flex; flex-wrap: wrap; gap: 2px 10px; font-size: var(--fs-xs); color: var(--ink-dim); } .hstats b { font-weight: 400; color: var(--ink-strong); }
.hrow { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 6px; font-size: var(--fs-sm); align-items: center; }
.hrow > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.hrow i { font-style: normal; font-size: var(--fs-xs); }
.hgun { grid-template-columns: 64px minmax(0, 1fr); } .hgun .ico { width: 60px; height: 30px; object-fit: contain; }

/* 정보원 */
.infsum { align-items: center; } .infsum .btn { margin-left: auto; }
.inflist { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 8px; }
.infcard { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 10px; padding: 10px; border: 1px solid var(--line-soft); background: var(--panel); min-width: 0; }
.inface { width: 64px; height: 80px; object-fit: cover; object-position: top; border: 1px solid var(--line-soft); }
.inface.sm { width: 64px; height: 80px; }
.ibody { display: grid; gap: 4px; min-width: 0; }
.ih { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; } .ih b { font-weight: 400; color: var(--ink-strong); }
.infcard .hrow { grid-template-columns: 72px minmax(0, 1fr); }
.infkinds { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 8px; }
.infkind { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 8px; align-items: center; padding: 8px; background: var(--shade-20); border: 1px solid var(--line-soft); color: var(--ink); text-align: left; cursor: pointer; font: inherit; min-height: var(--tap); }
.infkind.on { border-color: var(--amber); } .infkind .inface { width: 56px; height: 70px; }
.infkind .it { display: grid; gap: 2px; min-width: 0; } .infkind b { font-weight: 400; color: var(--ink-strong); }
.infregions { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 6px; }
.infreg { display: grid; gap: 1px; padding: 8px; min-height: var(--tap); background: var(--panel-2); border: 1px solid var(--line); color: var(--ink); text-align: left; cursor: pointer; font: inherit; }
.infreg:disabled { opacity: .5; cursor: default; } .infreg b { font-weight: 400; color: var(--ink-strong); }
.infreg:not(:disabled):hover { border-color: var(--amber); }

/* 돈 쓴 기록 — 폰은 «남은 자금» 칸을 빼야 금액이 화면 안에 든다 */
.ledsum { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ledg table.grid td:nth-child(2) { min-width: 140px; }

@media (min-width: 761px) {
  .rune-reset { grid-template-columns: minmax(0, 260px) minmax(0, 1fr); align-items: start; }
}
@media (min-width: 761px) and (max-width: 1100px) {
  .shop { grid-template-columns: minmax(0, 1fr) 300px; }
  .shop-side { grid-column: 1 / -1; }
}
@media (min-width: 761px) and (max-width: 900px) { .shop { align-items: start; } }
/* PC — 왼쪽 분류·상인 / 가운데 목록 / 오른쪽 상세 세 칸 바닥을 같게 */
@media (min-width: 901px) {
  .shop { align-items: stretch; }
  .shop > .shop-side, .shop > .shop-detail { display: flex; flex-direction: column; gap: var(--gap); }
  .shop > .shop-side > :last-child, .shop > .shop-detail > :last-child { flex: 1 1 auto; }
}
@media (min-width: 1101px) {
  .shop { grid-template-columns: 240px minmax(0, 1fr) 320px; }
  .shop-tabs { flex-direction: column; overflow: visible; margin: 0; padding: 0; }
  .shop-tabs button { white-space: normal; }
  .merch { grid-template-columns: 1fr; } .merch-art { width: 100%; height: 220px; }
  .shop-detail { position: sticky; top: calc(var(--topbar-h) + 10px); }
}
@media (max-width: 600px) {
  .sd-hero { grid-template-columns: 90px minmax(0, 1fr); } .sd-art .ico { width: 88px; height: 60px; }
  .rune-reset-comparison { grid-template-columns: 1fr; } .rune-reset-arrow { transform: rotate(90deg); justify-self: center; }
  .ledsum b { font-size: var(--fs); } .ledsum span { font-size: var(--fs-xs); }
  .ledg table.grid th:nth-child(4), .ledg table.grid td:nth-child(4) { display: none; }
}
