@font-face {
  font-family: Pretendard;
  src: url("./fonts/pretendard-variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: Jua;
  src: url("./fonts/jua-regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --paper: #0e0d11;
  --sheet: #18161d;
  --ink: #f5f0fb;
  --muted: #bfb4cc;
  --rule: #393142;
  --field-rule: #766787;
  --accent: #c9adf8;
  --accent-strong: #e6d4ff;
  --accent-line: #766190;
  --accent-soft: #2b2138;
  --leaf: #9cd8b9;
  --leaf-soft: #192d28;
  --leaf-rule: #36594e;
  --danger: #ffa8b5;
  --danger-soft: #361e29;
  --danger-rule: #74404d;
  --tint: #231e2b;
  --surface-muted: #1b1821;
  --night: #251b33;
  --on-night-muted: #d4c7e3;
  --gold: #f6d48c;
  --gold-soft: #2d2319;
  --gold-ink: #f1d298;
  --rose-soft: #2d2234;
  --sky-soft: #211a2c;
  --backdrop: #0a080dda;
  --overlay-shadow: 0 14px 42px #1623372b;
  --heading-bg: #1c1725;
  --sparkle: polygon(38% 0, 62% 0, 62% 27%, 73% 27%, 73% 38%, 100% 38%, 100% 62%, 73% 62%, 73% 73%, 62% 73%, 62% 100%, 38% 100%, 38% 73%, 27% 73%, 27% 62%, 0 62%, 0 38%, 27% 38%, 27% 27%, 38% 27%);
  --radius: 12px;
  --radius-large: 18px;
  --display: Jua, Pretendard, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --mono: "SFMono-Regular", Consolas, monospace;
  font-family: Pretendard, "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
html { scroll-padding-top: 24px; }
body { display: flex; flex-direction: column; min-height: 100vh; margin: 0; }
main { flex: 1; min-width: 0; }
h1, h2, h3, p, ol, dl, dd, figure { margin: 0; }
a { color: inherit; text-decoration: none; }
button { color: inherit; font: inherit; cursor: pointer; }
button:disabled { cursor: default; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
[hidden] { display: none !important; }
.wrap { width: min(100% - 88px, 1152px); margin-inline: auto; }

.skip { position: fixed; z-index: 2; top: 10px; left: 10px; transform: translateY(-170%); padding: 10px 16px; background: var(--ink); color: var(--sheet); }
.skip:focus { transform: translateY(0); }
.site-header { background: #141219; border-bottom: 1px solid var(--rule); }
.header-inner { min-height: 64px; display: flex; align-items: center; gap: clamp(16px, 3vw, 35px); }
.brand { display: inline-flex; flex: none; align-items: center; gap: 8px; min-height: 48px; white-space: nowrap; }
.brand > img { width: 42px; height: auto; }
.brand-lettering { display: grid; gap: 3px; color: var(--muted); font-size: .72rem; font-weight: 720; line-height: 1.15; }
.brand-lettering img { width: 8.4375rem; height: auto; }
.header-inner nav { display: flex; align-self: stretch; gap: clamp(10px, 2vw, 23px); }
.header-inner nav a { position: relative; isolation: isolate; display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); font-size: .86rem; font-weight: 660; white-space: nowrap; }
.header-inner nav a:hover, .header-inner nav a[aria-current] { color: var(--accent); }
.header-inner nav a[aria-current] { color: var(--accent-strong); font-weight: 760; }
.header-inner nav a:is(:hover, [aria-current])::before { content: ""; position: absolute; z-index: -1; inset: calc(50% - 15px) -6px; border-radius: 7px; background: var(--accent-soft); }
.header-inner nav a[aria-current]::after { content: ""; position: absolute; inset: calc(50% + 17px) calc(50% - 6px) auto; height: 3px; border-radius: 2px; background: var(--accent); }
.header-update { position: relative; isolation: isolate; display: inline-flex; align-items: center; gap: 5px; min-height: 44px; margin-left: auto; color: var(--gold-ink); font-size: .82rem; font-weight: 740; white-space: nowrap; }
.header-update::before { content: ""; position: absolute; z-index: -1; inset: 7px -7px; border-radius: 8px; background: var(--gold-soft); }
.header-update:hover { text-decoration: underline; text-underline-offset: 4px; }

.home-heading, .section-head, .combat-heading {
  border: 1px solid var(--rule);
  border-radius: var(--radius-large);
  background: var(--heading-bg);
}
.home-heading {
  position: relative;
  isolation: isolate;
  margin-block: clamp(14px, 2vw, 22px) 18px;
  padding: clamp(17px, 3vw, 33px) clamp(16px, 3.5vw, 42px);
}
.home-heading::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 0 0 auto;
  width: min(29%, 290px);
  border-radius: inherit;
  background: url("./planet.svg") center / clamp(72px, 9vw, 118px) auto no-repeat;
}
.home-heading::after {
  content: "";
  position: absolute;
  right: min(26%, 250px);
  top: 24%;
  width: 13px;
  height: 13px;
  background: var(--gold);
  clip-path: var(--sparkle);
}
.home-heading h1 { margin: 0 0 6px; color: var(--accent-strong); font-size: clamp(2.2rem, 4.3vw, 3.5rem); }
.home-heading .intro { max-width: 71%; }
.eyebrow { display: flex; align-items: center; gap: 9px; color: var(--accent); font: 700 .68rem/1.5 var(--mono); letter-spacing: .12em; }
h1 { margin: 12px 0 12px; font-family: var(--display); font-size: clamp(2.6rem, 4.5vw, 3.7rem); letter-spacing: -.035em; line-height: 1.12; font-weight: 400; word-break: keep-all; }
h1 em { color: var(--accent); font-style: normal; }
.intro { color: var(--muted); font-size: 1rem; line-height: 1.65; word-break: keep-all; }
.snapshot { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; border: 1px solid var(--leaf-rule); border-radius: 8px; background: var(--leaf-soft); color: var(--leaf); font: 650 .72rem/1.45 var(--mono); }
.snapshot i { flex: 0 0 7px; height: 7px; border-radius: 50%; background: var(--leaf); }
.snapshot.is-stale { border-color: var(--rule); background: var(--accent-soft); color: var(--accent); }
.snapshot.is-stale i { background: var(--accent); }
.home-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); align-items: start; gap: 16px 20px; margin-block: 28px 16px; }
.home-section-title, .home-ranking h2 { margin: 0 0 9px; font-family: var(--display); font-size: 1.33rem; font-weight: 400; letter-spacing: -.01em; }
.home-section-title::before, .home-ranking h2::before {
  content: "";
  display: inline-block;
  width: .65em;
  height: .65em;
  margin-inline-end: .3em;
  background: var(--accent);
  clip-path: var(--sparkle);
}
.home-tool-nav, .home-featured-grid, .home-tool-grid, .home-data-grid { display: grid; gap: 10px; }
.home-featured-grid, .home-data-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.home-tool-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.home-featured, .home-tool { display: grid; align-content: center; min-width: 0; border: 1px solid var(--rule); border-radius: var(--radius); word-break: keep-all; }
.home-featured {
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 12px;
  min-height: 120px;
  padding: 18px clamp(14px, 2vw, 24px);
  border-color: #69547d;
  border-radius: var(--radius-large);
  color: var(--accent-strong);
  background: var(--sky-soft);
}
.home-featured:hover { background: var(--accent-soft); }
.home-featured-goal { color: #21172e; background: var(--accent); border-color: var(--accent); }
.home-featured-goal:hover { background: var(--accent-strong); border-color: var(--accent-strong); }
.home-featured h3 { font-family: var(--display); font-size: clamp(1.44rem, 2.6vw, 2rem); font-weight: 400; letter-spacing: -.012em; line-height: 1.2; }
.home-featured p { margin-top: 6px; color: var(--muted); line-height: 1.45; }
.home-featured-goal p { color: #403254; }
.home-featured-arrow {
  display: grid;
  grid-column: 2;
  grid-row: 1 / span 2;
  place-items: center;
  align-self: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--accent-line);
  border-radius: 12px;
  background: var(--sheet);
  font-size: 1.25rem;
}
.home-featured-goal .home-featured-arrow { border-color: #35264b; background: #35264b; color: #f6eefe; }
.home-tool { min-height: 72px; padding: 9px 13px; background: var(--sheet); }
.home-tool:hover { border-color: var(--accent-line); background: var(--accent-soft); }
.home-tool h3 { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; font-size: 1rem; letter-spacing: -.025em; }
.home-tool h3 span { display: grid; flex: none; place-items: center; width: 23px; height: 23px; border-radius: 7px; background: var(--tint); color: var(--accent); }
.home-tool:hover h3 span { background: var(--accent); color: var(--sheet); }
.home-tool p { margin-top: 2px; color: var(--muted); font-size: .85rem; line-height: 1.45; }
.home-ranking .panel-title { padding: 13px 16px; border-bottom: 1px solid var(--rule); border-radius: var(--radius) var(--radius) 0 0; background: var(--heading-bg); }
.home-ranking h2 { margin: 0 0 3px; }
.home-ranking .panel-title a { white-space: nowrap; }
.home-ranking-list { padding: 3px 16px; list-style: none; }
.home-ranking-list li { display: grid; grid-template-columns: minmax(70px, .8fr) minmax(0, 1.2fr) 3.2em; gap: 10px; align-items: center; min-height: 38px; border-bottom: 1px solid var(--rule); font-size: .87rem; }
.home-ranking-list li:last-child { border-bottom: 0; }
.home-ranking-list .bar-label { min-width: 0; color: var(--muted); }
#home-ranking-status, .home-ranking-date { padding: 10px 16px; }
.home-ranking-date { border-top: 1px solid var(--rule); background: var(--surface-muted); border-radius: 0 0 var(--radius) var(--radius); font-variant-numeric: tabular-nums; }
.page-navigation { display: flex; align-items: center; gap: 10px; margin-top: 10px; font-size: .82rem; }
.back-to-menu { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding-inline: 9px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); font-weight: 710; }
.back-to-menu:hover { text-decoration: underline; text-underline-offset: 4px; }
.page-location { display: flex; align-items: center; gap: 14px; color: var(--muted); }
[data-page].section, #level-view .section { margin-top: 24px; }
.loading-note { padding-block: 28px; color: var(--muted); }
#level-retry { margin-top: 10px; }
.level-filters { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
#level-controls button { min-height: 44px; }
#level-context { margin-top: 8px; }
.level-overall { margin-block: 18px 14px; }
.level-overall h2, .level-layout h2 { font-size: 1.14rem; letter-spacing: -.035em; }

.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin-top: 8px; padding: 1px; border-radius: var(--radius); background: var(--rule); overflow: hidden; }
.kpi { padding: 15px 18px 16px; background: var(--surface-muted); }
.kpi dt { color: var(--muted); font-size: .82rem; font-weight: 720; }
.kpi dd { color: var(--ink); margin: 2px 0; font: 760 clamp(1.85rem, 4vw, 2.65rem)/1.15 Pretendard, sans-serif; letter-spacing: -.072em; font-variant-numeric: tabular-nums; }
.kpi dd small { margin-left: .34em; color: var(--muted); font-size: .38em; letter-spacing: 0; }
.kpi p { color: var(--muted); font-size: .73rem; word-break: keep-all; }

.section { margin-top: 58px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; padding: 14px clamp(13px, 2vw, 22px); margin-bottom: 14px; }
h2, .section-head h1 { margin: 3px 0; font-size: clamp(1.85rem, 4vw, 2.55rem); line-height: 1.2; letter-spacing: -.035em; word-break: keep-all; }
.section-head h1, .combat-heading h1 { color: var(--accent-strong); }
.section-head p:last-child { color: var(--muted); font-size: .88rem; word-break: keep-all; }
.segments { display: flex; flex: 0 0 auto; gap: 3px; padding: 3px; border: 1px solid var(--rule); border-radius: 9px; background: var(--surface-muted); }
.segments button { min-height: 38px; padding: 5px 11px; border: 0; border-radius: 4px; background: transparent; color: var(--muted); font-size: .81rem; font-weight: 760; white-space: nowrap; }
.segments button:hover, .job-filters button:hover { background: var(--tint); color: var(--ink); }
.segments button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent-strong); }

