@charset "UTF-8";
:root {
  color-scheme: light;
  --ink: #172b35;
  --muted: #6c7d83;
  --line: #e4ecee;
  --teal: #087f72;
  --teal-soft: #e6f5ef;
  --bg: #f5f8f8;
  --white: #fff;
  --radius: 20px;
  font-family: Inter, 'Pretendard', 'Noto Sans KR', 'Malgun Gothic', system-ui, sans-serif;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.6;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button {
  color: inherit;
}
button:disabled {
  cursor: wait;
  opacity: 0.55;
}
a {
  color: var(--teal);
  text-underline-offset: 4px;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid #36a998;
  outline-offset: 3px;
}
button {
  border: 0;
  background: transparent;
}
button:hover {
  filter: brightness(0.98);
}
[hidden] {
  display: none !important;
}
.skip-link {
  position: fixed;
  top: -100px;
  left: 10px;
  z-index: 100;
  background: #fff;
  padding: 14px;
}
.skip-link:focus {
  top: 10px;
}
.header {
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}
.header-inner {
  max-width: 1200px;
  margin: auto;
  height: 80px;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 1.8px;
  line-height: 1.4;
}
.brand-sub {
  display: block;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 3.7px;
  color: var(--muted);
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.icon-button {
  height: 40px;
  min-width: 40px;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: 18px;
  font-weight: 600;
}
.refresh-button {
  height: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--ink);
  color: white;
  border-radius: 12px;
  padding: 0 15px;
  font-size: 12px;
  font-weight: 600;
}
.refresh-button > span:first-child {
  font-size: 25px;
  line-height: 1;
}
.is-loading > span:first-child {
  animation: spin 1s linear infinite;
}
.text-button {
  color: var(--teal);
  font-weight: 700;
  min-height: 44px;
  padding: 8px;
}
.page {
  max-width: 1200px;
  margin: auto;
  padding: 0 32px;
}
.intro {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 43px 0 31px;
  gap: 24px;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 2.1px;
  color: var(--teal);
  font-weight: 800;
  margin: 0 0 12px;
}
h1 {
  font-size: 34px;
  line-height: 1.3;
  letter-spacing: -1.8px;
  margin: 0;
  font-weight: 800;
}
h1 > span {
  color: #00a283;
}
.intro-copy {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.intro-note {
  font-size: 11px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 4px;
  white-space: nowrap;
}
.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #139d81;
  display: inline-block;
  flex-shrink: 0;
}
.status-dot.stale {
  background: #b97c24;
}
.note-divider {
  margin: 0 4px;
  color: #b6c4c7;
}
.toolbar {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 17px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 26px;
  flex-wrap: wrap;
}
.format-switch {
  display: flex;
  background: #e7eef0;
  border-radius: 12px;
  padding: 4px;
  gap: 4px;
}
.format-switch button {
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 700;
  border-radius: 9px;
  min-height: 42px;
  color: #728088;
  display: flex;
  align-items: center;
  gap: 10px;
}
.format-switch button > span {
  font-size: 17px;
  line-height: 1;
  font-weight: 900;
}
.format-switch button[aria-pressed='true'] {
  background: white;
  box-shadow: 0 2px 6px #233f4510;
  color: var(--ink);
}
.season-control {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
}
select {
  background: transparent;
  border: 0;
  font-weight: 700;
  color: var(--ink);
  padding: 9px 25px 9px 5px;
  min-height: 44px;
  max-width: 180px;
}
.source-status {
  margin-left: auto;
  font-size: 11px;
  color: var(--muted);
}
.source-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 0;
  text-align: left;
  font-size: 11px;
}
.source-kind {
  color: var(--muted);
  padding: 0 5px;
}
.notice {
  background: #fff4dd;
  color: #81591d;
  border: 1px solid #f1dfb9;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 12px;
  margin-bottom: 18px;
}
.workspace {
  display: grid;
  grid-template-columns: 375px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  min-height: 500px;
  outline: none;
}
.list-panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  padding: 23px 20px 12px;
}
/* 제목과 그 아래 보기 전환 사이 간격. 스피드 랭킹, 상성표, 도감이 같은 값을 쓴다. */
:root {
  --heading-gap: 17px;
}
.list-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--heading-gap);
}
h2 {
  margin: 0;
  font-size: 17px;
  letter-spacing: -0.5px;
}
.count {
  font-size: 11px;
  color: var(--muted);
  background: #f1f5f6;
  padding: 3px 9px;
  border-radius: 20px;
}
.search-box {
  display: flex;
  align-items: center;
  background: #f5f8f9;
  border: 1px solid #eaf0f1;
  border-radius: 11px;
  height: 46px;
  gap: 10px;
  padding: 0 12px;
}
.search-box > span {
  font-size: 25px;
  color: #84979e;
  line-height: 1;
}
.search-box input {
  width: 100%;
  min-width: 0;
  outline: none !important;
  border: 0;
  background: transparent;
  font-size: 12px;
  color: var(--ink);
}
.search-box:focus-within {
  border-color: var(--teal);
  box-shadow: 0 0 0 2px #087f7210;
}
.search-box input::placeholder {
  color: #809098;
}
.search-box kbd {
  font-size: 11px;
  border: 1px solid #dce5e8;
  border-radius: 4px;
  padding: 0 5px;
  color: #84979e;
}
.list-filter {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #809198;
  font-size: 10px;
  padding: 12px 0 8px;
}
.list-filter button {
  font-size: 11px;
  color: var(--muted);
  min-height: 36px;
  padding: 5px 8px;
}
.list-filter button[aria-pressed='true'] {
  color: var(--teal);
  background: var(--teal-soft);
  border-radius: 8px;
}
.pokemon-row {
  display: flex;
  align-items: center;
  position: relative;
  gap: 0;
  border-bottom: 1px solid #f0f4f5;
  border-radius: 10px;
  transition: background 0.15s;
}
.pokemon-row.selected {
  background: var(--teal-soft);
  border-color: transparent;
}
.pokemon-row:hover {
  background: #f4f8f7;
}
.pokemon-select {
  display: flex;
  align-items: center;
  gap: 11px;
  text-align: left;
  width: calc(100% - 36px);
  min-height: 83px;
  padding: 8px 2px;
}
.rank {
  font-variant-numeric: tabular-nums;
  font-size: 14px;
  font-weight: 650;
  color: #9aa9ae;
  width: 24px;
  text-align: center;
  flex-shrink: 0;
}
.rank-top {
  color: var(--teal);
}
.portrait-wrap {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: #f5f8f7;
  border-radius: 50%;
}
.selected .portrait-wrap {
  background: #d8ece3;
}
.portrait {
  object-fit: contain;
  max-width: 100%;
  width: 52px;
  height: 52px;
  filter: drop-shadow(0 3px 2px #263e4610);
}
.image-missing {
  visibility: hidden;
}
.pokemon-info {
  min-width: 0;
  flex: 1;
}
.pokemon-info strong {
  font-size: 13px;
  display: block;
  line-height: 1.5;
  font-weight: 750;
  word-break: keep-all;
}
.type-list {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: 7px;
}
.type-badge {
  font-size: 9px;
  line-height: 1.5;
  font-weight: 650;
  padding: 1px 7px;
  border-radius: 4px;
  color: #68797f;
  background: #edf1f3;
  white-space: nowrap;
}
.type-dragon {
  color: #5c5db2;
  background: #ededfa;
}
.type-flying {
  color: #6086a6;
  background: #edf3fc;
}
.type-water {
  color: #387cab;
  background: #e7f3fb;
}
.type-fairy {
  color: #b56d9b;
  background: #faedf6;
}
.type-grass {
  color: #488451;
  background: #e9f4e8;
}
.type-ground {
  color: #9a7d4d;
  background: #f4eddf;
}
.type-bug {
  color: #7b8d32;
  background: #f0f3dd;
}
.type-steel {
  color: #677d86;
  background: #e9f0f2;
}
.type-ghost {
  color: #866997;
  background: #f0eaf6;
}
.type-fire {
  color: #b96643;
  background: #fceee7;
}
.type-electric {
  color: #967a19;
  background: #fbf4d7;
}
.type-dark {
  color: #686779;
  background: #efedf1;
}
.type-fighting {
  color: #a76761;
  background: #f9eeec;
}
.type-poison {
  color: #9a6aad;
  background: #f4ebf8;
}
.type-ice {
  color: #4c8b91;
  background: #e8f7f7;
}
.type-psychic {
  color: #b7688b;
  background: #fbeef4;
}
.type-rock {
  color: #938052;
  background: #f4f0e2;
}
.favorite-button {
  display: grid;
  place-items: center;
  min-width: 36px;
  height: 44px;
  font-size: 23px;
  color: #aebcbf;
  flex-shrink: 0;
}
.favorite-button[aria-pressed='true'] {
  color: #c59834;
}
.load-more {
  width: 100%;
  min-height: 46px;
  border-radius: 9px;
  background: #f2f6f5;
  margin: 12px 0 0;
  font-size: 12px;
  font-weight: 650;
  color: var(--muted);
}
/* Scrolls with the page. Sticking it under the header made a short tab follow the
   scroll and park its end against the ranking list, which moved the reader's place
   every time the content changed height. */
.detail-panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  min-width: 0;
}
.detail-placeholder {
  min-height: 590px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 30px;
  color: var(--muted);
}
.detail-placeholder h2 {
  color: var(--ink);
  font-size: 22px;
  margin-bottom: 4px;
}
.detail-placeholder > p:not(.eyebrow) {
  font-size: 13px;
  line-height: 1.9;
}
.placeholder-mark {
  width: 76px;
  height: 76px;
  border-radius: 24px;
  background: var(--teal-soft);
  color: var(--teal);
  display: grid;
  place-items: center;
  font-size: 35px;
  margin-bottom: 28px;
}
.placeholder-tags {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}
.placeholder-tags span {
  border: 1px solid var(--line);
  padding: 5px 15px;
  border-radius: 7px;
  font-size: 11px;
}
.detail-mobile-nav {
  display: none;
}
.pokemon-hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 212px;
  padding: 28px 30px;
  background: linear-gradient(120deg, #f0f9f5, #eaf3f6);
  overflow: hidden;
  gap: 16px;
}
.hero-copy {
  z-index: 1;
  flex: 1;
  min-width: 0;
}
.rank-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #fff;
  padding: 4px 10px;
  border: 1px solid #dcece7;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 800;
  color: var(--teal);
}
.rank-pill span {
  font-size: 9px;
  font-weight: 500;
  color: var(--muted);
}
.hero-copy h2 {
  font-size: 29px;
  margin: 13px 0 3px;
  line-height: 1.3;
  letter-spacing: -1px;
  word-break: keep-all;
}
.english-name {
  font-size: 11px;
  color: #84989e;
  margin: 0;
}
.english-name span {
  margin-left: 8px;
  color: #98a9ad;
}
.hero-copy .type-badge {
  font-size: 10px;
}
.hero-copy .type-list {
  margin-top: 12px;
}
.hero-art {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: radial-gradient(circle, #ffffffa0 55%, transparent 56%);
  display: grid;
  place-items: center;
  position: relative;
  flex-shrink: 0;
}
.hero-art:after {
  content: '';
  position: absolute;
  inset: -10px;
  border: 1px solid #ffffff90;
  border-radius: 50%;
}
.hero-portrait {
  width: 136px;
  height: 136px;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 6px 4px #143b3920);
}
.hero-favorite {
  position: absolute;
  right: 13px;
  top: 7px;
  z-index: 2;
}
.detail-tabs {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  padding: 0 17px;
  border-bottom: 1px solid var(--line);
  gap: 0;
}
.detail-tabs button {
  font-size: 11px;
  min-height: 56px;
  padding: 12px 0;
  color: var(--muted);
  font-weight: 650;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
}
.detail-tabs button[aria-selected='true'] {
  color: var(--teal);
  border-bottom-color: var(--teal);
}
.category-content {
  padding: 24px 27px 16px;
  min-height: 380px;
  outline: none;
}
.category-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
}
.category-heading h3 {
  font-size: 15px;
  margin: 0;
}
.category-heading > span {
  font-size: 10px;
  color: var(--muted);
}
.stat-rows {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.stat-row {
  min-height: 45px;
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 13px;
  background: #f7f9fa;
  border-radius: 8px;
  overflow: hidden;
  isolation: isolate;
  text-align: left;
  width: 100%;
}
.stat-bar {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: #eaf4ef;
  z-index: -1;
  border-right: 2px solid #c6e3d7;
}
.stat-rank {
  width: 15px;
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  color: #76958b;
  flex-shrink: 0;
}
.stat-name {
  flex: 1;
  min-width: 0;
}
.stat-name strong {
  font-size: 12px;
  font-weight: 600;
}
.stat-percent {
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.category-tip {
  font-size: 10px;
  color: var(--muted);
  margin: 18px 0 0;
  line-height: 1.7;
}
.stat-adjust {
  display: flex;
  gap: 10px;
  font-size: 10px;
  margin-top: 3px;
}
.stat-up {
  color: #c36a64;
}
.stat-down {
  color: #507ea9;
}
.team-portrait {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
}
.team-portrait img {
  width: 38px;
  height: 38px;
}
.teammate-row {
  min-height: 60px;
  background: #f7f9fa;
}
.teammate-row:hover {
  background: var(--teal-soft);
}
.stat-name small {
  display: block;
  color: var(--muted);
  font-size: 10px;
}
.row-arrow {
  color: #78968b;
}
.spread-table-wrap {
  width: 100%;
  overflow-x: auto;
}
.spread-table {
  border-collapse: collapse;
  width: 100%;
  text-align: center;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.spread-table th {
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
}
.spread-table td,
.spread-table th {
  padding: 11px 4px;
  border-bottom: 1px solid #edf2f3;
}
.spread-table thead th {
  background: #f5f8f9;
  font-size: 9px;
}
.spread-table tbody td:last-child {
  font-size: 11px;
  font-weight: 700;
}
.spread-table .max-point {
  color: var(--teal);
  font-weight: 800;
}
.spread-table .zero-point {
  color: #a2aeb3;
}
.detail-source {
  border-top: 1px solid var(--line);
  padding: 15px 27px;
  font-size: 10px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 15px;
  align-items: start;
  flex-wrap: wrap;
}
.detail-source strong {
  font-weight: 550;
  margin-left: 5px;
}
.detail-source details {
  max-width: 100%;
  text-align: right;
}
.detail-source details[open] {
  flex-basis: 100%;
  text-align: left;
}
.detail-source summary {
  cursor: pointer;
  min-height: 24px;
}
.detail-source p {
  margin: 4px 0;
}
.empty-state {
  text-align: center;
  padding: 55px 14px;
  color: var(--muted);
  font-size: 12px;
}
.empty-state h3 {
  font-size: 14px;
  color: var(--ink);
  margin: 12px 0 6px;
}
.empty-state p {
  margin: 8px 0;
}
.empty-symbol {
  font-size: 32px;
  color: #8ca79e;
}
.error-detail {
  font-size: 10px;
  overflow-wrap: anywhere;
}
.primary-button {
  background: var(--teal);
  color: white;
  border-radius: 9px;
  padding: 11px 20px;
  margin-top: 15px;
  font-weight: 700;
}
.loading-ring {
  display: block;
  margin: 0 auto 20px;
  width: 26px;
  height: 26px;
  border: 2px solid #dcece5;
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.footer {
  border-top: 1px solid var(--line);
  padding: 24px 0 30px;
  margin-top: 40px;
  color: #8a9ba1;
  font-size: 10px;
  line-height: 1.8;
}
.footer > span {
  font-size: 9px;
  letter-spacing: 1.2px;
  font-weight: 700;
  color: #82969d;
}
.footer p {
  margin: 4px 0;
}
.footer a {
  color: #6a8586;
}
.version {
  color: #a6b2b6;
  letter-spacing: 0;
  margin-left: 5px;
}
.toast {
  position: fixed;
  bottom: max(25px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  background: #172b35;
  color: white;
  font-size: 12px;
  border-radius: 12px;
  padding: 14px 22px;
  box-shadow: 0 6px 30px #172b3530;
  max-width: 90vw;
  width: max-content;
}
.muted {
  color: var(--muted);
  font-size: 12px;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 20px;
  max-width: 520px;
  width: calc(100% - 32px);
  padding: 26px;
  color: var(--ink);
  max-height: 85dvh;
  box-shadow: 0 20px 100px #102c3030;
}
dialog::backdrop {
  background: #142f3b65;
  backdrop-filter: blur(4px);
}
.dialog-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.dialog-heading h2 {
  font-size: 19px;
}
dialog h3 {
  font-size: 13px;
  margin: 20px 0 6px;
}
dialog p {
  font-size: 12px;
  line-height: 1.9;
  margin: 8px 0;
}
dialog .icon-button {
  border: 0;
  font-size: 25px;
}
@media (min-width: 761px) {
  .ranking {
    max-height: 720px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #dbe6e7 transparent;
  }
  .pokemon-row {
    margin-right: 3px;
  }
}
@media (max-width: 1000px) and (min-width: 761px) {
  .workspace {
    grid-template-columns: 310px minmax(0, 1fr);
    gap: 18px;
  }
  .page,
  .header-inner {
    padding-left: 24px;
    padding-right: 24px;
  }
  .intro-note {
    display: none;
  }
  .pokemon-hero {
    padding: 22px;
    min-height: 180px;
  }
  .hero-art {
    width: 110px;
    height: 110px;
  }
  .hero-portrait {
    width: 105px;
    height: 105px;
  }
  .hero-copy h2 {
    font-size: 24px;
  }
  .detail-tabs {
    grid-template-columns: repeat(3, 1fr);
  }
  .detail-tabs button {
    min-height: 42px;
  }
  .category-content {
    padding: 20px;
  }
  .source-kind {
    display: none;
  }
  .toolbar {
    gap: 14px;
  }
  .format-switch button {
    padding: 8px 15px;
  }
}
@media (max-width: 760px) {
  .header-inner {
    height: 68px;
    padding: 0 20px;
  }
  .brand {
    font-size: 12px;
    gap: 9px;
    letter-spacing: 1.4px;
  }
  .brand img {
    width: 32px;
    height: 32px;
  }
  .brand-sub {
    font-size: 8px;
    letter-spacing: 3px;
  }
  .header-actions {
    gap: 8px;
  }
  .icon-button {
    height: 36px;
    min-width: 36px;
    font-size: 16px;
  }
  .refresh-button {
    width: 38px;
    height: 38px;
    justify-content: center;
    padding: 0;
    border-radius: 11px;
  }
  .refresh-label {
    display: none;
  }
  .page {
    padding: 0 18px;
  }
  .intro {
    padding: 28px 3px 24px;
  }
  .intro h1 {
    font-size: 28px;
    letter-spacing: -1.5px;
  }
  .intro .eyebrow {
    font-size: 8px;
    letter-spacing: 1.9px;
    margin-bottom: 9px;
  }
  .intro-copy {
    font-size: 12px;
    margin-top: 10px;
  }
  .intro-note {
    display: none;
  }
  .toolbar {
    gap: 12px;
    padding: 14px 0 12px;
    margin-bottom: 18px;
    justify-content: space-between;
  }
  .format-switch button {
    padding: 8px 13px;
    font-size: 12px;
    gap: 7px;
    min-height: 40px;
  }
  .season-control {
    gap: 4px;
  }
  .season-control > span {
    display: none;
  }
  .season-control select {
    font-size: 12px;
    max-width: 130px;
    padding-right: 13px;
  }
  .source-status {
    flex-basis: 100%;
    margin-left: 3px;
  }
  .source-chip {
    min-height: 23px;
    font-size: 10px;
  }
  .source-kind {
    font-size: 9px;
  }
  .workspace {
    display: block;
    min-height: 400px;
  }
  .list-panel {
    padding: 19px 15px 12px;
    border-radius: 16px;
  }
  :root {
    --heading-gap: 15px;
  }
  .list-heading h2 {
    font-size: 16px;
  }
  .search-box {
    height: 46px;
  }
  .search-box input {
    font-size: 13px;
  }
  .search-box kbd {
    display: none;
  }
  .pokemon-select {
    min-height: 85px;
    gap: 12px;
  }
  .pokemon-info strong {
    font-size: 14px;
  }
  .type-badge {
    font-size: 10px;
  }
  .rank {
    font-size: 15px;
    width: 27px;
  }
  .portrait-wrap {
    width: 57px;
    height: 57px;
  }
  .favorite-button {
    min-width: 40px;
    height: 46px;
  }
  .pokemon-select {
    width: calc(100% - 40px);
  }
  .detail-panel {
    display: none;
    position: static;
    border-radius: 16px;
  }
  .detail-open .intro {
    display: none;
  }
  .detail-open .toolbar {
    border-top: 0;
    margin-bottom: 0;
    padding-top: 14px;
    padding-bottom: 14px;
  }
  .detail-open .list-panel {
    display: none;
  }
  .detail-open .detail-panel {
    display: block;
  }
  .detail-open .detail-mobile-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 3px 13px;
    background: #fff;
  }
  .detail-mobile-nav > span {
    font-size: 10px;
    color: var(--muted);
  }
  .detail-mobile-nav .text-button {
    font-size: 12px;
  }
  .pokemon-hero {
    padding: 24px 20px;
    min-height: 185px;
    gap: 7px;
  }
  .hero-copy h2 {
    font-size: 26px;
  }
  .hero-art {
    width: 120px;
    height: 120px;
  }
  .hero-portrait {
    width: 114px;
    height: 114px;
  }
  .hero-art:after {
    inset: -4px;
  }
  .hero-favorite {
    top: 3px;
    right: 4px;
  }
  .english-name {
    font-size: 10px;
  }
  .detail-tabs {
    grid-template-columns: repeat(3, 1fr);
    padding: 8px 12px;
    gap: 4px;
    border-bottom: 1px solid var(--line);
  }
  .detail-tabs button {
    min-height: 42px;
    padding: 8px 2px;
    font-size: 12px;
    border: 0;
    border-radius: 8px;
  }
  .detail-tabs button[aria-selected='true'] {
    background: var(--teal-soft);
  }
  .category-content {
    padding: 21px 16px 18px;
    min-height: 320px;
  }
  .category-heading {
    margin-bottom: 14px;
  }
  .stat-row {
    padding: 10px;
    gap: 10px;
    min-height: 45px;
  }
  .stat-name strong {
    font-size: 13px;
  }
  .stat-percent {
    font-size: 13px;
  }
  .stat-adjust {
    font-size: 10px;
  }
  .category-tip {
    font-size: 10px;
  }
  .detail-source {
    padding: 14px 17px;
    font-size: 9px;
  }
  .spread-table th,
  .spread-table td {
    padding: 12px 2px;
  }
  .spread-table {
    font-size: 12px;
  }
  .spread-table thead th {
    font-size: 9px;
  }
  .spread-table tbody td:last-child {
    font-size: 10px;
  }
  .footer {
    margin-top: 28px;
    padding-bottom: calc(25px + env(safe-area-inset-bottom));
    font-size: 9px;
  }
  .notice {
    font-size: 11px;
    padding: 10px 12px;
    margin-top: 14px;
  }
  .header-actions .text-button {
    font-size: 10px;
    padding: 2px;
  }
  .loading-ring {
    width: 23px;
    height: 23px;
  }
}
@media (max-width: 360px) {
  .page {
    padding: 0 12px;
  }
  .header-inner {
    padding: 0 14px;
  }
  .format-switch button {
    padding: 8px 11px;
  }
  .hero-art {
    width: 98px;
    height: 98px;
  }
  .hero-portrait {
    width: 95px;
    height: 95px;
  }
  .hero-copy h2 {
    font-size: 23px;
  }
  .hero-copy .english-name span {
    display: none;
  }
  .category-content {
    padding: 18px 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* Battle reference, discoverability and shared theme surfaces. */
.theme-select {
  font-size: 11px;
  max-width: 105px;
  padding: 6px;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--white);
}
.ranking-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
  margin: 0 0 8px;
}
.ranking-controls label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  color: var(--muted);
  background: var(--bg);
  border-radius: 8px;
  padding: 0 8px;
}
.ranking-controls select {
  font-size: 11px;
  width: 100%;
  min-width: 0;
  padding: 6px 0;
  max-width: none;
}
.order-button {
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 12px;
  min-height: 44px;
}
.filter-hint {
  font-size: 9px;
  color: var(--muted);
  margin: 6px 0 12px;
}
.detail-tabs {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.detail-tabs button {
  min-height: 44px;
}
.effect-link {
  padding: 1px 7px;
  text-align: left;
  font: inherit;
  color: inherit;
  min-height: 26px;
  max-width: 100%;
  line-height: 1.5;
}
.effect-link > span {
  color: var(--teal);
  font-size: 10px;
}
.effect-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.effect-description {
  white-space: pre-line;
  font-size: 15px;
  line-height: 1.9;
}
.effect-metrics {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  padding: 14px 0;
  border-block: 1px solid var(--line);
  font-size: 12px;
}
.effect-metrics > span:not(.type-badge) {
  padding: 3px 7px;
  background: var(--bg);
  border-radius: 5px;
}
.reference-credit {
  font-size: 10px !important;
  line-height: 1.7 !important;
  color: var(--muted);
  margin-top: 18px !important;
  overflow-wrap: anywhere;
}
.reference-heading {
  margin-top: 17px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.reference-heading h4 {
  font-size: 18px;
  margin: 0;
}
.reference-heading .type-list {
  margin: 0;
}
.dimensions {
  display: flex;
  gap: 24px;
  padding: 14px 0;
  font-size: 12px;
  color: var(--muted);
}
.dimensions strong {
  font-weight: 600;
  color: var(--ink);
  margin-left: 4px;
}
.reference-abilities {
  border-block: 1px solid var(--line);
  padding: 12px 0;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13px;
}
.reference-abilities h4 {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}
.form-switch {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.form-switch button,
.segmented button {
  padding: 9px 11px;
  font-size: 12px;
  min-height: 40px;
  border-radius: 8px;
  color: var(--muted);
}
/* 잠긴 탭. 눌러도 되는 것처럼 보이면 눌러보고 아무 일도 없는 쪽이 더 헷갈린다. */
.segmented button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.form-switch button {
  border: 1px solid var(--line);
}
.form-switch button[aria-pressed='true'],
.segmented button[aria-pressed='true'] {
  background: var(--teal-soft);
  color: var(--teal);
  font-weight: 700;
}
.segmented {
  display: inline-flex;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 3px;
  gap: 3px;
}
.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 20px 0 14px;
}
.section-title h4 {
  margin: 0;
  font-size: 14px;
}
.base-stats > div {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 12px;
  align-items: center;
  margin: 8px 0;
  font-size: 12px;
}
.base-stat-track {
  background: var(--bg);
  border-radius: 5px;
  position: relative;
  height: 26px;
  overflow: hidden;
}
.base-stat-track > span {
  position: absolute;
  inset: 0 auto 0 0;
  background: var(--teal-soft);
  border-right: 3px solid var(--teal);
}
.base-stat-track > b {
  position: relative;
  z-index: 1;
  padding-left: 9px;
  line-height: 26px;
}
.stat-total {
  border-top: 1px solid var(--line);
  padding-top: 7px;
}
.actual-stats th,
.actual-stats td {
  font-size: 12px !important;
}
.reference-section {
  font-size: 14px;
  margin: 24px 0 3px;
}
.matchup-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 12px;
}
.matchup-group h5 {
  width: 100%;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}
.matchup {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 5px 8px;
  font-size: 12px;
}
.matchup .type-badge {
  font-size: 11px;
}
.neutral-types {
  margin-top: 14px;
  font-size: 11px;
  color: var(--muted);
}
summary {
  cursor: pointer;
}
.learnset-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
}
.learnset-controls input {
  grid-column: 1/-1;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--bg);
  color: var(--ink);
  padding: 11px;
  font-size: 13px;
  width: 100%;
  min-width: 0;
}
.learnset-controls select {
  max-width: 100%;
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 12px;
}
.move-table-wrap {
  overflow-x: auto;
}
.move-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  text-align: left;
}
.move-table th {
  font-size: 10px;
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}
.move-table td,
.move-table th {
  padding: 10px 5px;
  border-bottom: 1px solid var(--line);
}
.move-table td:not(:first-child) {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  text-align: center;
}
.move-table th:not(:first-child) {
  text-align: center;
}
.move-table td:first-child {
  width: 45%;
}
.move-table .effect-link {
  font-weight: 650;
}
.move-table .type-badge {
  font-size: 9px;
}
.spread-mode {
  margin-bottom: 10px;
}
.grouping-rule {
  margin: 0 0 15px;
}
.spread-groups > details {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 13px;
  margin-bottom: 10px;
  overflow: hidden;
}
.spread-groups summary {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3px;
}
.spread-groups summary > strong {
  font-size: 15px;
}
.spread-groups summary > span {
  font-size: 14px;
  font-weight: 650;
}
.spread-groups summary > small {
  grid-column: 1/-1;
  font-size: 11px;
  color: var(--muted);
}
.spread-groups details[open] summary {
  margin-bottom: 10px;
}
.point-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.point-tags span {
  background: var(--teal-soft);
  color: var(--teal);
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 11px;
}
:root[data-theme='dark'] {
  color-scheme: dark;
  --ink: #e0eaed;
  --muted: #9bafb7;
  --line: #304149;
  --teal: #64d7be;
  --teal-soft: #193e35;
  --bg: #10191e;
  --white: #19262d;
}
[data-theme='dark'] .detail-panel {
  background: var(--white);
}
.ranking-controls {
  gap: 12px 10px;
  margin-bottom: 12px;
}
.ranking-controls label,
.ranking-controls .order-control {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 5px;
  padding: 0;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}
.ranking-controls select,
.ranking-controls .order-button,
.builds-sort select,
.builds-sort .order-button {
  height: 44px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 600;
  text-align: left;
  background: var(--bg);
  color: var(--ink);
}
.ranking-controls .order-button,
.builds-sort .order-button {
  text-align: center;
}
.ranking-controls label:focus-within,
.builds-sort label:focus-within {
  color: var(--teal);
}
.ranking-controls label,
.ranking-controls .order-control,
.builds-sort label,
.builds-sort .order-control {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 5px;
  padding: 0;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}
select {
  background-color: var(--white);
  color: var(--ink);
}
select option,
select optgroup {
  background-color: var(--white);
  color: var(--ink);
}
[data-theme='dark'] select,
[data-theme='dark'] select option,
[data-theme='dark'] select optgroup {
  color-scheme: dark;
  background-color: #19262d;
  color: #e0eaed;
}
[data-theme='dark'] .ranking-controls select,
[data-theme='dark'] .ranking-controls .order-button {
  background-color: #202f37;
}
[data-theme='light'] select,
[data-theme='light'] select option,
[data-theme='light'] select optgroup {
  color-scheme: light;
  background-color: #fff;
  color: #172b35;
}
.dex-number {
  display: block;
  font-size: 10px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  margin-bottom: 2px;
}
.item-art {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  background: #edf2f3;
  border-radius: 8px;
  vertical-align: middle;
}
.item-image {
  width: 30px;
  height: 30px;
  object-fit: contain;
  image-rendering: pixelated;
}
.item-fallback {
  font-size: 22px;
  color: var(--muted);
}
.effect-item-art .item-art {
  width: 56px;
  height: 56px;
}
.effect-item-art .item-image {
  width: 48px;
  height: 48px;
}
[data-theme='dark'] .item-art {
  background: #354b55;
}
.hero-image-fallback {
  position: absolute;
  font-size: 11px;
  color: var(--muted);
}
[data-theme='dark'] .header {
  background: #19262df5;
}
[data-theme='dark'] .format-switch {
  background: #23353d;
}
[data-theme='dark'] .format-switch button[aria-pressed='true'] {
  background: #354b55;
  color: var(--ink);
}
[data-theme='dark'] .search-box,
[data-theme='dark'] .stat-row,
[data-theme='dark'] .spread-table thead th {
  background: #202f37;
  border-color: var(--line);
}
[data-theme='dark'] .pokemon-row {
  border-color: #283941;
}
[data-theme='dark'] .pokemon-row:hover,
[data-theme='dark'] .load-more {
  background: #243c40;
}
[data-theme='dark'] .pokemon-row.selected {
  background: var(--teal-soft);
}
[data-theme='dark'] .portrait-wrap {
  background: #293b43;
}
[data-theme='dark'] .selected .portrait-wrap {
  background: #315949;
}
[data-theme='dark'] .count {
  background: #304149;
  color: #c0cfd4;
}
[data-theme='dark'] .pokemon-hero {
  background: linear-gradient(120deg, #213e36, #233b4a);
}
[data-theme='dark'] .hero-art {
  background: radial-gradient(circle, #e5f2ff18 55%, transparent 56%);
}
[data-theme='dark'] .hero-art:after {
  border-color: #adc7d327;
}
[data-theme='dark'] .rank-pill {
  background: #21352f;
  border-color: #43665b;
}
[data-theme='dark'] .detail-mobile-nav {
  background: var(--white);
}
[data-theme='dark'] .stat-bar {
  background: #223f34;
  border-color: #477662;
}
[data-theme='dark'] .stat-rank {
  color: #abd1c3;
}
[data-theme='dark'] .spread-table td,
[data-theme='dark'] .spread-table th {
  border-color: var(--line);
}
[data-theme='dark'] .notice {
  background: #3b3020;
  border-color: #705c30;
  color: #edd8a4;
}
[data-theme='dark'] .refresh-button {
  background: #c0e6d9;
  color: #17352c;
}
[data-theme='dark'] .primary-button {
  background: #2d9a80;
  color: white;
}
[data-theme='dark'] .stat-up {
  color: #ffaba6;
}
[data-theme='dark'] .stat-down {
  color: #92beef;
}
[data-theme='dark'] .stat-name small,
[data-theme='dark'] .list-filter,
[data-theme='dark'] .english-name,
[data-theme='dark'] .english-name span,
[data-theme='dark'] .footer,
[data-theme='dark'] .footer a,
[data-theme='dark'] .intro-note {
  color: var(--muted);
}
[data-theme='dark'] .favorite-button[aria-pressed='true'] {
  color: #f3c967;
}
[data-theme='dark'] dialog {
  background: var(--white);
}
[data-theme='dark'] .skip-link {
  background: var(--white);
}
[data-theme='dark'] .search-box input::placeholder {
  color: #a7bac3;
}
@media (max-width: 760px) {
  .theme-select {
    max-width: 83px;
    font-size: 10px;
    min-height: 36px;
    padding: 3px;
  }
  .header-inner {
    padding-inline: 14px;
  }
  .header-actions {
    gap: 5px;
  }
  .brand {
    gap: 6px;
    letter-spacing: 1px;
  }
  .brand-sub {
    letter-spacing: 2.5px;
  }
  .detail-tabs {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding: 8px;
    gap: 3px;
  }
  .detail-tabs button {
    font-size: 11px;
    min-height: 44px;
    white-space: normal;
    line-height: 1.3;
  }
  .ranking-controls {
    gap: 7px;
  }
  .reference-abilities {
    gap: 10px;
  }
  .move-table {
    font-size: 11px;
  }
  .move-table td,
  .move-table th {
    padding: 9px 3px;
  }
  .move-table .effect-link {
    font-size: 12px;
  }
  .spread-groups > details {
    padding: 10px;
  }
  .effect-description {
    font-size: 14px;
  }
  .form-switch button {
    padding: 8px 10px;
  }
  .dimensions {
    gap: 20px;
  }
  .header-actions #install {
    display: none;
  }
}

/* Compact controls and section boundaries. */
.header-actions {
  gap: 8px;
}
.theme-select {
  min-width: 112px;
  max-width: none;
  padding-inline: 10px;
  min-height: 44px;
}
.refresh-button {
  justify-content: center;
  min-width: 44px;
  height: 44px;
}
.refresh-button .refresh-glyph {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}
.refresh-glyph svg {
  display: block;
}
.header-actions .icon-button {
  width: 44px;
  height: 44px;
}
.header-actions #install {
  white-space: nowrap;
}
.ranking-controls {
  grid-template-columns: minmax(0, 1fr) 100px 44px;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
}
.ranking-controls select {
  width: 100%;
  max-width: none;
  min-width: 0;
}
.ranking-controls .order-button {
  font-size: 11px;
  padding-inline: 6px;
}
.filter-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--bg);
  color: var(--ink);
  flex-shrink: 0;
}
.filter-badge {
  position: absolute;
  right: -4px;
  top: -6px;
  display: grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  font-size: 10px;
  font-weight: 800;
  border-radius: 12px;
  background: var(--teal);
  color: var(--white);
}
.active-filter-summary {
  font-size: 11px;
  color: var(--teal);
  margin: 4px 0 12px;
}
.learnset-controls {
  grid-template-columns: minmax(0, 1fr) 44px;
}
.learnset-controls input {
  grid-column: auto;
  min-height: 44px;
}
.learnset-controls .filter-button {
  align-self: center;
}
#filter-dialog {
  width: min(440px, calc(100vw - 28px));
  max-height: 85dvh;
  overflow: auto;
}
#filter-fields {
  display: grid;
  gap: 18px;
}
#filter-fields label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 13px;
  color: var(--muted);
}
#filter-fields select {
  border: 1px solid var(--line);
  border-radius: 9px;
  width: 100%;
  max-width: none;
  min-height: 46px;
  padding: 8px 12px;
  color: var(--ink);
}
#filter-fields .filter-checkbox {
  flex-direction: row;
  align-items: center;
  min-height: 44px;
  color: var(--ink);
}
.filter-checkbox input {
  width: 18px;
  height: 18px;
  accent-color: var(--teal);
}
.filter-actions {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 24px;
}
.filter-actions button {
  min-width: 86px;
  min-height: 44px;
}
.reference-block {
  padding: 22px 0;
}
.reference-block + .reference-block {
  border-top: 1px solid var(--line);
}
.reference-block .reference-heading {
  margin-top: 0;
}
.reference-block .dimensions {
  padding-bottom: 0;
}
.reference-block .reference-abilities {
  border: 0;
  padding: 0;
}
.reference-block .section-title {
  margin: 0 0 16px;
}
.reference-block .reference-section {
  margin: 0 0 10px;
}
.reference-block .stat-total {
  border: 0;
  padding-top: 10px;
}
.reference-block .spread-table tbody tr:last-child > * {
  border-bottom: 0;
}
.reference-block .matchup-group {
  align-items: flex-start;
  gap: 8px;
}
.matchup {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 116px;
  padding: 8px;
  border-radius: 9px;
}
.matchup-base {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.matchup-alternative {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 4px 6px;
  border-radius: 5px;
  background: var(--teal-soft);
  color: var(--teal);
  font-size: 11px;
}
.matchup-alternative .effect-link {
  min-height: 24px;
}
.matchup-alternative b {
  white-space: nowrap;
}
.neutral-types {
  margin-top: 18px;
}
.percentage-prominent {
  display: inline-block;
  color: #633c07;
  font-weight: 800 !important;
  background: #ffedb8;
  box-shadow: 0 0 0 1px #d8ac4c;
  border-radius: 5px;
  padding: 2px 5px;
  font-variant-numeric: tabular-nums;
}
.stat-percent.percentage-prominent {
  font-size: 15px;
}
.spread-table .percentage-prominent {
  padding-inline: 3px;
}
[data-theme='dark'] .filter-button {
  background: #202f37;
}
.season-control select {
  max-width: none;
  border-radius: 8px;
}
.detail-tabs {
  border-top: 1px solid var(--line);
}
@media (max-width: 760px) {
  .detail-open .toolbar {
    border-bottom: 0;
    margin-bottom: 16px;
  }
  .theme-select {
    min-width: 104px;
    max-width: none;
    min-height: 44px;
    font-size: 11px;
    padding-inline: 9px;
  }
  .header-inner {
    height: auto;
    min-height: 72px;
    padding-block: 10px;
    gap: 8px;
    flex-wrap: wrap;
  }
  .header-actions {
    gap: 6px;
  }
  .header-actions #install:not([hidden]) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 50px;
    min-height: 44px;
    font-size: 10px;
  }
  .header-actions .refresh-button {
    padding: 0;
    width: 44px;
  }
  .ranking-controls {
    gap: 7px;
  }
  .season-control select {
    font-size: 11px;
  }
  .reference-block {
    padding: 20px 0;
  }
  .matchup {
    min-width: 112px;
  }
  .stat-percent.percentage-prominent {
    font-size: 14px;
  }
}
@media (max-width: 480px) {
  .brand > span {
    display: none;
  }
  .header-inner {
    justify-content: space-between;
  }
  .header-actions {
    margin-left: auto;
  }
  .season-control select {
    max-width: none;
    min-width: 158px;
  }
  .toolbar .format-switch button {
    padding-inline: 12px;
  }
}
.season-control select {
  min-width: 168px;
  padding-inline: 10px 25px;
}
.effect-link {
  text-decoration: underline;
  text-decoration-style: dotted;
  text-decoration-color: var(--muted);
  text-underline-offset: 5px;
  text-decoration-thickness: 1px;
  border-radius: 4px;
  transition:
    background 0.15s,
    color 0.15s;
}
.effect-link:hover,
.effect-link:focus-visible {
  color: var(--teal);
  background: var(--teal-soft);
  text-decoration-style: solid;
}
.effect-link:active {
  opacity: 0.7;
}
.reference-block .dimensions {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.english-name [lang] {
  margin-left: 0;
  color: inherit;
}
.japanese-name {
  font-size: 11px;
  color: var(--muted);
  margin: 2px 0 0;
  overflow-wrap: anywhere;
}
.effect-names {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  font-size: 12px;
  color: var(--muted);
  margin: 2px 0 16px;
  overflow-wrap: anywhere;
}
.move-traits {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 14px 0;
}
.move-traits > span {
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: 6px;
  padding: 3px 9px;
  font-size: 12px;
  color: var(--muted);
}
[data-theme='dark'] .percentage-prominent {
  background: #ffe6a4;
  color: #4b2d00;
  box-shadow: 0 0 0 1px #e6c47b;
}
.grouping-rule {
  margin: 16px 0 0;
}
@media (max-width: 480px) {
  .toolbar {
    column-gap: 8px;
  }
  .toolbar .format-switch button {
    padding-inline: 10px;
  }
  .format-switch button > span {
    display: none;
  }
  .season-control select {
    min-width: 158px;
  }
}
#effect-dialog .dialog-heading {
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 22px;
}
#effect-heading {
  min-width: 0;
}
#effect-title {
  line-height: 1.4;
  margin: 0;
}
#effect-dialog .effect-names {
  margin: 4px 0 0;
  gap: 3px 12px;
}
#effect-dialog #close-effect {
  flex-shrink: 0;
}
.effect-item-art {
  margin: 0 0 12px;
}
.move-traits {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.detail-navigation {
  display: flex;
  align-items: center;
  gap: 4px;
}
.detail-navigation #previous-pokemon {
  color: var(--muted);
}
.detail-navigation #previous-pokemon:not([hidden]) + #back {
  margin-left: 4px;
}
.filter-group {
  border: 1px solid var(--line);
  border-radius: 11px;
  min-width: 0;
  overflow: hidden;
}
.filter-group > summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 13px 12px;
  min-height: 52px;
  list-style: none;
}
.filter-group > summary::-webkit-details-marker {
  display: none;
}
/* Drawn instead of ⌄/⌃: those glyphs sit at opposite ends of their em box, so the
   marker dropped below the summary text when closed and rose above it when open.
   A rotated corner keeps one shape, and the two states are mirrors of each other.
   Rotation alone leaves the ink off-centre, so each state shifts back by the same
   amount in opposite directions. */
