:root {
  color-scheme: dark;
  --bg: #05060a;
  --bg-elevated: #090a0f;
  --surface: #111217;
  --surface-2: #171923;
  --surface-3: #1f2230;
  --input: #0b0d12;
  --line: #23252a;
  --line-strong: #2c2f3a;
  --text: #f4f5f8;
  --muted: #9ca3b4;
  --muted-2: #6f7687;
  --accent: #5e6ad2;
  --accent-hover: #828fff;
  --accent-soft: rgba(94, 106, 210, 0.16);
  --gold: #d8ad56;
  --danger: #e36f5b;
  --success: #68c983;
  --cost-1: #9ca3b4;
  --cost-2: #58a886;
  --cost-3: #5e7fd2;
  --cost-4: #9b72d9;
  --cost-5: #d8ad56;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --space-1: 6px;
  --space-2: 10px;
  --space-3: 14px;
  --space-4: 18px;
  --space-5: 24px;
  --space-6: 32px;
  --font: "Pretendard", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: var(--font);
  --hairline: 1px solid var(--line);
  --focus: 0 0 0 3px rgba(94, 106, 210, 0.22);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(94, 106, 210, 0.06), transparent 280px),
    var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-weight: 400;
  letter-spacing: -0.01em;
}

button,
input,
select,
textarea {
  font-family: inherit;
}

button {
  font-weight: 600;
  letter-spacing: -0.01em;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.app-shell {
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: var(--space-5);
  align-items: center;
  min-height: 72px;
  border-bottom: var(--hairline);
  background: rgba(5, 6, 10, 0.86);
  padding: 14px clamp(18px, 4vw, 44px);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 240px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(94, 106, 210, 0.44);
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent-hover);
  font-weight: 700;
}

.brand strong,
.brand span {
  display: block;
}

.brand strong {
  font-size: 15px;
  font-weight: 600;
}

.brand span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.tool-list {
  display: flex;
  gap: 6px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: thin;
}

.tool-button {
  flex: 0 0 auto;
  min-height: 42px;
  border: var(--hairline);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  text-align: left;
  padding: 8px 11px;
  cursor: pointer;
}

.tool-button:hover {
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--text);
}

.tool-button.active {
  border-color: rgba(94, 106, 210, 0.62);
  background: var(--accent-soft);
  color: var(--text);
}

.tool-button strong,
.tool-button span {
  display: block;
}

.tool-button strong {
  font-size: 13px;
  font-weight: 600;
}

.tool-button span {
  margin-top: 2px;
  color: var(--muted-2);
  font-size: 11px;
}

.workspace {
  min-width: 0;
}

.hero {
  display: flex;
  align-items: end;
  min-height: 122px;
  border-bottom: var(--hairline);
  background: var(--bg-elevated);
  padding: 28px clamp(18px, 4vw, 44px);
}

.hero-copy {
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent-hover);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin-bottom: 0;
  font-size: 30px;
  line-height: 1.12;
  letter-spacing: -0.03em;
  font-weight: 700;
}

h2 {
  font-weight: 700;
  letter-spacing: -0.025em;
}

h3,
.card-title,
.section-title {
  font-weight: 600;
}

.tab,
.nav-item {
  font-weight: 600;
}

.tool-panel {
  padding: 26px clamp(18px, 4vw, 44px) 54px;
}

.panel-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

.panel-header h2 {
  margin-bottom: 5px;
  font-size: 24px;
  line-height: 1.18;
}

.panel-header p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.55;
}

.description,
.helper-text,
.sub-text {
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: -0.01em;
}

.badge,
.augment-card-title {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: var(--hairline);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--muted);
  padding: 5px 10px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
}

.calculator-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.46fr) minmax(0, 1fr);
  gap: var(--space-4);
  align-items: start;
}

.augment-value-layout {
  grid-template-columns: minmax(520px, 0.54fr) minmax(0, 1fr);
}

.reroll-layout,
.reroll-form,
.augment-value-form,
.interest-form {
  display: grid;
  gap: var(--space-4);
  align-self: start;
}

.slider-grid,
.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

.reroll-form .field-grid {
  grid-template-columns: repeat(6, minmax(120px, 1fr));
}

