.exhibit-pad-setup {
  box-sizing: border-box;
  width: min(470px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  padding: 24px;
  overflow: auto;
  border: 1px solid #85847a;
  color: #eee9de;
  background: #171c20;
  font: 15px/1.55 "Malgun Gothic", "Apple SD Gothic Neo", system-ui, sans-serif;
}
.exhibit-pad-setup::backdrop { background: #090b0dbd; }
.exhibit-pad-setup h2 { margin: 0 0 12px; font-size: 24px; line-height: 1.2; }
.exhibit-pad-setup p { margin: 0 0 14px; overflow-wrap: anywhere; }
.exhibit-pad-setup label { display: block; margin-bottom: 4px; font-size: 13px; }
.exhibit-pad-setup select { width: 100%; margin: 0 0 14px; }
.exhibit-pad-setup button, .exhibit-pad-setup select {
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid #85847a;
  border-radius: 0;
  color: #eee9de;
  background: #242a2e;
  font: inherit;
}
.exhibit-pad-setup button:not(:disabled):hover { background: #383d3e; }
.exhibit-pad-setup button[data-primary]:not(:disabled) { color: #171c20; background: #eee9de; }
.exhibit-pad-setup button:disabled { opacity: .52; }
.exhibit-pad-setup :focus-visible { outline: 2px solid #eee9de; outline-offset: 3px; }
.exhibit-pad-setup-actions { display: flex; flex-wrap: wrap; gap: 8px; }
:root {
  color-scheme: dark;
  color: #eee9de;
  background: #1c1a15;
  font: 16px/1.5 "Malgun Gothic", "Apple SD Gothic Neo", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; min-height: 100dvh; }
[hidden] { display: none !important; }

.pasture {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  background: #2b2a21 url("/art/day/bg/chapter-1-nightwatch-v4.webp") center / cover no-repeat;
}

.pasture canvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
  display: block;
}

.pasture::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #191711ad, #19171128 42%, transparent 63%, #19171136);
}

.entrance {
  --side: clamp(24px, 6vw, 112px);
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(250px, 338px);
  align-items: start;
  gap: 38px;
  max-width: 1680px;
  margin: 0 auto;
  padding: max(clamp(42px, 9vh, 110px), env(safe-area-inset-top)) max(var(--side), env(safe-area-inset-right))
    max(30px, env(safe-area-inset-bottom)) max(var(--side), env(safe-area-inset-left));
}

.invitation p, .rank p, .invitation h1, .rank h2 { margin: 0; }
.invitation { padding-top: 9px; max-width: 480px; }
.invitation .invitation-overline { margin-bottom: 18px; color: #d3cfc4; font-size: .8rem; font-weight: 500; }
.invitation .invitation-description { margin-top: 20px; color: #eee9de; font-size: clamp(1rem, 1.4vw, 1.15rem); line-height: 1.75; text-shadow: 0 1px 5px #000c; }
.invitation .invitation-device { margin-top: 14px; color: #d3cfc4; font-size: .8rem; }
.invitation h1 {
  font: 700 clamp(3.5rem, 6vw, 5rem)/1.05 "Malgun Gothic", "Apple SD Gothic Neo", system-ui, sans-serif;
  letter-spacing: -.04em;
}

.enter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 210px;
  min-height: 54px;
  margin-top: 28px;
  padding: 13px 24px;
  border: 1px solid #eee9de;
  color: #202521;
  background: #eee9de;
  text-decoration: none;
  font-weight: 600;
}

.enter:hover { background: #d8d3c8; }
.enter:focus-visible { outline: 2px solid #eee9de; outline-offset: 4px; }
.invitation .enter-keys { margin-top: 9px; color: #d3cfc4; font-size: .78rem; }
.home-pad-settings {
  min-height: 40px;
  margin-top: 6px;
  padding: 6px 0;
  border: 0;
  color: #eee9de;
  background: transparent;
  font: inherit;
  font-size: .83rem;
  text-decoration: underline;
  text-underline-offset: .25em;
  cursor: pointer;
}
.home-pad-settings:focus-visible { outline: 2px solid #eee9de; outline-offset: 4px; }

.rank { padding: 9px 0 0; }

.rank-heading { padding-bottom: 12px; border-bottom: 1px solid #eee9de50; }
.rank .rank-scope { margin-top: 4px; color: #d3cfc4; font-size: .77rem; }
.rank h2 { font-size: 1.25rem; font-weight: 600; line-height: 1.35; letter-spacing: -.025em; }
.rank-list { margin: 0; padding: 0; list-style: none; }
.rank-list li {
  display: grid;
  grid-template-columns: 2ch minmax(0, 1fr) auto;
  gap: 11px;
  align-items: baseline;
  min-height: 35px;
  padding: 7px 0 6px;
  border-bottom: 1px solid #eee9de38;
  font-size: .88rem;
}

.rank-list li:last-child { border-bottom: 0; padding-bottom: 2px; }
.rank-place, .rank-time { font-variant-numeric: tabular-nums; }
.rank-place { color: #d3cfc4; }
.rank-name { overflow-wrap: anywhere; }
.rank-time { font-weight: 600; }
.rank .rank-state { padding-top: 12px; color: #d3cfc4; font-size: .87rem; }

@media (max-width: 690px) {
  .entrance { grid-template-columns: minmax(0, 1fr); gap: clamp(78px, 35dvh, 292px); padding-top: max(34px, env(safe-area-inset-top)); }
  .rank { width: min(100%, 390px); }
  .pasture { background-color: #1c1a15; background-position: center top; background-size: auto 68dvh; }
  .pasture canvas { height: 68dvh; }
  .pasture::after { background: linear-gradient(180deg, #191711bc, #19171138 28%, transparent 51%, #1c1a15 68%); }
}

@media (max-width: 690px) and (max-height: 590px) {
  .entrance { gap: 72px; }
}
