:root {
  color-scheme: light;
  --aram-project-signature: "ARAM_HEX_BUILD";
  --aram-build-signature: "JZ-20260714-A1";
  --bg: #dfe8e4;
  --bg-deep: #09120f;
  --surface: #ffffff;
  --surface-soft: #f4f7f5;
  --surface-alt: #e8efec;
  --ink: #111a17;
  --muted: #65756f;
  --line: #d8e2dd;
  --line-strong: #b9c7c1;
  --green: #0f6f5e;
  --green-dark: #0a4c41;
  --green-soft: #dff2ed;
  --green-bright: #6ccfb5;
  --blue: #285f8f;
  --blue-soft: #e2eef8;
  --amber: #935d12;
  --amber-soft: #f5e6c8;
  --gold: #c99a36;
  --gold-soft: #f7e8b8;
  --red: #9e343a;
  --red-soft: #f8e2e3;
  --violet: #7052c8;
  --violet-soft: #ece6ff;
  --teal: #0f6f5e;
  --radius: 8px;
  --shadow: 0 18px 46px rgba(20, 37, 32, 0.1);
  --shadow-soft: 0 10px 28px rgba(20, 37, 32, 0.08);
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --motion-fast: 160ms;
  --motion-base: 210ms;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

html[data-project-mark="ARAM_HEX_BUILD"] {
  isolation: isolate;
}

.result-area[data-layout-signature="AHB-A1-R"] {
  min-width: 0;
}

.site-signature {
  padding: 16px 20px 24px;
  text-align: center;
  font-size: 12px;
  color: var(--muted-text, #718078);
  opacity: 0.72;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #edf3f0 0%, #e5ece8 240px, var(--bg) 100%);
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", Arial, sans-serif;
  text-rendering: optimizeLegibility;
}

body:not(.debug-mode) .debug-only {
  display: none;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--surface);
  font-weight: 800;
  text-decoration: none;
  transform: translateY(calc(-100% - 16px));
  transition: transform var(--motion-fast) var(--ease-out);
}

.skip-link:focus-visible {
  transform: translateY(0);
}

button,
input,
select {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
.route-card:focus-visible {
  outline: 3px solid rgba(15, 111, 94, 0.3);
  outline-offset: 2px;
}

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

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
  padding: 14px clamp(18px, 4vw, 52px);
  background:
    linear-gradient(135deg, rgba(73, 169, 143, 0.18), transparent 38%),
    linear-gradient(120deg, #08110f 0%, #10241f 54%, #0a1714 100%);
  color: #f7fbf9;
  border-bottom: 1px solid rgba(108, 207, 181, 0.45);
  box-shadow: 0 18px 44px rgba(9, 18, 15, 0.22);
}

.topbar > div:first-child {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 6px;
  color: #6f817c;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.topbar .eyebrow {
  color: #b9c7c1;
}

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

.brand-mark {
  display: block;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  object-fit: contain;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.15;
  letter-spacing: 0;
}

.topbar-subtitle {
  margin: 6px 0 0 60px;
  color: #d5e0dc;
  font-size: 13px;
  line-height: 1.45;
}

h2 {
  margin-bottom: var(--space-4);
  font-size: 18px;
  line-height: 1.25;
  letter-spacing: 0;
}

.version {
  display: grid;
  gap: 4px;
  min-width: 132px;
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.version span {
  color: #c6d4cf;
  font-size: 12px;
}

.version strong {
  overflow: hidden;
  max-width: 24ch;
  color: #fff;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(300px, 352px) minmax(0, 1fr);
  gap: var(--space-5);
  width: min(1480px, 100%);
  margin: 0 auto;
  padding: var(--space-5) clamp(14px, 3vw, 40px) var(--space-6);
}

.douyin-contact-floating {
  position: fixed;
  z-index: 3;
  width: 300px;
  max-height: calc(100vh - 32px);
  overflow: auto;
  padding: var(--space-4);
  border: 1px solid rgba(108, 207, 181, 0.28);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(108, 207, 181, 0.12), transparent 48%),
    #101a17;
  color: #f7fbf9;
  box-shadow: var(--shadow-soft);
}

.douyin-contact-floating[hidden] {
  display: none;
}

.douyin-contact-kicker {
  margin: 0 0 var(--space-2);
  color: var(--green-bright);
  font-size: 12px;
  font-weight: 900;
}

.douyin-contact-floating h2 {
  margin: 0 0 var(--space-3);
  color: #fff;
  font-size: 18px;
}

.douyin-contact-floating > p:not(.douyin-contact-kicker) {
  margin: 0 0 var(--space-3);
  color: #cbd8d3;
  font-size: 13px;
  line-height: 1.65;
}

.contact-action-list {
  display: grid;
  gap: 8px;
}

.contact-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid rgba(108, 207, 181, 0.26);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.055);
  color: #dce8e3;
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--motion-fast) ease, border-color var(--motion-fast) ease, box-shadow var(--motion-fast) ease, transform var(--motion-fast) var(--ease-out);
}