.field {
  display: grid;
  gap: 7px;
}

.field.full,
.interest-level-field {
  grid-column: 1 / -1;
}

label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

input,
select {
  width: 100%;
  min-height: 42px;
  border: var(--hairline);
  border-radius: var(--radius-sm);
  background: var(--input);
  color: var(--text);
  padding: 9px 11px;
  outline: none;
}

input:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: var(--focus);
}

input[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
  font-family: var(--mono);
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  appearance: none;
  -webkit-appearance: none;
  margin: 0;
}

input[type="range"] {
  min-height: 28px;
  accent-color: var(--accent);
  padding: 0;
}

.field label strong {
  color: var(--text);
  font-family: var(--mono);
  font-size: 18px;
  margin-left: 8px;
}

.form-panel,
.result-panel,
.empty-panel,
.table-panel,
.image-panel,
.reroll-chance-card,
.chance-value,
.metric,
.augment-option-card,
.augment-value-graph,
.interest-graph-panel,
.spend-row,
.augment-line-chart {
  border: var(--hairline);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.form-panel,
.result-panel,
.empty-panel {
  padding: var(--space-4);
}

.form-panel,
.result-panel,
.empty-panel,
.table-panel,
.image-panel {
  box-shadow: none;
}

.stepper {
  display: grid;
  grid-template-columns: 42px minmax(58px, 1fr) 42px;
  width: 100%;
  max-width: 100%;
  border: var(--hairline);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--input);
}

.stepper button,
.stepper input {
  min-height: 42px;
  border: 0;
  border-radius: 0;
  text-align: center;
}

.stepper button {
  background: var(--surface-2);
  color: var(--muted);
  cursor: pointer;
  font-size: 18px;
}

.stepper button:hover {
  background: var(--surface-3);
  color: var(--accent-hover);
}

.stepper input {
  border-inline: var(--hairline);
  background: var(--input);
}

.segmented-control {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(58px, 1fr));
  gap: 6px;
}

.segmented-control button {
  min-height: 40px;
  border: var(--hairline);
  border-radius: var(--radius-sm);
  background: var(--input);
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
}

.segmented-control button:hover {
  border-color: var(--line-strong);
  background: var(--surface-2);
  color: var(--text);
}

.segmented-control button.active {
  border-color: rgba(94, 106, 210, 0.78);
  background: var(--accent-soft);
  color: var(--text);
}

.level-control,
.reroll-form .level-control {
  grid-template-columns: repeat(10, minmax(30px, 1fr));
}

.interest-form .level-control {
  grid-template-columns: repeat(7, minmax(42px, 1fr));
}

.augment-value-form .stage-control {
  grid-template-columns: repeat(3, minmax(48px, 1fr));
}

.round-select {
  min-height: 42px;
  color: var(--text);
  background: var(--input);
}

.form-actions {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-2);
}

.primary-button,
.secondary-button {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 0 14px;
  cursor: pointer;
  font-weight: 600;
}

.primary-button {
  background: var(--accent);
  color: white;
}

.primary-button:hover {
  background: var(--accent-hover);
}

.secondary-button {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--line);
}

.secondary-button:hover {
  border-color: var(--line-strong);
  background: var(--surface-3);
}

.result-grid,
.reroll-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.metric {
  min-height: 96px;
  padding: var(--space-3);
  transition: background-color 0.16s ease, border-color 0.16s ease;
}

.metric:hover,
.reroll-chance-card:hover,
.chance-value:hover {
  border-color: var(--line-strong);
  background: var(--surface-2);
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.metric strong {
  display: block;
  margin-top: 12px;
  color: var(--text);
  font-family: var(--mono);
  font-size: 25px;
  line-height: 1.05;
  font-weight: 700;
}

.metric:first-child strong,
.chance-value b,
.spend-gap,
.augment-compare-bar-line b,
.augment-value-table .best-row td:last-child {
  color: var(--gold);
}

.stat-value,
.result-value,
.gold-value,
.probability-value,
.metric strong,
.chance-value b {
  font-weight: 700;
  letter-spacing: -0.02em;
}

.reroll-result {
  padding: var(--space-5);
}

.reroll-chance-grid,
.chance-values,
.damage-board,
.interest-graph-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

.reroll-chance-card {
  display: grid;
  gap: var(--space-3);
  padding: var(--space-4);
}

.chance-card-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
  padding-bottom: var(--space-3);
  border-bottom: var(--hairline);
}

