:root {
  color-scheme: dark;
  --bg: #100d0c;
  --surface: #191412;
  --surface-strong: #211a17;
  --line: rgba(255, 238, 216, 0.12);
  --text: #fff8ef;
  --muted: #b9aaa0;
  --red: #f04a3e;
  --red-deep: #b72d28;
  --gold: #f4ba65;
  --cream: #ffe7c2;
  --green: #72c7a0;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.32);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 20% 0%, rgba(169, 46, 34, 0.23), transparent 33rem),
    linear-gradient(180deg, #16100e 0%, var(--bg) 48%, #0d0b0a 100%);
  color: var(--text);
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.ambient {
  position: fixed;
  z-index: -1;
  width: 18rem;
  height: 18rem;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.16;
  pointer-events: none;
}

.ambient-one {
  top: 22rem;
  right: -9rem;
  background: var(--red);
}

.ambient-two {
  bottom: 10rem;
  left: -10rem;
  background: var(--gold);
}

.app-shell {
  width: min(100%, 760px);
  margin: 0 auto;
  padding: 0 20px 120px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 86px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(244, 186, 101, 0.45);
  border-radius: 12px;
  background: rgba(244, 186, 101, 0.08);
  color: var(--gold);
  font-family: Georgia, "STSong", serif;
  font-size: 22px;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 14px;
  letter-spacing: 0.06em;
}

.brand small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.2em;
}

.scope-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: #d9cec7;
  font-size: 11px;
}

.scope-pill i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(114, 199, 160, 0.1);
}

