/* email.uk.net welcome: an airmail letter. The striped edge and the stamp are the only decoration. */
:root {
  --paper: #f6f8fc;
  --sheet: #ffffff;
  --ink: #1b2a41;
  --ink-soft: #55657d;
  --rule: #d5ddea;
  --air-red: #c62d42;
  --air-blue: #2b55a3;
  --danger: #a3242f;
  --ok: #1f6b45;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
/* light by default; dark only when chosen with the moon button (theme.js) */
:root[data-theme="dark"] { color-scheme: dark; --paper: #0f1622; --sheet: #172234; --ink: #e7edf6; --ink-soft: #a5b2c6; --rule: #2c3a52; --air-red: #e0566a; --air-blue: #6f97e0; --danger: #ff8a95; --ok: #6fcf9b; }
:root { color-scheme: light; }
.theme-toggle {
  position: fixed; top: 12px; right: 12px; z-index: 10; width: 40px; height: 40px; border-radius: 50%;
  border: 1.5px solid var(--rule); background: var(--sheet); color: var(--ink); cursor: pointer;
  display: flex; align-items: center; justify-content: center; padding: 0; box-shadow: 0 1px 2px rgba(27, 42, 65, .1);
}
.theme-toggle:hover { border-color: var(--air-blue); }
.theme-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
:root[data-theme="dark"] .theme-toggle svg circle { fill: currentColor; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; background: var(--paper); color: var(--ink); font: 17px/1.55 var(--sans); display: flex; justify-content: center; align-items: flex-start; padding: 24px 14px 40px; }

.letter {
  width: 100%; max-width: 30rem; background: var(--sheet); position: relative;
  padding: 30px 26px 24px; border-radius: 6px;
  border: 8px solid transparent;
  border-image: repeating-linear-gradient(135deg, var(--air-red) 0 14px, var(--sheet) 14px 22px, var(--air-blue) 22px 36px, var(--sheet) 36px 44px) 8;
  box-shadow: 0 1px 2px rgba(27, 42, 65, .08);
}
.head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.brand { display: block; margin: 2px 0 0; font: 600 15px/1 var(--serif); letter-spacing: .02em; color: var(--ink-soft); text-decoration: none; }
.brand-logo { display: block; width: 150px; max-width: 100%; height: auto; }

/* the guest's address as a postage stamp: perforated edge via a dotted mask */
.stamp {
  --hole: 4px;
  display: flex; flex-direction: column; align-items: center; gap: 4px; max-width: 58%;
  padding: 10px 12px 9px; background: var(--paper); color: var(--ink);
  border: 2px solid var(--air-blue);
  outline: 4px dotted var(--sheet); outline-offset: -1px;
  transform: rotate(2deg); text-align: center;
}
.stamp svg { width: 26px; height: 26px; fill: none; stroke: var(--air-red); stroke-width: 1.6; stroke-linejoin: round; }
.stamp span { font: 600 13px/1.3 var(--sans); overflow-wrap: anywhere; }

h1 { font: 600 1.75rem/1.2 var(--serif); margin: 6px 0 12px; letter-spacing: -.005em; }
p { margin: 0 0 14px; max-width: 34em; }
.lead { font-size: 1.05rem; color: var(--ink-soft); }
.step { margin: 0; font-size: .9rem; color: var(--air-blue); font-weight: 600; }
.note { font-size: .92rem; color: var(--ink-soft); }

label { display: block; font-weight: 600; margin: 4px 0 6px; }
.field { display: flex; border: 1.5px solid var(--rule); border-radius: 6px; background: var(--sheet); }
.field:focus-within { border-color: var(--air-blue); box-shadow: 0 0 0 3px color-mix(in srgb, var(--air-blue) 25%, transparent); }
.field input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--ink); font: inherit; padding: 12px; outline: none; }
.show { border: 0; background: transparent; color: var(--air-blue); font: 600 .9rem var(--sans); padding: 0 14px; cursor: pointer; }

.primary, .secondary {
  display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 22px;
  border-radius: 6px; font: 600 1.02rem var(--sans); cursor: pointer; text-decoration: none;
}
.primary { width: 100%; margin-top: 16px; border: 0; background: var(--ink); color: var(--sheet); }
.primary:hover { background: var(--air-blue); }
.primary[disabled], .primary.disabled { opacity: .45; cursor: not-allowed; pointer-events: none; }
.secondary { border: 1.5px solid var(--rule); background: var(--sheet); color: var(--ink); flex: 1; white-space: nowrap; padding: 0 14px; }
.secondary:hover { border-color: var(--air-blue); }
:focus-visible { outline: 3px solid var(--air-blue); outline-offset: 2px; }