.chance-card-header strong {
  color: var(--text);
  font-size: 19px;
  font-weight: 600;
}

.chance-card-header span,
.reroll-chance-card small,
.chance-value span {
  color: var(--muted);
  font-size: 12px;
}

.chance-value {
  display: grid;
  gap: 8px;
  padding: var(--space-3);
  background: var(--input);
}

.chance-value b {
  font-family: var(--mono);
  font-size: 31px;
}

.chance-value.current {
  border-color: rgba(94, 106, 210, 0.5);
}

.chance-value.next {
  border-color: rgba(130, 143, 255, 0.38);
}

.table-panel {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  border-bottom: var(--hairline);
  padding: 12px 14px;
  text-align: center;
}

table,
td {
  font-weight: 400;
}

.data-table th {
  color: var(--text);
  background: var(--surface-2);
  font-weight: 600;
}

.data-table td {
  color: var(--muted);
}

.compact-table {
  max-width: 560px;
}

.damage-board {
  gap: var(--space-2);
}

.damage-board .notes {
  grid-column: 1 / -1;
}

.damage-table-panel {
  overflow: hidden;
  border-color: var(--line);
  background: var(--surface);
}

.damage-table {
  min-width: 0;
}

.damage-table th,
.damage-table td {
  border-bottom: var(--hairline);
  color: var(--text);
  font-size: 15px;
}

.damage-table thead th {
  background: var(--surface-2);
  color: var(--text);
  font-size: 16px;
  text-align: left;
}

.damage-table tbody tr:nth-child(odd) th,
.damage-table tbody tr:nth-child(odd) td,
.damage-table tbody tr:nth-child(even) th,
.damage-table tbody tr:nth-child(even) td {
  background: transparent;
}

.damage-table tbody th,
.damage-table tbody td {
  text-align: left;
}

.image-panel {
  overflow: hidden;
}

.image-panel img {
  display: block;
  width: 100%;
  height: auto;
}

.augment-image-panel {
  max-width: 860px;
  margin: 0 auto;
  padding: var(--space-3);
  background: var(--surface);
}

.economy-table {
  min-width: 760px;
}

.interest-graph-panel,
.augment-value-graph {
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-4);
  padding: var(--space-4);
}

.interest-graph-panel > div:first-child span,
.augment-graph-head span,
.notes {
  color: var(--muted);
  line-height: 1.6;
}

.spend-graph {
  display: grid;
  gap: var(--space-2);
  min-width: 0;
}

.spend-graph > strong,
.augment-graph-head strong {
  color: var(--text);
  font-weight: 600;
}

.spend-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 62px;
  gap: var(--space-2);
  align-items: center;
  padding: 7px;
  background: var(--input);
}

.spend-row.active {
  border-color: rgba(216, 173, 86, 0.55);
  background: rgba(216, 173, 86, 0.07);
}

.spend-row > span {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  text-align: right;
}

.spend-bars {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.spend-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 42px;
  min-height: 20px;
  border-radius: 6px;
  padding-right: 7px;
}

.spend-bar.hit,
.augment-chart-line.option-1,
.augment-compare-legend .option-1,
.augment-graph-fill.option-1 {
  background: #4ec7bd;
  stroke: #4ec7bd;
}

.spend-bar.miss,
.augment-chart-line.option-2,
.augment-compare-legend .option-2,
.augment-graph-fill.option-2 {
  background: var(--danger);
  stroke: var(--danger);
}

.spend-bar b {
  color: #fff;
  font-family: var(--mono);
  font-size: 11px;
}

.spend-gap {
  font-family: var(--mono);
  font-size: 12px;
  text-align: right;
}

.spend-legend,
.augment-compare-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.spend-legend span,
.augment-compare-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.spend-legend i,
.augment-compare-legend i {
  width: 18px;
  height: 8px;
  border-radius: 999px;
}

