:root {
  color-scheme: dark;
  --bg: #070907;
  --panel: #101610;
  --text: #f2fff0;
  --muted: #a9bfa8;
  --line: #345234;
  --green: #74ff8b;
  --cyan: #77f7ff;
  --coffee-color: #b86931;
  --water-color: #45c7ff;
  --milk-color: #fff1bf;
  --foam-color: #f7ffe8;
  --extra-color: #a85c42;
  --shadow: rgba(116, 255, 139, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(rgba(116, 255, 139, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(116, 255, 139, 0.04) 1px, transparent 1px),
    radial-gradient(circle at top right, rgba(119, 247, 255, 0.12), transparent 28rem),
    var(--bg);
  background-size: 22px 22px, 22px 22px, auto, auto;
  color: var(--text);
  font-family: "Courier New", Courier, monospace;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.025),
    rgba(255, 255, 255, 0.025) 1px,
    transparent 1px,
    transparent 5px
  );
  opacity: 0.5;
}

.shell {
  width: min(100%, 1160px);
  margin: 0 auto;
  padding: 20px;
}

.hero {
  min-height: 58vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-bottom: 1px solid var(--line);
  padding: 42px 0 34px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
}

.eyebrow,
.terminal-label,
.drink-kind {
  margin: 0;
  color: var(--green);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow {
  white-space: nowrap;
}

.language-link {
  color: var(--cyan);
  font-size: 0.82rem;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 14px 0 12px;
  color: var(--text);
  font-size: clamp(3.35rem, 20vw, 7rem);
  line-height: 0.86;
  text-transform: uppercase;
  text-shadow: 0 0 20px var(--shadow);
}

.tagline {
  max-width: 38rem;
  margin: 0;
  color: var(--muted);
  font-size: 1.04rem;
  line-height: 1.6;
}

.status-line {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  margin-top: 28px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  background: rgba(16, 22, 16, 0.72);
  color: var(--cyan);
  font-size: 0.86rem;
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 18px var(--green);
}

.menu {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  padding: 24px 0;
}

.drink-card {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(20, 27, 20, 0.96), rgba(7, 9, 7, 0.92));
  box-shadow: 0 0 0 1px rgba(116, 255, 139, 0.05), 0 18px 40px rgba(0, 0, 0, 0.23);
  padding: 14px;
}

.cup-art {
  margin: 0;
  min-width: 0;
}

.pairing-art {
  align-self: stretch;
}

