/* Hallmark · macrostructure: app shell (Reddit 1:1, owner override) · genre: modern-minimal · tone: deadpan sad · anchor hue: orange #fa4402 · nav: app header with centred search · footer: fine print in the left nav */
/* SADDIT: one stylesheet. The layout follows Reddit's 2024 web app on the owner's request (see brand/SLOP-AUDIT.md). */
@font-face { font-family: "Reddit Sans"; src: url(/assets/fonts/reddit-sans.woff2) format("woff2"); font-weight: 400 800; font-display: swap; }
@font-face { font-family: "Nunito Black"; src: url(/assets/fonts/nunito-900.woff2) format("woff2"); font-weight: 900; font-display: swap; }
@font-face { font-family: "Anton"; src: url(/assets/fonts/anton.woff2) format("woff2"); font-weight: 400; font-display: swap; }

:root {
  --orange: #fa4402;
  --orange-deep: #d93a00;
  --down: #6a5cff;
  --ink: #0f1a1c;
  --ink-2: #576f76;
  --ink-3: #8ba2ad;
  --line: #e0e5e8;
  --soft: #eaedef;
  --soft-2: #f6f8f9;
  --page: #ffffff;
  --cream: #ede6d6;
  --blue-link: #0a449b;
  --chat-bg: #fbf8f2;
  --top-h: 56px;
  --nav-w: 272px;
  --chat-w: 372px;
  --rail-w: 316px;
  --r: 16px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--page); color: var(--ink); font: 400 14px/1.45 "Reddit Sans", system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ---------- header ---------- */