.spend-legend .hit {
  background: #4ec7bd;
}

.spend-legend .miss {
  background: var(--danger);
}

.augment-line-chart {
  display: grid;
  gap: 8px;
  padding: var(--space-3);
  overflow-x: auto;
  background: var(--input);
}

.augment-line-chart svg {
  display: block;
  min-width: 620px;
  width: 100%;
  height: auto;
}

.chart-grid-line {
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 1;
}

.chart-tick-line {
  stroke: rgba(255, 255, 255, 0.04);
  stroke-width: 1;
}

.chart-axis {
  stroke: rgba(255, 255, 255, 0.28);
  stroke-width: 1.2;
}

.chart-x-label,
.chart-y-label {
  fill: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
}

.chart-x-label {
  text-anchor: middle;
}

.chart-y-label {
  text-anchor: end;
}

.augment-chart-line {
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.augment-chart-line.option-0,
.augment-compare-legend .option-0,
.augment-graph-fill.option-0 {
  background: var(--gold);
  stroke: var(--gold);
}

.augment-value-table .best-row th,
.augment-value-table .best-row td {
  color: var(--text);
  background: var(--accent-soft);
}

.range,
.comparison-graph {
  display: grid;
  gap: var(--space-2);
}

.probability-summary,
.comparison-panel {
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-4);
  border: var(--hairline);
  border-radius: var(--radius-md);
  background: var(--surface);
  padding: var(--space-3);
}

.probability-summary strong {
  color: var(--gold);
  font-family: var(--mono);
}

.probability-summary span,
.comparison-panel span,
.level-odds-summary span {
  color: var(--muted);
  line-height: 1.55;
}

.comparison-panel > div:first-child strong,
.comparison-panel > div:nth-child(3) strong {
  color: var(--text);
  font-weight: 600;
}

.comparison-row {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) 62px;
  gap: var(--space-2);
  align-items: center;
}

.comparison-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.comparison-row strong {
  color: var(--text);
  font-family: var(--mono);
  font-size: 12px;
  text-align: right;
}

.comparison-track,
.bar {
  height: 12px;
  border-radius: 999px;
  background: var(--input);
  overflow: hidden;
}

.comparison-fill,
.bar-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.level-odds-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
  border-top: var(--hairline);
  padding-top: var(--space-3);
}

.split-tables {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.mini-table {
  min-width: 360px;
}

.star-filter-panel {
  margin-bottom: var(--space-4);
}

.star-filter-grid {
  grid-template-columns: 1.1fr 0.9fr 0.9fr;
}

.star-expectation-result {
  display: grid;
  gap: var(--space-4);
}

.star-summary {
  margin-top: 0;
}

.star-notice {
  margin: 0;
  border: var(--hairline);
  border-radius: var(--radius-md);
  background: var(--surface);
  padding: var(--space-3);
}

.star-cost-sections {
  display: grid;
  gap: var(--space-4);
}

.star-cost-section {
  display: grid;
  gap: var(--space-3);
  padding: var(--space-3);
}

.star-cost-section.selected {
  border-color: rgba(94, 106, 210, 0.54);
  background:
    linear-gradient(180deg, rgba(94, 106, 210, 0.08), transparent 180px),
    var(--surface);
}

.star-section-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: var(--space-3);
}

.star-section-head h3 {
  margin-bottom: 4px;
  font-size: 17px;
}

.star-section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.star-expectation-table {
  min-width: 720px;
}

.star-expectation-table th,
.star-expectation-table td {
  white-space: nowrap;
}

.star-expectation-table tbody th {
  color: var(--text);
  background: transparent;
  font-family: var(--mono);
}

.star-expectation-table .selected-target {
  color: var(--text);
  background: rgba(94, 106, 210, 0.1);
}

.star-expectation-table .highlighted-benchmark {
  color: var(--gold);
  font-weight: 700;
}

.star-expectation-table .inactive-row th,
.star-expectation-table .inactive-row td {
  color: var(--muted-2);
  background: rgba(255, 255, 255, 0.01);
}

.unavailable-label {
  color: var(--muted-2);
  font-size: 12px;
}

