* { box-sizing: border-box; }
html, body { margin: 0; }
body { min-height: 100vh; min-height: 100dvh; }
body {
  display: grid; place-items: center; padding: 24px 16px;
  background: radial-gradient(1000px 600px at 70% -10%, rgba(176, 127, 47, 0.18), transparent 60%),
    radial-gradient(800px 600px at 0% 100%, rgba(140, 42, 28, 0.16), transparent 60%), #16110d;
  color: #2a231e; font: 15px/1.5 "Segoe UI", system-ui, -apple-system, sans-serif;
}
.frame {
  position: relative; width: 100%; max-width: 420px; padding: 30px 30px 26px; border-radius: 14px;
  background: linear-gradient(180deg, #fbf6ec, #f2ece2); border: 2px solid #c79a48;
  box-shadow: 0 0 0 4px #2a2018, 0 0 0 5px #75592a, 0 24px 70px rgba(0, 0, 0, 0.6);
}
.corner { position: absolute; width: 14px; height: 14px; transform: rotate(45deg); background: linear-gradient(135deg, #f7dc8f, #b4842f); border: 1px solid #5c4314; box-shadow: 0 0 0 3px #2a2018; }
.tl { top: -9px; left: -9px; } .tr { top: -9px; right: -9px; } .bl { bottom: -9px; left: -9px; } .br { bottom: -9px; right: -9px; }
header { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.mark { width: 46px; height: 46px; flex: none; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.35)); }
.mark svg { display: block; }
h1 { margin: 0; font: 700 24px/1.1 Georgia, "Times New Roman", serif; letter-spacing: 0.03em; color: #2a231e; display: flex; flex-direction: column; }
h1 small { font-size: 13px; letter-spacing: 0.1em; color: #b07f2f; text-transform: uppercase; margin-top: 4px; }
form, section { display: flex; flex-direction: column; gap: 14px; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; font-weight: 600; color: #5a4f45; }
label.check { flex-direction: row; align-items: center; gap: 9px; font-weight: 400; line-height: 1.35; }
/* No browser margin; the 1px drop matches the box to the middle of the text (mixed case sits low in its line). */
label.check input { flex: none; width: 16px; height: 16px; margin: 0; translate: 0 1px; accent-color: #b07f2f; cursor: pointer; }
select, input[type="password"], input[type="text"] {
  width: 100%; font: inherit; color: inherit; background: #fff; border: 1px solid #d4c6af; border-radius: 9px; padding: 10px 12px;
}
/* Own chevron: the browser's arrow sits flush against the right edge. */
select { appearance: none; padding-right: 42px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235a4f45' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center / 16px; }
::placeholder { color: #8b7f71; opacity: 0.6; }
input[type="password"] { font-size: 22px; letter-spacing: 0.4em; text-align: center; caret-color: transparent; }  /* PIN fields: a caret between centred dots looks off; the focus border shows where you type */
select:focus, input:focus { outline: none; border-color: #b07f2f; box-shadow: 0 0 0 3px rgba(176, 127, 47, 0.2); }
.btn {
  font: 600 16px/1 Georgia, serif; letter-spacing: 0.04em; padding: 13px 18px; border-radius: 9px; cursor: pointer; color: #3b2507;
  background: linear-gradient(180deg, #f7da86 0%, #e2b453 55%, #cf9a35 100%); border: 1px solid #8a6122;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65), inset 0 -2px 0 rgba(120, 78, 18, 0.28), 0 1px 2px rgba(60, 35, 5, 0.25);
}
.btn:hover { background: linear-gradient(180deg, #fbe39c 0%, #e9be5f 55%, #d6a23d 100%); }
.btn:disabled { opacity: 0.55; cursor: default; }
.link { background: none; border: 0; color: #8c2a1c; font: inherit; font-size: 14px; cursor: pointer; padding: 4px; }
.link:hover { text-decoration: underline; }
.msg { margin: 0; padding: 9px 12px; border-radius: 8px; font-size: 14px; }
.msg.bad { background: #f7e0da; color: #a3392a; }
.msg.wait { background: #f7ecd1; color: #946410; font-variant-numeric: tabular-nums; }
.msg.ok { background: #e1efe4; color: #2d6a43; }
.intro { margin: 0; color: #5a4f45; font-size: 14.5px; }
.words { margin: 0; padding: 16px; text-align: center; font: 700 20px/1.4 Georgia, serif; background: #fff; border: 2px dashed #c79a48; border-radius: 10px; letter-spacing: 0.02em; }

form h2 { margin: 0; font: 700 19px/1.2 Georgia, serif; color: #2a231e; }

/* Only one step at a time: the hidden attribute must win over display:flex above. */
[hidden] { display: none !important; }