.filter-group > summary:after {
  content: '';
  display: block;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: translateY(-35%) rotate(45deg);
  transition: transform 0.15s ease;
}
.filter-group[open] > summary:after {
  transform: translateY(35%) rotate(225deg);
}
.filter-group > summary strong {
  font-size: 13px;
}
.filter-group > summary span {
  font-size: 11px;
  color: var(--muted);
  text-align: right;
  overflow-wrap: anywhere;
}
.filter-group[open] > summary {
  border-bottom: 1px solid var(--line);
}
.filter-group fieldset {
  border: 0;
  padding: 12px;
  margin: 0;
  min-width: 0;
}
.filter-group fieldset:disabled {
  opacity: 0.55;
}
.filter-mode {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 12px;
}
.filter-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
#filter-fields .filter-mode label,
#filter-fields .filter-choices label {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  min-height: 42px;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 11px;
  line-height: 1.4;
  color: var(--ink);
  cursor: pointer;
  background: var(--bg);
}
#filter-fields .filter-mode label {
  justify-content: center;
}
#filter-fields .filter-mode label:has(input:checked),
#filter-fields .filter-choices label:has(input:checked) {
  background: var(--teal-soft);
  border-color: var(--teal);
  color: var(--teal);
}
.filter-mode input,
.filter-choices input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--teal);
  flex-shrink: 0;
}
.filter-group-clear {
  font-size: 11px;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  min-height: 40px;
  padding: 8px 3px;
  margin-top: 4px;
}
#filter-fields .filter-help {
  margin: 0;
  line-height: 1.7;
  font-size: 11px;
}
#filter-dialog[open] {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}
#filter-form {
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: calc(85dvh - 2px);
  width: 100%;
}
#filter-form .dialog-heading {
  flex-shrink: 0;
  margin: 0;
  padding: 22px 26px 10px;
}
#filter-fields {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow-y: auto;
  padding: 12px 26px 20px;
  overscroll-behavior: contain;
}
#filter-fields > * {
  flex-shrink: 0;
}
#filter-fields .filter-footer-note .category-tip {
  margin: 4px 0 0;
}
#filter-form .filter-actions {
  flex-shrink: 0;
  align-items: center;
  margin: 0;
  padding: 12px 26px;
  border-top: 1px solid var(--line);
  background: var(--white);
}
#filter-form .filter-actions .primary-button {
  margin-top: 0;
}