.star-detail {
  min-width: 150px;
}

.star-detail summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  border: var(--hairline);
  border-radius: var(--radius-sm);
  background: var(--input);
  color: var(--text);
  padding: 0 10px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  list-style: none;
}

.star-detail summary::-webkit-details-marker {
  display: none;
}

.star-detail summary:hover {
  border-color: var(--line-strong);
  background: var(--surface-2);
}

.star-detail-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1fr);
  gap: var(--space-2);
  min-width: 280px;
  margin-top: var(--space-2);
  padding: var(--space-2);
  border: var(--hairline);
  border-radius: var(--radius-sm);
  background: var(--input);
}

.star-detail-card {
  display: grid;
  gap: 5px;
  border: var(--hairline);
  border-radius: var(--radius-sm);
  background: var(--surface);
  padding: var(--space-2);
  text-align: left;
}

.star-detail-card strong {
  color: var(--text);
  font-size: 13px;
}

.star-detail-card span {
  color: var(--muted);
  font-size: 12px;
}

.probability-guide {
  display: grid;
  gap: var(--space-3);
  padding: var(--space-3);
}

.probability-guide h3 {
  margin-bottom: 0;
  font-size: 16px;
}

.probability-guide-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-2);
}

.probability-guide-grid div {
  display: grid;
  gap: 5px;
  border: var(--hairline);
  border-radius: var(--radius-sm);
  background: var(--input);
  padding: var(--space-2);
}

.probability-guide-grid strong {
  color: var(--text);
  font-size: 13px;
}

.probability-guide-grid span {
  color: var(--muted);
  line-height: 1.45;
  font-size: 12px;
}

.range-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) 64px;
  gap: var(--space-2);
  align-items: center;
}

.range-row strong,
.range-row span {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
}

.range-row span {
  text-align: right;
}

.augment-option-list {
  display: grid;
  gap: var(--space-3);
}

.augment-option-card {
  display: grid;
  gap: var(--space-3);
  padding: var(--space-3);
  background: var(--surface-2);
}

.augment-card-title {
  justify-self: start;
  color: var(--accent-hover);
  background: var(--accent-soft);
  border-color: rgba(94, 106, 210, 0.38);
}

.augment-option-head {
  display: grid;
  grid-template-columns: minmax(170px, 1.2fr) minmax(140px, 0.8fr);
  gap: var(--space-2);
  align-items: end;
}

.augment-db-summary {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.augment-option-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: var(--space-2);
}

.augment-option-grid .stepper {
  grid-template-columns: 30px minmax(36px, 1fr) 30px;
}

.augment-option-grid .stepper button,
.augment-option-grid .stepper input {
  min-height: 40px;
}

.empty-panel {
  padding: var(--space-5);
}

.empty-panel h2 {
  margin-bottom: var(--space-2);
}

.empty-panel p {
  color: var(--muted);
  line-height: 1.7;
}

@media (max-width: 1120px) {
  .calculator-layout,
  .augment-value-layout {
    grid-template-columns: 1fr;
  }

  .reroll-form .field-grid,
  .augment-option-grid,
  .star-filter-grid,
  .probability-guide-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .sidebar {
    position: static;
    grid-template-columns: 1fr;
    gap: var(--space-3);
  }

  .brand {
    min-width: 0;
  }

  .tool-list {
    padding-bottom: 2px;
  }

  .hero {
    min-height: 104px;
  }

  h1 {
    font-size: 24px;
  }

  .panel-header {
    display: block;
  }

  .badge {
    margin-top: var(--space-3);
  }

  .field-grid,
  .slider-grid,
  .result-grid,
  .reroll-summary,
  .reroll-chance-grid,
  .chance-values,
  .damage-board,
  .interest-graph-grid,
  .augment-option-head,
  .augment-option-grid,
  .level-odds-summary,
  .split-tables,
  .star-filter-grid,
  .star-detail-grid,
  .probability-guide-grid,
  .level-control,
  .reroll-form .level-control,
  .interest-form .level-control {
    grid-template-columns: 1fr;
  }

  .comparison-row,
  .range-row {
    grid-template-columns: 1fr;
  }

  .comparison-row strong,
  .range-row span {
    text-align: left;
  }

  .tool-panel {
    padding-inline: var(--space-3);
  }

  .form-panel,
  .result-panel {
    padding: var(--space-3);
  }
}

