* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Trebuchet MS", "Gill Sans", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(122, 168, 219, 0.18), transparent 28%),
    linear-gradient(180deg, #f4f8fc 0%, #ecf2f8 100%);
  color: #10253b;
}

a {
  color: #0d4c86;
}

.appShell {
  width: min(1120px, calc(100vw - 32px));
  margin: 24px auto 40px;
}

.hero {
  background: linear-gradient(135deg, #f8fbff 0%, #e2efff 50%, #d5e4f6 100%);
  border: 1px solid #bfd0e5;
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 20px 50px rgba(32, 61, 94, 0.12);
}

.brandRow {
  display: flex;
  align-items: flex-start;
  gap: 18px;
}

.brandLogo {
  width: 180px;
  max-width: 100%;
  height: auto;
  display: block;
}

.brandCopy {
  max-width: 540px;
}

.brandTitleLink {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  background: #ffffff;
  border-radius: 18px;
  padding: 12px 16px;
  box-shadow: 0 10px 24px rgba(19, 58, 102, 0.12);
  color: #10253b;
  text-decoration: none;
}

.brandTitleLink:hover {
  text-decoration: underline;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid #0d4c86;
  outline-offset: 3px;
}

.brandHeadline {
  margin: 0;
  font-size: clamp(1.8rem, 3.8vw, 2.8rem);
  line-height: 1.08;
  color: #10253b;
}

.brandPromo {
  margin: 12px 0 8px;
  font-size: 1.04rem;
  font-weight: 700;
}

.brandPromo a {
  color: #0d4c86;
  text-decoration: none;
}

.brandPromo a:hover {
  text-decoration: underline;
}

.blurb {
  margin: 0;
  color: #18334d;
  font-size: 1.02rem;
  font-weight: 600;
}

.headerUtility {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  padding-top: 18px;
  margin-top: 18px;
  border-top: 1px solid rgba(41, 86, 132, 0.16);
}

.headerStatusGroup {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.status,
.deviceMeta,
.helpText,
.monthLabel,
.previewHeader {
  margin: 0;
  color: #294563;
}

.layout {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 18px;
  margin-top: 18px;
}

.panel {
  grid-column: span 12;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #d7dfeb;
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 14px 32px rgba(28, 48, 74, 0.08);
}

.pageTitle {
  margin: 0 0 12px;
  color: #142d45;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  line-height: 1.1;
}

.panel h2 {
  margin: 0 0 12px;
  color: #142d45;
}

.monthRegion {
  margin-bottom: 14px;
}

.monthLabel {
  font-size: 1.15rem;
  font-weight: 700;
}

.buttonRow,
.buttonGrid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.buttonGrid button {
  min-width: 160px;
}

button {
  appearance: none;
  border: none;
  border-radius: 999px;
  padding: 11px 16px;
  font: inherit;
  font-weight: 700;
  color: #ffffff;
  background: linear-gradient(135deg, #2563a5 0%, #0d4c86 100%);
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, opacity 120ms ease;
  box-shadow: 0 8px 18px rgba(27, 75, 125, 0.2);
}

button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 12px 22px rgba(27, 75, 125, 0.24);
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}

.previewPanel {
  overflow: hidden;
}

.previewHeader {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  font-weight: 700;
}

.calendarTable {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.calendarTable th,
.calendarTable td {
  text-align: center;
  padding: 12px 8px;
  border: 1px solid #dce5ef;
}

.calendarTable th {
  background: #edf4fb;
  color: #234567;
}

.calendarTable td {
  height: 54px;
  color: #17324d;
  background: #ffffff;
}

.todayCell {
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 3px;
  text-underline-offset: 0.35em;
}

.appList {
  margin: 0;
  padding-left: 22px;
  color: #17324d;
}

.appList li + li {
  margin-top: 10px;
}

.gameTable {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.gameTable td {
  border: 1px solid #dce5ef;
  text-align: center;
  padding: 6px;
  height: 42px;
}

.smallGrid td {
  height: 72px;
}

.gridButton {
  width: 100%;
  min-height: 48px;
  background: #ffffff;
  color: #17324d;
  border: 1px solid #bfd0e5;
  box-shadow: none;
}

.gridButton.isSelected {
  border-color: #0d4c86;
  box-shadow: inset 0 0 0 2px rgba(13, 76, 134, 0.18);
}

.miniTable td {
  height: 24px;
  padding: 2px;
}

.miniCell,
.tokenCell {
  font-weight: 700;
}

.siteFooter {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 18px 0 8px;
  color: #294563;
}

.siteVersion {
  font-size: 0.95rem;
}

.siteFooter a {
  color: #0d4c86;
  font-weight: 700;
  text-decoration: none;
}

.siteFooter a:hover {
  text-decoration: underline;
}

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

@media (min-width: 860px) {
  .layout > .splitLeft {
    grid-column: span 5;
  }

  .layout > .splitRight {
    grid-column: span 7;
  }
}

@media (max-width: 700px) {
  .appShell {
    width: min(100vw - 20px, 1120px);
    margin-top: 10px;
  }

  .hero,
  .panel {
    padding: 16px;
    border-radius: 18px;
  }

  .brandRow,
  .headerUtility {
    flex-direction: column;
    align-items: flex-start;
  }

  .brandLogo {
    width: 150px;
  }

  .buttonGrid button,
  .buttonRow button {
    width: 100%;
  }

  .calendarTable th,
  .calendarTable td {
    padding: 10px 4px;
    font-size: 0.9rem;
  }
}
