/* Layout: one narrow centered column in a black void; one screen at a time. */
@font-face { font-family: "JetBrains Mono"; font-weight: 300; font-display: swap; src: url("/fonts/jetbrains-mono-latin-300-normal.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 400; font-display: swap; src: url("/fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2"); }

:root {
  --void: #000000;
  --bone: #d6d3cc;
  --ash: #6b6a66;
  --smoke: #2a2a28;
  --ember: #9c4a42;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  color-scheme: dark;
}
[hidden] { display: none !important; }
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--void);
  color: var(--bone);
  font-family: var(--mono);
  font-weight: 300;
  font-size: 13px;
  letter-spacing: 0.02em;
}
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at 50% 38%, transparent 0%, transparent 45%, var(--void) 100%);
}
.wrap {
  min-height: 100%;
  display: grid;
  place-items: center;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: max(48px, env(safe-area-inset-top, 0px)) max(48px, env(safe-area-inset-bottom, 0px));
}
main { width: 100%; max-width: 320px; display: flex; flex-direction: column; align-items: center; gap: 40px; position: relative; z-index: 1; }

.mark { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.mark img { width: 132px; height: 132px; display: block; animation: breathe 9s ease-in-out infinite; }
.mark h1 { margin: 0; font-weight: 400; font-size: 11px; letter-spacing: 0.62em; text-indent: 0.62em; }

form { width: 100%; display: flex; flex-direction: column; gap: 22px; }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field label, .caption { font-size: 10px; letter-spacing: 0.28em; text-transform: uppercase; color: var(--ash); }
.caption { letter-spacing: 0.12em; text-transform: none; line-height: 1.6; text-align: center; }
.field input {
  appearance: none; background: transparent; border: 0; border-bottom: 1px solid var(--smoke);
  color: var(--bone); font: inherit; font-size: 14px; padding: 6px 0 9px; border-radius: 0; outline: none;
  caret-color: var(--bone); transition: border-color .4s; text-align: center; width: 100%;
}
.field input::placeholder { color: var(--smoke); }
.field input:focus { border-bottom-color: var(--bone); }
.field input.left { text-align: left; }
.field input[type="number"] { -moz-appearance: textfield; }
.field input::-webkit-outer-spin-button, .field input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.drop {
  width: 100%; border: 1px dashed var(--smoke); padding: 32px 12px; text-align: center; color: var(--ash);
  font-size: 11px; letter-spacing: 0.08em; cursor: pointer; transition: border-color .4s, color .4s;
  display: flex; flex-direction: column; gap: 8px;
}
.drop small { font-size: 9px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--smoke); }
.drop:hover, .drop:focus-visible, .drop.over { border-color: var(--bone); color: var(--bone); outline: none; }
.drop.busy { pointer-events: none; opacity: .5; }
.drop input { display: none; }

button {
  appearance: none; background: transparent; color: var(--bone); border: 1px solid var(--smoke);
  font: inherit; font-size: 11px; letter-spacing: 0.4em; text-indent: 0.4em; text-transform: uppercase;
  padding: 13px 0; cursor: pointer; transition: border-color .4s, background .4s, color .4s; width: 100%;
}
button:hover, button:focus-visible { border-color: var(--bone); outline: none; }
button:active { background: var(--bone); color: var(--void); }
button[disabled] { color: var(--ash); border-color: var(--smoke); cursor: wait; }

button.link { border: 0; padding: 4px 8px; width: auto; font-size: 10px; letter-spacing: 0.3em; text-indent: 0.3em; color: var(--smoke); }
button.link:hover, button.link:focus-visible { color: var(--ash); }
button.link:active { background: transparent; color: var(--bone); }
button.link.danger:hover, button.link.danger:focus-visible, button.link.armed { color: var(--ember); }

.choices { width: 100%; display: flex; flex-direction: column; gap: 14px; }
.choices button { padding: 18px 0; }

.status { min-height: 1.4em; font-size: 11px; color: var(--ash); text-align: center; letter-spacing: 0.06em; overflow-wrap: anywhere; }
.status:not(:empty)::before { content: "› "; color: var(--smoke); }
.status.err { color: var(--ember); }

.file { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.file .name { font-size: 14px; font-weight: 400; overflow-wrap: anywhere; }
.file .size { font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ash); }

.reveal { width: 100%; display: flex; flex-direction: column; gap: 12px; }
.key {
  width: 100%; border: 1px solid var(--smoke); padding: 14px; font-size: 12px; text-align: center;
  word-break: break-all; line-height: 1.6; user-select: all;
}

.panel { width: 100%; display: flex; flex-direction: column; gap: 18px; padding-top: 28px; border-top: 1px solid var(--smoke); }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 18px; }
.pair .span { grid-column: 1 / -1; }

.passes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.passes li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--smoke); font-size: 11px; color: var(--ash); }
.passes li:first-child { border-top: 1px solid var(--smoke); }
.passes li span { font-variant-numeric: tabular-nums; }
.passes li button.link { padding: 4px 0 4px 8px; }

.row { width: 100%; display: flex; justify-content: space-between; }

.view { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 22px; animation: rise .7s ease both; }

@keyframes breathe { 0%,100% { opacity: .82; } 50% { opacity: 1; } }
@keyframes rise { from { opacity: .001; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .mark img, .view { animation: none; } }