/* 사이트 네비게이션 */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(5, 6, 10, 0.95);
  border-bottom: var(--hairline);
  backdrop-filter: blur(18px);
  padding: 12px 0;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 clamp(18px, 4vw, 44px);
  gap: var(--space-5);
}

.nav-brand a {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
}

.nav-brand a:hover {
  color: var(--accent-hover);
}

.nav-links {
  display: flex;
  gap: var(--space-5);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--text);
}

/* 사이트 푸터 */
.site-footer {
  margin-top: var(--space-6);
  padding: var(--space-6) 0;
  background: rgba(5, 6, 10, 0.5);
  border-top: var(--hairline);
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(18px, 4vw, 44px);
}

.footer-container > .footer-section:first-child + .footer-section + .footer-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-6);
  margin-bottom: var(--space-5);
}

.footer-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-6);
  margin-bottom: var(--space-5);
}

.footer-section h4 {
  font-size: 14px;
  margin-bottom: var(--space-3);
  color: var(--text);
  font-weight: 600;
}

.footer-section h3 {
  font-size: 14px;
  margin-bottom: var(--space-3);
  color: var(--text);
}

.footer-section p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  margin: 0;
}

.footer-section ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-section li {
  margin-bottom: var(--space-2);
}

.footer-section a {
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  transition: color 0.2s;
}

.footer-section a:hover {
  color: var(--text);
}

.footer-bottom {
  padding-top: var(--space-5);
  border-top: var(--hairline);
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}

.footer-bottom p {
  margin: 0;
  padding: var(--space-2) 0;
}

/* 히어로 섹션 */
.hero {
  padding: 60px clamp(18px, 4vw, 44px);
  background: linear-gradient(135deg, rgba(94, 106, 210, 0.1), rgba(216, 173, 86, 0.05));
  border-bottom: var(--hairline);
  text-align: center;
}

.hero-copy {
  max-width: 600px;
  margin: 0 auto;
}

.hero h1 {
  font-size: clamp(28px, 6vw, 44px);
  margin-bottom: var(--space-3);
  line-height: 1.2;
}

.hero p {
  color: var(--muted);
  font-size: 16px;
  margin-bottom: var(--space-5);
  line-height: 1.6;
}

.hero-cta {
  display: inline-block;
  padding: 12px 28px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: background 0.2s;
}

.hero-cta:hover {
  background: var(--accent-hover);
}

/* 섹션 공통 스타일 */
.intro-section,
.features-section,
.how-to-section,
.faq-section,
.tips-section,
.cta-section,
.tierlist-hero,
.tierlist-controls,
.tierlist-builder,
.champion-search-section,
.tierlist-article {
  padding: 60px clamp(18px, 4vw, 44px);
  border-bottom: var(--hairline);
}

.section-container {
  max-width: 1200px;
  margin: 0 auto;
}

/* 티어리스트 전용 스타일 */
.tierlist-page {
  padding-top: 0;
}

.tierlist-hero {
  background: rgba(18, 20, 33, 0.8);
}

.tierlist-controls .toolbar-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
  align-items: end;
}

.tierlist-controls .search-box,
.tierlist-controls .filter-box,
.tierlist-controls .button-group {
  display: grid;
  gap: var(--space-2);
}

.tierlist-controls label {
  color: var(--muted);
  font-size: 13px;
}

.tierlist-controls input,
.tierlist-controls select {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: var(--hairline);
  background: var(--input);
  color: var(--text);
}

.primary-button,
.secondary-button,
.danger-button {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  font-weight: 700;
  cursor: pointer;
}

.primary-button {
  background: var(--accent);
  color: #fff;
}

.secondary-button {
  background: transparent;
  border-color: var(--muted);
  color: var(--text);
}

.danger-button {
  background: rgba(227, 111, 91, 0.18);
  color: var(--danger);
  border-color: rgba(227, 111, 91, 0.35);
}

