:root {
  --bg: #fff7ef;
  --ink: #1d2038;
  --muted: #706b76;
  --line: #eadccd;
  --soft: #fff0df;
  --panel: #ffffff;
  --accent: #cf1745;
  --accent-dark: #87102d;
  --gold: #f5b642;
  --blue: #184c8c;
  --radius: 8px;
  --shadow: 0 18px 45px rgba(135, 16, 45, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.5;
}

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

.container {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 247, 239, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.header-inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  position: relative;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 240px;
  max-width: 360px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 0;
  background: transparent;
  border: 0;
  flex: 0 0 auto;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  letter-spacing: 0;
}

.brand small {
  color: var(--muted);
  font-size: 12px;
}

.nav-toggle {
  display: none;
}

.nav-toggle-button {
  display: none;
}

.nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  justify-content: flex-end;
  min-width: 0;
}

.nav a,
.tabs a,
.button,
button {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 9px 11px;
  font-weight: 700;
  background: #fff;
  font-size: 13px;
  line-height: 1.2;
}

.nav a:hover,
.tabs a.active,
.tabs a:hover,
.button,
button {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.hero {
  background:
    linear-gradient(135deg, rgba(29, 32, 56, 0.98) 0%, rgba(207, 23, 69, 0.94) 52%, rgba(245, 182, 66, 0.95) 100%),
    repeating-linear-gradient(-35deg, rgba(255,255,255,0.10) 0 2px, transparent 2px 58px);
  color: #fff;
  border-bottom: 1px solid #d99a24;
}

.hero-inner {
  min-height: 350px;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 0.55fr);
  gap: 42px;
  align-items: center;
  padding: 46px 0;
}

.hero-copy {
  max-width: 720px;
}

.hero-panel {
  display: grid;
  gap: 14px;
}

.hero-panel__stamp {
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: var(--radius);
  background: rgba(29, 32, 56, 0.34);
  color: #fff;
}

.hero-panel__stamp strong,
.hero-panel__stamp span {
  display: block;
}

.hero-panel__stamp strong {
  font-size: 30px;
  line-height: 1;
}

.hero-panel__stamp span {
  margin-top: 6px;
  color: #ffe3a4;
  font-weight: 800;
}

.eyebrow {
  margin: 0 0 10px;
  color: #fff6cf;
  font-weight: 800;
  text-transform: uppercase;
  font-size: 13px;
}

h1 {
  margin: 0;
  font-size: clamp(34px, 4vw, 54px);
  line-height: 1.05;
  letter-spacing: 0;
}

h2,
h3 {
  line-height: 1.2;
}

.hero p {
  max-width: 680px;
  margin: 14px 0 0;
  color: #f0f0f0;
  font-size: 18px;
}

.date-form {
  display: grid;
  gap: 10px;
  padding: 18px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.date-form label {
  font-weight: 800;
}

input[type="date"] {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  font: inherit;
}

input[type="text"],
input[type="email"],
input[type="password"],
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  font: inherit;
  background: #fff;
}

textarea {
  resize: vertical;
}

button {
  cursor: pointer;
  font: inherit;
}

.content {
  padding: 30px 0 54px;
}

.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 22px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.notice {
  padding: 12px 14px;
  border: 1px solid #d6d6d6;
  background: #ffffff;
  border-radius: var(--radius);
}

.notice--error {
  border-color: #d9a7a7;
  background: #fff5f5;
}

.notice p {
  margin: 0;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
}

.section-head--home-results {
  margin-top: 4px;
}

.text-link {
  color: var(--accent-dark);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.info-text a {
  color: var(--accent-dark);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.section-head h2 {
  margin: 0 0 4px;
}

.section-head p {
  margin: 0;
  color: var(--muted);
}

.count {
  white-space: nowrap;
  background: #fffdf0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px 12px;
  font-weight: 800;
}

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

.time-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff0df;
}

.time-links a {
  display: grid;
  place-items: center;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid #efd4be;
  border-radius: var(--radius);
  background: #fff;
  color: var(--accent-dark);
  font-weight: 900;
  font-size: 14px;
}

.recent-days {
  margin: 24px 0 28px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.recent-days__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.recent-days__head h2 {
  margin: 0;
  font-size: 22px;
}

.recent-days__head p {
  margin: 0;
  max-width: 440px;
  color: var(--muted);
}

.recent-days__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(178px, 1fr));
  gap: 8px;
}

.recent-day {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  min-height: 72px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.recent-days--compact {
  margin-top: 26px;
}

.recent-days--compact .recent-day {
  min-height: 78px;
}

.recent-days--compact .recent-day strong {
  font-size: 13px;
}

.recent-day strong {
  font-size: 13px;
  line-height: 1.25;
}

.recent-day span {
  color: var(--muted);
  font-size: 13px;
}

.recent-day:hover,
.recent-day.active {
  border-color: var(--accent);
  box-shadow: 0 8px 22px rgba(135, 16, 45, 0.12);
}

.recent-day.active {
  background: var(--accent-dark);
  color: #fff;
}

.recent-day.active span {
  color: #e0e0e0;
}

.result-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  box-shadow: 0 8px 24px rgba(135, 16, 45, 0.08);
  display: grid;
  grid-template-columns: 1fr;
}

.result-card header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 18px 20px;
  background: linear-gradient(90deg, #1d2038 0%, #87102d 100%);
  color: #fff;
  border-right: 0;
  border-bottom: 1px solid var(--line);
  grid-row: auto;
}

.result-card header p {
  margin: 0;
  color: #ffe3a4;
  font-weight: 800;
  font-size: 13px;
}

