/* =====================================================================
   TRIBE / DRAIG GOCH — shared mobile-first design system
   One stylesheet, two token blocks. Add class="theme-boxing" to <body>
   for the red/black club; the default is Tribe sage/cream.
   Every class name from the original stylesheet is preserved.
   ===================================================================== */

:root {
  /* Tribe tokens */
  --sage:       #5a7160;
  --sage-dark:  #435548;
  --sage-light: #8fa896;
  --cream:      #faf8f4;
  --cream-2:    #f1ede5;
  --sand:       #e5ddd0;
  --charcoal:   #33322e;
  --stone:      #6f6c64;
  --terracotta: #c07856;
  --white:      #ffffff;
  --ok:         #3e7a4e;
  --warn:       #a9552f;
  --danger:     #a3252d;

  /* semantic aliases — components use these, so a theme swap is one block */
  --brand:      var(--sage);
  --brand-dark: var(--sage-dark);
  --brand-light:var(--sage-light);
  --paper:      var(--cream);
  --paper-2:    var(--cream-2);
  --surface:    #ffffff;
  --edge:       var(--sand);
  --text:       var(--charcoal);
  --dim:        var(--stone);
  --accent:     var(--terracotta);

  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Inter', -apple-system, 'Segoe UI', sans-serif;
  --max-w: 1140px;
  --radius: 14px;
  --shadow: 0 2px 14px rgba(51,50,46,.08);
  --shadow-lg: 0 10px 40px rgba(51,50,46,.16);
  --tap: 48px;                    /* minimum touch target */
  --safe-b: env(safe-area-inset-bottom, 0px);
  --tabbar-h: 62px;
}

/* --- Draig Goch theme ------------------------------------------------ */
body.theme-boxing {
  --brand:      #b3121b;
  --brand-dark: #84080f;
  --brand-light:#e03a44;
  --paper:      #101114;
  --paper-2:    #191b20;
  --surface:    #191b20;
  --edge:       #2a2d34;
  --text:       #f2f2f3;
  --dim:        #9aa0aa;
  --accent:     #e6b422;
  --ok:         #63d68b;
  --warn:       #f0a17e;
  --shadow: 0 2px 14px rgba(0,0,0,.5);
  --shadow-lg: 0 10px 40px rgba(0,0,0,.6);
  --font-display: 'Barlow Condensed', 'Fraunces', sans-serif;
}
body.theme-boxing h1,
body.theme-boxing h2,
body.theme-boxing h3 { text-transform: uppercase; letter-spacing: .03em; font-weight: 800; }

/* --- reset ----------------------------------------------------------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body); color: var(--text); background: var(--paper);
  line-height: 1.6; -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--brand-dark); text-decoration: none; }
body.theme-boxing a { color: var(--brand-light); }
a:hover { color: var(--accent); }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.15; }
h1 { font-size: clamp(1.8rem, 6vw, 3.2rem); }
h2 { font-size: clamp(1.35rem, 4.5vw, 2rem); }
:focus-visible { outline: 3px solid var(--brand-light); outline-offset: 2px; border-radius: 6px; }

.container { max-width: var(--max-w); margin: 0 auto; padding: 0 1rem; }
@media (min-width: 700px) { .container { padding: 0 1.25rem; } }

/* =====================================================================
   TOP BAR  +  MOBILE SHEET NAV
   ===================================================================== */
.topbar {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--paper) 94%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--edge);
}
.topbar-inner {
  max-width: var(--max-w); margin: 0 auto;
  padding: .6rem 1rem; display: flex; align-items: center;
  justify-content: space-between; gap: 1rem; min-height: 56px;
}
.brand {
  font-family: var(--font-display); font-size: 1.3rem; color: var(--text);
  letter-spacing: .01em; white-space: nowrap;
}
.brand b { color: var(--brand); }
body.theme-boxing .brand { text-transform: uppercase; letter-spacing: .06em; font-weight: 800; }

.nav-toggle {
  display: grid; place-items: center;
  width: var(--tap); height: var(--tap); margin-right: -.5rem;
  background: none; border: 0; cursor: pointer; color: var(--text); border-radius: 10px;
}
.nav-toggle svg { width: 24px; height: 24px; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; }

