:root {
  color-scheme: light;
  --text: #111111;
  --muted: #777777;
  --line: #eeeeee;
  --green: #2dcc5d;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; min-height: 100%; background: #fff; }
body {
  min-height: 100vh;
  margin: 0;
  background: #fff;
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}
button, select { font: inherit; }
button:focus-visible, select:focus-visible, a:focus-visible { outline: 2px solid #222; outline-offset: 3px; }
.site-shell {
  width: min(520px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 24px;
}
.brand-header { display: flex; flex-direction: column; align-items: center; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
}
.brand-icon { display: block; width: 88px; height: auto; }
.brand-name { font-size: 32px; font-weight: 400; letter-spacing: -.045em; }
.tagline { margin: 2px 0 0; font-size: 20px; letter-spacing: -.035em; }
.role-control { display: flex; justify-content: center; margin: 17px 0 -7px; }
.role-control select {
  min-width: 0;
  padding: 4px 20px 4px 7px;
  appearance: none;
  border: 0;
  border-radius: 3px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath d='m2 3.5 3 3 3-3' fill='none' stroke='%23777' stroke-width='1.2'/%3E%3C/svg%3E") no-repeat right 5px center;
  color: #777;
  font-size: 11px;
  text-align: center;
  cursor: pointer;
}
.role-control select:disabled { opacity: .6; cursor: wait; }
.role-control option { color: #111; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.build-card, .synergy-card {
  border: 1px solid #eeeeee;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .14);
}
.build-card { padding: 32px; }
.rune-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.rune-tree { min-width: 0; }
.rune-section { display: flex; justify-content: center; width: 100%; }
.rune-list { display: flex; flex-direction: column; align-items: center; width: 100%; gap: 5px; }
.rune-row { display: flex; align-items: center; justify-content: center; gap: 5px; width: 100%; min-height: 48px; }
.rune-option {
  display: grid;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 50%;
  overflow: hidden;
  opacity: .62;
  filter: grayscale(1);
}
.rune-option img { display: block; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.rune-option.selected { opacity: 1; filter: none; }
.shards-block { margin-top: 15px; }
.shard-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.shard-chip {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: #555;
  text-align: center;
}
.shard-mark {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 1px solid #333;
  border-radius: 50%;
  background: #28292b;
  color: #fff;
  font-size: 10px;
  font-weight: 600;
}
.shard-category { color: #999; font-size: 8px; }
.shard-chip strong { max-width: 100%; font-size: 8px; font-weight: 500; line-height: 1.15; }
.item-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}
.item-slot {
  display: grid;
  width: 64px;
  max-width: 64px;
  min-width: 0;
  height: auto;
  aspect-ratio: 1;
  flex: 1 1 64px;
  place-items: center;
  background: #f5f5f5;
}
.item-slot img { display: block; width: 100%; height: 100%; object-fit: cover; }
.item-slot.boots-slot { outline: 1px solid #eeeeee; outline-offset: 2px; }
.synergy-card { margin-top: 23px; padding: 32px; }
.synergy-heading { margin-bottom: 7px; font-size: 20px; letter-spacing: -.02em; }
.radar-chart { display: block; width: 100%; height: auto; overflow: visible; }
.radar-grid polygon {
  fill: none;
  stroke: #e7e7e7;
  stroke-width: 1;
}
.radar-grid polygon:last-of-type { stroke: #d7d7d7; }
.radar-grid line { stroke: #ededed; stroke-width: 1; }
.radar-area {
  fill: var(--green);
  fill-opacity: .18;
  stroke: var(--green);
  stroke-width: 2;
  stroke-linejoin: round;
  transition: points .25s ease;
}
.radar-points circle { fill: var(--green); stroke: #fff; stroke-width: 1.5; }
.radar-labels { font-family: var(--sans); }
.radar-label { fill: #222; font-size: 12px; font-weight: 500; }
.radar-value { fill: #777; font-size: 12px; font-variant-numeric: tabular-nums; }
.actions-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  margin-top: 23px;
}
.generate-button, .copy-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: #111;
  font-size: 13px;
  cursor: pointer;
}
.generate-button img { width: 19px; height: 19px; }
.generate-button:disabled, .copy-button:disabled { opacity: .5; cursor: wait; }
.copy-button img { display: block; width: 20px; height: 20px; }
.error-banner {
  margin: 15px 0;
  padding: 10px 12px;
  border: 1px solid #e6baba;
  border-radius: 8px;
  background: #fff4f4;
  color: #8d2929;
  font-size: 11px;
  line-height: 1.45;
}
.footer {
  margin-top: 83px;
  color: #666;
  font-size: 8px;
  text-align: center;
}
.toast {
  position: fixed;
  z-index: 5;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 10px);
  padding: 10px 14px;
  border: 1px solid #dedede;
  border-radius: 8px;
  background: #fff;
  color: #222;
  font-size: 11px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, .1);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s, transform .18s;
}
.toast.visible { transform: translate(-50%, 0); opacity: 1; }

@media (max-width: 551px) {
  .build-card { padding: 24px; }
  .synergy-card { padding: 24px; }
  .rune-option { flex-basis: 40px; width: 40px; height: 40px; }
  .rune-row { min-height: 40px; }
}

@media (max-width: 400px) {
  .site-shell { width: calc(100% - 24px); padding-top: 34px; }
  .build-card { padding: 20px; }
  .synergy-card { padding: 20px; }
  .rune-columns { gap: 14px; }
  .rune-option { flex: 0 1 32px; min-width: 23px; width: 32px; height: 32px; }
  .rune-row { min-height: 32px; gap: 3px; }
  .item-strip { gap: 7px; }
}

@media (max-width: 340px) {
  .rune-option { flex-basis: 26px; width: 26px; height: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