.hero {
  padding: 52px 0 26px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-family: Georgia, "STSong", serif;
  font-size: clamp(48px, 14vw, 82px);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.hero h1 em {
  color: var(--gold);
  font-style: normal;
}

.hero-note {
  max-width: 31rem;
  margin: 22px 0 32px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}

.today-card {
  position: relative;
  display: flex;
  min-height: 138px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  overflow: hidden;
  padding: 22px;
  border: 1px solid rgba(244, 186, 101, 0.22);
  border-radius: 22px;
  background:
    linear-gradient(120deg, rgba(244, 186, 101, 0.12), transparent 46%),
    var(--surface);
  box-shadow: var(--shadow);
}

.today-card::after {
  content: "";
  position: absolute;
  right: 72px;
  width: 1px;
  height: 74px;
  background: linear-gradient(transparent, rgba(244, 186, 101, 0.3), transparent);
}

.card-label {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.1em;
}

.today-card h2 {
  margin: 10px 0 6px;
  font-family: Georgia, "STSong", serif;
  font-size: 25px;
  font-weight: 500;
}

.today-card p {
  margin: 0;
  color: #cdbfb5;
  font-size: 12px;
  line-height: 1.6;
}

.today-seal {
  display: grid;
  min-width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid rgba(240, 74, 62, 0.55);
  border-radius: 50%;
  color: #ff7b6f;
  font-family: Georgia, "STSong", serif;
  font-size: 22px;
  box-shadow: inset 0 0 0 5px rgba(240, 74, 62, 0.06);
}

.primary-action {
  display: flex;
  width: 100%;
  min-height: 84px;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
  padding: 0 20px;
  border: 0;
  border-radius: 22px;
  background: linear-gradient(135deg, #f35447, #c3322c);
  color: white;
  box-shadow: 0 18px 40px rgba(183, 45, 40, 0.28);
  cursor: pointer;
  transition: transform 180ms ease, filter 180ms ease;
}

.primary-action:active,
.game-button:active {
  transform: scale(0.985);
}

.primary-action:disabled {
  cursor: wait;
  filter: saturate(0.45);
}

.dice-icon {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.1);
  font-size: 21px;
}

.primary-action span:nth-child(2) {
  min-width: 0;
  text-align: left;
}

.primary-action strong,
.primary-action small {
  display: block;
}

.primary-action strong {
  font-size: 17px;
}

.primary-action small {
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 10px;
}

.button-arrow {
  margin-left: auto;
  font-size: 24px;
}

.selection-panel {
  margin: 10px 0 54px;
  padding: 25px;
  border: 1px solid rgba(244, 186, 101, 0.26);
  border-radius: 24px;
  background:
    radial-gradient(circle at 100% 0%, rgba(244, 186, 101, 0.14), transparent 17rem),
    var(--surface-strong);
  box-shadow: var(--shadow);
  animation: rise 420ms ease both;
}

.selection-panel.is-shuffling .selection-content,
.selection-panel.is-shuffling .selection-meta {
  animation: flicker 170ms linear infinite alternate;
}

.is-hidden {
  display: none;
}

.selection-kicker {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(240, 74, 62, 0.13);
  color: #ff8f85;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.selection-content {
  display: flex;
  align-items: flex-start;
  gap: 17px;
  margin: 23px 0;
}

.selection-count {
  color: rgba(244, 186, 101, 0.36);
  font-family: Georgia, serif;
  font-size: 37px;
  line-height: 1;
}

.selection-content p {
  margin: 0 0 6px;
  color: var(--gold);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.selection-content h2 {
  margin: 0 0 7px;
  font-family: Georgia, "STSong", serif;
  font-size: clamp(26px, 8vw, 40px);
  font-weight: 500;
  line-height: 1.15;
}

.selection-content span {
  color: var(--muted);
  font-size: 11px;
}

.selection-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.meta-pill {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: #d9cbc0;
  font-size: 11px;
}

.selection-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.map-action,
.ghost-action {
  min-height: 48px;
  border-radius: 14px;
  font-size: 12px;
  font-weight: 700;
}

.map-action {
  display: grid;
  place-items: center;
  background: var(--cream);
  color: #2a1d16;
}

.ghost-action {
  padding: 0 18px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.restaurants-section {
  padding: 20px 0 58px;
  scroll-margin-top: 20px;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.section-heading h2,
.game-header h2 {
  margin: 0;
  font-family: Georgia, "STSong", serif;
  font-size: 29px;
  font-weight: 500;
}

.section-heading > span {
  color: var(--muted);
  font-size: 11px;
}

.filters {
  display: flex;
  gap: 8px;
  margin: 23px -20px 18px;
  overflow-x: auto;
  padding: 0 20px 4px;
  scrollbar-width: none;
}

.filters::-webkit-scrollbar {
  display: none;
}

.filter-chip {
  flex: 0 0 auto;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  font-size: 11px;
  cursor: pointer;
}

.filter-chip.is-active {
  border-color: rgba(244, 186, 101, 0.32);
  background: rgba(244, 186, 101, 0.12);
  color: var(--cream);
}

.restaurant-list {
  display: grid;
  gap: 11px;
}

.restaurant-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 15px;
  min-height: 112px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(30, 24, 21, 0.78);
  transition: border-color 180ms ease, transform 180ms ease, background 180ms ease;
}

.restaurant-card:hover {
  border-color: rgba(244, 186, 101, 0.25);
  background: rgba(36, 28, 24, 0.95);
  transform: translateY(-1px);
}

.restaurant-number {
  display: grid;
  width: 38px;
  height: 50px;
  place-items: center;
  border-right: 1px solid var(--line);
  color: rgba(244, 186, 101, 0.48);
  font-family: Georgia, serif;
  font-size: 14px;
}

.restaurant-main {
  min-width: 0;
}

.restaurant-type {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 6px;
  color: var(--gold);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.15em;
}

.restaurant-type::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}

.restaurant-card h3 {
  overflow: hidden;
  margin: 0;
  font-family: Georgia, "STSong", serif;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.restaurant-korean {
  display: block;
  overflow: hidden;
  margin-top: 5px;
  color: #8f827a;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.restaurant-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 10px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 10px;
}

.restaurant-facts span:first-child {
  color: #e6d8ce;
}

.restaurant-link {
  display: grid;
  width: 35px;
  height: 35px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--gold);
  font-size: 16px;
}

.empty-state {
  padding: 32px 20px;
  border: 1px dashed var(--line);
  border-radius: 20px;
  color: var(--muted);
  text-align: center;
  font-size: 12px;
}

.game-section {
  padding-bottom: 50px;
  scroll-margin-top: 20px;
}

.game-card {
  overflow: hidden;
  padding: 25px;
  border: 1px solid rgba(240, 74, 62, 0.2);
  border-radius: 27px;
  background:
    radial-gradient(circle at 100% 0%, rgba(240, 74, 62, 0.18), transparent 18rem),
    #1b1513;
  box-shadow: var(--shadow);
}

.game-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.game-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(240, 74, 62, 0.32);
  border-radius: 13px;
  color: #ff8176;
  font-family: Georgia, "STSong", serif;
}

.game-intro {
  margin: 17px 0 21px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.game-result {
  min-height: 176px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.025);
}

.game-result.is-changing {
  animation: flip 360ms ease;
}

.game-result span {
  display: inline-flex;
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(244, 186, 101, 0.11);
  color: var(--gold);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.game-result strong {
  display: block;
  margin: 19px 0 9px;
  font-family: Georgia, "STSong", serif;
  font-size: 25px;
  font-weight: 500;
}

.game-result p {
  margin: 0;
  color: #c4b6ac;
  font-size: 12px;
  line-height: 1.7;
}

.game-button {
  display: flex;
  width: 100%;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 12px;
  border: 0;
  border-radius: 16px;
  background: var(--cream);
  color: #2a1d16;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.game-button span {
  font-size: 18px;
}

.safety-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.safety-note > span {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: rgba(114, 199, 160, 0.12);
  color: var(--green);
  font-family: Georgia, "STSong", serif;
  font-size: 12px;
}

.safety-note p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.65;
}

.safety-note strong {
  color: #d9cec7;
}

footer {
  padding: 25px 0;
  border-top: 1px solid var(--line);
  color: #72665f;
  text-align: center;
  font-size: 9px;
  line-height: 1.7;
}

footer p {
  margin: 3px 0;
}

.bottom-nav {
  position: fixed;
  z-index: 20;
  right: 12px;
  bottom: max(12px, env(safe-area-inset-bottom));
  left: 12px;
  display: grid;
  width: min(calc(100% - 24px), 520px);
  min-height: 68px;
  grid-template-columns: repeat(3, 1fr);
  margin: 0 auto;
  padding: 7px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  background: rgba(22, 17, 15, 0.88);
  box-shadow: 0 15px 55px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(18px);
}

.bottom-nav a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 15px;
  color: #95887f;
  font-size: 10px;
}

.bottom-nav a span {
  font-family: Georgia, "STSong", serif;
  font-size: 14px;
}

.bottom-nav a.is-active {
  background: rgba(244, 186, 101, 0.1);
  color: var(--cream);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes flicker {
  from {
    opacity: 0.42;
    transform: translateX(-2px);
  }
  to {
    opacity: 0.9;
    transform: translateX(2px);
  }
}

@keyframes flip {
  0% {
    opacity: 0.25;
    transform: rotateX(12deg) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: rotateX(0) scale(1);
  }
}

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

  .hero {
    padding-top: 68px;
  }

  .today-card {
    padding: 27px;
  }

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

  .restaurant-card:last-child {
    grid-column: 1 / -1;
  }
}

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