/* The counter, cast and cup share the coordinates of the approved 9:16 artwork. */
.mg-dialog[data-game="cafe"] {
  --cafe-ink: #37242b;
  --cafe-paper: #fff0d7;
  --cafe-trim: #d6a773;
  --cafe-brown: #764332;
}
.cafe-select, .cafe-board { display: grid; gap: 8px; }
.cafe-board { grid-template-rows: 38px minmax(150px, 1fr) 24px 316px; }
.cafe-rail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 0 9px;
  border-block-end: 1px solid var(--cafe-trim);
  border-radius: 9px;
  background: #3b292f;
}
.cafe-history, .cafe-waiting, .cafe-ticket-list {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}
.cafe-history { gap: 8px; }
.cafe-ticket-list { margin: 0; padding: 0; list-style: none; }
.cafe-waiting { justify-content: flex-end; }
.cafe-current { justify-content: center; }
.cafe-ticket { flex: none; }
.cafe-queued .cafe-ticket { animation: cafe-ticket-enter .24s ease-out both; }
.cafe-tally {
  --ticket-color: #305a36;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--cafe-paper);
  font: 800 12px/1 system-ui;
}
.cafe-tally[data-status="missed"] { --ticket-color: #953340; }
.cafe-tally i {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 3px;
  color: var(--ticket-color);
  background: #f3dfc3;
  font-style: normal;
}
.cafe-tally[data-stacked="true"] i { box-shadow: -2px 2px #b69579, -4px 4px #78594d; }
@keyframes cafe-ticket-enter { from { translate: 12px 0; opacity: 0; } }
.cafe-ticket-paper {
  position: relative;
  display: grid;
  place-items: center;
  width: 23px;
  height: 25px;
  padding-bottom: 5px;
  background: #b99b88;
  color: #312128;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 88% 88%, 75% 100%, 63% 88%, 50% 100%,
    37% 88%, 25% 100%, 12% 88%, 0 100%);
  font: 800 12px/1 system-ui;
}
.cafe-ticket[data-status="active"] .cafe-ticket-paper {
  width: 35px;
  height: 33px;
  padding-bottom: 6px;
  background: #fff0cf;
  font-size: 15px;
}
.cafe-ticket-meter {
  position: absolute;
  inset: auto 3px 4px;
  height: 4px;
  overflow: hidden;
  border-radius: 3px;
  background: #e4c7a8;
}
.cafe-ticket[data-status="active"] .cafe-ticket-meter { bottom: 6px; }
.cafe-ticket-meter i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #517147;
  transform: scaleX(var(--cafe-patience, 1));
  transform-origin: left center;
  transition: transform .22s linear, background .15s linear;
}
.cafe-ticket[data-mood="waiting"] .cafe-ticket-meter i { background: #a06c27; }
.cafe-ticket[data-mood="impatient"] .cafe-ticket-meter i { background: #b34649; }
.cafe-remaining {
  flex: none;
  color: var(--cafe-paper);
  white-space: nowrap;
  font: 800 12px/1 var(--f-ja);
  font-variant-numeric: tabular-nums;
}
.cafe-stage {
  position: relative;
  isolation: isolate;
  container-type: inline-size;
  overflow: hidden;
  aspect-ratio: 1.32;
  border: 1px solid var(--mg-key-line);
  border-radius: var(--r-card);
  background: #703f40;
}
.cafe-scene, .cafe-counter {
  background: var(--cafe-art) center / 100% 100% no-repeat;
}
.cafe-scene {
  position: absolute;
  width: 100%;
  aspect-ratio: 9 / 16;
  transform: translateY(-20%);
}
.cafe-board .cafe-stage { aspect-ratio: auto; }
.cafe-board .cafe-scene { top: min(0px, calc(76% - 100.8cqw)); transform: none; }
.cafe-counter {
  position: absolute;
  inset: 0;
  clip-path: inset(56.7% 0 0);
  pointer-events: none;
}
.cafe-doki {
  position: absolute;
  top: 56.7%;
  left: 52%;
  width: clamp(118px, 37vw, 140px);
  transform: translate(-50%, -72%);
}
.cafe-doki .mg-doki:not([hidden]),
.cafe-doki .mg-mirror { display: block; width: 100%; height: auto; }
.cafe-ear, .cafe-steam { display: none; }
.cafe-board[data-listening="true"] .cafe-ear {
  display: block;
  position: absolute;
  top: 13%;
  right: 2%;
  width: 30px;
  height: 30px;
  filter: drop-shadow(0 1px 2px #43232f80);
}
.cafe-board[data-listening="true"] .cafe-stage::after {
  content: ''; position: absolute; inset: 0; background: #29152117; pointer-events: none;
}
.cafe-board[data-world="focus"] .cafe-steam {
  display: block;
  position: absolute;
  top: 29%;
  right: 5%;
  width: 16px;
  height: 24px;
  border-radius: 50%;
  border-left: 3px solid #fff4d0;
  filter: blur(.6px);
  box-shadow: 9px 0 #ffecc88c;
  animation: cafe-steam .8s ease-out infinite;
}
.cafe-greeting, .cafe-outcome, .cafe-streak {
  position: absolute;
  margin: 0;
  border: 1px solid var(--cafe-trim);
  background: var(--cafe-paper);
  color: var(--cafe-ink);
  font: 800 12px/1.35 var(--f-ja);
  box-shadow: 0 2px 7px #41272a50;
}
.cafe-greeting, .cafe-outcome {
  top: 13%;
  left: 54%;
  padding: 7px 12px;
  border-radius: 12px 12px 12px 3px;
  transform: translateX(-50%);
  white-space: nowrap;
}
.cafe-outcome {
  font-size: 16px;
  padding: 9px 15px;
  max-width: 95%;
}
.cafe-streak {
  top: 30%;
  right: 8px;
  padding: 3px 7px;
  border-radius: var(--r-pill);
}
.cafe-urgency {
  display: none;
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  border: 2px solid #f67872;
}
.cafe-board.is-urgent .cafe-urgency { display: block; animation: cafe-pulse .8s ease-in-out infinite alternate; }
.cafe-queue {
  position: absolute;
  top: 59.7%;
  left: 5%;
  display: flex;
  gap: 2px;
}
.cafe-queue > i {
  width: clamp(13px, 4vw, 18px);
  height: 29px;
  background: #402b35;
  clip-path: path("M7 0a5 5 0 0 1 2 10v2q7 1 7 12v5H0v-5q0-11 6-12v-2A5 5 0 0 1 7 0Z");
}
.cafe-queue > i:nth-child(2) { opacity: .72; }
.cafe-board[data-world="fluster"] .cafe-queue > i { animation: cafe-queue-hop .5s ease-in-out infinite alternate; }
.cafe-board[data-world="fluster"] .cafe-queue > i:nth-child(2) { animation-delay: -.25s; }
.cafe-guest {
  position: absolute;
  top: 48.7%;
  left: 23%;
  width: clamp(79px, 25vw, 103px);
  height: clamp(96px, 29vw, 122px);
  transform: translateX(-50%);
}
.cafe-guest.is-empty { visibility: hidden; }
.cafe-portrait-slot { position: absolute; inset: 0; }
.cafe-portrait-slot .cast-portrait {
  display: block;
  height: 100%;
  border-radius: 0;
  clip-path: ellipse(48% 57% at 50% 59%);
  background: radial-gradient(ellipse at 50% 40%, #ffe1b4 22%, #c7916e 71%, #8f5546);
  isolation: isolate;
}
.cafe-portrait-slot .cast-portrait img {
  filter: saturate(.82) sepia(.14);
  mask-image: radial-gradient(ellipse 60% 65% at 50% 44%, #000 66%, transparent 100%);
}
.cafe-portrait-slot .cast-portrait img:not([style]) {
  object-position: center top;
  height: 124%;
  filter: saturate(.75) sepia(.22) contrast(.94);
  mix-blend-mode: multiply;
  mask-image: radial-gradient(ellipse 52% 68% at 50% 47%, #000 59%, transparent 97%);
}
.cafe-face-bubble, .cafe-patience {
  position: absolute;
  background: var(--cafe-paper);
  border: 1px solid var(--cafe-trim);
  box-shadow: 0 2px 5px #41272a5e;
}
.cafe-face-bubble {
  bottom: 98%;
  left: 48%;
  display: grid;
  place-items: center;
  width: 34px;
  height: 33px;
  border-radius: 48% 48% 48% 13%;
}
.cafe-face { width: 29px; height: 29px; }
.cafe-face [data-face] { display: none; }
.cafe-guest[data-mood="calm"] [data-face="calm"],
.cafe-guest[data-mood="waiting"] [data-face="waiting"],
.cafe-guest[data-mood="impatient"] [data-face="impatient"],
.cafe-guest[data-mood="heart"] [data-face="heart"] { display: inline; }
.cafe-board[data-world="focus"] .cafe-stage:not([data-action]) .cafe-face [data-face] { display: none; }
.cafe-board[data-world="focus"] .cafe-stage:not([data-action]) .cafe-face [data-face="heart"] { display: inline; }
.cafe-patience {
  display: flex;
  align-items: center;
  top: calc(100% - 38px);
  left: 12%;
  width: 76%;
  height: 15px;
  padding: 3px 5px;
  border: 0;
  clip-path: polygon(0 0,4% 15%,8% 0,92% 0,96% 15%,100% 0,100% 100%,96% 85%,92% 100%,8% 100%,4% 85%,0 100%);
}
.cafe-patience > i {
  display: block;
  height: 100%;
  width: 100%;
  border-radius: 2px;
  background: #517147;
  transform-origin: left center;
  transition: transform .22s linear, background .15s linear;
}
.cafe-guest[data-mood="waiting"] .cafe-patience > i { background: #a06c27; }
.cafe-guest[data-mood="impatient"] .cafe-patience > i { background: #b34649; }
.cafe-board[data-exchange="leave"] .cafe-guest {
  animation: cafe-leave var(--cafe-exchange-time) ease-in both;
}
.cafe-board[data-exchange="card-down"] .cafe-stage:is([data-action="served"], [data-action="left"]) :is(.cafe-guest, .cafe-cups) {
  visibility: hidden;
}
.cafe-board[data-exchange="enter"] .cafe-guest {
  animation: cafe-enter var(--cafe-exchange-time) ease-out both;
}
.cafe-board[data-exchange="reaction"] .cafe-stage:is([data-action="left"], [data-action="retry"]) .cafe-portrait-slot {
  animation: cafe-head-shake .33s ease-in-out;
}
.cafe-board[data-exchange="reaction"] .cafe-stage[data-action="served"] .cafe-face-bubble {
  animation: cafe-heart .5s cubic-bezier(.18,.7,.26,1) both;
}
.cafe-next-guest, .cafe-finale-sign {
  position: absolute;
  z-index: 3;
  inset: auto auto 10px 50%;
  width: max-content;
  margin: 0;
  max-width: calc(100% - 20px);
  padding: 8px 16px;
  border: 2px solid #ad7353;
  border-radius: 7px;
  background: #fff0cf;
  color: #46291e;
  box-shadow: 0 3px 6px #41272a77;
  font: 800 16px/1.25 var(--f-ja);
  white-space: nowrap;
  transform: translateX(-50%);
}
.cafe-next-guest { animation: cafe-banner-in .16s ease-out both; }
.cafe-finale-sign {
  inset: 12% auto auto 50%;
  padding: 11px 16px;
  font-size: clamp(16px, 5vw, 24px);
}
.cafe-board:has(.cafe-stage[data-finale]) {
  grid-template-rows: 40px minmax(120px, 1fr);
}
.cafe-board:has(.cafe-stage[data-finale]) :is(.cafe-order, .cafe-form-slot) { display: none; }
.cafe-board .cafe-stage[data-finale] {
  container-type: size;
  --cafe-finale-art-height: max(134cqh, calc(100cqw * 16 / 9));
  --cafe-finale-counter: calc(var(--cafe-finale-art-height) * .567);
  --cafe-finale-doki-width: clamp(166px, 52cqw, 228px);
}
.cafe-board .cafe-stage[data-finale] .cafe-scene {
  inset: 0;
  height: 100%;
  aspect-ratio: auto;
}
.cafe-stage[data-finale] :is(.cafe-scene, .cafe-counter) {
  background-size: auto var(--cafe-finale-art-height);
  background-position: center top;
}
.cafe-stage[data-finale] .cafe-counter { clip-path: inset(var(--cafe-finale-counter) 0 0); }
.cafe-stage[data-finale] .cafe-doki { top: var(--cafe-finale-counter); width: var(--cafe-finale-doki-width); }
.cafe-stage[data-finale] :is(.cafe-mirror, .cafe-ear, .cafe-steam) { display: none; }
.cafe-stage[data-finale="empty"] .cafe-finale-sign {
  inset-block: max(8%, calc(var(--cafe-finale-counter) - var(--cafe-finale-doki-width) * .88)) auto;
  left: 52%;
  border-end-start-radius: 3px;
  font-size: clamp(14px, 4.5vw, 18px);
}
.cafe-stage[data-finale="empty"] .cafe-finale-sign::after {
  content: ''; position: absolute; inset: 100% auto auto 50%;
  border: 7px solid transparent; border-top-color: #ad7353;
}
.cafe-stage[data-finale="sold-out"] .cafe-finale-sign {
  border-color: #965822;
  background: #ffe8a0;
  animation: cafe-sign-drop .52s cubic-bezier(.2,.7,.28,1.23) both;
}
.cafe-stage[data-finale] :is(.cafe-greeting, .cafe-streak, .cafe-urgency) { visibility: hidden; }
.cafe-finale-coins { position: absolute; z-index: 2; inset: 0; pointer-events: none; }
.cafe-finale-coins i {
  position: absolute;
  top: 0;
  left: var(--coin-x);
  width: 16px;
  height: 16px;
  border: 2px solid #a56022;
  border-radius: 50%;
  background: #ffe27b;
  box-shadow: inset 0 0 0 2px #f5b745;
  animation: cafe-coin-fall .92s var(--coin-delay) ease-in both;
}
.cafe-cups {
  --cafe-cup-scale: 1;
  --cafe-slide: 31cqw;
  --cafe-pour: #935435;
  position: absolute;
  top: 60.5%;
  left: 57%;
  display: flex;
  transform: translate(-50%, -100%);
  pointer-events: none;
  z-index: 1;
}
.cafe-cup {
  display: block;
  flex: none;
  width: clamp(53px, 17vw, 76px);
  height: auto;
  transform: scale(var(--cafe-cup-scale));
  transform-origin: 50% 92%;
  transition: transform .2s cubic-bezier(.2,.75,.4,1.2);
}
.cafe-cup + .cafe-cup { margin-left: -19px; }
.cafe-cups[data-size="short"] { --cafe-cup-scale: .85; }
.cafe-cups[data-size="grande"] { --cafe-cup-scale: 1.15; }
.cafe-cups[data-size="venti"] { --cafe-cup-scale: 1.3; }
.cafe-cups[data-size="mega"] { --cafe-cup-scale: 1.5; }
.cafe-cups[data-temperature="ice"] .cafe-mug,
.cafe-cups:not([data-temperature="ice"]) .cafe-glass,
.cafe-cups:not([data-service="to-go"]) .cafe-takeout { display: none; }
.cafe-hot-liquid, .cafe-ice-liquid {
  fill: var(--cafe-pour);
  transform-box: fill-box;
  transform-origin: center bottom;
}
.cafe-cups[data-drink=""] :is(.cafe-hot-liquid, .cafe-ice-liquid),
.cafe-cup :is(.cafe-whip, .cafe-syrup, .cafe-shot, .cafe-latte-art) { display: none; }
.cafe-cups[data-drink="americano"] { --cafe-pour: #693c30; }
.cafe-cups[data-drink="latte"] { --cafe-pour: #c68451; }
.cafe-cups[data-drink="vanilla"] { --cafe-pour: #d19a60; }
.cafe-cups[data-drink="cappuccino"] { --cafe-pour: #ac714d; }
.cafe-cups[data-drink="chocolate"] { --cafe-pour: #85483e; }
.cafe-cups[data-drink="yuja"] { --cafe-pour: #e0a342; }
.cafe-cups:is([data-drink="coldbrew"], [data-drink="espresso"]) { --cafe-pour: #60392b; }
.cafe-cups:is([data-drink="caramel"], [data-drink="flatwhite"], [data-drink="milktea"]) { --cafe-pour: #bb8358; }
.cafe-cups[data-drink="greentea"] { --cafe-pour: #829452; }
.cafe-cups[data-drink="strawberry"] { --cafe-pour: #dc8f98; }
.cafe-cups[data-drink="peachtea"] { --cafe-pour: #da844b; }
.cafe-cup[data-options~="light"] { --cafe-pour: #cc9f76; }
.cafe-cup[data-options~="soy"] { --cafe-pour: #dfbb7f; }
.cafe-cup[data-options~="oat"] { --cafe-pour: #e4c4a1; }
.cafe-cup[data-options~="more-milk"] { --cafe-pour: #e7c49b; }
.cafe-cups[data-drink="chocolate"] .cafe-cup:not([data-options~="no-whip"]) .cafe-whip,
.cafe-cup[data-options~="add-whip"] .cafe-whip,
.cafe-cups:is([data-drink="vanilla"], [data-drink="caramel"]) .cafe-cup:not([data-options~="no-syrup"]) .cafe-syrup,
.cafe-cup:is([data-options~="half-syrup"], [data-options~="add-syrup"]) .cafe-syrup,
.cafe-cup:is([data-options~="shot"], [data-options~="double-shot"]) .cafe-shot,
.cafe-board[data-world="focus"] .cafe-cups:is([data-drink="latte"], [data-drink="cappuccino"]):not([data-temperature="ice"]) .cafe-latte-art { display: inline; }
.cafe-cup[data-options~="half-syrup"] .cafe-syrup { opacity: .55; }
.cafe-cup[data-options~="less-ice"] .cafe-ice rect + rect { visibility: hidden; }
.cafe-cup[data-options~="more-ice"] .cafe-ice { transform: translateY(-2px) scale(1.1); transform-origin: center; transform-box: fill-box; }
.cafe-cups[data-service="to-go"] .cafe-toppings { display: none; }
.cafe-board[data-exchange="reaction"] .cafe-stage[data-action="served"] .cafe-cups {
  animation: cafe-pickup .32s .12s cubic-bezier(.21,.73,.43,1) both;
}
.cafe-board[data-exchange="leave"] .cafe-stage[data-action="served"] .cafe-cups { visibility: hidden; }
.cafe-cups[data-count="2"] { --cafe-slide: 26cqw; }
.cafe-cups[data-count="3"] { --cafe-slide: 20cqw; }
.cafe-order {
  position: relative;
  display: grid;
  align-items: center;
  min-height: 0;
  min-width: 0;
}
.cafe-wave { display: flex; justify-content: center; align-items: center; gap: 4px; height: 24px; }
.cafe-wave i {
  width: 3px;
  height: 14px;
  border-radius: 6px;
  background: var(--mg-key);
  transform: scaleY(.26);
  opacity: .57;
}
.cafe-board[data-listening="true"] .cafe-wave i { animation: cafe-wave .56s ease-in-out infinite alternate; opacity: 1; }
.cafe-wave i:nth-child(3n) { animation-delay: -.39s !important; }
.cafe-wave i:nth-child(3n + 1) { animation-delay: -.19s !important; }
.cafe-fallback {
  position: absolute; z-index: 2; inset: auto 0 0;
  padding: 5px 9px;
  background: var(--surface-2);
  border: 1px solid var(--mg-edge);
  border-radius: 9px;
}
.cafe-fallback small { display: block; color: var(--mg-key); font-size: 12px; }
.cafe-fallback p { margin: 0; color: var(--ivory); font: 700 13px/1.45 var(--f-ko); overflow-wrap: anywhere; }
.cafe-feedback {
  position: absolute;
  z-index: 1;
  right: 4px;
  bottom: calc(100% + 8px);
  padding: 4px 7px;
  border-radius: 6px;
  color: var(--cafe-paper);
  background: #432a30;
  font: 750 12px/1.4 var(--f-ja);
}
.cafe-feedback:empty { display: none; }
.cafe-feedback[data-kind="left"] { background: #762e3a; }
.cafe-tip-multiplier { padding: 1px 5px; border-radius: 6px; background: #ffe1a0; color: #513325; }
.cafe-form-slot { position: relative; overflow: clip; }
.cafe-tip {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--cafe-trim);
  border-radius: var(--r-card);
  background: #fff0d7;
  color: var(--cafe-ink);
  text-align: center;
}
.cafe-tip p { margin: 0; font: 800 16px/1.45 var(--font-ui-title); }
.cafe-tip button { min-height: 44px; }
.cafe-card-rest {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  border: 1px solid #806047;
  border-radius: var(--r-card);
  background: radial-gradient(ellipse at 50% 36%, #7e5145, #43292d 82%);
}
.cafe-card-rest::before {
  content: '';
  width: 74px;
  height: 90px;
  border: 1px solid #c18c65;
  border-radius: 8px;
  background:
    repeating-linear-gradient(to bottom, #9b6249 0 1px, transparent 1px 12px) center / 42px 37px no-repeat,
    linear-gradient(150deg, #e9c7a3, #c28c69);
  box-shadow: 0 4px 12px #3520278a;
  rotate: -5deg;
}
.cafe-card-rest .cafe-dots { gap: 8px; }
.cafe-card-rest .cafe-dots i { width: 8px; height: 8px; border-color: #e6ba95; }
.cafe-form { position: relative; }
.cafe-board:is([data-exchange="banner"], [data-exchange="enter"], [data-exchange="closing"]) .cafe-form { visibility: hidden; }
.cafe-board:not(:is([data-exchange="card-down"], [data-exchange="banner"], [data-exchange="enter"],
  [data-exchange="card-up"], [data-exchange="closing"])) .cafe-card-rest { visibility: hidden; }
.cafe-board[data-exchange="card-down"] .cafe-form {
  animation: cafe-card-down var(--cafe-exchange-time) ease-in both;
}
.cafe-board[data-exchange="card-up"] .cafe-form {
  animation: cafe-card-up var(--cafe-exchange-time) ease-out both;
}
.cafe-form {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--cafe-trim);
  border-radius: var(--r-card);
  background: #f1d5b3;
  color: var(--cafe-ink);
}
.cafe-wizard-head { display: flex; gap: 8px; justify-content: space-between; align-items: center; }
.cafe-wizard-head h3 { margin: 0; font: 800 16px/1.35 var(--font-ui-title); }
.cafe-wizard-head h3:focus { outline: none; }
.cafe-dots { display: flex; gap: 5px; align-items: center; }
.cafe-dots i { width: 7px; height: 7px; border-radius: 50%; border: 1px solid #8f5a4d; }
.cafe-dots [data-progress="done"] { background: #a26c51; }
.cafe-dots [data-progress="current"] { width: 16px; border-radius: 6px; background: #733d3f; }
.cafe-choices {
  display: grid;
  grid-template-columns: repeat(var(--columns), minmax(0, 1fr));
  gap: 5px;
}
.cafe-choices button, .cafe-arrow {
  min-width: 0;
  min-height: 46px;
  padding: 4px 6px;
  background: #fff3df;
  color: var(--cafe-ink);
  border: 1px solid #bd8b72;
  border-radius: 9px;
  font: 750 14px/1.25 var(--f-ja);
  overflow-wrap: anywhere;
  touch-action: manipulation;
}
.cafe-choices button:disabled { background: #e1dbd3; border-color: #9a918b; color: #615752; }
.cafe-choices button:disabled small { color: inherit; }
.cafe-menu-tabs { margin-bottom: 5px; }
.cafe-menu-tabs button { font-size: 12px; padding-inline: 2px; }
.cafe-choices button span[lang="ko"] { display: block; font-family: var(--f-ko); }
.cafe-choices small { display: block; margin-top: 2px; color: #704437; font-size: 12px; font-weight: 650; }
.cafe-choices button[aria-pressed="true"], .cafe-choices button[aria-pressed="mixed"] {
  background: #7c4143;
  border-color: #7c4143;
  color: #fff5e4;
}
.cafe-choices button[aria-pressed="mixed"] { border: 2px dashed #fff5e4; }
.cafe-choices button:is([aria-pressed="true"], [aria-pressed="mixed"]) small { color: #ffe1bc; }
.cafe-scope { margin-bottom: 5px; }
.cafe-scope button { font-size: 12px; padding-inline: 3px; }
.cafe-recipes .cafe-menu-tabs .cafe-choices:has(small) {
  grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(68px, 1fr);
}
.cafe-recipes [data-cafe-group] button { padding-block: 3px; line-height: 1.12; }
.cafe-recipes [data-cafe-group] small { line-height: 1.1; }
.cafe-nav { display: grid; grid-template-columns: 46px minmax(0,1fr); gap: 6px; }
.cafe-nav .cafe-arrow { width: 100%; font-size: 24px; padding-block: 0; }
.cafe-nav .cafe-arrow:disabled { opacity: .55; }
.cafe-nav .cafe-submit { min-height: 46px; background: #793c43; color: #fff1db; }
.cafe-nav .cafe-submit:disabled { opacity: .56; }
.cafe-form button:focus-visible { outline: 2px solid #512b39; outline-offset: 2px; }
@media (max-height: 720px) {
  .cafe-board { grid-template-rows: 34px minmax(104px, 1fr) 18px 280px; gap: 6px; }
  .cafe-form { gap: 4px; padding: 6px; }
  .cafe-form .cafe-choices { gap: 4px; }
  .cafe-form .cafe-choices button, .cafe-form .cafe-arrow, .cafe-form .cafe-submit { min-height: 44px; }
  .cafe-fallback {
    position: absolute;
    z-index: 2;
    inset: auto 0 0;
  }
  .cafe-board[data-exchange] .cafe-fallback { visibility: hidden; }
}
@media (max-height: 640px) {
  .cafe-select > .cafe-stage { height: 218px; aspect-ratio: auto; }
}
.cafe-select-meta, .cafe-milestones {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 5px;
  color: var(--mg-key);
  font: 800 13px/1.35 var(--f-ja);
}
.cafe-select-meta p { margin: 0; color: var(--ivory); }
.cafe-stages, .cafe-results .mg-result-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}
.cafe-stages button {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 2px;
  min-width: 0;
  min-height: 48px;
  padding: 3px;
  border: 1px solid var(--mg-key-line);
  border-radius: 10px;
  background: var(--mg-key-wash);
  color: var(--mg-key);
  font: 800 16px/1 var(--mg-digits);
}
.cafe-stages button[aria-pressed="true"] { border-color: var(--mg-key); background: var(--cafe-paper); color: var(--cafe-brown); }
.cafe-stages button:disabled { opacity: .61; }
.cafe-stages small { font: 700 12px/1 system-ui; }
.cafe-lock {
  display: block;
  width: 8px;
  height: 7px;
  margin-top: 4px;
  background: currentColor;
  border-radius: 2px;
  position: relative;
}
.cafe-lock::before { content: ''; position: absolute; inset: -4px 1px 3px; border: 1px solid currentColor; border-radius: 5px; }
.cafe-select > .mg-primary { background: var(--cafe-paper); color: var(--cafe-ink); }
.cafe-select .mg-reward-summary { text-align: center; }
.cafe-results .mg-stars { justify-self: center; }
.cafe-results .mg-result-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cafe-results .mg-result-stats > div { padding: 8px 3px; }
.cafe-results .mg-result-stats dd { font-size: 18px; }
@media (max-height: 750px) {
  .cafe-results .cafe-stage {
    height: clamp(130px, 24dvh, 175px);
    aspect-ratio: auto;
  }
  .cafe-results:has(.mg-shortening) { gap: 7px; }
  .cafe-results:has(.mg-shortening) .cafe-stage { height: clamp(115px, 19dvh, 145px); }
  .cafe-results .cafe-scene {
    inset: 0;
    height: 100%;
    aspect-ratio: auto;
    transform: none;
  }
  .cafe-results :is(.cafe-scene, .cafe-counter) {
    background-size: cover;
    background-position: center 56.7%;
  }
  .cafe-results .cafe-doki { top: 72%; left: 65%; width: 116px; }
  .cafe-results .cafe-outcome {
    top: 18%;
    left: 30%;
    width: max-content;
    max-width: 49%;
    padding: 6px 9px;
    font-size: 14px;
    white-space: normal;
  }
}
@media (max-height: 640px) {
  .cafe-results, .cafe-results:has(.mg-shortening) { gap: 5px; padding-block-start: 2px; }
  .mg-dialog .cafe-results .mg-result-score { font-size: 32px; }
  .cafe-results .mg-result-stats { margin-block: 2px; }
  .cafe-results .mg-result-stats > div { padding-block: 5px; }
}
.cafe-milestones progress { flex: 1 0 100%; width: 100%; accent-color: var(--mg-key); }
.cafe-apron-badge {
  position: absolute;
  top: 59%;
  left: 48%;
  width: 21px;
  height: 18px;
  color: #4e2a1c;
  background: #ffe08b;
  border: 2px solid #7a4c24;
  border-radius: 35% 35% 45% 45%;
  text-align: center;
  font: 800 12px/14px system-ui;
}
.mg-count-stage .cafe-stage {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
}
.mg-count-stage .cafe-scene {
  left: 50%;
  width: max(100%, calc((100dvh - 54px) * .5625));
  transform: translateX(-50%);
}
[data-game="cafe"] .mg-count-face > .mg-doki { visibility: hidden; }
.mg-paused .cafe-board * { animation-play-state: paused !important; }
@keyframes cafe-pulse { from { opacity: .42; } to { opacity: .95; } }
@keyframes cafe-steam { from { transform: translateY(5px); opacity: .9; } to { transform: translateY(-10px); opacity: .08; } }
@keyframes cafe-queue-hop { to { translate: 0 -4px; } }
@keyframes cafe-wave { to { transform: scaleY(1); } }
@keyframes cafe-head-shake { 32% { rotate: -8deg; } 68% { rotate: 8deg; } }
@keyframes cafe-leave {
  to { transform: translateX(-142%); opacity: 0; }
}
@keyframes cafe-enter { from { transform: translateX(-142%); opacity: 0; } }
@keyframes cafe-heart { 0% { scale: .7; } 40% { scale: 1.17; } 100% { scale: 1; } }
@keyframes cafe-pickup {
  78% { opacity: 1; }
  to { translate: var(--cafe-slide) 0; opacity: 0; }
}
@keyframes cafe-ticket-fold { from { transform: scaleY(1.38); } }
@keyframes cafe-card-down { to { transform: translateY(100%); opacity: 0; } }
@keyframes cafe-card-up { 0%, 22% { transform: translateY(100%); opacity: 0; } }
@keyframes cafe-banner-in { from { translate: 0 7px; } }
@keyframes cafe-sign-drop { from { translate: 0 -220px; } }
@keyframes cafe-coin-fall {
  from { transform: translateY(-22px) rotateY(0); opacity: 0; }
  20%, 75% { opacity: 1; }
  to { transform: translate(var(--coin-drift), min(440px, 64vh)) rotateY(620deg); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .cafe-stage *, .cafe-board :is(.cafe-wave i, .cafe-ticket, .cafe-ticket *, .cafe-form) {
    animation: none !important;
    transition: none !important;
  }
  .cafe-board[data-world="focus"] .cafe-steam { display: none; }
  .cafe-board[data-exchange="card-down"] .cafe-form,
  .cafe-board[data-exchange="leave"] .cafe-guest { visibility: hidden; }
  .cafe-finale-coins { display: none; }
}