#current-source-times {
  white-space: pre-line;
}

/* Standalone move, item and ability index. */
/* The ranking sits under the toolbar's rule; these views hide the toolbar, so they
   draw the same line to keep the separation from the intro. */
.dex-panel,
.type-chart-panel,
.articles-panel {
  border-top: 1px solid var(--line);
  padding-top: 17px;
}
.dex-panel {
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 17px 0 24px;
}
/* 그리드라 제목 아래에도 gap 12px이 붙는다. 다른 화면과 같은 간격이 되도록 뺀다. */
.dex-panel .list-heading {
  margin-bottom: calc(var(--heading-gap) - 12px);
}
.dex-panel #dex-kinds .segmented {
  width: 100%;
}
.dex-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.dex-list {
  display: grid;
  gap: 8px;
}
.dex-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  padding: 12px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
}
.dex-row:hover {
  border-color: var(--teal);
}
.dex-row .item-art {
  grid-row: span 2;
}
.dex-name {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.dex-name strong {
  font-size: 14px;
}
.dex-name span {
  font-size: 11px;
  color: var(--muted);
}
.dex-effect {
  grid-column: 2;
  font-size: 12px;
  color: var(--muted);
  white-space: pre-line;
}
.dex-row:not(:has(.item-art)) {
  grid-template-columns: minmax(0, 1fr);
}
.dex-row:not(:has(.item-art)) .dex-effect {
  grid-column: 1;
}
.category-nav {
  display: flex;
  gap: 8px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px 10px;
  overflow-x: auto;
}
.category-nav button {
  flex-shrink: 0;
  white-space: nowrap;
  min-height: 44px;
  min-width: 88px;
  padding: 8px 20px;
  border: 0;
  border-radius: 10px;
  color: var(--muted);
  background: transparent;
  font-weight: 700;
}
.category-nav button[aria-pressed='true'] {
  color: var(--teal);
  background: var(--teal-soft);
  box-shadow: inset 0 -2px var(--teal);
}
.dex-search-mode,
.catalog-availability {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}
.catalog-availability {
  margin: 16px 0;
  justify-content: space-between;
}
.dex-search-mode select,
.catalog-availability select {
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.type-chart-panel {
  padding: 17px 0 24px;
  min-width: 0;
}
/* 위 여백은 제목 쪽 --heading-gap이 담당한다. 여기서 더하면 스피드 랭킹보다 벌어진다. */
.type-chart-switch {
  margin: 0 0 12px;
}
.type-chart-note,
.type-picker-help {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}
.type-picker-heading,
.selected-defense-types {
  display: flex;
  align-items: center;
  gap: 10px;
}
.type-picker-heading {
  justify-content: space-between;
  margin-top: 24px;
}

/* The same article cards fit both the full catalog and the narrow detail panel. */
.articles-panel {
  padding-bottom: 24px;
  min-width: 0;
}
.article-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 22px 0 12px;
}
.article-controls label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  flex: 1 1 145px;
  min-width: 0;
}
.article-controls .article-search-label {
  flex: 2 1 240px;
}
.article-controls select,
.article-controls input {
  width: 100%;
  max-width: none;
  min-width: 0;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  color: var(--ink);
  padding: 10px 12px;
  font-size: 14px;
}
.article-count {
  color: var(--muted);
  font-size: 12px;
  margin: 18px 0 12px;
}
.article-pokemon-filter {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.article-list {
  display: grid;
  gap: 18px;
}
.team-article {
  min-width: 0;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}
.article-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.article-rank {
  color: var(--teal);
  background: var(--teal-soft);
  border-radius: 7px;
  padding: 3px 9px;
}
.article-meta > span {
  color: var(--muted);
  font-size: 12px;
  margin-left: auto;
}
.article-party {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(125px, 1fr));
  list-style: none;
  margin: 0;
  padding: 14px;
  gap: 8px;
}
.article-party li {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: start;
  gap: 5px;
  min-width: 0;
  padding: 8px 4px;
  border-radius: 10px;
  text-align: center;
}
.article-member-selected {
  background: var(--teal-soft);
  box-shadow: inset 0 0 0 1px var(--teal);
}
.article-party strong {
  font-size: 13px;
  overflow-wrap: anywhere;
}
.article-pokemon-art {
  display: grid;
  place-items: center;
  width: 76px;
  height: 72px;
}
.article-pokemon-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.article-image-fallback {
  color: var(--muted);
  font-size: 30px;
}
.article-party .article-item {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px 5px;
  gap: 3px;
  font-size: 11px;
  max-width: 100%;
  min-height: 36px;
}
.article-item .item-art {
  flex-shrink: 0;
}
.article-footer {
  padding: 14px 16px;
  border-top: 1px solid var(--line);
}
.article-footer a {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  text-decoration: none;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.article-footer a:hover {
  text-decoration: underline;
}
.article-open-label {
  margin-left: auto;
  white-space: nowrap;
  font-size: 12px;
}
.type-picker-heading + .type-picker-help {
  margin-top: 2px;
}
.type-picker-heading h3,
.type-defense-group h3 {
  margin: 0;
  font-size: 14px;
}
.type-picker-heading h3 span {
  margin-left: 8px;
  font-size: 12px;
}
.type-picker {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  max-width: 780px;
  margin: 16px 0 24px;
}
.type-picker button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 10px 12px;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
}
.type-picker button[aria-pressed='true'] {
  border-color: var(--teal);
  box-shadow: inset 0 0 0 1px var(--teal);
  background: var(--teal-soft);
}
.type-picker button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}
.type-selection-mark {
  color: var(--teal);
  font-size: 16px;
  font-weight: 700;
}
.type-defense-result {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--white);
}
.selected-defense-types {
  flex-wrap: wrap;
  font-weight: 700;
}
.type-defense-group {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.type-matrix-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  overscroll-behavior-y: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-top: 16px;
}
.type-matrix {
  width: 100%;
  min-width: 1084px;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}
