:root {
  --bg: #f6f7fb;
  --card: rgba(255, 255, 255, 0.92);
  --cardBorder: rgba(15, 23, 42, 0.10);
  --text: rgba(15, 23, 42, 0.92);
  --muted: rgba(15, 23, 42, 0.72);
  --hint: rgba(15, 23, 42, 0.62);
  --danger: #d92d20;
  --accent: #2563eb;
  --accent2: #7c3aed;
  --shadow: 0 12px 36px rgba(15, 23, 42, 0.10);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji",
    "Segoe UI Emoji";
  color: var(--text);
  background-color: var(--bg);
}

.container {
  max-width: 980px;
  margin: 0 auto;
  padding: 28px 16px 56px;
}

.header {
  margin-bottom: 18px;
}

.brandImage {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
  border-radius: 16px;
  border: 1px solid var(--cardBorder);
  box-shadow: var(--shadow);
  margin-bottom: 14px;
  background: #fff;
}

.title {
  margin: 0 0 8px 0;
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.titleBreak {
  display: block;
}

.subtitle {
  margin: 0;
  color: var(--muted);
}

.notice {
  border: 1px solid rgba(217, 45, 32, 0.18);
  background: rgba(217, 45, 32, 0.06);
  border-radius: 14px;
  padding: 14px 14px;
  box-shadow: var(--shadow);
  margin: 14px 0 18px;
}

.notice p {
  margin: 6px 0;
  color: var(--muted);
}

.noticeList {
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--muted);
}

.noticeList li {
  margin: 4px 0;
}

.successScreen {
  margin: 14px 0;
}

.successCard {
  border: 1px solid var(--cardBorder);
  background: rgba(255, 255, 255, 0.92);
  border-radius: 16px;
  padding: 18px 16px;
  box-shadow: var(--shadow);
}

.successTitle {
  margin: 0 0 8px 0;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: rgba(15, 23, 42, 0.92);
}

.successText {
  margin: 0 0 14px 0;
  color: var(--muted);
  line-height: 1.4;
}

.card {
  border: 1px solid var(--cardBorder);
  background: var(--card);
  border-radius: 16px;
  padding: 14px 14px 16px;
  box-shadow: var(--shadow);
  margin: 14px 0;
}

.cardTitle {
  margin: 0 0 8px 0;
  font-size: 16px;
  font-weight: 750;
  letter-spacing: -0.01em;
  color: rgba(15, 23, 42, 0.90);
}

.field {
  margin-top: 12px;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
}

.req {
  color: var(--danger);
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: rgba(255, 255, 255, 0.98);
  color: var(--text);
  padding: 10px 12px;
  font-size: 14px;
  outline: none;
  transition: border-color 120ms ease, box-shadow 120ms ease, transform 80ms ease;
}

textarea {
  resize: vertical;
  min-height: 88px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(37, 99, 235, 0.55);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

input:disabled,
select:disabled,
textarea:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.hint {
  margin: 6px 0 0;
  color: var(--hint);
  font-size: 12.5px;
  line-height: 1.35;
}

.error {
  margin: 6px 0 0;
  color: var(--danger);
  font-size: 12.5px;
  line-height: 1.35;
  min-height: 1.2em;
}

.grid2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.grid3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.dateRow {
  display: flex;
  align-items: center;
  gap: 8px;
}

.datePart {
  width: 80px;
  text-align: center;
}

.dateYear {
  width: 110px;
  text-align: center;
}

.dateSep {
  color: var(--hint);
  font-weight: 700;
  user-select: none;
}

@media (min-width: 760px) {
  .grid2 {
    grid-template-columns: 1fr 1fr;
  }
  .grid3 {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

.radioRow {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
  margin-top: 4px;
}

.radio {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.90);
}

.radio input {
  width: auto;
  margin: 0;
  padding: 0;
}

.checkboxRow {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-weight: 600;
  margin: 0;
}

.checkboxRow input {
  width: auto;
  margin-top: 2px;
}

.formFooter {
  margin-top: 0;
  transform: translateY(var(--footer-y, 0px));
  opacity: var(--footer-o, 1);
  transition: none;
  will-change: transform, opacity;
}

.footerInner {
  max-width: 980px;
  margin: 0 auto;
}

.footerCard {
  border: 1px solid var(--cardBorder);
  background: var(--card);
  border-radius: 16px;
  padding: 14px 14px 14px;
  box-shadow: var(--shadow);
}

.footerStatus {
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  padding: 0 6px;
}

.footerConsent {
  margin: 0;
}

.footerError {
  margin-top: 8px;
}

.footerActions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  width: 100%;
}

.footerSentinel {
  height: 1px;
}

/* After user reached the bottom once, footer becomes sticky */
.formFooter.sticky {
  position: sticky;
  bottom: 16px;
  z-index: 20;
}

.formFooter.sticky .footerCard {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.14);
  box-shadow:
    0 18px 48px rgba(15, 23, 42, 0.18),
    0 2px 10px rgba(15, 23, 42, 0.08);
}

.formFooter[aria-hidden="true"] {
  pointer-events: none;
}

.btn {
  appearance: none;
  border: 1px solid rgba(15, 23, 42, 0.14);
  background: rgba(255, 255, 255, 0.90);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 650;
  transition: transform 80ms ease, border-color 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

.btn:hover {
  transform: translateY(-1px);
  border-color: rgba(37, 99, 235, 0.35);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn.primary {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.10), rgba(124, 58, 237, 0.10));
  border-color: rgba(37, 99, 235, 0.28);
}

/* Keep primary consistent in footer */
.formFooter .btn.primary {
  border-color: rgba(37, 99, 235, 0.32);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(124, 58, 237, 0.12));
}

.btn.subtle {
  background: rgba(15, 23, 42, 0.03);
}

.invalid input,
.invalid select,
.invalid textarea {
  border-color: rgba(217, 45, 32, 0.50);
  box-shadow: 0 0 0 4px rgba(217, 45, 32, 0.10);
}

.pageFooter {
  margin-top: 16px;
}

.pageFooterInner {
  max-width: 980px;
  margin: 0 auto;
  border: 1px solid var(--cardBorder);
  background: rgba(255, 255, 255, 0.72);
  border-radius: 16px;
  padding: 14px 14px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
}

.pageFooterBrand {
  display: flex;
  align-items: center;
  min-width: 0;
}

.pageFooterLogo {
  display: block;
  height: 44px;
  width: auto;
  max-width: 240px;
  object-fit: contain;
  opacity: 0.95;
}

.pageFooterMeta {
  text-align: right;
}

.pageFooterText {
  margin: 0;
  color: rgba(15, 23, 42, 0.50);
  font-size: 12.5px;
  line-height: 1.35;
  font-weight: 650;
}

.pageFooterSubtext {
  margin: 4px 0 0;
  color: rgba(15, 23, 42, 0.50);
  font-size: 12.5px;
  line-height: 1.35;
}

.pageFooterLink {
  color: rgba(15, 23, 42, 0.62);
  text-decoration: none;
  border-bottom: 1px solid rgba(15, 23, 42, 0.18);
}

.pageFooterLink:hover {
  color: rgba(15, 23, 42, 0.78);
  border-bottom-color: rgba(15, 23, 42, 0.30);
}

@media (max-width: 640px) {
  .pageFooterInner {
    flex-direction: column;
    align-items: flex-start;
  }
  .pageFooterMeta {
    text-align: left;
  }
}
