@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Rock+Salt&family=Space+Grotesk:wght@500;600;700&display=swap");

:root {
  color-scheme: dark;
  --bg: #100c0d;
  --surface: #1a1213;
  --surface-raised: #241819;
  --surface-soft: #2d1d1b;
  --text: #fff4e9;
  --muted: #bca8a0;
  --subtle: #8f7972;
  --line: rgba(255, 204, 177, 0.14);
  --line-hot: rgba(255, 128, 65, 0.45);
  --fire: #ff7838;
  --fire-light: #ffb36e;
  --ember: #dc4b28;
  --display: "Space Grotesk", sans-serif;
  --body: "DM Sans", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { background: var(--bg); }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--text);
  font-family: var(--body);
  background:
    radial-gradient(ellipse at 12% -10%, rgba(172, 45, 23, 0.28), transparent 42%),
    radial-gradient(ellipse at 90% 105%, rgba(241, 100, 37, 0.12), transparent 42%),
    #100c0d;
}

button, input, textarea, select { font: inherit; }
button, a, label { -webkit-tap-highlight-color: transparent; }
a { color: var(--fire-light); }
:focus-visible { outline: 2px solid var(--fire-light); outline-offset: 3px; }

.page {
  width: min(100%, 1580px);
  min-height: 100vh;
  margin: auto;
  padding: 18px clamp(18px, 3vw, 48px) 28px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 16px;
}

.header {
  display: grid;
  grid-template-columns: minmax(0, min(42vw, 520px)) minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: clamp(12px, 3vw, 42px);
  row-gap: 14px;
}

.brand { position: relative; isolation: isolate; grid-row: 1 / 3; min-width: 0; }
.brand-logo-row { position: relative; z-index: 0; width: 100%; }
.brand-logo {
  display: block;
  width: 100%;
  max-width: 520px;
  height: auto;
  filter: drop-shadow(0 16px 26px rgba(233, 63, 20, 0.18));
}
.brand-caption {
  position: relative;
  z-index: 2;
  margin: -8px 0 0 10px;
  color: var(--subtle);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
}
.site-nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 9px 15px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: #d5c2ba;
  background: transparent;
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: color .15s, background .15s, border-color .15s;
}
.site-nav-link:hover { color: var(--text); background: rgba(255, 255, 255, .06); }
.site-nav-link.is-active {
  color: #1a100e;
  background: var(--fire-light);
  box-shadow: 0 4px 18px rgba(255, 115, 51, .2);
}

.header-meta {
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}
.meta-card {
  display: flex;
  min-width: 0;
  align-items: center;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(31, 20, 20, .88);
}
.mode-picker { display: flex; align-items: center; gap: 9px; white-space: nowrap; }
.meta-label {
  color: var(--subtle);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.mode-select {
  min-width: 115px;
  padding: 8px 28px 8px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--text);
  background: var(--surface-soft);
  cursor: pointer;
}
.account-card { flex: 1; justify-content: space-between; gap: 12px; }
.account-copy { display: grid; gap: 4px; min-width: 0; }
.account-copy > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quota-status { color: var(--muted); font-size: 0.75rem; }
.account-card .site-nav-link {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 7px 13px;
  border-color: var(--line-hot);
  color: var(--fire-light);
  font-size: .77rem;
}

.capture {
  display: grid;
  grid-template-columns: minmax(310px, .43fr) minmax(0, 1fr);
  gap: clamp(16px, 2vw, 28px);
  min-height: 0;
  padding: clamp(16px, 2.1vw, 30px);
  border: 1px solid var(--line);
  border-radius: 27px;
  background: linear-gradient(145deg, rgba(40, 25, 25, .98), rgba(24, 17, 18, .98) 65%);
  box-shadow: 0 28px 80px rgba(0, 0, 0, .32), inset 0 1px rgba(255,255,255,.04);
}
.controls { display: flex; flex-direction: column; gap: 12px; min-width: 0; min-height: 0; overflow: auto; scrollbar-width: thin; }
.controls-header { padding: 4px 0 8px; }
.section-kicker {
  margin: 0 0 12px;
  color: var(--fire-light);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
}
.controls-header h1, .community-heading h1, .profile-panel h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.8rem, 2.7vw, 3.1rem);
  font-weight: 700;
  letter-spacing: -.045em;
  line-height: 1.04;
}
.controls-header > p:last-child, .community-heading > p:last-child {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: .94rem;
  line-height: 1.45;
}