.css-cake {
  position: relative;
  width: 90px;
  height: 118px;
  margin: 0 auto 8px;
  border: 2px solid var(--green);
  border-radius: 8px;
  overflow: hidden;
  background:
    linear-gradient(rgba(116, 255, 139, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(116, 255, 139, 0.05) 1px, transparent 1px),
    rgba(255, 255, 255, 0.035);
  background-size: 10px 10px;
  box-shadow:
    inset 0 0 20px rgba(116, 255, 139, 0.13),
    0 0 14px rgba(116, 255, 139, 0.1);
}

.cake-face,
.cake-side,
.cake-top,
.cake-code {
  position: absolute;
}

.cake-face {
  left: 14px;
  right: 18px;
  bottom: 18px;
  height: 54px;
  border: 1px solid rgba(116, 255, 139, 0.58);
  border-radius: 4px 4px 10px 10px;
  background:
    radial-gradient(circle at 21% 33%, #7a3f20 0 7px, transparent 8px),
    radial-gradient(circle at 72% 62%, #6e341d 0 8px, transparent 9px),
    linear-gradient(135deg, transparent 0 25%, #5e301c 26% 38%, transparent 39% 58%, #6f3b23 59% 70%, transparent 71%),
    #f0cc7b;
  clip-path: polygon(0 0, 100% 10%, 86% 100%, 6% 88%);
}

.cake-face i {
  position: absolute;
  width: 30px;
  height: 7px;
  border-radius: 999px;
  background: #6d321d;
  transform: rotate(-28deg);
}

.cake-face i:nth-child(1) {
  left: 3px;
  top: 8px;
}

.cake-face i:nth-child(2) {
  right: 1px;
  top: 18px;
}

.cake-face i:nth-child(3) {
  left: 14px;
  top: 31px;
}

.cake-face i:nth-child(4) {
  right: 9px;
  bottom: 6px;
}

.cake-side {
  right: 10px;
  bottom: 18px;
  width: 23px;
  height: 58px;
  border: 1px solid rgba(116, 255, 139, 0.5);
  border-left: 0;
  border-radius: 0 5px 10px 0;
  background:
    linear-gradient(115deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.26)),
    repeating-linear-gradient(155deg, #7a3f20 0 5px, #e2b86b 5px 12px);
  clip-path: polygon(0 9%, 100% 0, 88% 96%, 0 100%);
}

.cake-top {
  left: 17px;
  right: 8px;
  bottom: 69px;
  height: 20px;
  border: 1px solid rgba(116, 255, 139, 0.48);
  border-radius: 10px 7px 3px 3px;
  background:
    repeating-linear-gradient(125deg, #8a4a21 0 7px, #f0bb60 7px 15px, #6a301b 15px 20px);
  transform: skewX(-18deg);
}

.cake-code {
  left: 13px;
  right: 13px;
  top: 15px;
  display: grid;
  gap: 5px;
}

.cake-code b {
  display: block;
  height: 3px;
  border-radius: 999px;
  background: rgba(119, 247, 255, 0.72);
  box-shadow: 0 0 9px rgba(119, 247, 255, 0.24);
}

.cake-code b:nth-child(1) {
  width: 72%;
}

.cake-code b:nth-child(2) {
  width: 44%;
}

.cake-code b:nth-child(3) {
  width: 62%;
}

.cup {
  position: relative;
  width: 90px;
  height: 118px;
  margin: 0 auto 8px;
  border: 2px solid var(--green);
  border-top: 0;
  border-radius: 0 0 27px 27px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.035);
  box-shadow:
    inset 0 0 20px rgba(116, 255, 139, 0.13),
    0 0 14px rgba(116, 255, 139, 0.1);
}

.cup::before {
  content: "";
  position: absolute;
  inset: 8px 10px auto;
  height: 1px;
  background: rgba(242, 255, 240, 0.48);
  z-index: 4;
}

.cup::after {
  content: "";
  position: absolute;
  right: 4px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0 28px,
    rgba(242, 255, 240, 0.7) 28px 30px,
    transparent 30px 32px
  );
  z-index: 4;
}

.layer {
  position: absolute;
  left: 0;
  width: 100%;
  border-top: 1px solid rgba(255, 255, 255, 0.36);
}

.coffee {
  bottom: var(--coffee-bottom, 0%);
  height: var(--coffee);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), transparent 28%),
    var(--coffee-color);
}

.water {
  bottom: var(--water-bottom, var(--coffee));
  height: var(--water);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent 36%),
    var(--water-color);
}

.milk {
  bottom: var(--milk-bottom, calc(var(--coffee) + var(--water)));
  height: var(--milk);
  border-top-color: rgba(52, 40, 24, 0.82);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.5), transparent 42%),
    var(--milk-color);
}