.result-card h3 {
  margin: 6px 0 0;
  font-size: 19px;
}

.result-card time {
  flex: 0 0 auto;
  width: max-content;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: var(--radius);
  background: #fff7d7;
  color: #4d3a00;
  font-weight: 900;
  font-size: 26px;
  line-height: 1;
}

.result-actions {
  padding: 13px 18px;
  border-bottom: 1px solid var(--line);
  background: #fff7ec;
}

.result-actions .text-link {
  font-size: 15px;
  line-height: 1.35;
}

.table-wrap {
  overflow-x: auto;
  min-width: 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 560px;
}

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

th {
  font-size: 12px;
  text-transform: uppercase;
  color: var(--muted);
  background: #fff2e4;
}

tbody tr:nth-child(even) {
  background: #fffaf4;
}

td strong {
  font-size: 18px;
  color: var(--accent-dark);
}

.empty {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--soft);
}

.empty h1,
.empty h2 {
  margin-top: 0;
}

.info-text p {
  color: var(--muted);
}

.info-text,
.faq {
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.faq details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-top: 10px;
  background: #fff;
}

.faq summary {
  cursor: pointer;
  font-weight: 800;
}

.faq p {
  color: var(--muted);
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #171a31;
  color: #fff;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 0.8fr;
  gap: 18px;
  padding: 42px 0 34px;
}

.site-footer section {
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
}

.site-footer h2 {
  margin: 0 0 10px;
  font-size: 18px;
}

.site-footer p {
  margin: 0;
  color: #d0d0d0;
}

.site-footer a {
  display: block;
  color: #fff;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  font-weight: 700;
  line-height: 1.25;
}

.site-footer a:hover {
  color: #ffe89a;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 16px 0;
  color: #d0d0d0;
}

.footer-disclaimer {
  max-width: 920px;
  margin: 0 0 12px;
  color: #d0d0d0;
  font-size: 13px;
}

.hero--legal .hero-inner,
.hero-inner--legal {
  min-height: 220px;
  grid-template-columns: minmax(0, 1fr);
}

.legal-page {
  max-width: 880px;
}

.legal-page h2 {
  margin: 26px 0 8px;
  font-size: 22px;
}

.legal-page p {
  margin: 0 0 12px;
  color: #333;
}

.legal-page a {
  color: var(--accent-dark);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-updated {
  margin-top: 28px;
  color: var(--muted);
  font-size: 13px;
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  align-items: start;
}

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

.contact-card,
.admin-message {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 8px 24px rgba(135, 16, 45, 0.08);
}

.contact-card h2,
.admin-message h2 {
  margin: 0 0 12px;
}

.contact-card p {
  color: var(--muted);
}

.contact-form {
  display: grid;
  gap: 14px;
}

.contact-form label {
  display: grid;
  gap: 6px;
  font-weight: 800;
}

.contact-card--side {
  position: sticky;
  top: 96px;
}

.contact-card--ads {
  border-color: #cfcfcf;
  background: #fffdf7;
}

.contact-email-box {
  margin-top: 18px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.admin-login {
  max-width: 460px;
}

.admin-messages {
  display: grid;
  gap: 14px;
}

.admin-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.admin-tabs a {
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  font-weight: 800;
}

.admin-list-title {
  margin: 24px 0 12px;
}

.admin-message--ads {
  border-color: #cfcfcf;
  background: #fffdf7;
}

.admin-message header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.admin-message header p,
.admin-message > p {
  margin: 0;
  color: var(--muted);
}

.admin-message a {
  color: var(--accent-dark);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.admin-message time,
.admin-message small {
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 1040px) {
  .header-inner {
    min-height: 72px;
  }

  .brand {
    min-width: 0;
  }

  .brand small {
    display: none;
  }

  .nav a {
    max-width: 190px;
  }

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

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

@media (max-width: 780px) {
  .header-inner,
  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .header-inner {
    min-height: 68px;
    justify-content: center;
  }

  .brand {
    width: calc(100% - 58px);
    padding-right: 8px;
  }

  .brand strong {
    font-size: 16px;
  }

  .nav-toggle-button {
    position: absolute;
    top: 14px;
    right: 0;
    display: grid;
    place-content: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    cursor: pointer;
  }

  .nav-toggle-button span {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: var(--ink);
  }

  .nav {
    display: none;
    width: 100%;
    padding: 10px 0 4px;
    flex-direction: column;
    align-items: stretch;
  }

  .nav-toggle:checked ~ .nav {
    display: flex;
  }

  .nav a {
    width: 100%;
    max-width: none;
    padding: 12px 14px;
  }

  .hero-inner,
  .recent-days__grid {
    grid-template-columns: 1fr;
  }

  .result-card {
    grid-template-columns: 1fr;
  }

  .result-card header {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    grid-row: auto;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .recent-days__head {
    align-items: flex-start;
    flex-direction: column;
  }

  .contact-layout,
  .contact-layout--dual,
  .admin-message header {
    grid-template-columns: 1fr;
  }

  .contact-layout {
    display: grid;
  }

  .admin-message header {
    display: grid;
  }

  .contact-card--side {
    position: static;
  }

  h1 {
    font-size: 34px;
  }

  .hero-inner {
    padding: 36px 0;
    min-height: 0;
  }
}

@media (max-width: 460px) {
  .container {
    width: min(100% - 22px, 1120px);
  }

  .recent-days {
    padding: 14px;
  }

  th,
  td {
    padding: 10px 11px;
  }

  table {
    min-width: 500px;
  }
}
