:root {
  --bg: #0d1424;
  --bg-elev: #141d33;
  --card: #1a2033;
  --text: #ffffff;
  --muted: #7890b3;
  --link: #a3cff4;
  --accent: #e3b866;
  --accent-soft: rgba(227, 184, 102, 0.14);
  --blue: #4b78ad;
  --ok: #5fd39a;
  --warn: #e3b866;
  --border: #4a5981;
  --border-soft: rgba(75, 120, 173, 0.2);
  --radius: 4px;
  --radius-sm: 4px;
  --shadow: none;
}

*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, "Segoe UI", Roboto, sans-serif;
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(224,177,90,0.08), transparent 55%),
    var(--bg);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

header.app-header {
  padding: 1.15rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: rgba(34, 28, 22, 0.94);
  position: sticky;
  top: 0;
  z-index: 20;
}
header.app-header h1 { margin: 0 0 0.3rem; font-size: 1.35rem; letter-spacing: -0.02em; }
header.app-header .sub { margin: 0; color: var(--muted); font-size: 0.9rem; }
.top-nav { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; }
.top-nav a { color: var(--muted); text-decoration: none; font-size: 0.78rem; font-weight: 600; padding: 0.28rem 0.7rem; border: 1px solid var(--border); border-radius: 999px; background: var(--bg-elev); }
.top-nav a:hover { color: var(--text); border-color: var(--accent); text-decoration: none; }
.top-nav a.active { color: var(--text); border-color: rgba(224,177,90,0.55); background: var(--accent-soft); }

.wrap { max-width: 1100px; margin: 0 auto; padding: 1.5rem 1.5rem 3.5rem; }
.section-title {
  margin: 0 0 0.75rem;
  padding: 0.65rem 0.95rem;
  font-size: 1.05rem;
  color: var(--accent);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  background: var(--bg-elev);
}

