:root {
  color-scheme: light;
  --ink: #23191d;
  --muted: #786d72;
  --paper: #fffaf2;
  --soft: #fff5e4;
  --line: #e5d6bf;
  --charcoal: #222127;
  --vermouth: #c84f5f;
  --olive: #557a50;
  --lemon: #f3ce4c;
  --ice: #91cbd5;
  --plum: #6e4d83;
  --shadow: 0 24px 60px rgba(55, 38, 35, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(255, 250, 242, 0.96), rgba(255, 255, 255, 0.98) 44%, #ffffff),
    radial-gradient(circle at 16% 8%, rgba(145, 203, 213, 0.18), transparent 30%),
    radial-gradient(circle at 86% 18%, rgba(243, 206, 76, 0.18), transparent 28%);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  overflow-x: hidden;
}

button {
  font: inherit;
}

.lang-toggle {
  position: fixed;
  z-index: 10;
  top: 14px;
  right: 14px;
  min-width: 54px;
  min-height: 34px;
  border: 1px solid rgba(35, 25, 29, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.8);
  color: #5d5258;
  box-shadow: 0 8px 24px rgba(73, 45, 34, 0.08);
  cursor: pointer;
  font-size: 13px;
  font-weight: 850;
  backdrop-filter: blur(14px);
}

body.is-result-view .lang-toggle {
  display: none;
}

.app {
  width: min(100%, 820px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 36px 18px;
  display: grid;
  place-items: center;
  position: relative;
  z-index: 1;
}

body.is-result-view .app {
  width: min(100%, 438px);
  padding: 14px 26px;
  display: block;
}

.view {
  display: none;
  width: 100%;
}

.view.is-active {
  display: block;
}

.view-home {
  text-align: center;
}

.brand-lockup {
  margin: 0 auto 12px;
}

.mini-label {
  margin: 0 0 8px;
  color: var(--olive);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0;
}

h1 {
  margin: 0;
  color: #3b2832;
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  font-size: 88px;
  font-weight: 760;
  line-height: 0.92;
  letter-spacing: 0;
  text-shadow: 0 3px 0 rgba(243, 206, 76, 0.68), 0 18px 34px rgba(59, 40, 50, 0.13);
}

.bar-wall {
  width: min(100%, 446px);
  margin: 16px auto 24px;
  display: grid;
  gap: 9px;
  overflow: hidden;
  padding: 4px 0;
  contain: paint;
  mask-image: linear-gradient(90deg, transparent 0%, #000 10%, #000 90%, transparent 100%);
}

.bar-row {
  width: 100%;
  overflow: hidden;
  contain: paint;
}

.bar-track {
  width: max-content;
  display: flex;
  gap: 9px;
  animation: bar-slide var(--duration, 22s) linear infinite;
}

.bar-row.is-reverse .bar-track {
  animation-name: bar-slide-reverse;
}

@keyframes bar-slide {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

@keyframes bar-slide-reverse {
  from {
    transform: translateX(-50%);
  }

  to {
    transform: translateX(0);
  }
}

.home-copy {
  width: min(100%, 510px);
  margin: 0 auto;
}

.home-copy h2,
.question-title,
.result-name {
  margin: 0;
  font-size: 32px;
  line-height: 1.18;
  font-weight: 880;
}

.home-copy p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
  font-weight: 720;
}

.primary-action,
.nav-action,
.secondary-action {
  min-height: 56px;
  border: 0;
  border-radius: 8px;
  padding: 0 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  cursor: pointer;
  font-weight: 850;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease, opacity 160ms ease;
}

.primary-action {
  width: min(100%, 360px);
  margin-top: 22px;
  background: #252227;
  color: #ffffff;
  box-shadow: 0 10px 0 rgba(37, 34, 39, 0.18), 0 18px 36px rgba(37, 34, 39, 0.14);
}

.quiz-nav {
  width: 100%;
  margin-top: 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.nav-action {
  width: 100%;
  min-width: 0;
  min-height: 52px;
  padding: 0 15px;
  border: 1px solid transparent;
  font-size: 14px;
  box-shadow: none;
  overflow: hidden;
}

.nav-action.is-primary {
  background: linear-gradient(135deg, #2c2930, #17161a);
  color: #ffffff;
  box-shadow: 0 7px 0 rgba(37, 34, 39, 0.14), 0 14px 28px rgba(37, 34, 39, 0.12);
}

.nav-action.is-secondary {
  border-color: rgba(120, 109, 114, 0.25);
  background: rgba(255, 255, 255, 0.78);
  color: #5a5054;
  box-shadow: inset 0 -2px 0 rgba(120, 109, 114, 0.09), 0 10px 22px rgba(55, 38, 35, 0.05);
}

.nav-action.is-secondary::before,
.nav-action.is-primary::after {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  flex: 0 0 26px;
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
}

.nav-action.is-secondary::before {
  content: "<";
  background: rgba(120, 109, 114, 0.1);
  color: #5a5054;
}

.nav-action.is-primary::after {
  content: ">";
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.primary-action:hover,
.secondary-action:hover,
.nav-action:hover,
.option-button:hover,
.lang-toggle:hover {
  transform: translateY(-2px);
}

.primary-action:active,
.secondary-action:active,
.nav-action:active,
.option-button:active,
.lang-toggle:active {
  transform: translateY(1px);
}

.nav-action:disabled {
  cursor: not-allowed;
  background: #ded9d1;
  color: rgba(49, 45, 42, 0.52);
  box-shadow: none;
  opacity: 0.75;
}

.nav-action:disabled::before,
.nav-action:disabled::after {
  background: rgba(255, 255, 255, 0.28);
  color: rgba(49, 45, 42, 0.42);
}

.play-mark {
  width: 28px;
  height: 28px;
  border: 2px solid currentColor;
  border-radius: 50%;
  position: relative;
}

.play-mark::after {
  content: "";
  position: absolute;
  left: 10px;
  top: 7px;
  border-left: 9px solid currentColor;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
}

.save-mark {
  width: 18px;
  height: 20px;
  border: 2px solid currentColor;
  border-top-width: 6px;
  border-radius: 4px;
  position: relative;
}

.save-mark::after {
  content: "";
  position: absolute;
  left: 3px;
  right: 3px;
  bottom: 3px;
  height: 4px;
  background: currentColor;
}

.fine-print {
  margin: 36px 0 0;
  color: #978a90;
  font-size: 13px;
  font-weight: 820;
}

.quiz-shell {
  width: min(100%, 448px);
  margin: 0 auto;
}

.quiz-topbar {
  margin-bottom: 32px;
}

.progress-wrap {
  display: grid;
  gap: 12px;
  text-align: center;
}

.progress-text {
  color: var(--muted);
  font-size: 14px;
  font-weight: 820;
}

.progress-track {
  height: 4px;
  border-radius: 99px;
  background: rgba(120, 109, 114, 0.18);
  overflow: hidden;
}

.progress-fill {
  display: block;
  width: var(--progress, 0%);
  height: 100%;
  background: linear-gradient(90deg, var(--vermouth), var(--lemon), var(--ice), var(--olive));
  transition: width 240ms ease;
}

.question-meta {
  min-height: 60px;
  margin-bottom: 24px;
  padding: 8px 14px 8px 8px;
  border: 1px solid rgba(120, 109, 114, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  backdrop-filter: blur(12px);
}

.question-kicker {
  color: #8c4453;
  font-size: 14px;
  font-weight: 840;
}

.question-title {
  margin-bottom: 10px;
}

.question-body {
  margin: 0 0 28px;
  color: #675d62;
  font-size: 16px;
  line-height: 1.65;
  font-weight: 690;
}

.option-list {
  display: grid;
  gap: 12px;
}

.option-button {
  min-height: 62px;
  width: 100%;
  padding: 13px 15px;
  border: 1px solid rgba(120, 109, 114, 0.25);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  cursor: pointer;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  text-align: left;
  box-shadow: 0 10px 26px rgba(55, 38, 35, 0.06);
  backdrop-filter: blur(12px);
}

.option-letter {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: rgba(243, 206, 76, 0.22);
  font-size: 18px;
  line-height: 1;
}

.option-text {
  display: block;
  font-size: 15px;
  line-height: 1.45;
  font-weight: 760;
  overflow-wrap: anywhere;
}

.option-button.is-selected {
  border-color: rgba(200, 79, 95, 0.76);
  background: rgba(255, 245, 228, 0.96);
  box-shadow: 0 9px 0 rgba(200, 79, 95, 0.16);
}

.drink-avatar {
  width: 82px;
  aspect-ratio: 1;
  border: 1px solid rgba(120, 109, 114, 0.18);
  border-radius: 8px;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(255, 250, 242, 0.7)),
    radial-gradient(circle at 28% 16%, rgba(255, 255, 255, 0.82), transparent 38%);
  box-shadow: 0 12px 26px rgba(55, 38, 35, 0.08);
}

.drink-avatar::before {
  content: "";
  position: absolute;
  inset: auto 10px 9px;
  height: 8px;
  border-radius: 50%;
  background: rgba(35, 25, 29, 0.08);
}

.meta-drink {
  width: 44px;
  flex: 0 0 44px;
}

.result-avatar {
  width: 168px;
  margin: 0 auto 28px;
  box-shadow: 0 18px 44px rgba(55, 38, 35, 0.12);
}

.bar-drink {
  width: 78px;
  flex: 0 0 78px;
}

.drink-symbol {
  width: 74%;
  height: 74%;
  position: relative;
  z-index: 1;
}

.cup {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  overflow: hidden;
  border: 3px solid rgba(35, 25, 29, 0.78);
  background: rgba(255, 255, 255, 0.36);
  box-shadow: inset 9px 0 0 rgba(255, 255, 255, 0.2);
}

.liquid {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--fill, 58%);
  background: linear-gradient(180deg, var(--accent), var(--liquid));
}

.shine {
  position: absolute;
  top: 12%;
  left: 24%;
  width: 12%;
  height: 48%;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.52);
}

.stem {
  position: absolute;
  left: 50%;
  top: 56%;
  width: 4px;
  height: 24%;
  transform: translateX(-50%);
  border-radius: 6px;
  background: rgba(35, 25, 29, 0.78);
}

.base {
  position: absolute;
  left: 29%;
  right: 29%;
  bottom: 8%;
  height: 5px;
  border-radius: 99px;
  background: rgba(35, 25, 29, 0.78);
}

.garnish {
  position: absolute;
  z-index: 3;
}

.garnish.lime {
  top: 9%;
  right: 12%;
  width: 19%;
  aspect-ratio: 1;
  border: 3px solid #6fa457;
  border-radius: 50%;
  background: #d9e76d;
}

.garnish.cherry {
  top: 16%;
  right: 16%;
  width: 15%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #cf3142;
  box-shadow: 0 -8px 0 -5px #6b914d;
}

.garnish.olive {
  top: 15%;
  right: 14%;
  width: 17%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #789a50;
  box-shadow: inset 4px 0 0 #d14e54;
}

.garnish.orange {
  top: 14%;
  right: 9%;
  width: 20%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #f49a3c;
  box-shadow: inset 0 0 0 5px #ffd37a;
}

.garnish.mint {
  top: 13%;
  right: 12%;
  width: 20%;
  height: 16%;
  border-radius: 60% 10% 60% 10%;
  background: #5b9b61;
  transform: rotate(-28deg);
}

.straw {
  position: absolute;
  z-index: 2;
  top: 6%;
  left: 32%;
  width: 4px;
  height: 56%;
  border-radius: 99px;
  background: var(--accent);
  transform: rotate(-17deg);
  transform-origin: 50% 90%;
}

.shape-martini .cup,
.shape-vesper .cup {
  top: 11%;
  width: 82%;
  height: 47%;
  clip-path: polygon(3% 0, 97% 0, 60% 100%, 40% 100%);
  border: 0;
}

.shape-martini .cup::after,
.shape-vesper .cup::after {
  content: "";
  position: absolute;
  inset: 0;
  clip-path: polygon(3% 0, 97% 0, 60% 100%, 40% 100%);
  border-top: 4px solid rgba(35, 25, 29, 0.78);
  border-left: 4px solid rgba(35, 25, 29, 0.78);
  border-right: 4px solid rgba(35, 25, 29, 0.78);
}

.shape-rocks .cup,
.shape-tiki .cup {
  top: 23%;
  width: 64%;
  height: 52%;
  border-radius: 7px 7px 12px 12px;
}

.shape-highball .cup {
  top: 15%;
  width: 50%;
  height: 64%;
  border-radius: 6px 6px 11px 11px;
}

.shape-flute .cup {
  top: 10%;
  width: 38%;
  height: 58%;
  border-radius: 5px 5px 24px 24px;
}

.shape-coupe .cup {
  top: 16%;
  width: 76%;
  height: 36%;
  border-radius: 7px 7px 42px 42px;
}

.shape-tiki .cup {
  border-color: #5c3526;
  background: #b86d40;
}

.shape-tiki .liquid {
  height: 100%;
  opacity: 0.62;
}

.shape-tiki .cup::before,
.shape-tiki .cup::after {
  content: "";
  position: absolute;
  z-index: 2;
  top: 38%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #382016;
}

.shape-tiki .cup::before {
  left: 25%;
}

.shape-tiki .cup::after {
  right: 25%;
}

.view-result {
  display: none;
  width: 100%;
  max-width: 354px;
  margin: 0 auto;
}

.view-result.is-active {
  display: block;
}

.result-card {
  width: 100%;
  margin: 0 auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  text-align: center;
}

.result-topline {
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: #aaa1a5;
  font-size: 17px;
  line-height: 1.2;
  font-weight: 650;
}

.result-kicker {
  margin: 0 0 8px;
  color: #aaa1a5;
  font-size: 18px;
  line-height: 1.2;
  font-weight: 850;
  text-align: center;
}

.result-name {
  max-width: 100%;
  margin: 0 auto;
  color: #111111;
  font-size: 31px;
  line-height: 1.1;
  font-weight: 920;
  overflow-wrap: anywhere;
}

.result-subtitle {
  margin: 8px 0 0;
  color: #aaa1a5;
  font-size: 17px;
  line-height: 1.35;
  font-weight: 850;
}

.result-punchline {
  margin: 30px 0 0;
  padding: 15px 18px;
  border-radius: 8px;
  background: #f5f5f5;
  color: #252525;
  font-size: 18px;
  line-height: 1.48;
  font-weight: 540;
  text-align: left;
  position: relative;
}

.result-punchline::before {
  content: '"';
  position: absolute;
  left: 16px;
  top: -8px;
  color: rgba(0, 0, 0, 0.07);
  font-size: 58px;
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1;
}

.result-tags {
  position: relative;
}

.tag-heading {
  margin: 24px 0 12px;
  color: #aaa1a5;
  font-size: 17px;
  line-height: 1.2;
  font-weight: 850;
  text-align: left;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-start;
  padding-right: 96px;
}

.tag-row span {
  padding: 8px 13px;
  border-radius: 8px;
  background: #f5f5f5;
  color: #171717;
  font-size: 14px;
  line-height: 1.2;
  font-weight: 850;
}

.tag-row span:nth-child(2n) {
  background: #edf5f1;
}

.tag-row span:nth-child(3n) {
  background: #fff1d0;
}

.result-mbti {
  min-height: 35px;
  margin: 0;
  padding: 0 12px;
  border: 2px solid rgba(200, 79, 95, 0.54);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.18);
  color: rgba(157, 58, 70, 0.84);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  right: 10px;
  bottom: 4px;
  transform: rotate(-12deg);
  font-size: 20px;
  line-height: 1.2;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
  box-shadow: inset 0 0 0 1px rgba(200, 79, 95, 0.18);
  opacity: 0.9;
  pointer-events: none;
}

.result-desc {
  margin: 24px 0 0;
  padding-top: 20px;
  border-top: 1px solid #ececec;
  color: #4a4a4a;
  font-size: 17px;
  line-height: 1.58;
  font-weight: 430;
  text-align: left;
  overflow-wrap: anywhere;
}

.result-actions {
  width: 100%;
  margin: 24px auto 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.result-actions .primary-action,
.result-actions .secondary-action {
  min-height: 56px;
  padding-inline: 22px;
}

.primary-action.compact {
  width: 100%;
  margin: 0;
  background: #111111;
  color: #ffffff;
  box-shadow: none;
  font-size: 18px;
}

.secondary-action {
  border: 1px solid rgba(120, 109, 114, 0.22);
  background: #ffffff;
  color: #5a5054;
}

@media (max-width: 620px) {
  .app {
    padding: 26px 16px;
  }

  body.is-result-view .app {
    padding: 12px 22px;
  }

  h1 {
    font-size: 50px;
  }

  .home-copy h2,
  .question-title {
    font-size: 26px;
  }

  .bar-wall {
    width: min(100%, 352px);
    margin-top: 12px;
    gap: 8px;
  }

  .bar-track {
    gap: 8px;
  }

  .bar-drink {
    width: 70px;
    flex-basis: 70px;
  }

  .quiz-shell {
    width: 100%;
  }

  .result-avatar {
    width: 150px;
    margin-bottom: 24px;
  }

  .result-name {
    font-size: 27px;
  }
}

@media (min-width: 760px) and (max-height: 780px) {
  .app {
    padding-block: 18px;
  }

  h1 {
    font-size: 76px;
  }

  .bar-wall {
    width: min(100%, 390px);
    margin: 10px auto 16px;
  }

  .bar-drink {
    width: 72px;
    flex-basis: 72px;
  }

  .home-copy h2 {
    font-size: 28px;
  }

  .home-copy p {
    margin-top: 8px;
    font-size: 15px;
    line-height: 1.5;
  }

  .primary-action {
    min-height: 54px;
    margin-top: 18px;
  }

  .quiz-nav {
    margin-top: 18px;
  }

  .fine-print {
    margin-top: 26px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
