html {
  color-scheme: dark;
  --ink: #fff;
  --muted: rgba(255, 255, 255, 0.72);
  --line: rgba(255, 255, 255, 0.16);
  --paper: #0b1f3a;
  --card: #143056;
  --accent: #7eb6e6;
  --on-accent: #0b1f3a;
  --chip: #1b446f;
  --top: rgba(20, 48, 86, 0.95);
  --input: #102844;
  --danger: #fecaca;
  --danger-bg: #4a2030;
  font-family: "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
}

html[data-theme="light"] {
  color-scheme: light;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --paper: #f8fafc;
  --card: #fff;
  --accent: #0f766e;
  --on-accent: #fff;
  --chip: #f1f5f9;
  --top: rgba(255, 255, 255, 0.95);
  --input: #fff;
  --danger: #991b1b;
  --danger-bg: #fef2f2;
}

html[data-theme="black"] {
  color-scheme: dark;
  --ink: #fafafa;
  --muted: #a3a3a3;
  --line: rgba(255, 255, 255, 0.14);
  --paper: #0a0a0a;
  --card: #171717;
  --accent: #d4d4d4;
  --on-accent: #111;
  --chip: #262626;
  --top: rgba(23, 23, 23, 0.95);
  --input: #111;
  --danger: #fecaca;
  --danger-bg: #3f1d1d;
}

html[data-theme="navy"] {
  color-scheme: dark;
  --ink: #fff;
  --muted: rgba(255, 255, 255, 0.72);
  --line: rgba(255, 255, 255, 0.16);
  --paper: #0b1f3a;
  --card: #143056;
  --accent: #7eb6e6;
  --on-accent: #0b1f3a;
  --chip: #1b446f;
  --top: rgba(20, 48, 86, 0.95);
  --input: #102844;
  --danger: #fecaca;
  --danger-bg: #4a2030;
}

html[data-theme="wine"] {
  color-scheme: dark;
  --ink: #fff7f8;
  --muted: #f3d5dc;
  --line: rgba(255, 247, 248, 0.14);
  --paper: #3f1020;
  --card: #5c1830;
  --accent: #f3c1ce;
  --on-accent: #3f1020;
  --chip: #73243c;
  --top: rgba(92, 24, 48, 0.95);
  --input: #4a1528;
  --danger: #fecaca;
  --danger-bg: #6b2030;
}