.bp-wrap section { margin-bottom: 1.25rem; }
.bp-inputs { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; padding: 1.1rem 1.15rem; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.bp-field { position: relative; display: flex; flex-direction: column; gap: 0.4rem; }
.bp-field label { font-size: 0.82rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.chip-box { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; min-height: 2.6rem; padding: 0.35rem 0.5rem; background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.chip-box:focus-within { border-color: var(--accent); }
.chips { display: contents; }
.chip-box input { flex: 1 1 120px; min-width: 100px; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 0.92rem; padding: 0.3rem 0.2rem; }
.mic-btn { flex: 0 0 auto; border: 1px solid var(--border); background: transparent; color: var(--muted); border-radius: var(--radius-sm); padding: 0.25rem 0.55rem; font: inherit; font-size: 0.75rem; font-weight: 700; cursor: pointer; }
.mic-btn:hover { border-color: var(--accent); color: var(--text); }
.mic-btn.on { color: var(--text); border-color: var(--accent); background: var(--accent-soft); }
.chip { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.2rem 0.3rem 0.2rem 0.6rem; border-radius: 999px; font-size: 0.8rem; font-weight: 600; border: 1px solid var(--border); background: #120f0c; }
.chip button { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 1rem; line-height: 1; padding: 0 0.25rem; }
.chip button:hover { color: var(--text); }
.chip-ban { border-color: rgba(224,168,74,0.55); color: var(--warn); }
.chip-ally { border-color: rgba(61,186,122,0.55); color: var(--ok); }
.chip-enemy { border-color: rgba(220,90,90,0.6); color: #e88a8a; }
.ac-list { position: absolute; top: 100%; left: 0; right: 0; z-index: 20; margin: 0.25rem 0 0; padding: 0.3rem; list-style: none; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow); max-height: 280px; overflow-y: auto; }
.ac-list li { padding: 0.45rem 0.6rem; border-radius: 6px; cursor: pointer; font-size: 0.88rem; }
.ac-list li:hover, .ac-list li.on { background: var(--accent-soft); }
.ac-list li.ac-none { color: var(--muted); cursor: default; }
.ac-list.hidden { display: none; }
.bp-actions { grid-column: 1 / -1; display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.bp-actions button, .rank-chip, .role-chip { font: inherit; }
.bp-actions > button { padding: 0.4rem 0.9rem; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--bg-elev); color: var(--text); cursor: pointer; font-size: 0.85rem; }
.bp-actions > button:hover { border-color: var(--accent); }
.bp-rank-switch { display: inline-flex; gap: 0.35rem; }
.rank-chip, .role-chip { border: 1px solid var(--border); background: var(--bg-elev); color: var(--muted); border-radius: 999px; padding: 0.28rem 0.7rem; font-size: 0.78rem; font-weight: 600; cursor: pointer; }
.rank-chip.on, .role-chip.on { color: var(--text); border-color: rgba(224,177,90,0.55); background: var(--accent-soft); }
.bp-msg { color: var(--warn); font-size: 0.85rem; }
.bp-formula { padding: 1.1rem 1.15rem; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); }
.bp-formula .section-title { margin-top: 0; }
.formula-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 0.75rem; margin-bottom: 0.75rem; }
.formula-card { padding: 0.8rem 0.95rem; background: var(--bg-elev); border: 1px solid var(--border-soft); border-radius: var(--radius-sm); }
.formula-card h3 { margin: 0 0 0.4rem; font-size: 0.92rem; color: var(--accent); }
.formula { margin: 0; font-family: ui-monospace, Consolas, monospace; font-size: 0.84rem; line-height: 1.6; }
.formula-notes { margin: 0; padding-left: 1.2rem; color: var(--muted); font-size: 0.85rem; }
.formula-notes li { margin: 0.25rem 0; }
.bp-results { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1.1rem; align-items: start; }
.bp-col .section-title { margin-top: 0; }
.bp-list { display: grid; gap: 0.75rem; }
.bp-empty { margin: 0; padding: 1rem; color: var(--muted); background: var(--card); border: 1px dashed var(--border); border-radius: var(--radius); font-size: 0.9rem; }
.bp-card { padding: 0.9rem 1rem 1rem; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.bp-head { display: flex; align-items: center; gap: 0.75rem; }
.bp-rank { flex: 0 0 auto; width: 1.9rem; height: 1.9rem; border-radius: 999px; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.85rem; background: #120f0c; border: 1px solid var(--border); color: var(--muted); }
.bp-title { flex: 1 1 auto; min-width: 0; }
.bp-title h3 { margin: 0; font-size: 1rem; }
.bp-role { font-size: 0.76rem; color: var(--muted); }
.bp-score { flex: 0 0 auto; font-weight: 800; font-size: 1.05rem; color: var(--ok); padding: 0.2rem 0.6rem; border-radius: var(--radius-sm); background: rgba(61,186,122,0.12); border: 1px solid rgba(61,186,122,0.35); }
.bp-score.count { font-size: 0.78rem; font-weight: 700; }
.bp-why { list-style: none; margin: 0.7rem 0 0; padding: 0; display: grid; gap: 0.25rem; font-size: 0.82rem; }
.bp-why li { display: flex; justify-content: space-between; gap: 0.75rem; padding: 0.3rem 0.55rem; background: var(--bg-elev); border-radius: 6px; }
.bp-why li b { font-variant-numeric: tabular-nums; }
.bp-why li.plus b { color: var(--ok); }
.bp-why li.minus b { color: #e88a8a; }
.bp-meta { margin-top: 0.65rem; font-size: 0.75rem; color: var(--muted); }
.bp-col-head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 0.6rem; }
.bp-col-head .section-title { margin: 0; }
.bp-roles { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0 0 0.7rem; }
footer.app-footer { color: var(--muted); font-size: 0.82rem; text-align: center; padding: 1.75rem 1.25rem 2rem; border-top: 1px solid var(--border); }
@media (max-width: 560px) { .wrap { padding: 1.15rem 1rem 2.5rem; } }

/* Ikon hero kecil di kartu rekomendasi dan chip ban */
.bp-title h3 { display: flex; align-items: center; gap: 0.4rem; }
.bp-ico { flex: 0 0 auto; width: 24px; height: 24px; border-radius: 50%; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; background: #2a2218; color: var(--text); font-size: 0.6rem; font-weight: 700; }
.chip .bp-ico { width: 18px; height: 18px; font-size: 0.5rem; margin-left: -0.35rem; }
.bp-ico img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bp-ico [hidden] { display: none; }

/* ===== Tema mirip tabel rank mobilelegends.com ===== */
body { font-family: Arial, Helvetica, sans-serif; background: linear-gradient(180deg, #111a2e 0, #0d1424 420px) fixed, var(--bg); color: var(--link); }
a { color: var(--link); }
header.app-header { display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem 1.5rem; padding: 0.7rem 1.5rem; background: rgba(9, 13, 24, 0.96); border-bottom: 1px solid var(--border-soft); }
.brand { display: flex; align-items: center; gap: 0.75rem; min-width: 0; }
.brand-mark { flex: 0 0 auto; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.95rem; color: #1a1408; background: linear-gradient(160deg, #f6dc9c, #c8913a); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
header.app-header h1 { margin: 0; font-size: 1.25rem; color: var(--text); text-transform: uppercase; letter-spacing: 0.04em; }
header.app-header .sub { font-size: 0.8rem; color: var(--muted); }
.top-nav { margin: 0 0 0 auto; gap: 0.25rem; }
.top-nav a { border: 0; border-radius: 0; background: transparent; color: var(--muted); font-size: 0.85rem; font-weight: 400; padding: 0.5rem 0.75rem; border-bottom: 2px solid transparent; }
.top-nav a:hover { color: var(--text); }
.top-nav a.active { background: transparent; color: var(--text); border-bottom-color: var(--accent); }
.wrap { max-width: 1200px; }
.section-title { background: rgba(20, 39, 64, 0.6); border: 1px solid var(--border-soft); border-radius: 0; color: var(--text); font-weight: 400; font-size: 1rem; text-transform: uppercase; letter-spacing: 0.06em; }
.bp-inputs, .bp-formula { background: rgba(26, 32, 51, 0.85); border: 1px solid var(--border-soft); border-radius: 0; box-shadow: none; }
.bp-field label { color: var(--muted); font-weight: 400; font-size: 0.85rem; }
.chip-box { background: transparent; border: 1px solid var(--border); border-radius: 4px; }
.chip-box:focus-within { border-color: var(--link); }
.chip-box input { color: var(--text); }
.chip-box input::placeholder { color: var(--muted); }
.mic-btn { border-color: var(--border); color: var(--link); border-radius: 4px; }
.mic-btn:hover, .mic-btn.on { border-color: var(--link); background: rgba(75, 120, 173, 0.25); color: var(--text); }
.chip { background: rgba(20, 39, 64, 0.8); border-radius: 999px; font-weight: 400; color: var(--text); }
.chip-ban { border-color: rgba(227, 184, 102, 0.6); }
.chip-ally { border-color: rgba(95, 211, 154, 0.6); }
.chip-enemy { border-color: rgba(232, 110, 110, 0.65); }
.chip button { color: var(--muted); }
.ac-list { background: #1a2033; border-color: var(--border); border-radius: 4px; }
.ac-list li { color: var(--link); border-radius: 0; }
.ac-list li:hover, .ac-list li.on { background: rgba(75, 120, 173, 0.3); color: var(--text); }
.bp-actions > button, .rank-chip, .role-chip { background: transparent; border: 1px solid var(--border); border-radius: 4px; color: var(--muted); font-weight: 400; }
.bp-actions > button { color: var(--link); }
.bp-actions > button:hover { border-color: var(--link); color: var(--text); }
.rank-chip.on, .role-chip.on { background: rgba(75, 120, 173, 0.3); border-color: var(--link); color: var(--text); }
.bp-list { gap: 0; border: 1px solid var(--border-soft); border-top: 0; background: rgba(26, 32, 51, 0.6); }
.bp-list:empty { display: none; }
.bp-thead { display: grid; grid-template-columns: 3.2rem 1fr auto; gap: 0.75rem; padding: 0.6rem 1rem; background: rgba(20, 39, 64, 0.6); border: 1px solid var(--border-soft); color: var(--muted); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.05em; }
.bp-thead span:last-child { text-align: right; }
.bp-empty { background: transparent; border: 0; border-radius: 0; color: var(--muted); }
.bp-card { padding: 0.75rem 1rem; background: transparent; border: 0; border-bottom: 1px solid var(--border-soft); border-radius: 0; box-shadow: none; }
.bp-card:last-child { border-bottom: 0; }
.bp-card:hover { background: rgba(75, 120, 173, 0.08); }
.bp-rank { width: 2.4rem; height: 2.4rem; margin-right: 0.8rem; border: 0; border-radius: 0; background: transparent; color: var(--link); font-size: 1rem; font-weight: 400; }
.bp-card:nth-child(-n+3) .bp-rank { color: #2a1f0c; font-weight: 700; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); background: linear-gradient(160deg, #f6dc9c, #b8822f); }
.bp-card:nth-child(2) .bp-rank { background: linear-gradient(160deg, #eef2f7, #8e9cb0); }
.bp-card:nth-child(3) .bp-rank { background: linear-gradient(160deg, #e9b98a, #96592d); }
.bp-title h3 { gap: 0.6rem; font-weight: 400; font-size: 1.05rem; color: var(--link); }
.bp-title .bp-ico { width: 40px; height: 40px; font-size: 0.85rem; background: #26304d; box-shadow: 0 0 0 1px rgba(163, 207, 244, 0.25); }
.bp-role { display: block; margin-left: calc(40px + 0.6rem); color: var(--muted); }
.bp-score { background: transparent; border: 0; color: var(--text); font-weight: 400; font-size: 1.05rem; }
.bp-score.count { color: var(--link); }
.bp-why { margin-left: calc(3.2rem + 0rem); }
.bp-why li { background: rgba(20, 39, 64, 0.6); border-radius: 0; color: var(--link); }
.bp-why li.plus b { color: var(--ok); }
.bp-meta { margin-left: 3.2rem; color: var(--muted); }
.formula-card { background: rgba(20, 39, 64, 0.6); border: 1px solid var(--border-soft); border-radius: 0; }
.formula-card h3 { color: var(--accent); font-weight: 400; }
.formula { color: var(--text); }
footer.app-footer { border-top: 1px solid var(--border-soft); background: rgba(9, 13, 24, 0.96); }
@media (max-width: 560px) {
  header.app-header { padding: 0.6rem 1rem; }
  .top-nav { margin: 0; width: 100%; }
  .bp-thead { grid-template-columns: 2.6rem 1fr auto; padding: 0.5rem 0.75rem; }
  .bp-card { padding: 0.65rem 0.75rem; }
  .bp-rank { width: 2rem; height: 2rem; margin-right: 0.6rem; font-size: 0.9rem; }
  .bp-title .bp-ico { width: 34px; height: 34px; }
  .bp-role { margin-left: calc(34px + 0.6rem); }
  .bp-why, .bp-meta { margin-left: 0; }
}
.bp-col-head { display: block; }
.bp-col > .section-title, .bp-col-head .section-title { display: block; width: 100%; }
.rank-chip, .role-chip, .bp-actions > button { font-size: 0.85rem; padding: 0.35rem 0.8rem; }

/* Latar dari hero rekomendasi pick #1 (js/hero-bg.js): art di atas memudar ke gradien warnanya. */
@property --hero-bg-1 { syntax: "<color>"; inherits: true; initial-value: #111a2e; }
@property --hero-bg-2 { syntax: "<color>"; inherits: true; initial-value: #0d1424; }
body.hero-bg {
  position: relative;
  background: linear-gradient(180deg, var(--hero-bg-1, #111a2e) 0, var(--hero-bg-1, #111a2e) max(55vh, 340px), var(--hero-bg-2, #0d1424) calc(max(55vh, 340px) + 60vh), #0d1424 100%);
  transition: --hero-bg-1 0.8s ease, --hero-bg-2 0.8s ease;
}
.hero-art { position: absolute; top: 0; left: 0; right: 0; height: 55vh; min-height: 340px; z-index: 0; pointer-events: none; overflow: hidden; }
.hero-art-layer { position: absolute; inset: 0; background-size: cover; background-position: center 20%; opacity: 0; transition: opacity 0.8s ease; }
.hero-art-layer.on { opacity: 0.55; }
.hero-art-fade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(13, 20, 36, 0.55) 0%, rgba(13, 20, 36, 0.35) 35%, var(--hero-bg-1, #111a2e) 100%); transition: --hero-bg-1 0.8s ease; }
body.hero-bg header.app-header { background: rgba(9, 13, 24, 0.78); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
body.hero-bg main, body.hero-bg footer { position: relative; z-index: 1; }
body.hero-bg .bp-inputs, body.hero-bg .bp-formula { background: rgba(20, 27, 46, 0.86); }
body.hero-bg .bp-list { background: rgba(20, 27, 46, 0.86); }
body.hero-bg .bp-thead, body.hero-bg .section-title { background: rgba(16, 30, 52, 0.9); }
body.hero-bg footer.app-footer { background: rgba(9, 13, 24, 0.85); }
@media (max-width: 560px) {
  .hero-art { height: 42vh; min-height: 260px; }
  .hero-art-layer { background-position: 60% 15%; }
  body.hero-bg { background: linear-gradient(180deg, var(--hero-bg-1, #111a2e) 0, var(--hero-bg-1, #111a2e) max(42vh, 260px), var(--hero-bg-2, #0d1424) calc(max(42vh, 260px) + 60vh), #0d1424 100%); }
}
@media (prefers-reduced-motion: reduce) {
  body.hero-bg, .hero-art-layer, .hero-art-fade { transition: none; }
}

/* Revisi latar art: mulai di bawah header, lebih jelas, beri ruang area hero. */
.hero-art { top: var(--hdr-h, 64px); height: 62vh; min-height: 380px; }
.hero-art-layer { background-position: center 12%; }
.hero-art-layer.on { opacity: 0.9; }
.hero-art-fade { background: linear-gradient(180deg, rgba(13, 20, 36, 0) 0%, rgba(13, 20, 36, 0.1) 45%, var(--hero-bg-1, #111a2e) 100%); }
body.hero-bg.has-art .wrap { padding-top: clamp(160px, 30vh, 300px); transition: padding-top 0.6s ease; }
body.hero-bg .bp-inputs { background: rgba(20, 27, 46, 0.72); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
body.hero-bg .bp-field label, body.hero-bg .bp-msg { text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8); }
body.hero-bg { background: linear-gradient(180deg, var(--hero-bg-1, #111a2e) 0, var(--hero-bg-1, #111a2e) calc(var(--hdr-h, 64px) + max(62vh, 380px)), var(--hero-bg-2, #0d1424) calc(var(--hdr-h, 64px) + max(62vh, 380px) + 60vh), #0d1424 100%); }
@media (max-width: 560px) {
  .hero-art { height: 46vh; min-height: 300px; }
  .hero-art-layer { background-size: auto 100%; background-position: 50% 0; }
  body.hero-bg.has-art .wrap { padding-top: clamp(150px, 26vh, 230px); }
  body.hero-bg { background: linear-gradient(180deg, var(--hero-bg-1, #111a2e) 0, var(--hero-bg-1, #111a2e) calc(var(--hdr-h, 64px) + max(46vh, 300px)), var(--hero-bg-2, #0d1424) calc(var(--hdr-h, 64px) + max(46vh, 300px) + 60vh), #0d1424 100%); }
}
@media (prefers-reduced-motion: reduce) { body.hero-bg.has-art .wrap { transition: none; } }
/* Desktop: tampilkan art utuh setinggi area (tanpa crop vertikal), tepi kiri/kanan memudar. */
@media (min-width: 561px) {
  .hero-art-layer { background-size: auto 100%; background-repeat: no-repeat; background-position: center top; -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 22%, #000 78%, transparent 100%); mask-image: linear-gradient(90deg, transparent 0, #000 22%, #000 78%, transparent 100%); }
  body.hero-bg.has-art .wrap { padding-top: clamp(200px, 36vh, 340px); }
}
/* Art: lapis tajam (utuh) di atas versi blur yang memenuhi lebar layar. */
.hero-art-layer { background: none !important; -webkit-mask-image: none !important; mask-image: none !important; overflow: hidden; }
.hero-art-layer::before { content: ""; position: absolute; inset: -40px; background: var(--art) center 20% / cover no-repeat; filter: blur(28px) brightness(0.55) saturate(1.2); }
.hero-art-layer::after { content: ""; position: absolute; inset: 0; background: var(--art) center top / auto 100% no-repeat;
  -webkit-mask-image: radial-gradient(ellipse 34% 120% at 50% 0, #000 72%, transparent 100%); mask-image: radial-gradient(ellipse 34% 120% at 50% 0, #000 72%, transparent 100%); }
@media (max-width: 560px) {
  .hero-art-layer::after { background-size: cover; background-position: 50% 0; -webkit-mask-image: none; mask-image: none; }
}
@media (min-width: 561px) {
  .hero-art { --art-h: max(62vh, 380px); }
  .hero-art-layer::after {
    -webkit-mask-image: linear-gradient(90deg, transparent calc(50% - var(--art-h) * 0.5), #000 calc(50% - var(--art-h) * 0.32), #000 calc(50% + var(--art-h) * 0.32), transparent calc(50% + var(--art-h) * 0.5)), linear-gradient(180deg, #000 70%, transparent 100%);
    -webkit-mask-composite: source-in;
    mask-image: linear-gradient(90deg, transparent calc(50% - var(--art-h) * 0.5), #000 calc(50% - var(--art-h) * 0.32), #000 calc(50% + var(--art-h) * 0.32), transparent calc(50% + var(--art-h) * 0.5)), linear-gradient(180deg, #000 70%, transparent 100%);
    mask-composite: intersect;
  }
}
