/* KillerDrama: bold, fan-friendly, system fonts only. Light and dark themes. */
:root {
  --bg: #fff7fa; --bg2: #ffeef4; --card: #ffffff; --ink: #1d1530; --muted: #6d6181; --line: #eedbe5;
  --pink: #e8175d; --pink2: #ff2e6e; --violet: #7a2cff; --gold: #ffb703; --link: #c3104c;
  --shadow: 0 1px 2px rgba(40, 10, 40, .06), 0 6px 18px rgba(80, 20, 70, .09);
  --r: 14px;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif;
  --cjk: "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans CJK KR", "Noto Sans KR", "Hiragino Sans", "Yu Gothic",
         "Noto Sans CJK JP", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", "WenQuanYi Zen Hei", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #120b1d; --bg2: #1b1129; --card: #1f1530; --ink: #f4eefc; --muted: #b3a6c6; --line: #33264a;
    --link: #ff7aa6; --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 22px rgba(0, 0, 0, .35); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #120b1d; --bg2: #1b1129; --card: #1f1530; --ink: #f4eefc; --muted: #b3a6c6; --line: #33264a;
  --link: #ff7aa6; --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 22px rgba(0, 0, 0, .35); color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--sans); }
:lang(ko), :lang(ja), :lang(zh-Hans), :lang(zh-Hant), .pnative, .native-big { font-family: var(--sans), var(--cjk); }
:lang(ko) { font-family: var(--sans), "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans CJK KR", "Noto Sans KR", "Nanum Gothic", var(--cjk); word-break: keep-all; }
:lang(ja) { font-family: var(--sans), "Hiragino Sans", "Yu Gothic", "Meiryo", "Noto Sans CJK JP", "Noto Sans JP", var(--cjk); }
:lang(zh-Hans) { font-family: var(--sans), "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", "Noto Sans SC", var(--cjk); }
:lang(zh-Hant) { font-family: var(--sans), "PingFang TC", "Microsoft JhengHei", "Noto Sans CJK TC", "Noto Sans TC", var(--cjk); }
:lang(th) { font-family: var(--sans), "Thonburi", "Leelawadee UI", "Noto Sans Thai", "Tahoma", sans-serif; }
a { color: var(--link); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
img { max-width: 100%; height: auto; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -.01em; }
h1 { font-size: clamp(1.9rem, 4.6vw, 3rem); margin: .2em 0 .25em; font-weight: 850; }
h2 { font-size: clamp(1.3rem, 2.6vw, 1.7rem); margin: 1.6em 0 .6em; font-weight: 800; }
h3 { font-size: 1.15rem; margin: 1.4em 0 .5em; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 16px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--card); padding: 8px 12px; z-index: 50; }
.skip:focus { left: 8px; }
.muted { color: var(--muted); }
.lead { font-size: 1.1rem; color: var(--muted); max-width: 70ch; }
.js-only { display: none !important; }
html.js .js-only { display: revert !important; }
html.js .search.js-only, html.js .finder.js-only, html.js .like-tool.js-only, html.js .wl-tools.js-only { display: block !important; }
html.js .psearch.js-only { display: flex !important; }
html.js .wl-link.js-only, html.js .wl-btn.js-only { display: inline-flex !important; }
html.js .btn.js-only { display: inline-flex !important; }

/* header */
.top { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; gap: 18px; min-height: 60px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; color: var(--ink); font-weight: 800; font-size: 1.25rem; letter-spacing: -.02em; }
.brand b { color: var(--pink); }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a { color: var(--ink); text-decoration: none; padding: 6px 10px; border-radius: 99px; font-weight: 600; font-size: .95rem; }
.nav a:hover, .nav a[aria-current] { background: var(--bg2); color: var(--pink); }
.search { position: relative; margin-left: auto; min-width: 220px; flex: 0 1 300px; }
.search input, .like-input input, .psearch input { width: 100%; padding: 9px 14px; border-radius: 99px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); font: inherit; }
.search input:focus, .like-input input:focus, .psearch input:focus { outline: none; border-color: var(--pink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--pink) 22%, transparent); }
.results { position: absolute; left: 0; right: 0; top: calc(100% + 6px); background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); list-style: none; margin: 0; padding: 6px; max-height: 70vh; overflow: auto; z-index: 40; }
.results li a { display: flex; gap: 10px; align-items: center; padding: 7px 9px; border-radius: 8px; color: var(--ink); text-decoration: none; }
.results li a:hover, .results li[aria-selected="true"] a { background: var(--bg2); }
.results img { width: 30px; height: 42px; border-radius: 4px; object-fit: cover; flex: none; }
.results .r-sub { display: block; color: var(--muted); font-size: .85rem; }
.wl-link { align-items: center; gap: 4px; text-decoration: none; color: var(--pink); font-size: 1.3rem; padding: 4px 8px; border-radius: 99px; }
.wl-count { font-size: .8rem; font-weight: 800; background: var(--pink); color: #fff; border-radius: 99px; padding: 0 6px; min-width: 18px; text-align: center; }
.wl-count:empty { display: none; }

/* buttons, chips, pills */
.btn { display: inline-flex; align-items: center; gap: 6px; border: 0; cursor: pointer; text-decoration: none; font: inherit; font-weight: 700; background: var(--pink); color: #fff; padding: 9px 18px; border-radius: 99px; box-shadow: 0 4px 14px color-mix(in srgb, var(--pink) 35%, transparent); }
.btn:hover { background: var(--pink2); }
.btn.big { padding: 13px 24px; font-size: 1.05rem; }
.btn.small { padding: 6px 13px; font-size: .9rem; box-shadow: none; }
.btn.ghost { background: transparent; color: inherit; border: 1.5px solid currentColor; box-shadow: none; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: .6em 0; }
.chip { --h: 330; display: inline-flex; align-items: center; gap: 5px; padding: 3px 11px; border-radius: 99px; font-size: .85rem; font-weight: 650; text-decoration: none; background: hsl(var(--h) 85% 94%); color: hsl(var(--h) 70% 30%); border: 1px solid hsl(var(--h) 60% 84%); }
.chip small { opacity: .7; font-weight: 600; }
.chip.neutral { background: var(--bg2); color: var(--ink); border-color: var(--line); }
a.chip:hover { background: hsl(var(--h) 80% 88%); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .chip { background: hsl(var(--h) 45% 22%); color: hsl(var(--h) 90% 86%); border-color: hsl(var(--h) 40% 32%); } }
:root[data-theme="dark"] .chip { background: hsl(var(--h) 45% 22%); color: hsl(var(--h) 90% 86%); border-color: hsl(var(--h) 40% 32%); }
.pill { display: inline-block; padding: 4px 12px; border-radius: 99px; background: #fff; color: var(--pink); font-weight: 800; font-size: .85rem; text-decoration: none; }
.pill.ghost { background: rgba(255, 255, 255, .16); color: #fff; border: 1px solid rgba(255, 255, 255, .35); font-weight: 650; }
a.pill.ghost:hover { background: rgba(255, 255, 255, .28); }
.tag { display: inline-block; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 800; padding: 1px 7px; border-radius: 6px; background: var(--bg2); color: var(--muted); vertical-align: middle; }
.tag.big { font-size: .9rem; }

/* hero (home) */
.hero { background: radial-gradient(1200px 500px at 85% 0%, #7a2cff 0%, transparent 60%), linear-gradient(120deg, #ff2e6e 0%, #c3165f 45%, #4c1aa8 100%); color: #fff; overflow: hidden; }
.hero-in { display: grid; grid-template-columns: 1.1fr .9fr; gap: 30px; align-items: center; padding-top: 52px; padding-bottom: 56px; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-weight: 800; font-size: .8rem; opacity: .85; margin: 0; }
.hero h1 { font-size: clamp(2.3rem, 6vw, 4.1rem); margin: .15em 0 .3em; }
.hl { background: linear-gradient(90deg, #ffd166, #ffb703); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-lead { font-size: 1.15rem; max-width: 46ch; opacity: .95; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 22px 0; }
.hero .btn { background: #fff; color: var(--pink); }
.hero .btn.ghost { background: transparent; color: #fff; }
.stats { display: flex; gap: 22px; list-style: none; padding: 0; margin: 10px 0 0; flex-wrap: wrap; }
.stats b { display: block; font-size: 1.7rem; line-height: 1; }
.stats.small b { font-size: 1.3rem; }
.stats li { opacity: .95; font-size: .9rem; }
.fan { position: relative; height: 380px; }
.fan img { position: absolute; width: 36%; max-width: 190px; border-radius: 14px; box-shadow: 0 18px 40px rgba(20, 0, 40, .45); transition: transform .4s; }
.fan-1 { left: 32%; top: 0; transform: rotate(-2deg); z-index: 5; }
.fan-2 { left: 6%; top: 50px; transform: rotate(-12deg); z-index: 4; }
.fan-3 { left: 58%; top: 46px; transform: rotate(10deg); z-index: 4; }
.fan-4 { left: -4%; top: 120px; transform: rotate(-20deg); z-index: 3; opacity: .9; }
.fan-5 { left: 68%; top: 120px; transform: rotate(19deg); z-index: 3; opacity: .9; }

/* country tiles */
.ctiles { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin: 28px 0 8px; }
.ctile { position: relative; border-radius: var(--r); padding: 18px; color: #fff; text-decoration: none; min-height: 118px; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; box-shadow: var(--shadow); transition: transform .15s; }
.ctile:hover { transform: translateY(-3px); }
.ct-name { font-weight: 850; font-size: 1.15rem; }
.ct-n { position: absolute; top: 10px; right: 14px; font-size: 2.2rem; font-weight: 900; opacity: .35; }
.ct-sub { font-size: .9rem; opacity: .9; }
.ct-kr { background: linear-gradient(135deg, #ff2e6e, #9b1bb0); }
.ct-cn { background: linear-gradient(135deg, #ff5a36, #b0123c); }
.ct-jp { background: linear-gradient(135deg, #2a8cff, #3a1ea8); }
.ct-th { background: linear-gradient(135deg, #a74bff, #3c1580); }
.ct-tw { background: linear-gradient(135deg, #10b39b, #0b5a7a); }

/* sections */
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.sec-head a { font-weight: 700; text-decoration: none; }
section { margin-bottom: 8px; }

/* cards */
.grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; }
.grid > * { flex: 0 1 calc((100% - 5 * 18px) / 6); min-width: 0; }   /* 6 / 3 / 2 columns, short last row centred (PARK-56) */
.card { position: relative; background: var(--card); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s; }
.card:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(40, 10, 40, .08), 0 14px 30px rgba(80, 20, 70, .16); }
.card-link { display: block; color: var(--ink); text-decoration: none; height: 100%; }
.card-art { display: block; width: 100%; aspect-ratio: 5 / 7; background: linear-gradient(135deg, #ff2e6e, #7a2cff); }
.card-body { display: block; padding: 10px 12px 13px; }
.card-title { display: block; font-weight: 750; line-height: 1.25; }
.card-native { display: block; color: var(--muted); font-size: .9rem; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-meta { display: block; color: var(--muted); font-size: .82rem; margin-top: 4px; }
.card-extra { display: block; margin-top: 6px; font-size: .8rem; font-weight: 650; color: var(--pink); line-height: 1.3; }
.wl-btn { position: absolute; top: 8px; right: 8px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(20, 8, 30, .45); color: #fff; font-size: 1rem; cursor: pointer; align-items: center; justify-content: center; backdrop-filter: blur(4px); }
.wl-btn[aria-pressed="true"] { background: #fff; color: var(--pink); }
.like-grid .card-extra { color: var(--violet); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .like-grid .card-extra { color: #c6a4ff; } }

/* genre tiles */
.gtiles { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.gtiles > * { flex: 0 1 calc((100% - 5 * 10px) / 6); min-width: 0; }   /* 18 genres: 6 / 3 / 2 columns (PARK-56) */
.gtile { --h: 330; display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-radius: 12px; text-decoration: none; color: #fff; font-weight: 800; background: linear-gradient(135deg, hsl(var(--h) 78% 52%), hsl(calc(var(--h) - 40) 70% 34%)); box-shadow: var(--shadow); }
.gtile small { opacity: .75; font-weight: 700; }
.gtile:hover { filter: brightness(1.08); }

/* tools */
.tools { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 34px 0 10px; }
.tool { background: var(--card); border-radius: var(--r); padding: 18px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); border-top: 4px solid var(--pink); }
.tool:nth-child(2) { border-color: var(--violet); } .tool:nth-child(3) { border-color: var(--gold); } .tool:nth-child(4) { border-color: #10b39b; }
.tool b { display: block; font-size: 1.1rem; margin-bottom: 4px; }
.tool span { color: var(--muted); font-size: .93rem; }

/* bands (section heroes) */
.band { --h: 330; color: #fff; background: linear-gradient(120deg, hsl(var(--h) 78% 48%), hsl(calc(var(--h) - 50) 62% 30%)); padding: 26px 0 30px; margin-bottom: 20px; }
.band.ct-kr, .band.ct-cn, .band.ct-jp, .band.ct-th, .band.ct-tw { background-size: cover; }
.band a { color: #fff; }
.band h1 { margin-top: .1em; }
.band-lead { font-size: 1.08rem; max-width: 75ch; opacity: .95; }
body .band .chip { background: rgba(255, 255, 255, .16); color: #fff; border-color: rgba(255, 255, 255, .3); }
body .band a.chip:hover { background: rgba(255, 255, 255, .3); }
.band .crumbs a, .dhero .crumbs a { color: rgba(255, 255, 255, .88); }
.band .crumbs, .dhero .crumbs { color: rgba(255, 255, 255, .75); }
.band .crumbs [aria-current], .dhero .crumbs [aria-current] { color: #fff; font-weight: 650; }
.band .tag { background: rgba(255, 255, 255, .2); color: #fff; }
.pager { display: flex; gap: 10px; }
.mixbar { display: flex; height: 12px; border-radius: 99px; overflow: hidden; max-width: 560px; background: rgba(255, 255, 255, .2); margin: 14px 0 6px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25); }
.mixbar span { display: block; height: 100%; border-right: 2px solid rgba(255, 255, 255, .55); }

/* breadcrumbs */
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; padding: 0; margin: 14px 0 0; font-size: .88rem; color: var(--muted); }
.crumbs li + li::before { content: "›"; margin-right: 4px; opacity: .7; }
.crumbs a { color: inherit; }

/* drama page */
.dhero { --h1: 330; color: #fff; background: radial-gradient(900px 400px at 10% 0%, hsl(var(--h1) 80% 55% / .9), transparent 70%), linear-gradient(120deg, hsl(var(--h1) 72% 44%), hsl(calc(var(--h1) - 55) 62% 26%)); }
.dhero-in { display: grid; grid-template-columns: 260px 1fr; gap: 34px; padding-top: 26px; padding-bottom: 34px; align-items: start; }
.dhero-card { width: 100%; border-radius: 16px; box-shadow: 0 20px 44px rgba(10, 0, 30, .45); }
.dhero h1 { margin-top: .25em; }
.native-big { font-size: clamp(1.5rem, 3.6vw, 2.3rem); font-weight: 800; margin: 0 0 .4em; opacity: .95; line-height: 1.2; }
.native-sm { font-weight: 600; color: var(--muted); font-size: .95rem; }
.dmeta { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 6px; }
body .dhero .chip { background: rgba(255, 255, 255, .16); color: #fff; border-color: rgba(255, 255, 255, .32); }
.glance { font-size: 1.06rem; max-width: 70ch; line-height: 1.6; }
.glance a, .dhero a { color: #fff; }
.wl-big { background: #fff; color: var(--pink); margin-top: 6px; }
.wl-big[aria-pressed="true"] { background: var(--pink); color: #fff; box-shadow: 0 0 0 2px #fff; }
.dgrid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 34px; }
.facts dl { display: grid; grid-template-columns: max-content 1fr; gap: 9px 16px; margin: 0; background: var(--card); padding: 18px 20px; border-radius: var(--r); box-shadow: var(--shadow); }
.facts dt { font-weight: 700; color: var(--muted); font-size: .92rem; }
.facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.note { display: block; font-size: .82rem; color: var(--muted); margin-top: 2px; }
.note::before { content: "⚑ "; color: var(--gold); }
.badge-ok { font-size: .9rem; color: #148a5c; font-weight: 650; }
.callout { background: var(--bg2); border-left: 4px solid var(--violet); border-radius: 10px; padding: 12px 16px; margin: 16px 0; font-size: .95rem; }
.people-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.people-list li { display: flex; gap: 11px; align-items: center; background: var(--card); padding: 9px; border-radius: 12px; box-shadow: var(--shadow); min-width: 0; }
.people-list li > span { min-width: 0; }
.people-list.wide { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
html.js .people-list li.more-item { display: none; }
html.js .people-list.open li.more-item { display: flex; }
.avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; object-position: 50% 18%; flex: none; background: var(--bg2); }
.avatar.ph { display: inline-flex; align-items: center; justify-content: center; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--pink2), var(--violet)); font-size: 1.3rem; }
.pname { display: block; font-weight: 700; line-height: 1.25; }
.pname a { color: var(--ink); text-decoration: none; }
.pname a:hover { color: var(--link); text-decoration: underline; }
.pnative { color: var(--muted); font-size: .88rem; }
.prole { display: block; font-size: .85rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cast .btn { margin-top: 12px; }
.loc-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }
.loc-grid > * { flex: 0 1 calc((100% - 3 * 16px) / 4); min-width: 0; }   /* 4/3/2/1 at the old auto-fill widths, short last row centred (PARK-56) */
@media (max-width: 1120px) { .loc-grid > * { flex-basis: calc((100% - 2 * 16px) / 3); } }
@media (max-width: 844px) { .loc-grid > * { flex-basis: calc((100% - 16px) / 2); } }
@media (max-width: 568px) { .loc-grid > * { flex-basis: 100%; } }
.loc-name { font-weight: 700; margin: 6px 0 0; }
.photo { margin: 0; }
.photo img { border-radius: 12px; display: block; }
.photo.wide img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.photo figcaption { font-size: .74rem; color: var(--muted); margin-top: 4px; overflow-wrap: anywhere; }
.band .photo figcaption, .dhero .photo figcaption { color: rgba(255, 255, 255, .8); }

/* people pages */
.phero { display: grid; grid-template-columns: 220px 1fr; gap: 30px; align-items: start; }
.portrait img, .portrait.ph { width: 220px; height: 260px; object-fit: cover; object-position: 50% 15%; border-radius: 18px; box-shadow: 0 16px 36px rgba(10, 0, 30, .4); border: 4px solid rgba(255, 255, 255, .85); }
.portrait.ph { display: flex; align-items: center; justify-content: center; font-size: 5rem; font-weight: 900; background: rgba(255, 255, 255, .15); }
.chart-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 8px; }
.timeline { min-width: 640px; width: 100%; height: auto; display: block; }
.tl-grid { stroke: var(--line); stroke-width: 1; }
.tl-ax { fill: var(--muted); font-size: 12px; font-family: var(--sans); }
.tl-lab { fill: var(--ink); font-size: 13px; font-weight: 600; font-family: var(--sans); }
.tl-bar:hover { filter: brightness(1.12); }
.psearch { gap: 10px; margin: 12px 0 18px; }
.psearch input { flex: 1; }
.psearch select { border-radius: 99px; padding: 0 12px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); font: inherit; }
.pgrid, .rank-people { list-style: none; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.pgrid > *, .rank-people > * { flex: 0 1 calc((100% - 3 * 10px) / 4); min-width: 0; }   /* 4/3/2/1 at the old auto-fill widths, short last row centred (PARK-56) */
@media (max-width: 1062px) { .pgrid > *, .rank-people > * { flex-basis: calc((100% - 2 * 10px) / 3); } }
@media (max-width: 802px) { .pgrid > *, .rank-people > * { flex-basis: calc((100% - 10px) / 2); } }
@media (max-width: 542px) { .pgrid > *, .rank-people > * { flex-basis: 100%; } }
.pgrid a, .rank-people a { display: flex; gap: 12px; align-items: center; background: var(--card); border-radius: 12px; padding: 9px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); }
.pgrid small, .rank-people small { display: block; color: var(--muted); }
.pgrid a:hover, .rank-people a:hover { outline: 2px solid var(--pink); }

/* networks */
.net-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.net-grid > * { flex: 0 1 calc((100% - 3 * 14px) / 4); min-width: 0; }   /* 32 networks: 4 / 2 / 1 columns, short last row centred (PARK-56) */
@media (max-width: 1000px) { .net-grid > * { flex-basis: calc((100% - 14px) / 2); } }
@media (max-width: 486px) { .net-grid > * { flex-basis: 100%; } }
.net { background: var(--card); border-radius: var(--r); overflow: hidden; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); display: flex; flex-direction: column; }
.net img, .net-ph { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 900; font-size: 1.6rem; text-align: center; padding: 8px; }
.net-body { padding: 10px 14px 14px; display: flex; flex-direction: column; gap: 2px; }
.net-hero { display: grid; grid-template-columns: 1fr minmax(0, 420px); gap: 30px; align-items: center; }
.net-photo img { width: 100%; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.dtable { width: 100%; border-collapse: collapse; background: var(--card); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); font-size: .95rem; }
.dtable th, .dtable td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.dtable th { background: var(--bg2); font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.dtable .chips { margin: 0; }
.dtable .chip { font-size: .75rem; padding: 1px 8px; }
.rtable td:first-child { white-space: nowrap; font-weight: 650; }

/* country page */
.sidebar-layout { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 28px; }
.side { position: sticky; top: 80px; align-self: start; background: var(--card); border-radius: var(--r); padding: 4px 18px 18px; box-shadow: var(--shadow); }
.side h2 { font-size: 1.05rem; margin: 1em 0 .4em; }
.plain { list-style: none; padding: 0; margin: 0; }
.plain li { padding: 3px 0; display: flex; justify-content: space-between; gap: 8px; }

/* genres / years */
.gtable { display: grid; gap: 8px; }
.grow { --h: 330; display: grid; grid-template-columns: 200px 1fr 60px; gap: 12px; align-items: center; background: var(--card); border-radius: 12px; padding: 12px 16px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); border-left: 8px solid hsl(var(--h) 75% 52%); }
.gname { font-weight: 800; }
.gcounts { display: flex; flex-wrap: wrap; gap: 6px; }
.gc { font-size: .82rem; background: var(--bg2); border-radius: 99px; padding: 1px 9px; color: var(--muted); }
.gtotal { font-weight: 900; font-size: 1.3rem; text-align: right; color: hsl(var(--h) 70% 45%); }
.ybars { display: grid; gap: 5px; }
.yrow { display: grid; grid-template-columns: 50px 1fr 34px minmax(0, 220px); gap: 10px; align-items: center; text-decoration: none; color: var(--ink); padding: 3px 6px; border-radius: 8px; }
.yrow:hover { background: var(--bg2); }
.y { font-weight: 800; }
.ybar { display: flex; height: 16px; }
.seg { display: block; height: 100%; }
.seg:first-child { border-radius: 4px 0 0 4px; }
.seg:last-child { border-radius: 0 4px 4px 0; }
.yn { font-weight: 700; text-align: right; }
.ytop { color: var(--muted); font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: .9rem; color: var(--muted); }
.sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

/* lists */
.list-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }   /* 8 lists: 4 / 2 / 1 columns (PARK-56) */
@media (max-width: 1000px) { .list-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 608px) { .list-tiles { grid-template-columns: 1fr; } }
.ltile { background: var(--card); border-radius: var(--r); padding: 16px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 6px; }
.ltile span:last-child { color: var(--muted); font-size: .93rem; }
.lt-cards { display: flex; height: 110px; margin-bottom: 8px; }
.lt-cards img { width: 78px; border-radius: 8px; box-shadow: var(--shadow); margin-right: -18px; }
.lt-cards img:nth-child(2) { transform: rotate(4deg) translateY(4px); }
.lt-cards img:nth-child(3) { transform: rotate(8deg) translateY(8px); }
.rank { list-style: none; counter-reset: r; padding: 0; display: grid; gap: 14px; }
.rank li { counter-increment: r; display: grid; grid-template-columns: 46px 96px 1fr; gap: 16px; align-items: center; background: var(--card); border-radius: var(--r); padding: 12px; box-shadow: var(--shadow); }
.rank li::before { content: counter(r); font-weight: 900; font-size: 1.8rem; color: var(--pink); text-align: center; grid-column: 1; grid-row: 1; }
.rank li > a { grid-column: 2; grid-row: 1; }
.rank li > div { grid-column: 3; grid-row: 1; min-width: 0; }
.rank img { width: 96px; border-radius: 9px; display: block; }
.rank-title { margin: 0; font-size: 1.15rem; }
.rank-title a { color: var(--ink); text-decoration: none; }
.rank p { margin: 4px 0; }
.rank-metric b { color: var(--pink); font-size: 1.15rem; }

/* finder & like */
.finder { background: var(--card); border-radius: var(--r); padding: 16px 18px; box-shadow: var(--shadow); margin-bottom: 18px; }
.finder fieldset { border: 0; padding: 0; margin: 0 0 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.finder legend { font-weight: 800; font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 6px; padding: 0; width: 100%; }
.tog { --h: 330; position: relative; }
.tog input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.tog span { display: inline-block; padding: 5px 12px; border-radius: 99px; border: 1.5px solid var(--line); font-size: .9rem; font-weight: 650; cursor: pointer; }
.tog input:checked + span { background: hsl(var(--h) 78% 50%); border-color: transparent; color: #fff; }
.f-cc .tog input:checked + span { background: var(--pink); }
.tog input:focus-visible + span { outline: 2px solid var(--pink); outline-offset: 2px; }
.f-row { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; }
.f-row label { display: flex; align-items: center; gap: 6px; font-weight: 650; font-size: .92rem; }
.f-row input, .f-row select { font: inherit; padding: 6px 9px; border-radius: 8px; border: 1.5px solid var(--line); background: var(--bg); color: var(--ink); }
.f-row input[type=number] { width: 84px; }
.f-count { font-weight: 700; margin: 10px 0 0; }
#fmore { margin: 18px auto; }
html.js #ftable.hide { display: none; }
.like-tool { background: linear-gradient(120deg, #ff2e6e, #7a2cff); color: #fff; padding: 22px; border-radius: 18px; margin-bottom: 20px; }
.like-tool .muted, .like-tool a { color: rgba(255, 255, 255, .92); }
.like-label { display: block; font-weight: 900; font-size: 1.5rem; margin-bottom: 8px; }
.like-input { position: relative; max-width: 620px; }
.like-input input { padding: 13px 18px; font-size: 1.1rem; border: 0; color: var(--ink); }
.like-input .results { color: var(--ink); }
.like-pick { display: grid; grid-template-columns: 150px 1fr; gap: 20px; align-items: center; margin-bottom: 18px; }
.like-pick img { border-radius: 12px; box-shadow: var(--shadow); }
.az { columns: 3 220px; padding-left: 18px; }
.az li { break-inside: avoid; margin: 2px 0; }
.how { max-width: 75ch; }
.wl-tools { margin: 10px 0 16px; }

/* footer */
.foot { margin-top: 60px; background: #1a1029; color: #d9cfe8; padding: 34px 0 26px; }
.foot a { color: #fff; text-decoration: none; display: block; padding: 2px 0; }
.foot a:hover { text-decoration: underline; }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 24px; }
.foot-brand { font-size: 1.3rem; font-weight: 850; color: #fff; margin: 0 0 6px; }
.foot-brand b { color: #ff5c8f; }
.foot-h { font-weight: 800; color: #fff; margin: 0 0 6px; text-transform: uppercase; font-size: .8rem; letter-spacing: .08em; }
.tm { font-size: .8rem; color: #a99bbf; margin: 16px 0 0; max-width: 110ch; }
.tm a { display: inline; color: #d9cfe8; text-decoration: underline; }

/* responsive */
@media (max-width: 1000px) {
  .hero-in { grid-template-columns: 1fr; }
  .fan { height: 300px; max-width: 520px; width: 100%; margin: 0 auto; }
  .fan img { width: 34%; }
  .ctiles { grid-template-columns: repeat(6, 1fr); } .ctile { grid-column: span 2; } .ctile:nth-child(-n+2) { grid-column: span 3; }   /* 5 countries: 2 + 3, full rows (PARK-56) */
  .grid > * { flex-basis: calc((100% - 2 * 18px) / 3); }
  .gtiles > * { flex-basis: calc((100% - 2 * 10px) / 3); }
  .tools { grid-template-columns: repeat(2, 1fr); }
  .dgrid { grid-template-columns: 1fr; }
  .sidebar-layout { grid-template-columns: 1fr; }
  .side { position: static; }
  .net-hero { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 15.5px; }
  .bar { gap: 8px 12px; padding-top: 8px; padding-bottom: 8px; }
  .nav { order: 3; width: 100%; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; width: calc(100% + 32px); }
  .nav a { white-space: nowrap; font-size: .9rem; padding: 5px 9px; }
  .search { order: 4; flex: 1 1 100%; min-width: 0; margin-left: 0; }
  .wl-link { margin-left: auto; }
  .ctiles { grid-template-columns: repeat(2, 1fr); }
  .ctile:nth-child(n) { grid-column: auto; }
  .ctile:first-child { grid-column: span 2; }
  .tools { grid-template-columns: 1fr; }
  .grid { gap: 12px; } .grid > * { flex-basis: calc((100% - 12px) / 2); }
  .card-body { padding: 8px 10px 11px; }
  .dhero-in { grid-template-columns: 1fr; gap: 14px; }
  .dhero-card { width: 150px; }
  .phero { grid-template-columns: 1fr; gap: 10px; }
  .portrait img, .portrait.ph { width: 150px; height: 180px; }
  .facts dl { grid-template-columns: 1fr; gap: 2px; }
  .facts dd { margin-bottom: 8px; }
  .grow { grid-template-columns: 1fr 50px; }
  .gcounts { grid-column: 1 / -1; grid-row: 2; }
  .yrow { grid-template-columns: 44px 1fr 30px; }
  .ytop { display: none; }
  .rank li { grid-template-columns: 30px 72px 1fr; gap: 10px; }
  .rank img { width: 72px; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-grid > div:first-child { grid-column: 1 / -1; }
  .like-pick { grid-template-columns: 100px 1fr; }
  .gtiles > * { flex-basis: calc((100% - 10px) / 2); }
  .psearch { flex-direction: column; }
  .psearch select { padding: 8px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
