/* =========================================================
   Happy Pet Calculator — 공통 스타일
   ========================================================= */
:root {
  --bg: #eef3f1;
  --bg-glow: radial-gradient(1200px 500px at 50% -120px, #ffffff 0%, rgba(255,255,255,0) 70%);
  --surface: #ffffff;
  --surface-2: #f3f7f5;
  --surface-3: #e8efec;
  --line: #e1e9e6;
  --ink: #1c2a27;
  --ink-2: #3d4d49;
  --muted: #84948f;
  --primary: #2f8c7b;
  --primary-2: #4dbba5;
  --primary-ink: #ffffff;
  --primary-soft: #e3f3ef;
  --gold: #d9a23a;
  --gold-2: #f2cf73;
  --gold-soft: #fbf1db;
  --gold-ink: #9a6a12;
  --r7: #3aa893; --r6: #6b9ac9; --r5: #8aa3aa; --r4: #a9b6b9; --rlow: #c3cccd;
  --danger: #c6513a; --danger-soft: #fbe7e2;
  --earth: #4f9a3f; --water: #2f74c6; --fire: #e0482f; --wind: #8c7fa8;
  --shadow: 0 1px 2px rgba(28,42,39,.04), 0 8px 24px rgba(28,42,39,.06);
  --shadow-lg: 0 12px 40px rgba(28,42,39,.14);
  --radius: 20px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0f1614;
  --bg-glow: radial-gradient(1200px 500px at 50% -120px, #1b2a26 0%, rgba(15,22,20,0) 70%);
  --surface: #172220;
  --surface-2: #1d2a27;
  --surface-3: #24332f;
  --line: #263632;
  --ink: #e6efec;
  --ink-2: #c3d0cc;
  --muted: #7f928d;
  --primary: #3fae98;
  --primary-2: #5fd0b8;
  --primary-soft: #1d3832;
  --gold: #e3ae47;
  --gold-2: #f5d27e;
  --gold-soft: #3a2f17;
  --gold-ink: #f0c766;
  --danger-soft: #3b211c;
  --r5: #6f878d; --r4: #5a6b6e; --rlow: #46524f;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.5);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; color: var(--ink); background: var(--bg-glow), var(--bg); background-attachment: fixed;
  font-family: 'Pretendard', 'Apple SD Gothic Neo', 'Malgun Gothic', system-ui, sans-serif;
  font-size: 15px; line-height: 1.5; letter-spacing: -0.01em;
}
button, input, select { font-family: inherit; font-size: inherit; color: inherit; letter-spacing: inherit; }
a { color: var(--primary); }
:focus-visible { outline: 3px solid var(--primary-2); outline-offset: 2px; border-radius: 6px; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
[hidden] { display: none !important; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 12px;
  padding: 10px 20px; background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 800; font-size: 19px; white-space: nowrap; }
.brand .logo { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; font-size: 20px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2)); box-shadow: 0 4px 12px color-mix(in srgb, var(--primary) 35%, transparent); }
.menu { margin-left: auto; display: flex; gap: 2px; padding: 4px; background: var(--surface-3); border-radius: 14px; }
.menu-item { position: relative; }
.menu-btn { border: 0; background: transparent; padding: 7px 14px; border-radius: 10px; font-weight: 700; font-size: 14px; color: var(--muted); cursor: pointer; white-space: nowrap; }
.menu-btn::after { content: '▾'; font-size: 10px; margin-left: 5px; opacity: .7; }
.menu-btn:hover { color: var(--ink); }
.menu-item.active .menu-btn { background: var(--surface); color: var(--primary); box-shadow: var(--shadow); }
.dropdown { position: absolute; right: 0; top: calc(100% + 8px); min-width: 180px; padding: 6px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: var(--shadow-lg); display: none; }
.menu-item.open .dropdown { display: block; }
.dropdown a { display: flex; gap: 10px; align-items: center; padding: 9px 12px; border-radius: 10px; color: var(--ink-2); text-decoration: none; font-size: 14px; font-weight: 600; }
.dropdown a:hover { background: var(--surface-2); color: var(--ink); }
.dropdown a[aria-current="page"] { background: var(--primary-soft); color: var(--primary); }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-size: 18px; display: grid; place-items: center; flex: none; }
.icon-btn:hover { background: var(--surface-2); }
.hamburger { display: none; }
.old-link { flex: none; display: inline-flex; align-items: center; height: 40px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface); color: var(--muted); font-size: 13px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.old-link:hover { color: var(--ink); background: var(--surface-2); }
.mobile-menu { display: none; }

