:root {
  --paper: #f7f3e9;
  --ink: #243e32;
  --muted: #53685b;
  --border: #d7dcca;
  --green: #28493b;
  --mint: #e1e9d9;
  --accent: #a8432e;
  --accent-dark: #8c3625;
  --sans: system-ui, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", "WenQuanYi Zen Hei", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--paper);
  background-image: radial-gradient(ellipse at 50% 0%, #e7ebde 0%, var(--paper) 68%);
  font: 16px/1.5 var(--sans);
  -webkit-tap-highlight-color: transparent;
}

button, input { font: inherit; }
button { cursor: pointer; color: inherit; }
button:disabled { cursor: default; }
button:focus, input:focus + span { outline: 2px solid #35725b; outline-offset: 3px; }
h1:focus, h2:focus { outline: none; }
h1, h2, p, ol { margin: 0; }
h1 { font-size: 40px; font-weight: 800; line-height: 1.16; overflow-wrap: break-word; }
h2 { font-size: 20px; font-weight: 700; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.shell { max-width: 510px; margin: 0 auto; padding: 0 22px 36px; }
.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 79px;
  border-bottom: 1px solid #cdd7c8;
}
.brand { display: flex; align-items: center; font-size: 16px; font-weight: 700; white-space: nowrap; }
.brand-icon {
  position: relative;
  display: inline-block;
  width: 32px;
  height: 32px;
  margin-right: 9px;
  border-radius: 50%;
  background: var(--green);
}
.brand-icon::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 14px;
  width: 18px;
  height: 9px;
  border-radius: 2px 2px 12px 12px;
  background: #f5e7b7;
}
.brand-icon::after {
  content: "";
  position: absolute;
  left: 13px;
  top: 7px;
  width: 6px;
  height: 5px;
  border-left: 1px solid #f5e7b7;
  border-right: 1px solid #f5e7b7;
  transform: skew(-14deg);
}
.history-link {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 11px;
  border: 1px solid #c8d3c5;
  border-radius: 22px;
  background: #f8f8ef;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.clock {
  position: relative;
  width: 13px;
  height: 13px;
  margin-right: 6px;
  border-radius: 50%;
  border: 1px solid currentColor;
}
.clock::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 2px;
  height: 4px;
  width: 3px;
  border-left: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
}

.home-intro { padding: 28px 0 25px; }
.date-line {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .055em;
}
.date-line span { margin-right: 8px; width: 19px; height: 1px; background: var(--accent); }
.home-intro h1 { font-size: 57px; line-height: 1.11; letter-spacing: -.06em; }
#meal-title { margin-left: .06em; color: var(--accent); }
.meal-choice {
  display: flex;
  min-width: 0;
  margin: 0 0 20px;
  padding: 4px;
  border: 1px solid var(--border);
  background: #edf0e6;
  border-radius: 14px;
}
.meal-choice label { flex: 1 1 25%; min-width: 0; position: relative; cursor: pointer; }
.meal-choice input, .switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.meal-choice span {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 45px;
  color: var(--muted);
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
}
.meal-choice input:checked + span {
  color: var(--ink);
  background: #fffdf5;
  border-color: var(--border);
  box-shadow: 0 2px 4px rgba(38, 64, 49, .06);
}

