:root {
  --bg: #fffdf8;
  --text: #211d17;
  --muted: #9a8f79;
  --border: #e7e0d2;
  --hover: #efe8d9;
  --radius: 2px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Roboto', sans-serif;
  font-size: 16px;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

.app {
  max-width: 560px;
  margin: 0 auto;
  padding: 0 16px;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

/* ---------- header ---------- */

.top {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 20px 0 16px;
}

h1 {
  font-size: 22px;
  font-weight: 700;
  white-space: nowrap;
}

.tag {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.wake {
  margin-left: auto;
  font-size: 11px;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px 10px;
  white-space: nowrap;
}

.wake:hover {
  background: var(--hover);
  border-color: transparent;
  color: var(--text);
}

.wake.on {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}

/* ---------- slot rows ---------- */

.row {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.reel {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 50px;
  padding: 0 12px;
  border-bottom: 1px solid var(--border);
  touch-action: pan-y;
  cursor: grab;
  user-select: none;
  overflow: hidden;
}

.row-label {
  width: 78px;
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
}

.reel .name {
  font-size: 16px;
  font-weight: 500;
}

.arrow,
.lock {
  width: 40px;
  border-radius: var(--radius);
  color: var(--muted);
}

.arrow {
  font-size: 18px;
  line-height: 1;
}

.arrow:hover,
.lock:hover {
  background: var(--hover);
  color: var(--text);
}

.lock {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.row.locked .lock {
  background: var(--text);
  color: var(--bg);
}

/* reel spin */

.reel.spinning .name {
  filter: blur(1px);
  animation: jitter 0.12s linear infinite;
}

@keyframes jitter {
  0%   { transform: translateY(-1px); }
  50%  { transform: translateY(1px); }
  100% { transform: translateY(-1px); }
}

.reel.landed .name {
  animation: land 0.25s ease-out;
}

@keyframes land {
  0%   { opacity: 0.4; }
  100% { opacity: 1; }
}

/* ---------- control tray ---------- */

.tray {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
}

#dice {
  font-size: 15px;
  font-weight: 700;
  padding: 11px 32px;
  border: 1px solid var(--text);
  border-radius: var(--radius);
}

#dice:hover {
  background: var(--text);
  color: var(--bg);
}

#dice.rolling {
  animation: pulse 0.9s ease-in-out;
}

@keyframes pulse {
  50% { opacity: 0.45; }
}

.stepper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.stepper button {
  width: 30px;
  height: 30px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 15px;
}

.stepper button:hover {
  background: var(--hover);
  border-color: transparent;
}

#serv-label {
  font-size: 12px;
  min-width: 58px;
  text-align: center;
  color: var(--muted);
}

.vegan {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}

.vegan input {
  width: 15px;
  height: 15px;
  accent-color: var(--text);
  cursor: pointer;
}

/* ---------- recipe ---------- */

.recipe {
  margin: 30px 0 130px;
}

.recipe h2 {
  font-size: 20px;
  line-height: 1.25;
}

.recipe .meta {
  margin: 8px 0 20px;
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
}

.recipe h3 {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

.recipe .cols {
  display: grid;
  gap: 26px;
}

@media (min-width: 560px) {
  .recipe .cols {
    grid-template-columns: 5fr 7fr;
  }
}

.recipe ul {
  list-style: none;
}

.recipe ul li {
  font-size: 14px;
  padding: 4px 0;
  line-height: 1.45;
}

.recipe ol {
  list-style: none;
  counter-reset: step;
}

.recipe ol li {
  counter-increment: step;
  position: relative;
  font-size: 14px;
  line-height: 1.55;
  padding: 0 0 12px 28px;
}

.recipe ol li::before {
  content: counter(step) ".";
  position: absolute;
  left: 0;
  top: 0;
  font-weight: 700;
  color: var(--muted);
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