@media (max-width: 760px) {
  .topbar { padding: 10px 14px; }
  .menu { display: none; }
  .old-link { display: none; }
  .hamburger { display: grid; margin-left: auto; }
  .mobile-menu { position: fixed; inset: 61px 0 auto 0; z-index: 49; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-lg);
    padding: 10px 14px 18px; max-height: calc(100vh - 61px); overflow: auto; }
  .mobile-menu.open { display: block; }
  .mobile-menu h4 { margin: 10px 4px 4px; font-size: 12px; color: var(--muted); }
  .mobile-menu a { display: block; padding: 10px 12px; border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 600; }
  .mobile-menu a[aria-current="page"] { background: var(--primary-soft); color: var(--primary); }
}

/* ---------- layout ---------- */
.page { max-width: 1240px; margin: 0 auto; padding: 24px 20px 80px; }
.page.narrow { max-width: 760px; }
.hero { text-align: center; padding: 28px 0 22px; }
.hero h1 { font-size: 30px; font-weight: 800; margin: 0; letter-spacing: -0.03em; }
.hero p { margin: 10px auto 0; color: var(--muted); max-width: 30em; line-height: 1.7; }
.page-title { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin: 4px 0 18px; }
.page-title h1 { font-size: 24px; margin: 0; font-weight: 800; letter-spacing: -0.03em; }
.page-title p { margin: 0; color: var(--muted); font-size: 14px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 20px; }
.card-head { display: flex; align-items: center; gap: 8px; padding: 16px 20px; border-bottom: 1px solid var(--line); font-weight: 800; }
.card-head .right { margin-left: auto; display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13px; color: var(--muted); }
.section-title { display: flex; align-items: center; gap: 8px; font-weight: 800; margin: 0 0 14px; font-size: 15px; }

.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.col { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; min-width: 0; }
@media (max-width: 960px) { .two-col { grid-template-columns: 1fr; } }

/* ---------- search ---------- */
.search { position: relative; }
.search-box { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 16px; border: 2px solid var(--line); border-radius: 16px; background: var(--surface-2); transition: border-color .15s, background .15s; }
.search-box:focus-within { border-color: var(--primary); background: var(--surface); box-shadow: 0 0 0 4px var(--primary-soft); }
.search-box input { flex: 1; min-width: 0; border: 0; background: transparent; height: 42px; font-size: 17px; outline: none; }
.search-box input::placeholder { color: var(--muted); }
.search.big .search-box input { height: 50px; font-size: 19px; }
.btn-search { border: 0; height: 40px; padding: 0 16px; border-radius: 11px; background: var(--primary); color: var(--primary-ink); font-weight: 800; cursor: pointer; white-space: nowrap; }
.btn-search:hover { filter: brightness(1.06); }
.suggest { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 6px); margin: 0; padding: 4px; list-style: none; background: var(--surface);
  border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); max-height: 380px; overflow: auto; }
