:root {
  --navy: #0b2a43;
  --navy-2: #133d5e;
  --sea: #2a7fb8;
  --sea-soft: #e3f1f9;
  --sun: #f4a259;
  --bg: #f4f7f9;
  --card: #ffffff;
  --ink: #14222e;
  --muted: #5f7081;
  --line: #dde5ec;
  --good: #2e8b57;
  --good-soft: #e3f4ea;
  --bad: #c0463a;
  --bad-soft: #fbe9e7;
  --radius: 14px;
  --tap: 48px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); }
body { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
a { color: var(--sea); text-decoration: none; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
h1 { font-size: 24px; }
h2 { font-size: 18px; margin: 22px 0 10px; }
h3 { font-size: 16px; }
p { margin: 6px 0; line-height: 1.45; }

.splash { display: grid; place-items: center; min-height: 80vh; color: var(--muted); }

/* Top bar */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: var(--navy); color: #fff;
  padding: calc(10px + env(safe-area-inset-top)) 16px 12px;
  display: flex; align-items: center; gap: 12px;
}
.topbar .title { flex: 1; font-weight: 700; font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .back { color: #fff; font-size: 26px; line-height: 1; padding: 4px 8px 4px 0; }
.askbtn {
  background: var(--sun); color: var(--navy); border: 0; border-radius: 999px;
  padding: 8px 14px; font-weight: 700; font-size: 14px; cursor: pointer; white-space: nowrap;
}

main { max-width: 760px; margin: 0 auto; padding: 16px; }

/* Bottom nav */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  background: #fff; border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(5, 1fr);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar a {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 9px 0 10px; color: var(--muted); font-size: 12px; font-weight: 600;
}
.tabbar a .ico { font-size: 22px; line-height: 1; }
.tabbar a.on { color: var(--navy); }
.tabbar a.on .ico { transform: scale(1.08); }

/* Cards and lists */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 12px; }
.card.link { display: block; color: inherit; }
.card.link.row { display: flex; }
.card.link:active { background: var(--sea-soft); }
.row { display: flex; align-items: center; gap: 12px; }
.row .grow { flex: 1; min-width: 0; }
.muted { color: var(--muted); font-size: 14px; }
.small { font-size: 13px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 6px 0 4px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; text-align: center; }
.stat b { display: block; font-size: 24px; color: var(--navy); }
.stat span { font-size: 12px; color: var(--muted); }
.hero { background: linear-gradient(135deg, var(--navy), var(--navy-2)); color: #fff; border-radius: var(--radius); padding: 18px; margin-bottom: 14px; }
.hero p { color: #cfe2f0; }
.empty { text-align: center; padding: 26px 16px; color: var(--muted); border: 1.5px dashed var(--line); border-radius: var(--radius); background: #fff; }

.chip { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--sea-soft); color: var(--navy); white-space: nowrap; }
.chip.racing { background: #fde8d6; color: #8a4a12; }
.chip.pre-racing { background: #e3f1f9; color: #164e74; }
.chip.school { background: #e3f4ea; color: #1f6440; }
.chip.suggested { background: #eef1f4; color: #44515e; }
.chip.planned { background: #e3f1f9; color: #164e74; }
.chip.building { background: #fde8d6; color: #8a4a12; }
.chip.live { background: var(--good-soft); color: var(--good); }
.chip.not_now { background: #eef1f4; color: #6b7783; }
.chip.done { background: var(--good-soft); color: var(--good); }
.chip.cancelled { background: var(--bad-soft); color: var(--bad); }

.datebox { width: 54px; text-align: center; border-radius: 12px; background: var(--sea-soft); color: var(--navy); padding: 6px 0; flex: none; }
.datebox b { display: block; font-size: 20px; line-height: 1.1; }
.datebox span { font-size: 11px; font-weight: 700; text-transform: uppercase; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--tap); padding: 0 18px; border-radius: 12px; border: 0;
  background: var(--navy); color: #fff; font-size: 16px; font-weight: 700; cursor: pointer;
}
.btn.block { width: 100%; }
.btn.light { background: var(--sea-soft); color: var(--navy); }
.btn.ghost { background: transparent; color: var(--navy); border: 1.5px solid var(--line); }
.btn.danger { background: var(--bad-soft); color: var(--bad); }
.btn.sun { background: var(--sun); color: var(--navy); }
.btn:disabled { opacity: .55; }
.btnrow { display: flex; gap: 10px; flex-wrap: wrap; margin: 12px 0; }
.btnrow .btn { flex: 1; }

/* Forms */
form .field { margin-bottom: 14px; }
label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
input, select, textarea {
  width: 100%; min-height: var(--tap); padding: 10px 12px; font: inherit; font-size: 16px;
  border: 1.5px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink);
}
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--sea); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hint { font-size: 13px; color: var(--muted); margin-top: 4px; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px 2px; margin: 0 0 14px; background: #fff; }
legend { font-weight: 700; font-size: 14px; padding: 0 6px; color: var(--navy); }

/* Attendance */
.att { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; margin-bottom: 8px; cursor: pointer; user-select: none; min-height: 58px; }
.att .mark { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: #eef1f4; color: var(--muted); flex: none; }
.att.yes { border-color: var(--good); background: var(--good-soft); }
.att.yes .mark { background: var(--good); color: #fff; }
.att.no { border-color: #e9b7b1; background: var(--bad-soft); }
.att.no .mark { background: var(--bad); color: #fff; }
.count { font-weight: 700; color: var(--navy); }

/* Requests */
.vote { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 56px; min-height: 60px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; cursor: pointer; flex: none; font-weight: 800; color: var(--navy); }
.vote.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.vote small { font-size: 11px; font-weight: 600; }
.reply { margin-top: 8px; padding: 8px 10px; border-left: 3px solid var(--sun); background: #fff8f0; border-radius: 6px; font-size: 14px; }
.credit { margin-top: 8px; font-size: 13px; font-weight: 700; color: var(--good); }
.tabs { display: flex; gap: 8px; overflow-x: auto; margin: 4px 0 12px; }
.tabs button { border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: 8px 14px; font-weight: 700; font-size: 14px; color: var(--muted); white-space: nowrap; cursor: pointer; }
.tabs button.on { background: var(--navy); color: #fff; border-color: var(--navy); }

/* Auth */
.auth { max-width: 420px; margin: 0 auto; padding: calc(28px + env(safe-area-inset-top)) 20px 40px; }
.brand { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.brand img { width: 52px; height: 52px; border-radius: 12px; }
.switch { text-align: center; margin-top: 16px; }
.switch button { background: none; border: 0; color: var(--sea); font-weight: 700; font-size: 15px; cursor: pointer; }

#toast {
  position: fixed; left: 50%; bottom: calc(90px + env(safe-area-inset-bottom)); transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; font-size: 15px;
  opacity: 0; pointer-events: none; transition: all .2s; max-width: 90vw; z-index: 50;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.err { background: var(--bad); }

@media (min-width: 900px) {
  main { padding: 24px; }
  .tabbar { max-width: 760px; margin: 0 auto; border-left: 1px solid var(--line); border-right: 1px solid var(--line); border-radius: 14px 14px 0 0; }
}

.tabbar a .ico { position: relative; }
.badge { position: absolute; top: -6px; right: -14px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--sun); color: var(--navy); font-size: 11px; font-weight: 800; line-height: 18px; text-align: center; font-style: normal; }
details.decide { margin-top: 10px; }
details.decide > summary { display: inline-block; cursor: pointer; list-style: none; padding: 7px 12px; border-radius: 10px; background: var(--sea-soft); color: var(--navy); font-weight: 700; font-size: 14px; }
details.decide > summary::-webkit-details-marker { display: none; }
details.decide[open] > summary { margin-bottom: 4px; }

.crewbox { border: 1.5px dashed #9cc7e4; background: #f5fafd; border-radius: var(--radius); padding: 10px 10px 2px; margin-bottom: 10px; }
.crewbox .att { margin-bottom: 8px; }

/* Club picker */
.clublist { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.clubhit { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; font: inherit; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; color: var(--ink); }
.clubhit b { font-size: 14px; }
.clubhit:active { background: var(--sea-soft); }
.clubhit.add { color: var(--sea); font-weight: 700; border-style: dashed; }
.clubchosen { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1.5px solid var(--sea); border-radius: 12px; background: var(--sea-soft); }
.clubchosen .grow { flex: 1; min-width: 0; }
.clubchosen b { font-size: 14px; }

/* Papers (health card, licence) */
.paperwarn { margin-top: 4px; font-size: 13px; font-weight: 600; color: #8a4a12; }
.paperwarn.bad, .txtbad { color: var(--bad); }
.txtwarn { color: #8a4a12; }
.clubcontact { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 4px; font-size: 13px; }
.clubcontact a { font-weight: 600; word-break: break-all; }

/* Weather */
.wx h3 { margin-bottom: 6px; }
.windarrow { display: inline-block; font-weight: 800; color: var(--sea); line-height: 1; }
.wxline { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; margin: 4px 0; font-size: 14px; }
.wxbig { font-size: 22px; font-weight: 800; color: var(--navy); }
.wxwarn { margin-top: 8px; padding: 8px 10px; border-radius: 10px; background: var(--bad-soft); color: var(--bad); font-weight: 700; font-size: 14px; }
.wxstrip { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-top: 10px; text-align: center; font-size: 14px; }
.wxstrip > div, .wxdays > div { background: var(--sea-soft); border-radius: 10px; padding: 6px 4px; }
.wxdays { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 6px; text-align: center; font-size: 14px; }
.wxday { padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.windframe { position: relative; width: 100%; height: 70vh; min-height: 420px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.windframe iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Season planner */
.daychips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.daychip { border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: 8px 12px; font-weight: 700; font-size: 14px; color: var(--muted); cursor: pointer; min-width: 52px; }
.daychip.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.seasonrow { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); color: inherit; font-size: 14px; }
.seasonrow:last-child { border-bottom: 0; }
.seasonrow .sd { width: 64px; font-weight: 700; color: var(--navy); flex: none; }

/* Team chat */
#chatlist { display: flex; flex-direction: column; gap: 4px; padding-bottom: 12px; }
.chatday { align-self: center; margin: 12px 0 6px; padding: 3px 10px; border-radius: 999px; background: #e7edf2; color: var(--muted); font-size: 12px; font-weight: 700; }
.bubble { max-width: 82%; align-self: flex-start; background: #fff; border: 1px solid var(--line); border-radius: 14px 14px 14px 4px; padding: 7px 11px 5px; }
.bubble.mine { align-self: flex-end; background: var(--sea-soft); border-color: #c9e2f2; border-radius: 14px 14px 4px 14px; }
.bubble .who { font-size: 12px; font-weight: 800; color: var(--sea); margin-bottom: 2px; }
.bubble .txt { white-space: pre-wrap; word-wrap: break-word; font-size: 15px; line-height: 1.35; }
.bubble .when { text-align: right; font-size: 11px; color: var(--muted); margin-top: 2px; }
.chatref { display: inline-block; margin-top: 4px; font-weight: 700; font-size: 14px; }
.composer { position: sticky; bottom: calc(70px + env(safe-area-inset-bottom)); display: flex; gap: 8px; align-items: flex-end; background: var(--bg); padding: 8px 0; }
.composer textarea { min-height: 44px; max-height: 140px; resize: none; border-radius: 22px; padding: 10px 14px; }
.composer .btn { min-height: 44px; width: 52px; padding: 0; border-radius: 22px; font-size: 18px; flex: none; }
.tabbar a { font-size: 11px; }

/* Social links */
.socials { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.social { font-size: 13px; font-weight: 700; padding: 5px 10px; border-radius: 999px; background: var(--sea-soft); color: var(--navy); }

/* Trips */
.tripnums { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.tripnum { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 700; color: var(--muted); margin: 0; }
.tripnum input { width: 86px; min-height: 40px; padding: 6px 10px; }
.tripnum b { font-size: 20px; color: var(--navy); min-height: 40px; display: flex; align-items: center; }
.costs { display: flex; flex-direction: column; gap: 6px; }
.costrow { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.costrow input { width: 110px; flex: none; min-height: 38px; padding: 6px 10px; text-align: right; }

/* Drills */
.diagram { width: 100%; height: auto; margin-top: 10px; background: #f5fafd; border: 1px solid var(--line); border-radius: 12px; }
.rulerow { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; border-bottom: 1px solid var(--line); }
.rulerow .chip { flex: none; }

/* Quizzes */
.quizopts { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.quizopt { text-align: left; font: inherit; font-size: 15px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; color: var(--ink); }
.quizopt.right { border-color: var(--good); background: var(--good-soft); font-weight: 700; }
.quizopt.wrong { border-color: var(--bad); background: var(--bad-soft); }
.quizopt.dim { opacity: .55; }
.quizwhy { margin: 10px 0 0; font-size: 14px; line-height: 1.4; }

/* family accounts */
.tabbar.three { grid-template-columns: repeat(3, 1fr); }

/* Save button that stays in view while a long form is being edited */
.btn.stickysave { position: sticky; bottom: calc(70px + env(safe-area-inset-bottom)); z-index: 5; box-shadow: 0 6px 18px rgba(0,0,0,.18); }

/* target events editor */
.targetrow { border: 1px solid var(--line); border-radius: 12px; padding: 8px; margin-bottom: 8px; background: #fff; }
.targetrow input { margin-bottom: 6px; }
.targetrow .row input { margin-bottom: 0; }

/* inventory & settings */
.setrow { border-top: 1px solid var(--line); padding: 8px 0; }
.setgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 4px 10px; margin-top: 4px; font-size: 14px; }
.setedit { border: 1px solid var(--line); border-radius: 12px; padding: 10px; margin-top: 8px; background: #fff; }
.setedit .field { margin-bottom: 8px; }

/* season report */
.report-main { max-width: 760px; }
.report { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 20px; }
.rep-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; border-bottom: 2px solid var(--navy); padding-bottom: 12px; }
.rep-head h1 { margin: 2px 0; font-size: 26px; }
.rep-kicker { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.rep-season { text-align: right; } .rep-season b { font-size: 22px; }
.rep-stats { margin: 14px 0 6px; grid-template-columns: repeat(4, 1fr); }
@media (max-width: 420px) { .rep-stats { grid-template-columns: repeat(2, 1fr); } }
.rep-months { display: flex; gap: 6px; align-items: flex-end; margin: 8px 0 4px; }
.rep-month { flex: 1; text-align: center; font-size: 11px; color: var(--muted); }
.rep-month .bar { background: var(--navy); border-radius: 4px 4px 0 0; margin: 0 auto 3px; width: 70%; }
.rep-month b { display: block; color: var(--ink); }
.report h2 { font-size: 16px; margin: 18px 0 6px; }
.rep-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.rep-table th { text-align: left; font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--line); padding: 4px 6px; }
.rep-table td { padding: 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.rep-list { margin: 0 0 0 18px; padding: 0; } .rep-list li { margin: 3px 0; }
.rep-note textarea { width: 100%; }
.rep-note-print { display: none; white-space: pre-wrap; }
.rep-foot { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 8px; }
.txtgood { color: #1f7a3a; }
@media print {
  .noprint, .tabbar, .topbar, #toast { display: none !important; }
  body { background: #fff; } main { padding: 0; max-width: none; }
  .report { border: 0; padding: 0; }
  .rep-note textarea { display: none; } .rep-note-print { display: block; }
}

/* short step-by-step help */
.howto { background: #f3f8fc; border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; margin: 8px 0; font-size: 14px; }
.howto summary { font-weight: 700; cursor: pointer; }
.howto ol { margin: 6px 0 2px 18px; padding: 0; } .howto li { margin: 3px 0; }

/* translation fix mode */
#fixbar { position: fixed; top: 0; left: 0; right: 0; z-index: 50; background: var(--sun, #f2a65a); color: #1b2a3a; display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: calc(10px + env(safe-area-inset-top)) 16px 10px; font-weight: 700; }
#fixbar button { border: 0; border-radius: 999px; padding: 8px 14px; font-weight: 700; background: #fff; }

/* admin panel */
.adm-sec { margin: 18px 0; }
.adm-sec > h2 { margin: 0 0 8px; }
.adm-tiles { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 700px) { .adm-tiles { grid-template-columns: repeat(2, 1fr); } }
.adm-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (max-width: 700px) { .adm-grid { grid-template-columns: 1fr; } }
.adm-grid .card { margin: 0; }
.adm-chart svg { width: 100%; height: 90px; display: block; margin-top: 8px; }
.adm-axis { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: 4px; }
.adm-list { display: grid; gap: 4px; }
.adm-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: #c8d0d8; flex: none; }
.dot.on { background: #2a8f5b; box-shadow: 0 0 0 3px rgba(42,143,91,.18); }
.dot.bad { background: #c0392b; }
.adm-feat { display: grid; grid-template-columns: 120px 1fr auto; gap: 10px; align-items: center; padding: 5px 0; }
.adm-feat-bar { background: #eef2f6; border-radius: 6px; height: 10px; overflow: hidden; }
.adm-feat-bar i { display: block; height: 100%; background: var(--navy); border-radius: 6px; }
.adm-big { font-size: 26px; color: var(--navy); }
.adm-err { padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 14px; }

/* For sale */
.tabbar.four { grid-template-columns: repeat(4, 1fr); }
.tabs a { border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: 8px 14px; font-weight: 700; font-size: 14px; color: var(--muted); white-space: nowrap; text-decoration: none; }
.tabs a.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.sale-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.sale-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; color: inherit; text-decoration: none; display: flex; flex-direction: column; }
.sale-img { position: relative; aspect-ratio: 4 / 3; background: #eef3f7; display: flex; align-items: center; justify-content: center; font-size: 40px; }
.sale-img img { width: 100%; height: 100%; object-fit: cover; }
.sale-flag { position: absolute; top: 8px; left: 8px; background: var(--navy); color: #fff; font-size: 12px; font-weight: 800; padding: 3px 8px; border-radius: 999px; }
.sale-body { padding: 8px 10px 10px; }
.sale-price { display: block; font-size: 16px; color: var(--navy); }
.sale-title { font-weight: 600; font-size: 14px; line-height: 1.3; margin: 2px 0; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.sale-gallery { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -4px 6px; padding: 0 4px; }
.sale-gallery a { flex: 0 0 88%; max-width: 560px; scroll-snap-align: start; }
.sale-gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 14px; display: block; }
.sale-h1 { font-size: 22px; margin: 6px 0 2px; }
.sale-bigprice { font-size: 24px; font-weight: 800; color: var(--navy); }
.sale-thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.sale-thumb { position: relative; width: 84px; height: 84px; }
.sale-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; }
.sale-thumb button { position: absolute; top: -6px; right: -6px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: var(--navy); color: #fff; font-weight: 800; cursor: pointer; }
.sale-first { position: absolute; bottom: 4px; left: 4px; background: rgba(0,0,0,.6); color: #fff; font-size: 11px; padding: 1px 6px; border-radius: 6px; }
.sale-add { width: 84px; height: 84px; border: 2px dashed var(--line); border-radius: 10px; background: #fff; font-size: 24px; display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; }
.sale-add span { font-size: 11px; color: var(--muted); }
.sale-msgs { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.sale-msg { align-self: flex-start; max-width: 85%; background: #eef3f7; border-radius: 12px; padding: 8px 10px; white-space: pre-wrap; }
.sale-msg.me { align-self: flex-end; background: #dcecf8; }

/* Privacy page */
.privacy-sec ul { margin: 6px 0 0; padding-left: 20px; }
.privacy-sec li { margin: 6px 0; line-height: 1.45; }
.privacy-ico { margin-right: 8px; }

/* Attendance statuses */
.att.exc { border-color: #c9b6e8; background: #f4effb; }
.att.exc .mark { background: #7a5bb5; color: #fff; }
.attsel { width: auto; min-height: 36px; padding: 4px 8px; font-size: 13px; flex: none; max-width: 130px; margin-left: auto; }
.daychips { display: flex; gap: 6px; flex-wrap: wrap; }
.daychips button { border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 12px; font-weight: 700; cursor: pointer; font: inherit; }
.daychips button.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.todo-dates { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.todo-dates button { border: 1.5px solid #e9b7b1; color: var(--bad); background: #fff; border-radius: 10px; padding: 6px 10px; font: inherit; font-size: 14px; cursor: pointer; }

/* ⚓ Marina map */
.mm { position: relative; height: 62vh; min-height: 340px; max-height: 720px; overflow: hidden; border-radius: var(--radius); background: #1d3346; touch-action: none; user-select: none; -webkit-user-select: none; margin: 8px 0; }
.mm-layer { position: absolute; inset: 0; transform-origin: 50% 50%; }
.mm-layer img { position: absolute; width: 256px; height: 256px; max-width: none; pointer-events: none; }
.mm-svg { position: absolute; left: 0; top: 0; pointer-events: none; }
.mm-tags { position: absolute; inset: 0; }
.mtag { position: absolute; transform: translate(-6px, -50%); display: flex; align-items: center; background: rgba(214, 219, 224, .94); border-radius: 0 9px 9px 0; font-size: 11px; font-weight: 700; color: #0b2a6b; white-space: nowrap; box-shadow: 0 1px 3px rgba(0,0,0,.35); cursor: pointer; max-width: 130px; }
.mtag i { width: 12px; align-self: stretch; clip-path: polygon(0 50%, 100% 0, 100% 100%); }
.mtag span { padding: 2px 6px 2px 3px; overflow: hidden; text-overflow: ellipsis; }
.mtag.off { opacity: .55; }
.mtag.hl { outline: 3px solid var(--sun); z-index: 3; }
.mtag.special { background: #f6d77a; color: #5a3d00; border: 1.5px solid #b8860b; z-index: 2; }
.mm.far .mtag span { display: none; }
.mm.far .mtag { border-radius: 50%; }
.mm.far .mtag.hl span, .mm.far .mtag.special span { display: inline; }
.mm.moving .mtag { cursor: grab; outline: 1px dashed #fff; }
.mm-zoom { position: absolute; right: 8px; top: 8px; display: flex; flex-direction: column; gap: 6px; z-index: 5; }
.mm-zoom .btn { min-height: 40px; width: 40px; padding: 0; background: #fff; font-size: 22px; }
.mm-credit { position: absolute; right: 0; bottom: 0; background: rgba(255,255,255,.75); font-size: 10px; padding: 1px 6px; color: #333; z-index: 5; }
.mm-tools { gap: 8px; flex-wrap: wrap; margin: 6px 0; }
.mm-tools .btn, .mm-tools select { min-height: 40px; width: auto; flex: 0 0 auto; }
.mm-hint { background: var(--navy); color: #fff; border-radius: 10px; padding: 8px 12px; font-size: 14px; margin: 6px 0; }
.mdot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; flex: 0 0 auto; vertical-align: middle; }
.hero.hero-special { background: linear-gradient(135deg, #7a5200, #b8860b); }
.adm-row .grow { flex: 1; min-width: 0; }
.mtag.flip { transform: translate(calc(-100% + 6px), -50%); flex-direction: row-reverse; border-radius: 9px 0 0 9px; }
.mtag.flip i { clip-path: polygon(100% 50%, 0 0, 0 100%); }
.mtag.flip span { padding: 2px 3px 2px 6px; }
.mm.far .mtag.flip { transform: translate(-6px, -50%); }
.mm[data-z="21"] .mtag, .mm[data-z="20"] .mtag { font-size: 12px; }
.pier-row { gap: 8px; flex-wrap: wrap; margin: 4px 0 8px; }
.pier-row .btn { width: auto; flex: 0 0 auto; min-height: 40px; }
.mtag.pin { background: var(--navy); color: #fff; font-size: 14px; padding: 3px 4px; border-radius: 10px; transform: translate(-50%, -50%); z-index: 4; border: 2px solid #fff; }
.mtag.pin i { display: none; }
.mm.far .mtag.pin span { display: inline; }
.mm.far .mtag.pin { border-radius: 10px; }
.pierboard { display: grid; grid-template-columns: 1fr 22px 1fr; gap: 10px; align-items: start; }
.pierboard.oneside { grid-template-columns: 0 22px 1fr; }
.pbar { background: #4a5560; border-radius: 6px; align-self: stretch; min-height: 100%; }
.pcol { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ptag { display: flex; align-items: center; gap: 0; background: #d9dee3; border-radius: 0 12px 12px 0; min-height: 52px; overflow: hidden; }
.ptag i { width: 26px; align-self: stretch; clip-path: polygon(0 50%, 100% 0, 100% 100%); flex: 0 0 auto; }
.ptag a { padding: 6px 10px; color: #0b2a6b; min-width: 0; }
.ptag a b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ptag.left { flex-direction: row-reverse; border-radius: 12px 0 0 12px; text-align: right; }
.ptag.left i { clip-path: polygon(100% 50%, 0 0, 0 100%); }
.ptag.special { background: #f6d77a; border: 2px solid #b8860b; }
.ptag.off { opacity: .6; }
.pmove { display: flex; flex-direction: column; }
.pmove button { border: 0; background: transparent; color: var(--navy); font-size: 13px; padding: 3px 8px; cursor: pointer; }
.ptag .grow { flex: 1; }
.pier-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin-bottom: 12px; }
.pier-card { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; color: var(--ink); }
.pier-card .pnum { width: 38px; height: 38px; border-radius: 50%; background: var(--navy); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 18px; flex: 0 0 auto; }
.pier-card .grow { flex: 1; min-width: 0; }
.mm.mm-pier { height: 46vh; min-height: 300px; }
.mtag.pin { max-width: none; }
.pbarwrap { height: 10px; background: var(--line); border-radius: 6px; overflow: hidden; margin: 8px 0 6px; }
.pbarfill { height: 100%; background: var(--good); }
.rep-table.qf input, .rep-table.qf select { min-height: 38px; padding: 4px 6px; width: 92px; }
.rep-table.qf td:last-child input { width: 130px; }
.card.viewas { border: 2px dashed var(--line); }
.card.viewas.on { border-color: #8e44ad; background: #f6effa; }
#testbar { position: fixed; left: 12px; bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 60; display: flex; gap: 8px; align-items: center; background: #6c2c91; color: #fff; padding: 6px 6px 6px 14px; border-radius: 999px; font-weight: 700; font-size: 14px; box-shadow: 0 2px 10px rgba(0,0,0,.25); }
#testbar button { border: 0; background: #fff; color: #6c2c91; font-weight: 800; border-radius: 999px; padding: 7px 12px; cursor: pointer; }
.testgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px; margin-top: 10px; }
.testgrid .btn { display: flex; flex-direction: column; align-items: flex-start; text-align: left; min-height: 56px; gap: 2px; }
.money-row { display: flex; align-items: center; gap: 10px; padding: 4px 0; border-bottom: 1px solid var(--line); }
.money-row input { width: 120px; min-height: 40px; text-align: right; }
.money-row.total { border-bottom: 0; padding-top: 8px; }
.mchart { display: flex; gap: 6px; align-items: flex-end; height: 140px; margin-top: 10px; }
.mcol { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; min-width: 0; }
.mbars { flex: 1; width: 100%; display: flex; gap: 2px; align-items: flex-end; justify-content: center; }
.mbars i { display: block; width: 45%; max-width: 18px; border-radius: 3px 3px 0 0; min-height: 2px; }
.mcol span { font-size: 10px; color: var(--muted); margin-top: 3px; }
.pbar-row { margin: 6px 0; font-size: 14px; }
.pbar-line { height: 7px; border-radius: 4px; margin-top: 3px; }
.card.myboat { display: flex; gap: 14px; align-items: center; background: linear-gradient(135deg, #fff7df, #fff); border: 2px solid #e7c25a; }
@media print { .mchart { height: 110px; } .hero { color: #000; background: none; border: 1px solid #ccc; } .hero p { color: #333; } }
.seg { display: inline-flex; border: 1.5px solid var(--line); border-radius: 999px; overflow: hidden; }
.seg a { padding: 6px 14px; color: var(--navy); font-weight: 700; font-size: 14px; }
.seg a.on { background: var(--navy); color: #fff; }
a.pencil { display: inline-block; padding: 4px 10px; border-radius: 999px; background: var(--sea-soft); color: var(--navy); font-weight: 700; font-size: 13px; white-space: nowrap; }
a.mcol { text-decoration: none; }
a.mcol.on span { color: var(--navy); font-weight: 800; }

/* 🧰 Club inventory */
.cinv-tiles .cinv-tile { cursor: pointer; font: inherit; color: inherit; }
.cinv-tile.on { outline: 2.5px solid var(--navy); }
.cinv-tile.bad b { color: var(--bad); } .cinv-tile.warn b { color: #b8650f; }
.cinv-tabs { position: sticky; top: 0; z-index: 3; background: var(--bg, #f4f7fa); padding: 6px 0; margin: 6px 0; }
.cinv-board { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; margin-bottom: 10px; }
.cinv-kcard { text-align: left; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; font: inherit; color: inherit; cursor: pointer; display: grid; gap: 6px; }
.cinv-kcard.on { outline: 2.5px solid var(--navy); }
.cinv-kcard .row { gap: 8px; align-items: center; }
.cinv-bar { display: flex; height: 8px; border-radius: 99px; overflow: hidden; background: var(--line); min-width: 60px; }
.cinv-bar .g { background: var(--good); } .cinv-bar .a { background: var(--sun); } .cinv-bar .o { background: var(--bad); }
.cinv-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cinv-filters input[type=search] { flex: 1 1 220px; min-width: 0; }
.cinv-filters select { width: auto; flex: 0 1 auto; min-height: 38px; }
.cinv-filters select.on { border-color: var(--navy); background: var(--sea-soft); font-weight: 700; }
.cinv-wrap { padding: 0; overflow: auto; max-height: 75vh; }
.cinv-table { font-size: 13.5px; }
.cinv-table thead th { position: sticky; top: 0; background: #f7f9fb; z-index: 2; padding: 9px 8px; cursor: pointer; user-select: none; white-space: nowrap; }
.cinv-table th.sorted { color: var(--navy); }
.cinv-table th.num, .cinv-table td.num { text-align: right; white-space: nowrap; }
.cinv-table td { padding: 8px; }
.cinv-table td.stick, .cinv-table th:first-child { position: sticky; left: 0; background: #fff; z-index: 1; min-width: 150px; }
.cinv-table th:first-child { z-index: 3; background: #f7f9fb; }
.cinv-row { cursor: pointer; }
.cinv-row:hover td, .cinv-row.open td { background: var(--sea-soft); }
.cinv-row.due td.stick { box-shadow: inset 4px 0 0 var(--bad); }
.cinv-group td { background: #eef3f7 !important; padding: 8px; }
.cinv-group .cinv-bar { max-width: 220px; margin-top: 5px; }
.cinv-detail { padding: 6px 4px 10px; }
.cinv-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px 16px; }
.cinv-hist { display: flex; gap: 10px; align-items: baseline; padding: 4px 0; border-bottom: 1px solid var(--line); }
@media (max-width: 600px) { .cinv-board { grid-template-columns: repeat(2, 1fr); } .cinv-table td.stick { min-width: 120px; } }
main:has(.cinv-page) { max-width: 1280px; }
.cinv-tiles { grid-template-columns: repeat(6, 1fr) !important; }
.cinv-tiles .stat { padding: 10px 6px; }
.cinv-table td, .cinv-table th { white-space: nowrap; }
.cinv-kcard { padding: 8px 10px; gap: 4px; }
.cinv-board { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
@media (max-width: 700px) { .cinv-tiles { grid-template-columns: repeat(3, 1fr) !important; } .cinv-tiles .stat b { font-size: 18px; } }

/* 💶 Club money */
.money-add { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 10px 0; }
.money-add .btn { min-height: 52px; font-size: 17px; margin: 0; }
.btn.money-out { background: #c8742b; color: #fff; }
.btn.money-in { background: var(--good); color: #fff; }
.money-tiles { grid-template-columns: repeat(4, 1fr) !important; }
@media (max-width: 700px) { .money-tiles { grid-template-columns: repeat(2, 1fr) !important; } }
.money-form { border: 2px solid var(--sea); }
.money-form-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 10px; }
.money-form-grid label { display: grid; gap: 3px; }
.money-form-grid label.wide { grid-column: 1 / -1; }
@media (max-width: 600px) { .money-form-grid { grid-template-columns: 1fr 1fr; } }
.money-big { font-size: 22px !important; font-weight: 700; }
.mline { display: flex; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.mline:last-child { border-bottom: 0; }
.mline .mdate { width: 64px; flex: none; }
.txtgood { color: var(--good); }
details.card summary { cursor: pointer; }
.mline .grow { flex: 1; min-width: 0; }

/* 💳 Fees */
.fee-dots { display: flex; gap: 3px; }
.fee-dots i { width: 10px; height: 10px; border-radius: 3px; background: var(--line); display: inline-block; }
.fee-dots i.p { background: var(--good); } .fee-dots i.late { background: var(--bad); } .fee-dots i.now { outline: 2px solid var(--sea); }
.fee-dots.big { flex-wrap: wrap; gap: 6px; }
.fee-m { padding: 4px 8px; border-radius: 8px; background: var(--line); font-size: 12px; font-weight: 700; color: var(--muted); }
.fee-m.p { background: var(--good-soft); color: var(--good); } .fee-m.late { background: var(--bad-soft); color: var(--bad); } .fee-m.now { outline: 2px solid var(--sea); }
.fee-calc { background: var(--sea-soft); border-radius: 10px; padding: 8px 12px; margin: 10px 0; display: grid; gap: 2px; }
.fee-plan { display: grid; grid-template-columns: 1.2fr 0.8fr 2fr auto; gap: 6px; margin: 6px 0; }
@media (max-width: 600px) { .fee-plan { grid-template-columns: 1fr 1fr; } }
.chip.warn { background: #fde8d6; color: #8a4a12; }

/* 📝 Notes */
.note-body { white-space: pre-wrap; margin-top: 2px; }
.note.pinned { border-color: var(--sun); background: #fffaf3; }
.note-vis { display: grid; gap: 6px; margin-top: 4px; }
.note-opt { display: flex; gap: 8px; align-items: center; padding: 8px 10px; border: 1.5px solid var(--line); border-radius: 10px; cursor: pointer; }
.note-opt.on { border-color: var(--sea); background: var(--sea-soft); font-weight: 700; }
.note-opt input { width: 18px; height: 18px; }
.notes-box .note { margin: 8px 0 0; box-shadow: none; }

/* 🧭 Sign-up quiz */
.quiz-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; margin: 10px 0; }
.quiz-opt { display: flex; gap: 12px; align-items: center; text-align: left; padding: 14px; border: 2px solid var(--line); border-radius: var(--radius); background: #fff; font: inherit; font-size: 16px; color: inherit; cursor: pointer; }
.quiz-opt.on { border-color: var(--sea); background: var(--sea-soft); font-weight: 700; }
.quiz-ico { font-size: 28px; }

/* ❓ Help assistant */
.helpfab {
  position: fixed; right: 14px; bottom: calc(78px + env(safe-area-inset-bottom)); z-index: 55;
  width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--sea); color: #fff; font-size: 22px; font-weight: 800; line-height: 44px;
  box-shadow: 0 4px 14px rgba(11, 42, 67, .28);
}
@media print { .helpfab, .helppanel { display: none !important; } }
.helppanel {
  position: fixed; right: 10px; left: 10px; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 70;
  max-height: min(72vh, 620px); display: flex; flex-direction: column; gap: 8px;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px;
  box-shadow: 0 10px 34px rgba(11, 42, 67, .25);
}
@media (min-width: 700px) { .helppanel { left: auto; width: 420px; } }
.helplist { overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 8px; min-height: 120px; }
.helpmsg { padding: 9px 11px; border-radius: 12px; font-size: 14px; line-height: 1.4; max-width: 92%; }
.helpmsg.me { align-self: flex-end; background: var(--sea); color: #fff; white-space: pre-wrap; }
.helpmsg.bot { align-self: flex-start; background: var(--sea-soft); color: var(--ink); }
.helpprefill { margin-top: 8px; padding: 8px; border: 1px dashed var(--sea); border-radius: 10px; background: #fff; }
.helppanel textarea { width: 100%; resize: none; }
.helpfab.high { bottom: calc(140px + env(safe-area-inset-bottom)); }

/* 📝 quick note in the top bar */
.notebtn { background: rgba(255,255,255,.14); color: #fff; border: 0; border-radius: 999px; width: 38px; height: 38px; font-size: 18px; cursor: pointer; margin-right: 8px; flex: none; }
.quicknote {
  position: fixed; top: calc(60px + env(safe-area-inset-top)); right: 10px; left: 10px; z-index: 72;
  max-height: calc(100vh - 160px); overflow-y: auto;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px;
  box-shadow: 0 10px 34px rgba(11, 42, 67, .25);
}
.quicknote .card { box-shadow: none; border: 0; padding: 0; margin: 0; }
@media (min-width: 700px) { .quicknote { left: auto; width: 460px; } }
.jobtick { width: 26px; height: 26px; flex: none; border-radius: 7px; border: 2px solid var(--sea); background: #fff; color: #fff; font-weight: 800; cursor: pointer; line-height: 20px; padding: 0; }
.jobtick.done { background: var(--good); border-color: var(--good); }
.attauto:empty { display: none; }
.att.assumed .mark { opacity: .45; }
.attreason{margin-left:4px;font-weight:700;text-decoration:underline}
/* 🔔 messages button + red count (switch app_badge) */
.inboxbtn { position: relative; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.inboxn:empty { display: none; }
.inboxn { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #e5383b; color: #fff; font-size: 11px; font-weight: 800; line-height: 18px; text-align: center; }
.badgechip { flex: none; min-height: 30px; padding: 2px 8px; opacity: .35; filter: grayscale(1); border: 1px solid var(--line); background: #fff; cursor: pointer; }
.badgechip.on { opacity: 1; filter: none; border-color: #e5383b; }
