/* Showpedia — styles. The base look is an encyclopedia; the in-game apps each have their own skin. */
:root {
  --bg: #f6f6f6; --page: #ffffff; --text: #202122; --muted: #54595d; --line: #a2a9b1; --soft: #eaecf0; --panel: #f8f9fa;
  --link: #3366cc; --visited: #6b4ba1; --red: #d73333; --accent: #36c; --good: #14866d; --bad: #d33; --warn: #fc3;
  --serif: 'Linux Libertine', 'Georgia', 'Times', serif; --sans: -apple-system, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans); font-size: 15px; line-height: 1.55; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
a.i { font-style: italic; }
.redlink { color: var(--red); }
.dim { color: var(--muted); }
.small, small { font-size: 0.86em; }
.neg { color: var(--bad) !important; }
.pos { color: var(--good) !important; }
.nowrap { white-space: nowrap; }
svg.portrait { border-radius: 6px; display: inline-block; vertical-align: middle; background: #ddd; }
svg.portrait.mini { border-radius: 50%; }
svg.poster { display: block; border-radius: 3px; box-shadow: 0 1px 4px rgba(0,0,0,.25); max-width: 100%; height: auto; }
.pic-link { display: inline-block; line-height: 0; vertical-align: middle; }

/* ---------- shell ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar { width: 190px; flex: none; padding: 12px 10px 30px 14px; background: var(--bg); position: sticky; top: 0; align-self: flex-start; max-height: 100vh; overflow-y: auto; }
.brand { display: flex; gap: 8px; align-items: center; color: var(--text); margin-bottom: 14px; }
.brand:hover { text-decoration: none; }
.brand b { font-family: var(--serif); font-size: 1.35em; font-weight: normal; display: block; letter-spacing: .5px; }
.brand small { font-family: var(--serif); font-size: .72em; color: var(--muted); display: block; line-height: 1.2; }
.sidebar h4 { font-size: .75em; color: var(--muted); font-weight: normal; margin: 14px 0 4px; border-bottom: 1px solid #c8ccd1; padding-bottom: 2px; }
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li a { display: block; padding: 2px 0; font-size: .9em; }
.sidebar li a.active { font-weight: bold; color: var(--text); }
.badge { background: var(--bad); color: #fff; border-radius: 9px; padding: 0 6px; font-size: .78em; font-weight: bold; }
.app-dot { display: inline-block; width: 16px; height: 16px; border-radius: 4px; font-size: 10px; line-height: 16px; text-align: center; color: #fff; font-weight: bold; margin-right: 6px; vertical-align: 1px; }
.app-dot.sdb { background: #f5c518; color: #000; } .app-dot.frm { background: #14181c; color: #00e054; } .app-dot.rpm { background: #fa320a; } .app-dot.cht { background: #6c3ce1; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; padding: 8px 18px; background: var(--page); border-bottom: 1px solid var(--line); border-left: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.search input { width: 240px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 2px; font: inherit; }
.stats { display: flex; gap: 14px; flex-wrap: wrap; font-size: .9em; }
.stats small { color: var(--muted); }
.advance { margin-left: auto; display: flex; gap: 6px; }
.content { background: var(--page); border-left: 1px solid var(--line); padding: 14px 28px 40px; flex: 1; }
.foot { font-size: .75em; color: var(--muted); padding: 14px 28px; border-left: 1px solid var(--line); background: var(--page); border-top: 1px solid var(--soft); }

/* ---------- buttons, forms ---------- */
.btn { display: inline-block; font: inherit; font-size: .92em; padding: 5px 12px; border: 1px solid var(--line); border-radius: 2px; background: var(--panel); color: var(--text); cursor: pointer; line-height: 1.3; }
.btn:hover { background: #fff; border-color: #72777d; text-decoration: none; }
.btn.primary { background: #36c; border-color: #36c; color: #fff; font-weight: 600; }
.btn.primary:hover { background: #447ff5; }
.btn.danger { color: var(--bad); border-color: var(--bad); }
.btn.sm { padding: 2px 8px; font-size: .82em; }
.btn.big { font-size: 1.1em; padding: 9px 22px; }
.btn[disabled] { opacity: .45; cursor: default; }
input, select, textarea { font: inherit; padding: 4px 6px; border: 1px solid var(--line); border-radius: 2px; background: #fff; color: var(--text); }
label { display: block; margin: 6px 0; }
label > input:not([type=radio]):not([type=checkbox]), label > select, label > textarea { display: block; width: 100%; margin-top: 2px; }
label.radio { display: inline-block; margin-right: 12px; }
.bar { height: 6px; background: var(--soft); border-radius: 3px; overflow: hidden; margin: 4px 0; }
.bar > div { height: 100%; background: var(--accent); }
.bar.full > div { background: var(--good); } .bar.fame > div { background: #e0a100; }
.notice { background: #fef6e7; border: 1px solid #fc3; padding: 10px 14px; margin: 10px 0; border-radius: 2px; }
.notice.good { background: #d5fdf4; border-color: #14866d; }
.notice ul { margin: 4px 0 0; }
.card { background: var(--panel); border: 1px solid var(--soft); border-radius: 3px; padding: 12px 14px; margin: 10px 0; }
.card h2, .card h3 { margin-top: 0; }
.chance { font-size: .8em; font-weight: bold; padding: 1px 5px; border-radius: 3px; }
.chance.hi { background: #d5fdf4; color: #14866d; } .chance.mid { background: #fef6e7; color: #a66200; } .chance.lo { background: #fee7e6; color: #d33; }
#toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%) translateY(120px); background: #202122; color: #fff; padding: 10px 18px; border-radius: 4px; transition: transform .25s; z-index: 99; max-width: 90vw; box-shadow: 0 4px 14px rgba(0,0,0,.3); }
#toast.show { transform: translateX(-50%) translateY(0); }
#toast.good { background: #14866d; } #toast.bad { background: #b32424; }

/* ---------- wiki article ---------- */
.wtabs { display: flex; justify-content: space-between; border-bottom: 1px solid var(--line); margin: -6px 0 0; font-size: .85em; }
.wtabs a { display: inline-block; padding: 4px 10px; color: var(--link); }
.wtabs a.sel { color: var(--text); border-bottom: 2px solid var(--text); }
.wtabs a.dim { color: var(--muted); cursor: default; }
.firstHeading { font-family: var(--serif); font-weight: normal; font-size: 1.95em; border-bottom: 1px solid var(--line); margin: 14px 0 2px; padding-bottom: 2px; line-height: 1.3; }
.siteSub { font-size: .82em; color: var(--muted); margin-bottom: 12px; }
.hatnote { font-style: italic; padding-left: 1.6em; margin-bottom: 8px; color: var(--muted); }
.wiki h2, .gpage h2 { font-family: var(--serif); font-weight: normal; font-size: 1.5em; border-bottom: 1px solid var(--line); margin: 1.1em 0 .4em; padding-bottom: 2px; clear: none; }
.wiki h3, .gpage h3 { font-size: 1.1em; margin: .9em 0 .3em; }
.wiki p { margin: .4em 0 .7em; }
.infobox { float: right; clear: right; width: 300px; margin: 0 0 14px 18px; border: 1px solid var(--line); background: var(--panel); font-size: .86em; border-collapse: collapse; line-height: 1.4; }
.infobox caption { font-size: 1.3em; font-weight: bold; padding: 6px 4px 4px; }
.infobox th, .infobox td { padding: 3px 6px; vertical-align: top; text-align: left; }
.infobox th { width: 38%; }
.ib-image { text-align: center; padding: 6px !important; }
.ib-image svg { margin: 0 auto; }
.ib-cap { font-size: .9em; color: var(--muted); padding-top: 3px; }
.ib-head { text-align: center !important; background: #dde3ec; }
.chron { display: flex; justify-content: space-between; gap: 10px; }
.toc { display: inline-block; border: 1px solid var(--line); background: var(--panel); padding: 7px 14px 7px 10px; font-size: .9em; margin: 6px 0; }
.toc ol { margin: 4px 0 0; padding-left: 1.6em; }
.wikitable { border: 1px solid var(--line); border-collapse: collapse; background: var(--panel); margin: .6em 0 1em; font-size: .9em; }
.wikitable th, .wikitable td { border: 1px solid var(--line); padding: 4px 8px; text-align: left; vertical-align: middle; }
.wikitable th { background: var(--soft); }
.wikitable.full { width: 100%; }
.wikitable td.won { background: #9eff9e; text-align: center; } .wikitable td.nom { background: #ffdddd; text-align: center; }
.sortable th { cursor: pointer; white-space: nowrap; }
.sortable th::after { content: ' \21C5'; color: #999; font-size: .8em; }
.sortable th[data-dir=asc]::after { content: ' \25B2'; } .sortable th[data-dir=desc]::after { content: ' \25BC'; }
.episodes td.ep-title { font-weight: 500; }
.references { font-size: .86em; columns: 2; column-gap: 2em; }
.references li { break-inside: avoid; margin-bottom: 3px; }
.references li.flash { background: #eaf3ff; }
.ref { font-size: .72em; line-height: 1; } .ref a { cursor: pointer; }
.catlinks { border: 1px solid var(--line); background: var(--panel); padding: 6px 10px; margin-top: 2em; font-size: .85em; clear: both; }
.cast-list { list-style: none; padding-left: .4em; }
.cast-list li { margin: 4px 0; }
.genres a.sel, .genres .sel { font-weight: bold; color: var(--text); }
.news { padding-left: 1.3em; }
.news li { margin: 3px 0; }
.news-date { font-family: var(--sans) !important; font-size: .95em !important; border: 0 !important; margin: 1em 0 .2em !important; }
.evtype { display: inline-block; font-size: .72em; text-transform: uppercase; letter-spacing: .3px; background: var(--soft); color: var(--muted); padding: 0 5px; border-radius: 2px; margin-right: 4px; vertical-align: 1px; }
.t-premiere { background: #e5f0ff; color: #2a4b8d; } .t-cancel { background: #fee7e6; color: #b32424; } .t-renewal { background: #d5fdf4; color: #14866d; } .t-award { background: #fef6e7; color: #a66200; } .t-player { background: #f3e8ff; color: #6b2fb3; } .t-greenlight { background: #e8f5e9; color: #2e7d32; }
.pager { display: flex; gap: 16px; align-items: center; }
.chart { color: var(--muted); }
.events td:first-child { width: 70px; }
.awards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 10px; }
.award-cat { border: 1px solid var(--line); background: var(--panel); padding: 4px 12px; }
.award-cat h3 { margin: 6px 0; font-size: 1em; }
.award-cat ul { padding-left: 1.1em; margin: 0 0 8px; }
.award-cat li.winner { font-weight: bold; list-style: none; margin-left: -1.1em; }
.search-res li { margin: 3px 0; }

/* main page */
.mp-welcome { text-align: center; border: 1px solid var(--line); background: linear-gradient(#fbfbfb, #f2f4f7); padding: 14px; margin: 10px 0 14px; }
.mp-welcome h1 { font-family: var(--serif); font-weight: normal; margin: 0; font-size: 1.9em; }
.mp-welcome h1 span { color: var(--link); }
.mp-welcome p { margin: 2px 0 0; }
.mp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.mp-box { border: 1px solid #a3bfb1; background: #f5fffa; padding: 0 12px 10px; }
.mp-box.blue { border-color: #a3b0bf; background: #f5faff; }
.mp-box h2 { font-family: var(--serif); font-weight: normal; font-size: 1.15em; margin: 0 -12px 8px; padding: 4px 12px; background: #cef2e0; border-bottom: 1px solid #a3bfb1; }
.mp-box.blue h2 { background: #cedff2; border-color: #a3b0bf; }
.mp-box ul { padding-left: 1.2em; margin: 4px 0; } .mp-box li { margin: 3px 0; }
.mp-feat svg.poster { float: left; margin: 2px 12px 6px 0; }
.more { text-align: right; font-size: .9em; }

/* ---------- game pages ---------- */
.gpage .firstHeading { margin-top: 4px; }
.desk { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; }
.task { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--soft); }
.task .ctl { display: flex; gap: 4px; align-items: center; flex: none; }
.task input { width: 58px; text-align: center; }
.hrs { float: right; font-family: var(--sans); font-size: .7em; padding-top: 6px; }
.card.me { display: flex; gap: 12px; align-items: center; }
.card.me h2 { font-size: 1.15em; border: 0; margin: 0; }
.skillrow { display: grid; grid-template-columns: 1fr auto; font-size: .9em; }
.skillrow .bar { grid-column: 1 / -1; margin-top: 0; }
.mini-proj { margin: 6px 0; }
.inbox { padding-left: 0; list-style: none; font-size: .88em; max-height: 340px; overflow-y: auto; }
.inbox li { margin: 4px 0; border-bottom: 1px dotted var(--soft); padding-bottom: 3px; }
.report ul { padding-left: 1.3em; }
.rep-stats { display: flex; flex-wrap: wrap; gap: 10px; }
.rep-stats > div { border: 1px solid var(--soft); background: var(--panel); padding: 6px 14px; min-width: 110px; display: flex; flex-direction: column; }
.rep-stats b { font-size: 1.4em; }
.pipeline { display: flex; list-style: none; padding: 0; margin: 14px 0; counter-reset: ph; flex-wrap: wrap; }
.pipeline li { flex: 1; min-width: 100px; text-align: center; font-size: .8em; padding: 6px 4px; background: var(--soft); color: var(--muted); position: relative; margin-right: 2px; }
.pipeline li.done { background: #c5e5d9; color: #14533f; }
.pipeline li.cur { background: #36c; color: #fff; font-weight: bold; }
.proj-head { display: flex; gap: 16px; align-items: flex-start; }
.proj-head svg.poster { flex: none; }
.logline { font-family: var(--serif); font-size: 1.1em; font-style: italic; }
.plog { font-size: .88em; padding-left: 1.2em; max-height: 280px; overflow-y: auto; }
.budget td:nth-child(n+2) { text-align: right; }
.budget tr.neg td { color: var(--bad); }
.cast-table input.charname { width: 170px; }
.weekpick { display: flex; flex-wrap: wrap; gap: 6px; }
.weekpick label { border: 1px solid var(--line); padding: 4px 10px; display: flex; flex-direction: column; cursor: pointer; margin: 0; background: #fff; }
.weekpick label.sel { border-color: #36c; background: #eaf3ff; }
.weekpick input { display: none; }
.results { display: flex; gap: 10px; flex-wrap: wrap; margin: 8px 0; }
.res-box { border: 1px solid var(--line); background: var(--panel); padding: 8px 16px; display: flex; flex-direction: column; align-items: center; min-width: 110px; }
.res-box b { font-size: 1.5em; }
.cols2 { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 16px; }
.talent td { vertical-align: middle; }
.contact { color: var(--good); }
.filter input { width: 300px; }

/* ---------- new game ---------- */
.newgame { max-width: 1180px; margin: 0 auto; padding: 20px; }
.ng-head { display: flex; gap: 14px; align-items: center; }
.ng-head h1 { font-family: var(--serif); font-weight: normal; margin: 0; font-size: 2.4em; }
.ng-head p { margin: 0; color: var(--muted); }
.ng-grid { display: grid; grid-template-columns: 300px 1fr 1fr; gap: 16px; margin-top: 16px; }
.ng-box { background: var(--page); border: 1px solid var(--line); padding: 14px 16px; }
.ng-box h2 { font-family: var(--serif); font-weight: normal; margin: 0 0 8px; border-bottom: 1px solid var(--soft); }
.ng-face { display: flex; gap: 10px; align-items: flex-end; margin-bottom: 8px; }
.ng-origin { border: 1px solid var(--soft); padding: 6px 8px; cursor: pointer; font-size: .92em; }
.ng-origin.sel { border-color: #36c; background: #eaf3ff; }
.ng-origin span { color: var(--muted); }
.ng-skill { margin: 8px 0; }
.ng-skill .ctl { display: flex; gap: 6px; align-items: center; }
.ng-skill .val { min-width: 60px; text-align: center; font-weight: bold; }
.pts { float: right; font-size: .6em; font-family: var(--sans); background: #eaf3ff; padding: 2px 8px; margin-top: 8px; }

/* ---------- apps (shared) ---------- */
.app { margin: -14px -28px -40px; min-height: calc(100vh - 100px); }
.app-head { display: flex; align-items: center; gap: 24px; padding: 10px 24px; }
.app-head nav { display: flex; gap: 16px; }
.app-body { padding: 16px 24px 40px; }
.stars { color: #00c030; letter-spacing: 1px; }

/* ScreenDB */
.screendb { background: #fff; color: #000; }
.screendb .app-head { background: #121212; }
.screendb .app-head nav a { color: #fff; }
.sdb-logo { background: #f5c518; color: #000 !important; font-weight: 900; font-family: Impact, 'Arial Black', sans-serif; padding: 2px 8px; border-radius: 4px; font-size: 1.3em; letter-spacing: .5px; text-decoration: none !important; }
.screendb h2 { border-left: 4px solid #f5c518; padding-left: 10px; font-size: 1.35em; }
.screendb a { color: #0e63be; }
.sdb-star { color: #f5c518; }
.sdb-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.sdb-list { list-style: none; padding: 0; }
.sdb-list li { display: grid; grid-template-columns: 28px 52px 1fr auto; gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid #eee; }
.sdb-list .rank { font-weight: bold; color: #777; text-align: right; }
.sdb-list .r { text-align: right; white-space: nowrap; font-size: .92em; }
.sdb-strip { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.sdb-card { display: flex; flex-direction: column; width: 120px; flex: none; color: #000 !important; font-size: .88em; gap: 2px; }
.sdb-hero { display: flex; gap: 24px; background: #1f1f1f; color: #fff; margin: -16px -24px 16px; padding: 22px 24px; }
.sdb-hero h1 { margin: 0; font-size: 2.2em; font-weight: 400; }
.sdb-hero .sub { color: #aaa; margin: 0 0 10px; }
.sdb-hero a { color: #5799ef; }
.sdb-hero dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; border-top: 1px solid #444; padding-top: 8px; }
.sdb-hero dt { font-weight: bold; }
.sdb-hero dd { margin: 0; }
.sdb-hero svg.portrait { border-radius: 4px; }
.sdb-rating { display: flex; gap: 30px; margin: 10px 0; }
.sdb-rating small { color: #aaa; letter-spacing: 1px; font-size: .72em; }
.sdb-rating b { font-size: 1.3em; }
.sdb-seasons a { display: inline-block; padding: 2px 10px; margin: 0 3px; border-radius: 12px; border: 1px solid #ccc; color: #000 !important; }
.sdb-seasons a.sel { background: #f5c518; border-color: #f5c518; font-weight: bold; }
.sdb-eps { list-style: none; padding: 0; }
.sdb-eps li { display: grid; grid-template-columns: 1fr auto auto; gap: 18px; padding: 8px 0; border-bottom: 1px solid #eee; align-items: center; }
.sdb-cast { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.sdb-cast a { display: flex; gap: 10px; align-items: center; color: #000 !important; font-size: .88em; }
.sdb-cast svg { border-radius: 50%; }
.sdb-credits { width: 100%; border-collapse: collapse; }
.sdb-credits td { padding: 8px 4px; border-bottom: 1px solid #eee; }

/* Framed */
.framed { background: #14181c; color: #9ab; }
.framed .app-head { background: #14181c; border-bottom: 1px solid #2c3440; }
.framed a { color: #def; }
.framed .app-head nav a { color: #9ab; text-transform: uppercase; font-size: .8em; letter-spacing: 1px; font-weight: bold; }
.frm-logo { font-weight: 900; font-size: 1.5em; color: #fff !important; text-decoration: none !important; display: flex; align-items: center; gap: 8px; letter-spacing: -.5px; }
.frm-logo .dots i { display: inline-block; width: 14px; height: 14px; border-radius: 50%; margin-right: -3px; }
.frm-logo .dots i:nth-child(1) { background: #ff8000; } .frm-logo .dots i:nth-child(2) { background: #00e054; } .frm-logo .dots i:nth-child(3) { background: #40bcf4; }
.frm-welcome { color: #fff; font-family: Georgia, serif; font-size: 1.5em; text-align: center; padding: 20px 0; }
.frm-h { color: #9ab; text-transform: uppercase; letter-spacing: 1.2px; font-size: .78em; border-bottom: 1px solid #456; padding-bottom: 4px; margin-top: 26px; }
.frm-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.frm-poster { display: inline-block; line-height: 0; border: 1px solid #2c3440; border-radius: 4px; overflow: hidden; }
.frm-poster:hover { border-color: #00e054; }
.frm-under { text-align: center; font-size: .8em; }
.frm-feed { display: flex; flex-direction: column; }
.frm-rev { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid #2c3440; }
.frm-rev p { color: #def; margin: 4px 0; font-family: Georgia, serif; }
.frm-who { font-size: .85em; display: flex; align-items: center; gap: 6px; }
.frm-who b { color: #fff; }
.frm-av { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; color: #fff; font-weight: bold; font-size: .8em; flex: none; }
.frm-hero { display: grid; grid-template-columns: auto 1fr 200px; gap: 24px; padding: 10px 0; }
.frm-hero h1 { color: #fff; font-family: Georgia, serif; margin: 0; font-size: 2em; }
.frm-hero h1 small { color: #9ab; font-weight: normal; font-size: .55em; }
.frm-by { color: #9ab; margin: 4px 0; }
.frm-desc { color: #def; font-family: Georgia, serif; }
.frm-side { text-align: center; }
.frm-avg { font-size: 2.6em; color: #fff; font-weight: 300; }
.frm-hist { display: flex; align-items: flex-end; gap: 2px; height: 64px; margin: 8px 0; justify-content: center; }
.frm-hist i { width: 14px; background: #456; border-radius: 1px; }
.frm-seasons a, .frm-tags a { display: inline-block; background: #283038; padding: 2px 10px; border-radius: 3px; margin: 2px; font-size: .85em; }
.frm-seasons a.sel { background: #00e054; color: #14181c; font-weight: bold; }
.frm-listrow { display: flex; gap: 16px; padding: 12px 0; border-bottom: 1px solid #2c3440; align-items: center; }
.frm-listrow b { color: #fff; }
.frm-stack { display: flex; flex: none; }
.frm-stack svg { margin-right: -30px; border: 1px solid #14181c; }
.frm-stack svg:last-child { margin-right: 0; }
.frm-mini { font-size: .82em; margin-top: 4px; }

/* RipeMeter */
.ripe { background: #fff; color: #2a2c32; }
.ripe .app-head { background: #fa320a; }
.ripe .app-head nav a { color: #fff; font-weight: bold; }
.rpm-logo { color: #fff !important; font-weight: 900; font-size: 1.35em; display: flex; align-items: center; gap: 6px; text-decoration: none !important; }
.rpm-logo svg { background: #fff; border-radius: 50%; padding: 1px; }
.ripe h2 { text-transform: uppercase; font-size: 1em; letter-spacing: .5px; border-bottom: 3px solid #fa320a; padding-bottom: 4px; display: flex; align-items: center; gap: 6px; }
.rpm-row { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 8px; }
.rpm-tile { display: flex; flex-direction: column; width: 124px; flex: none; color: #2a2c32 !important; font-size: .86em; gap: 3px; }
.rpm-tile .aud { color: #888; font-size: .9em; }
.rpm-hero { display: flex; gap: 22px; align-items: flex-start; }
.rpm-hero h1 { margin: 0; }
.rpm-hero .sub { color: #777; margin: 0 0 8px; }
.rpm-scores { display: flex; gap: 40px; margin: 12px 0; }
.rpm-scores > div { display: flex; align-items: center; gap: 10px; }
.rpm-scores b { font-size: 2.4em; }
.rpm-scores small { color: #666; line-height: 1.2; }
.rpm-scores .pop { font-size: 2.2em; }
.rpm-cons { background: #f3f3f3; padding: 10px 14px; border-radius: 4px; max-width: 640px; }
.rpm-seasons a, .rpm-filter a, .rpm-years a { display: inline-block; padding: 2px 10px; border: 1px solid #ddd; border-radius: 14px; margin: 2px; color: #2a2c32; font-size: .86em; }
.rpm-seasons a.sel, .rpm-filter a.sel, .rpm-years a.sel { background: #fa320a; color: #fff; border-color: #fa320a; }
.rpm-reviews { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 12px; }
.rpm-rev { border: 1px solid #e3e3e3; border-radius: 6px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.rpm-rev .who { display: flex; gap: 10px; align-items: center; }
.rpm-rev .who svg { border-radius: 50%; }
.rpm-rev em, .rpm-critics em { font-style: normal; font-size: .65em; background: #2a2c32; color: #fff; padding: 1px 5px; border-radius: 2px; vertical-align: 2px; }
.rpm-rev .quote { display: grid; grid-template-columns: 26px 1fr; gap: 6px; background: #f8f8f8; padding: 8px; border-radius: 4px; }
.rpm-rev .quote p { margin: 0; }
.rpm-rev .quote small { grid-column: 2; color: #777; }
.rpm-rank li { margin: 4px 0; }
.rpm-critics { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.rpm-critics a { display: flex; gap: 10px; align-items: center; color: #2a2c32; }
.rpm-critics svg { border-radius: 50%; }

/* Charts */
.charts { background: #100c1c; color: #ddd; }
.charts .app-head { background: #1c1430; }
.charts a { color: #c8b6ff; }
.cht-logo { color: #fff; font-weight: 900; font-size: 1.3em; }
.charts h1 { color: #fff; margin: 0; }
.cht-tabs a { display: inline-block; padding: 2px 10px; border-radius: 12px; background: #2a2140; margin: 2px; font-size: .85em; }
.cht-tabs a.sel { background: #6c3ce1; color: #fff; }
.cht-list { list-style: none; padding: 0; }
.cht-list li { display: grid; grid-template-columns: 40px 40px 44px 1fr 80px; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid #2a2140; }
.cht-list .rank { font-size: 1.8em; font-weight: 900; color: #fff; text-align: center; }
.cht-list .v { text-align: right; color: #fff; }
.cht-list .new { color: #ffd23f; font-size: .75em; font-weight: bold; } .cht-list .up { color: #00e054; font-size: .8em; } .cht-list .down { color: #ff5d73; font-size: .8em; }
.cht-bar { height: 5px; background: #2a2140; border-radius: 3px; margin-top: 4px; }
.cht-bar i { display: block; height: 100%; background: linear-gradient(90deg, #6c3ce1, #c77dff); border-radius: 3px; }
.cht-week { display: flex; gap: 14px; align-items: center; }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .desk, .cols2, .ng-grid, .sdb-cols, .mp-grid { grid-template-columns: 1fr; }
  .frm-hero { grid-template-columns: auto 1fr; }
  .frm-side { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .shell { flex-direction: column; }
  .sidebar { width: auto; position: static; max-height: none; padding: 8px 16px; }
  .sidebar nav { display: flex; flex-wrap: wrap; gap: 0 18px; }
  .sidebar h4 { width: 100%; }
  .sidebar ul { display: flex; flex-wrap: wrap; gap: 0 12px; }
  .topbar { position: static; padding: 8px 16px; }
  .search input { width: 100%; }
  .search { flex: 1 1 100%; }
  .content { padding: 12px 16px 30px; }
  .app { margin: -12px -16px -30px; }
  .infobox { float: none; width: 100%; margin: 0 0 12px; }
  .references { columns: 1; }
  .proj-head, .sdb-hero, .rpm-hero { flex-direction: column; }
  .wikitable { display: block; overflow-x: auto; }
  .rpm-reviews { grid-template-columns: 1fr; }
  .cht-list li { grid-template-columns: 30px 30px 1fr 60px; } .cht-list .thumb { display: none; }
}
.involve summary { cursor: pointer; }
.involve[open] summary { margin-bottom: 6px; }

/* company HQ */
.hq-head { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.hq-name { font-family: var(--serif); font-weight: normal; margin: 0; border: 0 !important; font-size: 1.6em; }
.hq-stats { display: flex; gap: 10px; flex-wrap: wrap; margin-left: auto; }
.hq-stats > div { border: 1px solid var(--soft); background: var(--panel); padding: 4px 12px; display: flex; flex-direction: column; min-width: 100px; }
.hq-stats b { font-size: 1.25em; }
.hq-stats.small4 { margin: 6px 0; }
.st-card h3 { display: flex; align-items: center; gap: 10px; }
.st-controls { display: flex; gap: 12px; flex-wrap: wrap; }
.st-controls label { margin: 4px 0; }
.card.attention { border-color: #fc3; background: #fffaeb; }
.card.inner { background: #fff; }
.checklist { list-style: none; padding-left: 0; }
.checklist li::before { content: '\2610  '; }
.checklist li.ok::before { content: '\2611  '; color: var(--good); }
.own-svc h3 { display: flex; align-items: center; gap: 10px; }
.spark { color: var(--muted); }

/* portrait regeneration */
.ib-tools { margin-top: 4px; }

/* portrait & poster maker */
.maker { display: grid; grid-template-columns: 290px 1fr; gap: 18px; align-items: start; }
.maker-side { position: sticky; top: 10px; }
.maker-preview svg { display: block; box-shadow: 0 2px 10px #0003; }
.maker.face .maker-preview svg { border-radius: 6px; }
.maker-minis { display: flex; gap: 8px; align-items: flex-end; margin: 10px 0; }
.maker-minis svg { border-radius: 50%; }
.maker-buttons { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.maker-controls { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; align-content: start; }
.maker-controls .card { margin: 0; }
.maker-controls h3 { display: flex; justify-content: space-between; align-items: center; margin-top: 0; }
.mrow { display: grid; grid-template-columns: 112px 1fr 92px; align-items: center; gap: 8px; margin: 3px 0; font-size: 0.92em; }
.mrow input[type=range] { width: 100%; }
.mval { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.swatch { display: inline-block; width: 14px; height: 14px; border: 1px solid #0003; border-radius: 3px; vertical-align: middle; margin-right: 2px; }
@media (max-width: 760px) { .maker { grid-template-columns: 1fr; } .maker-side { position: static; } }

/* series-order terms */
.terms { display: flex; flex-wrap: wrap; gap: 4px; align-items: stretch; justify-content: flex-end; }
.terms .btn small { font-weight: normal; opacity: 0.85; }

.ng-face-btns { display: flex; flex-direction: column; gap: 6px; }
.maker-ng { max-width: 1100px; margin: 0 auto; padding: 16px; }

/* ---------------- dark mode ---------------- */
html[data-theme="dark"] {
  --bg: #111317; --page: #1a1c20; --text: #e4e6ea; --muted: #9aa1aa; --line: #3a3f47; --soft: #2a2d33; --panel: #20232a;
  --link: #7fa8ff; --visited: #b49ce0; --red: #ff7b7b; --accent: #7fa8ff; --good: #3ecf9e; --bad: #ff6b6b; --warn: #f5c542;
  color-scheme: dark;
}
html[data-theme="dark"] .sidebar h4 { border-bottom-color: var(--line); }
html[data-theme="dark"] svg.portrait { background: #2a2d33; }
html[data-theme="dark"] .btn:hover { background: #2c3038; border-color: #6b7380; }
html[data-theme="dark"] .btn.primary { background: #3d6fe0; border-color: #3d6fe0; }
html[data-theme="dark"] input, html[data-theme="dark"] select, html[data-theme="dark"] textarea { background: #15171b; }
html[data-theme="dark"] .notice { background: #3a2f12; border-color: #8a6d1c; }
html[data-theme="dark"] .notice.good, html[data-theme="dark"] .chance.hi, html[data-theme="dark"] .t-renewal { background: #113a30; color: #5fe0b7; }
html[data-theme="dark"] .chance.mid { background: #3a2f12; color: #f0b54a; }
html[data-theme="dark"] .chance.lo, html[data-theme="dark"] .t-cancel { background: #401a1a; color: #ff8b8b; }
html[data-theme="dark"] .t-premiere { background: #172a4a; color: #9cc0ff; }
html[data-theme="dark"] .ib-head { background: #2b3340; }
html[data-theme="dark"] .wikitable td.won { background: #1f4d26; color: #b8f5c0; }
html[data-theme="dark"] .wikitable td.nom { background: #4a2222; color: #ffc9c9; }
html[data-theme="dark"] .references li.flash, html[data-theme="dark"] .weekpick label.sel, html[data-theme="dark"] .ng-origin.sel, html[data-theme="dark"] .pts { background: #1d2c47; }
html[data-theme="dark"] .weekpick label, html[data-theme="dark"] .card.inner { background: var(--page); }
html[data-theme="dark"] .mp-welcome { background: linear-gradient(#1f2227, #191b1f); }
html[data-theme="dark"] .mp-box { background: #18221d; border-color: #35503f; }
html[data-theme="dark"] .mp-box h2 { background: #22382c; border-color: #35503f; }
html[data-theme="dark"] .mp-box.blue { background: #181e27; border-color: #364457; }
html[data-theme="dark"] .mp-box.blue h2 { background: #22304a; border-color: #364457; }
html[data-theme="dark"] .pipeline li.done { background: #1d4034; color: #9fe3c7; }
html[data-theme="dark"] .pipeline li.cur { background: #3d6fe0; }
html[data-theme="dark"] .card.attention { background: #2e2814; border-color: #8a6d1c; }
/* the in-game apps keep their brand colors, on dark backgrounds */
html[data-theme="dark"] .screendb { background: #16171a; color: #e8e8e8; }
html[data-theme="dark"] .sdb-list li, html[data-theme="dark"] .sdb-eps li, html[data-theme="dark"] .sdb-credits td { border-bottom-color: #2c2e33; }
html[data-theme="dark"] .ripe { background: #1b1c20; color: #e2e3e6; }
html[data-theme="dark"] .rpm-cons, html[data-theme="dark"] .rpm-rev .quote { background: #26282d; }
html[data-theme="dark"] .rpm-seasons a, html[data-theme="dark"] .rpm-filter a, html[data-theme="dark"] .rpm-years a { color: #e2e3e6; border-color: #3a3c42; }
html[data-theme="dark"] .rpm-rev em, html[data-theme="dark"] .rpm-critics em { background: #3a3c42; }
.theme-toggle { background: none; border: 0; padding: 2px 0; font: inherit; font-size: .9em; color: var(--link); cursor: pointer; text-align: left; }
.theme-toggle:hover { text-decoration: underline; }
html[data-theme="dark"] .rpm-tile, html[data-theme="dark"] .rpm-critics a { color: #e2e3e6 !important; }
html[data-theme="dark"] .rpm-tile .aud, html[data-theme="dark"] .rpm-scores small { color: #a5a8ae; }
html[data-theme="dark"] .screendb a { color: #6ea8ff; }
html[data-theme="dark"] .sdb-card, html[data-theme="dark"] .sdb-cast a { color: #e8e8e8 !important; }
html[data-theme="dark"] .sdb-seasons a:not(.sel) { color: #e8e8e8 !important; border-color: #444; }
html[data-theme="dark"] .sdb-list .rank { color: #9a9a9a; }

/* career & legacy */
.legacy-score { display: flex; align-items: baseline; gap: 12px; margin: 4px 0 8px; }
.legacy-score b { font-size: 2.4em; font-family: var(--serif); font-weight: normal; }
.legacy-score span { font-size: 1.2em; color: var(--muted); }
.goal-group { margin: 10px 0 2px; font-size: .8em; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); }
.goals { list-style: none; padding-left: 0; margin: 0; }
.goals li { padding: 2px 0 2px 22px; position: relative; color: var(--muted); }
.goals li::before { content: '\2610'; position: absolute; left: 0; }
.goals li.done { color: var(--text); }
.goals li.done::before { content: '\2605'; color: #e0a800; }
.retro-head { display: flex; gap: 18px; align-items: center; margin-bottom: 14px; }
.retro-head h2 { font-family: var(--serif); font-weight: normal; font-size: 2em; margin: 0; border: 0; }
.retro-years { margin: 2px 0; color: var(--muted); }
.retro-rank { font-size: 1.4em; margin: 4px 0; }
.retro-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.hof-face svg { vertical-align: middle; border-radius: 50%; }

/* phase 2: guide, difficulty */
.card.guide { border-left: 4px solid var(--link); }
.card.guide h3 { display: flex; justify-content: space-between; align-items: center; margin-top: 0; }
.ng-diff-h { margin: 12px 0 4px; }
.ng-diff { display: grid; gap: 6px; margin-bottom: 10px; }

/* phase 3: relationships, decisions, world settings */
.rel { display: inline-block; font-size: .72em; padding: 0 6px; border-radius: 8px; vertical-align: 1px; border: 1px solid transparent; }
.rel-loyal { background: #d5fdf4; color: #14866d; } .rel-friendly { background: #eaf3ff; color: #2a4b8d; }
.rel-strained { background: #fef6e7; color: #a66200; } .rel-feud { background: #fee7e6; color: #b32424; font-weight: bold; }
html[data-theme="dark"] .rel-loyal { background: #113a30; color: #5fe0b7; } html[data-theme="dark"] .rel-friendly { background: #1d2c47; color: #9cc0ff; }
html[data-theme="dark"] .rel-strained { background: #3a2f12; color: #f0b54a; } html[data-theme="dark"] .rel-feud { background: #401a1a; color: #ff8b8b; }
.decision-opts { display: flex; flex-wrap: wrap; gap: 6px; }
.rel-list { list-style: none; padding: 0; margin: 0; } .rel-list li { padding: 3px 0; }
.ng-world { margin: 10px 0; } .ng-world summary { cursor: pointer; color: var(--link); } .ng-world label { display: block; margin: 6px 0; }

/* rights marketplace */
.ip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.ip-grid .card { margin: 0; }
.ip-head { display: flex; gap: 10px; align-items: center; }
.ip-head h3 { margin: 0; }
.ip-icon { font-size: 1.8em; }
.ip-stats { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 8px; margin: 6px 0; }
.ip-stats small { display: block; color: var(--muted); }
.slots tr.cur td, .slots tr.cur th { background: var(--soft); }

/* ---------------- accessibility & phones ---------------- */
.skip { position: absolute; left: -9999px; top: 0; z-index: 100; background: var(--page); padding: 8px 12px; border: 2px solid var(--link); }
.skip:focus { left: 8px; top: 8px; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
button:focus:not(:focus-visible), a:focus:not(:focus-visible) { outline: none; }
.brand-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.menu-btn { display: none; font: inherit; background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 3px; padding: 4px 12px; cursor: pointer; }
@media (max-width: 760px) {
  .menu-btn { display: inline-block; }
  .sidebar nav { display: none !important; }
  .menu-open .sidebar nav { display: flex !important; }
  .content .wikitable, .content table.full { display: block; overflow-x: auto; max-width: 100%; }
  .gpage, .wiki { overflow-wrap: anywhere; }
  .maker-controls { grid-template-columns: 1fr; }
  .ip-stats { grid-template-columns: 1fr 1fr; }
  .hq-stats { margin-left: 0; }
  .desk-side .card.me { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

.ng-story { background: var(--panel); border-left: 3px solid var(--link); padding: 6px 10px; margin: 8px 0; }

/* ---- errors, preferences, backups (M0) ---- */
#err-banner { position: fixed; left: 50%; bottom: 70px; transform: translateX(-50%); z-index: 120; max-width: min(640px, calc(100vw - 32px)); background: var(--panel, #fff); color: var(--text); border: 1px solid var(--bad, #d33); border-left-width: 5px; border-radius: 6px; padding: 10px 14px; box-shadow: 0 6px 20px rgba(0,0,0,.25); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.err-detail { white-space: pre-wrap; background: var(--soft); padding: 10px; border-radius: 4px; font-size: 13px; overflow-x: auto; }
html[data-size="s"] body { zoom: 0.9; }
html[data-size="l"] body { zoom: 1.15; }
html[data-size="xl"] body { zoom: 1.3; }
html[data-motion="reduce"] *, html[data-motion="reduce"] *::before, html[data-motion="reduce"] *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
.backup-list { list-style: none; padding: 0; margin: 0; }
.backup-list li { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--line); }
.ip-pitch { margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--line); }
.ip-pitch-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; align-items: center; }
.ip-pitch-row select { max-width: 100%; }

/* ---- version tag, update note, What's new ---- */
.build-tag { display: inline-flex; align-items: center; gap: 0; font: 600 11px/1 var(--sans); text-decoration: none !important; border-radius: 999px; overflow: hidden; border: 1px solid var(--line); vertical-align: middle; }
.sidebar > .build-tag { margin: 2px 0 10px 6px; }
.build-tag .bt-v { padding: 3px 7px; background: var(--soft); color: var(--text); }
.build-tag .bt-stage { padding: 3px 8px; background: #151a2e; color: #f6b93b; letter-spacing: .4px; text-transform: uppercase; font-size: 10px; }
.build-tag .stage-early-access { background: #f6b93b; color: #151a2e; }
.build-tag .stage-release { background: #1f8f5f; color: #fff; }
.update-note { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 12px 24px 0; padding: 8px 12px; border-radius: 6px; background: #fff7e0; border: 1px solid #f6b93b; color: #3d2f08; }
html[data-theme="dark"] .update-note { background: #3a2f12; color: #f6e2a8; border-color: #8a6d1c; }
.update-note button { margin-left: auto; }
.ng-stage { margin: 4px 0 14px; padding: 8px 12px; border-left: 3px solid #f6b93b; background: var(--soft); border-radius: 4px; }
.about-row { display: flex; gap: 14px; align-items: flex-start; }
.about-row p { margin: 0 0 8px; }
.wn-hero { display: flex; gap: 12px; align-items: center; margin: 6px 0; }
.wn-title { font: 700 24px Georgia, serif; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.wn-road { list-style: none; padding: 0; margin: 0 0 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.wn-road li { padding: 6px 10px; border-radius: 6px; background: var(--soft); border: 1px solid var(--line); font-size: 13px; position: relative; }
.wn-road li b { margin-right: 2px; }
.wn-road li small { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
.wn-road li.done { opacity: .6; }
.wn-road li.next { opacity: .85; }
.wn-road li.now { background: #151a2e; color: #fff; border-color: #ff5a4f; box-shadow: 0 0 0 2px rgba(255, 90, 79, .35); }
.wn-road li.now small { color: #f6b93b; }

/* ---- demo ---- */
.build-tag .stage-demo { background: #ff5a4f; color: #fff; }
.demo-strip { margin: 10px 24px 0; padding: 6px 12px; border-radius: 6px; background: #151a2e; color: #f7f2e7; font-size: 13px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.demo-strip b { background: #ff5a4f; color: #fff; padding: 1px 7px; border-radius: 4px; letter-spacing: .6px; font-size: 11px; }
.demo-strip a { color: #f6b93b; }
.demo-strip.over { background: #3a1414; }
.ng-stage.demo { border-left-color: #ff5a4f; }
.demo-end { text-align: center; max-width: 720px; margin: 20px auto; }
.demo-end .results { justify-content: center; }
.demo-end .lead { font-size: 17px; }
