@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/cormorant-cyr.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/cormorant-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/cormorant-lat.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Cormorant Garamond";
  font-style: italic;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/cormorant-cyr-i.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Cormorant Garamond";
  font-style: italic;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/cormorant-lat-i.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/manrope-cyr.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/manrope-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/manrope-lat.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/manrope-cyr.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/manrope-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/manrope-lat.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --paper: #efe6d8;
  --paper-lit: #f7f1e7;
  --ink: #1c1712;
  --bone: #f7f1e7;
  --night: #100e0c;
  --gold: #a68456;
  --line: rgba(28, 23, 18, 0.16);
  --serif: "Cormorant Garamond", "Palatino Linotype", Palatino, serif;
  --sans: "Manrope", "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  max-width: 100%;
  overflow-x: clip;
}

body {
  min-height: 100dvh;
  color: var(--ink);
  background: var(--paper-lit);
  font-family: var(--sans);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body:has(.menu) {
  color: var(--bone);
  background:
    radial-gradient(900px 480px at 50% 100%, rgba(166, 132, 86, 0.16), transparent 58%),
    var(--night);
}

body:has(.menu)::before {
  content: "";
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 42vh;
  pointer-events: none;
  background: url("ridge.svg") center bottom / 140% 100% no-repeat;
  opacity: 0.95;
}

.cover {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 36px;
  width: min(100%, 1040px);
  min-height: 100dvh;
  margin: 0 auto;
  padding:
    max(32px, env(safe-area-inset-top))
    max(22px, env(safe-area-inset-right))
    max(22px, env(safe-area-inset-bottom))
    max(22px, env(safe-area-inset-left));
}

.cover__kicker {
  margin: 0;
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.cover h1 {
  margin: 14px 0 0;
  max-width: 8em;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(3.4rem, 11vw, 7.2rem);
  line-height: 0.88;
  letter-spacing: -0.035em;
}

.cover__city {
  margin: 16px 0 0;
  color: #e6d3b0;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  line-height: 1;
}

.cover__lead {
  max-width: 34rem;
  margin: 20px 0 0;
  color: rgba(247, 241, 231, 0.78);
  font-size: 1.0625rem;
  line-height: 1.5;
}

.menu {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  width: 100%;
  margin: 0;
  padding: 0;
}

.menu :is(button, a) {
  appearance: none;
  position: relative;
  margin: 0;
  width: 100%;
  min-height: 96px;
  padding: 18px 16px 16px;
  border: 1px solid rgba(230, 211, 176, 0.35);
  border-radius: 0;
  background: transparent;
  color: var(--bone);
  cursor: pointer;
  font: 500 clamp(2rem, 6vw, 3.4rem) / 0.9 var(--serif);
  letter-spacing: -0.03em;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 10px;
  text-align: left;
  text-decoration: none;
  user-select: none;
  transition: background-color 0.45s var(--ease), color 0.45s var(--ease);
}

.menu :is(button, a) span {
  font: 500 0.72rem/1 var(--sans);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
}

.menu :is(button, a) + a {
  border-top: 1px solid rgba(230, 211, 176, 0.35);
}

.menu :is(button, a):active {
  background: var(--bone);
  color: var(--night);
}

.menu :is(button, a):focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: -6px;
}

.menu :is(button, a)::-moz-focus-inner {
  border: 0;
}

@media (hover: hover) and (pointer: fine) {
  .menu :is(button, a):hover {
    background: rgba(247, 241, 231, 0.96);
    color: var(--night);
  }

  .menu :is(button, a):hover span {
    color: var(--gold);
  }
}

@media (min-width: 800px) {
  .cover {
    padding-top: 64px;
    padding-bottom: 40px;
  }

  .menu :is(button, a) {
    min-height: 140px;
    padding: 22px 22px 20px;
  }

  .menu :is(button, a) + a {
    border-top: 1px solid rgba(230, 211, 176, 0.35);
  }
}

@media (max-width: 359px) {
  .menu {
    grid-template-columns: 1fr;
  }

  .menu :is(button, a) {
    min-height: 76px;
    font-size: 2rem;
    padding-right: 16px;
    padding-left: 16px;
  }
}

@media (max-height: 520px) and (max-width: 799px) {
  .menu :is(button, a) {
    min-height: 72px;
    font-size: 1.8rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .menu :is(button, a),
  .choice,
  .chip,
  .control {
    transition: none;
  }
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  padding:
    env(safe-area-inset-top)
    max(20px, env(safe-area-inset-right))
    0
    max(8px, env(safe-area-inset-left));
  color: var(--bone);
  background: rgba(16, 14, 12, 0.92);
  backdrop-filter: blur(12px);
}

.topbar a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  color: inherit;
  text-decoration: none;
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.topbar a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.topbar a:active {
  opacity: 0.55;
}

.topbar p {
  margin: 0;
  padding-right: 4px;
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.sheet {
  position: relative;
  z-index: 1;
  width: min(100%, 680px);
  min-width: 0;
  margin: 0 auto;
  padding:
    12px
    max(20px, env(safe-area-inset-right))
    max(48px, calc(env(safe-area-inset-bottom) + 28px))
    max(20px, env(safe-area-inset-left));
}

.section {
  margin: 0;
  padding: 20px 0 0;
  border: 0;
  scroll-margin-top: 72px;
}

.section + .section {
  margin-top: 20px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.section h2 {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  max-width: 100%;
  margin: 0 0 22px;
  font: 500 clamp(2.2rem, 6vw, 3.4rem) / 0.95 var(--serif);
  letter-spacing: -0.04em;
}

.section h2 .num {
  color: var(--gold);
  font-family: var(--sans);
  font-size: 0.42em;
  font-weight: 500;
  letter-spacing: 0.18em;
}

.section h2 .title {
  flex: 1 1 10rem;
  min-width: 0;
}

.field {
  margin: 0 0 28px;
  padding: 0;
  border: 0;
  min-width: 0;
}

.field legend,
.q,
.hint,
.choice,
.chip {
  overflow-wrap: break-word;
}

.field legend,
.q {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  white-space: normal;
  font: 500 1.0625rem/1.35 var(--sans);
  letter-spacing: -0.02em;
}

.hint {
  margin: 6px 0 0;
  color: rgba(23, 23, 23, 0.62);
  font-size: 0.875rem;
  line-height: 1.45;
}

.control {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: rgba(246, 244, 239, 0.9);
  color: inherit;
  font: 400 16px/1.45 var(--sans);
  letter-spacing: -0.01em;
  appearance: none;
}

textarea.control {
  min-height: 128px;
  resize: vertical;
}

textarea.control.short {
  min-height: 88px;
}

[hidden] {
  display: none !important;
}

.control:focus {
  outline: none;
  border-color: var(--ink);
  background: #fbfaf7;
}

.choices {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.choice,
.chip {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 52px;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: rgba(246, 244, 239, 0.9);
  color: inherit;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1.35;
  letter-spacing: -0.02em;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition:
    background-color 0.3s var(--ease),
    color 0.3s var(--ease),
    border-color 0.3s var(--ease);
}

.choice input,
.chip input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.choice:has(input:checked),
.chip:has(input:checked) {
  background: var(--night);
  border-color: var(--night);
  color: var(--bone);
}

.choice:has(input:focus-visible),
.chip:has(input:focus-visible) {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.chip {
  width: auto;
  min-height: 48px;
  padding: 10px 16px;
}

.pair {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 12px;
}

.sub {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  margin-top: 12px;
  font-size: 0.75rem;
  line-height: 1.2;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(23, 23, 23, 0.58);
}

.pair .sub {
  margin-top: 0;
}

.sub .control {
  margin-top: 0;
  color: var(--ink);
  letter-spacing: -0.01em;
  text-transform: none;
}

.money {
  grid-template-columns: 1fr 1fr;
}

.stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 12px;
}

.stats .sub {
  margin-top: 0;
}

.role {
  margin-top: 16px;
}

.role .sub {
  margin: 0;
}

.role .chips {
  margin-top: 8px;
}

.reveal {
  margin-top: 4px;
}

.reveal > .sub,
.reveal > .q,
.reveal > .chips,
.reveal > .hint {
  margin-top: 14px;
}

.field > .sub + .chips,
.field > .chips + .sub,
.reveal .chips + .q {
  margin-top: 14px;
}

.hint.limit {
  margin-top: 10px;
}

@media (max-width: 359px) {
  .sheet {
    padding-right: 16px;
    padding-left: 16px;
  }

  .money {
    grid-template-columns: 1fr;
  }

  .section h2 {
    font-size: 1.35rem;
  }
}

@media (min-width: 640px) {
  .stats {
    grid-template-columns: 1fr 1fr;
  }

  .stats .sub:first-child {
    grid-column: 1 / -1;
  }
}

@media (min-width: 720px) {
  .pair {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .sheet {
    padding-top: 20px;
  }
}

@media (hover: hover) and (pointer: fine) {
  .choice:hover,
  .chip:hover {
    border-color: var(--ink);
  }
}
