* { box-sizing: border-box; }
:root {
  --cream: #faf6f2;
  --black: #050505;
  --orange: #f0440b;
}
html, body { min-height: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--black);
  font-family: Arial, Helvetica, sans-serif;
}
.page {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 66px 24px 28px;
}
.language-switch {
  position: absolute;
  z-index: 2;
  top: 14px;
  right: 16px;
  display: flex;
  align-items: center;
}
.language-button {
  display: inline-flex;
  min-height: 30px;
  padding: 0 13px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 60px;
  background: linear-gradient(105deg, #f34a0a, #f0440b 70%, #ed3d08);
  color: #fff;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: .15px;
  text-decoration: none;
  white-space: nowrap;
}
.hero {
  width: min(96%, 520px);
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 4px 0 12px;
  min-height: 136px;
}
.brand-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .16em;
  width: 100%;
  min-height: 112px;
  margin: 0;
  white-space: nowrap;
  transform: translateY(5px);
  font-family: "Arial Black", Arial, Helvetica, sans-serif;
  font-size: clamp(38px, 8.8vw, 52px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: .2px;
  -webkit-text-stroke: 2.2px currentColor;
  paint-order: stroke fill;
}
.custom-e {
  display: inline-flex;
  width: .63em;
  height: .72em;
  margin: 0 .012em;
  vertical-align: -.075em;
  transform: translateY(-4px);
  color: inherit;
  -webkit-text-stroke: 0;
}
.custom-e svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 12;
  stroke-linejoin: miter;
  paint-order: stroke fill;
}
.brand-title-es {
  gap: 0;
  font-size: clamp(40px, 7.2vw, 58px);
  letter-spacing: .005em;
}
/* PNG headers contain their own lettering and colors. Keep the existing header box dimensions. */
.brand-title-image {
  position: relative;
  overflow: hidden;
  height: 156px;
  min-height: 156px;
}
.brand-title-mask,
.brand-title-mask-es {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  background-image: url("header.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}


/* Spanish PNG supplies its own colors too. */
.brand-title-mask-es {
  background-image: url("header-es.png");
}


.controls {
  width: min(90%, 426px);
  transform: translateY(-3px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 13px;
  margin: 0;
}
button, input { font: inherit; }
button { cursor: pointer; }
.upload-button {
  width: 100%;
  min-height: 57px;
  border: 2.5px solid var(--black);
  border-radius: 60px;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  color: var(--black);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: .3px;
}
.upload-icon {
  width: 31px; height: 31px;
  fill: none; stroke: currentColor; stroke-width: 5.5;
  stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto;
}
.upload-button:hover, .name-input:focus { background: rgba(0,0,0,.025); }
.upload-button[hidden] { display: none !important; }
.name-entry {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
}
.name-field {
  position: relative;
  width: 100%;
  min-width: 0;
}
.name-field-primary { flex: 0 0 100%; width: 100%; }
.name-field-secondary { width: 100%; }
.name-field-secondary[hidden], .add-person-button[hidden] { display: none !important; }
.add-person-button {
  position: absolute;
  right: -38px;
  top: 50%;
  transform: translateY(-50%);
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: #f0440b;
  color: #fff;
  font-size: 24px;
  font-weight: 500;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 0 3px;
}
.add-person-button:hover { filter: brightness(.96); }
.name-input {
  width: 100%;
  min-height: 54px;
  border: 2.5px solid var(--black);
  border-radius: 60px;
  background: transparent;
  color: #050505;
  opacity: 1;
  -webkit-text-fill-color: #050505;
  text-align: center;
  padding: 9px 18px;
  outline: none;
  font-family: Verdana, Geneva, sans-serif;
  font-size: 16px;
  font-weight: 540;
  -webkit-text-stroke: .12px currentColor;
  font-style: normal;
  letter-spacing: .1px;
}
.name-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #050505;
  opacity: 1;
  font-family: Verdana, Geneva, sans-serif;
  font-size: 16px;
  font-weight: 540;
  -webkit-text-stroke: .12px currentColor;
  font-style: normal;
  letter-spacing: .1px;
  pointer-events: none;
}
.name-placeholder[hidden] { display: none; }
.name-placeholder.shake { animation: name-nudge .45s ease-in-out; }
.name-field-secondary .name-placeholder.shake { animation: name-nudge .45s ease-in-out; }
.roast-button {
  width: min(78%, 327px);
  min-height: 52px;
  border: 0;
  border-radius: 60px;
  background: linear-gradient(105deg, #f34a0a, #f0440b 70%, #ed3d08);
  color: white;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: .2px;
  box-shadow: none;
  margin-top: 39px;
}
.roast-button:hover { filter: brightness(.97); }
.upload-success-flame {
  display: flex;
  width: 100%;
  min-height: 57px;
  align-items: center;
  justify-content: center;
  position: relative;
  top: -4px;
}
.upload-success-flame[hidden] { display: none !important; }
.flame-art {
  display: block;
  width: 46px;
  height: 52px;
  overflow: visible;
  filter: drop-shadow(0 0 4px rgba(255, 83, 0, .35));
}
.fire-main {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  animation: fire-breathe .96s ease-in-out infinite;
}
.fire-red, .fire-orange, .fire-yellow {
  transform-box: fill-box;
  transform-origin: 50% 100%;
}
.fire-red { animation: fire-sway 1.37s ease-in-out infinite; }
.fire-orange { animation: fire-flow 1.01s ease-in-out infinite; }
.fire-yellow { animation: fire-core-flow 1.13s ease-in-out infinite; }
.fire-hotspot { animation: fire-glint .92s ease-in-out infinite; }

@keyframes fire-breathe {
  0%,100% { transform: scaleX(.975) scaleY(.975) skewX(-1.3deg); }
  35% { transform: scaleX(1.035) scaleY(1.045) skewX(1.3deg); }
  68% { transform: scaleX(.985) scaleY(1.02) skewX(-.8deg); }
}
@keyframes fire-sway {
  0%,100% { transform: rotate(-1.9deg) scaleY(1); }
  45% { transform: rotate(2.2deg) scaleY(1.045); }
  72% { transform: rotate(.25deg) scaleY(.98); }
}
@keyframes fire-flow {
  0%,100% { transform: translateX(-.55px) scaleY(1); }
  50% { transform: translateX(1.25px) scaleY(1.055); }
}
@keyframes fire-core-flow {
  0%,100% { transform: scale(.99, .993); opacity: .96; }
  50% { transform: scale(1.015, 1.012); opacity: 1; }
}
@keyframes fire-glint {
  0%,100% { opacity: .62; transform: scale(.9); }
  50% { opacity: .95; transform: scale(1.08); }
}
  22% { opacity: .9; }
  50% { transform: translateY(-2px) rotate(17deg) scale(1); opacity: 1; }
  78% { opacity: .45; }
}
.message { min-height: 18px; margin: -3px 0 0; font-size: 13px; text-align: center; }
.upload-button.shake { animation: upload-nudge .45s ease-in-out; }
@keyframes upload-nudge {
  0%,25%,50%,75%,100% { transform: translateX(0); }
  12.5%,62.5% { transform: translateX(-3px); }
  37.5%,87.5% { transform: translateX(3px); }
}
@keyframes name-nudge {
  0%,100% { transform: translateX(0); }
  25%,75% { transform: translateX(-1px); }
  50% { transform: translateX(1px); }
}
@keyframes shake {
  0%,100% { transform: translateX(0); }
  20%,60% { transform: translateX(-5px); }
  40%,80% { transform: translateX(5px); }
}
@media (max-width: 700px) {
  /* Mobile-only sizing: desktop styles above remain unchanged. */
  .page { padding: 70px 15px 23px; }
  .language-switch { top: 8px; right: 8px; gap: 4px; }
  .language-button { min-height: 27px; padding: 0 6px; font-size: 9px; }
  .hero { width: min(94%, 390px); min-height: 100px; margin: 7px 0 9px; }
  .brand-title-image { height: 112px; min-height: 112px; }
  .brand-title { min-height: 100px; transform: translateY(4px); font-size: clamp(25px, 8.1vw, 34px); }
  /* Align the custom E glyphs with the other capitals on mobile only. */
  .brand-title .custom-e { transform: translateY(2px); }
  .brand-title-es { font-size: clamp(32px, 9vw, 43px); }
  .controls { width: min(79%, 320px); gap: 8px; }
  .upload-button { min-height: 45px; font-size: 13px; gap: 9px; }
  .upload-icon { width: 23px; height: 23px; }
  .name-input { min-height: 43px; font-size: 11px; padding: 6px 13px; }
  .name-placeholder { font-size: 11px; }
  .name-entry { gap: 7px; }
  .add-person-button { right: -32px; flex-basis: 23px; width: 23px; height: 23px; font-size: 15px; padding: 0; line-height: 1; display: grid; place-items: center; }
  .roast-button { min-height: 45px; width: 74%; font-size: 14px; margin-top: 32px; }
  .upload-success-flame { min-height: 45px; }
  .flame-art { width: 38px; height: 44px; }
  .message { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Add the requested extra spacing at the two E/T joins. */
.brand-black .custom-e {
  margin-right: calc(.012em + 2px);
}
.brand-orange .gap-after-t {
  margin-right: 3px;
}


/* Roast result card and full-screen fire reveal */
.roast-result { width: min(94%, 760px); margin: 30px auto 46px; }
.roast-result[hidden], .fire-reveal[hidden] { display: none !important; }
.roast-card { display: grid; grid-template-columns: 1fr 1fr; min-height: 360px; overflow: hidden; background: #050505; border-radius: 3px; box-shadow: 0 16px 42px rgba(0,0,0,.18); }
.roast-card-photo { min-width: 0; min-height: 360px; background: #171717; }
.roast-card-photo img { display: block; width: 100%; height: 100%; min-height: 360px; object-fit: cover; }
.roast-card-panel { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding: 25px 24px 76px; color: #fff; text-align: center; overflow: hidden; }
.roast-card-kicker { color: #f0440b; font-size: 13px; font-weight: 900; letter-spacing: 1.4px; margin-bottom: 20px; }
.roast-card-panel h2 { margin: 0 0 17px; color: #ff5a16; font-size: clamp(21px, 3.4vw, 31px); line-height: 1.08; overflow-wrap: anywhere; }
.roast-card-panel p { margin: 0; max-width: 34ch; color: #fff; font-size: clamp(15px, 2vw, 19px); font-weight: 800; font-style: italic; line-height: 1.42; white-space: pre-wrap; overflow-wrap: anywhere; }
.card-flames { position: absolute; left: -2%; right: -2%; bottom: -2px; height: 62px; display: flex; align-items: flex-end; gap: 2px; overflow: hidden; }
.card-flames i { display: block; flex: 1; height: 75%; background: linear-gradient(to top, #d51d18 0%, #f0440b 48%, #ffb22b 82%, #fff0a0 100%); border-radius: 85% 15% 0 0; transform: skewX(-8deg); filter: drop-shadow(0 0 5px rgba(255,75,0,.4)); }
.card-flames i:nth-child(2n) { height: 100%; transform: skewX(9deg); border-radius: 20% 80% 0 0; }
.card-flames i:nth-child(3n) { height: 62%; }
.fire-reveal { position: fixed; z-index: 9999; inset: 0; pointer-events: none; overflow: hidden; }
.fire-wall { position: absolute; top: 0; bottom: 0; width: 53vw; opacity: 0; background: repeating-linear-gradient( to right, transparent 0 5%, rgba(255,205,62,.95) 6%, #ff5b12 10%, #d51d18 14%, transparent 19% ), linear-gradient(to top, #fff1a0 0%, #ff9a19 22%, #ed330c 62%, rgba(130,0,0,.92) 100%); background-blend-mode: screen, normal; filter: saturate(1.25) drop-shadow(0 0 18px rgba(255,65,0,.7)); }
.fire-wall::before, .fire-wall::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient( 78deg, transparent 0 8%, rgba(255,215,80,.9) 9% 11%, transparent 13% 20% ); animation: flame-flicker .22s infinite alternate; }
.fire-wall::after { background: repeating-linear-gradient( 102deg, transparent 0 11%, rgba(255,240,150,.8) 12% 14%, transparent 16% 25% ); animation-duration: .31s; }
.fire-wall-left { left: 0; transform-origin: bottom left; clip-path: polygon(0 100%,0 0,100% 0,91% 18%,100% 32%,88% 49%,100% 65%,85% 82%,100% 100%); }
.fire-wall-right { right: 0; transform-origin: bottom right; clip-path: polygon(0 100%,15% 82%,0 65%,12% 49%,0 32%,9% 18%,0 0,100% 0,100% 100%); }
.fire-reveal.play .fire-wall-left { animation: fire-rise-fall 1.8s ease-in-out forwards; }
.fire-reveal.play .fire-wall-right { animation: fire-rise-fall 1.8s ease-in-out forwards; }
@keyframes fire-rise-fall { 0% { transform: scaleY(0); opacity: 0; } 22% { transform: scaleY(1); opacity: 1; } 56% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(0); opacity: 0; } }
@keyframes flame-flicker { from { transform: translateX(-2%) scaleY(.98); opacity: .7; } to { transform: translateX(2%) scaleY(1.03); opacity: 1; } }
.roast-button:disabled { opacity: .7; cursor: wait; }
@media (max-width: 600px) {
  .roast-result { width: min(94%, 430px); margin-top: 22px; }
  .roast-card { grid-template-columns: 1fr; }
  .roast-card-photo, .roast-card-photo img { min-height: 250px; max-height: 330px; }
  .roast-card-panel { min-height: 270px; padding: 22px 20px 78px; }
}
@media (prefers-reduced-motion: reduce) { .fire-wall::before, .fire-wall::after { animation: none; } }

/* Official square roast-card template: fixed artwork, dynamic photo/name/roast. */
.roast-result { width: min(94%, 760px); margin: 30px auto 46px; }
.roast-card {
  position: relative; display: block; width: 100%; aspect-ratio: 1 / 1;
  overflow: hidden; isolation: isolate; background: #000; border-radius: 0;
  box-shadow: 0 16px 42px rgba(0,0,0,.18);
}
.roast-card-photo {
  position: absolute; inset: 0; z-index: 1; min-height: 0; background: #171717;
  clip-path: polygon(0 0, 57.5% 0, 47.5% 39%, 52.5% 100%, 0 100%);
}
.roast-card-photo img {
  display: block; width: 100%; height: 100%; min-height: 0; object-fit: cover;
  object-position: center center;
  background: transparent;
}
.roast-card-panel {
  position: absolute; z-index: 2; inset: 0 0 0 45%; display: flex;
  flex-direction: column; align-items: center; justify-content: flex-start;
  padding: 2.1% 3.2% 19%; color: #fff; text-align: center; overflow: hidden;
}
.roast-card-kicker {
  flex: 0 0 auto; color: #fff; font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(15px, 5.3cqw, 53px); font-weight: 950; letter-spacing: -.045em;
  line-height: 1; white-space: nowrap; margin: 0 0 6.5%;
}
.roast-card-kicker strong { color: #f0440b; font-weight: 950; }
.roast-card-panel h2 {
  flex: 0 0 auto; margin: 0 0 2.5%; color: #ff9700;
  font-family: Arial, Helvetica, sans-serif; font-size: clamp(22px, 6.3cqw, 66px);
  font-weight: 900; line-height: 1.05; letter-spacing: -.035em;
  overflow-wrap: anywhere;
}
.roast-card-panel p {
  margin: 0; width: 100%; max-width: 100%; color: #fff;
  font-family: Arial, Helvetica, sans-serif; font-size: clamp(14px, 4.25cqw, 43px);
  font-weight: 900; font-style: italic; line-height: 1.13; letter-spacing: -.035em;
  white-space: pre-wrap; overflow-wrap: anywhere;
}
.card-flames-image {
  position: absolute; z-index: 4; left: 0; bottom: -1px; display: block;
  width: 100%; height: auto; pointer-events: none;
}
@supports (container-type: inline-size) { .roast-card { container-type: inline-size; } }
@media (max-width: 600px) {
  .roast-result { width: min(96%, 500px); margin-top: 22px; }
  .roast-card { aspect-ratio: 1 / 1; }
  .roast-card-panel { inset: 0 0 0 44%; padding: 2.5% 2.5% 19%; }
  .roast-card-kicker { margin-bottom: 6%; }
}

/* Finished card delivery actions */
.roast-result { width: min(86%, 590px); margin: 30px auto 46px; }
.roast-card-output { width: 100%; }
#resultImage { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; background: #000; }
.card-actions {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch; gap: 10px; width: 100%; margin: 16px auto 0;
}
.download-card-button, .share-card-button, .try-again-button {
  display: flex; align-items: center; justify-content: center;
  min-width: 0; min-height: 46px; margin: 0; padding: 10px 8px;
  border: 0; border-radius: 999px; color: #fff;
  font: 900 13px Arial, Helvetica, sans-serif; letter-spacing: .025em;
  text-align: center; white-space: nowrap; cursor: pointer;
  transition: filter .15s ease, transform .15s ease;
}
.download-card-button, .share-card-button { background: #f0440b; }
.try-again-button { background: #343b49; }
.download-card-button:hover, .share-card-button:hover, .try-again-button:hover { filter: brightness(1.1); }
.download-card-button:active, .share-card-button:active, .try-again-button:active { transform: scale(.97); }
@media (max-width: 600px) {
  .roast-result { width: min(92%, 590px); }
  .card-actions { gap: 7px; margin-top: 12px; }
  .download-card-button, .share-card-button, .try-again-button {
    min-height: 42px; padding: 8px 4px; font-size: 11px; letter-spacing: 0;
  }
}
body.revealed { overflow:hidden; background:#faf6f2; }
body.revealed .page { display:none !important; }
body.revealed .roast-result {
  position:fixed; z-index:2; top:3dvh; bottom:3dvh; left:50%; transform:translateX(-50%);
  width:min(86vw, 590px, calc(100dvh - 190px)); max-height:94dvh;
  margin:0; overflow-x:hidden; overflow-y:auto; padding-bottom:8px;
}
body.revealed #resultImage { width:100%; height:auto; aspect-ratio:1/1; }
body.revealed .card-actions { margin-top:12px; gap:9px; }
@media (max-height:700px) {
  body.revealed .roast-result { top:2dvh; bottom:2dvh; width:min(82vw, 590px, calc(100dvh - 170px)); }
  body.revealed .card-actions { margin-top:8px; gap:7px; }
}
/* Premium full-screen fire wall: layered SVG artwork, animated only with CSS. */
.fire-reveal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  overflow: hidden;
  pointer-events: none;
  background: transparent;
  isolation: isolate;
}
.fire-wall-art {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.wall-flames {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  filter: drop-shadow(0 -8px 26px rgba(255, 82, 0, .22));
}
.fire-reveal.play .fire-wall-art {
  animation: fire-wall-sweep 2.4s cubic-bezier(.72, 0, .22, 1) both;
}
.fire-reveal.play .outer-wall {
  animation: outer-fire-pulse .42s ease-in-out infinite alternate;
  transform-box: fill-box;
  transform-origin: 50% 100%;
}
.fire-reveal.play .orange-wall {
  animation: orange-fire-pulse .34s ease-in-out infinite alternate-reverse;
  transform-box: fill-box;
  transform-origin: 50% 100%;
}
.fire-reveal.play .gold-wall {
  animation: gold-fire-pulse .29s ease-in-out infinite alternate;
  transform-box: fill-box;
  transform-origin: 50% 100%;
}
.fire-reveal.play .core {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  animation: core-fire-dance .38s ease-in-out infinite alternate;
}
.fire-reveal.play .c2, .fire-reveal.play .c6 { animation-delay: -.17s; }
.fire-reveal.play .c3, .fire-reveal.play .c8 { animation-delay: -.29s; }
.fire-reveal.play .c4, .fire-reveal.play .c9 { animation-delay: -.09s; }
.fire-reveal.play .hot-ribbon {
  animation: hot-fire-flicker .24s ease-in-out infinite alternate;
}
@keyframes fire-wall-sweep {
  0% { transform: translate3d(0, 102%, 0); opacity: 0; }
  9% { opacity: 1; }
  47% { transform: translate3d(0, 0, 0); opacity: 1; }
  70% { transform: translate3d(0, 0, 0); opacity: 1; }
  100% { transform: translate3d(0, 102%, 0); opacity: 0; }
}
@keyframes outer-fire-pulse {
  from { transform: scaleX(.995) skewX(-.15deg); }
  to { transform: scaleX(1.008) skewX(.2deg); }
}
@keyframes orange-fire-pulse {
  from { transform: scaleX(1.008) scaleY(.992); }
  to { transform: scaleX(.994) scaleY(1.012); }
}
@keyframes gold-fire-pulse {
  from { transform: scaleX(.99) scaleY(.985); }
  to { transform: scaleX(1.012) scaleY(1.018); }
}
@keyframes core-fire-dance {
  from { transform: translateY(5px) scaleX(.96); opacity: .82; }
  to { transform: translateY(-12px) scaleX(1.04); opacity: 1; }
}
@keyframes hot-fire-flicker {
  from { opacity: .68; }
  to { opacity: 1; }
}
body.revealed { overflow:hidden; background:#faf6f2; }
body.revealed .page { display:none !important; }
body.revealed .roast-result {
  position:fixed; z-index:2; top:3dvh; bottom:3dvh; left:50%; transform:translateX(-50%);
  width:min(86vw, 590px, calc(100dvh - 250px)); max-height:94dvh;
  margin:0; overflow-x:hidden; overflow-y:auto; padding-bottom:8px;
}
body.revealed #resultImage { width:100%; height:auto; aspect-ratio:1/1; }
body.revealed .card-actions { margin-top:12px; gap:9px; }
body.revealed .social-share-menu { margin-top:10px; gap:8px; }
body.revealed .social-share-icon { flex-basis:38px; width:38px; height:38px; padding:6px; }
body.revealed .try-again-button { min-height:36px; margin-top:8px; }
@media (max-height:700px) {
  body.revealed .roast-result { top:2dvh; bottom:2dvh; width:min(82vw, 590px, calc(100dvh - 220px)); }
  body.revealed .card-actions { margin-top:8px; gap:7px; }
  body.revealed .social-share-menu { margin-top:7px; }
  body.revealed .try-again-button { margin-top:7px; min-height:32px; }
}
@media (prefers-reduced-motion: reduce) {
  .fire-reveal.play .fire-wall-art { animation-duration: .01ms; }
  .fire-reveal.play .outer-wall,
  .fire-reveal.play .orange-wall,
  .fire-reveal.play .gold-wall,
  .fire-reveal.play .core,
  .fire-reveal.play .hot-ribbon { animation: none; }
}


/* Keep generation feedback visible in both languages so Spanish errors are not silent. */

/* Legal pages and discreet site footer */
.site-footer {
  display:flex; align-items:center; justify-content:center; flex-wrap:wrap; gap:10px;
  width:100%; padding:18px 16px 22px; color:#776e67;
  font: 500 11px/1.5 Arial, Helvetica, sans-serif; letter-spacing:.02em;
}
.site-footer a { color:#776e67; text-decoration:none; }
.site-footer a:hover { color:#f0440b; text-decoration:underline; }
.page + .site-footer { margin-top:auto; }
.legal-page { min-height:100vh; background:var(--cream); color:#211d1a; }
.legal-header { width:min(100% - 40px, 900px); margin:0 auto; padding:22px 0 14px;
  display:flex; align-items:center; justify-content:space-between; gap:16px; }
.legal-brand { color:#b47c54; text-decoration:none; font:900 clamp(17px, 3vw, 23px)/1 Arial, Helvetica, sans-serif;
  letter-spacing:.015em; }
.legal-content { width:min(100% - 40px, 760px); margin:24px auto 12px; padding:0 0 28px; }
.legal-eyebrow { margin:0 0 8px; color:#f0440b; font-size:10px; font-weight:900; letter-spacing:.16em; }
.legal-content h1 { margin:0 0 8px; color:#171310; font-size:clamp(30px, 5vw, 42px); line-height:1.08; letter-spacing:-.035em; }
.legal-updated { margin:0 0 26px !important; color:#8a7e74; font-size:12px !important; }
.legal-content h2 { margin:27px 0 9px; color:#211d1a; font-size:18px; line-height:1.25; letter-spacing:-.015em; }
.legal-content p, .legal-content li { color:#514941; font-size:14px; line-height:1.75; }
.legal-content p { margin:0 0 13px; }
.legal-content ul { margin:0 0 14px; padding-left:22px; }
.legal-content li { padding-left:3px; margin:4px 0; }
.legal-content a { color:#d94312; text-decoration:underline; text-underline-offset:2px; }
.legal-contact { margin-top:8px !important; padding:15px 17px; border-left:3px solid #f0440b; background:rgba(240,68,11,.055); }
.legal-footer { margin:8px auto 0; padding-bottom:28px; }
@media (max-width:600px) {
  .legal-header { width:calc(100% - 32px); padding-top:17px; }
  .legal-content { width:calc(100% - 36px); margin-top:20px; }
  .legal-content p, .legal-content li { font-size:13px; line-height:1.7; }
  .legal-content h2 { font-size:17px; margin-top:24px; }
}

/* SVG-traced frame animation recreated from the supplied cartoon fire reference. */
.fire-reveal { background:transparent; }
.fire-reveal .fire-wall-art { width:100%; height:100%; object-fit:fill; }

/* The inline vector animation is driven by the existing .play trigger. */
.fire-reveal .fire-wall-art { position:absolute; inset:0; display:block; width:100%; height:100%; overflow:hidden; }


/* Reference-matched cartoon flame wall: pure layered SVG + CSS motion. */
.fire-reveal { position:fixed; inset:0; z-index:9999; overflow:hidden; pointer-events:none; background:transparent; }
.fire-reveal .fire-wall-art { position:absolute; inset:0; display:block; width:100%; height:100%; overflow:hidden; }
.fire-reveal .fire-wall-art { transform:translateY(100%); }
.wall-flames { transform-box:fill-box; transform-origin:50% 100%; transform:scaleY(1.26); opacity:1; }
.fire-reveal.play .fire-wall-art { animation: wall-reveal 2.4s cubic-bezier(.2,.75,.25,1) forwards; }
.moving-tongues .tongue { transform-box:fill-box; transform-origin:50% 100%; }
.fire-reveal.play .t1 { animation: tongue-a .43s ease-in-out infinite alternate; }
.fire-reveal.play .t2 { animation: tongue-b .57s ease-in-out infinite alternate-reverse; }
.fire-reveal.play .t3 { animation: tongue-c .49s ease-in-out infinite alternate; }
.fire-reveal.play .t4 { animation: tongue-b .61s ease-in-out infinite alternate-reverse; }
.fire-reveal.play .t5 { animation: tongue-a .52s ease-in-out infinite alternate-reverse; }
.fire-reveal.play .t6 { animation: tongue-c .46s ease-in-out infinite alternate; }
.fire-reveal.play .t7 { animation: tongue-b .55s ease-in-out infinite alternate; }
.fire-reveal.play .t8 { animation: tongue-a .63s ease-in-out infinite alternate-reverse; }
.fire-reveal.play .t9 { animation: tongue-c .51s ease-in-out infinite alternate-reverse; }
.fire-reveal.play .t10 { animation: tongue-b .59s ease-in-out infinite alternate; }
.fire-reveal.play .t11 { animation: tongue-a .47s ease-in-out infinite alternate; }
.fire-reveal.play .t12 { animation: tongue-c .56s ease-in-out infinite alternate-reverse; }
.inner-flickers .flicker { transform-box:fill-box; transform-origin:50% 100%; animation: core-flicker .22s ease-in-out infinite alternate; }
.inner-flickers .f2n { animation-delay:-.08s; }
@keyframes wall-reveal { 0% { transform:translateY(100%); opacity:1; } 20%,68% { transform:translateY(0); opacity:1; } 100% { transform:translateY(100%); opacity:1; } }
@keyframes tongue-a { to { transform:translate(2px,-9px) rotate(3deg) scaleY(1.13); } }
@keyframes tongue-b { to { transform:translate(-2px,-13px) rotate(-4deg) scaleY(.88); } }
@keyframes tongue-c { to { transform:translate(1px,-7px) rotate(2deg) scaleY(1.18); } }
@keyframes core-flicker { to { opacity:.42; transform:scaleY(.72) translateY(2px); } }
@media (prefers-reduced-motion:reduce) { .fire-reveal.play .fire-wall-art,.fire-reveal.play .tongue,.fire-reveal.play .flicker { animation-duration:.01ms; } }


/* PayPal checkout and credit status */
.billing-area { width: min(100%, 340px); margin: 25px auto 10px; padding-top: 5px; text-align: center; }
.credit-status { margin: 0 0 10px; font-size: 13px; line-height: 1.4; color: #7b6049; }
.paypal-button-container { width: 100%; min-height: 44px; }
.paypal-button-container[hidden], .billing-area[hidden] { display: none !important; }


/* Top-left HOW IT WORKS link: compact outline button matching the upload control. */
.how-it-works-link {
  position: absolute;
  z-index: 3;
  top: 14px;
  left: 16px;
  min-height: 30px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--black);
  border-radius: 60px;
  background: transparent;
  color: var(--black);
  font: 800 10px/1 Arial, Helvetica, sans-serif;
  letter-spacing: .1px;
  text-decoration: none;
  white-space: nowrap;
}
.how-it-works-link:hover,
.info-back-button:hover {
  background: var(--black);
  color: #fff;
}

/* Dedicated How It Works pages; intentionally no language selector. */
.info-page {
  min-height: 100vh;
  background: var(--cream);
  color: var(--black);
}
.info-content {
  width: min(100% - 36px, 760px);
  margin: 0 auto;
  padding: 54px 0 24px;
}
.info-eyebrow {
  margin: 0 0 8px;
  color: var(--orange);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .16em;
  text-align: center;
}
.info-content > h1 {
  margin: 0 0 30px;
  color: #111;
  font-family: "Arial Black", Arial, Helvetica, sans-serif;
  font-size: clamp(30px, 7vw, 46px);
  font-weight: 900;
  line-height: 1.05;
  text-align: center;
}
.steps-section {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.step-item {
  min-width: 0;
  padding: 20px 18px;
  border-radius: 18px;
  background: #f3eade;
}
.step-number {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  border-radius: 50%;
  background: var(--orange);
  color: #fff;
  font-size: 14px;
  font-weight: 900;
}
.step-item h2 {
  margin: 0 0 7px;
  color: #171310;
  font-size: 19px;
  line-height: 1.2;
}
.step-item p {
  margin: 0;
  color: #514941;
  font-size: 14px;
  line-height: 1.55;
}
.faq-section { margin-top: 34px; }
.faq-section > h2 {
  margin: 0 0 15px;
  color: #171310;
  font-family: "Arial Black", Arial, Helvetica, sans-serif;
  font-size: clamp(20px, 5vw, 28px);
  line-height: 1.15;
  text-align: center;
}
.faq-item {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: 16px;
  align-items: center;
  padding: 15px 0;
  border-bottom: 1px solid #e5d9cb;
}
.faq-item h3 {
  margin: 0;
  color: #171310;
  font-size: 15px;
  line-height: 1.35;
}
.faq-item p {
  margin: 0;
  color: #514941;
  font-size: 14px;
  line-height: 1.55;
}
.info-back-button {
  width: fit-content;
  min-width: 112px;
  min-height: 42px;
  margin: 28px auto 0;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--black);
  border-radius: 60px;
  background: transparent;
  color: var(--black);
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}
.info-page .site-footer { margin-top: 0; }
@media (max-width: 600px) {
  .how-it-works-link { top: 8px; left: 8px; min-height: 27px; padding: 0 7px; font-size: 9px; }
  .info-content { width: calc(100% - 32px); padding-top: 44px; }
  .steps-section { grid-template-columns: 1fr; gap: 10px; }
  .step-item { padding: 17px 16px; }
  .step-item h2 { font-size: 17px; }
  .step-item p, .faq-item p { font-size: 13px; }
  .faq-item { grid-template-columns: 1fr; gap: 5px; padding: 13px 0; }
  .faq-item h3 { font-size: 14px; }
}


/* Right-to-left roast photo gallery */
.roast-gallery {
  width: min(100%, 1040px);
  margin: 26px auto 28px;
  overflow: hidden;
}
.roast-gallery-heading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin: 0 0 20px;
  color: #000;
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(32px, 5vw, 42px);
  font-style: italic;
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -.055em;
  text-align: center;
}
.roast-gallery-heading::after {
  content: "";
  display: block;
  width: 86px;
  height: 7px;
  border-radius: 99px;
  background: var(--orange);
}
.roast-gallery-window {
  width: 100%;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 1%, #000 99%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, #000 1%, #000 99%, transparent 100%);
}
.roast-gallery-track {
  display: flex;
  width: max-content;
  align-items: center;
  gap: 14px;
  animation: roast-gallery-scroll 38s linear infinite;
}
.roast-gallery-track img {
  display: block;
  width: clamp(190px, 23vw, 230px);
  height: clamp(190px, 23vw, 230px);
  flex: 0 0 auto;
  object-fit: contain;
  object-position: center;
  background: #050505;
  border-radius: 14px;
  box-shadow: 0 5px 18px rgba(0, 0, 0, .14);
}
.roast-gallery-window:hover .roast-gallery-track,
.roast-gallery-window:focus-within .roast-gallery-track {
  animation-play-state: paused;
}
@keyframes roast-gallery-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(calc(-50% - 7px)); }
}
@media (prefers-reduced-motion: reduce) {
  .roast-gallery-track { animation: none; }
  .roast-gallery-window { overflow-x: auto; }
}
@media (max-width: 600px) {
  .roast-gallery { width: 100%; margin: 20px auto 24px; }
  .roast-gallery-heading { font-size: clamp(29px, 7vw, 36px); margin-bottom: 18px; }
  .roast-gallery-track { gap: 10px; }
  .roast-gallery-track img { width: 200px; height: 200px; }
}


/* Purchased Firewall reveal video */
.fire-reveal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  overflow: hidden;
  pointer-events: none;
  background: transparent;
}
.fire-wall-video {
  position: absolute;
  top: -4vh;
  left: 0;
  display: block;
  width: 100%;
  height: 108vh;
  object-fit: cover;
  object-position: center center;
  background: transparent;
}


/* After successful payment, remove checkout spacing and lift GET ROASTED slightly. */
.controls.has-paid-credit .roast-button {
  margin-top: 25px;
  transform: translateY(-5px);
}


/* Final roast delivery action layout */
body.revealed .roast-card-output {
  width: 100%;
}
body.revealed .card-actions {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
  margin: 18px 0 0;
  align-items: stretch;
}
body.revealed .card-actions > button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
  min-height: 54px;
  margin: 0;
  padding: 10px 8px;
  border: 0;
  border-radius: 15px;
  color: #fff;
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(11px, 2.4vw, 14px);
  font-weight: 800;
  letter-spacing: .035em;
  line-height: 1.1;
  white-space: nowrap;
  box-shadow: 0 4px 0 rgba(0,0,0,.12);
  transition: transform .15s ease, filter .15s ease, box-shadow .15s ease;
}
body.revealed .download-card-button,
body.revealed .share-card-button {
  background: #f0440b;
}
body.revealed .try-again-button {
  background: #303846;
}
body.revealed .card-actions > button:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 rgba(0,0,0,.12);
}
@media (max-width: 600px) {
  body.revealed .card-actions {
    gap: 8px;
    margin-top: 14px;
  }
  body.revealed .card-actions > button {
    min-height: 50px;
    padding: 8px 4px;
    border-radius: 13px;
    font-size: 11px;
    letter-spacing: 0;
  }
}


/* Premium vertical roast delivery buttons */
body.revealed .card-actions {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 12px !important;
  width: min(100%, 380px) !important;
  margin: 20px auto 0 !important;
}
body.revealed .card-actions > button {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 56px !important;
  margin: 0 !important;
  padding: 14px 20px !important;
  border: 1px solid transparent !important;
  border-radius: 16px !important;
  color: #fff !important;
  font-family: Arial, Helvetica, sans-serif !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  letter-spacing: .075em !important;
  line-height: 1 !important;
  text-align: center !important;
  white-space: nowrap !important;
  box-shadow: 0 5px 12px rgba(35, 22, 14, .13), inset 0 1px 0 rgba(255,255,255,.16) !important;
  transition: transform .16s ease, filter .16s ease, box-shadow .16s ease !important;
}
body.revealed .download-card-button {
  background: linear-gradient(180deg, #ff5a1f 0%, #e9430b 100%) !important;
}
body.revealed .share-card-button {
  background: #171717 !important;
  border-color: #f0440b !important;
}
body.revealed .try-again-button {
  background: #343b49 !important;
}
body.revealed .card-actions > button:hover {
  filter: brightness(1.06) !important;
  box-shadow: 0 7px 16px rgba(35, 22, 14, .18), inset 0 1px 0 rgba(255,255,255,.16) !important;
}
body.revealed .card-actions > button:active {
  transform: translateY(2px) !important;
  box-shadow: 0 2px 6px rgba(35, 22, 14, .14) !important;
}
@media (max-width: 600px) {
  body.revealed .card-actions {
    width: min(100%, 380px) !important;
    gap: 10px !important;
    margin-top: 16px !important;
  }
  body.revealed .card-actions > button {
    min-height: 52px !important;
    border-radius: 15px !important;
    font-size: 13px !important;
  }
}