.type-matrix th,
.type-matrix td {
  min-width: 56px;
  height: 44px;
  padding: 8px 6px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.type-matrix th {
  background: var(--white);
}
.type-matrix thead th {
  position: sticky;
  top: 0;
  z-index: 2;
}
.type-matrix tbody th,
.type-matrix thead .type-matrix-corner {
  position: sticky;
  left: 0;
  width: 76px;
  min-width: 76px;
  z-index: 1;
}
.type-matrix thead .type-matrix-corner {
  z-index: 3;
  font-size: 11px;
}
.type-cell-weak {
  background: color-mix(in srgb, #f59e0b 22%, var(--white));
  font-weight: 800;
}
.type-cell-resist {
  background: var(--teal-soft);
  color: var(--teal);
  font-weight: 700;
}
.type-cell-immune {
  background: color-mix(in srgb, var(--ink) 15%, var(--white));
  font-weight: 800;
}
.type-cell-neutral {
  color: var(--muted);
}
.type-matrix caption {
  padding: 10px;
  color: var(--muted);
  text-align: left;
  font-size: 11px;
}
@media (max-width: 760px) {
  .type-picker {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .type-defense-result {
    padding: 16px;
  }
}
@media (max-width: 760px) {
  .category-nav {
    padding-inline: 20px;
  }
  .category-nav button {
    min-width: 64px;
    padding-inline: 12px;
  }
}
/* 편집 화면은 스피드 랭킹과 같은 규칙을 따른다. 이름표는 컨트롤 위에 쌓고,
   컨트롤은 최소 높이 44px에 같은 테두리와 반지름을 쓴다(speed.css 참고). */
.builds-panel {
  border-top: 1px solid var(--line);
  padding: 17px 0 24px;
  min-width: 0;
}
.builds-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
  margin: 20px 0;
}
/* 단추 셋은 한 덩어리로 움직인다. 좁아지면 셋이 흩어지는 대신 통째로 아랫줄로
   내려가, 첫 줄은 검색만 남는다. */
.builds-buttons {
  display: flex;
  gap: 12px;
  flex: none;
}
/* .builds-import는 파일 입력을 감싼 label이다. button과 달리 글자를 스스로
   가운데에 두지 않아 혼자 위로 떠 보였다. */
.builds-controls .text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
/* 랭킹의 정렬 줄과 같은 모양을 쓴다(.ranking-controls). 기준 칸과 방향 단추의
   너비를 고정해, 고를 수 있는 기준이 둘뿐인 파티에서도 샘플과 같은 폭에서 줄이
   넘어간다. 글자 길이에 따라 넘어가는 자리가 달라지면 안 된다. */
/* 이름표가 붙은 칸만 키가 커진다. 아래를 맞춰야 세 조작의 높이가 나란히 선다. */
.builds-sort {
  flex: none;
  display: grid;
  grid-template-columns: 124px 104px 44px;
  align-items: end;
  gap: 8px;
}
.builds-sort select {
  width: 100%;
  max-width: none;
  min-width: 0;
}
.builds-search {
  flex: 1 1 230px;
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
}
.builds-controls input[type='search'] {
  min-height: 44px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 12px;
  color: var(--ink);
  background: var(--white);
  font-size: 14px;
}
.builds-editor {
  display: grid;
  gap: 16px;
  max-width: 560px;
  margin: 20px 0;
}
.builds-field {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
}
.builds-field input,
.builds-field textarea,
.builds-field select {
  min-height: 44px;
  width: 100%;
  /* 전역 select가 max-width를 180px로 묶는다. 스피드·구축기사 화면과 같이 푼다. */
  max-width: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 12px;
  color: var(--ink);
  background: var(--white);
  font: inherit;
  font-size: 14px;
}
.builds-field textarea {
  min-height: 0;
  resize: vertical;
  line-height: 1.5;
}
/* 창을 여는 버튼도 입력 칸처럼 보여야 한 줄에 뭉치지 않는다. */
.builds-pick {
  min-height: 44px;
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 12px;
  color: var(--ink);
  background: var(--white);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}
.builds-pick:hover {
  border-color: var(--teal);
}
.builds-editor fieldset {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 16px 16px;
  margin: 0;
  min-width: 0;
}
.builds-editor legend {
  color: var(--muted);
  font-size: 12px;
  padding-inline: 6px;
}
.builds-editor fieldset ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.builds-editor fieldset li {
  display: flex;
  align-items: center;
  gap: 8px;
}
.builds-editor fieldset li .builds-pick {
  flex: 1;
}
.builds-alts li > span {
  flex: 1;
  color: var(--ink);
  font-size: 14px;
}
.builds-slot {
  width: 18px;
  flex: none;
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.builds-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}
/* 랭킹과 같은 이미지를 이름 옆에 둔다. 자료가 없으면 portrait가 자리 표시를
   내놓으므로 줄이 흔들리지 않는다. */
.builds-portrait,
.picker-portrait {
  width: 40px;
  height: 40px;
  flex: none;
  object-fit: contain;
}
.builds-open .no-portrait,
.picker-row .no-portrait {
  width: 40px;
  flex: none;
  text-align: center;
  color: var(--muted);
}
.builds-text,
.picker-text {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
}
/* 자리에서 펼쳐지는 목록. 아래 내용을 밀어내지 않도록 띄워서 겹친다. */
.builds-combo {
  position: relative;
  display: grid;
  gap: 5px;
}
.builds-combo-label {
  color: var(--muted);
  font-size: 12px;
}
.builds-combo-panel {
  position: absolute;
  z-index: 5;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 4px;
  padding: 10px;
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  box-shadow: 0 10px 30px #0003;
}
.builds-combo-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
  max-height: 44vh;
  overflow-y: auto;
}
.builds-combo-row {
  width: 100%;
  min-height: 40px;
  text-align: left;
  padding: 8px 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}
.builds-combo-row:hover,
.builds-combo-row:focus-visible {
  background: var(--teal-soft);
}
.builds-combo-empty {
  padding: 10px;
  color: var(--muted);
  font-size: 13px;
}
.builds-hero {
  display: flex;
  align-items: center;
  gap: 12px;
}
.builds-hero .builds-pick {
  flex: 1;
}
.builds-hero-art {
  width: 64px;
  height: 64px;
  flex: none;
  object-fit: contain;
}
.builds-hero .no-portrait {
  width: 64px;
  flex: none;
  text-align: center;
  font-size: 28px;
  color: var(--muted);
}
.builds-open {
  width: 100%;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
}
.builds-open:hover {
  border-color: var(--teal);
}
.builds-name {
  font-weight: 600;
}
.builds-sub {
  color: var(--muted);
}
/* 수정일은 줄 끝에 붙여 이름과 포켓몬을 가리지 않는다. */
.builds-day {
  margin-inline-start: auto;
  flex: none;
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.builds-day-line {
  margin: -8px 0 0;
  color: var(--muted);
  font-size: 12px;
}
/* 값을 넣는 곳과 결과를 보는 곳을 위아래로 나눈다. 좁은 화면에서는 여섯 칸이
   한 줄에 들어가지 않으므로 자동으로 접힌다. */
.builds-points {
  display: grid;
  gap: 14px;
}
.builds-point-grid,
.builds-actual-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(78px, 1fr));
  gap: 8px;
}
.builds-actual-head {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
}
.builds-actual {
  display: grid;
  gap: 2px;
  justify-items: center;
  padding: 8px 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--teal-soft);
}
.builds-actual small {
  color: var(--muted);
  font-size: 11px;
}
.builds-actual strong {
  color: var(--ink);
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}
.builds-point {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
}
.builds-point-name {
  text-align: center;
}
/* 최대와 0은 입력칸 아래에 나란히 둔다. 옆에 두면 손가락만 한 크기가 안 나오고,
   여섯 칸이 모두 같은 모양이라 줄도 어긋나지 않는다. */
