:root {
  color-scheme: dark;
  color: #f4ead4;
  background: #0a1524;
  font-family: Georgia, "Noto Serif CJK SC", "Songti SC", "SimSun", serif;
  --muted-paper: #c7bea9;
  --brass: #e4bb7e;
  --rule: #ae8b54;
}

* { box-sizing: border-box; }
body { margin: 0; }
button, input { font: inherit; }

.night-sea {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.night-sea img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 38% center;
}

.night-sea::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, #08101bc7, transparent 32%),
    linear-gradient(90deg, #08101b18 30%, #08101b65 57%, #08101bef);
}

.arrival {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  justify-items: end;
  align-items: center;
  padding: max(32px, env(safe-area-inset-top)) max(7vw, env(safe-area-inset-right))
           max(32px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left));
}

.logbook {
  position: relative;
  width: min(100%, 432px);
  padding: clamp(30px, 4vw, 52px);
  border: 1px solid #a27d4e9c;
  background:
    radial-gradient(ellipse at 50% 0, #2c3032dc, transparent 54%),
    linear-gradient(157deg, #152533ef, #090f18f7 74%);
  box-shadow: 0 24px 80px #02070baa, inset 0 0 34px #090f16a6;
}

.logbook::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid #a27d4e40;
  pointer-events: none;
}

.voyage-title { text-align: center; }
.voyage-title img { display: block; margin: 0 auto 16px; }

.voyage-title h1 {
  margin: 0;
  font-size: clamp(35px, 4.5vw, 52px);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: .11em;
  text-indent: .11em;
  text-shadow: 0 2px 18px #dfaa6d45;
}

.voyage-title p {
  margin: 12px 0 0;
  color: var(--brass);
  letter-spacing: .36em;
  text-indent: .36em;
}

form { margin-top: 30px; }
form::before {
  content: "";
  display: block;
  height: 1px;
  margin-bottom: 24px;
  background: linear-gradient(90deg, transparent, var(--rule), transparent);
}

form h2 { margin: 0; font-size: 21px; font-weight: 600; letter-spacing: .12em; }
#boarding-intro { margin: 7px 0 18px; color: var(--muted-paper); font-size: 14px; line-height: 1.55; }
fieldset { min-inline-size: 0; margin: 0; padding: 0; border: 0; }
label { display: block; margin-bottom: 6px; color: #ddd0b6; font-size: 14px; }

input {
  width: 100%;
  min-height: 48px;
  padding: 8px 12px;
  border: 1px solid #8b775c;
  border-radius: 2px;
  color: #fff5de;
  background: #0a1420;
  font: 16px/1.4 system-ui, sans-serif;
}

#account { margin-bottom: 14px; }
.password { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
.password input { border-radius: 2px 0 0 2px; }

#reveal {
  min-width: 72px;
  padding: 0 9px;
  border: 1px solid #8b775c;
  border-left: 0;
  border-radius: 0 2px 2px 0;
  color: #f0d7ad;
  background: #24303a;
  font-size: 13px;
}

.embark {
  position: relative;
  display: block;
  width: 100%;
  min-height: 50px;
  margin-top: 20px;
  padding: 8px 38px;
  border: 1px solid #f1ce92;
  border-radius: 2px;
  color: #201910;
  background: linear-gradient(175deg, #f0d29a, #cca16a);
  box-shadow: inset 0 0 0 3px #251c161c;
  font-weight: 700;
  letter-spacing: .23em;
  text-indent: .23em;
}

.embark span { position: absolute; right: 14px; text-indent: 0; }
button { cursor: pointer; }
button:disabled, fieldset:disabled button { cursor: default; opacity: .65; }
:focus-visible { position: relative; z-index: 1; outline: 2px solid #ffda92; outline-offset: 2px; }
.notice { min-height: 1.5em; margin: 10px 0 -6px; color: #ffdbad; font-size: 14px; line-height: 1.5; }

@media (hover: hover) {
  #reveal:enabled:hover { background: #344450; }
  .embark:enabled:hover { background: linear-gradient(175deg, #ffe4b1, #dfb47e); }
}

@media (max-width: 760px) and (orientation: portrait) {
  .night-sea img { object-position: center top; }
  .night-sea::after { background: linear-gradient(180deg, transparent 11%, #0a152436 31%, #080f19e0 72%, #080f19); }
  .arrival {
    justify-items: center;
    align-items: end;
    padding: max(92px, 18svh, env(safe-area-inset-top)) max(17px, env(safe-area-inset-right))
             max(24px, env(safe-area-inset-bottom)) max(17px, env(safe-area-inset-left));
  }
  .logbook { padding: 26px 24px 24px; }
  .voyage-title img { width: 40px; height: 40px; margin-bottom: 11px; }
  .voyage-title p { margin-top: 8px; }
  form { margin-top: 23px; }
  form::before { margin-bottom: 18px; }
}

@media (max-height: 610px) and (orientation: portrait) {
  .arrival { padding-top: max(40px, env(safe-area-inset-top)); }
}

@media (prefers-reduced-motion: no-preference) {
  .logbook { animation: enter .55s ease-out; }
  @keyframes enter {
    from { opacity: .7; transform: translateY(7px); }
    to { opacity: 1; transform: translateY(0); }
  }
}