.suggest li { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 10px; cursor: pointer; }
.suggest li + li { border-top: 1px solid var(--line); }
.suggest li[aria-selected="true"], .suggest li:hover { background: var(--surface-2); }
.suggest .thumb { width: 38px; height: 38px; flex: none; display: grid; place-items: center; }
.suggest .thumb img { max-width: 38px; max-height: 38px; image-rendering: pixelated; }
.suggest .nm { font-weight: 700; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suggest .at { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.suggest .none { padding: 14px; text-align: center; color: var(--muted); cursor: default; }

/* ---------- pet bits ---------- */
.pet-img { display: grid; place-items: center; overflow: hidden; flex: none; }
.pet-img img { max-width: 100%; max-height: 100%; image-rendering: pixelated; }
.pet-img .noimg { font-weight: 800; font-size: 26px; color: var(--muted); width: 100%; height: 100%; display: grid; place-items: center; background: var(--surface-2); border-radius: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 8px; font-size: 12.5px; font-weight: 700; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.chip.attr { border-radius: 999px; }
.chip.attr.지 { background: color-mix(in srgb, var(--earth) 14%, transparent); color: var(--earth); }
.chip.attr.수 { background: color-mix(in srgb, var(--water) 14%, transparent); color: var(--water); }
.chip.attr.화 { background: color-mix(in srgb, var(--fire) 14%, transparent); color: var(--fire); }
.chip.attr.풍 { background: color-mix(in srgb, var(--wind) 16%, transparent); color: var(--wind); }
.attr-text { font-size: 12.5px; color: var(--muted); }

.profile { display: flex; gap: 18px; align-items: center; padding: 20px; }
.profile .pet-img { width: 84px; height: 84px; }
.profile h2 { margin: 0; font-size: 22px; font-weight: 800; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; letter-spacing: -0.03em; }
.profile .path { color: var(--muted); font-size: 13.5px; margin: 4px 0 8px; }
.stat-strip { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); }
.stat-strip > div { text-align: center; padding: 14px 6px; }
.stat-strip > div + div { border-left: 1px solid var(--line); }
.stat-strip .lb { font-size: 12px; color: var(--muted); font-weight: 700; }
.stat-strip .v { font-size: 22px; font-weight: 800; color: var(--primary); font-variant-numeric: tabular-nums; line-height: 1.3; }
.stat-strip .v small { font-size: 14px; font-weight: 700; opacity: .75; }
.stat-strip .g { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- stat input ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.stat-field .top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.delta { font-size: 11px; padding: 1px 7px; border-radius: 6px; background: var(--surface-2); color: var(--muted); font-variant-numeric: tabular-nums; }
.delta.up { background: var(--primary-soft); color: var(--primary); }
.delta.down { background: var(--danger-soft); color: var(--danger); }
.stepper { display: flex; border: 2px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface); }
.stepper:focus-within { border-color: var(--primary); }
.stepper button { width: 46px; flex: none; border: 0; background: var(--surface-2); font-size: 20px; color: var(--ink-2); cursor: pointer; }
.stepper button:hover { background: var(--surface-3); }
.stepper input { flex: 1; min-width: 0; height: 48px; border: 0; background: transparent; text-align: center; font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; outline: none; }
input[type="number"]::-webkit-outer-spin-button, input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
.input { width: 100%; height: 44px; border: 2px solid var(--line); border-radius: 12px; background: var(--surface); padding: 0 12px; font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; outline: none; }
.input:focus { border-color: var(--primary); }
.label { display: block; font-size: 12.5px; font-weight: 700; color: var(--ink-2); margin-bottom: 6px; }

.btn { border: 0; border-radius: 14px; height: 48px; padding: 0 18px; font-weight: 800; font-size: 15px; cursor: pointer; background: var(--surface-2); color: var(--ink); }
.btn:hover { background: var(--surface-3); }
.btn-primary { width: 100%; height: 56px; margin-top: 18px; font-size: 17px; color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-2)); box-shadow: 0 8px 20px color-mix(in srgb, var(--primary) 30%, transparent); }
.btn-primary:hover { filter: brightness(1.05); background: linear-gradient(135deg, var(--primary), var(--primary-2)); }
.btn-primary:active { transform: translateY(1px); }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 10px; }

/* ---------- result hero ---------- */
.result-hero { position: relative; overflow: hidden; text-align: center; padding: 30px 20px 24px; }
.result-hero .sparkle { position: absolute; border-radius: 50%; background: var(--gold); opacity: .7; }
.big-line { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; }
.rank-badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px; font-weight: 800; font-size: 14px;
  background: var(--gold-soft); color: var(--gold-ink); border: 1px solid color-mix(in srgb, var(--gold) 35%, transparent); }
