@font-face {
  font-family: "Coast Pixel";
  src: url("/gate-font.woff") format("woff");
  font-display: swap;
}

:root {
  color-scheme: light;
  --pixel: "Coast Pixel", "PingFang SC", sans-serif;
  --ink: #274137;
  --forest: #355545;
  --paper: #fff8df;
  --sand: #ecdbad;
  --gold: #ffc977;
  --rust: #9c4a2d;
}
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100svh;
  color: var(--ink);
  background: #f9f3dd;
  font: 16px/1.6 "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}
.masthead {
  min-height: 69px;
  padding: 0 clamp(20px, 5vw, 72px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--forest);
  border-bottom: 4px solid #dcb771;
  color: var(--paper);
  font-family: var(--pixel);
}
.brand { display: flex; align-items: center; gap: 12px; font-size: 23px; }
.credit { font-size: 16px; }
.sun-icon {
  width: 28px;
  height: 28px;
  background: #ffda84;
  border: 2px solid #ffebac;
  position: relative;
}
.sun-icon::before {
  content: "";
  position: absolute;
  inset: 4px;
  background: #a7542d;
  clip-path: polygon(20% 0, 80% 0, 80% 20%, 100% 20%, 100% 80%, 80% 80%, 80% 100%, 20% 100%, 20% 80%, 0 80%, 0 20%, 20% 20%);
}
main {
  display: grid;
  align-items: center;
  min-height: calc(100svh - 69px);
  padding: clamp(24px, 6vw, 80px) max(20px, calc((100% - 1120px) / 2));
}
.entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(345px, .70fr);
  border: 3px solid var(--ink);
  padding: 5px;
  background: #f3d996;
  box-shadow: 7px 7px 0 #bdac7e;
  min-width: 0;
}
.view {
  position: relative;
  min-height: 100%;
  margin: 0;
  overflow: hidden;
  border: 2px solid var(--ink);
  background: #d3b87c;
}
.view img {
  display: block;
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 45% 50%;
  image-rendering: pixelated;
}
figcaption {
  position: absolute;
  left: 17px;
  bottom: 17px;
  padding: 5px 11px;
  color: #fff8df;
  background: var(--forest);
  border: 2px solid #fff4cf;
  box-shadow: 3px 3px 0 #273e33aa;
  font: 16px/1.4 var(--pixel);
}
.pin { display: inline-block; vertical-align: 2px; width: 7px; height: 7px; background: #ffcc78; }
.terminal {
  border: 2px solid var(--ink);
  border-left: none;
  background: var(--paper);
  padding: clamp(27px, 4vw, 57px) clamp(22px, 4vw, 53px);
}
.lock-emblem {
  width: 62px;
  height: 58px;
  display: grid;
  place-items: center;
  background: #e8edd1;
  border: 2px solid var(--forest);
  box-shadow: 3px 3px 0 #9da980;
}
.lock {
  position: relative;
  width: 27px;
  height: 20px;
  margin-top: 10px;
  background: var(--forest);
  box-shadow: inset 0 3px 0 #548164;
}
.lock::before {
  content: "";
  position: absolute;
  left: 5px;
  top: -12px;
  width: 17px;
  height: 13px;
  border: 4px solid var(--forest);
  border-bottom: 0;
  clip-path: polygon(24% 0, 76% 0, 76% 16%, 100% 16%, 100% 100%, 0 100%, 0 16%, 24% 16%);
}
.lock::after {
  content: "";
  position: absolute;
  left: 11px;
  top: 7px;
  width: 5px;
  height: 7px;
  background: #f5cb77;
}
h1 { margin: 17px 0 4px; font: 400 clamp(36px, 4.5vw, 56px)/1.12 var(--pixel); }
.intro { margin: 0 0 22px; color: #495d4c; }
label { display: block; margin-bottom: 7px; font: 17px/1.4 var(--pixel); }
.code-field { position: relative; }
input {
  display: block;
  width: 100%;
  height: 52px;
  background: #fffdf1;
  color: var(--ink);
  border: 2px solid #929c7e;
  padding: 8px 12px;
  font: 24px/1 var(--pixel);
  letter-spacing: .45em;
}
.code-slots { display: none; }
.enhanced .code-slots {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: clamp(4px, .65vw, 9px);
  pointer-events: none;
  position: absolute;
  inset: 0;
}
.enhanced input { color: transparent; background: transparent; caret-color: transparent; border-color: transparent; }
.enhanced input::selection { color: transparent; background: transparent; }
.code-slots span {
  position: relative;
  display: grid;
  place-content: center;
  min-width: 0;
  border: 2px solid #a1a78b;
  box-shadow: inset 0 -3px 0 #efe4c1;
  background: #fffdf1;
}
.code-slots span.filled { border-color: #6f8f6c; background: #e9efda; box-shadow: inset 0 -3px 0 #d9e4c6; }
.code-slots span.filled::after { content: ""; width: 10px; height: 10px; background: var(--forest); }
.enhanced:focus-within .active { border-color: var(--forest); box-shadow: inset 0 -3px 0 #86a67f; }
input:focus-visible, button:focus-visible { outline: 2px solid #466a9b; outline-offset: 4px; }
.message { min-height: 25px; margin: 6px 0 9px; color: #933d2a; font-size: .94rem; line-height: 1.55; }
button {
  width: 100%;
  min-height: 54px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 2px solid #794829;
  background: var(--gold);
  color: #443224;
  box-shadow: 4px 4px 0 #976443;
  cursor: pointer;
  font: 20px/1.3 var(--pixel);
}
button:hover { background: #ffd894; }
button:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 #976443; }
.key-icon {
  width: 20px;
  height: 14px;
  background: #70401f;
  clip-path: polygon(0 14%, 10% 14%, 10% 0, 43% 0, 43% 14%, 53% 14%, 53% 36%, 100% 36%, 100% 79%, 89% 79%, 89% 66%, 79% 66%, 79% 92%, 68% 92%, 68% 65%, 53% 65%, 53% 86%, 43% 86%, 43% 100%, 10% 100%, 10% 86%, 0 86%, 0 14%, 17% 36%, 17% 64%, 34% 64%, 34% 36%, 17% 36%);
}
@media (max-width: 740px) {
  main { min-height: auto; margin: 0 auto; max-width: 530px; }
  .entry { grid-template-columns: minmax(0, 1fr); box-shadow: 5px 5px 0 #bdac7e; }
  .view { min-height: clamp(145px, 39vw, 225px); }
  .terminal { border-left: 2px solid var(--ink); border-top: 0; }
  figcaption { bottom: 10px; left: 10px; }
  .lock-emblem { width: 50px; height: 48px; }
}

.open-entry { margin: 15px 0 0; font-size: .94rem; }
.open-entry a { color: var(--forest); text-underline-offset: 3px; }

/* Coastal admission ticket */
:root { --ink: #244767; --forest: #244767; --rust: #9f482e; --paper: #fff7e5; }
body { background: #73c9ed url('/gate-coast.avif') center / cover fixed no-repeat; }
body::before { content: ''; position: fixed; inset: 0; background: linear-gradient(#16486d14, transparent 45%, #16486d22); pointer-events: none; }
.masthead { position: relative; z-index: 1; min-height: 76px; background: none; border: 0; color: #fffbed; text-shadow: 0 2px 2px #24476788; }
main { position: relative; min-height: calc(100svh - 76px); padding: 28px 22px 48px; align-items: center; justify-items: center; }
.entry { display: block; width: min(100%, 470px); background: none; border: 0; box-shadow: none; padding: 0; margin-top: clamp(24px, 9svh, 100px); filter: drop-shadow(0 7px 0 #6249263d); }
.terminal { position: relative; isolation: isolate; border: 0; padding: 33px 32px 24px; background: none; }
.terminal::before { content: ''; position: absolute; inset: 0; z-index: -1; background: radial-gradient(ellipse at 30% 0, #ffffff88, transparent 62%), #fff5df; clip-path: polygon(0 19px, 10px 19px, 10px 10px, 19px 10px, 19px 0, calc(100% - 19px) 0, calc(100% - 19px) 10px, calc(100% - 10px) 10px, calc(100% - 10px) 19px, 100% 19px, 100% 100%, 0 100%); mask-image: radial-gradient(circle 14px at 0 145px, transparent 98%, #000), radial-gradient(circle 14px at 100% 145px, transparent 98%, #000); mask-composite: intersect; box-shadow: inset 0 0 0 3px #e7b775, inset 0 0 0 8px #ffefd0, inset 0 0 0 10px #dfbf8a; }
.ticket-heading { display: flex; align-items: center; justify-content: center; gap: 5px; border-bottom: 2px dashed #cf995a; padding-bottom: 24px; margin-bottom: 24px; }
h1 { margin: 0; font: 700 clamp(29px, 6.8vw, 40px)/1.32 var(--pixel); text-align: center; letter-spacing: .015em; }
h1 span, h1 strong { display: block; }
h1 strong { font-weight: inherit; color: var(--rust); }
.laurel { color: #c49140; font: 52px Georgia, serif; transform: rotate(-65deg); }
.laurel.right { transform: rotate(65deg) scaleX(-1); }
.intro { text-align: center; color: var(--ink); margin: 0 0 24px; font-size: 16px; }
label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
input { border: 0; border-bottom: 2px solid #244767; background: transparent; }
.code-slots span { border: 0; border-bottom: 3px solid #244767; background: transparent; box-shadow: none; }
.code-slots span.filled { border-color: #b87937; background: #f7e7c9; box-shadow: none; }
.enhanced:focus-within .active { border-color: #c07530; background: #ffe1a2; box-shadow: none; }
.code-slots { gap: 10px !important; }
.code-slots span.filled::after { width: 9px; height: 9px; background: #244767; }
.message { min-height: 24px; font-size: 14px; margin-top: 8px; }
button { border: 0; min-height: 56px; background: linear-gradient(#ffdb8b, #ffc060); color: #763f25; box-shadow: inset 0 0 0 2px #b47937, inset 0 0 0 5px #ffe3a0, inset 0 -7px #e9a146; font-size: 22px; clip-path: polygon(0 10px, 6px 10px, 6px 4px, 13px 4px, 13px 0, calc(100% - 13px) 0, calc(100% - 13px) 4px, calc(100% - 6px) 4px, calc(100% - 6px) 10px, 100% 10px, 100% calc(100% - 10px), calc(100% - 6px) calc(100% - 10px), calc(100% - 6px) calc(100% - 4px), calc(100% - 13px) calc(100% - 4px), calc(100% - 13px) 100%, 13px 100%, 13px calc(100% - 4px), 6px calc(100% - 4px), 6px calc(100% - 10px), 0 calc(100% - 10px)); }
button:focus-visible { outline-offset: -9px; }
.ticket-souvenir { display: flex; align-items: center; gap: 8px; margin: 21px 0 0; border-bottom: 2px dashed #cf995a; padding: 0 4px 17px; }
.coast-stamp { position: relative; display: block; width: 64px; height: 68px; transform: rotate(-9deg); border: 4px dotted #c79154; outline: 3px solid #f6dfb7; background: #67bfe4 url('/gate-coast.avif') 70% 40% / auto 100%; }
.coast-stamp span { position: absolute; bottom: 0; left: 0; right: 0; background: #fff4de; color: #244767; text-align: center; font-size: 10px; line-height: 17px; }
.post-waves { color: #bc9169; font: 38px Georgia, serif; letter-spacing: -12px; transform: rotate(-9deg); }
.ticket-key { margin-left: auto; color: #b27a28; font: 72px Georgia, serif; transform: rotate(-27deg); text-shadow: 2px 2px #f9d28b; }
.open-entry { text-align: center; }
@media(max-width: 740px) {
  main { max-width: none; min-height: calc(100svh - 68px); padding: 0 22px 32px; align-items: end; }
  .masthead { min-height: 68px; padding-inline: 20px; }
  .brand { font-size: 20px; gap: 8px; }
  .credit { font-size: 14px; }
  .entry { margin-top: clamp(100px, 23svh, 210px); }
  .terminal { padding: 28px 26px 22px; border: none; }
  .ticket-heading { padding-bottom: 23px; margin-bottom: 22px; }
  .terminal::before { mask-image: radial-gradient(circle 12px at 0 133px, transparent 98%, #000), radial-gradient(circle 12px at 100% 133px, transparent 98%, #000); }
  .laurel { font-size: 40px; }
  body { background-position: 58% center; }
}
@media(max-width: 360px) { main { padding-inline: 14px; } .terminal { padding-inline: 22px; } h1 { font-size: 27px; } .laurel { font-size: 30px; } }

h1 {font-size:clamp(30px,7.9vw,40px)}

.ticket-key {display:grid;place-items:center;width:68px;height:65px;transform:rotate(-24deg)}
.ticket-key .key-icon {width:60px;height:40px;background:#c2862f}
