@font-face { font-family: 'Fredoka'; src: url(/static/fonts/fredoka.woff2) format('woff2'); font-weight: 300 700; font-display: swap; }
@font-face { font-family: 'Nunito'; src: url(/static/fonts/nunito.woff2) format('woff2'); font-weight: 200 1000; font-display: swap; }
:root {
  --bg: #FFF6EA; --bg2: #FFEEDC; --card: #fff; --ink: #2B2118; --ink2: #6E5D4E; --line: #F0E1CF;
  --brand: #FF7A3D; --brand-d: #E8601F; --choc: #8B4A22; --tan: #C8783E; --gold: #FFC83D; --mint: #3CCB9A; --pink: #FF6B8B;
  --r: 20px; --r-sm: 12px; --shadow: 0 1px 2px rgba(80,40,10,.06), 0 6px 20px rgba(80,40,10,.08);
  --shadow-lg: 0 10px 40px rgba(80,40,10,.18); --tab-h: 64px; --safe-b: env(safe-area-inset-bottom, 0px);
  --display: 'Fredoka', ui-rounded, system-ui, sans-serif; --body: 'Nunito', system-ui, -apple-system, Segoe UI, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--body); color: var(--ink); background: var(--bg); line-height: 1.5; font-size: 16px;
  background-image: radial-gradient(circle at 10% -10%, #FFE2C4 0, transparent 40%), radial-gradient(circle at 110% 10%, #FFE9D6 0, transparent 35%);
  background-attachment: fixed; padding-bottom: calc(var(--tab-h) + var(--safe-b) + 12px); -webkit-tap-highlight-color: transparent; }
a { color: var(--brand-d); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.15; letter-spacing: -.01em; margin: 0 0 .4em; }
h1 { font-size: clamp(1.6rem, 5vw, 2.3rem); }
h2 { font-size: 1.25rem; }
h2 small, .sub, small { color: var(--ink2); font-weight: 500; }
h2 small { font-size: .8rem; margin-left: .3em; font-family: var(--body); white-space: nowrap; display: inline-block; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 8px; }

/* top bar */
.topbar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 12px; padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top));
  background: rgba(255,246,234,.85); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid rgba(240,225,207,.7); }