.foam {
  bottom: var(--foam-bottom, calc(var(--coffee) + var(--water) + var(--milk)));
  height: var(--foam);
  border-top-color: rgba(52, 40, 24, 0.82);
  background:
    radial-gradient(circle at 18% 40%, #ffffff 0 4px, transparent 5px),
    radial-gradient(circle at 48% 28%, #ffffff 0 5px, transparent 6px),
    radial-gradient(circle at 74% 48%, #ffffff 0 4px, transparent 5px),
    var(--foam-color);
}

.extra {
  bottom: var(--extra-bottom, calc(var(--coffee) + var(--water) + var(--milk) + var(--foam)));
  height: var(--extra);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent 38%),
    var(--extra-color);
}

.ice {
  position: absolute;
  inset: 12px 14px auto;
  z-index: 5;
  display: flex;
  gap: 6px;
}

.ice span {
  width: 16px;
  height: 16px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  background: rgba(236, 252, 255, 0.54);
  transform: rotate(9deg);
}

figcaption {
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.34;
  text-align: center;
}

.drink-copy {
  min-width: 0;
}

.drink-copy h2 {
  margin: 4px 0 6px;
  font-size: 1.16rem;
  line-height: 1.12;
}

.cup-size {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--cyan);
  font-size: 0.75rem;
}

.recipe {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

body[data-page="menu"] .recipe {
  display: none;
}

.price {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.35;
}

.bitcoin-icon {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid #ffd26e;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.58), transparent 26%),
    linear-gradient(135deg, #ffb02e, #f7931a 54%, #b75f00);
  color: #2d1900;
  font-family: Georgia, serif;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 0 16px rgba(247, 147, 26, 0.38);
  animation: bitcoin-flip 1.9s linear infinite;
  transform-style: preserve-3d;
}

.bitcoin-icon::before,
.bitcoin-icon::after {
  content: "";
  position: absolute;
  width: 2px;
  height: 15px;
  background: currentColor;
}

.bitcoin-icon::before {
  margin-left: -7px;
}

.bitcoin-icon::after {
  margin-left: 7px;
}

@keyframes bitcoin-flip {
  0% {
    transform: rotateY(0deg);
  }

  100% {
    transform: rotateY(360deg);
  }
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  border-block: 1px solid var(--line);
  padding: 18px 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.swatch {
  width: 13px;
  height: 13px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  display: inline-block;
}

.coffee-swatch {
  background: var(--coffee-color);
}

.water-swatch {
  background: var(--water-color);
}

.milk-swatch {
  background: var(--milk-color);
}

.foam-swatch {
  background: var(--foam-color);
}

.extra-swatch {
  background: var(--extra-color);
}

.qr-panel {
  display: grid;
  gap: 18px;
  align-items: center;
  justify-items: start;
  padding: 34px 0 46px;
}

.qr-panel h2 {
  margin: 7px 0 8px;
  font-size: 1.35rem;
}

.qr-url {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.45;
}

.qr-link {
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--green);
  border-radius: 8px;
  padding: 10px;
  background: #f8fff4;
  box-shadow: 0 0 28px var(--shadow);
}

.qr-link img {
  display: block;
  width: 180px;
  height: 180px;
}

.notes-shell {
  max-width: 1040px;
}

.notes-hero {
  min-height: 42vh;
}

.notes-form {
  padding: 24px 0 46px;
}

.notes-intro {
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.notes-intro p:last-child {
  margin-bottom: 0;
}

.calibration-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  padding: 22px 0;
}

.calibration-card,
.personal-notes {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(20, 27, 20, 0.96), rgba(7, 9, 7, 0.92));
  box-shadow: 0 0 0 1px rgba(116, 255, 139, 0.05), 0 18px 40px rgba(0, 0, 0, 0.23);
  padding: 16px;
}

.calibration-card h2 {
  margin: 0 0 14px;
  color: var(--text);
  font-size: 1.18rem;
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

label {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: var(--green);
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.28);
  color: var(--text);
  font: inherit;
  font-size: 0.92rem;
  letter-spacing: 0;
  padding: 11px 12px;
  text-transform: none;
  outline: none;
}

textarea {
  resize: vertical;
  line-height: 1.45;
}

input:focus,
textarea:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 2px rgba(119, 247, 255, 0.12);
}

input::placeholder,
textarea::placeholder {
  color: rgba(169, 191, 168, 0.62);
}

.calibration-card > label {
  margin-top: 12px;
}

.notes-actions {
  display: flex;
  justify-content: flex-start;
  padding-top: 16px;
}

button {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(16, 22, 16, 0.78);
  color: var(--cyan);
  cursor: pointer;
  font: inherit;
  padding: 10px 12px;
}

button:focus,
button:hover {
  border-color: var(--cyan);
}

@media (max-width: 520px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .nav-links {
    justify-content: flex-start;
  }
}

@media (min-width: 700px) {
  .shell {
    padding: 32px;
  }

  .hero {
    min-height: 52vh;
  }

  .menu {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    padding: 32px 0;
  }

  .drink-card {
    grid-template-columns: 118px minmax(0, 1fr);
    padding: 16px;
  }

  .cup {
    width: 96px;
    height: 124px;
  }

  .css-cake {
    width: 96px;
    height: 124px;
  }

  .qr-panel {
    grid-template-columns: minmax(0, 1fr) auto;
  }

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

@media (min-width: 1040px) {
  .menu {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .calibration-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .calibration-card .field-grid {
    grid-template-columns: 1fr;
  }
}
