:root {
  --ink: #f3efe8;
  --muted: rgba(243, 239, 232, 0.62);
  --bg: #0c0c0c;
  --paper: #f4efe6;
  --serif: "Playfair Display", Pretendard, Georgia, serif;
  --sans: Outfit, Pretendard, "Segoe UI", sans-serif;
}

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

html, body { margin: 0; background: var(--bg); color: var(--ink); }

body {
  min-height: 100vh;
  font-family: var(--sans);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.65;
}

button, a { font: inherit; color: inherit; }
button { cursor: pointer; }
a { text-decoration: none; }
::placeholder { color: rgba(243, 239, 232, 0.38); }

.bar {
  position: sticky;
  top: 0;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 78px;
  padding: 0 clamp(18px, 4vw, 48px);
  background: rgba(12, 12, 12, 0.92);
}

.brand-type { display: flex; flex-direction: column; line-height: 1; }

.brand-type strong {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 22px;
  letter-spacing: 0;
}

.brand-type small {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

.brand-type i {
  width: 16px;
  height: 1px;
  background: rgba(243, 239, 232, 0.4);
}

nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 28px);
}

nav button, nav span {
  border: 0;
  background: none;
  padding: 0;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(243, 239, 232, 0.78);
}

nav button[aria-current="page"], nav button:hover,
.front nav a[aria-current="page"], .front nav a:hover { color: #fff; }

.front .brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.front .brand img { width: 42px; height: auto; }

.front .brand-type strong {
  font-size: 18px;
  white-space: nowrap;
  letter-spacing: -0.03em;
}

.front nav a {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(243, 239, 232, 0.78);
  white-space: nowrap;
}

.home-view.is-on,
.home-view.is-leaving { overflow: hidden; background: #f4efe6; }

.home-stage {
  position: relative;
  width: 100%;
  height: 100%;
  background: #f4efe6;
}

.home-film {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  aspect-ratio: 1;
  max-width: 100%;
}

.home-film video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #f4efe6;
}

.home-shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    #f4efe6 0%,
    rgba(244, 239, 230, 0.92) 10%,
    rgba(244, 239, 230, 0.62) 24%,
    rgba(244, 239, 230, 0.28) 40%,
    rgba(244, 239, 230, 0.08) 52%,
    rgba(244, 239, 230, 0) 64%
  );
}

.home-logo {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: max(28px, calc((100% - min(100%, calc(100vh - 78px)) - min(420px, 42vw)) / 2));
  width: min(420px, 42vw);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  color: #241c16;
  transform: translateY(-50%);
  opacity: 0;
}

.home-logo.is-in { opacity: 1; }

.home-logo img { width: 58%; height: auto; }

.home-logo strong {
  margin-top: 10px;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(28px, 3vw, 42px);
  letter-spacing: -0.03em;
  line-height: 1;
  white-space: nowrap;
}

