@font-face {
  font-family: "Natron";
  src: url("/fonts/natron_medium.otf") format("opentype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Natron";
  src: url("/fonts/natron_bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #102033;
  --muted: #4d6278;
  --blue: #0071bc;
  --navy: #08243c;
  --paper: #f4f7fb;
  --line: #d5e1ec;
  --alert: #8d1d2c;
  --alert-bg: #fdecee;
  --warn: #8a5a00;
  --warn-bg: #fff6e5;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Natron", "Segoe UI", "PT Sans", "Noto Sans", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 10% -10%, #16486f 0%, transparent 55%),
    var(--navy);
  min-height: 100vh;
}

.top {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 20px 8px;
  color: white;
}

.eyebrow {
  margin: 0 0 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 12px;
  color: #9ec9ea;
}

h1 {
  margin: 0 0 8px;
  font-size: 32px;
  line-height: 1.15;
  text-transform: uppercase;
}

.lead {
  margin: 0;
  max-width: 720px;
  color: #d5e6f3;
  line-height: 1.45;
  text-transform: uppercase;
}

.layout {
  max-width: 720px;
  margin: 0 auto;
  padding: 28px 20px 40px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: stretch;
}

.card, .preview-panel {
  background: white;
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
}

label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 650;
  margin-bottom: 14px;
  text-transform: uppercase;
}

input, select {
  font: inherit;
  font-weight: 500;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  background: var(--paper);
  color: var(--ink);
  width: 100%;
  text-transform: none;
}

input:focus, select:focus {
  outline: 2px solid #8ec4ea;
  border-color: var(--blue);
}

.hint {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  margin: 0 0 14px;
  text-transform: uppercase;
}

button {
  font: inherit;
  font-weight: 700;
  background: var(--blue);
  color: white;
  border: 0;
  border-radius: 999px;
  padding: 12px 22px;
  cursor: pointer;
  text-transform: uppercase;
}

button:disabled {
  opacity: 0.65;
  cursor: wait;
}

.status {
  min-height: 1.3em;
  color: var(--muted);
  text-transform: uppercase;
}

.alert, .warn {
  border-radius: 12px;
  padding: 10px 12px;
  line-height: 1.4;
  text-transform: uppercase;
}

.alert {
  background: var(--alert-bg);
  color: var(--alert);
}

.warn {
  background: var(--warn-bg);
  color: var(--warn);
}

.preview-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.preview-head h2 {
  margin: 0;
  font-size: 20px;
  text-transform: uppercase;
}

#manual-download {
  color: var(--blue);
  font-weight: 700;
  text-transform: uppercase;
}

.preview-frame {
  margin-top: 12px;
  background: #e7eef5;
  border-radius: 14px;
  min-height: 280px;
  display: grid;
  place-items: center;
  overflow: hidden;
}

#preview {
  width: min(100%, 560px);
  height: auto;
  display: block;
}

#preview-empty {
  color: var(--muted);
  text-align: center;
  padding: 24px;
  margin: 0;
  text-transform: uppercase;
}

.template-note {
  margin: 16px 0 0;
}

.template-note img {
  width: 140px;
  border-radius: 8px;
  display: block;
}

.template-note figcaption {
  color: var(--muted);
  font-size: 13px;
  margin-top: 6px;
  text-transform: uppercase;
}

@media (max-width: 860px) {
  h1 { font-size: 26px; }
  .layout { grid-template-columns: 1fr; padding: 12px; }
  .top { padding: 20px 12px 0; }
}

.match-text-block {
  margin-top: 18px;
}

#match-text {
  width: 100%;
  min-height: 160px;
  font: inherit;
  font-weight: 500;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  background: var(--paper);
  color: var(--ink);
  resize: vertical;
  text-transform: none !important;
  line-height: 1.45;
  margin-top: 10px;
  font-variant: normal;
}

#copy-match-text {
  padding: 8px 16px;
  font-size: 14px;
}

.match-text-block, .match-text-block textarea, #match-text {
  text-transform: none !important;
}

.schedule-block textarea,
#schedule-input,
#schedule-output {
  width: 100%;
  min-height: 160px;
  font: inherit;
  font-weight: 500;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  background: var(--paper);
  color: var(--ink);
  resize: vertical;
  text-transform: none !important;
  line-height: 1.45;
  margin-top: 10px;
  font-variant: normal;
}

#schedule-output {
  min-height: 240px;
}

#copy-schedule-text {
  padding: 8px 16px;
  font-size: 14px;
}

.home-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 64px 20px 40px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.home-nav {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.home-card {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  background: white;
  color: var(--blue);
  text-decoration: none;
  border-radius: 18px;
  padding: 32px 28px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
  font-weight: 700;
  font-size: 28px;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  text-align: center;
}

.home-card:hover,
.home-card:focus {
  background: #eef6fb;
  color: var(--navy);
}

.page-bar {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 20px 0;
}

.back-home {
  display: inline-block;
  color: #9ec9ea;
  text-decoration: none;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.back-home:hover,
.back-home:focus {
  color: white;
}

.stub-title {
  margin: 0 0 12px;
  font-size: 28px;
  color: var(--ink);
  text-transform: uppercase;
}

.stub-text {
  margin: 0;
  color: var(--muted);
  text-transform: uppercase;
  line-height: 1.45;
}

.birthdays-block textarea,
#birthdays-input,
#birthdays-output {
  width: 100%;
  min-height: 160px;
  font: inherit;
  font-weight: 500;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  background: var(--paper);
  color: var(--ink);
  resize: vertical;
  text-transform: none !important;
  line-height: 1.45;
  margin-top: 10px;
  font-variant: normal;
}

#birthdays-output {
  min-height: 200px;
}

#copy-birthdays-text {
  padding: 8px 16px;
  font-size: 14px;
}