.contact-action.is-primary {
  border-color: rgba(108, 207, 181, 0.5);
  background: var(--green);
  color: #fff;
}

.contact-action:hover,
.contact-action:focus-visible {
  border-color: var(--green-bright);
  background: rgba(108, 207, 181, 0.14);
  box-shadow: 0 8px 18px rgba(4, 14, 12, 0.28);
}

.contact-action.is-primary:hover,
.contact-action.is-primary:focus-visible {
  background: #13836f;
}

.contact-action:focus-visible {
  outline: 3px solid rgba(108, 207, 181, 0.52);
  outline-offset: 3px;
}

.contact-action:active {
  transform: translateY(1px);
}

.contact-dialog {
  width: min(420px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #f8faf9;
  color: var(--ink);
  box-shadow: 0 28px 72px rgba(4, 14, 12, 0.28);
}

.contact-dialog::backdrop {
  background: rgba(4, 14, 12, 0.56);
  backdrop-filter: blur(3px);
}

.contact-dialog[open] {
  animation: contact-dialog-in var(--motion-base) var(--ease-out);
}

.contact-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--line);
  background: #eef4f1;
}

.contact-dialog-kicker {
  margin: 0 0 4px;
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
}

.contact-dialog-head h2 {
  margin: 0;
  font-size: 20px;
}

.contact-dialog-close {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--muted);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.contact-dialog-close:hover,
.contact-dialog-close:focus-visible {
  border-color: var(--green);
  color: var(--green-dark);
}

.contact-copy-list {
  display: grid;
  gap: 10px;
  padding: 20px;
}

.contact-copy-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 64px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: border-color var(--motion-fast) ease, background var(--motion-fast) ease;
}

.contact-copy-row:hover,
.contact-copy-row:focus-visible {
  border-color: rgba(15, 111, 94, 0.5);
  background: var(--green-soft);
}

.contact-channel {
  display: grid;
  place-items: center;
  min-height: 36px;
  border-radius: var(--radius);
  background: var(--green-soft);
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 900;
}

.contact-copy-row strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 14px;
}

.contact-copy-state {
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
}

.payment-qr-wrap {
  display: grid;
  place-items: center;
  padding: 24px;
  background: #fff;
}

.payment-qr-frame {
  position: relative;
  width: min(248px, 72vw);
  aspect-ratio: 1;
  overflow: hidden;
  border: 8px solid #fff;
  background: #fff;
  box-shadow: 0 0 0 1px var(--line), 0 12px 30px rgba(16, 28, 25, 0.12);
}

.payment-qr-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.contact-toast {
  position: fixed;
  top: 18px;
  left: 50%;
  z-index: 20;
  margin: 0;
  padding: 10px 14px;
  transform: translateX(-50%);
  border: 1px solid rgba(108, 207, 181, 0.42);
  border-radius: var(--radius);
  background: #101a17;
  color: #fff;
  box-shadow: var(--shadow-soft);
  font-size: 13px;
  font-weight: 800;
}

.contact-toast[hidden] {
  display: none;
}

@keyframes contact-dialog-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
}