.tierlist-builder {
  display: grid;
  grid-template-columns: 1.6fr 0.9fr;
  gap: var(--space-6);
}

.tier-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-4);
}

.tier-column {
  background: var(--surface-2);
  border: var(--hairline);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
}

.tier-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-4);
}

.tier-dropzone {
  min-height: 220px;
  display: grid;
  gap: var(--space-3);
  padding: var(--space-2);
  border: 1px dashed rgba(156, 163, 180, 0.25);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.02);
}

.tier-dropzone.drag-over {
  border-color: var(--accent);
  background: rgba(94, 106, 210, 0.14);
}

.tier-champion-card {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: var(--hairline);
  color: var(--text);
  cursor: grab;
  text-align: left;
}

.tier-champion-card:active {
  cursor: grabbing;
}

.tier-champion-card .champion-cost {
  color: var(--muted);
  font-size: 13px;
}

.tier-detail-panel {
  position: sticky;
  top: 92px;
  align-self: start;
}

.tier-detail-card {
  background: var(--surface-2);
  border: var(--hairline);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
}

.champion-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-4);
}

.champion-detail-section {
  margin-bottom: var(--space-4);
}

.champion-detail-section strong {
  display: block;
  margin-bottom: var(--space-2);
  color: var(--text);
}

.champion-detail-section ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.champion-detail-section p {
  margin: 0;
  color: var(--muted);
}

.champion-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-4);
}

.champion-card {
  width: 100%;
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  border: var(--hairline);
  background: var(--surface-2);
  text-align: left;
  cursor: pointer;
}

.champion-card:hover,
.champion-card:focus {
  border-color: var(--accent);
}

.champion-card-header {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.champion-card-meta {
  display: flex;
  justify-content: space-between;
  gap: var(--space-2);
  font-size: 13px;
  color: var(--muted);
}

.champion-tier {
  color: var(--gold);
  font-weight: 700;
}

.tierlist-article article {
  background: var(--surface-2);
  border: var(--hairline);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  line-height: 1.75;
}

.tierlist-article h2,
.tierlist-article h3 {
  margin-top: var(--space-5);
}

.tierlist-article p {
  color: var(--muted);
}

@media (max-width: 1120px) {
  .tierlist-builder {
    grid-template-columns: 1fr;
  }

  .tier-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .tierlist-controls .toolbar-grid {
    grid-template-columns: 1fr;
  }

  .tier-columns {
    grid-template-columns: 1fr;
  }

  .tier-detail-panel {
    position: static;
  }
}

.intro-section h2,
.features-section h2,
.how-to-section h2,
.faq-section h2,
.tips-section h2 {
  font-size: 32px;
  margin-bottom: 40px;
  text-align: center;
}

.section-desc {
  color: var(--muted);
  line-height: 1.8;
  margin: 0 0 var(--space-4) 0;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  font-size: 15px;
}

/* 기능 카드 */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-5);
  margin-bottom: var(--space-5);
}

.feature-card {
  padding: var(--space-5);
  background: var(--surface-2);
  border: var(--hairline);
  border-radius: var(--radius-md);
  transition: transform 0.2s, border-color 0.2s;
}

.feature-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

.feature-card h3 {
  font-size: 16px;
  margin-bottom: var(--space-3);
  color: var(--text);
}

.feature-card p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
  margin: 0;
}

/* 단계 카드 */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-5);
}

.step-card {
  padding: var(--space-5);
  background: var(--surface-2);
  border: var(--hairline);
  border-radius: var(--radius-md);
  text-align: center;
  position: relative;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: 50%;
  color: var(--accent-hover);
  font-weight: 700;
  font-size: 18px;
  margin-bottom: var(--space-3);
}

.step-card h3 {
  font-size: 16px;
  margin: var(--space-3) 0;
  color: var(--text);
}

.step-card p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
  margin: 0;
}

/* FAQ 섹션 */
.faq-list {
  max-width: 700px;
  margin: 0 auto;
}

.faq-item {
  margin-bottom: var(--space-4);
  padding: var(--space-4);
  background: var(--surface-2);
  border: var(--hairline);
  border-radius: var(--radius-md);
  cursor: pointer;
}

