:root {
  --cartoon-ink: #23304d;
  --cartoon-cream: #fff8ef;
  --cartoon-yellow: #ffd54f;
  --cartoon-orange: #ff7a18;
  --cartoon-pink: #ff5fa2;
  --cartoon-blue: #38bdf8;
  --cartoon-green: #45d483;
  --cartoon-shadow: 0 14px 0 rgba(35, 48, 77, .16);
  --cartoon-border: 3px solid var(--cartoon-ink);
  --slot-card-width: 100px;
  --slot-card-gap: 14px;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

body {
  background-color: #dfeaf7;
  background-image:
    linear-gradient(hsla(0, 0%, 100%, .68) 1px, transparent 0),
    linear-gradient(90deg, hsla(0, 0%, 100%, .68) 1px, transparent 0);
  background-position: 50%;
  background-size: 38px 38px;
  color: var(--cartoon-ink);
  font-family: Nunito, "Trebuchet MS", sans-serif;
  margin: 0;
  overflow-x: hidden;
}

button {
  font-family: "Baloo 2", Nunito, sans-serif;
}

.drink-lab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100svh;
  gap: 28px;
  padding: calc(max(18px, env(safe-area-inset-top)) + 12px) clamp(12px, 2.4vw, 24px) max(16px, env(safe-area-inset-bottom));
  position: relative;
}

/* ---------- floating orbs ---------- */
.floating-actions {
  position: fixed;
  top: 16px;
  right: 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  z-index: 30;
}

