/* The Student Area (my.bighornhc.ca). Phone first: one column, a tab bar at the bottom.
   Colours come from base.css. */
html, body { background: var(--page); }
.topbar-inner.wide { max-width: 52rem; }
.my { max-width: 52rem; margin: 0 auto; padding: 16px 14px 110px; display: flex; flex-direction: column; gap: 14px; }
.my h1 { font-size: 1.7rem; }
.my h2 { font-size: 1.2rem; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 18px 16px; display: flex; flex-direction: column; gap: 12px; }
.muted { color: var(--muted); }
.small { font-size: 0.88rem; }
.err { color: var(--danger); font-weight: 700; }
.msg { padding: 10px 12px; border-radius: 8px; background: var(--accent-soft); }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.btn-small { min-height: 42px; padding: 0 14px; font-size: 0.95rem; border-radius: 8px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat { background: var(--surface); border-radius: 10px; padding: 12px 10px; text-align: center; }
.stat b { display: block; font-family: var(--font-display); font-size: 1.6rem; line-height: 1.1; }
.stat span { font-size: 0.82rem; color: var(--muted); }
.tag { display: inline-block; font-size: 0.78rem; font-weight: 700; padding: 1px 8px; border-radius: 6px; border: 1px solid var(--line); color: var(--muted); }
.tag.good { color: #3fb27a; border-color: #3fb27a; }
.tag.bad { color: var(--danger); border-color: var(--danger); }
.tag.info { color: var(--accent); border-color: var(--accent); }
:root[data-theme="light"] .tag.good { color: #1d7a46; border-color: #1d7a46; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .tag.good { color: #1d7a46; border-color: #1d7a46; } }
.notice { border-left: 4px solid var(--line); padding: 8px 12px; border-radius: 0 8px 8px 0; background: var(--surface); }
.notice.unread { border-left-color: var(--accent); }
.list-btn { display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%; text-align: left; font: inherit; color: var(--ink);
  background: none; border: 0; border-top: 1px solid var(--line); padding: 12px 2px; cursor: pointer; }
.list-btn:first-child { border-top: 0; }
.list-btn:hover { background: var(--surface); }
.list-btn .sub { font-size: 0.88rem; color: var(--muted); }
.chev { color: var(--muted); font-size: 1.3rem; }
.note-box { background: var(--surface); border-radius: 8px; padding: 10px 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.note-box.coach { border-left: 4px solid var(--accent); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-weight: 700; font-size: 0.95rem; }
.my textarea { min-height: 84px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font: inherit; font-size: 0.95rem; padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--line); background: transparent; color: var(--ink); cursor: pointer; }
.chip[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); font-weight: 700; }
.class-line { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.class-line:first-of-type { border-top: 0; }
.going { min-width: 9.5rem; }
.going[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.code-box { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border: 2px dashed var(--accent); border-radius: 10px; }
.code-box code { font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; letter-spacing: 0.06em; }
.check-row { display: flex; align-items: flex-start; gap: 12px; padding: 12px; border: 1.5px solid var(--line); border-radius: 10px; cursor: pointer; }
.check-row input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--accent); flex: none; }

/* Sign in */
.login { max-width: 26rem; margin: 6vh auto 0; width: 100%; }
.login h1 { text-align: center; }
.name-btn { display: flex; justify-content: space-between; align-items: center; width: 100%; min-height: 60px; padding: 10px 16px; font: inherit; font-size: 1.2rem; font-weight: 700;
  color: var(--ink); background: var(--surface); border: 1.5px solid var(--line); border-radius: 10px; cursor: pointer; text-align: left; }
.name-btn:disabled { cursor: default; opacity: 0.75; font-weight: 400; font-size: 1rem; }
.pin-dots { display: flex; justify-content: center; gap: 14px; min-height: 22px; }
.pin-dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--muted); }
.pin-dot.on { background: var(--accent); border-color: var(--accent); }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.key { font-family: var(--font-display); font-weight: 800; font-size: 1.6rem; min-height: 64px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; }
.key:active { background: var(--accent-soft); }
.key-del { font-family: var(--font-body); font-size: 1rem; font-weight: 700; color: var(--muted); }
.key-go { font-size: 1.25rem; background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

@media (min-width: 760px) {
  .my { padding: 24px 24px 60px; gap: 18px; }
  .panel { padding: 22px 26px; }
}

/* Checklist progress bars */
.bar { display: block; height: 6px; margin-top: 6px; border-radius: 999px; background: var(--surface); overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.check-row + .check-row { margin-top: -4px; }


/* Tournament placings */
.place { flex: none; font-weight: 800; font-size: 0.85rem; padding: 4px 10px; border-radius: 999px; border: 1.5px solid var(--line); color: var(--ink); }
.place.gold { border-color: #d4a72c; color: #e6bb3f; }
.place.silver { border-color: #a9b4bf; color: #c3ccd5; }
.place.bronze { border-color: #b87333; color: #d08a4a; }
:root[data-theme="light"] .place.gold { color: #8a6400; } :root[data-theme="light"] .place.silver { color: #56616c; } :root[data-theme="light"] .place.bronze { color: #8a4f1c; }

/* Map link next to a class or event */
.place-link { display: inline-flex; align-items: center; gap: 3px; font-size: 13px; color: var(--accent); text-decoration: none; white-space: nowrap; }
.place-link:hover span { text-decoration: underline; }

/* Reorganized tabs */
.stats.four { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 420px) { .stats.four { grid-template-columns: repeat(2, 1fr); } }
.up-day { padding: 12px 0 4px; }
.up-day + .up-day, .up-day + details.later { border-top: 1px solid var(--line); }
.up-day h3 { margin: 0; font-size: 1rem; }
.up-day .class-line:first-of-type { border-top: 0; }
details.later { border-top: 1px solid var(--line); padding-top: 10px; }
details.later summary { cursor: pointer; color: var(--accent); font-weight: 600; padding: 4px 0; }
.event-item { display: flex; flex-direction: column; gap: 8px; padding: 16px 0; border-top: 1px solid var(--line); }
.event-item:first-of-type { border-top: 0; }
.event-item h2 { margin: 0; }
.wbar { display: grid; grid-template-columns: 6.5rem 1fr 2rem; align-items: center; gap: 10px; font-size: 0.95rem; }
.wbar b { text-align: right; }
.wbar .bar { margin: 0; }
.medal-row { display: flex; gap: 8px; flex-wrap: wrap; }
.top-actions { display: flex; gap: 8px; align-items: center; }
.journal-item strong { font-style: italic; }
.tag.warn { color: #d39a2c; border-color: #d39a2c; }
:root[data-theme="light"] .tag.warn { color: #8a5a00; border-color: #8a5a00; }
.warnbox { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 10px; border-left: 5px solid #d39a2c; background: var(--surface); }
.warnbox p { margin: 0; }

/* Announcement bar */
#ann-bar { max-width: 52rem; margin: 0 auto; padding: 16px 14px 0; display: flex; flex-direction: column; gap: 8px; }
#ann-bar:empty { display: none; }
.ann { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--accent-soft); border: 1px solid var(--accent); }
.ann p { margin: 0; flex: 1; }
.ann-x { background: none; border: 0; color: var(--muted); font-size: 1.3rem; line-height: 1; cursor: pointer; padding: 0 4px; }
:root[data-theme="light"] .ann { background: #e7f2fc; }
/* Registration closing soon */
.soon { color: #d39a2c; font-weight: 700; }
:root[data-theme="light"] .soon { color: #8a5a00; }
/* Training log by year and month */
.log-year > summary, .log-month > summary { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; cursor: pointer; list-style: none; }
.log-year > summary::-webkit-details-marker, .log-month > summary::-webkit-details-marker { display: none; }
.log-year > summary { font-family: var(--font-display); font-size: 1.25rem; font-weight: 800; padding: 10px 0; border-top: 1px solid var(--line); }
.log-year:first-child > summary { border-top: 0; }
.log-month > summary { font-weight: 700; padding: 8px 0 8px 12px; border-left: 3px solid var(--line); margin: 4px 0; }
.log-month[open] > summary { border-left-color: var(--accent); }
.log-year > summary::before, .log-month > summary::before { content: "▸"; color: var(--accent); margin-right: 6px; display: inline-block; transition: transform .15s; }
.log-year[open] > summary::before, .log-month[open] > summary::before { transform: rotate(90deg); }
.log-year > summary > span:first-child, .log-month > summary > span:first-child { flex: 1; }
.log-month .list-btn { padding-left: 12px; }

/* Achievements */
.big-count { font-size: 1rem; color: var(--muted); } .big-count b { font-family: var(--font-display); font-size: 1.6rem; color: var(--ink); }
.bar.big { height: 10px; margin-top: 0; }
.ach-row { display: flex; gap: 10px; align-items: flex-start; width: 100%; text-align: left; font: inherit; color: var(--ink); background: none; border: 0; border-top: 1px solid var(--line); padding: 12px 2px; }
button.ach-row { cursor: pointer; } button.ach-row:hover { background: var(--surface); }
.ach-mark { font-size: 1.2rem; line-height: 1.3; color: var(--muted); flex: none; }
.ach-row.done .ach-mark { color: #e6bb3f; }
.ach-text { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.ach-text .sub { font-size: 0.9rem; color: var(--muted); }
.ach-side { display: flex; align-items: center; gap: 6px; flex: none; }
.photo-preview { width: 100%; max-width: 320px; min-height: 80px; border-radius: 10px; border: 1.5px dashed var(--line); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.photo-preview img { width: 100%; display: block; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.tallies summary { cursor: pointer; color: var(--accent); font-weight: 600; padding: 6px 0; }
.tally { font-family: var(--font-display); font-size: 1.3rem; min-width: 2.5rem; text-align: right; }
.eyebrow { margin: 0; font-size: 0.8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }

.tally-row { display: grid; grid-template-columns: 1fr auto 5.5rem; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.tally-row .btn, .tally-row .tag { justify-self: end; }
.tally-row .tally { min-width: 0; }
.near { display: flex; flex-direction: column; gap: 6px; width: 100%; text-align: left; font: inherit; color: var(--ink); background: none; border: 0; border-top: 1px solid var(--line); padding: 12px 0; cursor: pointer; }
.near:first-of-type { border-top: 0; }
.near .bar { margin: 0; }
.near-top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }

/* Desktop: no big box behind the cards, and buttons sized to their text */
main.my { background: none; border: 0; border-radius: 0; margin: 0 auto; }
.row-between > .btn, .row-between > a.btn { flex: none; }
@media (min-width: 760px) {
  main.my { padding: 24px 24px 60px; }
  .my .panel > .btn-primary { align-self: flex-start; min-width: 14rem; }
  .my .login > .btn { align-self: stretch; }
}
.ach-text .chips { margin-top: 4px; }

/* Videos for review */
.video-card { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--line); }
.video-thumb { flex: none; width: 128px; border-radius: 8px; overflow: hidden; display: block; }
.video-thumb img { width: 100%; display: block; aspect-ratio: 16 / 9; object-fit: cover; }
@media (max-width: 420px) { .video-card { flex-direction: column; } .video-thumb { width: 100%; } }
.moments { margin: 0; padding-left: 18px; font-size: 0.95rem; }
.moments li { margin: 2px 0; }
.moments a { font-weight: 700; font-variant-numeric: tabular-nums; }
.moment-row { display: grid; grid-template-columns: 5.5rem 1fr auto; gap: 8px; align-items: center; }
.result-item { display: flex; flex-direction: column; gap: 4px; border-top: 1px solid var(--line); padding-bottom: 8px; }
.result-item .class-line { border-top: 0; }

/* Class rows: text takes the room it needs and wraps; the button drops below when there isn't room (big text, long place names) */
.class-line { flex-wrap: wrap; align-items: center; row-gap: 8px; }
.class-line > span:first-child { flex: 1 1 9rem; min-width: 0; overflow-wrap: anywhere; }
.class-line > .going, .class-line > .btn { flex: 0 0 auto; }
.going { min-width: 8rem; padding-left: 12px; padding-right: 12px; }
.place-link { white-space: normal; align-items: flex-start; }
.place-link svg { flex: none; margin-top: 3px; }
/* No divider right under a day's heading */
.up-day > .row-between + .class-line, .up-day > p + .class-line { border-top: 0; }
.up-day { padding: 10px 0 2px; }
.up-day .class-line { padding: 8px 0; }
/* Keep the top bar clear of the phone's status bar */
.topbar { padding-top: env(safe-area-inset-top, 0px); }
.top-actions { display: flex; gap: 8px; align-items: center; flex: none; }

/* Achievement points */
.score-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; width: 100%; text-align: left; font: inherit; color: var(--ink); background: var(--surface); border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 14px; cursor: pointer; }
.score-line .score-icon { width: 30px; flex: none; display: block; line-height: 0; }
.score-line .score-icon svg { width: 100%; height: auto; }
.score-line .score-num { font-size: 1rem; color: var(--muted); }
.score-line .score-num b { font-family: var(--font-display); font-size: 1.6rem; color: var(--ink); }
.score-line .small { flex: 1; }
.pts { display: inline-grid; place-items: center; min-width: 2.2rem; height: 1.6rem; padding: 0 6px; border-radius: 999px; border: 1.5px solid var(--line); font-size: 0.8rem; font-weight: 800; color: var(--muted); font-variant-numeric: tabular-nums; }
.pts.got { border-color: #e6bb3f; color: #e6bb3f; }
:root[data-theme="light"] .pts.got { color: #9a6c00; border-color: #c08a12; }

.rarity { font-size: 0.8rem; color: var(--muted); }
.rarity.rare { color: #b98cf0; }
:root[data-theme="light"] .rarity.rare { color: #6b3fb0; }


/* Score bar: big blue number, text lined up beside it */
.score-line { display: grid; grid-template-columns: auto 1fr auto; align-items: center; column-gap: 14px; flex-wrap: nowrap; }
.score-line .score-num { display: flex; align-items: baseline; gap: 4px; white-space: nowrap; color: var(--muted); }
.score-line .score-num b { color: var(--accent); font-size: 1.9rem; line-height: 1; }
.score-line .small { line-height: 1.35; }
.score-line .chev { color: var(--accent); font-size: 1.4rem; }
/* "pts" in the same typeface as the number, just smaller */
.score-line .score-num { font-family: var(--font-display); font-weight: 700; font-size: 1rem; color: var(--accent); opacity: 1; }
.score-line .score-num b { font-family: var(--font-display); }

/* Rarity tier line: coloured tier name, the rest muted */
.rarity[class*="tier-"] { color: var(--muted); } .rarity.tier-common strong { color: var(--ink); }
.rarity.tier-uncommon strong { color: var(--t-uncommon); } .rarity.tier-rare strong { color: var(--t-rare); } .rarity.tier-epic strong { color: var(--t-epic); } .rarity.tier-legendary strong { color: var(--t-legendary); }
.ach-row strong.tier-common { color: var(--ink); }

/* Community highlights */
.highlight { display: grid; grid-template-columns: 1fr; gap: 2px; padding: 10px 0; border-top: 1px solid var(--line); }
.highlight:first-of-type { border-top: 0; }
.hl-who { font-weight: 800; }
.hl-meta span[class*="tier-"] { font-weight: 700; }

/* Adding or fixing a tournament result */
.result-add > summary { list-style: none; cursor: pointer; font-weight: 700; color: var(--accent); padding: 4px 0; }
.result-form { margin-top: 10px; }
.result-row { display: grid; grid-template-columns: 2fr 1fr 1.5fr; gap: 10px; }
@media (max-width: 420px) { .result-row { grid-template-columns: 1fr 1fr; } .result-row > :first-child { grid-column: 1 / -1; } }
.result-add > summary::-webkit-details-marker { display: none; }

/* "I'm coming" plus "Running late" on today's classes */
.class-line > .going-btns { flex: 0 0 auto; display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
.late-btn { min-width: 8rem; }
.late-btn[aria-pressed="true"] { background: var(--warn); color: var(--paper); border-color: var(--warn); }

/* Notification bell */
.bell-btn { position: relative; }
.bell-btn[aria-current="page"] { border-color: var(--accent); color: var(--accent); }
.bell-count { position: absolute; top: -6px; right: -6px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: #d93a2b; color: #fff; font: 700 0.7rem/19px var(--font-body, inherit); text-align: center; box-shadow: 0 0 0 2px var(--paper); }
.bell-count[hidden] { display: none; }
.bell-list { display: flex; flex-direction: column; gap: 8px; }
.bell-item { display: flex; align-items: flex-start; gap: 12px; width: 100%; text-align: left; padding: 12px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; }
.bell-item:hover { border-color: var(--muted); }
.bell-item.unread { border-color: var(--accent); background: var(--accent-soft); }
.bell-icon { flex: none; width: 22px; height: 22px; color: var(--accent); margin-top: 1px; }
.bell-icon svg { width: 22px; height: 22px; }
.bell-text { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; overflow-wrap: anywhere; }
.bell-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); margin-top: 6px; }
.push-card { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; border-radius: 10px; border: 1.5px dashed var(--accent); }
.push-card p { margin: 0; }
ol.steps { margin: 0; padding-left: 1.3rem; display: flex; flex-direction: column; gap: 6px; }
.btns { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* Settings: cards with rows and on/off switches */
.settings { gap: 14px; }
.settings h1 { margin: 0; }
.set-group { display: flex; flex-direction: column; gap: 0; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); }
.set-group > .set-row:first-child, .set-group > p:first-child + .set-row { border-top: 0; }
.set-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; line-height: 1.35; }
.set-sub { margin: 8px 0 0; padding-top: 12px; border-top: 1px solid var(--line); font-size: 1.05rem; }
.set-group .field { margin: 4px 0 8px; }
.inline-field { display: flex; gap: 8px; }
.inline-field input { flex: 1; min-width: 0; }
.pin-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.settings p { margin: 0; }
.set-group ol.steps { margin: 0 0 6px; }
input.switch { appearance: none; -webkit-appearance: none; flex: none; position: relative; width: 48px; height: 28px; margin: 0; border-radius: 999px; background: var(--line); border: 0; cursor: pointer; transition: background .15s; }
input.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.35); transition: transform .15s; }
input.switch:checked { background: var(--accent); }
input.switch:checked::after { transform: translateX(20px); }
input.switch:disabled { opacity: .45; cursor: default; }
input.switch:focus-visible { outline: 3px solid var(--focus, var(--accent)); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { input.switch, input.switch::after { transition: none; } }
.seg { display: flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.seg button { flex: 1; min-height: 42px; padding: 6px 8px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font: 700 0.95rem var(--font-body, inherit); cursor: pointer; }
.seg button[aria-checked="true"] { background: var(--accent); color: var(--accent-ink); }

/* Messages */
.msg-item { display: flex; flex-direction: column; gap: 6px; padding: 12px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--surface); }
.msg-item + .msg-item { margin-top: 8px; }
.msg-item.mine { border-left: 4px solid var(--accent); }
.msg-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.msg-text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg-reply { margin: 4px 0 0 10px; padding: 8px 10px; border-left: 3px solid var(--accent); background: var(--paper); border-radius: 0 8px 8px 0; }
.msg-reply .msg-text { margin-top: 4px; }
.group-tag { display: inline-block; padding: 6px 12px; border-radius: 999px; border: 1.5px solid var(--accent); background: var(--accent-soft); color: var(--ink); font-weight: 700; font-size: 0.92rem; }

/* Working on (goals) */
.goal { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--surface); }
.goal-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; overflow-wrap: anywhere; }
.goal > .btns { flex: none; flex-wrap: nowrap; }
.goal.done { background: transparent; border-style: dashed; }
.goal-win { flex-direction: column; align-items: flex-start; border-color: var(--accent); background: var(--accent-soft); }
.goal-win p { margin: 0; }
.goal-done-list summary { cursor: pointer; color: var(--muted); font-weight: 700; }

/* Class comments */
.cmt { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--surface); }
.cmt.reply { margin: 6px 0 0 14px; padding: 8px 10px; border-width: 0 0 0 3px; border-color: var(--accent); border-radius: 0 8px 8px 0; background: var(--paper); }
.cmt-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.cmt-head .muted { margin-left: auto; }
.cmt-text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.cmt-acts { display: flex; align-items: center; gap: 14px; }
.cmt-like { min-height: 32px; padding: 2px 10px; border-radius: 999px; border: 1.5px solid var(--line); background: transparent; color: var(--ink); font: inherit; font-size: 0.9rem; cursor: pointer; }
.cmt-like[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); font-weight: 700; }
.cmt-replybox { margin-top: 6px; }

/* Tournament dot map (Club tab) */
.dotmap-stage { position: relative; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.dotmap { display: block; width: 100%; aspect-ratio: 4 / 3; touch-action: none; cursor: grab; user-select: none; }
.dotmap:active { cursor: grabbing; }
.dm-sea { fill: var(--map-sea, #0b1a28); }
.dm-land { fill: var(--map-land, #1f2b38); }
.dm-lake { fill: var(--map-sea, #0b1a28); }
.dm-border { fill: none; stroke: var(--map-border, #5d7186); stroke-width: 1.2px; vector-effect: non-scaling-stroke; }
.dm-sub { fill: none; stroke: var(--map-sub, #3d4d5e); stroke-width: 0.8px; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
.dm-dot { fill: var(--accent); fill-opacity: 0.85; stroke: var(--paper); cursor: pointer; }
.dm-dot.medal { fill: #e0b33a; }
.dm-dot.picked { stroke: var(--ink); fill-opacity: 1; }
.dm-dot:focus-visible { outline: none; stroke: var(--ink); }
.dm-label { fill: var(--ink); stroke: var(--paper); paint-order: stroke; text-anchor: middle; font-weight: 700; font-family: var(--font-body); pointer-events: none; }
.dotmap-controls { position: absolute; top: 8px; right: 8px; display: flex; gap: 6px; }
.dotmap-controls button { min-width: 36px; height: 36px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); font: 700 1.1rem var(--font-body); cursor: pointer; }
.dotmap-controls .dm-all { font-size: 0.85rem; }
.dm-credit { position: absolute; left: 8px; bottom: 4px; margin: 0; font-size: 0.65rem; color: var(--muted); pointer-events: none; }
.dotmap-card { padding: 4px 2px 0; }
.dotmap-card h3 { margin: 0 0 4px; }
.dotmap-card p { margin: 0 0 6px; }
.dotmap-list { display: flex; flex-direction: column; gap: 4px; }
.dm-row { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 8px 10px; text-align: left; border-radius: 8px; border: 1px solid transparent; background: transparent; color: var(--ink); font: inherit; cursor: pointer; }
.dm-row:hover, .dm-row[aria-pressed="true"] { border-color: var(--line); background: var(--surface); }
.dm-name { flex: 1; font-weight: 700; }
.dm-swatch { flex: none; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); }
.dm-swatch.medal { background: #e0b33a; }
:root[data-theme="light"] { --map-sea: #d6e4f0; --map-land: #f4f1ea; --map-border: #8a9aab; --map-sub: #b8c3cf; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) { --map-sea: #d6e4f0; --map-land: #f4f1ea; --map-border: #8a9aab; --map-sub: #b8c3cf; } }
.dm-name { display: flex; flex-direction: column; line-height: 1.25; font-weight: 400; }
.dm-name strong { font-weight: 700; }
.dm-events { margin: 0; padding-left: 1.1rem; display: flex; flex-direction: column; gap: 2px; }
.score-line.placeholder { min-height: 62px; cursor: default; opacity: 0.45; }
.tally-help > summary { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-weight: 700; color: var(--accent); padding: 6px 12px; border: 1.5px solid var(--accent); border-radius: 999px; list-style: none; }
.tally-help > summary::-webkit-details-marker { display: none; }
.tally-help > summary::before { content: "?"; display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-size: 0.75rem; }
.tally-help[open] > summary { background: var(--accent-soft); }
.tally-help p { margin: 0; }
.tally-help .stack { font-size: 0.92rem; padding: 10px 12px; border-radius: 10px; background: var(--surface); }

/* Achievement categories: colourful cards that open in place */
.cat-list { display: flex; flex-direction: column; gap: 10px; }
.cat { border-radius: 14px; border: 1.5px solid color-mix(in srgb, var(--cat) 45%, var(--line)); background: color-mix(in srgb, var(--cat) 10%, var(--paper)); overflow: hidden; }
.cat-head { display: flex; align-items: center; gap: 14px; width: 100%; padding: 12px 14px; border: 0; background: transparent; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.cat-head:hover { background: color-mix(in srgb, var(--cat) 8%, transparent); }
.cat-ring { flex: none; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--cat) calc(var(--pct) * 1%), color-mix(in srgb, var(--cat) 18%, var(--surface)) 0); }
.cat-ring > span { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--paper); font-weight: 800; font-size: 0.78rem; color: var(--cat); }
.cat-text { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cat-text strong { font-size: 1.05rem; }
.cat-text .small { color: var(--muted); }
.cat-chev { flex: none; font-size: 1.6rem; color: var(--cat); transition: transform .25s ease; }
.cat.open .cat-chev { transform: rotate(90deg); }
.cat-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .3s ease; }
.cat.open .cat-body { grid-template-rows: 1fr; }
.cat-inner { overflow: hidden; padding: 0 12px; }
.cat.open .cat-inner { padding: 10px; border-top: 1px solid color-mix(in srgb, var(--cat) 30%, var(--line)); background: var(--paper); display: flex; flex-direction: column; gap: 8px; }
/* Sections inside a category: neutral, with a thin bar in the category colour */
.sec { border-radius: 10px; background: var(--surface); border-left: 4px solid var(--cat); }
.sec-head { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 10px 12px; border: 0; background: transparent; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.sec-name { flex: 1; font-weight: 700; }
.sec.complete .sec-name::after { content: " ✓"; color: #3fb27a; }
.sec-chev { flex: none; font-size: 1.3rem; color: var(--muted); transition: transform .25s ease; }
.sec.open > .sec-head .sec-chev { transform: rotate(90deg); }
.sec-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .28s ease; }
.sec.open > .sec-body { grid-template-rows: 1fr; }
.sec-inner { overflow: hidden; display: flex; flex-direction: column; gap: 8px; padding: 0 10px; }
.sec.open > .sec-body > .sec-inner { padding-bottom: 10px; }
/* Each achievement as its own card */
.ach-card { border: 1px solid var(--line) !important; border-radius: 10px; background: var(--paper); padding: 12px !important; }
.ach-card.done { border-color: color-mix(in srgb, #3fb27a 45%, var(--line)) !important; }
button.ach-card:hover { border-color: var(--muted) !important; }
@media (prefers-reduced-motion: reduce) { .sec-body, .sec-chev { transition: none; } }
@media (prefers-reduced-motion: reduce) { .cat-body, .cat-chev { transition: none; } }

/* My tallies: grouped like the achievements, technique ones count up with - and + */
.sec.tcat .sec-head::before { content: ""; flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--cat); }
.sec.tcat .tally-row:first-child { border-top: 0; }
.sec.tsec { background: var(--surface); border: 1px solid var(--line); }
.tech-row { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border-radius: 10px; background: var(--paper); border: 1px solid var(--line); }
.sec.tcat .sec-inner { padding: 0 8px; }
.tech-foot { display: flex; align-items: center; gap: 12px; margin-top: 4px; }
.tech-foot .bar { flex: 1; margin: 0; }
.tech-row > .btn { margin-top: 4px; }
.step { display: flex; align-items: center; gap: 6px; }
.step-btn { width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--paper); color: var(--ink); font-size: 1.3rem; line-height: 1; cursor: pointer; }
.step-btn:active { background: var(--accent-soft); }
.step-btn:disabled { opacity: .35; cursor: default; }
.step-val { font-family: var(--font-display); min-width: 4.2rem; text-align: center; font-size: 1.05rem; }

/* Matches fenced, by weapon */
.match-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; }
.match-row > span:first-child { font-weight: 600; }

/* All time card on the Club tab */
.at-sub { margin: 6px 0 0; font-size: 1.05rem; padding-top: 12px; border-top: 1px solid var(--line); }

/* Fold-out sections on the Club tab */
.sec.cfold { --cat: var(--accent); background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); }
.sec.cfold > .sec-body > .sec-inner { gap: 12px; }
.sec.cfold .stats .stat { background: var(--paper); }

/* Cards: lists of classes, days, achievements, events and highlights, each with a coloured stripe */
.list-btn, .class-line, .near, .highlight, .result-item, .event-item {
  border: 1px solid var(--line) !important; border-left: 4px solid var(--card-c, var(--accent)) !important;
  border-radius: 10px; background: var(--paper); padding: 12px 14px !important;
}
.list-btn + .list-btn, .class-line + .class-line, .near + .near, .highlight + .highlight, .result-item + .result-item, .event-item + .event-item,
.up-day h3 + .class-line, .up-day .row-between + .class-line, .up-day p + .class-line, .chips + .near, .row-between + .near { margin-top: 8px; }
.list-btn:hover, .near:hover { background: color-mix(in srgb, var(--card-c, var(--accent)) 8%, var(--paper)); }
.up-day + .up-day, .up-day + details.later { border-top: 0 !important; }
.up-day { padding: 8px 0 4px !important; }
.up-day h3 { margin-bottom: 4px; }
.wtag { display: inline-block; font-size: 0.75rem; font-weight: 700; padding: 1px 8px; border-radius: 999px; color: var(--card-c); background: color-mix(in srgb, var(--card-c) 16%, transparent); vertical-align: 2px; }

/* A tournament result: one card, Edit and video links inside it */
.result-line { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.result-line > span:first-child { flex: 1; min-width: 0; }
.result-item { display: flex; flex-direction: column; gap: 6px; }

/* Matches with each sparring partner */
.bout-card { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; border-radius: 10px; background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--accent); }
.bout-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.bout-row select { flex: 1; min-width: 0; }
.bout-row .step-val { min-width: 2.2rem; }
.bout-row .step { gap: 4px; }
.field > .small.muted { font-weight: 400; }

/* The guide */
.guide-list { margin: 0; padding-left: 1.2rem; display: flex; flex-direction: column; gap: 6px; }

/* People from other clubs, on the Different people fenced tally */
.outside summary { cursor: pointer; color: var(--accent); font-weight: 600; font-size: 0.95rem; }

/* Check in from the phone */
.checkin-card { border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); }
.checkin-btn { font-size: 1.2rem; padding: 14px 20px; width: 100%; }
.checkin-done { font-weight: 700; color: #3fb27a; margin: 0; }
.early-yes { color: #3fb27a; margin: 0; }
.bell-note { color: var(--warn, #e0703a); font-weight: 700; margin: 0; }
.checked-in { text-align: center; margin: 0 0 8px; }

/* Search */
.search-box { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--muted); font: inherit; text-align: left; cursor: pointer; margin-bottom: 12px; }
.search-box:hover { border-color: var(--accent); }
.search-hit { display: flex; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.search-hit .ach-text { display: flex; flex-direction: column; gap: 4px; width: 100%; }
.tag-chip { border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 3px 10px; font: inherit; font-size: 0.85rem; cursor: pointer; }
.tag-chip:hover { border-color: var(--accent); color: var(--accent); }
.ach-tag { font-size: 0.75rem; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
/* Pinned tallies and the star */
.tech-row { position: relative; }
.tech-row > strong { padding-right: 40px; }
.pin-btn { position: absolute; top: 6px; right: 6px; width: 34px; height: 34px; border: 0; background: transparent; color: var(--muted); font-size: 1.3rem; line-height: 1; cursor: pointer; border-radius: 50%; }
.pin-btn.on { color: #e6bb3f; }
.pin-btn:hover { background: var(--surface); }
.pinned { padding: 10px; border-radius: 12px; border: 1px solid color-mix(in srgb, #e6bb3f 45%, var(--line)); background: color-mix(in srgb, #e6bb3f 6%, transparent); }
.pinned-title { margin: 0; font-weight: 800; color: #e6bb3f; }
.tech-row.flash { animation: tally-flash 2s ease; }
@keyframes tally-flash { 0%, 60% { box-shadow: 0 0 0 3px var(--accent); } 100% { box-shadow: 0 0 0 0 transparent; } }

/* Small phones: keep the title and the four top buttons on one line */
@media (max-width: 400px) {
  .top-actions { gap: 5px; }
  .wordmark { font-size: 0.78rem; }
}

/* Club numbers: one strip of numbers, then weapon bars that line up */
.sec.cfold { border-left-color: var(--fold-c, var(--accent)); }
.num-strip { display: grid; grid-template-columns: repeat(var(--n, 3), 1fr); background: var(--surface); border-radius: 12px; overflow: hidden; }
.num-strip > div { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 12px 6px 11px; text-align: center; }
.num-strip > div + div { border-left: 1px solid var(--line); }
.num-strip b { font-family: var(--font-display); font-size: 1.55rem; line-height: 1.05; }
.num-strip span { font-size: 0.78rem; line-height: 1.25; color: var(--muted); }
.sub-sec { display: flex; flex-direction: column; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.mini-head { margin: 0; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.wbars { display: grid; grid-template-columns: max-content 1fr minmax(1.6rem, auto); align-items: center; gap: 12px 12px; }
.wname { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 0.95rem; }
.wdot { width: 10px; height: 10px; border-radius: 50%; background: var(--card-c); flex: none; }
.wtrack { display: block; height: 10px; border-radius: 999px; background: var(--paper); overflow: hidden; }
.wtrack > span { display: block; height: 100%; border-radius: 999px; }
.wcount { text-align: right; font-variant-numeric: tabular-nums; }
/* Medal pills stay readable in light mode when the phone picks the theme */
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .place.gold { color: #8a6400; } :root:not([data-theme="dark"]) .place.silver { color: #56616c; } :root:not([data-theme="dark"]) .place.bronze { color: #8a4f1c; } }

/* Videos a coach attached to a class */
.class-vids { display: flex; flex-direction: column; gap: 8px; }
.class-vid { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid #e05a5a; color: var(--ink); text-decoration: none; }
.class-vid:hover { border-color: #e05a5a; }
.class-vid-thumb { position: relative; flex: none; width: 96px; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: var(--paper); }
.class-vid-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.class-vid-play { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 1.1rem; text-shadow: 0 1px 4px rgba(0,0,0,0.6); }
.class-vid-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.class-vid-text strong { overflow-wrap: anywhere; }

/* Class day: one card per class in its weapon's colour */
.day-class { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--card-c); }
.day-class-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.day-class-head h2 { margin: 0; }
.day-class-time { flex-basis: 100%; }
.day-class-note { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; padding: 10px 12px; border-radius: 8px; background: var(--paper); }
.coach-note-card { display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: 12px; border: 1px solid color-mix(in srgb, #3fb27a 45%, var(--line)); border-left: 5px solid #3fb27a; background: color-mix(in srgb, #3fb27a 10%, var(--surface)); }
.coach-note-head { font-weight: 700; color: #3fb27a; }
.coach-note-card p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
:root[data-theme="light"] .coach-note-head { color: #1d7a46; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .coach-note-head { color: #1d7a46; } }

/* Note prompts: each its own colour */
.prompt { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 12px; background: var(--surface); border-left: 4px solid var(--card-c); }
.prompt-label { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.prompt-ico { flex: none; width: 26px; height: 26px; display: inline-grid; place-items: center; border-radius: 50%; color: var(--card-c); background: color-mix(in srgb, var(--card-c) 20%, transparent); }
.prompt textarea { background: var(--paper); }

.sec.cfold .num-strip { background: var(--paper); }

.coach-note-head { display: inline-flex; align-items: center; gap: 8px; }
.cmt-like { display: inline-flex; align-items: center; gap: 6px; }
.ann-icon { display: inline-grid; place-items: center; color: var(--accent); }

/* Reminder of what they wanted to work on, under a class they're coming to */
.rem-slot:empty { display: none; }
.rem-slot { flex-basis: 100%; width: 100%; }
.next-reminder { display: flex; flex-direction: column; gap: 4px; margin-top: 4px; padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, #4a9eff 10%, var(--paper)); border-left: 4px solid #4a9eff; }
.next-reminder-head { display: inline-flex; align-items: center; gap: 6px; font-size: 0.8rem; font-weight: 700; color: #4a9eff; }
.next-reminder p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }

/* Notes review */
.review-note { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border-radius: 10px; background: var(--paper); border-left: 4px solid var(--card-c); }
.review-note p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.who-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 6px 10px; border-radius: 8px; background: var(--paper); }
.who-row .small { text-align: right; }

/* Notes needed: one-time pop-up the day after class */
.nudge-back { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px; background: rgba(0, 0, 0, 0.55); animation: menu-in 0.16s ease-out; }
.nudge { width: 100%; max-width: 26rem; display: flex; flex-direction: column; gap: 10px; padding: 22px; border-radius: 16px; background: var(--paper); border: 1px solid var(--line); border-top: 5px solid #e05a5a; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35); }
.nudge h2 { margin: 0; }
.nudge p { margin: 0; }
.nudge-ico { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; color: #e05a5a; background: color-mix(in srgb, #e05a5a 16%, transparent); }

/* Add to calendar under a class */
.cal-row { flex-basis: 100%; display: flex; flex-direction: column; gap: 8px; }
.cal-btn { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; }
.cal-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.cal-pick[hidden] { display: none; }
.cal-ico { color: #3ab8c8; background: color-mix(in srgb, #3ab8c8 16%, transparent); }
.cal-pop { border-top-color: #3ab8c8; }
.cal-pop .btn { width: 100%; text-align: center; justify-content: center; }

/* Class cards: time | what and where, then who's coming and the buttons */
.class-line.cl2 { display: flex; flex-direction: column; align-items: stretch; gap: 10px; }
.cl-top { display: flex; gap: 14px; align-items: flex-start; }
.cl-time { flex: none; width: 4.6rem; display: flex; flex-direction: column; gap: 1px; padding-right: 12px; border-right: 1px solid var(--line); }
.cl-time b { font-family: var(--font-display); font-size: 1.05rem; line-height: 1.2; white-space: nowrap; }
.cl-time span { font-size: 0.8rem; color: var(--muted); white-space: nowrap; }
.cl-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.cl-name { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.cl-name strong { font-size: 1.05rem; }
.cl-main .place-link { white-space: nowrap; align-items: center; max-width: 100%; }
.cl-main .place-link svg { margin-top: 0; }
.cl-main .place-link span { overflow: hidden; text-overflow: ellipsis; }
.cl-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.cl-count { display: inline-flex; align-items: center; gap: 5px; font-size: 0.85rem; color: var(--muted); }
.cl-acts { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.cl-acts .late-btn { min-width: 0; }
.icon-btn { flex: none; width: 38px; height: 38px; display: inline-grid; place-items: center; border-radius: 9px; border: 1.5px solid var(--line); background: transparent; color: var(--ink); cursor: pointer; padding: 0; }
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }
.cl-time { width: 5.4rem; }
.cl-acts { flex-wrap: wrap; justify-content: flex-end; }
.cl-acts .btn { white-space: nowrap; padding-left: 14px; padding-right: 14px; }
.class-line.cl2, .cl-top, .cl-foot { min-width: 0; max-width: 100%; }
.cl-main .place-link { display: flex; min-width: 0; overflow: hidden; }
.cl-main .place-link span { display: block; min-width: 0; white-space: nowrap; }
/* Long place names wrap to two lines rather than getting cut off */
.cl-main .place-link { align-items: flex-start; }
.cl-main .place-link svg { margin-top: 3px; }
.cl-main .place-link span { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.set-sub-box { display: flex; flex-direction: column; gap: 4px; margin: 0 0 6px 6px; padding: 4px 0 8px 14px; border-left: 3px solid var(--line); }
.set-sub-box[hidden] { display: none; }

.bday-pick { display: grid; grid-template-columns: 1.6fr 1fr; gap: 8px; }

/* HEMA Ratings top 3 per weapon (All time) */
.hr-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 12px; }
.hr-set { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 12px; background: var(--paper); border-left: 4px solid var(--card-c); }
.hr-row { display: flex; align-items: center; gap: 10px; padding: 6px 4px; color: var(--ink); text-decoration: none; border-radius: 8px; }
.hr-row:hover { background: var(--surface); }
.hr-place { flex: none; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; font-weight: 800; font-size: 0.85rem; background: var(--surface); }
.hr-place.place-1 { background: #e6bb3f; color: #2b2100; }
.hr-place.place-2 { background: #b9c3cc; color: #1d242b; }
.hr-place.place-3 { background: #c98a52; color: #2a1606; }
.hr-name { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.hr-name strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hr-rank { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.15; }
.hr-rank b { font-family: var(--font-display); font-size: 1.1rem; }

/* Guest accounts */
.guest-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; }
.guest-note { display: flex; align-items: flex-start; gap: 8px; margin: 0; padding: 8px 12px; border-radius: 10px; font-size: 0.88rem; background: color-mix(in srgb, var(--accent) 10%, var(--surface)); }
.guest-note svg { flex: none; margin-top: 2px; color: var(--accent); }