.home-logo small {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.home-logo small i { width: 28px; height: 1px; background: #241c16; }

.home-veil {
  position: absolute;
  inset: 0;
  z-index: 3;
  background: #0c0c0c;
  pointer-events: none;
}

.menu-board form {
  width: min(520px, 100%);
  margin: 28px auto 0;
  color: #1c1916;
}

.menu-board h2,
.menu-board .lead,
.menu-board .quiet { color: #1c1916; text-align: center; }

.menu-board .lead,
.menu-board .quiet {
  max-width: 36em;
  margin-left: auto;
  margin-right: auto;
  color: #5c534c;
}

.menu-board label span { color: #6d5f52; }

.menu-board input {
  color: #1c1916;
  border-bottom-color: rgba(28, 25, 22, 0.35);
}

.menu-board input:focus { border-bottom-color: #1c1916; }

.menu-board .send { color: #1c1916; }

.menu-board .form-error { color: #8d3d32; text-align: center; }

.menu-head img { width: 46px; height: auto; }

.board-tools {
  display: flex;
  justify-content: flex-end;
  gap: 18px;
  margin-top: 14px;
  color: #6d5f52;
  font-size: 13px;
}

.board-tools button {
  border: 0;
  background: none;
  color: #1c1916;
  padding: 0;
}

html.is-phone .front .bar {
  height: auto;
  flex-wrap: wrap;
  row-gap: 12px;
  padding: 14px 16px 12px;
}

html.is-phone .front nav { flex: 1 1 100%; justify-content: flex-end; gap: 22px; }

html.is-phone .home-film {
  width: 100%;
  height: auto;
  max-width: none;
  top: 50%;
  transform: translateY(-50%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 16%, #000 84%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 16%, #000 84%, transparent 100%);
}

html.is-phone .home-logo {
  left: 18px;
  width: min(260px, 72vw);
  top: 22%;
  transform: none;
}

html.is-phone .home-logo strong { font-size: 28px; white-space: normal; }

#views {
  position: relative;
  height: calc(100vh - 78px);
  overflow: hidden;
}

.view { display: none; min-height: 100%; }

.view.is-on,
.view.is-leaving {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
}

.view.is-leaving { pointer-events: none; }

.pane { transform-origin: center center; }

.split {
  min-height: 100%;
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(280px, 1fr);
  gap: clamp(32px, 6vw, 88px);
  align-items: center;
  padding: 48px clamp(28px, 7vw, 110px) 72px;
}

.about {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px clamp(24px, 8vw, 120px);
}

h1, .about h1, .split h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(40px, 5vw, 72px);
  letter-spacing: -0.03em;
  line-height: 1.12;
}

.lead, .quiet {
  margin: 22px 0 0;
  max-width: 36em;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}

form {
  width: min(480px, 100%);
  display: grid;
  gap: 28px;
}

form h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 32px;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

label { display: grid; gap: 8px; }

label span {
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--muted);
}

input {
  width: 100%;
  border: 0;
  border-bottom: 1px solid rgba(243, 239, 232, 0.38);
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 300;
  padding: 12px 0;
}

input:focus { outline: none; border-bottom-color: #fff; }

.send {
  justify-self: start;
  border: 0;
  background: none;
  color: #d7e4ea;
  font-size: 16px;
  letter-spacing: 0.04em;
  padding: 0;
}

.send:disabled { opacity: 0.45; cursor: wait; }

.actions { display: flex; gap: 28px; margin-top: 28px; }

.menu-board .actions { justify-content: center; }

.form-error { min-height: 1.4em; margin: 0; color: #e7b2a8; }

.menu-scene {
  min-height: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 28px 24px 64px;
}

.menu-board {
  width: min(980px, 94vw);
  padding: 34px 40px 48px;
  background:
    linear-gradient(180deg, rgba(255, 252, 246, 0.5), transparent 42px),
    linear-gradient(180deg, #f8f1e4, #efe4d2);
  color: #1c1916;
  border: 1px solid rgba(92, 70, 48, 0.28);
  box-shadow:
    inset 0 0 0 7px #f8f1e4,
    inset 0 0 0 8px rgba(92, 70, 48, 0.35),
    0 28px 50px rgba(0, 0, 0, 0.35);
  clip-path: inset(0 0 100% 0);
}

.menu-board.is-open {
  animation: unroll 1s cubic-bezier(0.65, 0.05, 0.28, 1) forwards;
}

@keyframes unroll {
  from { clip-path: inset(0 0 100% 0); }
  to { clip-path: inset(0 0 0 0); }
}

.menu-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(92, 70, 48, 0.22);
}

.menu-head strong {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 30px;
  letter-spacing: -0.03em;
  line-height: 1;
}

.menu-head em {
  font-style: normal;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #6d5f52;
}

.board-search {
  width: min(420px, 100%);
  margin: 22px auto 0;
  border: 0;
  border-bottom: 1px solid rgba(28, 25, 22, 0.28);
  background: transparent;
  color: #1c1916;
  text-align: center;
}

.board-search:focus { outline: none; border-bottom-color: #1c1916; }
.board-search::placeholder { color: rgba(28, 25, 22, 0.38); }

.picks {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 22px;
  margin-top: 22px;
}

.picks button {
  border: 0;
  border-bottom: 1px solid transparent;
  background: transparent;
  color: #6d5f52;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 500;
  padding: 0 0 2px;
}

.picks button[aria-pressed="true"] {
  color: #1c1916;
  border-bottom-color: #1c1916;
}

.list { margin-top: 8px; }

.entry {
  padding: 22px 0 8px;
  border-top: 1px solid rgba(92, 70, 48, 0.18);
  opacity: 0;
}

.entry.is-in { opacity: 1; }

.entry .cat {
  margin: 0;
  color: #6d5f52;
  font-size: 12px;
  letter-spacing: 0.08em;
}

.phrase {
  margin: 8px 0 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(26px, 3vw, 34px);
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.meaning { margin: 10px 0 0; font-size: 16px; line-height: 1.6; }
.trap, .example, .ko { margin: 8px 0 0; color: #5c534c; }
.example {
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
  line-height: 1.45;
}

.blurb, .count { margin: 18px 0 0; text-align: center; color: #6d5f52; }
.count { margin-top: 4px; font-size: 13px; letter-spacing: 0.08em; }
.empty { margin: 28px 0; text-align: center; color: #6d5f52; }

.admin-list .entry,
.admin-list .user { opacity: 1; }

.admin-list .entry { border-top-color: rgba(243, 239, 232, 0.2); }

.admin-list .picks button {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 14px;
}

.admin-list .picks button[aria-pressed="true"] {
  color: #fff;
  border-bottom-color: #fff;
}

.admin-list .trap,
.admin-list .example,
.admin-list .ko,
.admin-list .blurb,
.admin-list .cat { color: var(--muted); }

.admin-list { width: min(760px, calc(100% - 48px)); margin: 0 auto; padding: 12px 0 48px; }

.user {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px 24px;
  align-items: center;
  padding: 20px 0;
  border-top: 1px solid rgba(243, 239, 232, 0.2);
  opacity: 0;
}

.user.is-in { opacity: 1; }
.user h2 { margin: 0; font-family: var(--serif); font-weight: 500; font-size: 26px; }
.meta { margin: 4px 0 0; color: var(--muted); }
.num { font-variant-numeric: tabular-nums; color: var(--ink); }

.row-actions { display: flex; flex-wrap: wrap; gap: 16px; }
.row-actions button { border: 0; background: none; color: #d7e4ea; padding: 0; font-size: 14px; }
.row-actions button.danger { color: #e7b2a8; }

:focus-visible { outline: 1px solid #d7e4ea; outline-offset: 3px; }
input:focus-visible, .board-search:focus-visible { outline: none; }

@media (max-width: 860px) {
  .bar { height: auto; flex-wrap: wrap; row-gap: 12px; padding: 14px 16px 12px; }
  #views { height: calc(100vh - 108px); }
  .split { grid-template-columns: 1fr; align-items: start; padding: 32px 20px 48px; }
  .about { padding: 40px 24px; }
  h1, .about h1, .split h1 { font-size: 40px; }
  .menu-board { padding: 22px 16px 28px; }
  .user { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .menu-board { clip-path: none; animation: none; }
  .entry, .user { opacity: 1; }
}