button {
  min-height: 42px;
  padding: 10px 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  background: var(--surface-raised);
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  transition: transform .15s, border-color .15s, background .15s, box-shadow .15s;
}
button:hover:not(:disabled) { transform: translateY(-2px); border-color: var(--line-hot); background: #33201d; }
button:disabled { opacity: .45; cursor: not-allowed; }
button.primary, button.consent-accept {
  border-color: transparent;
  color: #24100a;
  background: linear-gradient(120deg, #ffbd74 0%, #ff8642 53%, #ed5b31 100%);
  box-shadow: 0 10px 25px rgba(246, 94, 40, .18);
}
button.primary:hover:not(:disabled), button.consent-accept:hover:not(:disabled) {
  border-color: transparent;
  background: linear-gradient(120deg, #ffd196, #ff9d5c 60%, #f9744a);
  box-shadow: 0 14px 30px rgba(246, 94, 40, .26);
}
.camera-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.roast-submit { display: flex; align-items: center; justify-content: space-between; min-height: 50px; padding-inline: 18px; }
.roast-submit span { font-size: 1.35rem; line-height: 1; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.image-drop-zone {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 6px;
  min-height: 135px;
  padding: 18px;
  border: 1.5px dashed var(--line-hot);
  border-radius: 16px;
  color: var(--text);
  background: radial-gradient(circle at 50% 0, rgba(255, 116, 44, .12), transparent 70%), rgba(255, 255, 255, .018);
  text-align: center;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.image-drop-zone:hover, .image-drop-zone.is-dragging, .image-drop-zone:focus-visible {
  border-color: var(--fire-light);
  background: rgba(255, 120, 56, .12);
}
.drop-zone-icon { color: var(--fire-light); font-size: 1.75rem; line-height: 1; }
.drop-zone-title { max-width: 100%; font-size: .91rem; font-weight: 700; overflow-wrap: anywhere; }
.drop-zone-hint { color: var(--subtle); font-size: .75rem; }
.controls-footnote { margin-top: auto; color: var(--subtle); font-size: .72rem; line-height: 1.45; }
.controls-footnote a { color: var(--fire-light); }
button.consent-review { display: block; width: fit-content; min-height: 0; margin-top: 5px; padding: 0; border: 0; background: transparent; color: var(--fire-light); font-size: inherit; text-align: left; text-decoration: underline; box-shadow: none; }
button.consent-review:hover:not(:disabled) { transform: none; background: transparent; }
.guest-challenge { padding: 9px; border: 1px solid var(--line); border-radius: 12px; }
.guest-challenge p { margin: 0 0 8px; color: var(--muted); font-size: .78rem; }
.rating-controls { display: block; }
.rating-controls .flaime-button { width: 100%; }
.roast-actions { display: flex; gap: 9px; }
.roast-actions > * { flex: 1 1 0; min-width: 0; }
.share-button { border-color: var(--line-hot); color: #24100a; background: var(--fire-light); }
.share-button:hover:not(:disabled) { color: #24100a; background: #ffd196; }
.share-status { margin: -6px 0 0; color: var(--fire-light); font-size: .75rem; line-height: 1.35; }
.share-status:empty { display: none; }
.roast-actions:has(> [hidden]:first-child):has(> [hidden]:last-child) { display: none; }
.flaime-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-color: var(--line-hot);
  color: var(--fire-light);
  background: rgba(255, 118, 54, .09);
}
.flaime-button::before, .flaime-count::before {
  content: "";
  display: inline-block;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  background: url("/static/flaime.svg") center / contain no-repeat;
}
.flaime-button[aria-pressed="true"] {
  color: #24100a;
  border-color: transparent;
  background: linear-gradient(120deg, #ffd08c, #ff8e4a);
}
.flaime-count { display: inline-flex !important; align-items: center; gap: 5px; color: var(--fire-light) !important; }
.flaime-count::before { width: 17px; height: 17px; }

.frame {
  position: relative;
  display: grid;
  grid-template-rows: 46px minmax(0, 1fr) auto;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 170, 111, .2);
  border-radius: 21px;
  background: #110d0f;
  box-shadow: inset 0 0 0 10px rgba(0,0,0,.12), 0 14px 40px rgba(0,0,0,.22);
}
.frame-glow {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 75%, rgba(255, 108, 44, .19), transparent 48%),
    linear-gradient(rgba(255, 180, 115, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 180, 115, .035) 1px, transparent 1px);
  background-size: auto, 46px 46px, 46px 46px;
}
.frame-hud {
  position: relative; z-index: 4; padding: 19px 24px 0;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  color: #f8d8bd; font-size: .66rem; font-weight: 700; letter-spacing: .18em;
}
.frame-hud span:last-child { display: flex; align-items: center; gap: 8px; }
.frame-hud i { width: 7px; height: 7px; border-radius: 50%; background: var(--fire); box-shadow: 0 0 12px var(--fire); }
.frame-media-stage { position: relative; display: grid; place-items: center; min-width: 0; min-height: 0; overflow: hidden; }
.frame-placeholder {
  position: absolute; inset: 0; z-index: 1; display: grid; align-content: center; justify-items: center; gap: 12px;
  padding: 30px; text-align: center; pointer-events: none;
}
.flame-mascot {
  position: relative;
  width: clamp(88px, 9vw, 128px);
  aspect-ratio: 1;
  filter: drop-shadow(0 0 24px rgba(255, 94, 26, .45));
  transform-origin: 50% 85%;
  animation: mascot-sway 2.4s ease-in-out infinite;
}
.flame-mascot::before, .flame-mascot::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("/static/mascot/evil-flame-sprite-v3.png") 0 0 / 400% 400% no-repeat;
}
.flame-mascot::before { animation: mascot-flicker 2.4s step-end infinite; }
.flame-mascot::after {
  opacity: 0;
  animation: mascot-flicker 2.4s step-end -0.15s infinite, mascot-crossfade 0.15s linear infinite;
}
@keyframes mascot-flicker {
  0%, 100% { background-position: 0% 0%; }
  6.25% { background-position: 33.333% 0%; }
  12.5% { background-position: 66.667% 0%; }
  18.75% { background-position: 100% 0%; }
  25% { background-position: 0% 33.333%; }
  31.25% { background-position: 33.333% 33.333%; }
  37.5% { background-position: 66.667% 33.333%; }
  43.75% { background-position: 100% 33.333%; }
  50% { background-position: 0% 66.667%; }
  56.25% { background-position: 33.333% 66.667%; }
  62.5% { background-position: 66.667% 66.667%; }
  68.75% { background-position: 100% 66.667%; }
  75% { background-position: 0% 100%; }
  81.25% { background-position: 33.333% 100%; }
  87.5% { background-position: 66.667% 100%; }
  93.75% { background-position: 100% 100%; }
}
@keyframes mascot-sway {
  0%, 100% { transform: translateY(-4px) scaleY(1.08) rotate(-1deg); }
  50% { transform: translateY(-7px) scaleY(1.1) rotate(1deg); }
}
@keyframes mascot-crossfade {
  0%, 60% { opacity: 0; }
  100% { opacity: 1; }
}
.frame-placeholder p { margin: 0; font: 700 clamp(2rem, 4vw, 4.2rem)/1.04 var(--display); letter-spacing: -.05em; }
.frame-placeholder span { color: var(--muted); font-size: .88rem; }
.frame:has(video.active, canvas.active, #uploadedPreview.active) .frame-placeholder { display: none; }
video, canvas, #uploadedPreview { position: absolute; inset: 0; z-index: 2; display: none; width: 100%; height: 100%; }
video { object-fit: cover; }
canvas { object-fit: contain; object-position: center; }
#uploadedPreview {
  inset: 50% auto auto 50%;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transform: translate(-50%, -50%);
}
video.active, canvas.active, #uploadedPreview.active { display: block; }
.roast-graffiti {
  position: absolute; z-index: 3; left: 5%; top: 70%;
  width: 90%; max-width: 90%; max-height: 24%; overflow: hidden;
  padding: .15em .25em; color: #000; text-align: center;
  font-family: "Rock Salt", cursive;
  font-size: clamp(.75rem, 1.6vw, 1.35rem); line-height: 1.35;
  overflow-wrap: anywhere; white-space: pre-wrap;
  -webkit-text-stroke: 0;
  text-shadow: none;
  background: transparent;
  pointer-events: none;
  transform: none;
  contain: paint;
}
.roast-overlay {
  position: relative; z-index: 5; min-height: 50px; max-height: 120px;
  margin: 10px 18px 18px; overflow: auto; padding: 14px 17px;
  border: 1px solid rgba(255, 199, 154, .2); border-radius: 12px;
  color: var(--text); background: rgba(20, 12, 11, .85);
  font-size: .95rem; line-height: 1.45;
}

.community-panel, .profile-panel {
  min-height: 0;
  padding: clamp(18px, 2vw, 30px);
  border: 1px solid var(--line);
  border-radius: 26px;
  background: linear-gradient(145deg, rgba(40, 25, 25, .98), rgba(24, 17, 18, .98) 65%);
  box-shadow: 0 28px 80px rgba(0, 0, 0, .3);
}
.community-panel { display: grid; grid-template-rows: auto auto minmax(0,1fr); gap: 18px; }
.community-heading > p:last-child { margin: 9px 0 0; }
.human-roast-form {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 8px 14px;
  padding: 14px 17px; border: 1px solid var(--line); border-radius: 16px;
  background: rgba(255, 255, 255, .025);
}
.human-roast-form > label:first-child { grid-column: 1 / -1; font-size: .79rem; font-weight: 700; color: var(--fire-light); text-transform: uppercase; letter-spacing: .1em; }
.human-roast-form textarea {
  grid-column: 1; min-height: 62px; width: 100%; resize: vertical;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 11px;
  color: var(--text); background: #171012;
}
.human-roast-form textarea::placeholder { color: var(--subtle); }
.human-roast-form .profile-setting-link { grid-column: 1; grid-row: 3; font-size: .75rem; }
.human-roast-form button { grid-column: 2; grid-row: 2 / 4; align-self: stretch; }
.form-status { grid-column: 1 / -1; min-height: 0; margin: 0; color: var(--fire-light); font-size: .8rem; }
.form-status:empty { display: none; }
.leaderboard-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; min-height: 0; }
.leaderboard-card {
  display: flex; flex-direction: column; min-width: 0; min-height: 0; padding: 18px;
  border: 1px solid var(--line); border-radius: 17px; background: rgba(11, 9, 10, .45);
}
.leaderboard-card h2 { margin: 0; font: 700 1.06rem var(--display); letter-spacing: -.025em; }
.leaderboard-card:nth-child(1) h2::before { content: '01  '; color: var(--fire); font-size: .7rem; letter-spacing: .15em; }
.leaderboard-card:nth-child(2) h2::before { content: '02  '; color: var(--fire); font-size: .7rem; letter-spacing: .15em; }
.leaderboard-card:nth-child(3) h2::before { content: '03  '; color: var(--fire); font-size: .7rem; letter-spacing: .15em; }
.leaderboard-list { display: grid; align-content: start; gap: 10px; min-height: 0; margin: 13px 0 0; padding-left: 22px; overflow: auto; scrollbar-width: thin; }
.leaderboard-list li { padding: 10px 8px 10px 5px; border-top: 1px solid var(--line); color: var(--fire-light); font-size: .86rem; }
.leaderboard-list li span { display: -webkit-box; overflow: hidden; color: var(--text); overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.leaderboard-list li strong { display: block; margin-top: 5px; color: var(--subtle); font-size: .75rem; }
.entry-votes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.entry-votes button, .report-entry-button { min-height: 30px; padding: 5px 9px; font-size: .72rem; }
.list-pager { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: auto; padding-top: 11px; color: var(--muted); font-size: .77rem; }
.list-pager:empty { display: none; }
.list-pager button { min-height: 31px; padding: 5px 9px; font-size: .73rem; }

.profile-panel { overflow: auto; }
.profile-panel > p:not(.section-kicker) { color: var(--muted); }
.profile-card { max-width: 760px; margin-top: 18px; padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255, 255, 255, .025); }
.profile-card h2 { margin: 0 0 10px; font: 700 1.12rem var(--display); }
.profile-card p { color: var(--muted); font-size: .9rem; line-height: 1.5; }
.training-check { display: flex; gap: 10px; align-items: flex-start; padding: 14px; border: 1px solid var(--line-hot); border-radius: 12px; color: var(--text); background: rgba(255, 116, 44, .055); cursor: pointer; }
.training-check input { width: 18px; height: 18px; flex: none; margin-top: 2px; accent-color: var(--fire); }

.consent-dialog, .report-dialog {
  width: min(92vw, 630px); max-height: min(90vh, 900px); margin: auto; padding: 0;
  overflow: auto; border: 1px solid var(--line-hot); border-radius: 22px;
  color: var(--text); background: var(--surface);
  box-shadow: 0 40px 100px rgba(0,0,0,.7), 0 0 80px rgba(235, 79, 28, .12);
}
.consent-dialog::backdrop, .report-dialog::backdrop { background: rgba(9, 5, 6, .88); backdrop-filter: blur(10px); }
.consent-card { position: relative; padding: 30px; background: radial-gradient(circle at 100% 0, rgba(255, 100, 35, .15), transparent 38%), var(--surface); }
.consent-flame { position: absolute; right: 25px; top: 24px; font-size: 2rem; }
.consent-eyebrow { margin: 0 0 10px; color: var(--fire-light); font-size: .73rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
.consent-card h1 { max-width: 85%; margin: 0; font: 700 clamp(1.75rem, 5vw, 2.65rem)/1.05 var(--display); letter-spacing: -.04em; }
.consent-summary { color: var(--muted); line-height: 1.5; }
.consent-details { padding: 15px 18px; border: 1px solid var(--line); border-radius: 14px; background: rgba(0,0,0,.16); }
.consent-details h2 { margin: 0 0 10px; color: var(--fire-light); font-size: .9rem; }
.consent-details ul { margin: 0; padding-left: 19px; color: var(--muted); font-size: .87rem; line-height: 1.48; }
.consent-check { display: flex; align-items: flex-start; gap: 12px; margin: 16px 0; padding: 13px; border: 1px solid var(--line); border-radius: 12px; color: var(--text); font-size: .86rem; line-height: 1.4; cursor: pointer; }
.consent-check input { width: 19px; height: 19px; flex: none; margin: 2px 0 0; accent-color: var(--fire); }
.consent-actions { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 9px; }
button.consent-decline { background: transparent; color: var(--muted); }
.report-dialog { width: min(92vw, 520px); }
.report-form { display: grid; gap: 10px; padding: 25px; }
.report-form h2 { margin: 0; font-family: var(--display); }
.report-form p { margin: 0; color: var(--muted); }
#reportRoastPreview { overflow-wrap: anywhere; }
.report-form select, .report-form textarea { width: 100%; padding: 10px; border: 1px solid var(--line); border-radius: 10px; color: var(--text); background: #171012; }
.report-actions { display: flex; gap: 8px; }
.report-actions button { flex: 1; }
.cursor-glow { position: fixed; z-index: 1; width: 140px; height: 140px; border-radius: 50%; opacity: 0; pointer-events: none; transform: translate(-50%,-50%); background: radial-gradient(circle, rgba(255, 112, 45, .25), transparent 70%); filter: blur(8px); transition: opacity .2s; }
.cursor-glow.visible { opacity: 1; }

@media (min-width: 900px) {
  body { height: 100dvh; overflow: hidden; }
  .page { height: 100dvh; min-height: 0; padding-top: 8px; padding-bottom: 16px; gap: 8px; }
  .brand-logo { max-height: min(26dvh, 240px); object-fit: contain; object-position: left center; }
  .capture { min-height: 0; }
  .community-panel { overflow: hidden; }
  .human-roast-form textarea { min-height: 52px; resize: none; }
}

@media (max-width: 1120px) and (min-width: 900px) {
  .header { grid-template-columns: minmax(0, 40%) minmax(0,1fr); }
  .site-nav-link { padding-inline: 10px; font-size: .78rem; }
  .header-meta { gap: 6px; }
  .meta-card { padding: 8px; }
  .mode-picker { gap: 4px; }
  .mode-select { min-width: 95px; }
  .capture { grid-template-columns: minmax(270px, .42fr) minmax(0,1fr); }
}

@media (max-width: 899px) {
  .page { display: block; padding: 10px 14px 30px; }
  .header { display: flex; flex-direction: column; gap: 16px; margin-bottom: 18px; }
  .brand { width: 100%; display: grid; justify-items: center; }
  .brand-logo { width: min(100%, 520px); }
  .brand-caption { margin: -8px 0 0; font-size: .6rem; text-align: center; }
  .site-nav { width: 100%; justify-content: center; flex-wrap: wrap; }
  .site-nav-link { min-height: 38px; padding: 8px 11px; font-size: .8rem; }
  .header-meta { width: 100%; justify-content: stretch; }
  .meta-card { flex: 1; }
  .capture { grid-template-columns: 1fr; }
  .controls { overflow: visible; }
  .frame { height: min(65svh, 470px); }
  .community-panel { display: block; }
  .human-roast-form { margin: 20px 0; }
  .leaderboard-grid { grid-template-columns: 1fr; }
  .leaderboard-card { min-height: 220px; }
  .leaderboard-list { overflow: visible; }
}

@media (max-width: 560px) {
  .header-meta { flex-direction: column; }
  .capture, .community-panel, .profile-panel { padding: 17px; border-radius: 20px; }
  .controls-header h1, .community-heading h1, .profile-panel h1 { font-size: 2rem; }
  .image-drop-zone { min-height: 125px; }
  .frame { height: clamp(280px, 55svh, 430px); }
  .frame-hud { padding: 16px 17px 0; font-size: .55rem; }
  .roast-overlay { margin: 10px 14px 14px; }
  .human-roast-form { display: grid; grid-template-columns: 1fr; }
  .human-roast-form textarea, .human-roast-form .profile-setting-link, .human-roast-form button { grid-column: 1; grid-row: auto; }
  .consent-card { padding: 22px 18px; }
  .consent-actions { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .flame-mascot, .flame-mascot::before, .flame-mascot::after { animation: none !important; }
  .flame-mascot::after { opacity: 0; }
}