.error { color: var(--danger); font-weight: 600; margin: 10px 0 0; }
.done-msg { color: var(--ok); font-weight: 600; min-height: 1.4em; margin: 8px 0 4px; }

.codes { list-style: none; padding: 14px; margin: 6px 0 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 18px;
  border: 1.5px dashed var(--rule); border-radius: 6px; font: 600 1.1rem/1.6 ui-monospace, "SF Mono", Consolas, monospace; letter-spacing: .04em; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.check { display: flex; gap: 10px; align-items: center; font-weight: 500; margin-top: 10px; }
.check input { width: 22px; height: 22px; accent-color: var(--air-blue); }

.foot { margin-top: 26px; padding-top: 14px; border-top: 1px solid var(--rule); font-size: .9rem; color: var(--ink-soft); }
.foot p { margin: 0; }

.view[hidden] { display: none; }
.view:not([hidden]) { animation: arrive .25s ease-out; }
@keyframes arrive { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .view:not([hidden]) { animation: none; } .stamp { transform: none; } }
@media (max-width: 380px) { .letter { padding: 24px 18px 20px; } h1 { font-size: 1.5rem; } .codes { grid-template-columns: 1fr; } .head { flex-direction: column-reverse; } .stamp { max-width: 100%; } }
@media (max-width: 600px) { body { padding-top: 62px; } }

/* site footer on the welcome and help pages (footer.js) */
body.has-site-foot { flex-direction: column; align-items: center; }
.site-foot { width: 100%; max-width: 30rem; margin-top: 64px; text-align: center; color: var(--ink-soft); font-size: 13px; }
.site-legal { list-style: none; margin: 22px 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 0; }
.site-legal li:not(:first-child)::before { content: '|'; margin: 0 8px; opacity: .45; }
.site-foot a { color: var(--air-blue); text-decoration: none; }
.site-foot a:hover, .site-foot a:focus-visible { text-decoration: underline; }
.site-qr { display: block; margin: 0 auto; padding: 0; border: 0; background: none; cursor: zoom-in; }
.site-qr img { display: block; width: 110px; height: 110px; }
@media (min-width: 600px) { .site-qr img { width: 150px; height: 150px; } }
.site-qr:focus-visible { outline: 2px solid var(--air-blue); outline-offset: 2px; }
.site-qr-full { border: 0; padding: 0; background: transparent; max-width: none; max-height: none; text-align: center; cursor: zoom-out; }
.site-qr-full::backdrop { background: rgba(10, 16, 26, .88); }
.site-qr-full img { display: block; width: min(86vw, 80vh); height: auto; background: #fff; padding: 12px; border-radius: 8px; }
.site-qr-full p { margin: 12px 0 0; color: #fff; font-size: 14px; }

/* step 14: choose-a-password screen, optional passkey */
#f-choose .note { margin: 6px 0 14px; }
#f-choose label + .field { margin-bottom: 4px; }
.recommend { font-size: .95rem; padding: 10px 12px; border-left: 3px solid var(--air-blue); background: color-mix(in srgb, var(--air-blue) 6%, var(--sheet)); border-radius: 0 6px 6px 0; }
.link-button { display: block; margin: 14px auto 0; padding: 8px 12px; border: 0; background: none; color: var(--air-blue); font: inherit; text-decoration: underline; cursor: pointer; }
.link-button:hover, .link-button:focus-visible { color: var(--ink); }

/* PB clean border 2026-11-19 */
/* Plain blue edge with a soft neon glow. Replaces the airmail stripes, which now live on the logo and QR images. */
.letter {
  border: 1.5px solid var(--air-blue);
  border-image: none;
  border-radius: 14px;
  box-shadow: 0 0 0 1px rgba(43, 85, 163, .08), 0 0 14px rgba(43, 85, 163, .28), 0 0 42px rgba(43, 85, 163, .14);
}
:root[data-theme="dark"] .letter {
  box-shadow: 0 0 0 1px rgba(111, 151, 224, .15), 0 0 16px rgba(111, 151, 224, .45), 0 0 52px rgba(111, 151, 224, .2);
}

/* PB languages 2026-11-19 */
/* Globe (top left, matching the sign-in page) and its language list; English-only notice on privacy and terms. */
.lang-toggle {
  position: fixed; top: 12px; left: 12px; z-index: 10; width: 40px; height: 40px; border-radius: 50%;
  border: 1.5px solid var(--rule); background: var(--sheet); color: var(--ink); cursor: pointer;
  display: flex; align-items: center; justify-content: center; padding: 0; box-shadow: 0 1px 2px rgba(27, 42, 65, .1);
}
.lang-toggle:hover, .lang-toggle[aria-expanded="true"] { border-color: var(--air-blue); }
.lang-toggle svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; }
.lang-menu {
  position: fixed; top: 58px; left: 12px; z-index: 11; min-width: 11rem; padding: 6px;
  background: var(--sheet); border: 1.5px solid var(--air-blue); border-radius: 12px;
  box-shadow: 0 0 0 1px rgba(43, 85, 163, .08), 0 0 14px rgba(43, 85, 163, .28), 0 0 42px rgba(43, 85, 163, .14);
  display: grid; gap: 2px;
}
.lang-menu[hidden] { display: none; }
.lang-menu button {
  display: block; width: 100%; text-align: left; padding: 9px 12px; border: 0; border-radius: 8px;
  background: none; color: var(--ink); font: 500 15px/1.2 var(--sans); cursor: pointer;
}
.lang-menu button:hover, .lang-menu button:focus-visible { background: color-mix(in srgb, var(--air-blue) 10%, var(--sheet)); outline: none; }
.lang-menu button[aria-current="true"] { color: var(--air-blue); font-weight: 700; }
.lang-menu button[aria-current="true"]::after { content: " ✓"; }
:root[data-theme="dark"] .lang-menu { box-shadow: 0 0 16px rgba(111, 151, 224, .45), 0 0 52px rgba(111, 151, 224, .2); }
.lang-notice {
  margin: 0 0 18px; padding: 10px 12px; font-size: .95rem; border-left: 3px solid var(--air-blue);
  background: color-mix(in srgb, var(--air-blue) 8%, var(--sheet)); border-radius: 0 6px 6px 0;
}
@media print { .lang-toggle, .lang-menu, .lang-notice { display: none; } }

/* PB languages 2 2026-11-19 */
/* Full language list in a window, like the sign-in page's; replaces the short menu of step 22. */
.lang-menu { display: none !important; }
.lang-dialog {
  width: min(720px, calc(100% - 24px)); max-height: calc(100dvh - 40px); padding: 0; overflow: hidden;
  background: var(--sheet); color: var(--ink); border: 1.5px solid var(--air-blue); border-radius: 14px;
  box-shadow: 0 0 0 1px rgba(43, 85, 163, .08), 0 0 14px rgba(43, 85, 163, .28), 0 0 42px rgba(43, 85, 163, .14);
}
.lang-dialog[open] { display: flex; flex-direction: column; }
.lang-dialog::backdrop { background: rgba(10, 16, 26, .45); }
:root[data-theme="dark"] .lang-dialog { box-shadow: 0 0 16px rgba(111, 151, 224, .45), 0 0 52px rgba(111, 151, 224, .2); }
:root[data-theme="dark"] .lang-dialog::backdrop { background: rgba(5, 9, 16, .6); }
.lang-dialog header { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--rule); }
.lang-dialog h3 { margin: 0; font: 600 1.15rem/1.2 var(--serif); }
.lang-close { width: 36px; height: 36px; border: 0; border-radius: 50%; background: none; color: var(--ink-soft); font-size: 26px; line-height: 1; cursor: pointer; }
.lang-close:hover, .lang-close:focus-visible { color: var(--ink); background: color-mix(in srgb, var(--air-blue) 10%, var(--sheet)); outline: none; }
.lang-list { overflow-y: auto; padding: 12px; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px; }
.lang-list button {
  text-align: left; padding: 8px 14px; border: 1px solid transparent; border-radius: 8px; cursor: pointer;
  background: color-mix(in srgb, var(--ink) 5%, var(--sheet)); color: var(--ink); font: 500 15px/1.3 var(--sans);
}
.lang-list button[dir="rtl"] { text-align: right; }
.lang-list button:hover, .lang-list button:focus-visible { border-color: var(--air-blue); outline: none; }
.lang-list button.selected { border-color: var(--air-blue); background: color-mix(in srgb, var(--air-blue) 16%, var(--sheet)); color: var(--air-blue); font-weight: 700; }
.lang-list button.selected::after { content: " ✓"; }
@media print { .lang-dialog { display: none; } }