html[data-theme="green"] {
  color-scheme: dark;
  --ink: #f3fff9;
  --muted: #c9e6da;
  --line: rgba(243, 255, 249, 0.18);
  --paper: #0e2f26;
  --card: #164538;
  --accent: #b7f0d4;
  --on-accent: #0e2f26;
  --chip: #1e5a48;
  --top: rgba(22, 69, 56, 0.95);
  --input: #0c261f;
  --danger: #fecaca;
  --danger-bg: #4a2030;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { min-height: 100dvh; background: var(--paper); color: var(--ink); }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
a.solid {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 3rem;
  text-decoration: none;
}

.screen { min-height: 100dvh; }
.wrap { width: min(32rem, 100%); margin: 0 auto; }
.top {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: var(--top);
  backdrop-filter: blur(8px);
}
.top-row, .cats, .langs, .main, .foot-row, .sheet-body, .sheet-foot {
  padding-left: 1rem;
  padding-right: 1rem;
}
.top-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-top: max(0.75rem, env(safe-area-inset-top));
  padding-bottom: 0.75rem;
}
.grow { min-width: 0; flex: 1; }
.eyebrow { margin: 0; font-size: 0.75rem; color: var(--muted); }
h1, h2, p { margin: 0; }
h1 { font-size: 1.25rem; }
.sample-link {
  display: inline-flex;
  align-items: center;
  min-height: 3rem;
  padding: 0 0.75rem;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.875rem;
  box-shadow: inset 0 0 0 1px var(--line);
}
.cats {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.75rem;
}
.langs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-bottom: 0.75rem;
}
.chip, .choice, .solid, .ghost, .qty button, .line-qty button {
  min-height: 3rem;
  border: 0;
  border-radius: 0.75rem;
}
.chip {
  flex: none;
  min-width: 3rem;
  padding: 0 1rem;
  background: var(--chip);
  color: var(--ink);
  font-size: 1rem;
}
.chip.on { background: var(--accent); color: var(--on-accent); }
.seats { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
.main { padding-top: 1rem; padding-bottom: calc(5.5rem + env(safe-area-inset-bottom)); }
.cat { margin-bottom: 2rem; scroll-margin-top: 7rem; }
.cat h2 { font-size: 1rem; font-weight: 500; color: var(--muted); }
.item, .line {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.5rem;
  padding: 0.75rem 1rem;
  border: 0;
  border-radius: 1rem;
  background: var(--card);
  text-align: left;
  box-shadow: inset 0 0 0 1px var(--line);
}
.item { min-height: 4.5rem; padding: 0.5rem 0.75rem; }
.item .label { flex: 1; min-width: 0; }
.thumb {
  width: 4.5rem;
  height: 4.5rem;
  object-fit: cover;
  border-radius: 0.75rem;
  flex: none;
  background: #102844;
}
.sheet-photo {
  display: block;
  width: 10rem;
  height: 7rem;
  margin: 0 auto 0.75rem;
  object-fit: cover;
  border-radius: 0.75rem;
  background: #102844;
}
.item:disabled { opacity: 0.5; }
.name { display: block; font-size: 1.125rem; font-weight: 500; }
.desc, .price, .note { color: var(--muted); }
.desc { display: block; margin-top: 0.15rem; font-size: 0.875rem; }
.price { flex: none; font-size: 1.125rem; }
.note { margin: 1rem 0; text-align: center; font-size: 1.125rem; }
.alert {
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  background: var(--danger-bg);
  color: var(--danger);
  font-size: 1rem;
}

.foot, .sheet {
  position: fixed;
  z-index: 30;
}
.foot {
  inset: auto 0 0 0;
  border-top: 1px solid var(--line);
  background: var(--card);
  padding: 0.75rem 1rem max(0.75rem, env(safe-area-inset-bottom));
}
.foot-row { display: flex; gap: 0.5rem; width: min(32rem, 100%); margin: 0 auto; padding: 0; }
.cart-open {
  min-height: 3rem;
  min-width: 0;
  flex: 1;
  border: 0;
  border-radius: 0.75rem;
  background: transparent;
  text-align: left;
  font-size: 1rem;
}
.cart-open span { display: block; }
.cart-open small { color: var(--muted); }
.solid {
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 500;
  font-size: 1rem;
}
.solid:disabled, .choice:disabled { opacity: 0.4; }
.ghost { background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); font-size: 1rem; }

.mask {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: flex-end;
  background: rgba(15, 23, 42, 0.4);
}
.sheet {
  display: flex;
  width: 100%;
  max-height: 85dvh;
  flex-direction: column;
  border-radius: 1.5rem 1.5rem 0 0;
  background: var(--card);
  color: var(--ink);
}
.handle { width: 3rem; height: 0.375rem; margin: 0.75rem auto; border-radius: 999px; background: var(--line); }
.sheet-head, .qty-row, .line-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.sheet-head { padding: 0 1rem 0.75rem; }
.sheet-body { flex: 1; overflow: auto; padding-bottom: 1rem; }
.sheet-foot { border-top: 1px solid var(--line); padding-top: 0.75rem; padding-bottom: max(0.75rem, env(safe-area-inset-bottom)); }
.group { margin-bottom: 1rem; }
.group legend { font-size: 1rem; color: var(--muted); }
.choice {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.5rem;
  padding: 0 1rem;
  background: var(--card);
  color: var(--ink);
  text-align: left;
  font-size: 1rem;
  box-shadow: inset 0 0 0 1px var(--line);
}
.choice.on { background: var(--accent); color: var(--on-accent); }
.qty-row { margin-bottom: 0.75rem; }
.qty, .line-qty { display: flex; align-items: center; gap: 0.5rem; }
.qty button, .line-qty button {
  width: 3rem;
  background: var(--card);
  color: var(--ink);
  font-size: 1.25rem;
  box-shadow: inset 0 0 0 1px var(--line);
}
.wide { width: 100%; }
label { display: block; margin-bottom: 0.75rem; font-size: 1rem; }
input {
  width: 100%;
  min-height: 3rem;
  margin-top: 0.25rem;
  padding: 0 0.75rem;
  border: 1px solid var(--line);
  background: var(--input);
  color: var(--ink);
  border-radius: 0.75rem;
  font-size: 1rem;
}
.privacy { margin-bottom: 0.75rem; white-space: pre-wrap; color: var(--muted); font-size: 1rem; }
.agree { width: 100%; margin-top: 0.5rem; text-align: left; }
.agree.on { background: var(--accent); color: var(--on-accent); }
.line { display: block; background: var(--paper); }
.line-top { align-items: flex-start; }
.line-qty { margin-top: 0.75rem; }