.big-pct { font-size: clamp(54px, 9vw, 84px); font-weight: 900; line-height: 1; letter-spacing: -0.05em; font-variant-numeric: tabular-nums;
  background: linear-gradient(135deg, var(--gold), var(--gold-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.big-pct.zero { background: linear-gradient(135deg, var(--muted), var(--rlow)); -webkit-background-clip: text; background-clip: text; }
.appear { margin-top: 12px; color: var(--primary); font-weight: 800; font-size: 14px; }
.verdict { margin-top: 16px; font-weight: 800; font-size: 16px; color: var(--gold-ink); }
.verdict.low { color: var(--ink-2); }
.tries { margin-top: 4px; font-size: 13px; color: var(--muted); }
.kpis { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.kpi { padding: 9px 16px; border-radius: 12px; background: var(--surface-2); font-size: 13px; color: var(--muted); font-weight: 600; }
.kpi b { color: var(--ink); font-size: 16px; margin-left: 6px; }

/* ---------- distribution ---------- */
.dist { padding: 16px 20px 18px; display: grid; gap: 10px; }
.dist-row { display: grid; grid-template-columns: 52px 1fr 52px; gap: 12px; align-items: center; font-size: 13px; }
.dist-row .rk { font-weight: 800; color: var(--ink-2); text-align: right; }
.dist-row .track { height: 24px; border-radius: 8px; background: var(--surface-2); overflow: hidden; }
.dist-row .fill { height: 100%; border-radius: 8px; display: flex; align-items: center; padding-left: 8px; font-size: 11.5px; font-weight: 800; color: #fff; min-width: 2px;
  transition: width .5s cubic-bezier(.2,.8,.2,1); white-space: nowrap; }
.dist-row .cnt { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.fill.r8 { background: linear-gradient(90deg, var(--gold), var(--gold-2)); color: #4a3207; }
.fill.r7 { background: linear-gradient(90deg, #2e8b7a, #4cc2aa); }
.fill.r6 { background: linear-gradient(90deg, #5a88bb, #86b0d8); }
.fill.r5 { background: linear-gradient(90deg, #7a959c, #a1b6bb); }
.fill.r4 { background: var(--r4); }
.fill.rlow { background: var(--rlow); color: var(--ink-2); }

.switch { position: relative; width: 40px; height: 22px; border-radius: 999px; background: var(--surface-3); border: 0; cursor: pointer; transition: background .15s; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s; }
.switch[aria-checked="true"] { background: var(--primary); }
.switch[aria-checked="true"]::after { transform: translateX(18px); }

.total-bar { display: flex; justify-content: space-between; align-items: center; padding: 14px 20px; font-size: 14px; color: var(--muted); }
.total-bar b { color: var(--ink); font-variant-numeric: tabular-nums; }

/* ---------- tables ---------- */
.tbl-wrap { overflow: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.tbl th { font-size: 12px; color: var(--muted); font-weight: 700; padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: center; white-space: nowrap; background: var(--surface); position: sticky; top: 0; }
.tbl td { padding: 9px 8px; text-align: center; border-bottom: 1px solid var(--line); }
.tbl td small { color: var(--muted); font-size: 11.5px; }
.tbl tr.r8 td { background: color-mix(in srgb, var(--gold) 9%, transparent); }
.tbl tr.r8 td.rk { color: var(--gold-ink); font-weight: 800; }
.tbl th.left, .tbl td.left { text-align: left; }
.tbl td.best { color: var(--primary); font-weight: 800; }
.pager { display: flex; justify-content: center; align-items: center; gap: 10px; padding: 12px; font-size: 13px; color: var(--muted); }
.pager button { width: 32px; height: 32px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-weight: 800; }
.pager button:disabled { opacity: .4; cursor: default; }

.empty { padding: 28px 18px; text-align: center; color: var(--muted); font-size: 14px; line-height: 1.7; }
.notice { font-size: 12.5px; color: var(--muted); line-height: 1.75; padding: 14px 18px; }
.notice summary { cursor: pointer; font-weight: 700; color: var(--ink-2); }

/* ---------- home grid ---------- */
.home-search { max-width: 540px; margin: 8px auto 0; padding: 26px; }
.feature-title { max-width: 540px; margin: 30px auto 12px; font-size: 14px; font-weight: 800; color: var(--muted); }
.feature-grid { max-width: 540px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.feature { padding: 18px 10px 14px; text-align: center; cursor: pointer; text-decoration: none; color: inherit; transition: transform .15s, box-shadow .15s; }
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.feature .pet-img { width: 60px; height: 60px; margin: 0 auto 8px; }
.feature .nm { font-weight: 800; font-size: 14px; }
.feature .at { margin-top: 4px; font-size: 11.5px; color: var(--muted); }
@media (max-width: 480px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }

/* ---------- dex ---------- */
.filterbar { padding: 16px; display: grid; gap: 12px; }
.filter-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tg { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 13px; font-size: 13px; font-weight: 700; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.tg:hover { background: var(--surface-2); }
.tg[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: #fff; }
.tg.지[aria-pressed="true"] { background: var(--earth); border-color: var(--earth); }
.tg.수[aria-pressed="true"] { background: var(--water); border-color: var(--water); }
.tg.화[aria-pressed="true"] { background: var(--fire); border-color: var(--fire); }
.tg.풍[aria-pressed="true"] { background: var(--wind); border-color: var(--wind); }
.select { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.count { font-size: 13px; color: var(--muted); font-weight: 600; }
.dex { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-top: 16px; }
.dex-card { display: flex; flex-direction: column; gap: 12px; padding: 16px; text-decoration: none; color: inherit; transition: transform .15s, box-shadow .15s; }
.dex-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.dex-card .head { display: flex; gap: 12px; align-items: center; }
.dex-card .pet-img { width: 64px; height: 64px; }
.dex-card h3 { margin: 0; font-size: 16px; font-weight: 800; }
.dex-card .path { font-size: 12px; color: var(--muted); margin: 2px 0 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mini { display: grid; grid-template-columns: 52px repeat(4, 1fr); gap: 3px 6px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.mini span { text-align: right; }
.mini .h { font-size: 11px; color: var(--muted); font-weight: 700; }
.mini b { font-size: 11px; color: var(--muted); }
.dex-card .foot { margin-top: auto; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.dex-card .foot .tgv { margin-left: auto; font-weight: 800; color: var(--primary); font-size: 13px; }
.cmp-add { border: 1px solid var(--line); background: var(--surface); border-radius: 8px; font-size: 12px; font-weight: 700; padding: 3px 8px; cursor: pointer; color: var(--ink-2); }
.cmp-add[aria-pressed="true"] { background: var(--primary-soft); color: var(--primary); border-color: transparent; }
.float-bar { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 40; display: flex; gap: 10px; align-items: center;
  padding: 10px 10px 10px 18px; border-radius: 16px; background: var(--ink); color: var(--bg); box-shadow: var(--shadow-lg); font-weight: 700; font-size: 14px; }
.float-bar a { background: var(--primary-2); color: #06231d; text-decoration: none; padding: 8px 14px; border-radius: 10px; font-weight: 800; }
.float-bar button { background: transparent; border: 0; color: inherit; opacity: .7; cursor: pointer; font-size: 13px; }

/* ---------- compare ---------- */
.cmp-pets { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.cmp-pet { position: relative; padding: 16px 10px 14px; text-align: center; }
.cmp-pet .pet-img { width: 64px; height: 64px; margin: 0 auto 6px; }
.cmp-pet .nm { font-weight: 800; }
.cmp-pet .x { position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; border-radius: 8px; border: 0; background: var(--surface-2); cursor: pointer; color: var(--muted); }
.cmp-slot { border: 2px dashed var(--line); border-radius: var(--radius); display: grid; place-items: center; color: var(--muted); font-size: 13px; min-height: 140px; }
@media (max-width: 640px) { .cmp-pets { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- misc ---------- */
.hp-big { font-size: 40px; font-weight: 900; font-variant-numeric: tabular-nums; letter-spacing: -0.03em; }
.hpbar { height: 14px; border-radius: 7px; background: var(--surface-2); overflow: hidden; margin: 10px 0 4px; }
.hpbar i { display: block; height: 100%; background: linear-gradient(90deg, var(--danger), #e98a5e); transition: width .25s; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: end; }
.row > * { flex: 1; min-width: 120px; }
.footer { text-align: center; padding: 30px 16px 40px; font-size: 12.5px; color: var(--muted); }
.badge-new { font-size: 10.5px; font-weight: 800; color: #fff; background: var(--danger); border-radius: 6px; padding: 1px 6px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
