:root {
  --ink: #1b2430;
  --muted: #5a6570;
  --paper: #f4f6f8;
  --card: #ffffff;
  --line: #e4e8ee;
  --brand: #1e4d6b;
  --brand-2: #2a6f8f;
  --accent: #e4572e;
  --accent-s: #f4a261;
  --warn: #b42318;
  --focus: #2563eb;
  --ok: #0f766e;
  --on-brand: #ffffff;
  --shadow: 0 14px 40px rgba(27, 36, 48, .08);
}
* { box-sizing: border-box; }
html { font-size: 20px; -webkit-text-size-adjust: 100%; }
img, svg { max-width: 100%; height: auto; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    radial-gradient(900px 380px at 8% -20%, rgba(42, 111, 143, .12), transparent 50%),
    radial-gradient(700px 280px at 100% 0%, rgba(228, 87, 46, .08), transparent 42%);
  font-family: "Source Sans 3", "Segoe UI", Calibri, sans-serif;
  line-height: 1.55;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .045;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  z-index: 0;
}
.top, .main, .foot { position: relative; z-index: 1; }
.skip {
  position: absolute; left: -999px; top: 0;
  background: #000; color: #fff; padding: .5rem 1rem;
}
.skip:focus { left: .75rem; top: .75rem; z-index: 20; }
.top {
  position: sticky;
  top: 0;
  z-index: 40;
  color: #fff;
  padding: env(safe-area-inset-top, 0) max(1rem, env(safe-area-inset-right)) 0 max(1rem, env(safe-area-inset-left));
  box-shadow:
    0 1px 0 #8a6a28,
    0 10px 28px rgba(27, 36, 48, .16);
  background:
    linear-gradient(90deg, #6e5420, #e8d39a 35%, #c9a24a 50%, #e8d39a 65%, #6e5420) top / 100% 3px no-repeat,
    linear-gradient(90deg, #6e5420, #e8d39a 35%, #c9a24a 50%, #e8d39a 65%, #6e5420) bottom / 100% 2px no-repeat,
    linear-gradient(180deg, #255a7a 0%, var(--brand) 42%, #163a52 100%);
}
.top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem 1.2rem;
  flex-wrap: wrap;
  max-width: 1100px;
  margin: 0 auto;
  min-height: 4.1rem;
  padding: .45rem 0 .5rem;
}
.brand-row {
  display: flex;
  align-items: center;
  gap: .65rem;
  min-width: 0;
}
.mark {
  flex: 0 0 auto;
  display: flex;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,.28));
}
.mark img {
  display: block;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  background: #1e4d6b;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.35),
    0 0 0 2px rgba(232, 211, 154, .55);
}
.brand {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.55rem;
  font-weight: 600;
  letter-spacing: .05em;
  line-height: 1.1;
}
.brand a { color: inherit; text-decoration: none; }
.tag {
  margin: .05rem 0 0;
  font-size: .68rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(232, 211, 154, .9);
  font-weight: 600;
}
.nav {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  align-items: center;
}
.nav-btn, .big-btn, button.big-btn, a.btn, button.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.65rem;
  padding: .35rem 1rem;
  font-size: .95rem;
  font-family: inherit;
  font-weight: 650;
  letter-spacing: .04em;
  text-decoration: none;
  cursor: pointer;
}
.nav-btn {
  color: #fff;
  border-radius: 9px;
  border: 1px solid rgba(232, 211, 154, .4);
  background: linear-gradient(180deg, #3d7a9c 0%, #1e4d6b 48%, #153a50 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.38),
    inset 0 -2px 3px rgba(0,0,0,.28),
    0 1px 0 rgba(232, 211, 154, .35),
    0 2px 4px rgba(0,0,0,.2);
}
.nav-btn:hover, .nav-btn:focus {
  outline: 3px solid #e8d39a;
  outline-offset: 2px;
  color: #fff;
}
.nav-btn.is-on {
  color: #1b2430;
  border-color: #e8d39a;
  background: linear-gradient(180deg, #f7e7b0 0%, #d4bc7a 45%, #a6843a 100%);
  box-shadow:
    inset 0 1px 0 #fff8e0,
    inset 0 -2px 3px rgba(90, 60, 10, .35),
    0 1px 2px rgba(0,0,0,.2);
  font-weight: 700;
}
.main {
  max-width: 980px;
  margin: 1.35rem auto 2.5rem;
  padding: 2.4rem 2rem 2.8rem;
  background: rgba(255, 252, 248, .86);
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 28px;
  box-shadow: 0 30px 80px rgba(31, 58, 50, .12);
  backdrop-filter: blur(8px);
}
.is-auth .main {
  max-width: 480px;
  padding: 2.2rem 1.8rem 2.4rem;
}
.hero {
  padding: 0 0 2rem;
  margin-bottom: 1.4rem;
}
.values {
  display: grid;
  gap: .85rem;
  margin: 0 0 1.8rem;
}
@media (min-width: 900px) {
  .values { grid-template-columns: 1fr 1fr 1fr; }
}
@media (min-width: 700px) and (max-width: 899px) {
  .values { grid-template-columns: 1fr 1fr; }
}
.value {
  padding: 1rem 1.05rem 1.1rem;
  border-top: 2px solid var(--accent);
  background: transparent;
}
.value b {
  display: block;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: .2rem;
}
.value span { color: var(--muted); font-size: 1rem; }
.welcome-hi {
  margin: 0 0 .7rem;
  font-size: .78rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
}
h1 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(2.3rem, 5vw, 3.35rem);
  font-weight: 600;
  margin: 0 0 .7rem;
  letter-spacing: -.01em;
  line-height: 1.12;
}
h2 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.85rem;
  margin: 2.2rem 0 .85rem;
  font-weight: 600;
}
.lead {
  font-size: 1.2rem;
  margin: 0;
  color: var(--muted);
  max-width: 36rem;
  font-weight: 400;
}
.rule {
  width: 3.2rem;
  height: 2px;
  background: var(--accent);
  border: 0;
  margin: 1.15rem 0 1.25rem;
}
.grid { display: grid; gap: 1rem; }
@media (min-width: 700px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.25rem 1.3rem;
  box-shadow: var(--shadow);
}
.tile {
  display: block;
  min-height: 8rem;
  padding: 1.45rem 1.4rem 1.35rem;
  background: var(--card);
  color: var(--ink);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease;
}
.tile::after {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--accent);
}
.tile:hover, .tile:focus {
  transform: translateY(-3px);
  box-shadow: 0 22px 50px rgba(31, 58, 50, .14);
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
  .tile { transition: none; }
  .tile:hover, .tile:focus { transform: none; }
}
.tile strong {
  display: block;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.7rem;
  font-weight: 600;
  margin: 0 0 .35rem .35rem;
}
.tile span {
  display: block;
  margin-left: .35rem;
  font-size: 1.05rem;
  color: var(--muted);
  font-weight: 400;
  max-width: 26rem;
}
.tile.wide { min-height: 5.4rem; }
.big-btn {
  width: 100%;
  min-height: 3.2rem;
  color: #fff;
  border-radius: 12px;
  border: 1px solid rgba(255, 210, 180, .45);
  letter-spacing: .04em;
  background: linear-gradient(180deg, #f08a5a 0%, #e4572e 42%, #c2410c 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.45),
    inset 0 -3px 4px rgba(0,0,0,.22),
    0 1px 0 rgba(232, 211, 154, .4),
    0 6px 16px rgba(228, 87, 46, .28);
}
.big-btn.alt {
  border-color: rgba(232, 211, 154, .4);
  background: linear-gradient(180deg, #3d7a9c 0%, #1e4d6b 48%, #153a50 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.35),
    inset 0 -3px 4px rgba(0,0,0,.25),
    0 1px 0 rgba(232, 211, 154, .35),
    0 6px 16px rgba(30, 77, 107, .25);
}
.big-btn.warn {
  border-color: rgba(255,180,180,.35);
  background: linear-gradient(180deg, #dc6b5c 0%, #b42318 50%, #8a1c14 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.3),
    inset 0 -2px 3px rgba(0,0,0,.25);
}
.big-btn:active, a.btn:active, button.btn:active, .nav-btn:active {
  transform: translateY(1px);
  box-shadow:
    inset 0 2px 6px rgba(0,0,0,.28),
    0 0 0 1px rgba(232, 211, 154, .25);
}
a.btn, button.btn {
  color: #fff;
  border-radius: 10px;
  padding-left: 1.2rem;
  padding-right: 1.2rem;
  border: 1px solid rgba(232, 211, 154, .4);
  background: linear-gradient(180deg, #3d7a9c 0%, #1e4d6b 48%, #153a50 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.35),
    inset 0 -2px 3px rgba(0,0,0,.25),
    0 1px 0 rgba(232, 211, 154, .3);
}
a.btn.primary, button.btn.primary, button[type=submit] {
  color: #fff;
  border-radius: 10px;
  border: 1px solid rgba(255, 210, 180, .45);
  background: linear-gradient(180deg, #f08a5a 0%, #e4572e 42%, #c2410c 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.4),
    inset 0 -2px 3px rgba(0,0,0,.22),
    0 1px 0 rgba(232, 211, 154, .35);
}
label {
  display: block;
  font-weight: 650;
  margin: .9rem 0 .3rem;
  letter-spacing: .02em;
}
input, textarea, select {
  width: 100%;
  font-size: 1.12rem;
  padding: .85rem .95rem;
  border: 1px solid #c9bdaa;
  border-radius: 12px;
  font-family: inherit;
  background: #fff;
}
textarea { min-height: 8.5rem; }
input:focus, textarea:focus, button:focus, a:focus, select:focus {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
.flash {
  padding: .9rem 1.05rem;
  border-radius: 12px;
  font-weight: 650;
}
.flash.ok { background: #e7f0ea; border: 1px solid #9cbaab; }
.flash.err { background: #f8e8e4; border: 1px solid #d4a39b; }
.tiny { font-size: .95rem; color: var(--muted); }
.foot {
  background: var(--brand);
  color: #c5d0da;
  padding: 2rem 1.3rem calc(2.3rem + env(safe-area-inset-bottom, 0));
  text-align: center;
}
.foot a { color: #fff; font-weight: 650; }
.foot .tiny { color: #a8b4c0; }
.foot-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .7rem;
  margin: 0 0 .85rem;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.45rem;
  color: #fff;
  letter-spacing: .04em;
}
.foot-brand img {
  width: 44px; height: 44px; border-radius: 50%; object-fit: cover;
}
.list a {
  display: block;
  padding: 1.05rem 1.2rem;
  margin: .55rem 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  color: inherit;
  text-decoration: none;
  font-size: 1.12rem;
  box-shadow: var(--shadow);
}
.q-btn {
  display: block; width: 100%; text-align: left; margin: .5rem 0;
  min-height: 3.55rem; padding: .75rem 1.05rem;
  font-size: 1.15rem; border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 8px 20px rgba(31, 58, 50, .05);
}
.q-btn.good { background: #e7f0ea; border-color: #9cbaab; }
.q-btn.bad { background: #f8e8e4; border-color: #d4a39b; }
.bingo-board {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: .45rem; margin: 1rem 0;
}
.bingo-cell {
  min-height: 3.5rem; font-size: 1.2rem; font-weight: 700;
  border: 1px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer;
  font-family: inherit;
}
.bingo-cell.on { background: var(--accent); color: #fff; }
.call {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 3.4rem; font-weight: 600; text-align: center; margin: .3rem 0;
  color: var(--brand);
}
.ladder { font-size: 1.05rem; }
.check { display: flex; gap: .65rem; align-items: flex-start; font-weight: 600; }
.check input { width: auto; min-width: 1.5rem; min-height: 1.5rem; }
.checklist { list-style: none; margin: 0 0 1.2rem; padding: 0; }
.check-row {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .55rem .7rem;
  margin: .4rem 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  min-height: 3.4rem;
}
.check-row.is-done .check-text { text-decoration: line-through; color: var(--muted); }
.check-tick, .check-del { margin: 0; }
.tick {
  width: 2.6rem;
  height: 2.6rem;
  flex: 0 0 2.6rem;
  border-radius: 8px;
  border: 2px solid var(--brand);
  background: #fff;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--ok);
  cursor: pointer;
  font-family: inherit;
}
.check-row.is-done .tick {
  background: #e7f0ea;
  border-color: var(--ok);
}
.check-text { flex: 1; font-size: 1.15rem; }
.del-x {
  min-height: 2.6rem;
  padding: .3rem .7rem;
  font-size: .9rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--warn);
  cursor: pointer;
  font-family: inherit;
  font-weight: 650;
}
.msg { padding: .75rem 0; border-bottom: 1px solid var(--line); }
.help-box {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.15rem 1.25rem;
  margin-top: 2.2rem;
  box-shadow: var(--shadow);
}
.help-box strong { color: var(--brand); }
.pass {
  background: #fff;
  color: var(--ink);
  border-radius: 18px;
  padding: 1.4rem 1.4rem 1.25rem;
  border: 1px solid var(--line);
  border-left: 8px solid var(--accent);
  box-shadow: var(--shadow);
  margin-bottom: 1.2rem;
}
.pass .welcome-hi { color: var(--accent); }
.pass h2 {
  color: var(--ink);
  margin: .2rem 0 .4rem;
  font-size: 2rem;
}
.pass p { margin: .25rem 0; color: var(--muted); }
.pass .num {
  font-family: "Source Sans 3", sans-serif;
  letter-spacing: .12em;
  font-size: .95rem;
  color: var(--brand);
  margin-top: .8rem;
}
@keyframes sft-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
.main { animation: sft-in .55s ease both; }
@media (prefers-reduced-motion: reduce) {
  .main { animation: none; }
}
@media (max-width: 1024px) {
  .top-inner {
    flex-direction: column;
    align-items: stretch;
    min-height: 0;
    gap: .4rem;
  }
  .nav {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: 100%;
    gap: .35rem;
  }
  .nav-btn {
    min-height: 2.75rem;
    padding: .35rem .3rem;
    font-size: .88rem;
    letter-spacing: .02em;
    text-align: center;
  }
}
@media (max-width: 699px) {
  html { font-size: 18px; }
  .tag { display: none; }
  .brand { font-size: 1.35rem; }
  .mark img { width: 38px; height: 38px; }
  .main {
    margin: .6rem .5rem 1.2rem;
    padding: 1.25rem .9rem 1.7rem;
    border-radius: 18px;
  }
  .is-auth .main {
    max-width: none;
    padding: 1.25rem .95rem 1.6rem;
  }
  h1 { font-size: 2rem; }
  h2 { font-size: 1.45rem; }
  .lead { font-size: 1.08rem; }
  .tile { min-height: 5.4rem; padding: 1.05rem 1rem 1.05rem; }
  .tile.wide { min-height: 4.4rem; }
  .tile strong { font-size: 1.4rem; margin-left: .2rem; }
  .tile span { margin-left: .2rem; font-size: 1rem; }
  .hero { padding-bottom: 1.2rem; margin-bottom: 1rem; }
  .values { margin-bottom: 1.2rem; }
  .bingo-cell {
    min-height: 2.7rem;
    font-size: 1rem;
    border-radius: 8px;
  }
  .call { font-size: 2.4rem; }
  .pass { padding: 1.1rem 1rem; }
  .pass h2 { font-size: 1.6rem; }
  .check input { min-width: 1.7rem; min-height: 1.7rem; }
}
@media (min-width: 700px) and (max-width: 1024px) {
  html { font-size: 19px; }
  .main {
    margin: 1rem 1rem 2rem;
    padding: 1.8rem 1.5rem 2.2rem;
  }
  .tile { min-height: 6.4rem; }
  .nav-btn { font-size: .92rem; min-height: 2.9rem; }
}
