:root {
  --paper: #fffdf8;
  --page: #eee7dc;
  --ink: #241710;
  --muted: #725f54;
  --line: #2a1b14;
  --red: #a62020;
  --red-dark: #721515;
  --gold: #e3a524;
  --green: #187447;
  --green-soft: #e0f3e7;
  --danger-soft: #fde6e6;
  --shadow: 8px 8px 0 rgba(42, 27, 20, 0.18);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 8%, rgba(227, 165, 36, 0.17), transparent 28rem),
    linear-gradient(135deg, #f4eee4, var(--page));
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
label,
select {
  cursor: pointer;
}

.registration-page {
  min-height: 100vh;
  padding: 32px 18px;
}

.registration-card {
  width: min(920px, 100%);
  margin: 0 auto;
  padding: 34px 44px 28px;
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.official-header {
  display: grid;
  grid-template-columns: 84px 1fr 84px;
  align-items: center;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 3px solid var(--line);
}

.official-logo {
  display: block;
  width: 78px;
  height: 78px;
  object-fit: contain;
}

.logo-right {
  justify-self: end;
}

.official-copy {
  text-align: center;
}

.official-copy p {
  margin: 2px 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 12.5px;
  line-height: 1.35;
}

.organization-name {
  margin-bottom: 6px !important;
  font-size: clamp(18px, 2.7vw, 25px) !important;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.title-block {
  padding: 22px 10px 18px;
  text-align: center;
  font-family: Georgia, "Times New Roman", serif;
}

.title-block p,
.title-block h1,
.title-block strong {
  display: block;
  margin: 0;
}

.title-block p {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.title-block h1 {
  margin: 5px 0;
  font-size: clamp(18px, 3vw, 24px);
  line-height: 1.3;
  letter-spacing: 0.04em;
}

.title-block strong {
  font-size: 17px;
}

.intro-box {
  margin-bottom: 24px;
  padding: 14px 16px;
  background: #fff5d7;
  border: 2px dashed #7a5208;
  border-radius: 10px;
}

.intro-box p {
  margin: 5px 0 0;
  color: #5d4207;
  font-size: 14px;
  line-height: 1.5;
}

.form-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 210px;
  gap: 34px;
  align-items: start;
}

.fields-column {
  display: grid;
  gap: 17px;
}

.field-grid {
  display: grid;
  gap: 16px;
}

.two-columns {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field,
.field-group {
  min-width: 0;
}

.field label,
.field-group legend {
  display: block;
  margin-bottom: 7px;
  font-weight: 800;
  line-height: 1.35;
}

.field label span,
.field-group legend span {
  color: var(--red);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 12px 13px;
  color: var(--ink);
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 8px;
  outline: none;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  box-shadow: 0 0 0 4px rgba(227, 165, 36, 0.3);
}

.field textarea {
  min-height: 96px;
  resize: vertical;
}

.field small,
.photo-box small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.field-group {
  margin: 0;
  padding: 14px;
  background: #faf5ed;
  border: 2px solid #b8a89b;
  border-radius: 10px;
}

.field-group legend {
  padding: 0 7px;
}

.radio-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.choice-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  background: #fff;
  border: 2px solid #b8a89b;
  border-radius: 8px;
  font-weight: 700;
}

.choice-card:has(input:checked) {
  border-color: var(--red);
  box-shadow: 2px 2px 0 var(--red-dark);
}

.choice-card input,
.consent-box input {
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
  accent-color: var(--red);
}

.photo-column {
  position: sticky;
  top: 20px;
  display: grid;
  gap: 12px;
}

.photo-box {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background:
    linear-gradient(135deg, transparent 48%, rgba(42, 27, 20, 0.06) 49%, rgba(42, 27, 20, 0.06) 51%, transparent 52%),
    #fff;
  border: 3px solid var(--line);
  border-radius: 6px;
  text-align: center;
}

.photo-box:hover {
  background-color: #fff8e8;
}

.photo-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-box span {
  display: grid;
  gap: 4px;
  padding: 18px;
}

.photo-box b {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
}

.photo-box strong {
  font-size: 30px;
}

.consent-box {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 24px;
  padding: 14px;
  background: #f6f0e9;
  border: 2px solid #b8a89b;
  border-radius: 10px;
  line-height: 1.5;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 11px 18px;
  border: 2px solid var(--line);
  border-radius: 9px;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 3px 3px 0 var(--line);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.button:hover {
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--line);
}

.button:active {
  transform: translate(1px, 1px);
  box-shadow: 0 0 0 var(--line);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
  transform: none;
}

.button-primary {
  width: 100%;
  margin-top: 8px;
  color: #fff;
  background: var(--red);
}

.button-primary:hover {
  background: var(--red-dark);
}

.button-outline {
  color: var(--ink);
  background: #fff;
}

.button-whatsapp {
  width: 100%;
  color: #fff;
  background: #157347;
}

.form-message {
  min-height: 24px;
  margin-top: 14px;
  color: var(--red);
  font-weight: 700;
  line-height: 1.45;
}

.form-message.success {
  color: var(--green);
}

.success-panel {
  padding: 30px 20px;
  text-align: center;
  background: var(--green-soft);
  border: 3px solid #17623a;
  border-radius: 12px;
}

.success-panel h2 {
  margin: 12px 0 6px;
}

.success-panel p {
  margin: 0 0 18px;
  color: #315b44;
}

.success-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin: 0 auto;
  color: #fff;
  background: var(--green);
  border: 3px solid var(--line);
  border-radius: 50%;
  font-size: 30px;
  font-weight: 900;
}

.registration-code {
  display: grid;
  gap: 4px;
  max-width: 330px;
  margin: 0 auto 18px;
  padding: 13px;
  background: #fff;
  border: 2px dashed #17623a;
  border-radius: 8px;
}

.registration-code span {
  color: #315b44;
  font-size: 13px;
}

.registration-code strong {
  font-size: 24px;
  letter-spacing: 0.06em;
}

.success-panel .button + .button {
  margin-top: 10px;
}

.registration-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 28px;
  padding-top: 16px;
  color: var(--muted);
  border-top: 1px solid #cbbeb3;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 13px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

[hidden] {
  display: none !important;
}

@media (max-width: 760px) {
  .registration-page {
    padding: 12px;
  }

  .registration-card {
    padding: 22px 18px;
    border-radius: 6px;
    box-shadow: 4px 4px 0 rgba(42, 27, 20, 0.18);
  }

  .official-header {
    grid-template-columns: 60px 1fr;
    gap: 10px;
  }

  .official-logo {
    width: 58px;
    height: 58px;
  }

  .logo-right {
    display: none;
  }

  .official-copy p {
    font-size: 10px;
  }

  .organization-name {
    font-size: 15px !important;
    letter-spacing: 0.03em;
  }

  .title-block {
    padding-inline: 0;
  }

  .title-block p,
  .title-block strong {
    font-size: 14px;
  }

  .title-block h1 {
    font-size: 18px;
  }

  .form-layout {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .photo-column {
    position: static;
    width: min(230px, 100%);
    margin: 0 auto;
    grid-row: 1;
  }

  .two-columns,
  .radio-row {
    grid-template-columns: 1fr;
  }

  .registration-footer {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}
/* KTP atau kartu pelajar */

.identity-box {
  margin-top: 18px;
  aspect-ratio: 16 / 10;
}

.identity-box strong {
  font-size: 21px;
}

.identity-box b {
  font-size: 18px;
}

.identity-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #ffffff;
}

#chooseIdentityButton {
  width: 100%;
}