.topbar { position: sticky; top: 0; z-index: 40; height: var(--top-h); display: flex; align-items: center; gap: 12px; padding: 0 16px; background: var(--page); border-bottom: 1px solid var(--line); }
.hamburger { display: none; width: 40px; height: 40px; border-radius: 999px; align-items: center; justify-content: center; }
.hamburger:hover { background: var(--soft); }
.brand { display: flex; align-items: center; gap: 8px; flex: none; width: calc(var(--nav-w) - 28px); }
.brand-mark { width: 40px; height: 40px; border-radius: 50%; background: var(--orange); padding: 3px; transition: transform .5s var(--ease); }
.brand:hover .brand-mark { transform: rotate(-8deg) scale(1.04); }
.wordmark { font: 900 27px/1 "Nunito Black", "Reddit Sans", sans-serif; letter-spacing: -.02em; color: var(--orange); padding-bottom: 3px; }
.search { flex: 1 1 auto; max-width: 620px; margin: 0 auto; height: 40px; display: flex; align-items: center; gap: 8px; padding: 0 16px; border-radius: 999px; background: var(--soft); color: var(--ink-2); transition: background .2s, box-shadow .2s; }
.search:focus-within { background: var(--page); box-shadow: 0 0 0 1px var(--line), 0 6px 18px rgba(15, 26, 28, .1); }
.search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font-size: 14px; color: var(--ink); }
.tools { display: flex; align-items: center; gap: 6px; flex: none; }
.pairnote { font-size: 12px; font-weight: 600; color: var(--ink-2); padding: 0 6px; white-space: nowrap; }
.ca-chip { height: 32px; padding: 0 12px; border-radius: 999px; border: 1px dashed #c3ccd0; font-size: 12px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.ca-chip:not(:disabled):hover { border-style: solid; color: var(--ink); background: var(--soft-2); }
.ca-chip:disabled { cursor: default; }
.icon-btn { width: 40px; height: 40px; border-radius: 999px; display: grid; place-items: center; color: var(--ink); }
.icon-btn:hover { background: var(--soft); }
.buy-btn { height: 40px; padding: 0 16px; display: inline-flex; align-items: center; border-radius: 999px; font-weight: 700; color: var(--orange-deep); box-shadow: inset 0 0 0 1px var(--orange-deep); }
.buy-btn:hover { background: #fff1ec; }
.buy-btn[aria-disabled="true"] { opacity: .55; }
.create-btn { height: 40px; padding: 0 14px 0 10px; display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; font-weight: 600; }
.create-btn:hover { background: var(--soft); }
.login-btn { height: 40px; padding: 0 18px; border-radius: 999px; background: var(--orange-deep); color: #fff; font-weight: 700; }
.login-btn:hover { background: #ae2c00; }
.me-btn { height: 40px; display: flex; align-items: center; gap: 8px; padding: 0 10px 0 4px; border-radius: 999px; }
.me-btn:hover { background: var(--soft); }
.me-btn .av { width: 32px; height: 32px; }
.me-meta { display: grid; text-align: left; line-height: 1.15; }
.me-meta b { font-size: 12px; font-weight: 600; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-meta small { font-size: 11px; color: var(--ink-2); }
.menu { position: absolute; right: 16px; top: calc(var(--top-h) - 4px); width: 280px; background: var(--page); border-radius: 12px; box-shadow: 0 10px 34px rgba(15, 26, 28, .22); padding: 8px 0; z-index: 60; animation: drop .18s var(--ease); }
.menu a, .menu button { display: flex; width: 100%; align-items: center; gap: 12px; padding: 10px 16px; text-align: left; }
.menu a:hover, .menu button:hover { background: var(--soft-2); }
.menu small { display: block; color: var(--ink-2); font-size: 12px; }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: var(--nav-w) minmax(0, 1fr) var(--chat-w); min-height: calc(100vh - var(--top-h)); }
.leftnav { position: sticky; top: var(--top-h); height: calc(100vh - var(--top-h)); overflow-y: auto; border-right: 1px solid var(--line); padding: 12px 16px 24px; scrollbar-width: thin; }
.nav-group { padding: 6px 0 10px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.nav-head { font-size: 13px; color: var(--ink-2); padding: 10px 16px 6px; }
.nav-item { display: flex; align-items: center; gap: 12px; width: 100%; height: 40px; padding: 0 16px; border-radius: 8px; font-size: 14px; color: var(--ink); text-align: left; }
.nav-item:hover { background: var(--soft-2); }
.nav-item.on { background: var(--soft); font-weight: 600; }
.nav-item .sub-ico { width: 28px; height: 28px; font-size: 12px; }
.nav-item span.n { margin-left: auto; font-size: 12px; color: var(--ink-3); }
.fineprint { padding: 10px 16px; font-size: 12px; color: var(--ink-2); display: grid; gap: 4px; }

.main { min-width: 0; padding: 16px 24px 80px; outline: none; }
.page { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; max-width: 1640px; margin: 0 auto; }
.rail { display: none; }

/* ---------- sub icons + avatars ---------- */
.sub-ico { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 11px; text-transform: lowercase; }
.av { flex: none; width: 24px; height: 24px; border-radius: 50%; overflow: hidden; display: block; }
.av svg, .av img { width: 100%; height: 100%; display: block; }
.av img { object-fit: cover; background: var(--soft); }

/* ---------- feed header + sorts ---------- */
.feed-top { display: flex; align-items: center; gap: 8px; padding: 0 0 12px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.sort-btn { height: 32px; padding: 0 12px; border-radius: 999px; font-weight: 600; color: var(--ink-2); display: inline-flex; align-items: center; gap: 6px; }
.sort-btn:hover { background: var(--soft); color: var(--ink); }
.sort-btn.on { background: var(--soft); color: var(--ink); }
.window-pick { height: 32px; border-radius: 999px; border: 0; background: var(--soft-2); padding: 0 10px; font-weight: 600; color: var(--ink-2); }
.feed-note { margin-left: auto; font-size: 12px; color: var(--ink-3); }

.hero-strip { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px; padding: 16px 20px; margin-bottom: 16px; border-radius: var(--r); background: var(--orange); color: #fff; overflow: hidden; position: relative; }
.hero-strip img { width: 64px; height: 64px; animation: bob 3.6s ease-in-out infinite; }
.hero-strip h1 { font: 900 24px/1.1 "Nunito Black", "Reddit Sans", sans-serif; }
.hero-strip p { opacity: .92; margin-top: 3px; }
.hero-strip .tear { position: absolute; left: 70px; top: 54px; width: 6px; height: 9px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; background: #8fd3ff; opacity: 0; animation: tear 3.6s ease-in infinite 1.2s; }
.hero-strip .hero-go { height: 40px; padding: 0 18px; border-radius: 999px; background: var(--cream); color: var(--ink); font-weight: 700; display: inline-flex; align-items: center; white-space: nowrap; }
.hero-strip .hero-go:hover { background: #fff; }

/* ---------- post cards ---------- */
.feed { display: grid; grid-template-columns: minmax(0, 1fr); }
.post-card { position: relative; padding: 8px 16px 10px; margin: 4px 0; border-radius: var(--r); transition: background .15s; }
.post-card + .post-card::before { content: ""; position: absolute; left: 16px; right: 16px; top: -5px; border-top: 1px solid var(--line); }
.post-card:hover { background: var(--soft-2); }
.post-card .cover { position: absolute; inset: 0; border-radius: var(--r); z-index: 0; }
.post-card > *:not(.cover) { position: relative; z-index: 1; }
.post-meta { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-2); min-height: 28px; flex-wrap: wrap; }
.post-meta .sub-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--ink); }
.post-meta .sub-link:hover, .post-meta .user-link:hover { text-decoration: underline; }
.post-meta .when::before, .post-meta .by::before { content: "\2022"; margin: 0 6px 0 2px; color: var(--ink-3); }
.post-meta .by { color: var(--ink-2); }
.post-title { font-size: 18px; line-height: 1.33; font-weight: 600; margin: 4px 0 8px; color: var(--ink); overflow-wrap: anywhere; }
.post-page .post-title { font-size: 24px; font-weight: 700; line-height: 1.25; }
.media { position: relative; border-radius: var(--r); overflow: hidden; background: #0b0f10; border: 1px solid var(--line); display: grid; place-items: center; max-height: 640px; font-size: 16px; }
.media .blur { position: absolute; inset: -20px; background-size: cover; background-position: center; filter: blur(24px) brightness(.55); transform: scale(1.1); }
.post-page .media { max-height: none; }

.meme { position: relative; width: 100%; max-width: 100%; container-type: inline-size; user-select: none; font-size: 16px; }
.media .meme { max-height: 640px; }
.meme img { width: 100%; height: 100%; object-fit: fill; }
.cap { position: absolute; display: flex; align-items: center; justify-content: center; text-align: center; overflow: hidden; padding: .3% .6%; line-height: 1.05; overflow-wrap: break-word; word-break: normal; hyphens: none; }
.cap span { display: block; max-width: 100%; }
.cap.w { font-family: "Anton", Impact, sans-serif; color: #fff; text-transform: uppercase; -webkit-text-stroke: .045em #000; paint-order: stroke fill; text-shadow: 0 0 .06em #000, 0 0 .06em #000; letter-spacing: .01em; }
.cap.d { font-family: "Reddit Sans", Arial, sans-serif; font-weight: 700; color: #111; line-height: 1.12; }
.upload-img { width: 100%; max-height: 640px; object-fit: contain; position: relative; }

.actions { display: flex; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.pill { height: 32px; display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; border-radius: 999px; background: var(--soft); font-size: 12px; font-weight: 600; color: var(--ink); transition: background .15s; }
.pill:hover { background: #dbe2e5; }
.vote { padding: 0; gap: 0; }
.vote button { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: var(--ink); }
.vote button:hover { background: #dbe2e5; }
.vote .score { min-width: 20px; text-align: center; font-size: 12px; font-weight: 700; }
.vote.up { background: var(--orange-deep); color: #fff; }
.vote.up button { color: #fff; }
.vote.up button:hover { background: #b03000; }
.vote.down { background: var(--down); color: #fff; }
.vote.down button { color: #fff; }
.vote.down button:hover { background: #5243e6; }
.vote .pop { animation: pop .38s var(--ease); }
.awards-row { display: inline-flex; align-items: center; gap: 2px; font-size: 12px; color: var(--ink-2); }
.aw { font-style: normal; display: inline-flex; }
.aw-count { display: inline-flex; align-items: center; gap: 1px; margin-right: 4px; }
.award-wrap { position: relative; }
.award-menu { position: absolute; bottom: 40px; left: 0; z-index: 30; width: 280px; background: var(--page); border-radius: 14px; box-shadow: 0 10px 34px rgba(15, 26, 28, .22); padding: 10px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; animation: drop .18s var(--ease); }
.award-menu button { display: grid; gap: 2px; justify-items: center; padding: 10px 6px; border-radius: 10px; font-size: 12px; font-weight: 600; }
.award-menu button:hover { background: var(--soft-2); }
.award-menu button .aw { margin-bottom: 2px; }
.award-menu p { grid-column: 1 / -1; font-size: 12px; color: var(--ink-2); padding: 2px 4px; }
.burst { position: absolute; pointer-events: none; font-size: 20px; animation: burst .9s var(--ease) forwards; }

.reveal { opacity: 0; transform: translateY(14px); }
.reveal.in { opacity: 1; transform: none; transition: opacity .5s var(--ease), transform .5s var(--ease); }

.skeleton { height: 420px; border-radius: var(--r); margin: 12px 16px; background: linear-gradient(100deg, var(--soft-2) 30%, var(--soft) 50%, var(--soft-2) 70%); background-size: 300% 100%; animation: shimmer 1.4s linear infinite; }
.empty { padding: 48px 16px; text-align: center; color: var(--ink-2); display: grid; gap: 10px; justify-items: center; }
.empty img { width: 96px; opacity: .9; }
.empty h2 { color: var(--ink); font-size: 18px; }
.more-end { text-align: center; padding: 24px; color: var(--ink-3); font-size: 13px; }

/* ---------- right rail (wide screens) ---------- */
.card { background: var(--soft-2); border-radius: var(--r); padding: 16px; margin-bottom: 16px; }
.card h3 { font-size: 12px; font-weight: 700; color: var(--ink-2); margin-bottom: 10px; }
.card .big { font-size: 16px; font-weight: 700; color: var(--ink); }
.card p { color: var(--ink-2); font-size: 13px; }
.rail-sub { display: flex; align-items: center; gap: 10px; padding: 8px 6px; border-radius: 8px; }
.rail-sub:hover { background: var(--soft); }
.rail-sub .sub-ico { width: 32px; height: 32px; font-size: 13px; }
.rail-sub b { display: block; font-size: 14px; font-weight: 600; }
.rail-sub small { color: var(--ink-2); font-size: 12px; }
.coin-card { background: var(--orange); color: #fff; }
.coin-card h3 { color: #fff; opacity: .85; }
.coin-card p { color: #fff; opacity: .92; }
.coin-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.coin-stats div { background: rgba(0, 0, 0, .14); border-radius: 10px; padding: 8px; }
.coin-stats small { display: block; font-size: 11px; opacity: .85; }
.coin-stats b { font-size: 14px; }
.coin-card .coin-name { display: flex; align-items: center; gap: 10px; font: 900 22px/1 "Nunito Black", sans-serif; }
.coin-card .coin-name img { width: 44px; height: 44px; }

/* ---------- sub + profile banners ---------- */
.sub-banner { height: 128px; border-radius: var(--r); position: relative; overflow: hidden; }
.sub-banner::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, .22) 1.2px, transparent 0); background-size: 18px 18px; }
.sub-head { display: flex; align-items: flex-end; gap: 16px; padding: 0 16px; margin-top: -36px; margin-bottom: 18px; position: relative; z-index: 1; }
.sub-head .sub-ico, .sub-head .av { width: 88px; height: 88px; font-size: 30px; border: 4px solid var(--page); }
.sub-head h1 { font-size: 30px; font-weight: 800; line-height: 1.1; }
.sub-head p { color: var(--ink-2); }
.sub-head .grow { flex: 1; min-width: 0; padding-bottom: 6px; }
.join-btn { height: 40px; padding: 0 20px; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 700; margin-bottom: 8px; }
.join-btn.joined { background: var(--page); color: var(--ink); box-shadow: inset 0 0 0 1px #9aa9b0; }
.tabs { display: flex; gap: 6px; margin: 0 0 12px; }

/* ---------- post page + comments ---------- */
.back { width: 32px; height: 32px; border-radius: 50%; background: var(--soft); display: inline-grid; place-items: center; margin-right: 4px; }
.post-page { padding: 4px 0 0; }
.composer { margin: 18px 0 12px; border: 1px solid #c8d1d5; border-radius: 20px; padding: 6px 6px 6px 16px; background: var(--page); display: grid; }
.composer:focus-within { border-color: var(--ink-2); }
.composer textarea { border: 0; resize: vertical; min-height: 44px; padding: 8px 0; outline: none; background: none; }
.composer .row { display: flex; justify-content: flex-end; gap: 8px; }
.btn { height: 32px; padding: 0 14px; border-radius: 999px; font-weight: 700; font-size: 13px; background: var(--soft); }
.btn:hover { background: #dbe2e5; }
.btn.primary { background: var(--blue-link); color: #fff; }
.btn.primary:hover { background: #083a85; }
.btn:disabled { opacity: .5; cursor: default; }
.thread { list-style: none; margin: 0; padding: 0; }
.cmt { position: relative; padding: 8px 0 0 0; }
.cmt .cmt-head { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-2); }
.cmt .cmt-head .user-link { font-weight: 700; color: var(--ink); }
.cmt .cmt-head .when::before { content: "\2022"; margin-right: 8px; color: var(--ink-3); }
.cmt .op { color: var(--blue-link); font-weight: 700; }
.cmt-body { padding: 4px 0 0 32px; font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.cmt-acts { display: flex; align-items: center; gap: 4px; padding-left: 26px; margin-top: 2px; }
.cmt-acts .pill { background: none; height: 30px; padding: 0 8px; }
.cmt-acts .pill:hover { background: var(--soft); }
.cmt-acts .vote { background: none; }
.cmt-acts .vote.up .score, .cmt-acts .vote.up button { color: var(--orange-deep); }
.cmt-acts .vote.down .score, .cmt-acts .vote.down button { color: var(--down); }
.cmt-acts .vote.up, .cmt-acts .vote.down { background: none; }
.cmt .kids { list-style: none; margin: 0 0 0 11px; padding: 0 0 0 21px; border-left: 1px solid var(--line); }
.cmt .kids:hover { border-left-color: var(--ink-3); }
.cmt .reply-box { margin: 6px 0 6px 32px; }
.cmt.fresh > .cmt-body { animation: flash 1.6s var(--ease); }

/* ---------- profile ---------- */
.profile-stats { display: flex; gap: 28px; margin: 0 16px 18px; }
.profile-stats b { display: block; font-size: 16px; }
.profile-stats small { color: var(--ink-2); font-size: 12px; }
.mini-cmt { display: block; padding: 12px 16px; border-radius: 12px; }
.mini-cmt:hover { background: var(--soft-2); }
.mini-cmt small { color: var(--ink-2); font-size: 12px; display: block; margin-bottom: 4px; }
.guest-note { margin: 0 16px 16px; padding: 12px 16px; border-radius: 12px; background: #fff4ee; color: #7a2400; display: flex; gap: 12px; align-items: center; }
.guest-note button { margin-left: auto; }

/* ---------- submit ---------- */
.submit h1 { font-size: 26px; font-weight: 800; margin: 6px 0 16px; }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field > label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.input, .select { height: 48px; border-radius: 16px; border: 1px solid #c8d1d5; padding: 0 16px; background: var(--page); outline: none; width: 100%; }
.input:focus, .select:focus { border-color: var(--ink-2); }
.counter { font-size: 12px; color: var(--ink-3); justify-self: end; }
.maker { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; max-height: 520px; overflow-y: auto; padding: 2px; }
.tpl { border-radius: 10px; overflow: hidden; background: var(--soft); aspect-ratio: 1; position: relative; outline: 2px solid transparent; transition: outline-color .15s, transform .15s; }
.tpl img { width: 100%; height: 100%; object-fit: cover; }
.tpl span { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 6px 4px; font-size: 11px; font-weight: 600; color: #fff; background: linear-gradient(transparent, rgba(0, 0, 0, .75)); text-align: left; }
.tpl:hover { transform: translateY(-2px); }
.tpl.on { outline-color: var(--orange-deep); }
.preview { position: sticky; top: calc(var(--top-h) + 16px); display: grid; gap: 10px; }
.preview .media { max-height: none; }
.caption-inputs { display: grid; gap: 8px; }
.drop { border: 2px dashed #c8d1d5; border-radius: var(--r); padding: 36px 16px; text-align: center; color: var(--ink-2); display: grid; gap: 8px; justify-items: center; cursor: pointer; }
.drop:hover, .drop.over { border-color: var(--orange-deep); background: #fff7f3; }
.form-err { color: #b42318; font-size: 13px; min-height: 18px; }
.submit-row { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.submit-row .btn { height: 40px; padding: 0 22px; font-size: 14px; }

/* ---------- World Chat ---------- */
.chatdock { position: sticky; top: var(--top-h); height: calc(100vh - var(--top-h)); display: flex; flex-direction: column; border-left: 1px solid var(--line); background: var(--chat-bg); }
.chat-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 12px; border-bottom: 1px solid var(--line); background: var(--page); }
.chat-head h2 { font-size: 16px; font-weight: 800; }
.chat-sub { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-2); }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #2fbf71; box-shadow: 0 0 0 0 rgba(47, 191, 113, .5); animation: pulse 2s infinite; }
.chat-close { display: none; width: 36px; height: 36px; border-radius: 50%; place-items: center; }
.chat-close:hover { background: var(--soft); }
.chat-log { flex: 1; overflow-y: auto; list-style: none; margin: 0; padding: 10px 6px 10px 10px; scrollbar-width: thin; overscroll-behavior: contain; }
.msg { display: grid; grid-template-columns: 28px 1fr; gap: 8px; padding: 6px 8px; border-radius: 10px; }
.msg:hover { background: rgba(15, 26, 28, .04); }
.msg .av { width: 28px; height: 28px; }
.msg-head { display: flex; align-items: baseline; gap: 6px; font-size: 12px; }
.msg-head a { font-weight: 700; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 200px; }
.msg-head a:hover { text-decoration: underline; }
.msg-head time { color: var(--ink-3); font-size: 11px; }
.msg p { font-size: 14px; overflow-wrap: anywhere; }
.msg.mine { background: #fff1ea; }
.msg.new { animation: slidein .4s var(--ease); }
.day-sep { text-align: center; font-size: 11px; color: var(--ink-3); padding: 8px 0; }
.chat-jump { position: absolute; bottom: 92px; left: 50%; transform: translateX(-50%); height: 30px; padding: 0 14px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 12px; font-weight: 700; box-shadow: 0 6px 18px rgba(0, 0, 0, .2); animation: drop .2s var(--ease); }
.chat-form { display: flex; gap: 8px; padding: 10px 12px 4px; background: var(--page); border-top: 1px solid var(--line); }
.chat-form input { flex: 1; min-width: 0; height: 40px; border-radius: 999px; border: 1px solid #c8d1d5; padding: 0 16px; outline: none; background: var(--page); }
.chat-form input:focus { border-color: var(--ink-2); }
.chat-send { width: 40px; height: 40px; border-radius: 50%; background: var(--orange-deep); color: #fff; display: grid; place-items: center; flex: none; }
.chat-send:hover { background: #ae2c00; }
.chat-note { min-height: 26px; padding: 2px 16px 8px; font-size: 12px; color: var(--ink-2); background: var(--page); }
.chat-note button { color: var(--blue-link); font-weight: 700; }
.chat-fab { display: none; position: fixed; right: 16px; bottom: 16px; z-index: 45; height: 48px; padding: 0 18px 0 14px; border-radius: 999px; background: var(--ink); color: #fff; align-items: center; gap: 8px; font-weight: 700; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); }
.chat-fab b { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: #2fbf71; font-size: 11px; display: grid; place-items: center; }
.chat-fab b:empty { display: none; }
.scrim { position: fixed; inset: 0; background: rgba(15, 26, 28, .4); z-index: 48; animation: fade .2s; }

/* ---------- modals + toast ---------- */
.modal { border: 0; border-radius: 24px; padding: 28px 32px 24px; width: min(440px, calc(100vw - 24px)); text-align: center; box-shadow: 0 24px 80px rgba(0, 0, 0, .3); color: var(--ink); }
.modal::backdrop { background: rgba(15, 26, 28, .5); }
.modal[open] { animation: rise .28s var(--ease); }
.modal-x { position: absolute; right: 14px; top: 14px; }
.modal-x button { width: 36px; height: 36px; border-radius: 50%; background: var(--soft); display: grid; place-items: center; }
.modal-mark { width: 72px; height: 72px; margin: 0 auto 10px; border-radius: 50%; background: var(--orange); padding: 6px; }
.modal h2 { font-size: 24px; font-weight: 800; margin-bottom: 6px; }
.modal-copy { color: var(--ink-2); margin-bottom: 18px; }
.big-btn { width: 100%; height: 48px; border-radius: 999px; font-weight: 700; font-size: 15px; display: flex; align-items: center; justify-content: center; gap: 10px; }
.big-guest { background: var(--orange-deep); color: #fff; }
.big-guest:hover { background: #ae2c00; }
.big-wallet { background: #ab9ff2; color: #1c1240; }
.big-wallet:hover { background: #9a8cf0; }
.big-btn:disabled { opacity: .6; cursor: progress; }
.modal-hint { font-size: 12px; color: var(--ink-2); margin: 8px 0 0; }
.or { display: flex; align-items: center; gap: 12px; color: var(--ink-3); font-size: 12px; margin: 16px 0; }
.or::before, .or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.modal-err { color: #b42318; font-size: 13px; min-height: 18px; margin-top: 10px; }
.modal-text { text-align: left; width: min(560px, calc(100vw - 24px)); }
.modal-text p, .modal-text li { color: #33464c; margin-bottom: 10px; }
.modal-text ul { padding-left: 18px; margin: 0; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 90; background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; font-weight: 600; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); animation: rise .25s var(--ease); max-width: calc(100vw - 32px); }

/* ---------- motion ---------- */
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.45) translateY(-2px); } 100% { transform: scale(1); } }
@keyframes drop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translate(var(--tx, 0), 14px); } to { opacity: 1; transform: translate(var(--tx, 0), 0); } }
@keyframes fade { from { opacity: 0; } }
@keyframes slidein { from { opacity: 0; transform: translateY(8px); background: #fff1ea; } to { opacity: 1; transform: none; } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(47, 191, 113, .55); } 70% { box-shadow: 0 0 0 7px rgba(47, 191, 113, 0); } 100% { box-shadow: 0 0 0 0 rgba(47, 191, 113, 0); } }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-4px) rotate(-3deg); } }
@keyframes tear { 0% { opacity: 0; transform: translateY(0) scale(.6); } 15% { opacity: .95; transform: translateY(0) scale(1); } 60% { opacity: .9; transform: translateY(18px); } 100% { opacity: 0; transform: translateY(30px); } }
@keyframes burst { 0% { opacity: 1; transform: translate(0, 0) scale(.6); } 100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(1.3); } }
@keyframes flash { from { background: #fff1ea; } to { background: transparent; } }
.toast { --tx: -50%; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- widths ---------- */
/* wide: the info rail joins the feed */
@media (min-width: 1700px) {
  .page.with-rail { grid-template-columns: minmax(0, 1fr) var(--rail-w); }
  .page.with-rail .rail { display: block; position: sticky; top: calc(var(--top-h) + 16px); align-self: start; max-height: calc(100vh - var(--top-h) - 32px); overflow-y: auto; scrollbar-width: none; }
  :root { --chat-w: 400px; }
}
/* very wide: two columns of memes so the screen is used edge to edge */
@media (min-width: 2200px) {
  :root { --nav-w: 300px; --chat-w: 440px; --rail-w: 340px; }
  .page { max-width: none; }
  .feed.two { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 20px; align-items: start; }
  .feed.two .post-card + .post-card::before { display: none; }
  .feed.two .post-card { border: 1px solid var(--line); margin: 0 0 20px; }
}
@media (max-width: 1240px) {
  .shell { grid-template-columns: var(--nav-w) minmax(0, 1fr); }
  .chatdock { position: fixed; top: auto; bottom: 0; right: 0; width: min(420px, 100vw); height: min(640px, calc(100vh - var(--top-h))); z-index: 50; border-radius: 18px 18px 0 0; box-shadow: 0 -10px 40px rgba(0, 0, 0, .25); transform: translateY(105%); transition: transform .3s var(--ease); overflow: hidden; }
  .chatdock.open { transform: none; }
  .chat-close { display: grid; }
  .chat-fab { display: inline-flex; }
  .ca-chip { max-width: 160px; overflow: hidden; text-overflow: ellipsis; }
}
@media (max-width: 980px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .hamburger { display: inline-flex; }
  .brand { width: auto; }
  .leftnav { position: fixed; left: 0; top: var(--top-h); z-index: 49; width: 300px; background: var(--page); transform: translateX(-102%); transition: transform .3s var(--ease); box-shadow: 10px 0 40px rgba(0, 0, 0, .15); }
  .leftnav.open { transform: none; }
  .pairnote { display: none; }
  .maker { grid-template-columns: minmax(0, 1fr); }
  .preview { position: static; }
}
@media (max-width: 720px) {
  .topbar { gap: 4px; padding: 0 8px; }
  .search { display: none; }
  .search.mobile-open { display: flex; position: absolute; left: 8px; right: 8px; top: 8px; z-index: 2; }
  .tools { margin-left: auto; gap: 2px; }
  .ca-chip { display: none; }
  .create-btn span, .me-meta { display: none; }
  .create-btn { padding: 0; width: 40px; justify-content: center; }
  .buy-btn { padding: 0 12px; height: 34px; }
  .login-btn { padding: 0 14px; height: 34px; }
  .icon-btn { width: 34px; height: 34px; }
  .wordmark { font-size: 24px; }
  .brand-mark { width: 34px; height: 34px; }
  .main { padding: 10px 4px 90px; }
  .post-card { padding: 8px 10px 10px; }
  .post-card + .post-card::before { left: 10px; right: 10px; }
  .post-title { font-size: 16px; }
  .hero-strip { grid-template-columns: auto 1fr; padding: 14px; margin: 0 6px 12px; }
  .hero-strip .hero-go { grid-column: 1 / -1; justify-content: center; }
  .hero-strip h1 { font-size: 19px; }
  .hero-strip img { width: 52px; height: 52px; }
  .hero-strip .tear { left: 58px; top: 46px; }
  .feed-top { padding: 0 6px 10px; overflow-x: auto; }
  .feed-note { display: none; }
  .chatdock { width: 100vw; height: calc(100vh - 64px); }
  .sub-head .sub-ico, .sub-head .av { width: 64px; height: 64px; font-size: 22px; }
  .sub-head h1 { font-size: 22px; }
  .sub-banner { height: 84px; margin: 0 6px; }
  .post-page .post-title { font-size: 20px; }
  .modal { padding: 24px 20px 20px; }
}
.dots > span + span::before { content: "\2022"; margin: 0 6px; color: var(--ink-3); }
