:root {
  --y: #fdc302;
  --y-2: #f5c518;
  --ink: #121212;
  --ink-2: #1f1f1f;
  --ink-3: #2b2b2b;
  --text: #202122;
  --muted: #54595d;
  --line: #a2a9b1;
  --line-2: #c8ccd1;
  --paper: #ffffff;
  --paper-2: #f8f9fa;
  --link: #3366cc;
  --link-v: #6b4ba1;
  --red: #a3191b;
  --green: #14866d;
  --bad: #d33;
  --serif: "Gelasio", "Linux Libertine", Georgia, Times, serif;
  --sans: "Roboto", -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, monospace;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 70px; }
body { margin: 0; background: #e8e8e8; color: var(--text); font: 15px/1.6 var(--sans); }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
img { display: block; max-width: 100%; }
.mono { font-family: var(--mono); font-size: 0.92em; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.good { color: var(--green); font-weight: 500; }
.bad { color: var(--bad); font-weight: 500; }
button { font: inherit; cursor: pointer; }

/* ── IMDb top bar ── */
.top { position: sticky; top: 0; z-index: 30; background: var(--ink); color: #fff; }
.top-in { max-width: 1320px; margin: 0 auto; display: flex; align-items: center; gap: 12px; padding: 8px 16px; height: 56px; }
.logo img { height: 34px; width: auto; border-radius: 4px; }
.menu-btn { display: flex; align-items: center; gap: 6px; background: none; border: 0; color: #fff; padding: 8px 10px; border-radius: 4px; position: relative; }
.menu-btn span { display: none; }
.menu-btn::before { content: "☰"; font-size: 20px; line-height: 1; }
.menu-btn b { font-weight: 700; font-size: 14px; }
.menu-btn:hover, .top-link:hover, .top-pro:hover { background: rgba(255, 255, 255, 0.1); text-decoration: none; }
.search { flex: 1; display: flex; height: 36px; background: #fff; border-radius: 4px; overflow: hidden; min-width: 0; }
.search-cat { display: flex; align-items: center; padding: 0 12px; color: var(--ink); font-weight: 700; font-size: 14px; border-right: 1px solid #ccc; }
.search input { flex: 1; border: 0; outline: 0; padding: 0 12px; font: inherit; font-size: 15px; min-width: 0; }
.search button { width: 44px; border: 0; background: #fff; color: #777; display: grid; place-items: center; }
.search button svg { width: 20px; height: 20px; }
.top-ca { display: flex; align-items: center; gap: 6px; flex: none; font-size: 13px; white-space: nowrap; }
.top-ca:empty { display: none; }
.ca-tick { color: var(--y); font-weight: 900; }
.ca-lbl { color: #aaa; font-weight: 700; font-size: 11px; letter-spacing: 0.05em; }
.ca-val { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 4px; border: 1px solid #444; background: #1f1f1f; color: #fff; font: 12.5px ui-monospace, SFMono-Regular, Menlo, monospace; }
button.ca-val { cursor: copy; }
button.ca-val:hover { border-color: var(--y); }
.ca-val.soon { color: #999; font-family: inherit; font-style: italic; }
.ca-buy { color: var(--y); font-weight: 700; }
.top-pro { color: #fff; font-weight: 900; font-size: 14px; padding: 8px 10px; border-radius: 4px; letter-spacing: -0.01em; }
.top-pro b { color: #5799ef; margin-left: 1px; }
.top-link { color: #fff; font-weight: 700; font-size: 14px; padding: 8px 10px; border-radius: 4px; white-space: nowrap; }
.top-cta, .btn-y { display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: var(--y); color: var(--ink); font-weight: 700; font-size: 14px; padding: 8px 16px; border-radius: 99px; border: 0; white-space: nowrap; text-decoration: none !important; }
.top-cta:hover, .btn-y:hover { background: #ffd23f; }
.btn-y.big { font-size: 16px; padding: 13px 26px; }
.btn-y:disabled { opacity: 0.6; cursor: wait; }
.btn-d { display: inline-flex; align-items: center; padding: 8px 16px; border-radius: 99px; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.25); color: #5799ef; font-weight: 700; font-size: 14px; text-decoration: none !important; }
.pager .btn-d, .article .btn-d { background: #fff; border-color: var(--line-2); color: var(--link); }

/* ── layout (Wikipedia sidebar) ── */
.layout { max-width: 1320px; margin: 0 auto; display: grid; grid-template-columns: 176px 1fr; min-height: calc(100vh - 56px); background: var(--paper-2); }
.side { padding: 18px 10px 30px 14px; font-size: 14px; position: sticky; top: 56px; align-self: start; max-height: calc(100vh - 56px); overflow: auto; }
.side-logo { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; margin-bottom: 18px; color: var(--muted); font-family: var(--serif); font-size: 13px; line-height: 1.25; text-decoration: none !important; }
.side-logo img { width: 112px; height: 112px; border-radius: 10px; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15); }
.side-group { border-top: 1px solid var(--line-2); padding: 8px 0 10px; display: grid; gap: 2px; }
.side-group:first-of-type { border-top: 0; }
.side-group h4 { margin: 2px 0 4px; font: 500 12px var(--sans); color: var(--muted); }
.side a { padding: 2px 4px; border-radius: 3px; }
.side a.on { font-weight: 700; color: var(--text); background: #eaecf0; }
main { background: var(--paper); border-left: 1px solid var(--line-2); min-width: 0; padding-bottom: 40px; }

.loading { padding: 120px 0; display: grid; place-items: center; color: var(--muted); }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 4px solid #eee; border-top-color: var(--y); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── main page (Wikipedia) ── */
.welcome { margin: 16px 20px; padding: 14px 20px; border: 1px solid var(--line-2); background: linear-gradient(180deg, #fff, #f6f6f6); border-radius: 2px; display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: center; }
.welcome h1 { margin: 0; font: 400 30px/1.2 var(--serif); }
.welcome h1 b { font-weight: 700; }
.welcome p { margin: 2px 0; }
.welcome-n { font-size: 13px; color: var(--muted); }
.welcome-r { text-align: right; display: grid; gap: 8px; justify-items: end; }
.welcome-r p { margin: 0; font-size: 13px; color: var(--muted); }
.alpha { display: flex; flex-wrap: wrap; gap: 2px; justify-content: flex-end; }
.alpha a { min-width: 22px; padding: 1px 4px; text-align: center; font-weight: 700; font-size: 13px; }
.alpha.big { justify-content: flex-start; margin: 10px 0 16px; gap: 4px; }
.alpha.big a { border: 1px solid var(--line-2); border-radius: 3px; padding: 3px 8px; background: var(--paper-2); }
.alpha.big a.on { background: var(--y); border-color: var(--y); color: var(--ink); }
.mp { display: grid; grid-template-columns: 1.2fr 1fr; gap: 16px; margin: 0 20px 20px; }
.mp-col { display: grid; gap: 16px; align-content: start; }
.mp-box { border: 1px solid; padding: 0 12px 10px; background: #fff; }
.mp-box h2 { margin: 0 -12px 10px; padding: 4px 10px; font: 700 17px var(--serif); border-bottom: 1px solid; }
.mp-box.tfa { border-color: #a3bfb1; } .mp-box.tfa h2 { background: #cef2e0; border-color: #a3bfb1; }
.mp-box.itn { border-color: #a3b0bf; } .mp-box.itn h2 { background: #cedff2; border-color: #a3b0bf; }
.mp-box.otd { border-color: #e2a4a5; } .mp-box.otd h2 { background: #f9dcdc; border-color: #e2a4a5; }
.mp-box.dyk { border-color: #d8c58d; } .mp-box.dyk h2 { background: #fdf2c9; border-color: #d8c58d; }
.mp-in { overflow: hidden; }
.mp-img { float: left; margin: 4px 12px 6px 0; width: 120px; border: 1px solid var(--line-2); padding: 3px; background: var(--paper-2); }
.mp-img img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.mp-in p { margin: 0; font-size: 14px; }
.mp-more { text-align: right; font-size: 13px; margin: 8px 0 0; font-weight: 700; }
.og-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.og-list li { display: grid; grid-template-columns: 48px 1fr; gap: 10px; font-size: 14px; }
.og-ava { width: 48px; height: 48px; object-fit: cover; border-radius: 4px; border: 1px solid var(--line-2); }
.og-list p { margin: 2px 0; color: var(--text); }
.og-list small { color: var(--muted); }
.dyk-list { margin: 0; padding-left: 18px; font-size: 14px; display: grid; gap: 6px; }

/* ── IMDb bands ── */
.band { background: var(--ink); color: #fff; padding: 22px 20px 26px; margin: 0; }
.band + .band { padding-top: 6px; }
.band-h { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin: 0 0 14px; font: 700 24px var(--sans); }
.band-h::before { content: ""; width: 4px; height: 28px; background: var(--y); border-radius: 2px; align-self: center; }
.band-h a { color: #fff; }
.band-h a span { color: #fff; font-weight: 400; }
.band-h a:hover { text-decoration: none; color: var(--y); }
.band-h small { width: 100%; padding-left: 16px; font: 400 14px var(--sans); color: #aaa; margin-top: -4px; }
.row { display: grid; grid-auto-flow: column; grid-auto-columns: 184px; gap: 14px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; }
.row::-webkit-scrollbar { height: 8px; } .row::-webkit-scrollbar-thumb { background: #444; border-radius: 4px; }
.card { display: flex; flex-direction: column; background: var(--ink-2); color: #fff; border-radius: 6px; overflow: hidden; scroll-snap-align: start; text-decoration: none !important; transition: transform 0.15s, box-shadow 0.15s; }
.card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4); }
.card-body { padding: 10px 12px 14px; display: flex; flex-direction: column; gap: 3px; position: relative; flex: 1; }
.card-rank { position: absolute; top: -34px; left: 8px; font: 900 40px/1 var(--sans); color: #fff; -webkit-text-stroke: 2px var(--ink); text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6); }
.card-stat { font-size: 14px; color: #ddd; display: flex; align-items: center; gap: 4px; min-height: 22px; }
.card-stat small { color: #999; font-size: 12px; }
.card h3 { margin: 2px 0 0; font: 500 15px/1.3 var(--sans); color: #fff; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-tick { margin: 0; font-size: 12px; color: #aaa; }
.card-lore { margin: 4px 0 0; font-size: 13px; color: #c8c8c8; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.star { color: var(--y-2); }
.poster { position: relative; aspect-ratio: 1; background: #000; overflow: hidden; }
.poster img { width: 100%; height: 100%; object-fit: cover; }
.ribbon { position: absolute; top: 0; left: 0; width: 38px; height: 50px; background: var(--y); clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 82%, 0 100%); display: grid; place-items: start center; padding-top: 9px; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4); }
.ribbon b { font: 900 12px var(--sans); color: var(--ink); letter-spacing: -0.02em; }
.poster.lg .ribbon { width: 46px; height: 62px; padding-top: 12px; }
.poster.lg .ribbon b { font-size: 14px; }
.pill { display: inline-block; padding: 1px 8px; border-radius: 99px; font-size: 11px; font-weight: 700; background: #eaecf0; color: var(--muted); white-space: nowrap; }
.pill.og { background: var(--y); color: var(--ink); }
.pill.cc { background: #fde2e1; color: var(--red); }
.pill.sm { font-size: 10px; padding: 0 6px; vertical-align: 1px; }
.card.mini { width: 220px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(184px, 1fr)); gap: 16px; padding: 20px; background: var(--ink); }
.page-head { padding: 26px 24px 20px; }
.page-head.dark { background: var(--ink); color: #fff; }
.page-head h1 { margin: 0 0 6px; font: 700 32px/1.15 var(--sans); }
.page-head p { margin: 0; color: #c8c8c8; max-width: 760px; }
.kicker { color: var(--y) !important; font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 4px !important; }
.segs { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.seg { padding: 6px 14px; border-radius: 99px; border: 1px solid #555; color: #ddd; font-size: 14px; font-weight: 500; text-decoration: none !important; }
.seg.on { background: var(--y); border-color: var(--y); color: var(--ink); }
.pager { display: flex; justify-content: center; gap: 10px; padding: 20px; }
.grid + .pager, .chart + .pager { background: var(--ink); }

/* ── top chart (IMDb Top 250) ── */
.chart { list-style: none; margin: 0; padding: 10px 20px 20px; background: var(--ink); }
.chart li { display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid #333; color: #fff; }
.chart-img img { width: 64px; height: 64px; object-fit: cover; border-radius: 4px; }
.chart li > * { min-width: 0; }
.chart-main a { color: #fff; font-size: 16px; overflow-wrap: anywhere; }
.chart-meta { margin: 2px 0; color: #aaa; font-size: 13px; }
.chart-lore { margin: 0; color: #c8c8c8; font-size: 13px; overflow-wrap: anywhere; }
.chart-ath { font-size: 17px; font-weight: 700; text-align: right; display: grid; }
.chart-ath small { font-size: 11px; color: #999; font-weight: 400; }

/* ── lore hero (IMDb title page) ── */
.hero { position: relative; background: var(--ink); color: #fff; padding: 20px 24px 26px; overflow: hidden; isolation: isolate; }
.hero::before { content: ""; position: absolute; inset: -40px; background: var(--bg) center / cover; filter: blur(40px) brightness(0.35) saturate(1.2); z-index: -1; transform: scale(1.1); }
.hero-in { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 16px; }
.hero h1 { margin: 0; font: 500 40px/1.1 var(--sans); }
.hero-meta { margin: 6px 0 0; color: #bbb; font-size: 14px; }
.hero-stats { display: flex; gap: 22px; }
.hero-stats div { display: grid; text-align: center; }
.hero-stats small { font-size: 11px; color: #bbb; font-weight: 700; letter-spacing: 0.1em; }
.hero-stats b { font-size: 20px; font-weight: 700; }
.hero-stats .y { color: var(--y); }
.hero-main { display: grid; grid-template-columns: 220px 1fr; gap: 22px; align-items: start; }
.hero-main .poster { border-radius: 6px; box-shadow: 0 8px 28px rgba(0, 0, 0, 0.6); }
.hero-text p { font-size: 16px; line-height: 1.55; color: #eee; margin: 12px 0 16px; max-width: 760px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { border: 1px solid rgba(255, 255, 255, 0.4); border-radius: 99px; padding: 3px 12px; font-size: 13px; color: #eee; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ── article (Wikipedia) ── */
.article { padding: 10px 26px 30px; max-width: 1080px; }
.tabs { display: flex; align-items: flex-end; gap: 2px; border-bottom: 1px solid var(--line); margin: 6px 0 0; font-size: 14px; }
.tab { padding: 6px 10px; border: 1px solid transparent; border-bottom: 0; margin-bottom: -1px; color: var(--link); }
.tab.on { border-color: var(--line); background: #fff; color: var(--text); font-weight: 500; border-radius: 2px 2px 0 0; }
.tab-r { margin-left: auto; padding: 6px 0; font-size: 13px; }
.wiki-title { font: 400 30px/1.3 var(--serif); margin: 14px 0 0; padding-bottom: 4px; border-bottom: 1px solid var(--line); }
.from { margin: 4px 0 12px; font-size: 13px; color: var(--muted); }
.hatnote { font-style: italic; padding-left: 26px; margin: 0 0 10px; font-size: 14px; color: var(--text); }
.article h2 { font: 400 23px/1.3 var(--serif); margin: 26px 0 10px; padding-bottom: 3px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.article h2 .edit { font: 400 13px var(--sans); }
.article p { margin: 0 0 12px; }
.lore p { font-size: 15.5px; line-height: 1.7; }
.lore a[data-nav] { font-weight: 500; }
a.ext { padding-right: 13px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 12 12'%3E%3Cpath fill='%2336c' d='M6 1h5v5L8.86 3.85 4.7 8 4 7.3l4.15-4.16zM2 3h2v1H2v6h6V8h1v2a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1'/%3E%3C/svg%3E") no-repeat right center; }
.infobox { float: right; clear: right; width: 290px; margin: 0 0 16px 20px; border: 1px solid var(--line); background: var(--paper-2); border-collapse: collapse; font-size: 13px; line-height: 1.45; }
.infobox caption { font: 700 17px var(--sans); padding: 8px 6px 6px; background: var(--y); color: var(--ink); border: 1px solid var(--line); border-bottom: 0; }
.infobox th, .infobox td { padding: 4px 8px; vertical-align: top; text-align: left; border-top: 1px solid #eaecf0; }
.infobox th { width: 42%; font-weight: 700; }
.ib-img { text-align: center; padding: 8px !important; }
.ib-img img { width: 100%; aspect-ratio: 1; object-fit: cover; border: 1px solid var(--line-2); }
.ib-cap { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* ── RAE dictionary card ── */
.dict { border: 1px solid #d9b8b8; border-top: 4px solid var(--red); background: #fffdfb; margin: 4px 0 18px; max-width: 640px; overflow: hidden; }
.dict-top { font: 600 12px var(--serif); letter-spacing: 0.04em; color: var(--red); padding: 6px 14px; border-bottom: 1px solid #efdcdc; background: #fbf1f1; text-transform: uppercase; }
.dict-top span { background: var(--red); color: #fff; padding: 1px 6px; border-radius: 2px; margin-right: 6px; letter-spacing: 0.02em; }
.dict-body { padding: 10px 16px 12px; font-family: var(--serif); }
.dict-head { margin: 0 !important; font-size: 24px; color: var(--ink); }
.dict-etym { margin: 2px 0 8px !important; font-size: 14px; color: #444; }
.dict ol { margin: 0; padding-left: 0; list-style: none; counter-reset: s; display: grid; gap: 5px; }
.dict li { counter-increment: s; font-size: 15px; line-height: 1.5; padding-left: 26px; position: relative; }
.dict li::before { content: counter(s) "."; position: absolute; left: 0; font-weight: 700; color: var(--red); }
.dict abbr { text-decoration: none; color: #1d5fa8; font-style: italic; cursor: help; }
.dict-syn { margin: 8px 0 0 !important; font-size: 13px; color: #444; }
.otd .dict { margin: 0; max-width: none; border: 0; border-top: 0; background: none; }
.otd .dict-top { display: none; }
.otd .dict-body { padding: 4px 0 0; }

.toc { display: inline-block; border: 1px solid var(--line); background: var(--paper-2); padding: 8px 18px 8px 12px; font-size: 14px; margin: 0 0 8px; }
.toc b { display: block; text-align: center; margin-bottom: 4px; }
.toc ol { margin: 0; padding-left: 20px; }
.notice { border: 1px solid var(--line); border-left: 8px solid #36c; background: var(--paper-2); padding: 12px 16px; margin: 14px 0; font-size: 14px; }
.notice p { margin: 6px 0 0; }
.notice.launch { border-left-color: var(--y); }
.launch-form { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.launch-form input { flex: 1; min-width: 240px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 2px; font-family: var(--mono); font-size: 13px; }
.wikitable { border-collapse: collapse; background: var(--paper-2); border: 1px solid var(--line); font-size: 14px; margin: 8px 0 14px; width: 100%; }
.wikitable th, .wikitable td { border: 1px solid var(--line); padding: 5px 8px; text-align: left; vertical-align: top; }
.wikitable th { background: #eaecf0; }
.table-wrap { overflow-x: auto; }
.lore-subject { margin: 0 0 8px; font: italic 16px var(--serif); color: var(--muted); }
.lore-meta { margin: 10px 0 0; font-size: 12.5px; color: var(--muted); }
.sources { margin: 6px 0 14px; padding-left: 22px; display: grid; gap: 10px; font-size: 14px; }
.sources blockquote, .creator-desc { margin: 6px 0 0; padding: 6px 12px; border-left: 3px solid var(--line-2); background: var(--paper-2); color: #333; font-size: 13.5px; }
.src-kind { display: inline-block; font: 700 10.5px var(--sans); text-transform: uppercase; letter-spacing: 0.04em; padding: 1px 6px; border-radius: 3px; background: #eaecf0; color: #444; vertical-align: 1px; }
.src-kind.article { background: #e6f0ff; color: #2a4b8d; }
.src-kind.callout { background: #fff3cd; color: #7a5a00; }
.src-kind.onchain { background: #e7f7ee; color: #1e6b3a; }
.chips .chip { overflow-wrap: anywhere; max-width: 100%; }
.similar { margin: 6px 0 14px; padding-left: 20px; display: grid; gap: 4px; font-size: 14px; }
.stub { border: 1px solid var(--line-2); border-left: 4px solid var(--y); background: var(--paper-2); padding: 8px 12px; font-size: 14px; font-style: italic; }
.stub b { font-style: normal; }
.v-img { width: 40px; height: 40px; object-fit: cover; border-radius: 3px; }
.v-lore { max-width: 360px; font-size: 13px; }
.v-lore summary { cursor: pointer; color: var(--text); }
.v-lore details div { margin-top: 6px; padding: 8px; background: #fff; border: 1px solid #eaecf0; }
.v-lore details p { margin: 0 0 6px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.gallery figure { margin: 0; border: 1px solid var(--line-2); background: var(--paper-2); padding: 4px; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.gallery figcaption { font-size: 12px; color: var(--muted); padding: 4px 2px 0; }
.links { padding-left: 20px; }
.catlinks { clear: both; border: 1px solid var(--line); background: var(--paper-2); padding: 6px 10px; margin-top: 26px; font-size: 13px; }
.index-cols { columns: 3 240px; column-gap: 26px; padding-left: 18px; font-size: 14px; }
.index-cols li { break-inside: avoid; margin-bottom: 2px; }
.results { list-style: none; padding: 0; margin: 14px 0; display: grid; gap: 12px; }
.results li { display: grid; grid-template-columns: 52px 1fr; gap: 12px; align-items: center; }
.r-img { width: 52px; height: 52px; object-fit: cover; border-radius: 4px; border: 1px solid var(--line-2); }
.results p { margin: 0; }

/* ── submit (article wizard) ── */
.submit { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 22px; padding: 22px 24px; align-items: start; }
.wiz { display: grid; gap: 16px; }
.wiz fieldset { border: 1px solid var(--line-2); border-radius: 4px; padding: 14px 18px 18px; background: #fff; margin: 0; display: grid; gap: 12px; min-width: 0; }
.wiz legend { font: 700 17px var(--serif); padding: 0 6px; display: flex; align-items: center; gap: 8px; }
.wiz legend span { width: 24px; height: 24px; border-radius: 50%; background: var(--y); color: var(--ink); display: grid; place-items: center; font: 900 13px var(--sans); }
.wiz legend small { font: 400 13px var(--sans); color: var(--muted); }
.wiz label { display: grid; gap: 4px; font-weight: 500; font-size: 14px; }
.wiz label small { font-weight: 400; color: var(--muted); }
.wiz input, .wiz select, .wiz textarea { font: inherit; font-size: 15px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 2px; background: #fff; width: 100%; }
.wiz textarea { resize: vertical; font-family: var(--serif); line-height: 1.6; }
.wiz input:focus, .wiz select:focus, .wiz textarea:focus { outline: 2px solid #36c; outline-offset: -1px; border-color: #36c; }
.tick-in { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 2px; max-width: 260px; }
.tick-in b { padding: 0 4px 0 10px; color: var(--muted); }
.tick-in input { border: 0 !important; outline: 0 !important; text-transform: uppercase; font-weight: 700; letter-spacing: 0.04em; }
.avail p { margin: 0; font-size: 14px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.counter { text-align: right; font-size: 12px; color: var(--muted); margin-top: -8px; }
.uploads { display: grid; grid-template-columns: 180px 1fr; gap: 14px; }
.gal { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.drop { cursor: pointer; }
.drop-in { border: 2px dashed var(--line); border-radius: 4px; aspect-ratio: 1; display: grid; place-items: center; align-content: center; gap: 4px; text-align: center; background: var(--paper-2); color: var(--muted); overflow: hidden; font-weight: 400; }
.gal .drop-in { aspect-ratio: 4 / 3; }
.drop-in b { color: var(--link); }
.drop-in small { font-size: 12px; }
.drop:hover .drop-in { border-color: #36c; background: #eaf3ff; }
.drop-in img { width: 100%; height: 100%; object-fit: cover; }
.pay { background: #fffbea !important; border-color: #e8d48a !important; }
.pay p { margin: 0; font-size: 14px; }
.wiz-side { position: sticky; top: 74px; display: grid; gap: 14px; }
.side-box { border: 1px solid var(--line-2); background: #fff; padding: 12px 14px; }
.side-box h3 { margin: 0 0 10px; font: 700 15px var(--serif); border-bottom: 1px solid var(--line-2); padding-bottom: 4px; }
.side-box ol { margin: 0; padding-left: 18px; font-size: 13px; display: grid; gap: 4px; }
#preview { background: var(--ink); padding: 12px; border-radius: 6px; display: grid; justify-items: center; }

/* ── modal + toast ── */
#modal { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, 0.6); display: grid; place-items: center; padding: 20px; }
.modal-card { background: #fff; border-radius: 8px; padding: 22px 24px; width: min(440px, 100%); position: relative; border-top: 6px solid var(--y); }
.modal-card h3 { margin: 0 0 12px; font: 700 20px var(--serif); }
.modal-x { position: absolute; top: 8px; right: 10px; border: 0; background: none; font-size: 26px; color: var(--muted); }
.steps { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 8px; }
.steps li { padding-left: 28px; position: relative; color: var(--muted); }
.steps li::before { content: ""; position: absolute; left: 0; top: 3px; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line-2); }
.steps li.doing { color: var(--text); font-weight: 500; }
.steps li.doing::before { border-color: var(--y); border-top-color: transparent; animation: spin 0.8s linear infinite; }
.steps li.done { color: var(--green); }
.steps li.done::before { content: "✓"; border-color: var(--green); background: var(--green); color: #fff; font-size: 11px; display: grid; place-items: center; font-weight: 700; }
.steps li.fail { color: var(--bad); }
.steps li.fail::before { border-color: var(--bad); }
#toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 6px; font-size: 14px; opacity: 0; transition: 0.25s; z-index: 70; pointer-events: none; border-left: 4px solid var(--y); }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.bad { border-left-color: var(--bad); }
#toast.good { border-left-color: var(--green); }

/* ── footer ── */
.foot { background: var(--ink); color: #bbb; padding: 30px 20px 40px; font-size: 13px; }
.foot-in { max-width: 900px; margin: 0 auto; text-align: center; display: grid; justify-items: center; gap: 8px; }
.foot img { height: 30px; border-radius: 4px; }
.foot p { margin: 0; }
.foot a { color: #fff; }

@media (max-width: 1000px) {
  .layout { grid-template-columns: 1fr; }
  .side { display: none; position: fixed; top: 56px; left: 0; bottom: 0; width: 240px; background: var(--paper-2); z-index: 25; box-shadow: 4px 0 20px rgba(0, 0, 0, 0.2); max-height: none; }
  body.menu-open .side { display: block; }
  main { border-left: 0; }
  .mp, .submit { grid-template-columns: minmax(0, 1fr); }
  .wiz-side { position: static; }
  .top-link, .top-pro { display: none; }
}
@media (max-width: 700px) {
  .top-in { gap: 6px; padding: 8px 10px; flex-wrap: wrap; height: auto; }
  .top-ca { order: 10; width: 100%; justify-content: center; height: 30px; }
  .side { top: 90px; }
  .menu-btn b, .search-cat { display: none; }
  .logo img { height: 28px; }
  .top-cta { padding: 7px 10px; font-size: 12px; }
  .hero h1 { font-size: 28px; }
  .hero-main { grid-template-columns: 120px 1fr; gap: 14px; }
  .hero-text p { font-size: 14px; }
  .hero-stats { gap: 14px; }
  .infobox { float: none; width: 100%; margin: 0 0 16px; }
  .article { padding: 8px 14px 24px; }
  .two, .three, .uploads { grid-template-columns: 1fr; }
  .submit { padding: 12px; }
  .wiz fieldset { padding: 12px; }
  .welcome { margin: 10px; padding: 12px 14px; }
  .welcome-r { text-align: left; justify-items: stretch; width: 100%; min-width: 0; }
  .welcome-r .btn-y { white-space: normal; text-align: center; }
  .alpha { justify-content: flex-start; }
  .chart li { grid-template-columns: 48px 1fr; }
  .chart-ath { grid-column: 2; text-align: left; display: block; font-size: 14px; }
  .chart-img img { width: 48px; height: 48px; }
  .v-lore { display: none; }
  .row { grid-auto-columns: 150px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 12px; }
}