.control-panel,
.result-area {
  background: rgba(244, 247, 245, 0.97);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.control-panel {
  align-self: start;
  position: sticky;
  top: 16px;
  overflow: hidden;
}

.panel-section {
  padding: var(--space-4);
  border-bottom: 1px solid var(--line);
}

.section-title {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.section-title h2 {
  margin: 0;
  font-size: 16px;
}

.step {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.field-label {
  display: block;
  margin: 10px 0 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.text-field,
.select-field {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  padding: 9px 11px;
  transition: border-color var(--motion-fast) ease, box-shadow var(--motion-fast) ease;
}

.text-field::placeholder {
  color: #8b9a95;
}

.text-field:focus {
  border-color: rgba(15, 111, 94, 0.55);
  box-shadow: 0 0 0 4px rgba(15, 111, 94, 0.1);
}

.champion-meta,
.item-row,
.tag-grid,
.required-route-row,
.special-augment-tabs,
.special-augment-prerequisites,
.situation-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.champion-meta {
  margin-top: 12px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.picker-toolbar {
  margin-top: 10px;
}

.role-filter {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  min-height: 50px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.role-filter-button {
  position: relative;
  display: grid;
  gap: 2px;
  place-items: center;
  min-width: 0;
  min-height: 50px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background var(--motion-fast) ease, color var(--motion-fast) ease;
}

.role-filter-button:last-child {
  border-right: 0;
}

.role-filter-button svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: square;
  stroke-linejoin: miter;
  stroke-width: 2.05;
}

.role-filter-button span {
  color: currentColor;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

.role-filter-button:hover,
.role-filter-button:focus-visible {
  color: var(--green-dark);
  background: #fff;
}

.role-filter-button.is-active {
  color: var(--green-dark);
  background: var(--green-soft);
}

.role-filter-button.is-active::after {
  content: "";
  position: absolute;
  right: 9px;
  bottom: 0;
  left: 9px;
  height: 2px;
  background: var(--green);
}

.selected-champion {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: var(--space-3);
  align-items: center;
  min-height: 78px;
  margin-top: var(--space-3);
  padding: var(--space-3);
  border: 1px solid rgba(15, 111, 94, 0.24);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(15, 111, 94, 0.09), transparent 52%), var(--surface-soft);
  color: var(--ink);
}

.selected-champion img,
.selected-fallback {
  width: 58px;
  height: 58px;
  border: 2px solid rgba(15, 111, 94, 0.32);
  border-radius: 6px;
  object-fit: cover;
}

.selected-fallback,
.portrait-fallback,
.item-icon-fallback,
.augment-icon-fallback {
  display: grid;
  place-items: center;
}

.selected-fallback,
.portrait-fallback {
  background: #18241f;
  color: var(--green-soft);
  font-weight: 900;
}

.selected-fallback {
  background: var(--green-soft);
  color: var(--green-dark);
}

.selected-name {
  display: block;
  overflow: hidden;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 19px;
  font-weight: 900;
}

.selected-title {
  display: block;
  overflow: hidden;
  margin-top: 4px;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.champion-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(54px, 1fr));
  grid-auto-rows: 78px;
  gap: 8px;
  max-height: 370px;
  margin-top: var(--space-3);
  overflow-y: auto;
  padding: var(--space-3);
  border: 1px solid #263832;
  border-radius: var(--radius);
  background: #07110f;
  contain: layout paint style;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
  scrollbar-color: var(--green) #14201d;
  -webkit-overflow-scrolling: touch;
}

.champion-tile {
  position: relative;
  display: grid;
  gap: 4px;
  min-width: 0;
  border: 0;
  background: transparent;
  color: #cfdbd7;
  cursor: pointer;
  padding: 0;
  text-align: center;
  contain: layout paint;
}

.champion-portrait {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid #365149;
  border-radius: 6px;
  background: #13201c;
  transition: border-color var(--motion-fast) ease, box-shadow var(--motion-fast) ease, transform var(--motion-fast) var(--ease-out);
}

.champion-portrait img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.portrait-fallback {
  width: 100%;
  height: 100%;
  font-size: 22px;
}

.champion-tile:hover .champion-portrait,
.champion-tile:focus-visible .champion-portrait {
  border-color: var(--green-bright);
  box-shadow: 0 0 0 2px rgba(108, 207, 181, 0.22);
  transform: translateY(-1px);
}

.champion-tile.is-active .champion-portrait {
  border-color: var(--green-bright);
  box-shadow: 0 0 0 2px rgba(108, 207, 181, 0.4), inset 0 0 0 1px rgba(255, 255, 255, 0.32);
}

.champion-tile.is-active::after {
  content: "";
  position: absolute;
  top: -4px;
  right: -4px;
  width: 16px;
  height: 16px;
  border: 1px solid #a7ead8;
  border-radius: 50%;
  background: var(--green);
}

.champion-tile span {
  overflow: hidden;
  color: #c6d2cf;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  line-height: 1.2;
}

.empty-champions {
  display: grid;
  grid-column: 1 / -1;
  min-height: 80px;
  place-items: center;
  color: #8ea19c;
  font-size: 13px;
}

.panel-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: var(--space-3) var(--space-4);
  background: var(--surface-alt);
  border-top: 1px solid var(--line);
}

.icon-button,
.small-button,
.recommendation-view-tabs button,
.special-augment-tabs button {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  transition: border-color var(--motion-fast) ease, background var(--motion-fast) ease, color var(--motion-fast) ease, transform var(--motion-fast) var(--ease-out), box-shadow var(--motion-fast) ease;
}

.icon-button:hover,
.small-button:hover,
.recommendation-view-tabs button:hover,
.special-augment-tabs button:hover {
  border-color: var(--line-strong);
  box-shadow: 0 6px 14px rgba(20, 37, 32, 0.08);
}

.icon-button:active,
.small-button:active,
.recommendation-view-tabs button:active,
.special-augment-tabs button:active,
.route-card:active {
  transform: translateY(1px);
}

.icon-button {
  width: 42px;
  height: 42px;
  font-size: 22px;
  line-height: 1;
}

.small-button {
  min-height: 36px;
  padding: 7px 13px;
  font-weight: 800;
}

.result-area {
  display: grid;
  align-content: start;
  gap: 0;
}

.load-status {
  margin: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(186, 55, 42, 0.38);
  border-radius: 12px;
  color: #7f1d1d;
  background: rgba(254, 226, 226, 0.92);
}

.result-area[aria-busy="true"] {
  cursor: progress;
}

.recommendation-band {
  display: grid;
  align-items: start;
  gap: var(--space-4);
  min-height: 104px;
  margin: var(--space-4) var(--space-4) var(--space-2);
  padding: var(--space-5);
  border: 1px solid var(--line);
  border-left: 5px solid var(--green);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 14px 34px rgba(20, 37, 32, 0.12);
}

.recommendation-view-tabs {
  justify-self: start;
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 4px;
  width: min(360px, 100%);
  padding: 4px;
  border: 1px solid rgba(15, 111, 94, 0.24);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.special-augment-tabs button {
  min-height: 32px;
  border-radius: 999px;
  color: var(--muted);
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 900;
}

.recommendation-view-tabs button {
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--green-dark);
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 900;
  box-shadow: none;
}

.recommendation-view-tabs button:hover,
.recommendation-view-tabs button:focus-visible {
  background: #fff;
  color: var(--green-dark);
}

.recommendation-view-tabs button.is-active {
  background: var(--green);
  color: #fff;
  box-shadow: 0 6px 16px rgba(15, 111, 94, 0.18);
}

.recommendation-view-panel[hidden],
.current-recommendation-section[hidden] {
  display: none;
}

.recommendation-view-panel:not([hidden]) {
  animation: recommendation-panel-enter var(--motion-base) var(--ease-out);
}

.recommendation-main {
  display: grid;
  align-content: center;
  min-width: 0;
  min-height: 100px;
}

.recommendation-band h2 {
  margin: 0;
  color: #0f201b;
  font-size: clamp(24px, 3vw, 36px);
}

.quick-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.meta-chip,
.match-chip,
.item-chip,
.required-route-row strong,
.situation-chip,
.special-augment-rarity,
.augment-card-head span,
.augment-card-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 900;
}

.summary-cell {
  display: grid;
  align-content: start;
  gap: 5px;
  min-width: 0;
  min-height: 92px;
  border: 1px solid rgba(42, 110, 88, 0.14);
  border-radius: var(--radius);
  background: var(--surface);
  padding: var(--space-3);
}

.summary-cell span {
  color: #34514a;
  font-size: 12px;
  font-weight: 900;
}

.summary-cell strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #0f201b;
  font-size: 15px;
  line-height: 1.35;
}

.summary-cell p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.summary-cell.is-warning {
  border-color: #ead7aa;
  background: #fff7e8;
}

.summary-cell.is-warning strong {
  color: var(--amber);
}

.result-section {
  padding: var(--space-5);
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.required-route-row {
  align-items: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.required-route-row strong {
  border: 1px solid rgba(147, 93, 18, 0.38);
  background: rgba(147, 93, 18, 0.12);
  color: var(--amber);
  padding: 4px 9px;
}

.required-item-row strong {
  border-color: rgba(15, 111, 94, 0.38);
  background: rgba(15, 111, 94, 0.12);
  color: var(--teal);
}

.route-prerequisite-row strong {
  border-color: rgba(15, 111, 94, 0.42);
  background: var(--green-soft);
  color: var(--green-dark);
}

.item-chip,
.meta-chip,
.match-chip {
  min-height: 34px;
  padding: 7px 10px;
  font-size: 13px;
}

.item-chip {
  gap: 7px;
  background: var(--amber-soft);
  color: var(--amber);
  padding: 5px 9px 5px 6px;
}

.item-icon {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border: 1px solid rgba(147, 93, 18, 0.32);
  border-radius: 5px;
  background: #241b12;
  object-fit: cover;
}

.item-icon-fallback {
  color: var(--green-soft);
  font-size: 12px;
  font-weight: 900;
}

.meta-chip {
  background: var(--surface-alt);
  color: var(--muted);
}

.match-chip {
  background: var(--blue-soft);
  color: var(--blue);
}

.route-list,
.stack-list,
.special-augment-builds,
.special-augment-record,
.breakdown-list,
.item-plan,
.validation-list,
.reason-box {
  display: grid;
  gap: var(--space-3);
}

.route-list {
  gap: var(--space-3);
}

.route-card {
  display: grid;
  gap: var(--space-3);
  padding: var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  cursor: pointer;
  transition: border-color var(--motion-fast) ease, box-shadow var(--motion-fast) ease, transform var(--motion-fast) var(--ease-out);
}

.route-card.is-top {
  border-color: rgba(15, 111, 94, 0.58);
  background: linear-gradient(180deg, #ffffff 0%, #f2fbf8 100%);
}

.route-card:hover,
.route-card:focus-visible {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(15, 111, 94, 0.11);
}

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

.route-head h3 {
  margin: 0 0 4px;
  font-size: 17px;
  letter-spacing: 0;
}

.route-collapse-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  transition: border-color var(--motion-fast) ease, background var(--motion-fast) ease, color var(--motion-fast) ease;
}

.route-collapse-button:hover,
.route-collapse-button:focus-visible {
  border-color: rgba(15, 111, 94, 0.42);
  background: var(--green-soft);
  outline: none;
}

.route-source {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.route-variant-list {
  display: grid;
  gap: var(--space-3);
  padding-top: 4px;
  border-top: 1px solid var(--line);
  animation: route-details-enter var(--motion-base) var(--ease-out);
}

.route-variant-row {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.route-variant-row + .route-variant-row {
  padding-top: var(--space-3);
  border-top: 1px dashed rgba(88, 113, 108, 0.24);
}

.route-variant-head,
.variant-trigger-row,
.variant-chip-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.route-variant-head > strong {
  color: var(--ink);
  font-size: 13px;
}

.variant-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
}

.variant-chip .augment-icon,
.variant-chip .augment-icon-fallback {
  width: 24px;
  height: 24px;
  min-width: 24px;
  border-radius: 50%;
  font-size: 10px;
}

.route-variant-items {
  gap: 6px;
}

.route-variant-summary {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.variant-augment-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.variant-augment-cell {
  display: grid;
  align-content: start;
  gap: 5px;
  min-width: 0;
}

.variant-augment-cell > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

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

.augment-column,
.item-plan-stage,
.special-build-card,
.stat-tile,
.validation-item,
.stack-entry,
.breakdown-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.augment-column {
  display: grid;
  align-content: start;
  gap: var(--space-3);
  min-width: 0;
  padding: var(--space-3);
  background: var(--surface-soft);
}

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

.augment-column h3 {
  margin: 0;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-size: 15px;
}

.augment-column.is-prismatic h3 {
  color: var(--violet);
}

.augment-column.is-gold h3 {
  color: var(--amber);
}

.augment-column.is-silver h3 {
  color: #53666c;
}

.augment-card {
  display: grid;
  gap: 6px;
  min-height: 0;
  padding: var(--space-3);
  border: 1px solid var(--line);
  border-left-width: 4px;
  border-radius: var(--radius);
  background: #fff;
}

.augment-card.is-silver {
  border-color: #a5b0b4;
  background: linear-gradient(180deg, #fff 0%, #f4f7f8 100%);
}

.augment-card.is-gold {
  border-color: #c9952e;
  background: linear-gradient(180deg, #fffdfa 0%, #fff3d8 100%);
}

.augment-card.is-prismatic {
  border-color: #8f6be8;
  background: linear-gradient(180deg, #fff 0%, #f4efff 100%);
}

.augment-card.is-owned {
  border-color: var(--green);
  background: var(--green-soft);
}

.augment-card.is-caution {
  border-color: rgba(147, 93, 18, 0.34);
  background: #fff8ec;
}

.augment-card.is-empty {
  color: var(--muted);
}

.augment-card-top {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

.augment-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.augment-icon {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(22, 96, 125, 0.35);
  border-radius: 7px;
  background: #101b22;
  object-fit: cover;
}

.augment-icon-fallback {
  color: var(--blue);
  font-weight: 900;
}

.augment-card-main,
.special-augment-panel,
.special-augment-title,
.special-build-card {
  min-width: 0;
}

.augment-card-head strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.augment-card-head span,
.augment-card-meta span {
  flex: 0 0 auto;
  padding: 2px 7px;
  font-size: 11px;
}

.augment-card-head span {
  background: var(--surface-alt);
  color: var(--muted);
}

.augment-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

.augment-card-meta span {
  background: var(--blue-soft);
  color: var(--blue);
}

.augment-card.is-silver .augment-card-meta span {
  background: #e9eef0;
  color: #516369;
}

.augment-card.is-gold .augment-card-meta span {
  background: #f5dfad;
  color: #815615;
}

.augment-card.is-prismatic .augment-card-meta span {
  background: var(--violet-soft);
  color: #6741b8;
}

.augment-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.special-augment-panel {
  display: grid;
  align-content: start;
  gap: 12px;
}

.special-augment-panel-head,
.special-augment-head,
.template-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.special-augment-panel-head h2 {
  margin: 0;
  font-size: 16px;
}

.special-augment-tabs {
  justify-content: flex-end;
  gap: 6px;
}

.special-augment-tabs button.is-active {
  border-color: rgba(15, 111, 94, 0.34);
  background: var(--green-soft);
  color: var(--green-dark);
}

.special-augment-head {
  gap: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.special-augment-title {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.special-augment-icons {
  display: inline-flex;
  align-items: center;
}

.special-augment-icons .augment-icon + .augment-icon {
  margin-left: -7px;
}

.special-augment-title .augment-icon {
  width: 34px;
  height: 34px;
}

.special-augment-title h3 {
  margin: 0 0 4px;
  font-size: 15px;
  letter-spacing: 0;
}

.special-augment-title p,
.special-augment-summary,
.special-build-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.special-augment-rarity {
  flex: 0 0 auto;
  background: var(--violet-soft);
  color: var(--violet);
  padding: 5px 9px;
}

.special-augment-prerequisites {
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.special-augment-prerequisites strong {
  min-height: 28px;
  border: 1px solid rgba(15, 111, 94, 0.42);
  background: var(--green-soft);
  color: var(--green-dark);
  padding: 4px 9px;
}

.special-augment-notes {
  display: grid;
  gap: 6px;
}

.special-augment-notes span {
  border: 1px solid rgba(40, 95, 143, 0.18);
  border-radius: var(--radius);
  background: var(--blue-soft);
  color: #2d577d;
  padding: 7px 9px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}

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

.special-build-card {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: var(--space-3);
}

.special-build-card h4 {
  margin: 0;
  color: var(--green);
  font-size: 15px;
  letter-spacing: 0;
}

.special-build-card .item-row {
  gap: 6px;
}

.special-build-card .item-chip {
  min-height: 30px;
  padding: 4px 7px 4px 5px;
  font-size: 12px;
}

.special-build-card .item-chip span {
  overflow-wrap: anywhere;
}

.special-build-card .item-icon {
  width: 24px;
  height: 24px;
}

.special-champion-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.special-champion-chip {
  display: inline-flex;
  width: 34px;
  height: 34px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f7faf8;
}

.special-champion-chip img,
.special-champion-chip .portrait-fallback {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.special-build-row {
  display: grid;
  gap: 6px;
}

.special-build-row > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.special-build-note {
  color: var(--amber) !important;
  font-weight: 800;
}

.special-build-empty {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.item-plan {
  grid-template-columns: repeat(3, minmax(260px, 1fr));
  align-items: stretch;
}

.item-plan-stage {
  display: grid;
  align-content: start;
  min-height: 136px;
  padding: var(--space-3);
}

.item-plan-stage:first-child {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3) var(--space-4);
}

.item-plan-stage:first-child h3 {
  grid-column: 1 / -1;
}

.item-plan-stage h3 {
  margin: 0 0 var(--space-3);
  font-size: 15px;
}

.item-plan-entry {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  min-height: 58px;
  padding: 7px 0;
  border-top: 1px solid var(--line);
}

.item-plan-entry:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.item-plan-entry strong {
  display: block;
  color: var(--amber);
}

.item-plan-entry span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.item-plan-entry .item-icon {
  width: 32px;
  height: 32px;
}

.breakdown-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  color: #33433f;
  line-height: 1.5;
}

.breakdown-item::before {
  content: "+";
  flex: 0 0 auto;
  color: var(--green);
  font-weight: 900;
}

.breakdown-item.is-risk,
.validation-item.is-warning {
  border-color: #edc3c7;
  background: var(--red-soft);
}

.warning-section .stack-entry {
  border-color: #ead7aa;
  background: #fffaf0;
}

.breakdown-item.is-risk::before {
  content: "-";
  color: var(--red);
}

.stack-entry {
  padding: 12px;
}

.stack-entry strong {
  display: block;
  margin-bottom: 4px;
}

.stack-entry p {
  margin: 0;
  color: #4f5f5b;
  line-height: 1.6;
}

.pitfall-warning-entry {
  display: grid;
  gap: 10px;
}

.warning-augment-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.warning-augment-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 4px 10px 4px 5px;
  border: 1px solid #d9c28d;
  border-radius: 9px;
  background: #fff;
  color: #12211e;
  box-shadow: 0 1px 0 rgba(34, 45, 42, 0.04);
}

.warning-augment-chip strong {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.2;
}

.warning-augment-chip .augment-icon {
  width: 30px;
  height: 30px;
  border-radius: 6px;
}

.item-stack-entry {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.item-stack-entry .item-icon {
  width: 38px;
  height: 38px;
}

.situation-chip {
  min-height: 24px;
  background: var(--amber-soft);
  color: var(--amber);
  padding: 3px 8px;
}

.situation-chip.is-priority {
  background: var(--green-soft);
  color: var(--green-dark);
}

.warning-section {
  border-left: 4px solid var(--amber);
}

@keyframes recommendation-panel-enter {
  from {
    opacity: 0;
    transform: translateY(4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes route-details-enter {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reason-line {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: #33433f;
  line-height: 1.7;
}

.reason-line::before {
  content: "";
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  margin-top: 10px;
  border-radius: 50%;
  background: var(--green);
}

.template-head {
  align-items: center;
}

.template-preview,
.debug-preview {
  overflow: auto;
  margin: 0;
  border-radius: var(--radius);
  background: #111a17;
  color: #dff0eb;
  line-height: 1.55;
}

.template-preview {
  max-height: 380px;
  padding: 16px;
  font-size: 13px;
}

.maintenance-section {
  border-left: 4px solid var(--blue);
}

.maintenance-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.stat-tile {
  min-height: 72px;
  padding: 12px;
  background: var(--surface-alt);
}

.stat-tile span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.stat-tile strong {
  display: block;
  overflow: hidden;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 20px;
}

.validation-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 40px;
  padding: 10px 12px;
  color: #33433f;
  line-height: 1.55;
}

.validation-item::before {
  content: "";
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  margin-top: 7px;
  border-radius: 50%;
  background: var(--green);
}

.validation-item.is-warning::before {
  background: var(--red);
}

.debug-details {
  margin-top: 12px;
}

.debug-details summary {
  cursor: pointer;
  color: var(--blue);
  font-weight: 800;
}

.debug-preview {
  max-height: 260px;
  margin: 10px 0 0;
  padding: 14px;
  font-size: 12px;
}

.copy-fallback {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(8, 17, 15, 0.46);
}

.copy-fallback-box {
  display: grid;
  gap: 10px;
  width: min(520px, 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 16px;
  box-shadow: 0 22px 62px rgba(8, 17, 15, 0.24);
}

.copy-fallback-box strong {
  font-size: 16px;
}

.copy-fallback-box p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.copy-fallback-box textarea {
  width: 100%;
  min-height: 180px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  color: var(--ink);
  font: inherit;
  line-height: 1.5;
}

.copy-fallback-box button {
  justify-self: end;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--green);
  color: #fff;
  padding: 7px 14px;
  cursor: pointer;
  font-weight: 800;
}

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

@media (max-width: 940px) {
  .topbar,
  .route-head,
  .special-augment-head {
    align-items: stretch;
    flex-direction: column;
  }

  .app-shell,
  .recommendation-band,
  .augment-recommendations,
  .special-build-grid,
  .item-plan,
  .maintenance-stats {
    grid-template-columns: 1fr;
  }

  .item-plan-stage:first-child {
    grid-template-columns: 1fr;
  }

  .control-panel {
    position: static;
    display: block;
    max-height: none;
  }

  .special-augment-panel {
    border-top: 1px solid var(--line);
    padding-top: 14px;
  }
}

@media (max-width: 520px) {
  .topbar {
    min-height: auto;
  }

  .brand-heading {
    gap: 10px;
  }

  .brand-mark {
    flex-basis: 40px;
    width: 40px;
    height: 40px;
  }

  .topbar-subtitle {
    margin-left: 50px;
  }

  .app-shell {
    padding-right: 0;
    padding-left: 0;
  }

  .champion-grid {
    grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
    grid-auto-rows: 74px;
    max-height: 310px;
  }

  .control-panel,
  .result-area {
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  .panel-section,
  .result-section,
  .recommendation-band {
    padding: var(--space-4);
  }

  .panel-actions {
    position: sticky;
    bottom: 0;
    z-index: 5;
    justify-content: space-between;
  }

  .recommendation-band {
    position: sticky;
    top: 0;
    z-index: 4;
    gap: var(--space-3);
    margin: var(--space-3);
    border: 1px solid var(--line);
    border-left: 4px solid var(--green);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: 0 8px 18px rgba(16, 28, 25, 0.12);
  }

  .recommendation-view-tabs {
    width: 100%;
  }

  .recommendation-band h2 {
    font-size: 24px;
  }

  .quick-summary {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .summary-cell {
    min-height: auto;
  }
}