.brand { display: flex; align-items: center; gap: 8px; color: var(--ink); font-family: var(--display); font-size: 1.05rem; font-weight: 500; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand img { transition: transform .3s cubic-bezier(.3,1.6,.5,1); }
.brand:hover img { transform: rotate(-10deg) scale(1.08); }
.brand b { color: var(--brand-d); font-weight: 700; }
.desk-nav { display: none; gap: 4px; margin-left: 12px; }
.desk-nav a { color: var(--ink2); font-weight: 700; padding: 8px 12px; border-radius: 999px; }
.desk-nav a:hover { background: var(--bg2); text-decoration: none; color: var(--ink); }
.desk-nav a.on { background: var(--ink); color: #fff; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.top-actions .desk-only { display: none; }
.menu { position: relative; }
.menu summary { list-style: none; cursor: pointer; }
.menu summary::-webkit-details-marker { display: none; }
.menu-pop { position: absolute; right: 0; top: calc(100% + 8px); background: var(--card); border-radius: 16px; box-shadow: var(--shadow-lg); padding: 6px; min-width: 200px;
  animation: pop .18s cubic-bezier(.3,1.4,.5,1); transform-origin: top right; }
.menu-pop a, .menu-pop button { display: block; width: 100%; text-align: left; padding: 10px 12px; border-radius: 10px; color: var(--ink); font-weight: 700; background: none; border: 0; cursor: pointer; }
.menu-pop a:hover, .menu-pop button:hover { background: var(--bg2); text-decoration: none; }
.menu-head { padding: 8px 12px; color: var(--ink2); font-size: .85rem; font-weight: 800; }
.avatar { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--bg2); font-size: 22px; flex: none; border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.avatar.sm { width: 28px; height: 28px; font-size: 15px; border-width: 1px; }
.avatar.xl { width: 84px; height: 84px; font-size: 46px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 999px; padding: 11px 20px; font-weight: 800; cursor: pointer;
  transition: transform .12s, box-shadow .2s, background .2s; text-decoration: none !important; white-space: nowrap; user-select: none; }
.btn:active { transform: scale(.96); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 4px 0 var(--brand-d), 0 8px 18px rgba(255,122,61,.35); }
.btn-primary:hover { background: #FF8A52; }
.btn-primary:active { box-shadow: 0 1px 0 var(--brand-d); transform: translateY(3px); }
.btn-primary:disabled { background: #F3C3A9; box-shadow: none; cursor: not-allowed; }
.btn-ghost { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 2px var(--line); }
.btn-ghost:hover { box-shadow: inset 0 0 0 2px var(--tan); }
.btn-sm { padding: 8px 14px; font-size: .9rem; }
.btn-lg { padding: 14px 24px; font-size: 1.05rem; }
.btn-block { width: 100%; }

/* layout */
.wrap { max-width: 1120px; margin: 0 auto; padding: 16px; }
.panel { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 18px; margin-bottom: 16px; }
.page-title { margin-top: 6px; }
.section-title { margin: 24px 0 12px; }
.hint { color: var(--ink2); font-size: .95rem; }
.center { text-align: center; }
.empty-row { color: var(--ink2); padding: 12px 4px; list-style: none; }
.pill { display: inline-flex; align-items: center; gap: 4px; background: var(--ink); color: #fff; border-radius: 999px; padding: 5px 12px; font-size: .85rem; font-weight: 800; }
.pill-soft { background: var(--bg2); color: var(--ink2); }
.pill-hot { background: var(--brand); }
.pill.pop { animation: bonePop .45s cubic-bezier(.3,1.8,.5,1); }
.rate-top { gap: 6px; align-items: center; }
.rate-top .pill-soft { margin-left: auto; }

/* hero */
.hero { display: grid; gap: 18px; align-items: center; margin: 4px 0 18px; }
.hero h1 { font-size: clamp(1.9rem, 7.5vw, 3.2rem); font-weight: 700; }
.hl { color: var(--brand-d); position: relative; white-space: nowrap; }
.hl::after { content: ''; position: absolute; left: -2px; right: -2px; bottom: .06em; height: .28em; background: var(--gold); opacity: .55; z-index: -1; border-radius: 6px; }
.hero p { color: var(--ink2); font-size: 1.05rem; margin: 0 0 16px; max-width: 34em; }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; }
.stat-row { display: flex; gap: 16px; margin-top: 16px; color: var(--ink2); font-size: .92rem; flex-wrap: wrap; }
.stat-row b { color: var(--ink); font-family: var(--display); font-size: 1.15rem; }
.hero-card { display: block; position: relative; background: #fff; border-radius: 26px; padding: 10px; box-shadow: var(--shadow-lg); transform: rotate(2deg); width: min(66vw, 300px); justify-self: center; transition: transform .3s cubic-bezier(.3,1.6,.5,1); color: var(--ink); }
.hero-card:hover { transform: rotate(0) scale(1.02); text-decoration: none; }
.hero-card .ph { border-radius: 18px; }
.hero-card-foot { display: flex; justify-content: space-between; align-items: center; padding: 10px 6px 4px; font-family: var(--display); font-size: 1.1rem; }
.hero-card-foot span { font-family: var(--body); color: var(--ink2); font-size: .9rem; font-weight: 700; }
.ribbon { position: absolute; z-index: 2; top: 20px; left: -8px; background: var(--gold); color: var(--ink); font-weight: 800; font-size: .85rem; padding: 6px 12px; border-radius: 8px 999px 999px 8px; box-shadow: 0 4px 10px rgba(0,0,0,.12); }
.winner-strip { display: flex; align-items: center; gap: 12px; background: linear-gradient(90deg, #FFF0C2, #FFE1C8); border-radius: 18px; padding: 10px 14px; color: var(--ink); margin-bottom: 18px; box-shadow: var(--shadow); }
.winner-strip:hover { text-decoration: none; }
.winner-strip img { width: 56px; height: 56px; border-radius: 14px; object-fit: cover; }
.winner-strip small { display: block; font-weight: 700; }
.chev { margin-left: auto; font-size: 1.6rem; color: var(--ink2); }

/* tabs & chips */
.section-head { display: flex; align-items: center; justify-content: space-between; margin: 8px 0 12px; }
.tabs { display: inline-flex; background: #fff; border-radius: 999px; padding: 4px; box-shadow: var(--shadow); }
.tabs a { padding: 8px 16px; border-radius: 999px; font-weight: 800; color: var(--ink2); }
.tabs a.on { background: var(--ink); color: #fff; }
.tabs a:hover { text-decoration: none; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 10px; margin: 0 -16px; padding-left: 16px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; background: #fff; border-radius: 999px; padding: 7px 14px; font-weight: 700; color: var(--ink2); box-shadow: inset 0 0 0 1.5px var(--line); font-size: .9rem; }
.chip.on { background: var(--ink); color: #fff; box-shadow: none; }
.chip:hover { text-decoration: none; }

/* feed grid */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.card { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; animation: rise .45s cubic-bezier(.2,.9,.3,1) both; }
.card:nth-child(2n) { animation-delay: .05s; }
.ph { display: block; position: relative; aspect-ratio: 1; background: var(--bg2) center/cover no-repeat; overflow: hidden; }
.ph img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .45s ease, transform .5s ease; }
.ph img.loaded { opacity: 1; }
.card .ph:hover img { transform: scale(1.04); }
.card-body { padding: 10px 12px 12px; }
.card-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.dog-name { font-family: var(--display); font-weight: 600; font-size: 1.08rem; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.byline { display: block; color: var(--ink2); font-size: .8rem; margin: 1px 0 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.score { display: inline-flex; align-items: center; gap: 3px; font-size: .9rem; white-space: nowrap; }
.score small { font-size: .75rem; }
.mini-bone { width: 18px; height: 10px; fill: var(--tan); }
.own-note { font-size: .85rem; color: var(--ink2); font-weight: 700; padding: 6px 0 2px; }
.load-more { text-align: center; margin: 20px 0; }

/* bones rater */
.bones { display: flex; gap: 2px; align-items: center; }
.bone { background: none; border: 0; padding: 4px 2px; cursor: pointer; line-height: 0; transition: transform .15s cubic-bezier(.3,1.8,.5,1); touch-action: manipulation; }
.bone svg { width: 28px; height: 14px; fill: #EADCCB; transition: fill .15s; }
.bones.sm .bone svg { width: 24px; height: 12px; }
.bones.sm { justify-content: space-between; }
.bones.lg .bone svg { width: 40px; height: 20px; }
.bones.xl { gap: 4px; justify-content: center; }
.bones.xl .bone { padding: 10px 4px; }
.bones.xl .bone svg { width: 54px; height: 27px; }
.bone.on svg, .bones .bone.hov svg { fill: var(--tan); }
.bones[data-mine="5"] .bone.on svg, .bones.five .bone.on svg { fill: var(--brand); }
.bone:hover { transform: scale(1.18) rotate(-6deg); }
.bone.pop { animation: bonePop .45s cubic-bezier(.3,1.8,.5,1); }
.bone:disabled { cursor: default; opacity: .5; }

/* rate page */
.rate-page { max-width: 480px; margin: 0 auto; }
.rate-top { display: flex; justify-content: space-between; margin-bottom: 10px; }
.stack { position: relative; aspect-ratio: 4/5; width: min(100%, calc(min(60vh, 560px) * .8)); margin: 0 auto; }
.rcard { position: absolute; inset: 0; border-radius: 26px; overflow: hidden; box-shadow: var(--shadow-lg); background: var(--bg2) center/cover; touch-action: pan-y; user-select: none;
  transition: transform .45s cubic-bezier(.2,.9,.3,1), opacity .45s; will-change: transform; }
.rcard img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .35s; pointer-events: none; }
.rcard img.loaded { opacity: 1; }
.rcard .rc-info { position: absolute; left: 0; right: 0; bottom: 0; padding: 60px 18px 16px; color: #fff; background: linear-gradient(transparent, rgba(20,10,0,.72)); }
.rcard .rc-info h2 { font-size: 1.7rem; margin: 0; text-shadow: 0 2px 8px rgba(0,0,0,.3); }
.rcard .rc-info p { margin: 2px 0 0; opacity: .92; font-size: .95rem; }
.rcard.back { transform: scale(.94) translateY(14px); opacity: .7; }
.rcard.out-right { transform: translateX(120%) rotate(18deg); opacity: 0; }
.rcard.out-left { transform: translateX(-120%) rotate(-18deg); opacity: 0; }
.rcard.dragging { transition: none; }
.rc-result { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: #fff; background: rgba(43,33,24,.45); backdrop-filter: blur(2px); opacity: 0; transition: opacity .2s; pointer-events: none; }
.rc-result.show { opacity: 1; }
.rc-result b { display: block; font-family: var(--display); font-size: 2.4rem; }
.rc-result span { font-weight: 800; font-size: 1.1rem; }
.rate-controls { text-align: center; padding: 12px 0; }
.rate-word { font-family: var(--display); font-size: 1.2rem; height: 1.6em; color: var(--ink2); transition: color .2s; }
.rate-word.lit { color: var(--brand-d); }

/* photo page */
.photo-page { display: grid; gap: 18px; }
.photo-hero { position: relative; border-radius: 24px; overflow: hidden; background: var(--bg2) center/cover; box-shadow: var(--shadow-lg); max-height: 78vh; }
.photo-hero img { width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity .4s; backdrop-filter: blur(20px); }
.photo-hero img.loaded { opacity: 1; }
.badge-win { position: absolute; top: 12px; left: 12px; background: var(--gold); padding: 6px 12px; border-radius: 999px; font-weight: 800; font-size: .85rem; box-shadow: 0 4px 10px rgba(0,0,0,.15); }
.photo-title { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.photo-title h1 { margin: 0; }
.big-score { text-align: right; }
.big-score b { font-family: var(--display); font-size: 2.2rem; line-height: 1; display: block; color: var(--brand-d); }
.big-score span { font-size: .8rem; color: var(--ink2); font-weight: 700; }
.caption { font-size: 1.1rem; margin: 8px 0; }
.ai-tag { background: var(--bg2); border-radius: 999px; padding: 2px 8px; font-size: .8rem; }
.rate-box { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; background: #fff; border-radius: 18px; padding: 12px 14px; box-shadow: var(--shadow); margin: 12px 0; }
.rate-box > span { font-weight: 800; color: var(--ink2); font-size: .9rem; }
.dist { margin: 14px 0; display: grid; gap: 4px; max-width: 360px; }
.dist-row { display: grid; grid-template-columns: 40px 1fr 30px; align-items: center; gap: 8px; font-size: .85rem; font-weight: 700; }
.bar { height: 10px; background: var(--bg2); border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--tan), var(--brand)); border-radius: 99px; animation: grow .8s cubic-bezier(.2,.9,.3,1) both; transform-origin: left; }
.photo-actions { display: flex; gap: 8px; margin: 12px 0; flex-wrap: wrap; }
.credit { font-size: .8rem; color: var(--ink2); }
.inline { display: inline; }

/* upload */
.upload-page { max-width: 560px; margin: 0 auto; }
.upload-card { background: #fff; border-radius: 24px; box-shadow: var(--shadow); padding: 14px; }
.drop { position: relative; display: grid; place-items: center; aspect-ratio: 4/3; border: 3px dashed #F1C9A8; border-radius: 18px; background: #FFFAF3; cursor: pointer; overflow: hidden; transition: border-color .2s, background .2s; }
.drop:hover, .drop.over { border-color: var(--brand); background: #FFF1E3; }
.drop-empty { text-align: center; display: grid; gap: 4px; padding: 20px; }
.drop-icon { font-size: 3rem; animation: bob 2.4s ease-in-out infinite; }
.drop img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sniffing { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 6px; background: rgba(255,246,234,.82); font-weight: 800; font-family: var(--display); font-size: 1.3rem; }
.nose { font-size: 3.2rem; animation: sniff .5s ease-in-out infinite alternate; }
.verdict { margin: 12px 0 4px; padding: 12px 14px; border-radius: 14px; font-weight: 700; animation: pop .3s cubic-bezier(.3,1.6,.5,1); }
.verdict.ok { background: #E3F8EF; color: #155E45; }
.verdict.no { background: #FFE8E6; color: #8A2318; }
.verdict.shake { animation: shake .5s; }
.fields { display: grid; gap: 12px; margin-top: 12px; }
.how { margin-top: 16px; color: var(--ink2); }
.how summary { cursor: pointer; font-weight: 800; }

/* forms */
.auth { max-width: 420px; margin: 10px auto; text-align: center; }
.auth-art { font-size: 3.2rem; animation: bob 2.4s ease-in-out infinite; }
.form-card { background: #fff; border-radius: 22px; box-shadow: var(--shadow); padding: 18px; display: grid; gap: 14px; text-align: left; }
label { display: grid; gap: 6px; font-weight: 800; font-size: .92rem; }
input, textarea, select { font: inherit; font-weight: 600; width: 100%; padding: 12px 14px; border-radius: 14px; border: 2px solid var(--line); background: #FFFCF8; color: var(--ink); transition: border-color .15s, box-shadow .15s; font-size: 16px; }
input:focus, textarea:focus, select:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(255,122,61,.15); }
textarea { resize: vertical; }
.err { background: #FFE8E6; color: #8A2318; padding: 10px 12px; border-radius: 12px; font-weight: 700; animation: shake .45s; }
.alt { margin-top: 14px; }
.demo-hint { background: var(--bg2); border-radius: 12px; padding: 8px; color: var(--ink2); font-size: .9rem; }
.avatar-pick { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.avatar-pick legend { font-weight: 800; font-size: .92rem; margin-bottom: 6px; }
.avatar-pick label { display: block; }
.avatar-pick input { position: absolute; opacity: 0; width: 0; height: 0; }
.avatar-pick span { display: grid; place-items: center; width: 44px; height: 44px; font-size: 22px; border-radius: 50%; background: var(--bg2); cursor: pointer; transition: transform .15s; }
.avatar-pick input:checked + span { box-shadow: 0 0 0 3px var(--brand); transform: scale(1.1); background: #fff; }

/* leaderboard */
.two-col { display: grid; gap: 16px; }
.rank-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.rank-list a { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 14px; color: var(--ink); }
.rank-list a:hover { background: var(--bg); text-decoration: none; }
.rank-list img { width: 52px; height: 52px; border-radius: 12px; object-fit: cover; }
.rank-list.compact img { width: 44px; height: 44px; }
.rank { width: 30px; text-align: center; font-family: var(--display); font-weight: 600; font-size: 1.1rem; color: var(--ink2); flex: none; }
.rank.r1, .rank.r2, .rank.r3 { font-size: 1.5rem; }
.rl-main { display: grid; min-width: 0; flex: 1; }
.rl-main b, .rl-main small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rl-score { display: grid; text-align: right; }
.rl-score b { font-family: var(--display); font-size: 1.15rem; color: var(--brand-d); }
.rl-score small { font-size: .75rem; }
.dim { opacity: .55; }

/* best of week */
.best-hero { text-align: center; padding: 10px 0 16px; }
.best-hero p { color: var(--ink2); max-width: 32em; margin: 0 auto 12px; }
.countdown { display: inline-block; background: var(--ink); color: #fff; padding: 8px 16px; border-radius: 999px; font-weight: 700; }
.countdown b { color: var(--gold); font-variant-numeric: tabular-nums; }
.podium { display: grid; grid-template-columns: 1fr 1.2fr 1fr; gap: 10px; align-items: end; text-align: center; margin-top: 34px; }
.pod { color: var(--ink); display: grid; gap: 4px; justify-items: center; }
.pod:hover { text-decoration: none; }
.pod .ph { width: 100%; border-radius: 18px; box-shadow: var(--shadow); }
.pod-1 .ph { box-shadow: 0 0 0 4px var(--gold), var(--shadow-lg); }
.pod-1 { transform: translateY(-14px); }
.pod-medal { font-size: 2rem; line-height: 1; animation: bob 2.6s ease-in-out infinite; }
.pod b { font-family: var(--display); font-size: 1.05rem; }
.pod small { font-size: .78rem; }
.hall { display: grid; gap: 14px; }
.hall-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.hall-head b { font-family: var(--display); font-size: 1.15rem; }
.hall-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.hall-item { position: relative; display: grid; gap: 2px; color: var(--ink); text-align: center; }
.hall-item:hover { text-decoration: none; }
.hall-item .ph { border-radius: 14px; }
.hall-item.r1 .ph { box-shadow: 0 0 0 3px var(--gold); }
.hall-item .medal { position: absolute; top: 6px; left: 6px; font-size: 1.4rem; filter: drop-shadow(0 2px 3px rgba(0,0,0,.25)); }
.hall-item b { font-family: var(--display); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hall-item small { font-size: .75rem; }

/* forum */
.forum-head { display: flex; justify-content: space-between; align-items: center; }
.barkbox-teaser { display: block; color: var(--ink); background: linear-gradient(135deg, #fff, #FFF4E6); }
.barkbox-teaser:hover { text-decoration: none; box-shadow: var(--shadow-lg); }
.bb-title { display: flex; align-items: center; gap: 8px; font-family: var(--display); font-size: 1.15rem; font-weight: 600; margin-bottom: 6px; }
.bb-line { display: flex; align-items: center; gap: 6px; font-size: .9rem; padding: 3px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 0 rgba(60,203,154,.6); animation: pulse 1.8s infinite; display: inline-block; flex: none; }
.threads { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.thread-row { display: flex; align-items: center; gap: 12px; background: #fff; border-radius: 18px; padding: 12px 14px; box-shadow: var(--shadow); color: var(--ink); transition: transform .15s; }
.thread-row:hover { text-decoration: none; transform: translateY(-2px); }
.tr-main { display: grid; flex: 1; min-width: 0; }
.tr-main b { font-size: 1.02rem; }
.tr-main small { font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tr-count { font-weight: 800; color: var(--ink2); font-size: .9rem; white-space: nowrap; }
.back { display: inline-block; font-weight: 800; margin-bottom: 8px; }
.post { background: #fff; border-radius: 18px; padding: 14px 16px; box-shadow: var(--shadow); margin-bottom: 10px; }
.post.op { padding: 18px; }
.post.op h1 { font-size: 1.5rem; }
.tag-line { font-size: .85rem; font-weight: 800; color: var(--ink2); margin-bottom: 4px; }
.post-head { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: .9rem; margin-bottom: 6px; }
.post-head time { color: var(--ink2); font-weight: 600; font-size: .8rem; }
.post-body { white-space: pre-wrap; word-wrap: break-word; }
.reply.new { animation: rise .4s cubic-bezier(.2,.9,.3,1); box-shadow: 0 0 0 2px var(--brand), var(--shadow); }
.reply-form { display: grid; gap: 8px; margin-top: 12px; position: sticky; bottom: calc(var(--tab-h) + var(--safe-b) + 8px); background: var(--bg); padding: 8px 0; }
.reply-form button { justify-self: end; }

/* chat */
.chat-page { max-width: 640px; margin: 0 auto; display: flex; flex-direction: column; height: calc(100dvh - 64px - var(--tab-h) - var(--safe-b) - 44px); }
.chat-head { display: flex; align-items: center; gap: 10px; }
.chat-head h1 { font-size: 1.4rem; margin: 0; display: flex; align-items: center; gap: 8px; }
.chat-head .back { margin: 0; font-size: 1.5rem; }
.chat-head small { margin-left: auto; font-size: .8rem; }
.chat-log { flex: 1; overflow-y: auto; padding: 10px 2px; display: flex; flex-direction: column; gap: 8px; overscroll-behavior: contain; }
.msg { display: flex; align-items: flex-end; gap: 6px; max-width: 85%; animation: rise .3s ease both; }
.msg.me { align-self: flex-end; flex-direction: row-reverse; }
.bubble { background: #fff; border-radius: 18px 18px 18px 6px; padding: 8px 12px; box-shadow: var(--shadow); display: grid; }
.msg.me .bubble { background: var(--brand); color: #fff; border-radius: 18px 18px 6px 18px; }
.bubble b { font-size: .75rem; opacity: .7; }
.chat-form { display: flex; gap: 8px; padding-top: 8px; }
.chat-form input { flex: 1; border-radius: 999px; }

/* profile */
.profile-head { display: flex; gap: 16px; align-items: center; }
.profile-head h1 { margin: 0; }

/* prose / misc */
.prose { max-width: 720px; margin: 0 auto; }
.prose h2 { margin-top: 1.2em; }
.credits { font-size: .85rem; color: var(--ink2); padding-left: 1.1em; }
.empty { text-align: center; padding: 40px 10px; max-width: 440px; margin: 0 auto; }
.big-emoji { font-size: 4rem; animation: bob 2.4s ease-in-out infinite; }
.peek { margin: 24px auto 0; width: 180px; transform: rotate(-4deg); border-radius: 20px; overflow: hidden; box-shadow: var(--shadow-lg); filter: blur(2px); }
.page-rate .site-foot, .page-chat .site-foot { display: none; }
.site-foot { text-align: center; color: var(--ink2); font-size: .85rem; padding: 10px 16px 20px; }

/* mobile tab bar */
.tabbar { position: fixed; z-index: 50; left: 0; right: 0; bottom: 0; height: calc(var(--tab-h) + var(--safe-b)); padding-bottom: var(--safe-b); display: grid; grid-template-columns: repeat(5, 1fr);
  background: rgba(255,255,255,.92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); }
.tabbar a { display: grid; place-content: center; justify-items: center; gap: 0; font-size: .7rem; font-weight: 800; color: var(--ink2); }
.tabbar a:hover { text-decoration: none; }
.tabbar .ti { font-size: 1.35rem; line-height: 1.2; transition: transform .2s cubic-bezier(.3,1.8,.5,1); }
.tabbar a.on { color: var(--brand-d); }
.tabbar a.on .ti { transform: translateY(-2px) scale(1.12); }
.tabbar .fab .ti { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: #fff; font-size: 1.9rem; font-weight: 400;
  box-shadow: 0 4px 0 var(--brand-d), 0 8px 18px rgba(255,122,61,.4); transform: translateY(-12px); }
.tabbar .fab:active .ti { transform: translateY(-9px) scale(.95); }

/* toasts + confetti */
#toasts { position: fixed; z-index: 100; left: 50%; transform: translateX(-50%); bottom: calc(var(--tab-h) + var(--safe-b) + 16px); display: grid; gap: 8px; width: min(92vw, 420px); pointer-events: none; }
.toast { background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 14px; font-weight: 700; box-shadow: var(--shadow-lg); animation: toastIn .35s cubic-bezier(.3,1.5,.5,1); text-align: center; }
.toast.err { background: #B3261E; }
.toast.out { animation: toastOut .3s forwards; }
.confetti { position: fixed; z-index: 120; pointer-events: none; font-size: 22px; top: -30px; animation: fall linear forwards; }
.burst { position: fixed; z-index: 120; pointer-events: none; font-size: 18px; animation: burst .8s cubic-bezier(.2,.8,.3,1) forwards; }

@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes pop { from { opacity: 0; transform: scale(.9); } }
@keyframes bonePop { 0% { transform: scale(1); } 40% { transform: scale(1.5) rotate(-12deg); } 100% { transform: scale(1); } }
@keyframes bob { 50% { transform: translateY(-6px) rotate(-4deg); } }
@keyframes sniff { to { transform: scale(1.18) translateY(-3px); } }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(60,203,154,0); } 100% { box-shadow: 0 0 0 0 rgba(60,203,154,0); } }
@keyframes grow { from { transform: scaleX(0); } }
@keyframes toastIn { from { opacity: 0; transform: translateY(16px) scale(.95); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(10px); } }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }
@keyframes burst { to { transform: translate(var(--dx), var(--dy)) scale(.4); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } .ph img, .rcard img, .photo-hero img { opacity: 1; } }

/* ≥ tablet */
@media (min-width: 640px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .hero { grid-template-columns: 1.3fr 1fr; }
  .chips { margin: 0; padding-left: 2px; }
}
@media (min-width: 900px) {
  body { padding-bottom: 0; }
  .tabbar { display: none; }
  .desk-nav, .top-actions .desk-only { display: flex; }
  .wrap { padding: 24px; }
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .two-col { grid-template-columns: 1.4fr 1fr; align-items: start; }
  .photo-page { grid-template-columns: 1.4fr 1fr; align-items: start; }
  #toasts { bottom: 24px; }
  .reply-form { bottom: 0; }
  .chat-page { height: calc(100dvh - 64px - 90px); }
}
@media (max-width: 380px) { .brand-text { display: none; } }

/* ---- pre-launch: moderation, account, legal ---- */
.ok-note { background: #E7F6EA; color: #1E5B2B; padding: 10px 12px; border-radius: 12px; font-weight: 700; }
.forgot-link { text-align: center; font-size: .9rem; color: var(--ink2); }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: .9rem; font-weight: 600; line-height: 1.35; }
.check input { width: auto; margin-top: 3px; flex: none; }
.report-btn { opacity: .8; }
.report-link { margin-left: auto; font-size: .8rem; color: var(--ink2); text-decoration: none; opacity: .65; }
.post .report-link { display: inline-block; margin-top: 6px; }
.post-head .report-link { margin-top: 0; }
.report-link:hover, .msg .flag:hover { opacity: 1; }
.msg .flag { font-size: .75rem; opacity: .35; text-decoration: none; align-self: center; padding: 4px; }
.mod-banner { background: #FFF1CC; color: #6B4E00; border-radius: 12px; padding: 8px 12px; font-weight: 700; font-size: .9rem; margin: 8px 0; }
.is-hidden { opacity: .6; }
.report-preview { display: flex; gap: 12px; align-items: center; text-align: left; padding: 12px; margin-bottom: 12px; }
.report-preview img { border-radius: 12px; object-fit: cover; }
.report-preview small { display: block; color: var(--ink2); }
.report-preview p { margin: 4px 0 0; overflow-wrap: anywhere; }
.reasons { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.reasons legend { font-weight: 800; margin-bottom: 6px; }
.account .form-card { margin-bottom: 16px; }
.account h2 { margin: 0; font-size: 1.1rem; }
.form-card.danger { box-shadow: var(--shadow), inset 0 0 0 2px #F3C4BF; }
.btn-danger { background: #B3261E; color: #fff; }
.template-banner { background: #FFF1CC; border: 2px dashed #E0B400; color: #5A4300; border-radius: 14px; padding: 12px 14px; font-weight: 700; margin-bottom: 16px; }
.prose table { border-collapse: collapse; width: 100%; font-size: .9rem; display: block; overflow-x: auto; }
.prose td, .prose th { border: 1px solid var(--line); padding: 6px 8px; text-align: left; vertical-align: top; }
.site-foot p { margin: 4px 0; }
/* admin */
.admin-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 16px; }
.admin-tabs a { padding: 6px 12px; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 2px var(--line); text-decoration: none; color: var(--ink); font-weight: 700; font-size: .9rem; }
.admin-tabs a.on { background: var(--ink); color: #fff; box-shadow: none; }
.mod-item { display: grid; grid-template-columns: 84px 1fr; gap: 12px; padding: 12px; margin-bottom: 12px; align-items: start; }
.mod-item .thumb { width: 84px; height: 84px; border-radius: 12px; object-fit: cover; background: var(--line); display: grid; place-items: center; font-size: 2rem; }
.mod-item .meta { font-size: .85rem; color: var(--ink2); }
.mod-item .body { overflow-wrap: anywhere; margin: 4px 0; }
.mod-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; grid-column: 1 / -1; }
.mod-actions form { display: inline; }
.mod-actions input[name=reason] { width: 140px; padding: 6px 8px; border-radius: 10px; border: 2px solid var(--line); font: inherit; font-size: .85rem; }
.pill { display: inline-block; padding: 2px 8px; border-radius: 999px; background: #FFE8E6; color: #8A2318; font-size: .75rem; font-weight: 800; margin-right: 4px; }
.pill.ok { background: #E7F6EA; color: #1E5B2B; }
.admin-users { width: 100%; border-collapse: collapse; font-size: .85rem; }
.admin-users td, .admin-users th { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: left; }
.admin-scroll { overflow-x: auto; }
.admin-search { display: flex; gap: 8px; margin-bottom: 12px; }
.admin-search input { flex: 1; }