.ticket {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  color: #f7f3e7;
  background-color: var(--green);
  background-image: radial-gradient(ellipse at 5% 0%, #405d49, var(--green) 62%);
  box-shadow: 0 12px 25px rgba(36, 62, 50, .14);
}
.ticket-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 19px;
  min-height: 55px;
  border-bottom: 1px solid #658171;
  font-size: 13px;
  font-weight: 600;
}
.ticket-label { letter-spacing: .10em; color: #e7eddc; }
#pool-count { color: #f3dca9; font-variant-numeric: tabular-nums; }
.reel { padding: 15px 19px; }
.reel-window {
  height: 158px;
  position: relative;
  overflow: hidden;
  text-align: center;
}
.reel-window::before {
  content: "";
  position: absolute;
  top: 52px;
  left: 0;
  right: 0;
  height: 54px;
  border: 1px solid #6d8977;
  border-radius: 10px;
  background: #3a5b4b;
}
.reel-window::after {
  content: "";
  position: absolute;
  right: 10px;
  left: 10px;
  top: 75px;
  height: 8px;
  border-left: 3px solid #e9cc91;
  border-right: 3px solid #e9cc91;
  border-radius: 2px;
  pointer-events: none;
}
.reel-row {
  position: relative;
  height: 53px;
  line-height: 53px;
  color: #c3d3bf;
  font-size: 20px;
  letter-spacing: .05em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 16px;
}
.reel-center { color: #fff7df; font-weight: 800; font-size: 26px; }
.reel-track { position: relative; }
.ticket-bottom {
  position: relative;
  border-top: 1px dashed #799080;
  padding: 17px 19px 20px;
}
.ticket-bottom::before, .ticket-bottom::after {
  content: "";
  position: absolute;
  top: -8px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--paper);
}
.ticket-bottom::before { left: -8px; }
.ticket-bottom::after { right: -8px; }
.ticket-bottom > .button { width: 100%; }
.ticket-bottom .message { color: #f7ebce; margin-top: 10px; }
.ticket-bottom .pale { margin-top: 10px; }
.spark { padding-left: 6px; color: #ffe1a7; }

.button {
  min-height: 51px;
  padding: 8px 16px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
}
.button span { margin-left: 4px; }
.primary {
  color: #fffaf2;
  background: var(--accent);
  box-shadow: inset 0 1px 0 rgba(255, 245, 228, .18);
}
.primary:active { background: var(--accent-dark); }
.primary:disabled { background: #805144; }
.secondary { border-color: #aebfae; background: #f8f8ef; }
.secondary:active { background: #e4ebdc; }
.secondary:disabled { color: #566758; }
.pale { background: #f8efd8; color: var(--ink); }
.text-button, .back { border: 0; padding-left: 0; background: transparent; }
.back { min-height: 44px; padding-right: 12px; font-size: 14px; font-weight: 700; }
.back span { display: inline-block; vertical-align: -1px; font-size: 20px; line-height: 1; }
.text-button { color: var(--muted); font-size: 14px; box-shadow: none; }
.message { color: var(--muted); font-size: 14px; }
.message:empty { margin: 0; }

.breadcrumb {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 9px 0 10px;
  color: var(--muted);
  font-size: 13px;
}
.breadcrumb > span {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #edf0e6;
  padding: 2px 11px;
}
.result-body {
  padding: 19px;
  background: #fffbf0;
  border: 1px solid var(--border);
  border-radius: 19px;
  box-shadow: 0 10px 24px rgba(36, 62, 50, .075);
}
.dish-header { padding: 2px 0 16px; }
.category-label { margin-bottom: 6px; color: var(--accent); font-weight: 700; font-size: 13px; letter-spacing: .09em; }
.dish-copy { margin-top: 8px; color: var(--muted); font-size: 15px; }
.food-art {
  border-radius: 12px;
  overflow: hidden;
  width: 100%;
  position: relative;
  padding-top: 59.78%;
  background: #e3ead8;
}
.food-art p, .food-art img { position: absolute; left: 0; top: 0; width: 100%; height: 100%; }
.food-art p {
  display: flex;
  justify-content: center;
  align-items: center;
  color: #43644f;
  letter-spacing: .12em;
  font-size: 19px;
  font-weight: 700;
}
.food-art img { display: block; object-fit: cover; }
.result-meta {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
}
#only-one { font-weight: 600; }
.decision-actions, .share-actions { display: flex; margin-top: 15px; }
.decision-actions > *, .share-actions > * { flex: 1 1 0; }
.decision-actions > :first-child, .share-actions > :first-child { margin-right: 9px; }
.decision-actions > :first-child { flex-grow: 1.55; }

.confirmed .dish-header { padding-bottom: 11px; }
.confirmed h1 { font-size: 28px; }
.confirmed .dish-copy, .confirmed .food-art { display: none; }
.share { border-top: 1px dashed #bdc9b8; padding-top: 12px; }
.share h2 { font-size: 15px; margin-bottom: 8px; }
.share .message { margin: 7px 0; }
.share > img {
  width: 100%;
  max-width: 300px;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 9px;
}
.share-actions, .share > .text-button { max-width: 350px; margin-left: auto; margin-right: auto; }
.share > .text-button { display: block; width: 100%; margin-top: 4px; }

#history h1 { margin-bottom: 20px; }
#history h2 { margin: 23px 0 10px; }
.history-setting, .empty-history {
  padding: 14px 15px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: #fffaf0;
}
.history-setting p, .empty-history { color: var(--muted); font-size: 14px; }
.history-setting p { margin: 6px 0 1px; }
.switch {
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  justify-content: space-between;
  min-height: 45px;
  font-weight: 700;
  cursor: pointer;
}
.switch-track {
  position: relative;
  display: inline-block;
  width: 43px;
  height: 25px;
  border-radius: 13px;
  background: #757d73;
}
.switch-track::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 4px;
  height: 17px;
  width: 17px;
  border-radius: 50%;
  background: #fffaf0;
}
.switch input:checked + .switch-track { background: var(--green); }
.switch input:checked + .switch-track::after { left: 22px; }
.history-list { list-style: none; padding: 0; }
.history-list li {
  padding: 12px 1px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
}
.history-list li > span { color: var(--muted); font-size: 13px; margin-left: 8px; }
.history-list time { margin-left: 8px; }

.reel-track.rolling { animation: reel-step 94ms linear infinite; }
@media (prefers-reduced-motion: reduce) {
  .reel-track.rolling { animation: none; }
}
@keyframes reel-step {
  from { transform: translateY(0); }
  to { transform: translateY(-53px); }
}

@media (max-width: 364px) {
  .shell { padding-left: 15px; padding-right: 15px; }
  .home-intro h1 { font-size: 48px; }
  .result-body { padding: 14px; }
  #dish-name { font-size: 33px; }
}