.builds-point-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}
/* 브라우저가 칸 안에 넣는 1씩 오르내리는 화살표는 너무 작아 걷어낸다. */
.builds-point input::-webkit-outer-spin-button,
.builds-point input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.builds-point input {
  appearance: textfield;
  -moz-appearance: textfield;
  min-width: 0;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 6px;
  color: var(--ink);
  background: var(--white);
  font: inherit;
  font-size: 14px;
  text-align: center;
}
.builds-point-step {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
}
.builds-point-step:hover {
  border-color: var(--teal);
  color: var(--teal);
}
/* 합계가 딱 맞는지 모자라는지 넘치는지 한눈에 보여야 한다. */
.builds-total.is-exact {
  color: var(--teal);
  font-weight: 700;
}
.builds-total.is-under {
  color: #b07d1a;
}
.builds-total.is-over {
  color: #c0392b;
  font-weight: 700;
}
.builds-bulk {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
  margin-top: 8px;
}
/* 후보도 채용 기술과 같은 칸으로 보인다. 빼기는 오른쪽 ×다. */
.builds-move {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.builds-alt-name {
  flex: 1;
  min-width: 0;
}
.builds-alt-remove {
  flex: none;
}
/* 단추의 안쪽 여백만큼 당겨, 글이 아래 칸들의 왼쪽 끝과 맞아떨어지게 한다. */
.builds-nav {
  display: flex;
  margin-inline-start: -8px;
}
.builds-status {
  color: var(--muted);
}
.builds-status:empty {
  display: none;
}
.builds-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}
/* 삭제에 별도 색을 주지 않는다. 실수를 막는 것은 색이 아니라 확인 창이고,
   이 앱에 없는 색을 새로 들이는 값어치가 없다. 자리만 떨어뜨려 둔다. */
