:root {
  --page-bg: #ffffff;
  --nav-bg: #285b94;
  --nav-bg-dark: #214d7e;
  --panel-bg: #ffffff;
  --panel-border: #d5d5d5;
  --panel-shadow: 0 3px 12px rgba(0, 0, 0, 0.28);
  --accent: #e5a300;
  --text: #111111;
  --muted: #5d6369;
  --field-border: #d6d6d6;
  --field-focus: #285b94;
  --error: #c83535;
  --footer-bg: #e8f1fa;
  --footer-strip: #cfe0f0;
  --font-sans: "Noto Sans Devanagari", "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #272727;
  color: var(--text);
  font-family: var(--font-sans);
}

body.menu-open {
  overflow: hidden;
  height: 100vh;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

img,
svg {
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--page-bg);
}

.site-header {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 24px 8px;
  background: #ffffff;
}

.brand-link {
  display: inline-flex;
}

.board-logo {
  width: 285px;
  height: auto;
  border: 2px solid #1b1b1b;
  object-fit: contain;
}

.toggle-btn-new {
  display: none;
  position: relative;
  width: 30px;
  height: 20px;
  border: 0;
  background: transparent;
  padding: 0;
  transition: 0.3s all ease;
  z-index: 99;
}

.toggle-btn-new span {
  position: absolute;
  top: 0;
  left: 0;
  width: 30px;
  height: 3px;
  background: #111111;
  transition: 0.3s all ease;
  z-index: 11;
}

.toggle-btn-new span.middle {
  top: 8px;
}

.toggle-btn-new span.bottom {
  top: 16px;
  width: 13px;
}

.toggle-btn-new span.top {
  width: 20px;
}

.menu-open .toggle-btn-new span.top {
  width: 30px;
  top: 10px;
  transform: rotate(45deg);
}

.menu-open .toggle-btn-new span.middle {
  opacity: 0;
}

.menu-open .toggle-btn-new span.bottom {
  width: 30px;
  top: 10px;
  transform: rotate(-45deg);
}

.site-nav {
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 46px;
  padding: 0 24px 0 158px;
  background: var(--nav-bg);
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 50px;
  padding: 0 12px;
  white-space: nowrap;
}

.site-nav a:hover {
  background: #1a3a60;
}

.page-main {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 24px 28px;
}

.result-card {
  width: min(700px, 100%);
  overflow: hidden;
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  background: var(--panel-bg);
  box-shadow: var(--panel-shadow);
}

.result-card__header {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 14px 9px;
  border-bottom: 4px solid var(--accent);
  background: var(--nav-bg);
  color: #ffffff;
}

.result-card__header h1 {
  margin: 0;
  font-size: 1.16rem;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: 0;
}

.result-card__icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 6px;
  background: #ffffff;
  color: var(--nav-bg);
}

.result-card__icon svg {
  width: 25px;
  height: 25px;
  fill: currentColor;
}

.result-form {
  padding: 16px 22px 26px;
}

.field {
  display: grid;
  gap: 5px;
  margin: 0 0 14px;
}

.field span:first-child {
  font-size: 0.96rem;
  line-height: 1.2;
  font-weight: 700;
}

.field input,
.field select {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--field-border);
  border-radius: 6px;
  background: #ffffff;
  color: #111111;
  outline: none;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
  font-size: 0.92rem;
}

.field select {
  appearance: auto;
}

.field input::placeholder {
  color: #666d73;
}

.field input:focus,
.field select:focus {
  border-color: var(--field-focus);
  box-shadow: 0 0 0 3px rgba(40, 91, 148, 0.13);
}

.field.is-invalid input,
.field.is-invalid select {
  border-color: var(--error);
}

.error-text {
  display: none;
  color: var(--error);
  font-size: 0.9rem;
  font-weight: 600;
}

.field.is-invalid .error-text {
  display: block;
}

.captcha-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px minmax(0, 1.55fr);
  gap: 12px;
  align-items: start;
  margin: 8px 0 10px;
}

