:root {
  --navy: #2E3192; --navy-d: #1f2170; --ink: #1d1f2b; --muted: #5b6075; --line: #dfe2ee;
  --bg: #f3f5fb; --card: #fff; --soft: #eef0fb; --red: #b42318; --green: #1f8a4c;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink); background: var(--bg); min-height: 100vh; display: flex; flex-direction: column; }
[hidden] { display: none !important; }
.top { background: #fff; border-bottom: 3px solid var(--navy); }
.brand { display: flex; align-items: center; gap: 12px; max-width: 720px; margin: 0 auto; padding: 14px 20px; text-decoration: none; color: var(--navy); }
.brand img { display: block; height: 30px; width: auto; }
.brand-name { font-weight: 700; font-size: 17px; letter-spacing: .2px; padding-left: 12px; border-left: 2px solid var(--line); }
.top .brand { padding-bottom: 6px; }
.contact { max-width: 720px; margin: 0 auto; padding: 0 20px 10px; display: flex; flex-wrap: wrap; gap: 4px 8px; font-size: 13px; color: var(--muted); }
.contact a { color: var(--navy); text-decoration: none; font-weight: 600; white-space: nowrap; }
.contact a:hover { text-decoration: underline; }
.foot a { white-space: nowrap; }
.wrap { flex: 1; width: 100%; max-width: 720px; margin: 0 auto; padding: 24px 16px 32px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 24px 20px; box-shadow: 0 2px 10px rgba(30,35,90,.06); }
h1 { margin: 0 0 6px; font-size: 1.5rem; line-height: 1.25; color: var(--navy-d); }
.lede { margin: 0 0 20px; color: var(--muted); }
.field { margin-bottom: 18px; }
label { font-weight: 600; }
.label-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.count { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
textarea, input[type=text], input[type=password], input[type=number], select {
  font: inherit; color: var(--ink); background: #fff; border: 1.5px solid #c9cde0; border-radius: 10px; padding: 12px; width: 100%; }
textarea { min-height: 120px; resize: vertical; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 15px; }
textarea:focus, input:focus, select:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(46,49,146,.2); }
.gen { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 10px; }
.inline { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; font-size: 14px; color: var(--muted); }
.inline select { width: auto; padding: 6px 8px; }
.check input { width: 18px; height: 18px; accent-color: var(--navy); }
.tip { margin: 8px 0 0; font-size: 13px; color: var(--muted); }
fieldset.expire { border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px 10px; margin: 0 0 18px; background: var(--soft); }
legend { font-weight: 600; padding: 0 6px; }
.pair { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.num { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; }
.num input { width: 68px; text-align: center; font-weight: 700; font-size: 18px; padding: 8px; }
.or { color: var(--muted); font-size: 14px; }
.hint { margin: 6px 0 0; font-size: 13px; color: var(--muted); }
.opts { margin-bottom: 18px; }
.opt { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line); cursor: pointer; font-weight: 400; }
.opt:last-of-type { border-bottom: 0; }
.opt input { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--navy); }
.opt strong { display: block; font-weight: 600; }
.opt small { display: block; color: var(--muted); font-size: 13px; line-height: 1.4; }
.passfield { margin: 4px 0 0 32px; }
.passfield label { display: block; margin-bottom: 6px; font-size: 14px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-weight: 600; border-radius: 10px;
  padding: 11px 18px; border: 1.5px solid transparent; cursor: pointer; text-decoration: none; min-height: 44px; }
.btn:focus-visible { outline: 3px solid rgba(46,49,146,.35); outline-offset: 2px; }
.btn:disabled { opacity: .6; cursor: default; }
.primary { background: var(--navy); color: #fff; }
.primary:hover:not(:disabled) { background: var(--navy-d); }
.primary.ok { background: var(--green); }
.ghost { background: #fff; color: var(--navy); border-color: var(--navy); }
.ghost:hover { background: var(--soft); }
.ghost.ok { color: var(--green); border-color: var(--green); }
.danger-ghost { background: #fff; color: var(--red); border-color: #e7b4ae; }
.big { width: 100%; font-size: 17px; padding: 14px; }
.fine { font-size: 12.5px; color: var(--muted); margin: 14px 0 0; }
.err { color: var(--red); background: #fde8e8; border-radius: 8px; padding: 10px 12px; margin: 0 0 14px; font-size: 14px; }
.linkbox { display: flex; gap: 8px; margin-bottom: 12px; }
.linkbox input { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 14px; min-width: 0; }
.row { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0; }
.note { font-size: 14px; color: #6b4b00; background: #fff4e0; border-radius: 8px; padding: 10px 12px; margin: 8px 0 0; }
.secret { margin: 6px 0 0; padding: 16px; background: var(--soft); border: 1.5px dashed #9da2d6; border-radius: 10px; white-space: pre-wrap; word-break: break-all;
  font: 600 18px/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--ink); max-height: 50vh; overflow: auto; user-select: all; }
.meta { font-size: 14px; color: var(--muted); margin: 4px 0 0; }
.foot { text-align: center; padding: 18px 16px 26px; color: var(--muted); font-size: 14px; }
.foot a { color: var(--navy); font-weight: 600; }
@media (max-width: 480px) {
  .card { padding: 20px 16px; border-radius: 12px; }
  h1 { font-size: 1.3rem; }
  .linkbox { flex-direction: column; }
  .brand-name { font-size: 15px; }
  .brand img { height: 26px; }
  .passfield { margin-left: 0; }
}