.panel { min-width: 0; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--sheet); }
.tool-example { display: grid; gap: 9px; margin-block: 16px; padding: clamp(13px, 2.2vw, 22px); background: var(--surface-muted); }
.tool-example :is(h2, h3) { font-size: clamp(1.08rem, 2vw, 1.32rem); line-height: 1.35; }
.tool-example :is(h2, h3), :is(.coverage, .rank-panel, .level-overall) h2, .monster-table caption { color: var(--accent-strong); }
.tool-example > p:not(.note) { max-width: 92ch; font-size: .89rem; line-height: 1.65; word-break: keep-all; }
.tool-example-values { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; max-width: 610px; }
.tool-example-values > div { min-width: 0; padding: 7px clamp(6px, 1.4vw, 12px); border-radius: 7px; background: var(--tint); }
.tool-example-values dt { color: var(--muted); font-size: .77rem; font-weight: 600; word-break: keep-all; }
.tool-example-values dd { font-size: clamp(.85rem, 1.8vw, 1.12rem); font-weight: 750; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.tool-example > .inline-link { justify-self: start; }
.level-layout { display: grid; grid-template-columns: minmax(0, 2.3fr) minmax(240px, 1fr); align-items: start; gap: 14px; }
.rank-panel, .coverage { padding: 19px 20px; }
.panel-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
h3 { font-size: 1.07rem; letter-spacing: -.035em; word-break: keep-all; }
.badge { padding: 4px 8px; border: 1px solid var(--rule); border-radius: 8px; background: var(--accent-soft); color: var(--accent); font: 700 .67rem/1.4 var(--mono); white-space: nowrap; }

.level-columns, .bar-list li { display: grid; grid-template-columns: minmax(126px, 1.05fr) minmax(125px, 1.75fr) minmax(70px, .6fr); align-items: center; gap: 12px; }
.level-columns { margin: 15px 0 2px; padding-bottom: 6px; border-bottom: 1px solid var(--rule); color: var(--muted); font-size: .74rem; font-weight: 740; }
.level-columns span:last-child, .delta { text-align: right; }
.bar-list { list-style: none; padding: 0; }
.bar-list li { min-height: 44px; border-bottom: 1px solid var(--rule); font-size: .87rem; }
.job-rank-label { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 7px; min-width: 0; padding-block: 5px; }
.job-name { font-weight: 740; overflow-wrap: anywhere; }
.job-rank-group {
  flex: none; padding: 1px 6px; border-radius: 4px; color: var(--job-rank-color);
  background: color-mix(in srgb, var(--job-rank-color) 9%, var(--sheet)); font-size: .68rem; font-weight: 630;
}
:is(.bar-list, .home-ranking-list) [data-job-group="전사"] { --job-rank-color: #efad9d; }
:is(.bar-list, .home-ranking-list) [data-job-group="마법사"] { --job-rank-color: #c9acf7; }
:is(.bar-list, .home-ranking-list) [data-job-group="궁수"] { --job-rank-color: #b6d6a0; }
:is(.bar-list, .home-ranking-list) [data-job-group="도적"] { --job-rank-color: #a6bbe0; }
:is(.bar-list, .home-ranking-list) [data-job-group="해적"] { --job-rank-color: #a1d6d0; }
:is(.bar-list, .home-ranking-list) [data-job-group="영웅"] { --job-rank-color: #e6bf81; }
.bar-metric { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.bar-rail { flex: 1; min-width: 8px; height: 8px; border-radius: 5px; background: var(--tint); }
.bar-rail i { display: block; height: 100%; border-radius: inherit; background: var(--job-rank-color, var(--muted)); }
.bar-label, .delta { font-variant-numeric: tabular-nums; }
.bar-label { min-width: 6.5em; text-align: right; white-space: nowrap; }
.bar-label span, .delta { color: var(--muted); font-size: .77rem; }
.delta.positive { color: var(--leaf); }
.delta.negative { color: var(--danger); }
.plain-button, .inline-link { display: inline-flex; align-items: center; min-height: 44px; gap: 7px; padding: 0; border: 0; background: transparent; color: var(--accent); font-size: .85rem; font-weight: 730; }
.plain-button:hover, .inline-link:hover { text-decoration: underline; text-underline-offset: 4px; }

.coverage { background: var(--sheet); }
.coverage .eyebrow { color: var(--leaf); }
.coverage dl { margin-top: 13px; }
.coverage dl div { display: flex; justify-content: space-between; gap: 8px; border-top: 1px solid var(--rule); padding: 8px 0; font-size: .82rem; }
.coverage dt { color: var(--muted); }
.coverage dd { font-weight: 740; text-align: right; }
.note { color: var(--muted); font-size: .79rem; line-height: 1.55; word-break: keep-all; }
.coverage .note { margin-top: 7px; }
.job-filters { display: flex; flex-wrap: wrap; gap: 5px; }
.job-filters button { min-height: 38px; padding: 4px 9px; border: 1px solid var(--rule); border-radius: 8px; background: var(--surface-muted); color: var(--muted); font-size: .77rem; font-weight: 730; }
.job-filters button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent); color: var(--sheet); }
table { width: 100%; border-collapse: collapse; font-size: .88rem; }
th, td { padding: 10px 9px; text-align: left; border-bottom: 1px solid var(--rule); }
thead th { color: var(--muted); font-size: .75rem; background: var(--tint); }
tbody th { font-weight: 740; }
th:not(:first-child), td:not(:first-child) { text-align: right; white-space: nowrap; }
tbody tr:hover { background: var(--surface-muted); }

.monster-panel { max-width: 620px; padding: 16px 20px 6px; }
.monster-portrait { flex: none; width: 48px; height: 48px; object-fit: contain; padding: 3px; border: 1px solid var(--rule); border-radius: 8px; background: var(--surface-muted); }
.monster-name { display: flex; align-items: center; gap: 10px; }
.monster-name .monster-portrait { width: 36px; height: 36px; }
.monster-unavailable { color: var(--muted); }
.monster-status { display: inline-block; font-size: .75rem; font-weight: 500; }
.monster-table caption { margin-bottom: 10px; text-align: left; font-size: 1.1rem; font-weight: 760; }
.monster-table td { font-variant-numeric: tabular-nums; }
.monster-panel .note { margin-top: 12px; }
.monster-sources { display: flex; flex-wrap: wrap; column-gap: 16px; }

.job-filters { margin-top: 11px; }
.job-filters button { min-height: 34px; }

.field-panel { padding: 19px 20px; }
.field-banner { display: flex; align-items: center; justify-content: space-between; gap: 8px 18px; padding: 12px 15px; border: 1px solid var(--rule); border-radius: 12px; background: var(--tint); }
.field-banner h3 { margin-block: 3px; }
.field-banner .inline-link { flex: 0 0 auto; }
.hunt-banner { border-color: var(--leaf-rule); background: var(--leaf-soft); }
.hunt-banner .eyebrow, .hunt-banner .inline-link { color: var(--leaf); }
.field-filters { margin-top: 14px; }
.field-filters button { min-height: 40px; padding-inline: 11px; }
.field-status { margin-block: 13px 7px; font-weight: 700; }
.field-foot { margin-top: 13px; }
.hunt-results { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.hunt-card { min-width: 0; padding: 13px 14px 11px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface-muted); }
.hunt-card-head, .hunt-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px 12px; }
.hunt-card-head { flex-wrap: wrap; }
.hunt-badges { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.hunt-card-foot .inline-link { flex: 0 0 auto; }
.hunt-job { border-color: var(--leaf-rule); background: var(--leaf-soft); color: var(--leaf); }
.hunt-meta { margin: 3px 0 8px; }
.hunt-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.hunt-metrics div { min-width: 0; padding: 6px 9px; border-radius: 8px; background: var(--leaf-soft); }
.hunt-metrics div:nth-child(2) { background: var(--tint); }
.hunt-metrics dt { color: var(--muted); font-size: .74rem; font-weight: 700; }
.hunt-metrics dd { font-size: 1.18rem; font-weight: 790; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.hunt-metrics .metric-missing dd { color: var(--muted); }
.hunt-net { margin-bottom: 3px; color: var(--leaf); font-size: .83rem; font-weight: 740; }
.hunt-detail { padding-bottom: 3px; }
.report-button { min-height: 44px; padding: 8px 15px; border: 1px solid var(--accent); border-radius: 10px; background: var(--accent); color: var(--sheet); font-size: .9rem; font-weight: 750; white-space: nowrap; }
.report-button:hover:enabled { background: var(--accent-strong); }
.report-button:disabled { opacity: .65; }
.report-secondary { border-color: var(--accent-line); background: var(--sheet); color: var(--accent); }
.report-secondary:hover:enabled { background: var(--accent-soft); }
.report-error { margin-top: 8px; color: var(--danger); font-size: .9rem; }
.report-feed { margin-top: 15px; padding: 12px; border: 1px dashed var(--accent-line); border-radius: var(--radius); background: var(--surface-muted); }
.report-feed .hunt-results:not(:empty), .report-feed > button { margin-top: 8px; }
.report-badge { background: var(--accent-soft); color: var(--accent); }
.report-feed .hunt-card h3, .report-feed .hunt-detail { overflow-wrap: anywhere; }
.hunt-empty { border: 1px dashed var(--rule); background: var(--sheet); }
.hunt-empty { grid-column: 1 / -1; padding: 14px; border-radius: 12px; color: var(--muted); }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.cube-form { min-width: 0; padding: clamp(18px, 3vw, 30px); }
.cube-targets { min-width: 0; margin: 0; padding: 0; border: 0; }
.cube-targets legend, .cube-price-label { padding: 0; font-size: .93rem; font-weight: 660; }
.cube-field-detail { color: var(--muted); font-size: .78rem; font-weight: 450; }
.cube-target-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 9px; }
.cube-target-options label { display: flex; align-items: center; justify-content: center; gap: 9px; min-height: 62px; padding: 10px; border: 1px solid var(--rule); border-radius: 11px; background: var(--surface-muted); cursor: pointer; }
.cube-target-options label:has(:checked) { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-strong); }
.cube-target-options label:has(:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }
.cube-target-options input { width: 17px; height: 17px; margin: 0; accent-color: var(--accent); }
.cube-target-options strong { font-size: 1.5rem; font-weight: 700; letter-spacing: -.035em; }
.cube-target-options span { font-size: .85rem; white-space: nowrap; }
.cube-equipment { margin-bottom: 22px; }
.cube-equipment-options strong { font-size: 1.05rem; }
.cube-target-options small { display: block; color: var(--muted); font-size: .78rem; font-weight: 430; white-space: normal; word-break: keep-all; }
.cube-weapon-options label { justify-content: start; gap: 8px; min-height: 44px; padding: 8px 10px; }
.cube-weapon-options input { flex-shrink: 0; }
.cube-weapon-options span { min-width: 0; white-space: normal; overflow-wrap: anywhere; }
.cube-weapon-options strong { font-size: 1.05rem; }
.cube-weapon-options small { display: none; }
.cube-weapon-values { display: grid; gap: 12px; margin-top: 18px; }
.cube-weapon-values fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.cube-weapon-values legend { margin-bottom: 5px; font-size: .82rem; }
.cube-weapon-values .cube-goal-values { min-width: 0; padding: 12px; border: 1px solid var(--rule); border-radius: 10px; }
.cube-goal-values > legend { padding-inline: 5px; color: var(--ink); font-size: .9rem; font-weight: 680; }
.cube-goal-lines { display: grid; gap: 12px; }
.cube-editor-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 3px 10px; font-size: .8rem; }
.cube-editor-heading > span { color: var(--muted); font-size: .72rem; }
.cube-editor-switches { display: flex; flex-wrap: wrap; gap: 5px; }
.cube-editor-switches button { min-height: 44px; padding: 6px 11px; border: 1px solid var(--rule); border-radius: 8px; background: var(--sheet); font-size: .82rem; font-weight: 580; }
.cube-editor-switches button:hover { background: var(--tint); }
.cube-editor-switches button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.cube-selected-details { margin-top: 10px; padding-block: 10px; border-block: 1px solid var(--rule); }
.cube-selected-details h3 { margin: 0; font-size: .82rem; }
#cube-weapon-error:empty { margin-top: 0; }
.cube-value-options { display: flex; flex-wrap: wrap; gap: 5px; }
.cube-value-options label { display: inline-flex; position: relative; align-items: center; justify-content: center; min-height: 44px; padding: 6px 7px; border: 1px solid var(--rule); border-radius: 8px; background: var(--sheet); font-size: .84rem; font-weight: 560; cursor: pointer; }
.cube-value-options label:has(:checked) { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.cube-value-options label:has(:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }
.cube-market-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 14px; }
.cube-market-controls button { font-size: .85rem; font-weight: 620; }
#cube-market-status { margin-top: 5px; overflow-wrap: anywhere; }
#cube-selected-values { margin-top: 7px; overflow-wrap: anywhere; white-space: pre-line; }
.cube-armor-details { margin-top: 12px; padding-top: 9px; border-top: 1px solid var(--rule); }
.cube-armor-details h3 { margin-bottom: 4px; font-size: .88rem; }
.cube-armor-details > .note { margin-bottom: 9px; }
.cube-armor-lines { min-width: 0; margin: 0 0 9px; padding: 9px; border: 1px solid var(--rule); border-radius: 9px; }
.cube-armor-lines label { display: grid; grid-template-columns: 2.5em minmax(0, 1fr); align-items: center; gap: 6px; margin-bottom: 6px; font-size: .84rem; }
.cube-armor-lines select { width: 100%; min-width: 0; min-height: 44px; padding: 6px; border: 1px solid var(--field-rule); border-radius: 5px; background: var(--sheet); color: var(--ink); font: inherit; }
.cube-rule { margin: 12px 0 22px; }
.cube-price-label { display: block; margin-bottom: 7px; }
.cube-price-label span { color: var(--muted); font-weight: 500; }
.cube-price-field { display: flex; align-items: center; gap: 10px; padding: 0 13px; border: 1px solid var(--muted); border-radius: 9px; background: var(--sheet); }
.cube-price-field:focus-within { outline: 2px solid var(--accent); outline-offset: 3px; }
.cube-price-field:has([aria-invalid="true"]) { border-color: var(--danger); }
.cube-price-field input { width: 100%; min-width: 0; min-height: 48px; padding: 9px 0; border: 0; background: transparent; color: var(--ink); font: 650 1.15rem Pretendard, sans-serif; font-variant-numeric: tabular-nums; }
.cube-price-field input:focus-visible { outline: 0; }
.cube-price-field > span { flex-shrink: 0; color: var(--muted); font-size: .85rem; }
#cube-price-hint { margin-top: 5px; }
#cube-error:empty { margin-top: 0; }
.cube-exact { margin-top: 3px; color: var(--muted); font-size: .79rem; overflow-wrap: anywhere; }
.cube-method { margin-top: 15px; padding: 16px 20px; }
.cube-method h2 { margin-bottom: 7px; font-size: 1.12rem; }
.cube-method p + p { margin-top: 7px; }
.cube-simulator { margin-top: 24px; padding-top: 19px; border-top: 1px solid var(--leaf-rule); }
.cube-simulator h3 { margin: 0 0 6px; color: var(--ink); font-size: 1.1rem; }
.cube-sim-buttons { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin-top: 13px; }
.cube-sim-buttons button { min-height: 46px; }
.cube-sim-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; margin-top: 8px; }
.cube-simulator button:disabled { opacity: .55; }
.cube-sim-status { margin-top: 10px; padding: 10px 12px; border: 1px solid var(--leaf-rule); border-radius: 9px; background: var(--sheet); font-size: .85rem; overflow-wrap: anywhere; }
.cube-sim-status[data-phase="success"] { font-weight: 650; }
.cube-sim-progress { margin-top: 12px; }
.cube-sim-progress progress { display: block; width: 100%; height: 10px; margin-bottom: 5px; accent-color: var(--leaf); }
.cube-sim-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-block: 15px 10px; }
.cube-sim-metrics > div { min-width: 0; }
.cube-sim-metrics dt { color: var(--muted); font-size: .83rem; font-weight: 510; }
.cube-sim-metrics dd { color: var(--ink); font-size: .9rem; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.cube-sim-metrics strong { font-size: 1.4rem; font-weight: 630; letter-spacing: -.035em; }
#cube-sim-total-used { font-size: 1.65rem; font-weight: 710; }
.cube-sim-total { grid-column: 1 / -1; padding-top: 10px; border-top: 1px solid var(--rule); }
.cube-sim-total dd:not(.cube-exact) { color: var(--ink); font-size: 1.12rem; font-weight: 670; }
.cube-sim-total .cube-exact { color: var(--muted); font-size: .77rem; }
.cube-sim-help { margin-top: 11px; }

@media (min-width: 1000px) {
  .cube-sim-buttons { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.site-footer { margin-top: 51px; border-top: 1px solid var(--rule); background: var(--heading-bg); }
.footer-inner { padding-block: 23px; display: flex; align-items: start; justify-content: space-between; gap: 14px 30px; color: var(--muted); }
.footer-brand { display: inline-flex; align-items: center; gap: 5px; min-height: 25px; padding-inline-start: 29px; background: url("./planet.svg") left center / 24px auto no-repeat; color: var(--ink); font-family: var(--display); font-size: 1.13rem; }
.footer-inner p { max-inline-size: 49ch; margin-top: 6px; font-size: .8rem; line-height: 1.6; }
.footer-links { display: flex; flex-wrap: wrap; gap: 5px 14px; align-items: baseline; }
.footer-details .combat-button { margin-top: 10px; }
.error { padding: 16px; border: 1px solid var(--danger-rule); border-radius: var(--radius); background: var(--danger-soft); color: var(--danger); }
.empty { display: block; color: var(--muted); padding: 14px 0; font-size: .84rem; }

@supports (appearance: base-select) and selector(select::picker(select)) {
  :is(.combat-layout, .combat-picker, .combat-equipped-card, .cube-armor-lines, .planner-fields) select,
  :is(.combat-layout, .combat-picker, .combat-equipped-card, .cube-armor-lines, .planner-fields) select::picker(select) { appearance: base-select; }
  :is(.combat-layout, .combat-picker, .combat-equipped-card, .cube-armor-lines, .planner-fields) select { align-items: center; cursor: pointer; }
  :is(.combat-layout, .combat-picker, .combat-equipped-card, .cube-armor-lines, .planner-fields) select::picker(select) {
    position-area: block-end span-inline-end;
    position-try-fallbacks: flip-block, flip-inline, flip-block flip-inline;
    min-inline-size: anchor-size(width);
    max-inline-size: min(26rem, calc(100vw - 24px));
    max-block-size: min(24rem, 45vh);
    margin-block: 4px;
    padding: 4px;
    overflow: auto;
    border: 1px solid var(--accent-line);
    border-radius: var(--radius);
    background: var(--sheet);
    color: var(--ink);
  }
  :is(.combat-layout, .combat-picker, .combat-equipped-card, .cube-armor-lines, .planner-fields) option { min-height: 36px; padding: 5px 8px; white-space: normal; }
  :is(.combat-layout, .combat-picker, .combat-equipped-card, .cube-armor-lines, .planner-fields) option:checked { background: var(--tint); font-weight: 750; }
}

@media (max-width: 980px) {
  .header-inner { flex-wrap: wrap; gap: 0 18px; padding-top: 4px; }
  .header-inner nav { width: 100%; order: 1; flex-wrap: wrap; column-gap: 18px; }
}

@media (max-width: 870px) {
  .wrap { width: min(100% - 44px, 1152px); }
  .level-layout { grid-template-columns: minmax(0, 1fr); }
  .coverage dl { display: grid; grid-template-columns: 1fr 1fr; column-gap: 20px; }
  .home-layout { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 610px) {
  .wrap { width: calc(100% - 30px); }
  .header-inner nav { column-gap: 14px; }
  .header-inner nav a { min-height: 39px; font-size: .79rem; }
  h1 { font-size: clamp(2.15rem, 8.7vw, 3.1rem); }
  .intro { font-size: .9rem; }
  .snapshot { padding-inline: 8px; font-size: .68rem; }
  .home-heading::before { width: 56px; inset: 8px 8px auto auto; height: 49px; background-size: 46px auto; }
  .home-heading::after { display: none; }
  .home-heading h1 { padding-inline-end: 46px; }
  .home-heading .intro { max-width: none; }
  .home-section-title { font-size: 1.19rem; }
  .home-featured-grid { grid-template-columns: minmax(0, 1fr); }
  .home-featured { min-height: 92px; padding-block: 12px; }
  .home-featured p { font-size: .88rem; }
  .home-featured-arrow { width: 34px; height: 34px; font-size: 1.08rem; }
  .home-tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-tool { padding-inline: 10px; }
  .home-tool h3 { font-size: .95rem; }
  .home-tool p { font-size: .8rem; }
  .page-navigation { margin-top: 8px; }
  .kpis { margin-top: 9px; }
  .kpi { padding: 10px 7px 12px; }
  .kpi dt { font-size: .69rem; }
  .kpi dd { font-size: 1.75rem; }
  .kpi p { font-size: .63rem; }
  .section { margin-top: 34px; }
  .section-head { align-items: start; flex-direction: column; gap: 9px; }
  .level-filters { display: grid; justify-content: stretch; justify-items: start; }
  #level-controls { display: grid; width: 100%; grid-template-columns: repeat(4, minmax(max-content, 1fr)); }
  #level-controls button { padding-inline: 6px; }
  #level-controls:has([data-level="wide"][hidden]) { grid-template-columns: repeat(3, minmax(max-content, 1fr)); }
  .segments { flex-wrap: wrap; max-width: 100%; }
  .segments button { min-height: 41px; padding-inline: 8px; }
  .rank-panel, .coverage { padding: 13px; }
  .level-columns, .bar-list li { grid-template-columns: minmax(68px, .93fr) minmax(106px, 1.35fr) 52px; gap: 6px; }
  .bar-list li { font-size: .78rem; }
  .bar-metric { gap: 4px; }
  .bar-label span, .delta { font-size: .69rem; }
  .coverage dl { grid-template-columns: 1fr; }
  .job-filters button { min-height: 42px; }
  th, td { padding-inline: 6px; }
  .monster-panel { padding-inline: 12px; }
  .field-panel { padding: 12px; }
  .field-banner { align-items: start; flex-direction: column; gap: 0; padding: 10px 12px 3px; }
  .field-filters button { min-height: 44px; }
  .hunt-results { grid-template-columns: minmax(0, 1fr); }
  .report-feed .hunt-card-foot { flex-wrap: wrap; }
  .footer-inner { flex-direction: column; }
}

@media (max-width: 520px) {
  .bar-metric { display: grid; grid-template-columns: minmax(0, 1fr); }
  .bar-metric .bar-label { grid-row: 1; min-width: 0; text-align: start; }
  .bar-metric .bar-rail { grid-row: 2; height: 6px; }
}

@media (max-width: 345px) {
  #level-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .level-columns, .bar-list li { grid-template-columns: minmax(66px, 1fr) 89px 49px; }
}

.combat-inline-select { width: 100%; min-width: 0; scroll-margin-block: 4px; }
.combat-inline-trigger, .combat-inline-options { box-sizing: border-box; width: 100%; min-width: 0;
  border: 1px solid var(--rule); border-radius: 7px; background: var(--sheet); color: var(--ink); }
.combat-inline-trigger { display: flex; justify-content: space-between; align-items: center; gap: 8px;
  min-height: 44px; padding: 7px 10px; font: inherit; font-size: .88rem; text-align: left; cursor: pointer; }
.combat-inline-trigger span { min-width: 0; overflow-wrap: anywhere; }
.combat-inline-trigger::after { content: ''; flex: none; width: 7px; height: 7px; margin-inline: 2px;
  border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: translateY(-2px) rotate(45deg); }
.combat-inline-trigger[aria-expanded="true"] { border-color: var(--accent-line); }
.combat-inline-trigger[aria-expanded="true"]::after { transform: translateY(2px) rotate(225deg); }
.combat-inline-trigger:disabled { opacity: .6; cursor: default; }
.combat-inline-options { position: relative; margin-block-start: 4px; padding: 4px; max-block-size: min(14rem, 40dvh);
  overflow: auto; overscroll-behavior: contain; border-color: var(--accent-line); font-size: .86rem; }
.combat-inline-options [role="option"] { min-height: 40px; display: flex; align-items: center; padding: 6px 8px;
  border-radius: 4px; cursor: pointer; overflow-wrap: anywhere; }
.combat-inline-options [aria-selected="true"] { background: var(--tint); font-weight: 750; }
.combat-inline-options [aria-disabled="true"] { opacity: .5; cursor: default; }
.combat-inline-options [data-index]:hover, .combat-inline-options [data-focused] { background: var(--accent-soft); }
.combat-inline-group { padding: 6px 8px 3px; color: var(--muted); font-size: .74rem; font-weight: 700; }