.builds-delete {
  margin-inline-start: auto;
}
/* 색과 테두리는 .notice가 이미 준다. 여기서는 목록 모양만 지운다. */
.builds-errors {
  list-style: none;
  display: grid;
  gap: 0.25rem;
}
.builds-errors:not([hidden]) {
  padding-inline-start: 1rem;
}
.builds-resume {
  margin: 0;
  color: var(--muted);
}
.picker-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}
.picker-row {
  width: 100%;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
}
.picker-row:hover {
  border-color: var(--teal);
}
.picker-sub {
  color: var(--muted);
}
/* ⌕ 글자는 em 박스 아래쪽에 앉아 가운데보다 내려 보인다. 이 창에서만 끌어올린다. */
/* 돋보기는 글자 상자가 아래로 치우쳐 가운데보다 내려앉아 보인다. */
#picker-dialog .search-box > span {
  transform: translateY(-4px);
}
/* 세로 상자 안에서는 줄어들 수 있는 것이 먼저 줄어든다. 검색줄과 거르개 줄은
   줄지 않게 묶고, 남는 자리는 목록이 가져간다. */
#picker-dialog .search-box,
#picker-filters,
#picker-help,
#picker-more,
#picker-dialog .dialog-heading {
  flex: none;
}
#picker-dialog .search-box {
  margin-bottom: 14px;
}
#picker-help {
  margin: 0 0 16px;
}
/* 창이 스크롤되고 목록도 스크롤되면 어느 쪽이 움직이는지 알 수 없다. 창을 세로
   상자로 묶어 목록 하나만 남는 자리를 채우게 한다. 거르개 줄이 붙어 키가 커져도
   창 자체는 넘치지 않는다. 닫힌 dialog가 보이지 않도록 [open]에만 건다. */