.captcha-box {
  height: 40px;
  display: flex;
  align-items: center;
  padding: 0 18px;
  border: 1px solid #cfd7df;
  border-radius: 4px;
  background: #ffffff;
  color: #282d33;
  font-size: 0.94rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.refresh-button {
  height: 40px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 0;
  background: var(--nav-bg);
  color: #ffffff;
}

.refresh-button:hover {
  background: var(--nav-bg-dark);
}

.refresh-button:focus-visible,
.submit-button:focus-visible,
.toggle-btn-new:focus-visible {
  outline: 3px solid rgba(40, 91, 148, 0.28);
  outline-offset: 2px;
}

.refresh-button svg {
  width: 26px;
  height: 26px;
  fill: currentColor;
}

.field--captcha {
  margin: 0;
}

.submit-button {
  min-width: 136px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 8px auto 0;
  padding: 0 28px;
  border: 0;
  border-radius: 28px;
  background: var(--nav-bg);
  color: #ffffff;
  font-size: 0.92rem;
  font-weight: 600;
}

.submit-button:hover {
  background: var(--nav-bg-dark);
}

.submit-button:disabled {
  cursor: default;
  opacity: 0.72;
}

.status-message {
  margin: 14px 0 0;
  text-align: center;
  color: var(--error);
  font-size: 0.95rem;
  font-weight: 600;
}

.status-message:empty {
  display: none;
}

.site-footer {
  margin-top: auto;
  background:
    linear-gradient(rgba(232, 241, 250, 0.9), rgba(232, 241, 250, 0.9)),
    repeating-linear-gradient(
      90deg,
      rgba(172, 196, 220, 0.18) 0,
      rgba(172, 196, 220, 0.18) 1px,
      transparent 1px,
      transparent 18px
    );
  text-align: center;
}

.site-footer p {
  margin: 0;
  padding: 11px 24px 12px;
  background: rgba(255, 255, 255, 0.56);
  font-size: 0.9rem;
  line-height: 1.45;
  font-weight: 500;
}

.site-footer strong {
  display: block;
  padding: 9px 24px 10px;
  background: var(--footer-strip);
  font-size: 0.86rem;
  line-height: 1.35;
}

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

@media (min-width: 861px) {
  .site-shell {
    min-width: 960px;
  }
}

@media (max-width: 860px) {
  body {
    padding: 24px;
    background: #2c2c2c;
  }

  .site-shell {
    min-height: calc(100vh - 48px);
    border-radius: 24px;
    position: relative;
  }

  .site-header {
    min-height: 118px;
    justify-content: space-between;
    padding: 22px 28px;
    position: relative;
    z-index: 101;
  }

  .board-logo {
    width: min(300px, calc(100vw - 132px));
    height: auto;
    border: 0;
  }

  .toggle-btn-new {
    display: block;
  }

  .site-nav {
    position: fixed;
    top: 24px;
    bottom: 0;
    left: 24px;
    right: 24px;
    z-index: 90;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    min-height: 0;
    padding: 118px 0 0;
    /* border-radius: 24px; */
    overflow-y: auto;
    overscroll-behavior: contain;
    background: var(--nav-bg);
    transform: translateX(-110%);
    transition: transform 0.32s ease;
    color: #ffffff;
    font-size: 1.35rem;
  }

  .menu-open .site-nav {
    transform: translateX(0);
  }

  .site-nav a {
    min-height: 74px;
    padding: 0 28px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
  }

  .site-nav a:first-child {
    border-top: 0;
  }

  .page-main {
    padding: 30px 20px 250px;
  }

  .result-card {
    border-radius: 4px;
  }

  .result-card__header {
    min-height: 92px;
    padding: 18px 16px 22px;
    align-items: flex-start;
  }

  .result-card__header h1 {
    max-width: 440px;
    font-size: 1.55rem;
  }

  .result-card__icon {
    width: 50px;
    height: 50px;
  }

  .result-form {
    padding: 26px 24px 38px;
  }

  .field {
    margin-bottom: 22px;
  }

  .field span:first-child {
    font-size: 1.25rem;
  }

  .field input,
  .field select {
    height: 54px;
    font-size: 1.12rem;
  }

  .captcha-row {
    grid-template-columns: minmax(0, 1fr) 64px minmax(0, 1fr);
    gap: 10px;
  }

  .captcha-box,
  .refresh-button {
    height: 54px;
  }

  .captcha-box {
    padding: 0 16px;
    font-size: 1.14rem;
  }

  .submit-button {
    min-width: 174px;
    height: 56px;
    margin-top: 14px;
    font-size: 1.18rem;
  }

  .site-footer p {
    padding: 19px 30px 23px;
    font-size: 1.35rem;
  }

  .site-footer strong {
    padding: 15px 24px 17px;
    font-size: 1.12rem;
  }
}

@media (max-width: 560px) {
  body {
    padding: 0;
  }

  .site-shell {
    min-height: 100vh;
    border-radius: 0;
  }

  .site-header {
    min-height: 76px;
    padding: 12px 22px;
  }

  .board-logo {
    width: min(235px, calc(100vw - 112px));
  }

  .site-nav {
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    padding-top: 76px;
    border-radius: 0;
    font-size: 1.15rem;
    max-height: 100vh;
  }

  .site-nav a {
    min-height: 58px;
    padding: 0 28px;
  }

  .page-main {
    padding: 16px 18px 12px;
  }

  .result-card {
    width: 100%;
    border-radius: 7px;
  }

  .result-card__header {
    min-height: 66px;
    padding: 12px 14px;
  }

  .result-card__header h1 {
    font-size: 1.08rem;
    line-height: 1.18;
  }

  .result-card__icon {
    width: 40px;
    height: 40px;
  }

  .result-card__icon svg {
    width: 28px;
    height: 28px;
  }

  .result-form {
    padding: 16px 22px 22px;
  }

  .field {
    gap: 4px;
    margin-bottom: 11px;
  }

  .field span:first-child {
    font-size: 0.92rem;
  }

  .field input,
  .field select {
    height: 40px;
    padding: 0 10px;
    font-size: 0.9rem;
  }

  .captcha-row {
    grid-template-columns: minmax(0, 1fr) 50px minmax(0, 1fr);
    gap: 8px;
    margin: 6px 0 7px;
  }

  .field--captcha {
    grid-column: auto;
  }

  .captcha-box,
  .refresh-button {
    height: 40px;
  }

  .captcha-box {
    padding: 0 12px;
    font-size: 0.88rem;
  }

  .refresh-button svg {
    width: 24px;
    height: 24px;
  }

  .submit-button {
    min-width: 140px;
    height: 42px;
    margin-top: 7px;
    font-size: 0.92rem;
  }

  .site-footer p {
    padding: 10px 18px 11px;
    font-size: 0.8rem;
    line-height: 1.35;
  }

  .site-footer strong {
    padding: 8px 18px 9px;
    font-size: 0.78rem;
  }
}