.corner-orb {
  width: 50px;
  height: 50px;
  border-radius: 999px;
  border: 2px solid hsla(0, 0%, 100%, .92);
  background: linear-gradient(#fff, #fff) padding-box,
    linear-gradient(135deg, #6ec7ff, #ff7ecb) border-box;
  box-shadow: 0 12px 24px #5d729124;
  color: var(--cartoon-ink);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .18s ease, box-shadow .18s ease;
}

.corner-orb:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px #5d72913a;
}

.zodiac-trigger__symbol {
  font-family: "Baloo 2", Nunito, sans-serif;
  font-size: 1.35rem;
  font-weight: 900;
  line-height: 1;
}

.fortune-trigger {
  position: relative;
  color: var(--fortune-accent, #ff7a18);
}

.fortune-trigger__symbol {
  font-size: 1.1rem;
  line-height: 1;
}

.fortune-trigger__badge {
  position: absolute;
  right: -2px;
  bottom: -2px;
  min-width: 18px;
  height: 18px;
  padding: 0 3px;
  border-radius: 999px;
  background: var(--fortune-accent, #ff7a18);
  color: #fff;
  font-size: .62rem;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
}

/* ---------- hero ---------- */
.stage-shell {
  display: grid;
  width: min(100%, 940px);
  gap: 26px;
}

.hero-header {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--cartoon-ink);
}

.hero-header h1 {
  font-family: "Baloo 2", Nunito, sans-serif;
  font-size: clamp(2.1rem, 4vw, 3.2rem);
  letter-spacing: .02em;
  line-height: 1;
  margin: 0;
  font-weight: 800;
}

.hero-header__mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: #ffffffb8;
  border: 2px solid hsla(0, 0%, 100%, .8);
  box-shadow: 0 10px 22px #5d72911a;
  overflow: hidden;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-header__frame {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ---------- slot shell ---------- */
.slot-shell {
  display: grid;
  width: min(100%, 840px);
  justify-self: center;
  gap: 16px;
}

.slot-window {
  position: relative;
  border-radius: 28px;
  padding: 18px;
  background: #ffffffc7;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid hsla(0, 0%, 100%, .88);
  box-shadow: 0 24px 54px #6f84ab24, inset 0 1px #ffffffeb;
  overflow: hidden;
}

.slot-window::before,
.slot-window::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 64px;
  z-index: 2;
  pointer-events: none;
}

.slot-window::before {
  left: 0;
  background: linear-gradient(90deg, #fff, transparent);
}

.slot-window::after {
  right: 0;
  background: linear-gradient(-90deg, #fff, transparent);
}

.slot-window__focus {
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 106px;
  border-radius: 24px;
  background: linear-gradient(180deg, #ff5fa214, #ff7a1818 50%, #ff5fa214);
  box-shadow: 0 0 0 1px #ff7a1824, 0 0 28px #ff7a1838;
  z-index: 1;
  pointer-events: none;
  transition: box-shadow .2s ease;
}

.slot-window.is-picking .slot-window__focus {
  animation: pulse-focus .76s ease-in-out infinite;
}

@keyframes pulse-focus {
  0%, 100% {
    box-shadow: 0 0 0 1px #ff7a1824, 0 0 22px #ff7a1838;
    transform: translateX(-50%) scaleY(1);
  }
  50% {
    box-shadow: 0 0 0 1px #ff5fa230, 0 0 34px #ff5fa252;
    transform: translateX(-50%) scaleY(1.02);
  }
}

.slot-window__track {
  position: relative;
  display: flex;
  width: max-content;
  gap: var(--slot-card-gap);
  z-index: 0;
  will-change: transform;
}

.slot-card {
  width: var(--slot-card-width);
  min-height: 116px;
  border-radius: 18px;
  padding: 10px 10px 12px;
  background: #fffffff0;
  border: 1px solid rgba(192, 204, 222, .86);
  box-shadow: inset 0 1px #ffffffe6, 0 10px 18px #7585a014;
  display: grid;
  gap: 8px;
  justify-items: center;
  align-content: start;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.slot-card:hover {
  transform: translateY(-2px);
}

.slot-card.is-focused {
  border-color: color-mix(in srgb, var(--drink-accent) 48%, #fff);
  box-shadow: 0 16px 28px #66799924, 0 0 0 4px color-mix(in srgb, var(--drink-accent) 16%, transparent);
  transform: translateY(-3px);
}

.slot-card__label {
  color: #23304d57;
  font-size: .68rem;
  margin: 0;
  font-weight: 700;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.slot-card__emoji {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--drink-accent) 10%, #fff);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--drink-accent) 14%, #fff);
  font-size: 1.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slot-card__name {
  font-family: "Baloo 2", Nunito, sans-serif;
  font-size: .95rem;
  font-weight: 700;
  color: var(--cartoon-ink);
  line-height: 1.16;
  margin: 0;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* ---------- control dock ---------- */
.control-dock {
  display: inline-flex;
  flex-wrap: wrap;
  width: min(100%, 820px);
  gap: 10px;
  padding: 10px;
  border-radius: 999px;
  background: #ffffffeb;
  border: 1px solid hsla(0, 0%, 100%, .85);
  box-shadow: 0 18px 38px #6f84ab24;
  justify-self: center;
}

.category-pill {
  height: 44px;
  min-width: 64px;
  padding: 0 16px;
  border-radius: 999px;
  background: transparent;
  border: 0;
  color: #23304d94;
  font-family: "Baloo 2", Nunito, sans-serif;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  transition: color .16s ease, background .16s ease, box-shadow .16s ease, transform .16s ease;
}

.category-pill:hover {
  color: var(--cartoon-ink);
  transform: translateY(-1px);
}

.category-pill.is-active {
  background: linear-gradient(135deg, #57baff, #2f8fff);
  box-shadow: 0 10px 20px #2f8fff42;
  color: #fff;
}

.category-pill--ghost {
  background: #ffffffb8;
  border: 1px solid rgba(198, 208, 223, .92);
}

.start-button {
  border-radius: 999px;
  border: 0;
  font-family: "Baloo 2", Nunito, sans-serif;
  font-size: 1rem;
  font-weight: 900;
  height: 44px;
  min-width: 144px;
  padding: 0 20px;
  background: linear-gradient(180deg, #314465, #23304d);
  box-shadow: 0 10px 18px #23304d38;
  color: #fff;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, opacity .16s ease;
}

.start-button:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 14px 24px #23304d4a;
}

.start-button:disabled {
  opacity: .5;
  cursor: not-allowed;
}

/* ---------- dialog layer ---------- */
.dialog-layer {
  position: fixed;
  inset: 0;
  background: #cad9ef75;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  z-index: 40;
}

.dialog-layer.is-open {
  animation: dialog-fade-in .2s ease;
}

@keyframes dialog-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.dialog-layer.is-open .dialog-card {
  animation: dialog-pop .28s cubic-bezier(.2, .9, .3, 1.2);
}

@keyframes dialog-pop {
  from { opacity: 0; transform: translateY(18px) scale(.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.dialog-card {
  width: min(100%, 520px);
  border-radius: 30px;
  background: linear-gradient(180deg, #fffef9, #f6fafd);
  border: 1px solid rgba(190, 210, 225, .9);
  box-shadow: 0 28px 58px #495f7929, 0 10px 26px #7094801a;
  padding: 26px;
  position: relative;
  max-height: min(86vh, 760px);
  overflow-y: auto;
}

.dialog-card--compact {
  width: min(100%, 460px);
}

.dialog-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.dialog-card__title {
  font-family: "Baloo 2", Nunito, sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0;
  line-height: 1.2;
}

.dialog-card__eyebrow {
  margin: 0 0 4px;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #23304d73;
}

.dialog-card__head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

.dialog-close-orb {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(198, 208, 223, .92);
  background: #ffffffb8;
  color: var(--cartoon-ink);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .16s ease, background .16s ease;
}

.dialog-close-orb:hover {
  transform: rotate(90deg);
  background: #fff;
}

.dialog-empty {
  padding: 40px 0 28px;
  text-align: center;
  color: #23304d94;
  font-weight: 700;
  font-size: .95rem;
}

/* ---------- result dialog ---------- */
.dialog-card--result {
  background: radial-gradient(circle at 18% 8%, color-mix(in srgb, var(--drink-accent, #6dbb9c) 12%, transparent), transparent 32%), linear-gradient(180deg, #fffef9, #f3fbf6);
  border: 1px solid rgba(190, 215, 203, .9);
}

.result-showcase {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 10px 0 4px;
}

.result-showcase__cup {
  width: 148px;
  height: 148px;
  object-fit: contain;
}

.result-showcase__fallback {
  width: 148px;
  height: 148px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff, #f2f6f4);
  box-shadow: 0 14px 30px #5d729126, inset 0 1px #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.4rem;
}

.result-showcase__name {
  font-family: "Baloo 2", Nunito, sans-serif;
  font-size: clamp(2rem, 7vw, 3rem);
  font-weight: 800;
  line-height: 1.2;
  margin: 6px 0 0;
  text-align: center;
}

.result-showcase__note {
  margin: 0;
  color: #23304d94;
  font-size: .92rem;
  line-height: 1.5;
  text-align: center;
  max-width: 38ch;
}

.result-showcase__price {
  margin-top: 4px;
  padding: 5px 16px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--drink-accent, #6dbb9c) 14%, #fff);
  color: color-mix(in srgb, var(--drink-accent, #6dbb9c) 62%, #23304d);
  font-family: "Baloo 2", Nunito, sans-serif;
  font-weight: 800;
  font-size: 1.02rem;
  border: 1px solid color-mix(in srgb, var(--drink-accent, #6dbb9c) 30%, transparent);
}

.result-dialog__footer {
  display: flex;
  justify-content: center;
  padding-top: 16px;
}

.confirm-button {
  border: 0;
  border-radius: 999px;
  font-family: "Baloo 2", Nunito, sans-serif;
  font-size: 1.02rem;
  font-weight: 900;
  height: 46px;
  min-width: 176px;
  padding: 0 22px;
  color: #fff;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease;
}

.confirm-button:hover {
  transform: translateY(-2px);
}

.confirm-button--pink {
  background: linear-gradient(135deg, #ff925c, #ff5fa2);
  box-shadow: 0 12px 22px #ff5fa233;
}

.confirm-button--accent {
  background: linear-gradient(135deg, color-mix(in srgb, var(--drink-accent, #77c8ac) 54%, #77c8ac), #7bc9b0);
  box-shadow: 0 12px 22px color-mix(in srgb, var(--drink-accent, #77c8ac) 34%, transparent);
}

/* ---------- zodiac dialog ---------- */
.zodiac-panel__status {
  margin: 0 0 14px;
  font-size: .9rem;
  font-weight: 700;
  color: #23304d94;
}

.zodiac-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.zodiac-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 14px 8px 12px;
  border-radius: 18px;
  border: 1px solid rgba(192, 204, 222, .86);
  background: #fffffff0;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.zodiac-card:hover {
  transform: translateY(-2px);
}

.zodiac-card.is-saved {
  border-color: color-mix(in srgb, var(--zodiac-accent, #ff8a5b) 48%, #fff);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--zodiac-accent, #ff8a5b) 15%, transparent);
}

.zodiac-card__symbol {
  font-family: "Baloo 2", Nunito, sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1;
}

.zodiac-card__name {
  font-family: "Baloo 2", Nunito, sans-serif;
  font-size: .95rem;
  font-weight: 800;
  margin: 0;
}

.zodiac-card__date {
  font-size: .68rem;
  color: #23304d73;
  font-weight: 700;
  margin: 0;
}

.zodiac-card__badge {
  position: absolute;
  top: 6px;
  right: 6px;
  padding: 2px 7px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--zodiac-accent, #ff8a5b) 16%, #fff);
  color: color-mix(in srgb, var(--zodiac-accent, #ff8a5b) 70%, #23304d);
  font-size: .62rem;
  font-weight: 800;
}

.ghost-button {
  border: 1px solid rgba(198, 208, 223, .92);
  background: #ffffffb8;
  color: #23304d94;
  border-radius: 999px;
  font-family: "Baloo 2", Nunito, sans-serif;
  font-size: .88rem;
  font-weight: 800;
  height: 36px;
  padding: 0 16px;
  cursor: pointer;
  transition: color .16s ease, background .16s ease;
}

.ghost-button:hover {
  color: var(--cartoon-ink);
  background: #fff;
}

.ghost-button--danger {
  color: #e5484d;
}

/* ---------- fortune dialog ---------- */
.dialog-card--fortune {
  background: radial-gradient(circle at 18% 8%, color-mix(in srgb, var(--fortune-accent, #ff7a18) 12%, transparent), transparent 32%), linear-gradient(180deg, #fffef9, #f4f9fe);
  border-color: rgba(190, 210, 225, .9);
}

.fortune-panel {
  display: grid;
  gap: 16px;
}

.fortune-hero {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: start;
  padding: 18px;
  border-radius: 22px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--fortune-accent, #ff7a18) 10%, #fff), #ffffff);
  border: 1px solid color-mix(in srgb, var(--fortune-accent, #ff7a18) 20%, #fff);
}

.fortune-hero__symbol {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  background: color-mix(in srgb, var(--fortune-accent, #ff7a18) 14%, #fff);
  color: var(--fortune-accent, #ff7a18);
  font-family: "Baloo 2", Nunito, sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fortune-hero__copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.fortune-hero__lead {
  margin: 0;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .14em;
  color: #23304d73;
  text-transform: uppercase;
}

.fortune-hero__time {
  margin: 0;
  font-size: .72rem;
  font-weight: 700;
  color: #23304d73;
}

.fortune-hero__title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.fortune-hero__title {
  font-family: "Baloo 2", Nunito, sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  margin: 0;
}

.fortune-hero__trend {
  padding: 2px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--fortune-accent, #ff7a18) 14%, #fff);
  color: color-mix(in srgb, var(--fortune-accent, #ff7a18) 64%, #23304d);
  font-size: .7rem;
  font-weight: 800;
}

.fortune-hero__headline {
  margin: 4px 0 0;
  font-weight: 800;
  font-size: 1rem;
  line-height: 1.45;
}

.fortune-hero__summary {
  margin: 0;
  color: #23304d94;
  font-size: .86rem;
  line-height: 1.55;
}

.fortune-chip-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.fortune-chip {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(192, 204, 222, .86);
  background: #fffffff0;
  font-size: .78rem;
  font-weight: 800;
  color: #23304d94;
}

.fortune-chip strong {
  color: var(--cartoon-ink);
}

.fortune-score-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.fortune-score-card {
  display: grid;
  gap: 2px;
  justify-items: center;
  padding: 12px 6px;
  border-radius: 16px;
  border: 1px solid rgba(192, 204, 222, .86);
  background: #fffffff0;
}

.fortune-score-card__label {
  font-size: .7rem;
  font-weight: 800;
  color: #23304d73;
}

.fortune-score-card__score {
  font-family: "Baloo 2", Nunito, sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--fortune-accent, #ff7a18);
  line-height: 1;
}

.fortune-score-card__tone {
  font-size: .64rem;
  font-weight: 700;
  color: #23304d73;
}

.fortune-score-card__badge {
  font-size: .6rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--fortune-accent, #ff7a18) 14%, #fff);
  color: color-mix(in srgb, var(--fortune-accent, #ff7a18) 64%, #23304d);
  white-space: nowrap;
}

.fortune-highlights {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.fortune-highlight-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 11px 14px;
  border-radius: 16px;
  border: 1px solid rgba(192, 204, 222, .86);
  background: #fffffff0;
}

.fortune-highlight-card__label {
  font-size: .76rem;
  font-weight: 800;
  color: #23304d73;
}

.fortune-highlight-card__value {
  font-family: "Baloo 2", Nunito, sans-serif;
  font-size: .95rem;
  font-weight: 800;
}

.fortune-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.fortune-list-card {
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(192, 204, 222, .86);
  background: #fffffff0;
}

.fortune-list-card--warning {
  border-color: #ff5fa23a;
  background: #fffafb;
}

.fortune-list-card__eyebrow {
  margin: 0 0 8px;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .12em;
  color: #23304d73;
  text-transform: uppercase;
}

.fortune-list-card--warning .fortune-list-card__eyebrow {
  color: #e5484d;
}

.fortune-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}

.fortune-list li {
  font-size: .8rem;
  font-weight: 700;
  color: #23304d94;
  line-height: 1.45;
  position: relative;
  padding-left: 14px;
}

.fortune-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .5em;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--fortune-accent, #ff7a18);
}

.fortune-list-card--warning .fortune-list li::before {
  background: #e5484d;
}

.fortune-trace {
  padding: 12px 14px;
  border-radius: 18px;
  background: #23304d0a;
}

.fortune-trace__eyebrow {
  margin: 0 0 6px;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .12em;
  color: #23304d73;
  text-transform: uppercase;
}

.fortune-trace__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 4px;
}

.fortune-trace__list li {
  font-size: .76rem;
  font-weight: 700;
  color: #23304d73;
  line-height: 1.4;
}

/* ---------- lists (ranking / history / custom) ---------- */
.dialog-list {
  display: grid;
  gap: 8px;
  max-height: 52vh;
  overflow-y: auto;
}

.dialog-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 18px;
  border: 1px solid rgba(192, 204, 222, .86);
  background: #fffffff0;
}

.dialog-item__rank {
  font-family: "Baloo 2", Nunito, sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  color: #23304d57;
  min-width: 30px;
  text-align: center;
}

.dialog-item__emoji {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: #23304d0d;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex: none;
}

.dialog-item__main {
  display: grid;
  gap: 1px;
  min-width: 0;
  flex: 1;
}

.dialog-item__name {
  font-family: "Baloo 2", Nunito, sans-serif;
  font-size: .95rem;
  font-weight: 800;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dialog-item__sub {
  font-size: .72rem;
  font-weight: 700;
  color: #23304d73;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dialog-item__side {
  flex: none;
  font-size: .78rem;
  font-weight: 800;
  color: #23304d94;
  text-align: right;
  display: grid;
  gap: 2px;
}

.dialog-item__side small {
  font-size: .66rem;
  color: #23304d57;
}

.dialog-item__side--editable {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dialog-category-tag {
  padding: 2px 9px;
  border-radius: 999px;
  background: #23304d0d;
  font-size: .68rem;
  font-weight: 800;
  color: #23304d94;
  flex: none;
}

.remove-button {
  border: 1px solid rgba(229, 72, 77, .35);
  background: #fff5f5;
  color: #e5484d;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 800;
  height: 28px;
  padding: 0 12px;
  cursor: pointer;
  flex: none;
  transition: background .16s ease;
}

.remove-button:hover {
  background: #ffe3e3;
}

/* ---------- custom form ---------- */
.custom-form {
  display: grid;
  gap: 14px;
}

.custom-field {
  display: grid;
  gap: 6px;
}

.custom-field label {
  font-size: .8rem;
  font-weight: 800;
  color: #23304d94;
}

.custom-field input,
.custom-field select {
  height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(192, 204, 222, .86);
  background: #fffffff0;
  padding: 0 14px;
  font-family: Nunito, "Trebuchet MS", sans-serif;
  font-size: .92rem;
  font-weight: 700;
  color: var(--cartoon-ink);
  outline: none;
  transition: border-color .16s ease, box-shadow .16s ease;
}

.custom-field input:focus,
.custom-field select:focus {
  border-color: #2f8fff;
  box-shadow: 0 0 0 3px #2f8fff1f;
}

.custom-form__hint {
  margin: 0;
  font-size: .76rem;
  font-weight: 700;
  color: #23304d73;
  line-height: 1.5;
}

.custom-form__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 4px;
}

.primary-button {
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #57baff, #2f8fff);
  box-shadow: 0 10px 20px #2f8fff42;
  color: #fff;
  font-family: "Baloo 2", Nunito, sans-serif;
  font-size: .92rem;
  font-weight: 900;
  height: 40px;
  padding: 0 20px;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease;
}

.primary-button:hover {
  transform: translateY(-1px);
}

/* ---------- wechat guide ---------- */
.wechat-guide {
  display: grid;
  gap: 10px;
  justify-items: center;
  text-align: center;
  padding: 8px 0 2px;
}

.wechat-guide__badge {
  padding: 4px 14px;
  border-radius: 999px;
  background: #e6f4ea;
  color: #1a7f37;
  font-size: .74rem;
  font-weight: 800;
}

.wechat-guide__title {
  font-family: "Baloo 2", Nunito, sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  margin: 0;
}

.wechat-guide__message {
  margin: 0;
  font-weight: 800;
  font-size: 1rem;
}

.wechat-guide__hint {
  margin: 0;
  color: #23304d94;
  font-size: .84rem;
  font-weight: 700;
  line-height: 1.55;
  max-width: 34ch;
}

.wechat-guide__actions {
  padding-top: 10px;
}

/* ---------- toast ---------- */
.toast-wrap {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: #fff8ef;
  border-radius: 30px;
  padding: 11px 22px;
  font-size: .9rem;
  font-weight: 800;
  color: var(--cartoon-ink);
  box-shadow: 0 6px 16px rgba(0, 0, 0, .08), 0 3px 6px -4px rgba(0, 0, 0, .12), 0 9px 28px 8px rgba(0, 0, 0, .05);
  animation: toast-in .25s ease;
  max-width: min(90vw, 420px);
  text-align: center;
}

.toast.is-leaving {
  animation: toast-out .25s ease forwards;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(-10px) scale(.94); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toast-out {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to { opacity: 0; transform: translateY(-10px) scale(.94); }
}

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .drink-lab {
    justify-content: flex-start;
    padding-top: 88px;
  }

  .stage-shell,
  .slot-shell,
  .control-dock {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .drink-lab {
    --slot-card-width: 84px;
    --slot-card-gap: 12px;
    gap: 20px;
    padding-top: 84px;
  }

  .slot-window {
    border-radius: 24px;
    padding: 14px;
  }

  .slot-window::before,
  .slot-window::after {
    width: 32px;
  }

  .slot-window__focus {
    width: 88px;
    top: 8px;
    bottom: 8px;
  }

  .slot-card {
    min-height: 108px;
    padding: 8px 8px 10px;
  }

  .control-dock {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    border-radius: 28px;
  }

  .category-pill,
  .category-pill--ghost {
    width: 100%;
    min-width: 0;
  }

  .start-button {
    width: 100%;
    grid-column: 1 / -1;
  }

  .corner-orb {
    width: 44px;
    height: 44px;
  }

  .hero-header__mark {
    width: 40px;
    height: 40px;
    border-radius: 12px;
  }

  .fortune-score-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .dialog-card {
    padding: 20px;
    border-radius: 24px;
  }
}

@media (max-width: 420px) {
  .drink-lab {
    --slot-card-width: 76px;
  }

  .hero-header h1 {
    font-size: clamp(1.8rem, 9vw, 2.3rem);
  }

  .slot-window__focus {
    width: 80px;
  }

  .zodiac-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .fortune-columns,
  .fortune-highlights {
    grid-template-columns: 1fr;
  }
}