.ticket { display: flex; min-height: 100dvh; flex-direction: column; padding: max(1.5rem, env(safe-area-inset-top)) 1rem max(1rem, env(safe-area-inset-bottom)); }
.center { text-align: center; }
.seq { margin-top: 1.5rem; font-size: 6rem; font-weight: 650; line-height: 1; letter-spacing: -0.04em; }
.status { margin-top: 1rem; font-size: 1.5rem; font-weight: 500; }
.ticket ul { margin: 2rem 0 0; padding: 0; list-style: none; font-size: 1.125rem; }
.ticket li { display: flex; justify-content: space-between; gap: 0.75rem; margin-top: 0.75rem; }
.actions { display: grid; gap: 0.5rem; margin-top: auto; padding-top: 2rem; }

.board { min-height: 100dvh; padding: max(1rem, env(safe-area-inset-top)) 1rem max(1rem, env(safe-area-inset-bottom)); }
.board-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.board h1 { font-size: clamp(1.5rem, 3vw, 2.5rem); }
.head-links { display: flex; gap: 0.5rem; }
.back { color: var(--accent); text-decoration: none; font-size: 1rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: 0.75rem; margin-top: 1rem; }
.ticket-card { padding: 1rem; border-radius: 1rem; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.ticket-card .seq { margin-top: 0; font-size: 3.5rem; }
.meta { color: var(--muted); }
.ticket-card ul { margin: 0.75rem 0 0; padding: 0; list-style: none; font-size: 1.25rem; }
.ticket-card li { margin-top: 0.35rem; }
.ticket-card .actions { margin-top: 1rem; padding-top: 0; }
.empty { margin-top: 4rem; text-align: center; color: var(--muted); font-size: 1.5rem; }

.owner { min-height: 100dvh; padding: max(1rem, env(safe-area-inset-top)) 1rem max(1rem, env(safe-area-inset-bottom)); }
.owner h1, .owner h2 { font-size: 1.5rem; }
.owner h2 { margin-top: 1.5rem; }
.themes { display: grid; gap: 0.5rem; width: min(32rem, 100%); margin-top: 1rem; }
.theme {
  display: flex;
  width: 100%;
  min-height: 3rem;
  align-items: center;
  gap: 0.75rem;
  padding: 0 1rem;
  border: 0;
  border-radius: 1rem;
  background: var(--card);
  color: var(--ink);
  text-align: left;
  font-size: 1rem;
  box-shadow: inset 0 0 0 1px var(--line);
}
.theme[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
.swatch { width: 0.75rem; height: 0.75rem; flex: none; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line); }

.home {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: max(1rem, env(safe-area-inset-top)) 1rem max(1.5rem, env(safe-area-inset-bottom));
}
.home-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: min(32rem, 100%);
  margin: 0 auto;
  gap: 1rem;
}
.home h1 { margin: 0; font-size: 2rem; font-weight: 600; line-height: 1.3; }
.home-lead, .home-address { margin: 0; font-size: 1.125rem; }
.home-lead { color: var(--muted); }
.home-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
.home-photos img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 0.75rem;
  background: var(--card);
}
.home-note { margin: 0; color: var(--muted); text-align: center; font-size: 1rem; }