.nav-links { display: flex; gap: 1.4rem; list-style: none; align-items: center; }
.nav-links a {
  font-weight: 500; font-size: .95rem; color: var(--dim);
  display: inline-flex; align-items: center; min-height: 40px;
}
.nav-links a.active, .nav-links a:hover { color: var(--brand-dark); }
body.theme-boxing .nav-links a.active, body.theme-boxing .nav-links a:hover { color: #fff; }
.nav-cta {
  background: var(--brand); color: #fff !important; padding: .6rem 1.2rem;
  border-radius: 99px; min-height: 44px;
}
.nav-cta:hover { background: var(--brand-dark); }

/* below 780px the links become a slide-down sheet */
@media (max-width: 779px) {
  .nav-toggle { display: grid; }
  .nav-links {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--edge);
    box-shadow: var(--shadow-lg);
    max-height: 0; overflow: hidden; transition: max-height .25s ease;
  }
  .nav-links.open { max-height: 70vh; overflow-y: auto; }
  .nav-links li { border-top: 1px solid var(--edge); }
  .nav-links a {
    padding: .9rem 1rem; min-height: var(--tap); font-size: 1rem; font-weight: 600;
  }
  .nav-cta { border-radius: 0; justify-content: center; }
}
@media (min-width: 780px) { .nav-toggle { display: none; } }

/* =====================================================================
   BUTTONS & FORMS  — everything clears 48px
   ===================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--brand); color: #fff; border: none;
  padding: .8rem 1.6rem; border-radius: 99px;
  font-family: var(--font-body); font-weight: 600; font-size: .95rem;
  min-height: var(--tap); cursor: pointer; transition: background .15s;
  text-align: center;
}
.btn:hover { background: var(--brand-dark); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn.alt { background: var(--paper-2); color: var(--text); border: 1px solid var(--edge); }
.btn.alt:hover { background: var(--edge); color: var(--text); }
.btn.terra { background: var(--accent); }
.btn.terra:hover { background: var(--accent); filter: brightness(.92); }
.btn.danger { background: var(--danger); }
.btn.block { display: flex; width: 100%; }
/* .btn.small keeps a smaller label but never a smaller target */
.btn.small { padding: .5rem 1.1rem; font-size: .87rem; min-height: 44px; }

label {
  display: block; margin: .8rem 0 .3rem;
  font-size: .88rem; font-weight: 600; color: var(--dim);
}
input, select, textarea {
  width: 100%; padding: .78rem .85rem;
  background: var(--surface); border: 1px solid var(--edge); border-radius: 10px;
  font-family: var(--font-body); font-size: 16px;   /* 16px stops iOS zoom on focus */
  color: var(--text); min-height: var(--tap);
}
textarea { min-height: 96px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand-light); border-color: var(--brand); }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--dim) 50%), linear-gradient(135deg, var(--dim) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 2.4rem; }

/* =====================================================================
   CARDS & LAYOUT
   ===================================================================== */
.card {
  background: var(--surface); border: 1px solid var(--edge);
  border-radius: var(--radius); padding: 1.15rem 1.1rem;
  box-shadow: var(--shadow); margin-bottom: 1rem;
}
@media (min-width: 700px) { .card { padding: 1.5rem; margin-bottom: 1.4rem; } }
.card h2 { font-size: 1.3rem; margin-bottom: .8rem; color: var(--brand-dark); }
body.theme-boxing .card h2 { color: var(--text); }

/* mobile first: one column, widen up */
.grid2, .grid3 { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 700px)  { .grid2 { grid-template-columns: 1fr 1fr; gap: 1.4rem; } }
@media (min-width: 700px)  { .grid3 { grid-template-columns: 1fr 1fr; gap: 1.4rem; } }
@media (min-width: 1000px) { .grid3 { grid-template-columns: repeat(3, 1fr); } }

.eyebrow {
  font-size: .68rem; font-weight: 800; letter-spacing: .13em;
  text-transform: uppercase; color: var(--dim);
}
.stack { display: flex; flex-direction: column; gap: .8rem; }
.rowflex { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }

/* =====================================================================
   HERO
   ===================================================================== */
.hero {
  background: linear-gradient(160deg, var(--paper-2), var(--paper));
  padding: 3rem 0 2.6rem; text-align: center;
}
@media (min-width: 700px) { .hero { padding: 5rem 0 4rem; } }
.hero h1 { margin-bottom: .8rem; }
.hero h1 em { color: var(--brand); font-style: normal; }
.hero p { color: var(--dim); max-width: 620px; margin: 0 auto 1.6rem; font-size: 1.02rem; }
.hero .rowflex { justify-content: center; }

/* boxing hero — dark, poster-like */
.hero.fight {
  background:
    radial-gradient(120% 80% at 80% 0%, rgba(179,18,27,.55), transparent 62%),
    linear-gradient(180deg, #15171c, #101114);
  text-align: left; padding: 2.5rem 0 2.2rem; color: #fff;
}
.hero.fight .kicker { font-size: .68rem; font-weight: 800; letter-spacing: .2em; color: var(--accent); text-transform: uppercase; }
.hero.fight h1 { color: #fff; margin: .5rem 0 .5rem; line-height: .95; }
.hero.fight h1 em { color: var(--brand-light); font-style: normal; }
.hero.fight p { color: #b9bec6; margin: 0 0 1.4rem; max-width: 46ch; }

/* =====================================================================
   TIER PRICING
   ===================================================================== */
.tier { text-align: center; position: relative; }
.tier.featured { border: 2px solid var(--brand); }
.tier .price { font-family: var(--font-display); font-size: 2.4rem; color: var(--brand-dark); margin: .4rem 0; }
body.theme-boxing .tier .price { color: var(--brand-light); }
.tier .price small { font-size: 1rem; color: var(--dim); }
.tier ul { list-style: none; text-align: left; margin: 1rem 0 1.3rem; }
.tier ul li { padding: .4rem 0 .4rem 1.6rem; position: relative; color: var(--dim); font-size: .93rem; }
.tier ul li::before { content: '\2713'; position: absolute; left: 0; color: var(--brand); font-weight: 700; }
.badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: #fff; font-size: .74rem; font-weight: 700;
  padding: .25rem .9rem; border-radius: 99px; white-space: nowrap;
}

/* =====================================================================
   PILLS / CHIPS / STATUS
   ===================================================================== */
.pill, .chip {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .25rem .7rem; border-radius: 99px;
  font-size: .74rem; font-weight: 700; white-space: nowrap; flex: 0 0 auto;
  background: var(--paper-2); color: var(--dim);
}
.pill.ok, .chip.ok, .chip.go { background: #e3efe6; color: #2f6b40; }
.pill.warn, .chip.warn, .chip.hot { background: #f6e3d8; color: var(--warn); }
.pill.muted, .chip.muted { background: var(--paper-2); color: var(--dim); }
body.theme-boxing .pill.ok, body.theme-boxing .chip.ok, body.theme-boxing .chip.go { background: #153421; color: #63d68b; }
body.theme-boxing .pill.warn, body.theme-boxing .chip.warn, body.theme-boxing .chip.hot { background: #3a1a12; color: #f0a17e; }

/* =====================================================================
   ALERT BANNER  (home check-in, buddy warnings)
   ===================================================================== */
.alert {
  display: flex; gap: .7rem; align-items: flex-start;
  background: #fdf1e7; border: 1px solid #f0cdb3;
  border-radius: 12px; padding: .85rem .9rem; margin-bottom: 1rem;
}
body.theme-boxing .alert { background: #33200f; border-color: #6b4520; }
.alert.red { background: #fdeced; border-color: #f0b8bd; }
body.theme-boxing .alert.red { background: #331014; border-color: #6b2028; }
.alert .dot {
  width: 10px; height: 10px; border-radius: 99px; background: var(--accent);
  margin-top: .45rem; flex: 0 0 auto; box-shadow: 0 0 0 4px rgba(192,120,86,.18);
}
.alert.red .dot { background: var(--danger); box-shadow: 0 0 0 4px rgba(163,37,45,.16); }
.alert .grow { flex: 1; min-width: 0; }
.alert b { font-size: .92rem; display: block; }
.alert p { font-size: .84rem; color: var(--dim); margin: .15rem 0 .6rem; }
.alert .btn { background: var(--accent); }
.alert.red .btn { background: var(--danger); }

/* =====================================================================
   CALORIE RING  (+ legacy .kcal-* classes kept working)
   ===================================================================== */
.ring-row { display: flex; align-items: center; gap: 1rem; }
.ring { width: 104px; height: 104px; flex: 0 0 auto; position: relative; }
.ring svg { transform: rotate(-90deg); display: block; }
.ring .track { stroke: var(--paper-2); }
.ring .fill { stroke: var(--brand); transition: stroke-dashoffset .5s ease; }
.ring .mid { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; line-height: 1.05; }
.ring .mid b { font-family: var(--font-display); font-size: 1.55rem; display: block; }
.ring .mid span { font-size: .6rem; font-weight: 700; letter-spacing: .09em; color: var(--dim); text-transform: uppercase; }

.kcal-wrap { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; }
.kcal-num { font-family: var(--font-display); font-size: 2.4rem; color: var(--brand-dark); line-height: 1; }
.kcal-bar, .bar { height: 10px; background: var(--paper-2); border-radius: 99px; overflow: hidden; margin-top: .5rem; }
.kcal-bar > div, .bar > i, .bar > div {
  display: block; height: 100%; border-radius: 99px;
  background: linear-gradient(90deg, var(--brand-light), var(--brand)); transition: width .4s;
}
.pts-bar { height: 12px; background: var(--paper-2); border-radius: 99px; overflow: hidden; }
.pts-bar > div { height: 100%; background: linear-gradient(90deg, var(--accent), var(--brand)); }

/* =====================================================================
   QUICK ACTION GRID
   ===================================================================== */
.qgrid { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
@media (min-width: 900px) { .qgrid { grid-template-columns: repeat(4, 1fr); } }
.q {
  background: var(--surface); border: 1px solid var(--edge); border-radius: 12px;
  padding: .8rem .75rem; display: flex; flex-direction: column; gap: .3rem;
  min-height: 78px; justify-content: center; cursor: pointer;
  font: inherit; color: var(--text); text-align: left;
}
.q:hover { border-color: var(--brand-light); }
.q svg { width: 21px; height: 21px; stroke: var(--brand); stroke-width: 1.9; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.q b { font-size: .84rem; }
.q i { font-style: normal; font-size: .72rem; color: var(--dim); }
.q .stat { font-family: var(--font-display); font-size: 1.6rem; line-height: 1; }

/* =====================================================================
   ROWS — the mobile replacement for tables
   ===================================================================== */
.row {
  display: flex; align-items: center; gap: .75rem;
  padding: .7rem 0; border-bottom: 1px solid var(--edge);
}
.row:last-child { border-bottom: 0; }
.row .av {
  width: 36px; height: 36px; border-radius: 99px; background: var(--brand); color: #fff;
  display: grid; place-items: center; font-size: .76rem; font-weight: 800; flex: 0 0 auto;
}
.row .av.terra { background: var(--accent); }
.row .av.stone { background: var(--dim); }
.row .av.red   { background: #b3121b; }
.row .gr { flex: 1; min-width: 0; }
.row .gr b { font-size: .88rem; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .gr i { font-style: normal; font-size: .76rem; color: var(--dim); }

/* =====================================================================
   TABLES — scroll on tablet, restack into rows on phones
   ===================================================================== */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -.25rem; }
table.tbl { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.tbl th {
  text-align: left; color: var(--dim); font-weight: 700; font-size: .72rem;
  text-transform: uppercase; letter-spacing: .06em;
  padding: .6rem; border-bottom: 2px solid var(--edge); white-space: nowrap;
}
table.tbl td { padding: .65rem .6rem; border-bottom: 1px solid var(--paper-2); }

@media (max-width: 699px) {
  table.tbl, table.tbl tbody, table.tbl tr, table.tbl td { display: block; width: 100%; }
  table.tbl thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  table.tbl tr {
    border: 1px solid var(--edge); border-radius: 12px;
    padding: .7rem .85rem; margin-bottom: .7rem; background: var(--surface);
  }
  table.tbl td { border: 0; padding: .22rem 0; display: flex; gap: .8rem; align-items: baseline; }
  table.tbl td::before {
    content: attr(data-label); flex: 0 0 40%; max-width: 40%;
    font-size: .72rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .05em; color: var(--dim);
  }
  table.tbl td:first-child { font-weight: 700; font-size: 1rem; padding-bottom: .4rem; }
  table.tbl td:first-child::before { display: none; }
}

/* =====================================================================
   TABS — pill strip on desktop, hidden on mobile in favour of .tabbar
   ===================================================================== */
.tabs { display: flex; gap: .4rem; flex-wrap: wrap; margin: 1.2rem 0; }
.tab {
  padding: .6rem 1.1rem; border-radius: 99px; background: var(--paper-2);
  border: 1px solid var(--edge); cursor: pointer; font-size: .88rem;
  font-weight: 600; color: var(--dim); min-height: 44px;
  display: inline-flex; align-items: center;
}
.tab.active { background: var(--brand); color: #fff; border-color: var(--brand); }
@media (max-width: 779px) { .tabs.has-tabbar { display: none; } }

/* segmented control (Tribe / Draig Goch) */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--paper-2); border-radius: 12px; padding: 4px; gap: 4px; margin-bottom: 1rem; }
.seg button {
  font: inherit; font-size: .85rem; font-weight: 700; border: 0; background: transparent;
  color: var(--dim); padding: .55rem; border-radius: 9px; min-height: 44px; cursor: pointer;
}
.seg button.active { background: var(--surface); color: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,.1); }

/* =====================================================================
   BOTTOM TAB BAR
   ===================================================================== */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  background: color-mix(in srgb, var(--paper) 96%, transparent);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--edge);
  padding: .3rem .2rem calc(.3rem + var(--safe-b));
}
.tabbar a, .tabbar button {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .18rem; padding: .35rem .1rem; font-size: .62rem; font-weight: 700;
  color: var(--dim); min-height: 52px; background: none; border: 0;
  cursor: pointer; font-family: inherit; text-align: center;
}
.tabbar a.active, .tabbar button.active { color: var(--brand); }
.tabbar svg { width: 22px; height: 22px; stroke: currentColor; stroke-width: 1.9; fill: none; stroke-linecap: round; stroke-linejoin: round; }
/* page needs room so the bar never covers the last control */
body.has-tabbar { padding-bottom: calc(var(--tabbar-h) + var(--safe-b)); }
@media (min-width: 780px) {
  .tabbar { display: none; }
  body.has-tabbar { padding-bottom: 0; }
}

/* sticky single call to action (boxing landing) */
.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 65;
  padding: .7rem 1rem calc(.7rem + var(--safe-b));
  background: linear-gradient(180deg, transparent, var(--paper) 34%);
}
.sticky-cta .btn { width: 100%; }
@media (min-width: 780px) { .sticky-cta { position: static; background: none; padding: 0; } .sticky-cta .btn { width: auto; } }

/* =====================================================================
   HORIZONTAL SNAP SCROLLER (boxer cards)
   ===================================================================== */
.hscroll {
  display: flex; gap: .7rem; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: .2rem 1rem .5rem; margin: 0 -1rem; -webkit-overflow-scrolling: touch;
}
.hscroll::-webkit-scrollbar { height: 0; }
.bcard {
  flex: 0 0 138px; scroll-snap-align: start;
  background: var(--surface); border: 1px solid var(--edge);
  border-radius: 12px; overflow: hidden;
}
.bcard img, .bcard .ph { width: 100%; height: 104px; object-fit: cover; }
.bcard .ph { background: linear-gradient(150deg, var(--edge), var(--paper-2)); display: grid; place-items: center; color: var(--dim); font-size: .64rem; font-weight: 700; letter-spacing: .08em; }
.bcard .nm { padding: .55rem .6rem; }
.bcard .nm b { font-size: .8rem; display: block; }
.bcard .nm i { font-style: normal; font-size: .7rem; color: var(--dim); }

/* =====================================================================
   MISC
   ===================================================================== */
.footer {
  background: var(--charcoal); color: var(--sand);
  padding: 2rem 1rem; margin-top: 2.5rem; text-align: center; font-size: .9rem;
}
body.has-tabbar .footer { margin-bottom: calc(var(--tabbar-h) + var(--safe-b)); }
.footer a { color: var(--sage-light); }
body.theme-boxing .footer { background: #08090b; color: var(--dim); }

.msg { min-height: 1.3rem; font-size: .9rem; margin-top: .5rem; }
.msg.ok { color: var(--ok); } .msg.err { color: var(--warn); }
.muted { color: var(--dim); font-size: .9rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
hr { border: none; border-top: 1px solid var(--edge); margin: 1rem 0; }

/* toasts / modals kept from the original portal, sized for thumbs */
#toasts { position: fixed; bottom: calc(var(--tabbar-h) + var(--safe-b) + .8rem); left: 50%; transform: translateX(-50%); z-index: 1000; display: flex; flex-direction: column; gap: .5rem; width: min(92vw, 420px); }
.toast { background: var(--brand-dark); color: #fff; padding: .85rem 1.1rem; border-radius: 12px; font-size: .93rem; box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: .6rem; animation: toastin .25s ease; }
.toast.err { background: #8a3b3b; }
.toast .x { margin-left: auto; cursor: pointer; opacity: .8; font-weight: 700; padding: 0 .3rem; }
@keyframes toastin { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.modal { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 1001; display: none; align-items: flex-end; justify-content: center; padding: 0; }
.modal.open { display: flex; }
.modal .box { background: var(--surface); border-radius: 18px 18px 0 0; padding: 1.3rem 1.2rem calc(1.3rem + var(--safe-b)); width: 100%; max-height: 92vh; overflow-y: auto; box-shadow: var(--shadow-lg); }
@media (min-width: 700px) {
  .modal { align-items: center; padding: 1rem; }
  .modal .box { border-radius: 16px; width: min(94vw, 440px); }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* =====================================================================
   BOXING ADDITIONS — rules /boxing/ (Draig Goch) needed and the original
   sheet did not have. Token-based, so Tribe inherits the fixes too.
   ===================================================================== */

/* deliberate empty state: several boxing tables are empty on live
   (events, news, gallery, sponsors, fights) and a blank gap reads as a bug */
.empty {
  text-align: center; padding: 1.4rem 1rem; color: var(--dim);
  font-size: .9rem; border: 1px dashed var(--edge);
  border-radius: 12px; background: var(--paper-2);
}

/* round portrait for coach cards */
.portrait {
  width: 64px; height: 64px; border-radius: 99px; object-fit: cover;
  flex: 0 0 auto; background: var(--paper-2); border: 1px solid var(--edge);
}

/* parent goal check-in: preview of the photo/video just taken on the phone */
.evidence {
  margin-top: .7rem; border: 1px solid var(--edge); border-radius: 12px;
  overflow: hidden; background: var(--paper-2);
}
.evidence img, .evidence video { width: 100%; max-height: 240px; object-fit: cover; display: block; }

/* the big number reads as near-black on the dark theme without this */
body.theme-boxing .kcal-num { color: var(--brand-light); }

/* on the dark theme a neutral chip sat on --paper-2 over a --surface card of
   the same colour, so it vanished. .ok / .warn keep their own colours. */
body.theme-boxing .chip, body.theme-boxing .pill { background: #272b33; color: #c3c8d1; }

/* in the slide-down sheet the CTA was sized to its text, so "justify-content:
   center" above had nothing to centre inside. Full-width bar, as intended. */
@media (max-width: 779px) {
  .nav-links .nav-cta { display: flex; width: 100%; }
}

/* file pickers: the UA button is light grey and unreadable on the dark theme */
input[type="file"] { padding: .5rem .55rem; }
input[type="file"]::file-selector-button {
  font: inherit; font-weight: 600; font-size: .87rem;
  margin-right: .75rem; padding: .55rem 1rem; min-height: 40px;
  background: var(--paper-2); color: var(--text);
  border: 1px solid var(--edge); border-radius: 99px; cursor: pointer;
}