.faq-item[open] {
  border-color: var(--accent);
  background: rgba(94, 106, 210, 0.08);
}

.faq-item summary {
  font-weight: 600;
  color: var(--text);
  user-select: none;
  outline: none;
}

.faq-item summary::-webkit-details-marker {
  color: var(--accent);
}

.faq-item p {
  margin: var(--space-3) 0 0 0;
  color: var(--muted);
  line-height: 1.7;
  font-size: 14px;
}

/* 팁 카드 */
.tips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-5);
}

.tip-card {
  padding: var(--space-5);
  background: var(--surface-2);
  border: var(--hairline);
  border-radius: var(--radius-md);
  transition: transform 0.2s, border-color 0.2s;
}

.tip-card:hover {
  transform: translateY(-2px);
  border-color: var(--gold);
}

.tip-card h3 {
  font-size: 16px;
  color: var(--gold);
  margin-bottom: var(--space-3);
}

.tip-card p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
  margin: 0;
}

/* CTA 섹션 */
.cta-section {
  background: linear-gradient(135deg, rgba(94, 106, 210, 0.15), rgba(216, 173, 86, 0.1));
}

.cta-box {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
  padding: 40px;
}

.cta-box h2 {
  font-size: 28px;
  margin-bottom: var(--space-3);
}

.cta-box p {
  color: var(--muted);
  font-size: 16px;
  margin-bottom: var(--space-5);
}

.cta-button {
  display: inline-block;
  padding: 14px 32px;
  background: var(--gold);
  color: #000;
  text-decoration: none;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 16px;
  transition: background 0.2s;
}

.cta-button:hover {
  background: #ffc977;
}

/* 계산기 섹션 */
.calculator-section {
  padding: 0;
}

.calculator-header {
  position: relative;
  padding: 20px clamp(18px, 4vw, 44px);
  border-bottom: var(--hairline);
  background: var(--surface-2);
}

.back-button {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 8px 12px;
  background: var(--surface);
  border: var(--hairline);
  border-radius: var(--radius-sm);
  color: var(--text);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
}

.back-button:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-hover);
}

/* 반응형 */
@media (max-width: 768px) {
  .nav-container {
    flex-direction: column;
    gap: var(--space-3);
  }

  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
  }

  .hero {
    padding: 40px clamp(18px, 4vw, 44px);
  }

  .hero h1 {
    font-size: 24px;
  }

  .intro-section,
  .features-section,
  .how-to-section,
  .faq-section,
  .tips-section,
  .cta-section {
    padding: 40px clamp(18px, 4vw, 44px);
  }

  .features-section h2,
  .how-to-section h2,
  .faq-section h2,
  .tips-section h2 {
    font-size: 24px;
    margin-bottom: 30px;
  }

  .features-grid,
  .steps-grid,
  .tips-grid {
    grid-template-columns: 1fr;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }
}

/* 아코디언 스타일 */
.section-toggle {
  width: 100%;
  padding: var(--space-4) var(--space-5);
  background: var(--surface-2);
  border: var(--hairline);
  border-radius: var(--radius-md);
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s ease;
  margin-bottom: var(--space-3);
}

.section-toggle:hover {
  border-color: var(--accent);
  background: rgba(94, 106, 210, 0.08);
}

.section-toggle:focus {
  outline: none;
  box-shadow: var(--focus);
}

.toggle-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  color: var(--accent);
  font-weight: 700;
  font-size: 18px;
  transition: transform 0.3s ease;
}

.section-toggle[aria-expanded="false"] .toggle-icon {
  transform: rotate(-90deg);
}

.section-content {
  max-height: 10000px;
  overflow: hidden;
  animation: slideDown 0.3s ease;
}

.section-toggle[aria-expanded="false"] ~ .section-content {
  max-height: 0;
  animation: slideUp 0.3s ease;
  margin-bottom: 0;
}

@keyframes slideDown {
  from {
    max-height: 0;
    opacity: 0;
  }
  to {
    max-height: 10000px;
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    max-height: 10000px;
    opacity: 1;
  }
  to {
    max-height: 0;
    opacity: 0;
  }
}