#picker-dialog[open] {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#picker-rows {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}
#picker-more {
  margin-top: 12px;
}
/* 기술 고르기에만 나오는 줄. 도감의 .dex-controls와 같은 모양이라 자리만 잡는다. */
.picker-filters {
  margin: 0 0 14px;
}
.picker-filters .active-filter-summary {
  margin: 0;
  min-width: 0;
}
/* 구성원은 한 줄이 아니라 머리줄과 상세로 이루어진다. fieldset li의 가로 배치를
   덮어야 상세가 옆으로 붙지 않는다. */
.builds-editor fieldset.builds-members li {
  display: grid;
  gap: 6px;
}
.builds-member-head {
  display: flex;
  align-items: center;
  gap: 8px;
}
.builds-member-pick {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: start;
}
.builds-member-pick .builds-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.builds-member-edit {
  flex: none;
}
.builds-member-more {
  margin-inline-start: 26px;
}
.builds-member-more summary {
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
  padding: 4px 0;
}
/* 한 줄에 하나씩. 이름표 너비를 묶어 값이 세로로 맞아떨어지게 한다. */
.builds-member-facts {
  display: grid;
  gap: 6px;
  margin: 4px 0 8px;
}
.builds-member-facts div {
  display: flex;
  gap: 10px;
  font-size: 13px;
}
.builds-member-facts dt {
  width: 66px;
  flex: none;
  color: var(--muted);
}
.builds-member-facts dd {
  margin: 0;
  min-width: 0;
  color: var(--ink);
}
/* 후보 기술은 줄이 많아지므로 촘촘하게 둔다. */
/* .builds-editor fieldset ul보다 명시도가 높아야 gap이 실제로 좁아진다. */
.builds-editor fieldset.builds-alts ul {
  gap: 2px;
}
.builds-alt-name {
  flex: 1;
  color: var(--ink);
  font-size: 14px;
}
/* 후보를 더하는 단추는 기술 목록에서 떼어내고 칸 아래 선에는 붙인다. 후보가
   하나도 없으면 떼어낼 목록이 없으므로 칸 가운데에 놓는다. */
.builds-alts [data-builds-alt-add] {
  margin: 6px 0 -8px;
}
/* 비었을 때는 legend가 위 테두리를 밟고 있어 위쪽이 더 좁아 보인다. 그만큼
   끌어올려야 가운데로 읽힌다. */
.builds-alts ul:empty + [data-builds-alt-add] {
  margin: -4px 0 -4px;
}
/* 저장과 목록으로는 각각 다른 버튼 규칙을 쓴다. .primary-button은 margin-top이
   15px이라 가운데 정렬된 줄에서 혼자 내려앉는다. 여백을 지우고 높이를 맞춘다. */
.builds-actions > * {
  min-height: 44px;
  margin: 0;
  display: inline-flex;
  align-items: center;
}
