@font-face {
  font-family: "DotGothic16";
  src: url("/fonts/dotgothic16-latin.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --ink: #f1e6d4;
  --muted: #d6cbbb;
  --amber: #efbc86;
  --edge: #796e60;
  background: #18354d;
  color: var(--ink);
  font-family: "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 4px; }
::selection { background: var(--amber); color: #161412; }

body {
  min-width: 0;
  margin: 0;
  background: linear-gradient(90deg, #18354df8 14%, #18354dd9 43%, #18354d48),
    #18354d url("/art/loading-road.webp") center / cover no-repeat;
}

.access-main {
  display: grid;
  align-items: center;
  min-height: 100svh;
  width: min(100%, 78rem);
  margin: 0 auto;
  --access-gutter: clamp(18px, 5vw, 72px);
  padding: max(30px, env(safe-area-inset-top)) max(var(--access-gutter), env(safe-area-inset-right))
    max(32px, env(safe-area-inset-bottom)) max(var(--access-gutter), env(safe-area-inset-left));
}

.access-panel { max-width: 32rem; min-width: 0; }
.access-mark { display: block; }
h1, h2 { font-family: "DotGothic16", "Segoe UI", sans-serif; font-weight: 400; }
h1 {
  margin: 16px 0 20px;
  font-size: clamp(2.65rem, 6vw, 4.6rem);
  line-height: 0.99;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
h2 { margin: 0 0 14px; font-size: clamp(1.55rem, 4vw, 2rem); line-height: 1.1; }
p { margin: 0 0 16px; color: var(--muted); line-height: 1.55; }
.access-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 18px; }
.access-actions a { display: inline-grid; place-items: center; min-height: 46px; padding-inline: 6px; color: var(--ink); }
form { max-width: 25rem; }

button {
  min-height: 46px;
  padding: 9px 18px;
  border: 1px solid var(--edge);
  border-radius: 4px;
  background: #1d2224;
  color: var(--ink);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 650;
  line-height: 1.2;
  cursor: pointer;
}
button:hover:not(:disabled) { border-color: var(--amber); }
button.primary { background: var(--amber); border-color: var(--amber); color: #161412; }
button:disabled { opacity: 0.6; cursor: default; }

form > label, dt { display: block; margin: 12px 0 5px; font-size: 0.87rem; font-weight: 650; }
form > input, dd {
  width: 100%;
  margin: 0;
  padding: 10px 11px;
  border: 1px solid var(--edge);
  border-radius: 4px;
  background: #18354d;
  color: var(--ink);
}
form > input { min-height: 46px; font: inherit; font-size: 16px; }
dd { overflow-wrap: anywhere; }
dd code { user-select: all; }
dl { margin: 0 0 12px; }
.access-confirm { display: flex; align-items: center; gap: 10px; margin: 12px 0; min-height: 44px; }
.access-confirm input { width: 20px; height: 20px; accent-color: var(--amber); }
.access-confirm input { flex-shrink: 0; }
.access-help { margin-top: 8px; font-size: 0.87rem; }
.access-error { margin: 14px 0 0; color: #ffb5a4; }
.access-error:empty, #copy-status:empty { display: none; }
#copy-status { margin: 10px 0 0; }

@media (max-width: 640px) {
  body {
    background: linear-gradient(180deg, #18354dcf, #18354df7 72%),
      #18354d url("/art/loading-road.webp") 62% center / cover no-repeat;
  }
}

@media (orientation: landscape) and (max-height: 460px) {
  .access-main { padding-block: max(12px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-bottom)); }
  .access-mark { width: 34px; height: 34px; }
  h1 { margin: 8px 0 12px; font-size: clamp(2rem, 5vw, 2.75rem); }
  .access-actions { margin-top: 12px; }
}
