/* ATA Tracker — styles. Mobile first, no framework. */
:root{
  --ink:#17242b; --ink-2:#4d6570; --line:#dbe6ec; --line-2:#eef4f7;
  --bg:#f4f8fa; --card:#ffffff;
  --brand:#156082; --brand-d:#0f4760; --brand-l:#e3f0f6;
  /* Both are set from JavaScript, derived from whichever scheme is chosen,
     so these are only what the very first paint uses before that has run --
     the default scheme's values, written out. */
  --field:#ffffff; --fieldbg:rgba(21,96,130,.05); --head-bg:rgba(21,96,130,.085);
  --accent:#b7791f; --good:#1f7a4d; --warn:#b45309; --bad:#b3261e;
  --radius:14px; --shadow:0 1px 2px rgba(20,50,65,.06),0 6px 20px rgba(20,50,65,.06);
  --safe-b:env(safe-area-inset-bottom,0px);
  /* Turned sideways, a phone puts its navigation bar and its camera cutout
     down the sides, and content runs underneath both. Only the bottom was
     ever accounted for, because upright is the only way it had been
     looked at. */
  --safe-l:env(safe-area-inset-left,0px);
  --safe-r:env(safe-area-inset-right,0px);
}
*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  font:15px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;
  color:var(--ink); background:var(--bg);
  -webkit-text-size-adjust:100%; overscroll-behavior-y:contain;
}
h1,h2,h3{margin:0 0 .4em; line-height:1.25}
h1{font-size:1.55rem} h2{font-size:1.15rem} h3{font-size:1rem}
p{margin:0 0 .7em}
a{color:var(--brand); text-decoration:none}

/* ---------------------------------------------------------------- app bar */
.appbar{
  position:sticky; top:0; z-index:30; display:flex; align-items:center; gap:18px;
  padding:10px 16px; background:var(--brand); color:#fff;
  padding-top:calc(10px + env(safe-area-inset-top,0px));
  padding-left:calc(16px + var(--safe-l));
  padding-right:calc(16px + var(--safe-r));
}
.appbar-home{display:flex; align-items:center; gap:9px; color:#fff}
/* The mark used to be sized by the three letters inside it. Holding an image
   instead, it needs a size of its own, or the SVG renders at its natural
   dimensions and pushes the whole banner out of shape. */
.appbar-mark{
  flex:none; width:30px; height:30px; display:inline-flex;
  align-items:center; justify-content:center;
  font-weight:800; letter-spacing:.08em; background:rgba(255,255,255,.16);
  border-radius:7px; font-size:.72rem; overflow:hidden;
}
.appbar-logo{width:30px; height:30px; display:block; border-radius:inherit;
  object-fit:contain}
.appbar-title{font-weight:600}

/* ---- the wordmark in the banner ----------------------------------------
   "Mat" in white, because the banner is dark and near-black would vanish
   against it. "Record" in the belt's yellow, so the name and the logo
   beside it are saying the same thing.
   ----------------------------------------------------------------------- */
.appbar-brand{display:flex; flex-direction:column; justify-content:center;
  min-width:0; line-height:1.1}
.appbar-title{font-weight:800; font-size:1.06rem; letter-spacing:-.2px;
  white-space:nowrap}
.brand-a{color:#ffffff}
.brand-b{color:#e8b757}
.appbar-tag{font-size:.66rem; color:rgba(255,255,255,.62);
  letter-spacing:.2px; white-space:nowrap; margin-top:1px}

/* On a narrow phone the tagline is the first thing to go. */
@media(max-width:520px){
  .appbar-title{font-size:.98rem}
  .appbar-tag{display:none}
}
@media print{ .appbar-tag{display:none} }
.appbar-nav{display:none; gap:4px; margin-left:auto; flex-wrap:wrap}
/* Settings from anywhere on a phone. On a wide screen the menu beside it
   already ends in Settings, so the gear stands down. */
.appbar-gear{margin-left:auto; flex:none; display:inline-flex;
  align-items:center; justify-content:center; width:42px; height:42px;
  margin-right:-8px; border-radius:11px; color:#fff}
.appbar-gear:hover{background:rgba(255,255,255,.12)}
.appbar-gear.active{background:rgba(255,255,255,.2)}
@media(min-width:820px){ .appbar-gear{display:none} }
.appbar-nav a{
  color:#dbeaf1; padding:6px 10px; border-radius:8px; font-size:.9rem; white-space:nowrap;
}
.appbar-nav a:hover{background:rgba(255,255,255,.12); color:#fff}
.appbar-nav a.active{background:#fff; color:var(--brand); font-weight:600}
@media(min-width:820px){ .appbar-nav{display:flex} }

/* A phone held sideways is wide enough for the full navigation but has no
   height to spare, and twelve links wrapping to three rows took most of the
   screen before the page began. One row that scrolls sideways instead: the
   first few are there, the rest are a swipe away, and the page keeps its
   height. */
@media (min-width:820px) and (max-height:560px){
  .appbar{padding-top:4px; padding-bottom:4px}
  .appbar-nav{flex-wrap:nowrap; overflow-x:auto; overflow-y:hidden;
    -webkit-overflow-scrolling:touch; scrollbar-width:none;
    max-width:100%; margin-left:12px;
    -webkit-mask-image:linear-gradient(to right, transparent 0,
      #000 10px, #000 calc(100% - 18px), transparent 100%);
    mask-image:linear-gradient(to right, transparent 0,
      #000 10px, #000 calc(100% - 18px), transparent 100%)}
  .appbar-nav::-webkit-scrollbar{display:none}
  .appbar-nav a{flex:0 0 auto; white-space:nowrap; padding:5px 9px;
    font-size:.82rem}
  .appbar-tag{display:none}
}

/* ------------------------------------------------------------------ layout */
.view{
  max-width:1120px; margin:0 auto;
  padding:16px calc(14px + var(--safe-r)) calc(96px + var(--safe-b))
    calc(14px + var(--safe-l));
}
@media(min-width:820px){ .view{padding-bottom:40px} }

/* Landscape on a phone: the tab bar and generous padding eat the little
   vertical room there is, so reclaim it and let tables breathe. */
@media (orientation:landscape) and (max-height:500px){
  .appbar{padding-top:calc(6px + env(safe-area-inset-top,0px)); padding-bottom:6px}
  .appbar-mark{width:26px; height:26px}
  .appbar-logo{width:26px; height:26px}
  .view{padding:10px calc(14px + var(--safe-r)) calc(58px + var(--safe-b))
    calc(14px + var(--safe-l))}
  .hero{padding:12px 16px}
  .hero .statrow{margin-top:10px}
  .card{padding:12px; margin-bottom:10px}
  h1{font-size:1.3rem}
  .tabbar a{padding:6px 2px}
  .fab{width:46px; height:46px; font-size:1.5rem;
    right:calc(16px + var(--safe-r));
    bottom:calc(56px + var(--safe-b))}
  .modal{max-height:96vh}

  /* Eleven tiles wrapped to three rows and took most of a landscape
     screen before the banner had finished. One row that scrolls sideways
     keeps the shape of the page: the first few are visible, the rest are
     a swipe away, and nothing below is pushed off. */
  .tiles{display:flex; grid-template-columns:none; gap:8px;
    overflow-x:auto; -webkit-overflow-scrolling:touch;
    scroll-snap-type:x proximity; padding-bottom:4px;
    margin:0 calc(-1 * (14px + var(--safe-r))) 0 calc(-1 * (14px + var(--safe-l)));
    padding-left:calc(14px + var(--safe-l));
    padding-right:calc(14px + var(--safe-r))}
  /* The binding constraint on a phone, and the one a heading actually has
     to fit inside: the tile is a fixed 9.5rem here, not a grid column. The
     side padding pays for the bigger mark the same way it does on a wide
     screen -- 12 down to 10, against a mark grown by 6 and a gap trimmed
     by 2 -- so the title is left with exactly the room it had. */
  .tiles .tile{flex:0 0 auto; width:9.5rem; padding:11px 10px;
    scroll-snap-align:start}
  .tiles .tile-title{font-size:.9rem}
  .tiles .tile-sub{font-size:.72rem}
}

/* The page's own header, on the same wash as every card header below it,
   so the page starts where it looks like it starts. It reaches the edges
   of the view rather than the edges of the content column -- a tinted
   strip with page background showing down both sides reads as a widget
   somebody dropped on the page. */
.pagehead{
  display:flex; gap:10px; align-items:flex-start; justify-content:space-between;
  flex-wrap:wrap; margin-bottom:12px;
  background:var(--head-bg);
  margin-left:calc(-1 * (14px + var(--safe-l)));
  margin-right:calc(-1 * (14px + var(--safe-r)));
  padding:10px calc(14px + var(--safe-r)) 10px calc(14px + var(--safe-l));
  border-bottom:1px solid var(--line);
}
/* The title claims whatever the row has left.

   Without this, space-between hands the slack to the gaps instead, and a
   header with a back arrow in front of the title reads as the arrow at one
   edge and the words at the other, ragged by the length of the title. With
   it there is no slack to hand out: the title sits against the arrow, the
   buttons sit against the far edge, and every page's title starts in the
   same place. min-width:0 is what lets a long tournament name end in an
   ellipsis rather than push the row wider than the screen. */
.pagetitle{flex:1 1 auto; min-width:0}
.pagehead-actions{display:flex; gap:6px; flex-wrap:wrap; align-items:center}

/* The header that stays.

   Whose page this is should not scroll away. The name pins itself directly
   under the banner -- measured, because the banner's height changes with the
   breakpoint and with the notch -- and once it has pinned it condenses: the
   buttons and the subtitle go, the name shrinks to one line, and a rule is
   drawn under it so the page reads as passing beneath.

   The negative margins carry the opaque strip out to the edges of the view,
   which is otherwise padded; without them the page would show through down
   both sides of a pinned header. --appbar-h has a default here so that a
   first paint, before anything has been measured, still puts the header in
   roughly the right place rather than over the banner. */
.pagehead.pins{
  position:sticky; top:var(--appbar-h,56px); z-index:28;
  /* The wash over an opaque base rather than instead of it. --head-bg
     carries alpha in light mode, and a pinned header that content scrolls
     underneath has to be something you cannot see through. */
  background-color:var(--bg);
  background-image:linear-gradient(var(--head-bg), var(--head-bg));
  margin-left:calc(-1 * (14px + var(--safe-l)));
  margin-right:calc(-1 * (14px + var(--safe-r)));
  padding:8px calc(14px + var(--safe-r)) 8px calc(14px + var(--safe-l));
}
.pagehead-mark{height:1px; margin:0; padding:0}
.pagehead.is-stuck{
  padding-top:8px; padding-bottom:8px; margin-bottom:10px;
  border-bottom:1px solid var(--line);
  box-shadow:0 6px 10px -10px rgba(20,50,65,.5);
}
.pagehead.is-stuck .pagehead-actions{display:none}
.pagehead.is-stuck .pagetitle p{display:none}
/* The title's flex:1 1 auto and min-width:0 are on .pagetitle above, for
   every state rather than this one: a flex child will not shrink below its
   own content unless it is told it may, and a long tournament name has to
   end in an ellipsis rather than push the header on to a second line. */
.pagehead.is-stuck h1{
  font-size:1.08rem; margin:0; white-space:nowrap;
  overflow:hidden; text-overflow:ellipsis;
}
@media(max-width:640px){
  .pagehead.is-stuck h1{font-size:1rem}
}
/* Folding, on the way between the two shapes. The script sets the height
   and the space beneath it as the page scrolls (see pinHeader), so there is
   no transition here: the scroll is the animation. What is folding away
   fades as it goes, and the name shrinks toward its pinned size by scale,
   which moves nothing around it. */
.pagehead.is-rolling{overflow:hidden}
.pagehead.is-rolling h1{
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
  transform:scale(var(--title-scale,1)); transform-origin:left center;
}
.pagehead.is-stuck h1{transform:none}
.pagehead.is-rolling .pagehead-actions,
.pagehead.is-rolling .pagetitle p,
.pagehead.is-rolling .tournav{opacity:calc(1 - var(--roll,0) * 1.6)}
/* On a phone the header buttons are secondary to the page itself, so they
   shrink to fit one line rather than stacking above the content. */
@media(max-width:640px){
  .pagehead{gap:8px; margin-bottom:10px}
  .pagehead h1{font-size:1.25rem}
  .pagehead-actions{gap:5px; width:100%}
  .pagehead-actions .btn{padding:6px 10px; font-size:.82rem; gap:5px}
  .pagehead-actions .btn .uicon svg{width:15px; height:15px}
}

/* One action per page should look like the action. The rest are ways of
   getting somewhere else and are drawn quieter -- which is what tells
   somebody at a glance where the page wants them to go, without spending a
   drop shadow on every button in the app. */
.pagehead-actions .btn.ghost{
  padding:7px 12px; font-size:.86rem; min-height:36px; font-weight:500;
  color:var(--ink-2); border-color:var(--line);
}
.pagehead-actions .btn.ghost .uicon svg{width:16px; height:16px}
.pagehead-actions .btn.ghost:hover{color:var(--brand); border-color:var(--brand)}
@media(max-width:640px){
  .pagehead-actions .btn.ghost{padding:5px 9px; font-size:.78rem; min-height:32px}
}

/* The overflow sheet holds the header's own buttons, so each gets a row of
   its own and fills it. Sized and tinted to match the boxed menus: these
   are the same kind of thing reached a different way, and a page that put
   two of its buttons behind More should not make them look like a
   different class of button for it. */
.sheetmenu-nodes{gap:7px}
.sheetrow{display:flex}
.sheetrow > .btn{
  width:100%; justify-content:flex-start; min-height:58px;
  font-size:1rem; padding:12px 13px; border-radius:11px; gap:14px;
}
.sheetmenu-nodes .btn.ghost{background:var(--fieldbg); color:var(--ink)}
.sheetmenu-nodes .btn .uicon{color:var(--brand); flex:none}
.sheetmenu-nodes .btn .uicon svg{width:40px; height:40px}

.card{
  background:var(--card); border:1px solid var(--line); border-radius:var(--radius);
  padding:16px; margin-bottom:14px; box-shadow:var(--shadow);
}
/* ---- the band a card starts with ---------------------------------------
   The title used to be three small grey words floating on white, which
   made every card start in the same place as the one above it: nowhere.
   Given the scheme's own color at low strength it becomes a lid, and a
   page of cards reads as a page of things rather than one long column.

   The negative margins take it out to the card's own edges -- the card
   pads itself by 16px, so without them the band would sit inset with a
   white frame around it, which looks like a mistake rather than a header.
   ----------------------------------------------------------------------- */
.card-toggle{display:flex; align-items:center; justify-content:space-between;
  gap:10px; text-align:left; border:0; cursor:pointer;
  font:inherit; color:inherit;
  background:var(--head-bg);
  /* The card's content box plus the 16px it is padded by on each side.
     width:100% measures the content box, so with the negative margins
     pulling the band outwards it came out 32px short and the caret sat on
     white past the end of it. width:auto does not help either: a <button>
     shrinks to its contents whatever display it is given. */
  width:calc(100% + 32px);
  margin:-16px -16px 14px; padding:11px 14px;
  border-bottom:1px solid var(--line);
  border-radius:calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0 0;
}
.card-toggle .card-title{margin-bottom:0; flex:1; text-align:left}
.card-toggle .pill{flex:none; margin-right:2px}
/* A card with no padding of its own has nothing to pull the band out of. */
section.card.loccard > .card-toggle{width:100%; margin:0 0 12px; border-radius:0}
.card-caret{color:var(--ink-2); font-size:.8rem; flex:none}
.card-body.is-folded{display:none}
/* Folded, the band is the whole card: no white strip under it where the
   body's spacing used to be. */
.card-toggle[aria-expanded="false"]{margin-bottom:-16px; border-bottom:0;
  border-radius:calc(var(--radius) - 1px)}
.collapsebar{display:flex; gap:8px; justify-content:flex-end; margin-bottom:10px;
  flex-wrap:wrap}
.card-title{
  font-size:.78rem; text-transform:uppercase; letter-spacing:.09em;
  color:var(--ink-2); margin-bottom:12px; font-weight:700;
}

/* -------------------------------------------------------------------- hero */
.hero{
  background:linear-gradient(160deg,var(--brand),var(--brand-d));
  color:#fff; border-radius:var(--radius); padding:20px 18px; margin-bottom:14px;
}
/* The organization mark moved to the foot of this card, which leaves the
   school's own logo its full size and a long name room to breathe before
   anything has to shrink. */
.hero-logos{display:flex; align-items:stretch; gap:clamp(10px,3vw,14px);
  flex-wrap:nowrap; min-width:0}
.hero-logos > div{display:flex; flex-direction:column; justify-content:center}
.hero-logos > div{flex:1 1 auto; min-width:0}
/* Sized to stand as tall as the lines beside it. A logo smaller than the
   text it sits with reads as an afterthought, and a school's own mark is
   not that. */
.hero-logo{flex:0 0 auto; align-self:stretch;
  width:clamp(58px,17vw,82px); min-height:clamp(58px,17vw,82px);
  object-fit:contain; background:#fff; border-radius:12px; padding:7px}
.hero-logo.placeholder{
  display:flex; align-items:center; justify-content:center; color:var(--brand);
  font-size:.65rem; font-weight:700; letter-spacing:.08em; background:rgba(255,255,255,.85);
}
.hero-title{margin:0; font-size:clamp(1.08rem,5vw,1.4rem);
  line-height:1.2; overflow-wrap:anywhere}
.hero-sub{margin:2px 0 0; opacity:.85; font-size:clamp(.76rem,2.6vw,.9rem);
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.hero .statrow{margin-top:14px}
.seasonbar{display:flex; align-items:center; gap:8px; margin-top:16px;
  background:rgba(255,255,255,.14); border-radius:999px; padding:5px 6px}
.seasonbar-mid{flex:1; display:flex; align-items:center; justify-content:center;
  gap:8px; flex-wrap:wrap; min-width:0}
.seasonbar-label{font-size:.68rem; font-weight:800; letter-spacing:.09em;
  text-transform:uppercase; opacity:.85}
.seasonbar select{background:rgba(255,255,255,.92); border:0; border-radius:999px;
  padding:6px 12px; font:inherit; font-size:16px; font-weight:700;
  color:var(--brand-d); min-height:34px; max-width:210px}
.seasonbar .quickedit{color:#fff; background:rgba(255,255,255,.18)}
.seasonbar .quickedit:hover{background:rgba(255,255,255,.3)}
.seasonstep{width:34px; height:34px; border-radius:50%; border:0; cursor:pointer;
  background:rgba(255,255,255,.2); color:#fff; font-size:1.2rem; line-height:1;
  flex:none}
.seasonstep:disabled{opacity:.3; cursor:default}
.hero-note{margin:10px 0 0; font-size:.78rem; opacity:.85}
.hero-actions{margin-top:14px}
.hero-actions .btn.ghost{background:rgba(255,255,255,.16); border-color:rgba(255,255,255,.3);
  color:#fff}
.hero-actions .btn.ghost:hover{background:rgba(255,255,255,.26)}
.hero .stat{background:rgba(255,255,255,.14); border-color:transparent; color:#fff}
.hero .stat-label,.hero .stat-sub{color:rgba(255,255,255,.8)}

.statrow{display:flex; gap:10px; flex-wrap:wrap}
.stat{
  flex:1 1 130px; background:var(--brand-l); border:1px solid var(--line);
  border-radius:12px; padding:12px 14px;
}
/* The mark reads as part of the label rather than a decoration above the
   figure: "[icon] Competitors" then the number, which is the order the eye
   wants and leaves the number the biggest thing in the box. */
.stat-head{display:flex; align-items:center; gap:6px; margin-bottom:3px;
  color:var(--ink-2)}
/* The mark takes the label's color rather than the brand's. On the tinted
   stat boxes the brand blue sits too close to the background to be read;
   following the text means it works on any background the box takes. */
.stat-head .uicon{color:inherit; opacity:.85; flex:none}
/* On the hero these boxes sit on the brand color with white text, so the
   head and its mark follow that rather than the page's ink. This has to come
   after the rule above, or the darker default wins and the mark disappears
   into the background. */
.hero .stat-head{color:rgba(255,255,255,.85)}
.stat-value{font-size:1.5rem; font-weight:700; line-height:1.1}
.stat-label{font-size:.72rem; text-transform:uppercase; letter-spacing:.07em;
  color:var(--ink-2)}
.stat-sub{font-size:.75rem; color:var(--ink-2); margin-top:2px}
.statmini{padding:4px 10px; text-align:center}
.statlink{display:block; flex:1 1 130px; color:inherit; text-decoration:none;
  border-radius:12px}
.statlink .stat{height:100%; transition:transform .12s ease, box-shadow .12s ease}
.statlink:hover .stat{box-shadow:0 3px 12px rgba(20,50,65,.16)}
.statlink:active .stat{transform:scale(.985)}
.icon{display:inline-flex; align-items:center; vertical-align:-3px}
.bmatch{border:1px solid var(--line); border-radius:12px; padding:11px;
  margin-bottom:10px; background:var(--card)}
.bmatch-head{display:flex; align-items:center; justify-content:space-between;
  gap:9px; flex-wrap:wrap; margin-bottom:9px}
.bcorners{display:grid; grid-template-columns:1fr 1fr; gap:9px}
/* A corner holding a whole team, on a phone.
   -------------------------------------------------------------------------
   Two of these and a verdict have to fit on one portrait screen while a
   ring is running, which is about 660 points once the app's own bars are
   taken off. So everything inside is set a size down from a single bout's
   corner -- the same size the roster buttons already use -- and the rows
   are packed tighter. A competitor's name stays the largest thing in the
   row, because that is what somebody is aiming a thumb at. */
.corner.teamcorner{padding:7px 9px}
.corner.teamcorner .corner-head{gap:6px}
/* One line, cut short rather than wrapped. A long club name wrapping to a
   second line costs a row in each corner, and it does so exactly on the
   narrow phones that have the least room to give. */
.corner.teamcorner .corner-name{font-size:.86rem; white-space:nowrap;
  overflow:hidden; text-overflow:ellipsis; overflow-wrap:normal}
.corner.teamcorner .corner-tag{font-size:.62rem; padding:2px 7px}
.teamtotalrow{display:flex; align-items:baseline; justify-content:center;
  gap:6px}
.corner.teamcorner .teamtotal{font-size:1.7rem; line-height:1.1}
.corner.teamcorner .totallabel{font-size:.62rem}
.corner.teamcorner .teamlist{margin-top:5px}
.corner.teamcorner .teamrow{padding:2px 6px; gap:6px; font-size:.82rem;
  margin-bottom:1px}
.corner.teamcorner .teamname{font-size:.86rem}
.corner.teamcorner .teamscore{font-size:1rem}
.corner.teamcorner .tieplace{min-width:18px; height:18px; font-size:.66rem}
.corner.teamcorner .miniicon{padding:2px 5px; font-size:.7rem}
/* The row's height is whatever the tallest thing in it is, and that is
   this button -- so shortening it is what shortens the row, and three rows
   a corner is where the screen is won or lost. */
.corner.teamcorner .btn.small{padding:2px 7px; font-size:.72rem;
  min-height:22px}
.corner.teamcorner .btn.small .uicon svg{width:12px; height:12px}
.corner.teamcorner .tallybtns{margin-top:7px}
.corner.teamcorner .rosterrow{margin-top:6px}

/* Two corners side by side need room a phone does not have: a team match
   carries a whole roster in each. Below this width they stack, which is
   longer but never cut off. */
@media(max-width:640px){
  .bcorners{grid-template-columns:1fr; gap:12px}
  .bcorner{min-width:0}
  .bcorner-name{overflow-wrap:anywhere}
}
.bcorner{border:2px solid var(--line); border-radius:10px; padding:9px;
  text-align:center}
.bcorner.white{border-color:#c9ced2}
.bcorner.red{border-color:#e0a6a2}
.bcorner.win{box-shadow:0 0 0 2px var(--good) inset}
.bcorner-name{font-weight:700; font-size:.9rem; margin:4px 0}
.bcorner-score{font-size:2rem; font-weight:800; line-height:1.1}
.byeflag{font-size:1.05rem; font-weight:800; color:var(--ink-2); padding:8px 0}
.bcorner .tallybtns{margin-top:6px}
.bcorner .tallybtn{width:48px; height:40px; font-size:1rem}
html[data-theme=dark] .bcorner.white{border-color:#3a4a53}
html[data-theme=dark] .bcorner.red{border-color:#5b3a3d}
.sheetbar{display:flex; align-items:center; justify-content:space-between;
  gap:10px; flex-wrap:wrap; padding-bottom:9px; margin-bottom:9px;
  border-bottom:1px solid var(--line-2)}
.weaponbtn{display:inline-flex; align-items:center; gap:5px; background:var(--field);
  border:1px solid var(--line); border-radius:8px; padding:5px 9px; cursor:pointer;
  font:inherit; font-size:.82rem; color:var(--ink)}
.weaponbtn:hover{border-color:var(--brand)}
.judgebox{border:1px solid var(--line); border-radius:10px; padding:11px 13px;
  margin-bottom:9px; background:var(--card)}
.judgebox-head{display:flex; align-items:center; justify-content:space-between;
  gap:8px; margin-bottom:7px}
.weaponpreview{background:var(--brand-l); border:1px solid var(--line);
  border-radius:10px; padding:10px 12px; display:flex; flex-direction:column; gap:4px}
.tabbar a{display:flex; flex-direction:column; align-items:center; gap:3px}
.tabbar a svg{display:block; opacity:.75}
.tabbar a.on svg{opacity:1}
/* ---- Score a ring: two pages of tiles ------------------------------------- */
.sstart{display:flex; flex-direction:column; gap:12px}
.sstart-steps{display:flex; align-items:center; gap:6px; justify-content:flex-end}
.sstart-dot{width:6px; height:6px; border-radius:3px; background:var(--line)}
.sstart-dot.is-on{width:22px; background:var(--brand)}
.sstart-dot.is-done{background:var(--brand)}
.sstart-tour{display:flex; align-items:center; justify-content:space-between;
  gap:10px; background:var(--line-2); border-radius:12px; padding:8px 8px 8px 12px}
.sstart-tourtext{display:flex; flex-direction:column; gap:1px; min-width:0}
.sstart-q{margin:4px 0 0; font-size:1.2rem; font-weight:800; text-wrap:balance}
.sshead{margin:4px 0 -4px; font-size:.72rem; font-weight:800;
  letter-spacing:.08em; text-transform:uppercase; color:var(--ink-2)}
.evtiles{display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:8px}
.evtile{--evfront:var(--card); display:flex; align-items:center; gap:9px;
  min-height:48px; border:1px solid var(--line); border-radius:12px;
  background:var(--card); color:var(--ink); padding:9px 10px; font:inherit;
  text-align:left; cursor:pointer}
.evtile .uicon{color:var(--brand); flex:none}
.evtile-name{font-size:.88rem; font-weight:700; line-height:1.2; min-width:0}
.evtile.is-big{min-height:64px; border-radius:14px; padding:12px; gap:10px}
.evtile.is-big .evtile-name{font-size:1.05rem; font-weight:800}
.evtile.is-on{--evfront:var(--brand-l); background:var(--brand-l);
  border-color:var(--brand)}
.evtile:hover,.divtile:hover,.sstile:hover,.ssrow:hover{border-color:var(--brand)}
.sstart-chips{display:flex; flex-wrap:wrap; gap:8px}
.sstart-chip{--evfront:var(--line-2); display:inline-flex; align-items:center;
  gap:5px; border:0; border-radius:999px; background:var(--line-2);
  color:var(--ink-2); font:inherit; font-size:.82rem; font-weight:700;
  padding:5px 11px; cursor:pointer; max-width:100%}
.sstart-chip.is-event{--evfront:var(--brand-l); background:var(--brand-l);
  color:var(--brand-d)}
.sstart-chip .uicon{color:var(--brand-d)}
.divtile{display:flex; flex-direction:column; align-items:flex-start; gap:3px;
  width:100%; border:1px solid var(--line); border-radius:12px;
  background:var(--card); color:var(--ink); padding:11px 13px; font:inherit;
  text-align:left; cursor:pointer}
.divtile.is-person{flex-direction:row; align-items:baseline; gap:8px}
.divtile-text{display:flex; flex-direction:column; gap:1px; min-width:0}
.divtile.is-row{flex-direction:row; justify-content:space-between;
  align-items:baseline}
.ssrow-star{color:var(--accent); width:12px; flex:none}
.divchosen{display:flex; align-items:center; justify-content:space-between;
  gap:10px; border:2px solid var(--brand); border-radius:14px;
  background:var(--brand-l); padding:10px 8px 10px 13px}
.divchosen-text{display:flex; flex-direction:column; gap:2px; min-width:0}
.divchosen-text strong{font-size:1.02rem}
/* Balanced, so a division name breaks between words, not inside 11-12. */
.divchosen-text strong,.divtile strong{text-wrap:balance}
.sspair{display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:8px}
.sspair .btn{justify-content:center}
.ssgrid{display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:8px}
.sstile{border:1px solid var(--line); border-radius:12px; background:var(--card);
  color:var(--ink); padding:11px 8px; font:inherit; font-weight:700;
  cursor:pointer}
.sstile.is-on{background:var(--brand-l); border:2px solid var(--brand);
  padding:10px 7px; color:var(--brand-d)}
.ssstep{display:flex; align-items:center; justify-content:center; gap:16px}
.ssstep-btn{width:52px; height:52px; border:1px solid var(--line);
  border-radius:16px; background:var(--line-2); color:var(--brand);
  font:inherit; font-size:1.6rem; font-weight:700; cursor:pointer}
.input.ssstep-box{width:88px; height:58px; text-align:center; font-size:2rem;
  font-weight:800; font-variant-numeric:tabular-nums; padding:0}
.ssopt.is-inline .ssstep{gap:10px}
.ssopt.is-inline .ssstep-btn{width:40px; height:40px; font-size:1.25rem;
  border-radius:12px}
.ssopt.is-inline .input.ssstep-box{width:56px; height:42px; font-size:1.3rem}
.sscount-hint{text-align:center; margin:0}
.linkrow.is-center{justify-content:center}
.ssoptions{display:flex; align-items:center; gap:10px; width:100%;
  border:0; border-top:1px solid var(--line-2); background:none;
  color:var(--ink); padding:12px 2px 2px; font:inherit; text-align:left;
  cursor:pointer}
.ssoptions .uicon{color:var(--brand); flex:none}
.ssoptions-text{display:flex; flex-direction:column; gap:1px; flex:1; min-width:0}
.sstart-foot{display:flex; gap:10px; width:100%}
.sstart-foot .btn:last-child:not(:first-child){flex:1; justify-content:center}
.ssopts{display:flex; flex-direction:column; gap:14px}
.ssopt{display:flex; flex-direction:column; gap:8px}
.ssopt.is-inline{flex-direction:row; align-items:center;
  justify-content:space-between; gap:10px}
.ssopt-label{display:flex; flex-direction:column; gap:1px}
.sschips{display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:7px}
.sschips.is-four{grid-template-columns:repeat(4, minmax(0, 1fr))}
.sschips.is-two{grid-template-columns:repeat(2, minmax(0, 1fr))}
.sschips.is-wrap{display:flex; flex-wrap:wrap}
.sschip{border:1px solid var(--line); border-radius:12px; background:var(--card);
  color:var(--ink); padding:9px 12px; font:inherit; font-size:.88rem;
  font-weight:700; cursor:pointer}
.sschips.is-wrap .sschip{border-radius:999px}
.sschip.is-on{background:var(--brand); border-color:var(--brand); color:#fff}
.sschip.is-more{border-style:dashed; color:var(--brand); font-weight:600}
.ssswitch{display:flex; align-items:center; justify-content:space-between;
  gap:10px; font-weight:700}
.ssswitch input{width:22px; height:22px; accent-color:var(--brand)}
.sspreview{background:var(--brand-d); color:#fff; border-radius:14px;
  padding:12px 14px; font-weight:800; font-size:1.05rem; min-height:24px}
.ssbuild{display:flex; flex-direction:column; gap:12px}
/* ---- tiles.js: the pieces the paged forms share ---- */
.tsec{display:flex; flex-direction:column; gap:7px}
.tsec-head{display:flex; align-items:baseline; justify-content:space-between;
  gap:8px}
.tsec-label{display:inline-flex; align-items:center; gap:6px;
  font-size:.72rem; font-weight:800; letter-spacing:.08em;
  text-transform:uppercase; color:var(--ink-2)}
.tsec-aside{font-size:.8rem; color:var(--ink-2); text-align:right}
.tsec-hint{margin:-2px 0 0; font-size:.82rem; color:var(--ink-2)}
.tsec .field-help{margin:0}
.sschips.is-small .sschip{padding:6px 11px; font-size:.82rem}
.ssrow.has-lead{align-items:center}
.ssrow.is-multi{align-items:center}
.ssrow.is-typed{border-style:dashed; color:var(--brand)}
.ttiles{display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:9px}
.ttiles.is-four{grid-template-columns:repeat(4, minmax(0, 1fr)); gap:6px}
.ttile{display:flex; flex-direction:column; align-items:flex-start; gap:8px;
  border:1px solid var(--line); border-radius:14px; background:var(--card);
  color:var(--ink); padding:13px 12px; font:inherit; text-align:left;
  cursor:pointer; min-width:0}
.ttile .uicon{color:var(--brand)}
.ttile.is-on{background:var(--brand-l); border:2px solid var(--brand);
  padding:12px 11px; color:var(--brand-d)}
.ttile:hover{border-color:var(--brand)}
.ttile-text{display:flex; flex-direction:column; gap:1px; min-width:0}
.ttile-label{font-size:1rem; font-weight:800; line-height:1.2}
.ttile-sub{font-size:.76rem; color:var(--ink-2)}
.ttile.is-on .ttile-sub{color:inherit}
.ttile.is-small{align-items:center; text-align:center; gap:1px;
  padding:7px 2px; border-radius:10px}
.ttile.is-small.is-on{padding:6px 1px}
.ttile.is-small .ttile-text{align-items:center}
.ttile.is-small .ttile-label{font-size:.82rem}
.ttile.is-small .ttile-sub{font-size:.68rem}
.belttiles{display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:8px}
.belttiles.is-four{grid-template-columns:repeat(4, minmax(0, 1fr)); gap:6px}
.beltextras{display:flex; gap:8px}
.beltextra{flex:1; border:1px dashed var(--line-2); border-radius:12px;
  background:var(--bg); padding:11px 10px; font:inherit; font-size:.88rem;
  font-weight:700; color:var(--ink-2); cursor:pointer}
.beltextra.is-on{border:2px solid var(--brand); background:var(--brand-l);
  color:var(--brand-d); padding:10px 9px}
.beltextra.is-make{flex:1.4; border:1px solid var(--brand); background:var(--card);
  color:var(--brand); font-weight:800}
.belttile{display:flex; flex-direction:column; align-items:stretch; gap:6px;
  border:1px solid var(--line); border-radius:12px; background:var(--card);
  color:var(--ink); padding:9px 8px; font:inherit; text-align:left;
  cursor:pointer; min-width:0}
.belttile.is-on{background:var(--brand-l); border:2px solid var(--brand);
  padding:8px 7px; color:var(--brand-d)}
.belttile:hover{border-color:var(--brand)}
.belttile-text{display:flex; flex-direction:column; min-width:0}
.belttile-label{font-size:.78rem; font-weight:800; line-height:1.2;
  overflow-wrap:break-word}
.belttile-sub{font-size:.7rem; color:var(--ink-2); line-height:1.2}
.belttile.is-on .belttile-sub{color:inherit}
.belt.beltswatch{display:flex; justify-content:flex-end; min-height:16px;
  width:100%; border-radius:4px; box-sizing:border-box}
.belt.beltswatch .belt-insignia{font-size:.6rem; padding:0 4px; margin:1px 3px}
.ssrow .belt.beltswatch{width:56px; flex:none}
.prow .belt.beltswatch{width:40px; flex:none}
.tlink{align-self:flex-start; border:0; background:none; padding:2px 0;
  font:inherit; font-size:.88rem; font-weight:700; color:var(--brand);
  text-decoration:underline; cursor:pointer}
.marktiles{display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:9px}
.marktile{display:flex; align-items:center; gap:10px; border:1px solid var(--line);
  border-radius:14px; background:var(--card); color:var(--ink);
  padding:11px 12px; font:inherit; text-align:left; cursor:pointer}
.marktile-text{display:flex; flex-direction:column; min-width:0}
.marktile-label{font-weight:800}
.marktile-sub{font-size:.74rem; color:var(--ink-2)}
.marktile.is-star.is-on{background:#fff8dc; border:2px solid #e8c34a;
  padding:10px 11px; color:#5c4400}
.marktile.is-pin.is-on{background:#fdeaea; border:2px solid #e59a9a;
  padding:10px 11px; color:#7a1a1a}
.marktile.is-on .marktile-sub{color:inherit}
.weapontiles{display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:6px}
.weapontile{display:flex; align-items:center; gap:8px; border:1px solid var(--line);
  border-radius:11px; background:var(--card); color:var(--ink);
  padding:6px 9px; font:inherit; font-size:.86rem; font-weight:700;
  text-align:left; cursor:pointer; min-width:0}
.weapontile .icon{flex:none}
.weapontile.is-on{background:var(--brand-l); border:2px solid var(--brand);
  padding:5px 8px; color:var(--brand-d)}
.weapontile.is-locked{border-style:dashed; color:var(--ink-2); background:var(--bg)}
.weapontile.is-locked .icon{opacity:.45}
.weapontile-text{display:flex; flex-direction:column; min-width:0}
.weapontile-sub{font-size:.7rem; font-weight:600}
.tmore{display:flex; align-items:center; gap:8px; width:100%;
  border:0; border-top:1px solid var(--line-2); background:none;
  padding:12px 0 2px; font:inherit; text-align:left; color:var(--ink);
  cursor:pointer}
.tmore-text{display:flex; flex-direction:column; gap:1px; flex:1; min-width:0}
.tmore-label{font-weight:700; color:var(--brand)}
.tmore-sub{font-size:.8rem; color:var(--ink-2)}
.ttoggle{display:flex; align-items:center; justify-content:space-between;
  gap:10px; font-weight:700; cursor:pointer}
.ttoggle input{width:22px; height:22px; accent-color:var(--brand); flex:none}
.ttiles.is-rows{grid-template-columns:1fr; gap:8px}
.ttiles.is-rows .ttile{flex-direction:row; align-items:center; gap:12px; padding:11px 12px}
.ttiles.is-rows .ttile.is-on{padding:10px 11px}
.ttiles.is-class .ttile{gap:2px; padding:10px 12px}
.ttiles.is-class .ttile.is-on{padding:9px 11px}
.ttiles.is-class .ttile-label{font-size:1.05rem}
.tsec.is-question > .tsec-head .tsec-label{font-size:1.2rem; letter-spacing:0;
  text-transform:none; color:var(--ink)}
.pfind{display:flex; flex-direction:column; gap:2px; margin-bottom:-2px}
.pseason{display:flex; align-items:center; justify-content:space-between; gap:10px;
  background:var(--bg); border-radius:12px; padding:9px 12px; font-size:.88rem}
.pseason-text{display:flex; flex-direction:column; gap:1px; min-width:0}
.pfilled{display:flex; flex-direction:column; gap:3px; background:var(--bg);
  border-radius:14px; padding:11px 13px; font-size:.9rem}
.sstart-foot.is-wrap{flex-wrap:wrap}
.sstart-foot.is-wrap .btn.is-wide{flex:1 0 100%; justify-content:center}
.sstart-foot.is-wrap .btn:nth-child(2){flex:1; justify-content:center}
/* ---- resultsform.js ---- */
.ptiles{display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:9px}
.ptile{display:flex; align-items:center; gap:10px; border:1px solid var(--line);
  border-radius:14px; background:var(--card); color:var(--ink); padding:10px 10px;
  font:inherit; text-align:left; cursor:pointer; min-width:0}
.ptile.is-on{background:var(--brand-l); border:2px solid var(--brand);
  padding:9px 9px; color:var(--brand-d)}
.ptile-face{width:34px; height:34px; border-radius:17px; flex:none;
  display:flex; align-items:center; justify-content:center;
  background:var(--line-2); color:var(--ink-2); font-size:.8rem; font-weight:800}
.ptile.is-on .ptile-face{background:var(--brand); color:#fff}
.ptile-text{display:flex; flex-direction:column; gap:1px; min-width:0}
.ptile-name{font-weight:800; font-size:.92rem; overflow:hidden; text-overflow:ellipsis}
.ptile-sub{font-size:.76rem; color:var(--ink-2)}
.ptile.is-on .ptile-sub{color:inherit}
.tmorebtn{display:flex; align-items:center; justify-content:center; gap:8px;
  border:1px dashed var(--line); border-radius:14px; background:var(--card);
  color:var(--brand); padding:11px; font:inherit; font-weight:700; cursor:pointer}
.tmorebtn .uicon{color:var(--brand)}
.pnote{background:var(--bg); border-radius:12px; padding:10px 12px;
  font-size:.86rem; display:flex; flex-direction:column; gap:2px}
.pnote.is-warn{background:#fff7e0; color:#5c4400}
.presult-head{display:flex; flex-direction:column; gap:1px}
.eventgroup{display:flex; flex-direction:column; gap:8px}
.eventgroup-head{display:flex; align-items:center; justify-content:space-between}
.eventrow{display:flex; flex-direction:column; gap:7px; border:1px solid var(--line-2);
  border-radius:14px; padding:10px 12px; background:var(--card)}
.eventrow.is-answered{border-color:var(--line)}
.eventrow-head{display:flex; align-items:center; justify-content:space-between; gap:8px}
.eventrow-name{font-weight:800}
.eventrow-from{font-size:.74rem; font-weight:700; color:#2e7d4f}
.eventrow-pts{font-size:.8rem; font-weight:800; color:var(--brand)}
.placetiles{display:grid; grid-template-columns:repeat(4, minmax(0, 1fr)); gap:6px}
.placetile{border:1px solid var(--line); border-radius:10px; background:var(--card);
  color:var(--ink); padding:9px 2px; font:inherit; font-weight:700; cursor:pointer}
.placetile[data-place=noPlace]{color:var(--ink-2); font-size:.86rem}
.placetile.is-on{border-width:2px; padding:8px 1px; font-weight:800;
  background:var(--brand-l); border-color:var(--brand); color:var(--brand-d)}
.placetile.is-on.is-gold{background:#fdf3d0; border-color:#b8860b; color:#6b4e00}
.placetile.is-on.is-silver{background:#eef2f4; border-color:#8a9aa3; color:#33444c}
.placetile.is-on.is-bronze{background:#f6e3d6; border-color:#a0522d; color:#5e2e14}
.sschip.is-otherplace{margin-top:6px; border-radius:999px}
.tlink.is-small{font-size:.78rem; margin-top:4px; font-weight:600;
  color:var(--ink-2); text-decoration:none}
.tlink.is-danger{color:#b42318}
.sschips.is-add .sschip{border-style:dashed; color:var(--brand); background:var(--card)}
.sschips.is-awards{margin-top:2px}
/* ---- teamforms.js ---- */
.ttiles.is-kind .ttile{flex-direction:row; align-items:center; gap:9px; padding:11px 12px}
.ttiles.is-kind .ttile.is-on{padding:10px 11px}
.ttiles.is-kind .ttile-label{font-size:.95rem}
.ptile.is-alt{border:2px dashed var(--brand); background:var(--bg); padding:9px 9px;
  color:var(--brand-d)}
.ptile.is-alt .ptile-face{background:var(--card); border:1.5px solid var(--brand);
  color:var(--brand); font-size:.66rem}
.trow2{display:flex; gap:8px}
.trow2 > *{flex:1}
.marktiles.is-one{grid-template-columns:minmax(0, 1fr)}
/* ---- expenseform.js ---- */
.xmoney{display:grid; grid-template-columns:minmax(0, 1.3fr) minmax(0, 1fr); gap:10px}
.xamount{display:flex; align-items:center; gap:4px; border:2px solid var(--brand);
  border-radius:14px; background:var(--card); padding:4px 12px}
.xamount-sign{font-size:1.5rem; font-weight:800; color:var(--ink-2)}
.xamount .input{border:0; background:none; padding:6px 0; font-size:1.7rem;
  font-weight:800; min-width:0; width:100%; box-shadow:none}
.xkinds{display:grid; grid-template-columns:repeat(4, minmax(0, 1fr)); gap:7px}
.xkind{display:flex; flex-direction:column; align-items:center; gap:5px;
  border:1px solid var(--line); border-radius:12px; background:var(--card);
  color:var(--ink); padding:10px 2px; font:inherit; font-size:.74rem; font-weight:700;
  cursor:pointer; min-width:0}
.xkind .uicon{color:var(--brand)}
.xkind.is-on{background:var(--brand-l); border:2px solid var(--brand); padding:9px 1px;
  color:var(--brand-d); font-weight:800}
.ttiles.is-tight{gap:6px}
.ttiles.is-tight .ttile{padding:9px 12px}
.ttiles.is-tight .ttile.is-on{padding:8px 11px}
.ttiles.is-tight .ttile-label{font-size:.92rem}
/* ---- staging and judges ---- */
.ringtiles{display:grid; grid-template-columns:repeat(5, minmax(0, 1fr)); gap:6px}
.ringtile{border:1px solid var(--line); border-radius:10px; background:var(--card);
  color:var(--ink); padding:9px 0; font:inherit; font-weight:800; cursor:pointer}
.ringtile.is-on{background:var(--brand-l); border:2px solid var(--brand); padding:8px 0;
  color:var(--brand-d)}
.ringtile.is-more{font-size:.8rem; font-weight:700; color:var(--brand); border-style:dashed}
.ringtile.is-more.is-on{border-style:solid}
.ttags{display:flex; flex-direction:column; gap:14px}
.judgeseats{display:flex; flex-direction:column; gap:8px}
.judgeseat{display:flex; align-items:center; gap:12px; width:100%; border:1px solid var(--line);
  border-radius:14px; background:var(--card); color:var(--ink); padding:11px 12px;
  font:inherit; text-align:left; cursor:pointer}
.judgeseat.is-empty{border-style:dashed; background:var(--bg)}
.judgeseat.is-open{border:2px solid var(--brand); padding:10px 11px}
.judgeseat-mark{width:34px; height:34px; border-radius:17px; flex:none; display:flex;
  align-items:center; justify-content:center; background:var(--brand); color:#fff;
  font-weight:800; font-size:.82rem}
.judgeseat.is-empty .judgeseat-mark{background:var(--card); color:var(--brand);
  border:1.5px solid var(--brand)}
.judgeseat-text{display:flex; flex-direction:column; gap:1px; min-width:0}
.judgeseat-name{font-weight:800}
.judgeseat-name.is-empty{color:var(--brand); font-weight:700}
.judgepick{display:flex; flex-direction:column; gap:12px}
.judgepick-new{display:flex; flex-direction:column; gap:12px}
/* ---- profileform.js ---- */
.pform{gap:15px}
.pnamerow{display:flex; align-items:center; gap:14px}
.pnamecol{display:flex; flex-direction:column; gap:6px; flex:1; min-width:0}
.pnamecol .input{font-size:1rem}
.pwho{border:0; border-radius:999px; background:var(--brand-l);
  color:var(--brand-d); padding:3px 10px; font:inherit; font-size:.76rem;
  font-weight:700; cursor:pointer}
.avatarbtn .avatarbtn-label .uicon{color:var(--brand)}
.pnamerow .avatarbtn{width:72px; height:72px}
.pcode{background:var(--bg); border-radius:12px; padding:10px 12px;
  font-size:.88rem}
.pcode.warn{color:#8a5a00; background:#fff7e0}
.prows{display:flex; flex-direction:column}
.prow{display:flex; align-items:center; gap:10px; width:100%;
  border:0; border-bottom:1px solid var(--line-2); background:none;
  padding:11px 0; font:inherit; text-align:left; color:var(--ink);
  cursor:pointer}
.prow > .uicon{color:var(--ink-2); flex:none}
.prow-text{display:flex; flex-direction:column; gap:1px; flex:1; min-width:0}
.prow-label{font-size:.7rem; font-weight:800; letter-spacing:.08em;
  text-transform:uppercase; color:var(--ink-2)}
.prow-value{font-weight:700}
.prow-sub{font-size:.8rem; color:var(--ink-2)}
.prow.is-compact{padding:8px 0}
.prows .marktiles{margin:12px 0 4px}
.prows .tmore{border-top:0; border-bottom:1px solid var(--line-2); padding:11px 0}
.sslist{display:flex; flex-direction:column; gap:6px}
.ssrow{display:flex; align-items:baseline; gap:8px; width:100%;
  border:1px solid var(--line); border-radius:12px; background:var(--card);
  color:var(--ink); padding:10px 12px; font:inherit; text-align:left;
  cursor:pointer}
.ssrow.is-on{background:var(--brand-l); border-color:var(--brand)}
.ssrow-text{display:flex; flex-direction:column; gap:1px; flex:1; min-width:0}
.ssrow-label{font-weight:700}
.ssrow-sub{font-size:.8rem; color:var(--ink-2)}
.ssrow-check{color:var(--brand); font-weight:800}

/* ---- the plus button's menu ----------------------------------------------
   One big button for scoring, then groups of tiles under small headings. */
.addmenu{display:flex; flex-direction:column; gap:14px}
.addmenu-score{display:flex; align-items:center; gap:12px; width:100%;
  border:0; border-radius:14px; background:var(--brand); color:#fff;
  padding:14px; font:inherit; text-align:left; cursor:pointer}
.addmenu-score .uicon{color:#fff}
.addmenu-text{display:flex; flex-direction:column; gap:2px; min-width:0; flex:1}
.addmenu-label{font-weight:800; font-size:1.05rem}
.addmenu-score .addmenu-sub{color:rgba(255,255,255,.82)}
.addmenu-sub{font-size:.8rem; color:var(--ink-2); line-height:1.35}
.addmenu-group{display:flex; flex-direction:column; gap:7px}
.addmenu-head{margin:0; font-size:.72rem; font-weight:800;
  letter-spacing:.08em; text-transform:uppercase; color:var(--ink-2)}
.addtiles{display:grid; gap:8px}
.addtile{display:flex; flex-direction:column; align-items:center; gap:6px;
  min-height:78px; justify-content:center; border:1px solid var(--line);
  border-radius:12px; background:var(--card); color:var(--ink);
  padding:12px 4px 10px; font:inherit; cursor:pointer}
.addtile .uicon{color:var(--brand)}
.addtile:hover{border-color:var(--brand)}
.addtile.is-here{background:var(--brand-l)}
.addtile.is-locked{opacity:.55}
.addtile-label{font-size:.82rem; font-weight:700; text-align:center;
  line-height:1.2}
.addmenu-row{display:flex; align-items:center; gap:12px; width:100%;
  border:0; border-top:1px solid var(--line-2); background:none;
  color:var(--ink); padding:12px 4px 2px; font:inherit; text-align:left;
  cursor:pointer}
.addmenu-row .uicon{color:var(--brand)}
.addmenu-rowlabel{font-weight:700}
.addmenu-score:focus-visible,.addtile:focus-visible,.addmenu-row:focus-visible{
  outline:2px solid var(--brand); outline-offset:2px}

.sheetitem.hasicon{display:flex; align-items:flex-start; gap:12px; text-align:left}
.sheetitem.hasicon .uicon{margin-top:2px; color:var(--brand); opacity:1}
.sheetitem-text{display:flex; flex-direction:column; gap:2px; flex:1; min-width:0}
.sheetitem-label{font-weight:700}
.sheetitem-sub{font-size:.78rem; color:var(--ink-2); line-height:1.35}

/* A chosen row in a picker.
   .sheetitem.on was set by the code and styled by nothing, so the only sign
   that somebody had been picked was the word "chosen" wedged against the end
   of their age group. The box at the front carries it now. */
.pickbox{flex:0 0 auto; width:19px; height:19px; margin-top:1px;
  border:2px solid var(--line); border-radius:5px; background:var(--card);
  display:inline-flex; align-items:center; justify-content:center;
  color:#fff; transition:background .12s ease, border-color .12s ease}
.pickbox .uicon{width:14px; height:14px}
.pickbox.on{background:var(--brand); border-color:var(--brand)}
.sheetitem.on{background:var(--line-2)}
.sheetitem.on .sheetitem-label{color:var(--brand)}
@media (prefers-reduced-motion:reduce){ .pickbox{transition:none} }
.fab svg{display:block}
.uicon{display:inline-flex; align-items:center; justify-content:center; flex:none}
.uicon svg{display:block}
.btn.hasicon{display:inline-flex; align-items:center; gap:7px}
/* the glyph is a companion to the label, so it sits back a little */
.btn.hasicon .tabbar a{display:flex; flex-direction:column; align-items:center; gap:3px}





.uicon{opacity:.8}
.btn.hasicon:hover .tabbar a{display:flex; flex-direction:column; align-items:center; gap:3px}





.uicon{opacity:1}
.miniicon .tabbar a{display:flex; flex-direction:column; align-items:center; gap:3px}





.uicon{opacity:.75}
.starbtn{display:inline-flex; align-items:center; gap:6px; background:none;
  border:0; padding:2px; cursor:pointer; font:inherit; font-size:.82rem;
  font-weight:700; color:var(--ink-2); line-height:1}
.starbtn:hover{color:var(--ink)}
.starbtn.on{color:#B98904}
html[data-theme=dark] .starbtn.on{color:#F2B705}
.starcell{display:inline-flex; align-items:center; vertical-align:middle}
.weaponchip{display:inline-flex; align-items:center; gap:6px; font-size:.86rem}
.weaponrow{display:flex; align-items:center; gap:10px; padding:9px 0;
  border-bottom:1px solid var(--line-2); flex-wrap:wrap}
.weaponrow .grow{flex:1 1 180px}
.weapon-korean{font-size:.78rem; color:var(--ink-2)}
.iconpick{display:flex; gap:6px; flex-wrap:wrap}
.iconpick button{width:44px; height:44px; border:1px solid var(--line);
  border-radius:10px; background:var(--field); cursor:pointer; display:flex;
  align-items:center; justify-content:center}
.iconpick button.on{border-color:var(--brand); box-shadow:0 0 0 1px var(--brand)}
.medaltally{display:inline-flex; gap:9px; align-items:center; flex-wrap:wrap}
.medalcount{display:inline-flex; align-items:center; gap:3px; font-weight:700;
  font-size:.85rem}
.medalcount.zero{opacity:.35}
.titlepick{border:1px solid var(--line); border-radius:9px; padding:8px 11px;
  margin-bottom:6px; background:var(--card)}
.titlepick.on{border-color:var(--brand)}
.titlepick-head{display:flex; align-items:center; gap:9px; cursor:pointer}
.titlepick .input{margin-top:7px}
.titlebadge{display:inline-flex; align-items:center; gap:6px; border:1px solid var(--line);
  background:var(--field); border-radius:999px; padding:5px 12px; cursor:pointer;
  font:inherit; font-size:.82rem; font-weight:800}
.titlebadge.lvl-worlds{color:#C0202A; border-color:#e2b4b4}
.titlebadge.lvl-district{color:#2C5FA8; border-color:#b6c8e4}
.titlebadge.lvl-state{color:#1d2529; border-color:var(--line)}
html[data-theme=dark] .titlebadge.lvl-worlds{color:#ff9a94}
html[data-theme=dark] .titlebadge.lvl-district{color:#96baef}
html[data-theme=dark] .titlebadge.lvl-state{color:#e9eff2}
.titlebadge-big{display:flex; align-items:center; gap:12px; margin-bottom:6px}
.titlegroup{border:1px solid var(--line); border-radius:10px; margin-bottom:8px;
  background:var(--card)}
.titlegroup-head{display:flex; align-items:center; gap:10px; padding:10px 12px;
  cursor:pointer; font-weight:700; list-style:none}
.titlegroup-head::-webkit-details-marker{display:none}
.titlegroup-head::after{content:'\25BE'; color:var(--ink-2); font-size:.8rem}
.titlegroup[open] .titlegroup-head::after{content:'\25B4'}
.titlegroup-body{padding:0 12px 10px}
.titleseason{padding:7px 0; border-top:1px solid var(--line-2)}
.titleseason-name{font-weight:700; font-size:.82rem; color:var(--ink-2);
  text-transform:uppercase; letter-spacing:.05em; margin-bottom:4px}
.titlerow{display:flex; align-items:center; gap:9px; padding:8px 0;
  border-bottom:1px solid var(--line-2); flex-wrap:wrap}
.titlerow .grow{flex:1 1 160px}
.lifeseason{border:1px solid var(--line); border-radius:10px;
  margin-bottom:9px; background:var(--card)}
.lifeseason-head{display:flex; align-items:center; justify-content:space-between;
  gap:10px; flex-wrap:wrap; padding:10px 13px; cursor:pointer; list-style:none}
.lifeseason-head::-webkit-details-marker{display:none}
.lifeseason-head::after{content:'\25BE'; color:var(--ink-2); font-size:.8rem}
.lifeseason[open] .lifeseason-head::after{content:'\25B4'}
.lifeseason .tbl{margin:0 13px 12px}
.lifeseason-name{font-weight:700}
.statparts{display:flex; gap:9px; margin-top:7px; flex-wrap:wrap}
.statpart{display:flex; align-items:baseline; gap:3px; font-size:.74rem}
.statpart-value{font-weight:800}
.statpart-label{opacity:.72; text-transform:uppercase; letter-spacing:.05em;
  font-size:.64rem}
.statpart.gold .statpart-value{color:#B8860B}
.statpart.silver .statpart-value{color:#6E7A82}
.statpart.bronze .statpart-value{color:#A05A2C}
.hero .statpart.gold .statpart-value{color:#FFD86B}
.hero .statpart.silver .statpart-value{color:#DCE5EA}
.hero .statpart.bronze .statpart-value{color:#E8A87C}
.statsection{margin-top:16px}
.statsection-head{display:flex; align-items:center; gap:9px; margin-bottom:8px}
.statsection-title{font-size:.7rem; font-weight:800; letter-spacing:.11em;
  text-transform:uppercase; opacity:.85}
.statsection-rule{flex:1; height:1px; background:currentColor; opacity:.25}

/* ------------------------------------------------------------------- tiles */
.tiles{display:grid; grid-template-columns:repeat(auto-fill,minmax(160px,1fr)); gap:10px}
/* Padding trimmed by 2 either side, and the gap in .tile-head by 2, to pay
   for a mark grown from 20px to 26px. The sum is what matters: the title had
   (tile - 32 - 20 - 9) to wrap in and now has (tile - 28 - 26 - 7), which is
   the same number. A bigger mark that pushed a heading onto a third line
   would be a worse tile, not a better one. */
.tile{
  display:block; background:var(--card); border:1px solid var(--line);
  border-radius:var(--radius); padding:14px; box-shadow:var(--shadow); color:var(--ink);
  transition:transform .12s ease, box-shadow .12s ease;
}
.tile:active{transform:scale(.985)}
.tile.coach{background:linear-gradient(150deg,#fff,var(--brand-l)); border-color:#c9dfe9}
.tile-title{font-weight:700; margin-bottom:3px}
.tile-sub{font-size:.82rem; color:var(--ink-2)}

.overviewcard{
  display:flex; align-items:center; justify-content:space-between; gap:14px;
  background:linear-gradient(150deg,var(--card),var(--brand-l));
  border:1px solid #c9dfe9; border-radius:var(--radius); padding:18px 20px;
  box-shadow:var(--shadow); color:var(--ink); margin-bottom:16px;
  transition:transform .12s ease, box-shadow .12s ease;
}
.overviewcard:hover{box-shadow:0 3px 14px rgba(20,50,65,.16)}
.overviewcard:active{transform:scale(.99)}
/* Without this the text has no width of its own, so space-between pushes it
   into the middle of the card instead of leaving it beside the mark. */
.overviewcard-text{flex:1 1 auto; min-width:0}
.overviewcard-title{font-weight:800; font-size:1.05rem; margin-bottom:3px}
.overviewcard-sub{font-size:.84rem; color:var(--ink-2)}
.overviewcard .uicon{color:var(--brand); flex:none}
html[data-theme=dark] .overviewcard{border-color:var(--line)}

.nextcard{display:flex; justify-content:space-between; align-items:center; gap:12px;
  flex-wrap:wrap}

/* ---- the tournament on the home page ------------------------------------
   Shaped like the season bar in the hero above it, in card colours rather
   than on the brand. The arrows keep their size and the middle takes
   whatever is left, so a long tournament name shortens instead of pushing
   the forward arrow off the screen -- which is exactly what the navigator
   on a tournament's own page used to do.
   ------------------------------------------------------------------------ */
.tourcard{display:flex; flex-direction:column; gap:8px}
.tourbar{display:flex; align-items:center; gap:8px; min-width:0}
.tourbar-mid{flex:1 1 0; min-width:0; display:flex; align-items:center; gap:10px}
/* The inner block as well as the outer one. A flex child will not go
   below the width of its own content unless it is told it may, so
   min-width on the track alone left the name running on under the
   forward arrow and out of the card -- clipped nowhere, because the
   ellipsis belongs to a box that was never made narrow enough to use
   it. The same trap as the navigator on a tournament's own page. */
.tourbar-mid > .grow{min-width:0}
.tourbar-name{display:block; font-weight:800; color:var(--brand);
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.tourbar-say{font-size:.7rem; color:var(--ink-2); text-align:center;
  font-variant-numeric:tabular-nums}
.tourbarstep{
  width:34px; height:34px; border-radius:50%; flex:none;
  display:flex; align-items:center; justify-content:center;
  background:var(--brand-l); color:var(--brand-d);
  font-size:1.2rem; line-height:1; font-weight:700; text-decoration:none;
}
.tourbarstep:hover{background:var(--brand); color:#fff}
/* The end of the row holds its place, so the arrow that is left stays on
   its own side instead of sliding into the middle. */
.tourbarstep.is-off{visibility:hidden}
html[data-theme=dark] .tourbarstep{color:var(--ink)}

/* ---- staging and rings --------------------------------------------------- */
.stagetools{display:flex; flex-wrap:wrap; gap:12px; align-items:flex-end;
  margin-bottom:8px}
.stagesort{display:flex; flex-direction:column; gap:2px}
.stagesort select{font-size:16px; min-height:38px; border-radius:10px;
  border:1px solid var(--line); background:var(--card); color:var(--ink);
  padding:6px 10px}
.stagelist{display:flex; flex-direction:column}
.stagerow{
  display:flex; gap:12px; align-items:flex-start; padding:9px 2px;
  border-bottom:1px solid var(--line); color:inherit; text-decoration:none;
}
.stagerow:last-child{border-bottom:0}
.stagerow:hover{background:var(--brand-l)}
.stagename{font-weight:700; color:var(--brand)}
.stagewhen{flex:none; max-width:46%; text-align:right;
  font-variant-numeric:tabular-nums}

/* ----------------------------------------------------------------- buttons */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:6px;
  background:var(--brand); color:#fff; border:1px solid var(--brand);
  padding:9px 15px; border-radius:10px; font-size:.92rem; font-weight:600;
  cursor:pointer; font-family:inherit; min-height:40px; white-space:nowrap;
}
.btn:active{transform:translateY(1px)}
.btn.ghost{background:#fff; color:var(--brand); border-color:var(--line)}
.btn.danger{background:#fff; color:var(--bad); border-color:#f0c6c2}
/* The clock. It sits in a row of buttons that correct a sheet, and it is
   the only one there that decides who won -- so it is bordered in red and
   set heavier, and stays findable in a row that has grown long. Not
   `danger`: nothing is destroyed, and the same red twice would say the two
   were the same kind of thing. */
.btn.timeup{border-color:var(--bad); border-width:2px; font-weight:800}
.btn.timeup:hover{background:#fdf4f3}
html[data-theme=dark] .btn.timeup:hover{background:#32211f}
.iconbtn{background:none; border:0; font-size:1.1rem; cursor:pointer; color:var(--ink-2);
  padding:6px 10px}
.linkrow{display:flex; gap:8px; flex-wrap:wrap; align-items:center; margin-top:10px}
/* A number sitting inside the sentence it changes, under the reminder it
   belongs to. Indented so it reads as part of that box rather than as the
   next setting down, and wrapping on a narrow phone rather than pushing
   the words off the side. */
.timingrow{display:flex; gap:6px; flex-wrap:wrap; align-items:center;
  margin:2px 0 8px 26px}
.timingrow select{width:auto; min-width:64px; padding:4px 6px;
  font-size:16px}
/* .pairrow held the two per-corner disqualification buttons on one line so
   they read as a pair. There is one button now, which asks which corner it
   was, so nothing needs pairing and the rules are gone rather than left
   waiting for a class the app no longer writes. */

/* ------------------------------------------------------------------ tables */
.tablewrap{overflow-x:auto; -webkit-overflow-scrolling:touch; margin:0 -4px}
.tbl{width:100%; border-collapse:collapse; font-size:.9rem; min-width:340px}
/* The heading row on the same wash as every other heading. It is sticky,
   so the color is layered over an opaque card rather than replacing it --
   rows scrolling underneath a see-through heading is the bug this would
   otherwise introduce. */
.tbl th{
  text-align:left; font-size:.7rem; text-transform:uppercase; letter-spacing:.06em;
  color:var(--ink-2); font-weight:700; padding:8px 10px; border-bottom:2px solid var(--line);
  white-space:nowrap; position:sticky; top:0;
  background-color:var(--card);
  background-image:linear-gradient(var(--head-bg), var(--head-bg));
}
.tbl td{padding:9px 10px; border-bottom:1px solid var(--line-2); vertical-align:middle}
/* Only meaningful where a row has become a block; see the narrow-screen
   rules further down. A table is a table on a wide screen and has no
   folding to do. */
.rowcaret{display:none}
/* The two small actions at the end of a result row, side by side rather
   than stacked, because stacked they read as two separate rows. */
.rowtools{display:flex; gap:6px; flex-wrap:wrap; align-items:center}


/* ---- a picker you can type into ------------------------------------------
   The box is an ordinary input so it looks like every other field; what is
   new is the panel under it. Positioned rather than in flow, because a list
   that pushed the rest of the form down as you typed would move the thing
   you were aiming at. */
.picker{position:relative; display:flex; flex-direction:column; gap:4px}
.picker-box{position:relative; display:flex; align-items:stretch}
.picker-input{padding-right:40px}
.picker-caret{
  position:absolute; right:1px; top:1px; bottom:1px; width:36px;
  display:flex; align-items:center; justify-content:center;
  border:0; border-radius:0 9px 9px 0; background:transparent;
  color:var(--ink-2); font:inherit; font-size:.8rem; cursor:pointer;
}
.picker-caret:hover{color:var(--ink)}
.picker-caret:focus-visible{outline:2px solid var(--brand); outline-offset:-2px}
/* Fixed, not absolute.
   ------------------------------------------------------------------------
   A form scrolls inside .modal-body, which is overflow-y:auto -- and in CSS
   a box that clips on one axis clips on both. An absolutely positioned list
   is clipped by that box, so a list hanging below the last field was cut off
   at the edge of the scrolling area and read as though it were hiding behind
   the buttons below it. Fixed positioning is not clipped by a scrolling
   ancestor, so the list lies over the form and over the footer.

   Coordinates are set by place() at the moment it opens, measured against
   the part of the screen the keyboard has left visible. What is here is only
   what it looks like. */
.picker-panel{
  position:fixed; z-index:70;
  max-height:260px; overflow-y:auto;
  background:var(--card); border:1px solid var(--line); border-radius:10px;
  box-shadow:0 10px 26px rgba(0,0,0,.16);
}
/* Opening upwards, the shadow should fall the other way or the list looks
   as though it belongs to whatever is above it. */
.picker-panel.is-above{box-shadow:0 -10px 26px rgba(0,0,0,.16)}
.picker-panel.is-folded{display:none}
.picker-opt{
  display:block; width:100%; text-align:left;
  padding:10px 12px; border:0; background:transparent;
  font:inherit; font-size:.95rem; color:var(--ink); cursor:pointer;
}
.picker-opt:hover,
.picker-opt.is-active{background:var(--line-2)}
.picker-opt[aria-selected="true"]{font-weight:700}
.picker-group{
  padding:9px 12px 4px; font-size:.66rem; font-weight:700;
  letter-spacing:.08em; text-transform:uppercase; color:var(--ink-2);
  border-top:1px solid var(--line-2);
}
.picker-panel > .picker-group:first-child{border-top:0}
.picker-none{padding:12px; font-size:.88rem; color:var(--ink-2)}

/* ---- three answers that are not the same question ------------------------
   Equal thirds that wrap rather than shrink: three words on a phone is fine,
   three truncated words is not. */
.choicerow{display:flex; flex-wrap:wrap; gap:6px; margin-bottom:8px}
.choicebtn{
  flex:1 1 auto; min-width:96px;
  padding:9px 12px; border:1px solid var(--line); border-radius:9px;
  background:var(--card); color:var(--ink-2);
  font:inherit; font-size:.86rem; font-weight:600; cursor:pointer;
}
.choicebtn:hover{border-color:var(--ink-2); color:var(--ink)}
.choicebtn.on{
  background:var(--brand); border-color:var(--brand); color:#fff;
}
.choicebtn:focus-visible{outline:2px solid var(--brand); outline-offset:2px}

/* ---- two short fields on one line ----------------------------------------
   min-width:0 on the halves, or a select with long option text refuses to
   shrink and pushes the row wider than the phone. Below 360px they stack on
   their own, so a small phone is never given two 150px selects with the
   words cut off inside them.

   minmax(0,1fr) rather than 1fr, which is the same thing said properly:
   1fr means minmax(auto,1fr), and `auto` as a MINIMUM is the content's
   min-content width. A child that reports a large min-content width -- an
   iOS date control does, because Safari draws its own widget and gives it
   a size it will not go below -- then forces its column wider than its
   share and over the field beside it. Start and End on the tournament form
   is where that shows. min-width:0 on the child is not enough on its own
   here; the column itself has to be allowed to shrink. */
.fieldpair{display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  gap:12px 10px}
.fieldpair > *{min-width:0}
@media (max-width:360px){ .fieldpair{grid-template-columns:1fr} }

/* A heading for a group of tickboxes. Looks like a field label because it
   does a field label's job, but it is not one: a .field-label outside a
   .field would be picked up by everything that counts the questions on a
   form. */
.grouplabel{display:block; font-size:.75rem; font-weight:700;
  color:var(--ink-2); text-transform:uppercase; letter-spacing:.05em;
  margin-bottom:-6px}

/* ---- tickboxes that are not fields --------------------------------------- */
.checkwrap{display:flex; flex-direction:column; gap:2px}
.checkrow{align-items:flex-start; gap:9px; min-height:30px}
.checkrow input{margin-top:2px; flex:none}
.check-text{flex:1 1 auto; min-width:0}
.checkgrid{display:grid; grid-template-columns:1fr 1fr; gap:4px 10px}
.checkgrid > *{min-width:0}
@media (max-width:360px){ .checkgrid{grid-template-columns:1fr} }

/* ---- the shared collapsible row ------------------------------------------
   Same rules as the medal trail, which is where this came from; the trail
   keeps its own class names so nothing it already does has to move. */
.folditem{border:1px solid var(--line); border-radius:10px;
  background:var(--card); overflow:hidden}
.foldhead{
  display:flex; align-items:center; gap:10px; width:100%;
  padding:10px 12px; border:0; background:transparent;
  font:inherit; text-align:left; color:inherit;
  cursor:pointer; user-select:none;
}
.foldhead:focus-visible{outline:2px solid var(--brand); outline-offset:-2px}
.foldhead .rowcaret{display:inline; flex:0 0 auto; color:var(--ink-2);
  font-size:.85rem}
.foldbody{padding:0 12px 12px; border-top:1px solid var(--line-2)}
.foldbody.is-folded{display:none}
.foldlist{display:flex; flex-direction:column; gap:6px}

/* Saved standings, folded division by division.

   Five levels deep, so the indent has to stay cheap: the body's own left
   padding is the whole of it, and the count sits at the right of every
   heading so a box says what is in it before it is opened. */
/* Five levels of padding is most of a phone's width. The outermost box
   keeps the ordinary inset; everything inside it gets a narrow one, so the
   table at the bottom has room to be a table. */
/* A picture in the manual.

   One rule for all of them: fill the column, stop at 420px, centred. The
   shots are taken at a phone's width, so a whole screen lands at close to
   its own size and a crop of a button is shown a little larger than life,
   which is what a crop is for. Nothing in the page has to know which kind
   it is looking at. */
/* The back arrow, left of the page title.

   An iPhone has no back button of its own and no browser chrome inside an
   app, so without this the only way back from a nested page was to guess
   which tab it had come from. The native edge swipe does the same job for
   people who know it; this is for people who do not.

   Two things it must not do, both of which it did when it arrived.

   It must not move the title. The header is a flex row justified
   space-between, which with one child put the title at the left edge and
   with two put it at the RIGHT one -- so every page's title jumped inward
   by a different amount, each one the width of its own words. The fix is
   on .pagetitle below: a title that claims the free space leaves
   space-between nothing to distribute.

   And it must not set the header's height. A 38px box beside a 25px line
   of type made every header without a subtitle taller than it had been.
   The visible arrow is sized to the title's own line and pulled back into
   it with negative margins; the part a thumb has to hit is a transparent
   box around it, which costs no layout at all. */
.backbtn{
  position:relative;
  flex:0 0 auto; display:inline-flex; align-items:center; justify-content:center;
  width:28px; height:28px; margin:-2px -2px -2px -6px;
  border:0; border-radius:8px; background:transparent; color:var(--ink);
  cursor:pointer; -webkit-tap-highlight-color:transparent;
}
/* 44 by 44 for a thumb, without 44 by 44 of header. */
.backbtn::after{content:''; position:absolute; inset:-8px}
.backbtn:active{background:var(--fieldbg)}
.backbtn svg{width:22px; height:22px}
@media print{ .backbtn{display:none} }

.manualfig{margin:16px auto; max-width:420px; text-align:center}
/* No width: the picture knows its own size, because it is served with a 2x
   density rule. Forcing it to fill the column drew a crop of one button at
   six times life size. max-width is the only limit needed -- a whole screen
   is 412 across and a narrow column is narrower. */
.manualshot{display:inline-block; max-width:100%; height:auto;
  border-radius:10px; border:1px solid var(--line); background:var(--card)}
.manualfig figcaption{margin-top:7px; font-size:.86rem; color:var(--ink-2);
  text-align:left}
@media print{
  .manualfig{break-inside:avoid; page-break-inside:avoid}
}

.stree .foldbody{padding:0 6px 8px}
.stree > .folditem > .foldbody{padding:0 10px 10px}
.stree .foldhead{padding:9px 10px; gap:8px}
.treename{flex:1 1 auto; min-width:0}
.treecount{flex:0 0 auto; font-size:.82rem; color:var(--ink-2);
  background:var(--fieldbg); border-radius:999px; padding:1px 9px;
  min-width:22px; text-align:center}
.treeleaf{display:flex; flex-direction:column; gap:14px; padding-top:10px}
.savedset + .savedset{border-top:1px solid var(--line-2); padding-top:14px}
.savedset p{margin:0 0 8px}

/* A list of check boxes that stays shut until it is wanted. Eleven events
   drawn as eleven buttons is four lines of editor for one answer, repeated
   for every award; folded, it is one line saying what was chosen. */
.checklistitem{border:1px solid var(--line); border-radius:10px;
  background:var(--card); overflow:hidden}
.checklisthead{display:flex; align-items:center; gap:10px; width:100%;
  padding:8px 12px; border:0; background:transparent; font:inherit;
  text-align:left; color:inherit; cursor:pointer; user-select:none}
.checklisthead:focus-visible{outline:2px solid var(--brand);
  outline-offset:-2px}
/* display, because the base rule hides every caret and each fold turns its
   own back on. Without it the row looks like a box and nothing says it
   opens. */
.checklisthead .rowcaret{display:inline; flex:0 0 auto; color:var(--ink-2);
  font-size:.85rem}
/* There is no general .grow rule — each component sets its own — so without
   this the summary is content-width and the caret sits against the text
   rather than at the edge where it can be found. */
.checklisthead .grow{flex:1 1 auto; min-width:0}
.checklist-sum{font-weight:600; font-size:.88rem;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.checklistbody{padding:0 12px 10px; border-top:1px solid var(--line-2)}
.checklistbody.is-folded{display:none}
/* Two columns where there is room for them: eleven events in one column is
   a long scroll inside a dialog that is already scrolling. */
.checklist-body{display:grid; grid-template-columns:1fr; gap:2px;
  padding-top:8px}
@media(min-width:520px){
  .checklist-body{grid-template-columns:1fr 1fr; column-gap:14px}
}

/* What a number on the Medals page is made of.
   Each line is a block: the name goes where the name goes, and pressing
   anywhere else opens what the line is actually counting. A single row
   link could only ever do one of the two. */
.traillist{display:flex; flex-direction:column; gap:6px}
.trailitem{border:1px solid var(--line); border-radius:10px;
  background:var(--card); overflow:hidden}
.trailhead{display:flex; align-items:center; gap:10px; padding:10px 12px;
  cursor:pointer; user-select:none}
.trailhead:focus-visible{outline:2px solid var(--brand); outline-offset:-2px}
.trailhead .rowcaret{display:inline; flex:0 0 auto; color:var(--ink-2);
  font-size:.85rem}
.trailwhat{flex:1 1 auto; min-width:0}
.trailwhen{flex:0 0 auto; text-align:right; font-size:.86rem;
  color:var(--ink-2)}
.trailmedals{flex:0 0 auto; display:flex; align-items:center}
.trailbody{padding:0 12px 12px; border-top:1px solid var(--line-2)}
.trailbody.is-folded{display:none}
.trailbody .tablewrap{margin-top:8px}
@media (max-width:480px){
  .trailhead{flex-wrap:wrap; gap:6px 10px}
  .trailwhat{flex:1 1 100%}
  .trailwhen{text-align:left}
}
.tbl tbody tr[onclick],.tbl tbody tr{cursor:default}
.tbl tbody tr:hover{background:var(--line-2)}
.tbl .align-right{text-align:right}
.tbl .empty{color:var(--ink-2); font-style:italic; text-align:center; padding:18px}
.tbl tr.dim td{opacity:.55}
.tbl tr.mine{background:#fff8e6}
.tbl tr.mine:hover{background:#fdf0cf}
.namecell{display:flex; align-items:center; gap:8px}
.notcounted{color:var(--warn); font-weight:600}

/* ------------------------------------------------------------------- forms */
.form{display:flex; flex-direction:column; gap:12px}
/* A section heading inside a form, on the same wash, so the divisions of a
   long form are visible while scrolling past rather than only while
   reading. Pulled out to the form's own edges for the same reason the card
   band is: a tinted strip inset inside a white box is a box in a box. */
.formsec{
  /* Out to the edges of whatever holds it. Cards and modal bodies both pad
     themselves by 16px, which is what makes one number right everywhere a
     form section appears. */
  margin:10px -16px 0; width:calc(100% + 32px);
  font-size:.75rem; text-transform:uppercase;
  letter-spacing:.08em; color:var(--brand); font-weight:700;
  background:var(--head-bg); padding:8px 16px;
}
.field{display:flex; flex-direction:column; gap:4px}
.field-label{font-size:.75rem; font-weight:700; color:var(--ink-2);
  text-transform:uppercase; letter-spacing:.05em}
.field-hint{font-size:.78rem; color:var(--ink-2)}
/* A hint that has turned into a warning: the same line in the same place,
   so nothing moves, but it no longer reads as ordinary guidance. */
.field-hint.warn{color:var(--warn); font-weight:600}
.field-req{color:var(--bad); margin-left:3px; font-weight:700}

/* The "?" beside a label, and what it unfolds. Inline-block, so it flows
   after the label text without .field-label having to become a flex row --
   which would change the layout of every field in the app for the sake of
   the few that carry one. */
.field-q{
  display:inline-flex; align-items:center; justify-content:center;
  width:16px; height:16px; margin-left:6px; padding:0; flex:none;
  border:1px solid var(--line); border-radius:50%;
  background:transparent; color:var(--ink-2);
  font:inherit; font-size:.66rem; font-weight:700; line-height:1;
  cursor:pointer; vertical-align:middle;
}
.field-q:hover,
.field-q.open{background:var(--brand); border-color:var(--brand); color:#fff}
.field-q:focus-visible{outline:2px solid var(--brand); outline-offset:2px}
.field-help{
  font-size:.82rem; line-height:1.45; color:var(--ink);
  background:var(--line-2); border-radius:9px; padding:9px 11px; margin-top:2px;
}
.field-help.is-folded{display:none}
/* Lifted out of its column and given the whole row beneath the pair. */
.field-help-wide{grid-column:1 / -1}

/* A fold inside a form. Mirrors the card fold rather than inventing a second
   way of saying the same thing. */
.moreopts{border-top:1px solid var(--line); margin-top:2px}
/* A fold's head is a section heading that happens to open, so it wears the
   same band -- otherwise a form's sections would look like two different
   kinds of thing depending on whether they could be put away. */
.moreopts-toggle{
  display:flex; align-items:center; gap:8px;
  padding:9px 16px; margin:0 -16px; width:calc(100% + 32px);
  border:0; cursor:pointer;
  background:var(--head-bg);
  font:inherit; font-size:.78rem; font-weight:700; color:var(--brand);
  text-transform:uppercase; letter-spacing:.06em;
}
.moreopts-label{flex:1; text-align:left}
.moreopts-count{
  font-size:.7rem; font-weight:700; color:var(--ink-2);
  background:var(--line-2); border-radius:20px; padding:1px 7px;
  text-transform:none; letter-spacing:0;
}
.moreopts-caret{color:var(--ink-2); font-size:.8rem; flex:none}
.moreopts-body{display:flex; flex-direction:column; gap:12px; padding-top:8px}
.moreopts-body.is-folded{display:none}
.input{
  width:100%; font:inherit; font-size:16px; /* 16px stops iOS zooming on focus */
  padding:10px 12px; border:1px solid var(--line); border-radius:10px;
  background:#fff; color:var(--ink); min-height:42px;
}
.input:focus{outline:2px solid var(--brand); outline-offset:-1px}
textarea.input{min-height:80px; resize:vertical}
.check{display:flex; align-items:center; gap:9px; font-size:.92rem; cursor:pointer;
  min-height:34px}
.check input{width:20px; height:20px}
/* A tickbox on a form is not a target somebody hunts for -- it sits at the
   end of a sentence they are already reading. A quarter off the box and a
   point off the words gives three of them back the better part of a row,
   and 15px is still comfortably above the 44px row that carries it. */
.checkrow input{width:15px; height:15px}
.checkrow .check-text{font-size:.84rem}
/* Filters used to claim 170px each whatever they held, which on a phone put
   every one on its own row and pushed the actual page below the fold. They
   now size to their contents, growing only as far as they need. */
/* Tops aligned, not bottoms.
   A field carrying a hint is a line taller than its neighbours, and
   aligning the bottoms rode its control UP relative to theirs -- so on the
   Add standings form, State sat a line above Standings beside it. Aligning
   the tops lines the labels up, which lines the controls up, and a hint
   hangs below its own field where it belongs. */
.controls{display:flex; gap:8px 10px; flex-wrap:wrap; align-items:flex-start}
.controls .field{min-width:0; flex:0 1 auto}
.controls .field .input,.controls .field select{
  min-width:0; width:auto; max-width:100%; padding:7px 9px; font-size:16px}
.controls .field-label{font-size:.68rem; margin-bottom:2px; display:block}
.controls .btn{padding:7px 11px; font-size:.85rem}
@media(max-width:520px){
  /* Two to a row rather than one: a filter card that fills the screen
     before the list it filters is a card in the way. */
  .controls{gap:6px 8px}
  .controls .field{flex:1 1 calc(50% - 4px); max-width:100%; min-width:120px}
  .controls .field select,.controls .field .input{width:100%}
  .controls .btn{flex:1 1 calc(50% - 4px); min-width:120px}
}

.codepreview{
  background:var(--brand-l); border:1px solid #c9dfe9; border-radius:10px;
  padding:9px 12px; font-size:.86rem; font-weight:600; color:var(--brand-d);
}
.seasonbox{background:var(--brand-l); border:1px solid #c9dfe9; border-radius:10px;
  padding:11px 13px}
.seasonbox-head{display:flex; align-items:center; justify-content:space-between;
  gap:8px; margin-bottom:8px}
.seasonbox .chipwrap{margin-bottom:6px}
.seasonbox p{margin:0}
/* The box now says why the season is what it is, and sometimes that it is
   worth a second look. Two sentences running together read as one. */
.seasonbox p + p{margin-top:5px}
.codepreview.warn{background:#fff4e5; border-color:#f0d6ac; color:var(--warn)}
/* A block of words meant to be read and copied into somebody else's form,
   rather than a value to notice. Same box as .codepreview so it reads as
   quoted rather than written, without the weight that makes that one look
   like something has gone wrong. */
.copyblock{
  background:var(--brand-l); border:1px solid #c9dfe9; border-radius:10px;
  padding:9px 12px; font-size:.84rem; color:var(--ink);
  white-space:pre-wrap; margin:8px 0;
}

.chipwrap{display:flex; gap:6px; flex-wrap:wrap}
.chip{
  background:#fff; border:1px solid var(--line); border-radius:999px;
  padding:7px 13px; font-size:.85rem; cursor:pointer; font-family:inherit; color:var(--ink);
}
.chip.on{background:var(--brand); border-color:var(--brand); color:#fff; font-weight:600}

.tabs{display:flex; gap:6px; flex-wrap:wrap; margin-bottom:12px}
.tab{
  background:#fff; border:1px solid var(--line); border-radius:10px; padding:8px 13px;
  font-size:.88rem; cursor:pointer; font-family:inherit; color:var(--ink);
}
.tab.on{background:var(--brand); border-color:var(--brand); color:#fff; font-weight:600}

/* --------------------------------------------------------- result entry UI */
.placerow{
  display:grid; grid-template-columns:1fr auto; gap:6px 10px; align-items:center;
  padding:10px 0; border-bottom:1px solid var(--line-2);
}
.placerow-name{font-weight:600; font-size:.92rem}
.placerow-pts{
  font-weight:700; color:var(--ink-2); font-size:.9rem; text-align:right; min-width:44px;
}
.placerow-pts.pos{color:var(--good)}
.seg{display:flex; flex-wrap:wrap; gap:4px; grid-column:1/-1}
.segbtn{
  flex:1 1 auto; background:#fff; border:1px solid var(--line); border-radius:8px;
  padding:9px 8px; font-size:.82rem; cursor:pointer; font-family:inherit; color:var(--ink);
  min-height:38px;
}
.segbtn.on{background:var(--brand); border-color:var(--brand); color:#fff; font-weight:600}
.groupbar{
  display:flex; justify-content:space-between; align-items:center; gap:10px;
  margin-top:14px; padding-top:10px; border-top:2px solid var(--line);
}
.notice{
  background:var(--brand-l); border-radius:10px; padding:10px 12px; margin:10px 0;
  font-size:.9rem;
}

/* ---------------------------------------------------------------- profiles */
.profile-top{display:flex; gap:14px; align-items:center}
.profile-id h2{margin-bottom:6px}
.beltline{display:flex; align-items:center; gap:8px; flex-wrap:wrap}
.factgrid{display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr));
  gap:12px 16px; margin-top:14px; padding-top:14px; border-top:1px solid var(--line-2)}
.card-title + .factgrid{margin-top:0; padding-top:0; border-top:0}
.fact{display:flex; flex-direction:column; gap:2px; min-width:0}
.fact-label{font-size:.68rem; font-weight:800; letter-spacing:.07em;
  text-transform:uppercase; color:var(--ink-2)}
.fact-value{font-size:.95rem; font-weight:600; overflow-wrap:anywhere}
.fact-value.empty{color:var(--ink-2); font-weight:400}
.fact-value.good{color:var(--good)}
.fact-value.warn{color:var(--warn)}
.factgrid.tight{margin-top:0; padding-top:0; border-top:0}
.detailblock{margin-top:14px; padding-top:14px; border-top:1px solid var(--line-2)}
.detailblock>.fact-label{display:block; margin-bottom:6px}
.addressbox{font-size:.95rem; line-height:1.55}
.addr-venue{font-weight:700}
.addressbox a{display:inline-block; margin-top:4px}
a.fact-value{color:var(--brand); text-decoration:none}
/* Several teams under one label, wrapping rather than pushing the grid
   column wider than the ones beside it. */
.factlinks{display:flex; flex-direction:column; gap:2px; align-items:flex-start}
a.fact-value:hover{text-decoration:underline}
.resultnote{margin:14px 0; padding:12px; background:var(--brand-l);
  border:1px solid #c9dfe9; border-radius:10px}
.resultnote .field-label{display:block; margin-bottom:6px}
.resultnote-text{font-size:.82rem; color:var(--ink-2); font-style:italic;
  margin-top:3px; white-space:normal; overflow-wrap:anywhere}
/* a long note must not stretch the table it sits in */
.notepeek{display:inline-flex; align-items:center; gap:5px; font:inherit;
  font-size:.8rem; font-style:italic; color:var(--ink-2); background:none;
  border:0; padding:2px 0; margin-top:3px; cursor:pointer; text-align:left;
  max-width:100%}
.notepeek:hover{color:var(--brand); text-decoration:underline}
.notepeek .uicon{flex:none; opacity:.7}
.notefull{white-space:pre-wrap; overflow-wrap:anywhere; margin:0}
.highlightwrap{display:flex; align-items:center; gap:10px; margin-bottom:14px}
.highlightwrap .highlight{flex:1; margin:0}
.badges{display:flex; gap:6px; flex-wrap:wrap; margin-top:8px}
.pill{
  display:inline-block; background:var(--line-2); border:1px solid var(--line);
  border-radius:999px; padding:3px 10px; font-size:.76rem; color:var(--ink-2);
}
.pill.good{background:#e6f4ed; border-color:#bfe0ce; color:var(--good)}
.pill.warn{background:#fdf1e0; border-color:#f0d6ac; color:var(--warn)}
.belt{
  display:inline-block; border-radius:999px; padding:3px 11px; font-size:.76rem;
  font-weight:700; border:1px solid rgba(0,0,0,.15);
}
.belt{position:relative; overflow:hidden; display:inline-flex; align-items:center;
  min-height:24px; padding:0; border-radius:5px; border:1px solid rgba(0,0,0,.22);
  font-size:.76rem; font-weight:700; line-height:1; vertical-align:middle}
.belt-light{border-color:rgba(0,0,0,.3)}
.belt-stripe{position:absolute; left:0; right:0; top:50%; transform:translateY(-50%);
  height:32%; z-index:1}
.belt-tip{position:absolute; right:0; top:0; bottom:0; width:16px; z-index:2}
.belt-ends{position:absolute; top:0; bottom:0; right:12%; display:flex; gap:3px;
  z-index:2}
.belt-ends > span{width:5px}
.beltswatch .belt-ends{gap:2px}
.beltswatch .belt-ends > span{width:3px}
.belt-label{position:relative; z-index:3; padding:5px 11px;
  text-shadow:0 1px 2px rgba(0,0,0,.35)}
.belt-light .belt-label{text-shadow:0 1px 1px rgba(255,255,255,.6)}
.belt-insignia{position:relative; z-index:3; margin:2px 3px 2px 0; padding:1px 6px;
  border:1px solid; border-radius:3px; font-size:.72rem; letter-spacing:.5px;
  background:rgba(0,0,0,.35)}
.belt-none{background:var(--line-2); color:var(--ink-2); padding:4px 11px}
.beltpreview{display:flex; align-items:center; gap:10px; margin:8px 0; flex-wrap:wrap}
.bandrow{display:flex; gap:8px; align-items:flex-end; flex-wrap:wrap}
.beltrow{display:flex; align-items:center; gap:10px; padding:8px 0;
  border-bottom:1px solid var(--line-2); flex-wrap:wrap}
.beltrow .belt{min-width:180px}
.beltgroup{margin-bottom:6px}
.beltgroup summary{font-weight:700; color:var(--brand); padding:8px 0}
.beltrow input[type=color]{width:44px; height:34px; padding:2px; border:1px solid var(--line);
  border-radius:8px; background:#fff}
.swatchrow{display:flex; gap:8px; flex-wrap:wrap}
.themecard{border:2px solid var(--line); border-radius:12px; padding:10px; cursor:pointer;
  background:var(--card); min-width:126px; text-align:left}
.themecard.on{border-color:var(--brand)}
.themebars{display:flex; gap:4px; margin-bottom:7px}
.themebar{height:20px; flex:1; border-radius:4px}
/* A location is a card now, so the shell it used to draw for itself is only
   needed by the two places that still build one by hand. */
.loccard{border:1px solid var(--line); border-radius:12px; padding:13px; margin-bottom:10px;
  background:var(--card)}
.loccard.on{border-color:var(--brand); box-shadow:0 0 0 1px var(--brand)}
/* As a card it already has its own padding and margin. */
section.card.loccard{padding:0}

/* ---- a place's name, wide enough for its name --------------------------
   Squeezed between two checkboxes and a button, this box was narrower than
   the words that go in it. */
/* An award, wherever a result is read. Drawn beside the placings rather than
   among them, because it is a peer of a place and not one of its values: a
   competitor can take 1st and Best Memory on the same day. */
.awardmarks{display:flex; flex-wrap:wrap; gap:4px; margin-top:3px}
.awardmark{display:inline-flex; align-items:center; gap:4px;
  padding:2px 7px; border-radius:999px; font-size:.72rem; font-weight:600;
  color:var(--accent); background:var(--line-2);
  border:1px solid var(--line)}
.awardmark svg{flex:none}
@media print{
  .awardmark{background:#fff !important; color:#000 !important;
    border-color:#999 !important}
}

/* An award list, and the awards in it. Two levels, so the nesting has to be
   visible: the list is a panel, each award a card inside it. */
.awardset{border:1px solid var(--line); border-radius:12px;
  background:var(--line-2); padding:12px; margin-bottom:12px;
  display:flex; flex-direction:column; gap:8px}
.awardlist{display:flex; flex-direction:column; gap:8px}
.awardedit{border:1px solid var(--line); border-radius:10px;
  background:var(--card); padding:10px;
  display:flex; flex-direction:column; gap:8px}
/* A label beside its box rather than above it: the box is what needs the
   room, and a name too short to read is what sent us here. */
.awardedit-name{display:flex; align-items:center; gap:8px}
.awardedit-name .tiny{flex:0 0 auto}
.awardedit-name .input{flex:1 1 auto; min-width:0}

.setuprow.placeedit{flex-wrap:wrap}
.placeedit-name{flex:1 1 220px; min-width:180px}
.placeedit-name .input{width:100%}
/* The draw, drawn. Every line of the first round with the seed on it, the
   corner it is, and whether anybody is standing there — so a preview shows
   the sheet you are about to get rather than a summary of it. */
.drawprev{display:flex; flex-direction:column; gap:8px; margin-top:8px}
.drawprev-pair{border:1px solid var(--line); border-radius:10px;
  background:var(--card); overflow:hidden}
.drawprev-line{display:flex; align-items:center; gap:10px;
  padding:6px 10px; font-size:.86rem}
.drawprev-line + .drawprev-line{border-top:1px solid var(--line-2)}
/* The two corners are told apart by a stripe rather than a fill: a sheet
   read at a ring under bad light needs the difference at a glance, and a
   coloured row behind black text is harder to read, not easier. */
.drawprev-line.white{box-shadow:inset 3px 0 0 var(--line)}
.drawprev-line.red{box-shadow:inset 3px 0 0 var(--bad)}
.drawprev-seed{font-variant-numeric:tabular-nums; font-weight:800;
  min-width:2.2em; text-align:right}
.drawprev-corner{font-size:.72rem; font-weight:700; text-transform:uppercase;
  letter-spacing:.02em; color:var(--ink-2); min-width:4.5em}
.drawprev-line.is-bye{color:var(--ink-2); font-style:italic}
.drawprev-line.is-bye .drawprev-seed{font-weight:400; opacity:.65}
.drawprev-note{padding:4px 10px 6px; font-size:.74rem; color:var(--good);
  background:var(--line-2)}
.seedsize{border-top:1px solid var(--line-2); padding-top:10px;
  margin-top:10px}
.tiny.good{color:var(--good)}
.tiny.warn{color:var(--bad)}

/* One band of a division, on short lines rather than one crowded row.

   Squeezed onto a single row the name box was narrower than the names that
   go in it, and the code box narrower still, so a band could not be read at
   all. Each line names what it holds and the box takes the rest. */
.bandedit{border:1px solid var(--line); border-radius:10px;
  background:var(--card); padding:10px; margin-bottom:8px;
  display:flex; flex-direction:column; gap:8px}
.bandline{display:flex; align-items:center; gap:10px; flex-wrap:wrap}
.bandlabel{flex:0 0 auto; font-size:.76rem; font-weight:700;
  letter-spacing:.02em; text-transform:uppercase; color:var(--ink-2)}
.bandline .input{width:100%}
/* The code is two or three characters, so it does not need the width the
   name does -- but it does need a label saying what it is. */
.bandcode{flex:0 0 auto; width:96px}
.bandline.bandearns{gap:18px}
.bandline.bandearns .check{margin:0}

/* ---- the judges at a ring ----------------------------------------------
   Their order as a strip, then a row each for the name and what that seat
   watches for. The strip is the picture; the rows are the form. */
.judgeblock{padding:10px 0 6px; border-top:1px solid var(--line);
  margin-top:4px}

.judgeorder{display:flex; flex-wrap:wrap; align-items:center; gap:6px;
  margin:6px 0 4px}
/* Sized to the name it holds rather than to a grid: a strip of equal boxes
   stops looking like where people are sitting. */
.judgeorder-box{display:inline-block; padding:5px 11px; border-radius:8px;
  border:1px solid var(--brand); background:var(--brand-l);
  color:var(--brand-d); font-weight:700; font-size:.84rem;
  white-space:nowrap}
.judgeorder-sep{color:var(--ink-2); font-weight:700}

.judgerows{display:flex; flex-direction:column; gap:6px; margin-top:8px}
.judgerow{display:flex; flex-wrap:wrap; align-items:center; gap:8px}
.judgerow-no{flex:none; width:22px; height:22px; border-radius:50%;
  background:var(--line-2); color:var(--ink-2); font-size:.72rem;
  font-weight:800; line-height:22px; text-align:center}
.judgerow-name{flex:1 1 130px; min-width:120px}
.judgerow-duty{flex:2 1 200px; min-width:170px}
.judgerow .input{width:100%}
@media(max-width:520px){
  /* The number keeps its place and the two boxes stack under it. */
  .judgerow-name,.judgerow-duty{flex:1 1 100%}
}
.rulesbar{display:flex; gap:8px; flex-wrap:wrap; align-items:center; margin-bottom:10px}
.quickedit{background:none; border:0; color:var(--brand); cursor:pointer; font:inherit;
  font-size:.78rem; font-weight:700; padding:2px 6px; border-radius:6px}
.quickedit:hover{background:var(--brand-l)}
.emptyslot{color:var(--ink-2); font-style:italic; font-size:.88rem}
.avatar{border-radius:50%; object-fit:cover; flex:none; background:var(--line-2)}
/* The picture on a profile form is the control that sets it. Empty, it says
   so in two lines inside the circle; filled, it is the picture and nothing
   else, because a photograph explains itself. */
.avatarbtn{
  width:64px; height:64px; flex:none; padding:0; cursor:pointer;
  border-radius:50%; border:1.5px dashed var(--line);
  background:var(--line-2); color:var(--ink-2);
  display:flex; align-items:center; justify-content:center;
  font:inherit;
}
.avatarbtn:hover{border-color:var(--brand); color:var(--brand)}
.avatarbtn:focus-visible{outline:2px solid var(--brand); outline-offset:2px}
.avatarbtn.has-photo{border:0; background:none; padding:0}
.avatarbtn-label{
  display:flex; flex-direction:column; align-items:center; line-height:1.15;
  font-size:.7rem; font-weight:700; text-transform:uppercase;
  letter-spacing:.03em;
}

.avatar-initials{
  display:flex; align-items:center; justify-content:center; font-weight:700;
  background:var(--brand); color:#fff;
}
.highlight{
  margin-top:12px; background:#fff8e6; border:1px solid #f0dfae; border-radius:10px;
  padding:9px 12px; font-weight:600; color:#8a6100; text-align:center; font-size:.9rem;
}
.notes{margin-top:6px; color:var(--ink-2); font-size:.9rem; white-space:pre-wrap}
.quickblock{margin-top:14px; padding-top:10px; border-top:1px solid var(--line-2)}
.quickhead{display:flex; align-items:center; justify-content:space-between; gap:8px}
.highlight{margin-top:6px}
textarea.mono{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  font-size:16px; line-height:1.45}
.pagenav{display:flex; justify-content:space-between; gap:10px; margin-top:14px;
  flex-wrap:wrap}
.pagenav .btn{max-width:48%; overflow:hidden; text-overflow:ellipsis}
.helpbox{background:var(--line-2); border-radius:10px; padding:11px 13px; font-size:.84rem}
.helpbox .bullets{margin-bottom:0}
/* A picture and the sentence about it, side by side.
   The row already laid them out that way, but the text column sized itself
   from its content, so on a narrow screen it could take a whole line to
   itself and leave the picture sitting alone above it. A zero basis makes
   the text take whatever is left beside the picture and no more -- one row,
   two columns, at every width. */
.photorow{display:flex; gap:14px; align-items:center; flex-wrap:wrap}
.photorow > :last-child{flex:1 1 0; min-width:0}
.photorow > :last-child p{margin:0}
.tourlogo{width:52px; height:52px; object-fit:contain; border:1px solid var(--line);
  border-radius:10px; background:#fff; padding:4px; flex:none}
.tourlogo.small{width:30px; height:30px; padding:2px; border-radius:7px}
.tourlogo.large{width:84px; height:84px; padding:6px; border-radius:12px}
.tourlogo.placeholder{display:flex; align-items:center; justify-content:center;
  color:var(--ink-2); font-size:.62rem; text-align:center}
.tourbanner{display:flex; align-items:center; gap:14px; background:var(--card);
  border:1px solid var(--line); border-radius:var(--radius); padding:14px 16px;
  margin-bottom:14px; box-shadow:var(--shadow)}
.tourbanner-name{font-weight:700; font-size:1.05rem}
.logo-preview{width:64px; height:64px; object-fit:contain; border:1px solid var(--line);
  border-radius:10px; background:#fff; padding:4px}
.logo-preview.placeholder{display:flex; align-items:center; justify-content:center;
  color:var(--ink-2); font-size:.7rem}

.filterpanel{background:var(--card); border:1px solid var(--line);
  border-radius:var(--radius); padding:12px 16px; margin-bottom:12px;
  box-shadow:var(--shadow)}
.filterpanel>summary{font-weight:700; color:var(--brand); padding:4px 0; cursor:pointer}
.filterrow{padding:9px 0; border-bottom:1px solid var(--line-2)}
.filterrow:last-of-type{border-bottom:0}
.filterrow .field-label{display:block; margin-bottom:6px}
.scopebar{background:var(--brand-l); border-radius:10px; padding:7px 12px;
  margin-bottom:10px; font-size:.84rem}
/* the filter control and what it is showing belong on one line */
.filterbar{display:flex; align-items:center; gap:10px; flex-wrap:wrap;
  background:var(--brand-l); border:1px solid #c9dfe9; border-radius:10px;
  padding:7px 12px; margin-bottom:10px; font-size:.84rem}
html[data-theme=dark] .filterbar{border-color:var(--line)}
.filterbar .grow{flex:1; min-width:0}
.filterbar .btn{padding:5px 10px; font-size:.82rem}
summary.filterbar{cursor:pointer; list-style:none}
summary.filterbar::-webkit-details-marker{display:none}
summary.filterbar::after{content:'\25BE'; color:var(--ink-2); flex:none}
details[open] > summary.filterbar::after{content:'\25B4'}
/* Sub-tabs sit under the main settings tabs: lighter, clearly subordinate. */
.subtabs{display:flex; gap:4px; flex-wrap:wrap; margin:-4px 0 10px}
.subtab{padding:5px 11px; border-radius:999px; font-size:.84rem;
  color:var(--ink-2); text-decoration:none; border:1px solid transparent}
.subtab:hover{background:var(--brand-l); color:var(--brand-d)}
.subtab.on{background:var(--brand); color:#fff; font-weight:700}
html[data-theme=dark] .subtab.on{color:#0b0f14}
.settings-blurb{margin:0 0 14px; max-width:60ch}
@media(max-width:520px){
  .subtabs{gap:3px}
  .subtab{padding:4px 9px; font-size:.8rem}
}

.filterbar .uicon{color:var(--brand); flex:none}
.filterbar select{padding:5px 8px; font-size:16px}
.nextbox{display:flex; align-items:center; gap:12px; flex-wrap:wrap;
  background:var(--brand-l); border:1px solid #c9dfe9; border-radius:12px;
  padding:12px 14px; margin-bottom:12px}
.nextbox>div:nth-child(2){flex:1 1 220px}
.nextbox-tag{font-size:.68rem; font-weight:800; letter-spacing:.09em;
  text-transform:uppercase; color:var(--brand-d); background:#fff;
  border-radius:999px; padding:4px 10px}
.nextbox-name{font-weight:700; font-size:1.02rem}
.banner{
  background:#fff8e6; border:1px solid #f0dfae; border-left:4px solid var(--accent);
  border-radius:10px; padding:11px 14px; margin-bottom:14px; font-size:.9rem;
}
.banner.retired{background:var(--line-2); border-color:var(--line);
  border-left-color:var(--ink-2); color:var(--ink-2)}
.retiredview .card{background:var(--line-2); border-style:dashed}
.retiredview .card.profile .avatar{filter:grayscale(1) opacity(.75)}
.retiredview .belt{filter:grayscale(.65)}
.retiredview .stat, .retiredview .nextbox{background:var(--line-2);
  border-color:var(--line)}
.retiredbar{display:flex; align-items:center; gap:12px; flex-wrap:wrap;
  background:var(--card); border:1px solid var(--line); border-radius:10px;
  padding:9px 13px; margin-bottom:12px}
.banner.warn{background:#fdecea; border-color:#f2c4bf; border-left-color:var(--bad)}
.disclaimer{
  margin-top:22px; font-size:.76rem; color:var(--ink-2); text-align:center;
  line-height:1.5; padding:0 10px;
}

/* ----------------------------------------------------------------- scoring */
.scoreinput{
  width:66px; font:inherit; font-size:16px; text-align:right; padding:7px 8px;
  border:1px solid var(--line); border-radius:8px; min-height:38px;
}
.tiebox{
  background:#fff8e6; border:1px solid #f0dfae; border-radius:10px; padding:11px 13px;
  margin-bottom:9px;
}
.tierow{display:flex; align-items:center; gap:10px; padding:5px 0}
.tieplace{
  font-weight:700; background:var(--brand); color:#fff; border-radius:6px;
  padding:2px 9px; font-size:.8rem;
}

/* ---- a tie that has been settled ---------------------------------------
   A decided tie is no longer a warning, so it stops looking like one. The
   one that has gone stale is, so it does. */
.tiebox.done{background:var(--card); border-color:var(--line)}
.tiebox.stale{background:#fdeceb; border-color:#f0b8b4}
html[data-theme=dark] .tiebox.done{background:var(--card); border-color:var(--line)}
html[data-theme=dark] .tiebox.stale{background:rgba(229,72,77,.14);
  border-color:rgba(229,72,77,.4)}

.tieresult{margin-top:7px}
.tiemethod{font-weight:700; font-size:.9rem}
.tieorder{margin-top:4px}
.tierow.settled{padding:3px 0}
.tienote{margin-top:5px; white-space:pre-wrap}

/* The place a tie-break set, rather than the one the scores worked out.
   Marked, because somebody scanning a sheet should be able to see which
   places were decided in the ring rather than by arithmetic. */
.jplace.settled{border-color:var(--brand); border-style:dashed}

/* ------------------------------------------------------- match scoring */
.corners{display:grid; grid-template-columns:1fr; gap:12px}
@media(min-width:640px){ .corners{grid-template-columns:1fr 1fr} }
.corner{border:2px solid var(--line); border-radius:14px; padding:14px; text-align:center;
  background:var(--card)}
.corner.white{border-color:#c9ced2; background:linear-gradient(180deg,#fff,#f3f5f6)}
.corner.red{border-color:#e0a6a2; background:linear-gradient(180deg,#fff,#fdf1f0)}
.corner.win{box-shadow:0 0 0 3px var(--good) inset}
.corner-tag{display:inline-block; font-size:.7rem; font-weight:800; letter-spacing:.1em;
  text-transform:uppercase; padding:3px 10px; border-radius:999px; margin-bottom:8px}
.corner.white .corner-tag{background:#e9edef; color:#3d4a50}
.corner.red .corner-tag{background:#d6202b; color:#fff}
.corner-score{font-size:3.6rem; font-weight:800; line-height:1; margin:6px 0}
/* The pill on the left, the name in the middle, the way to change it on the
   right -- one row instead of three stacked ones. Two rows a corner, four a
   match: the difference between a match fitting on a phone screen and not,
   which is the one thing a match has to do. */
.corner-head{display:flex; align-items:center; gap:8px; text-align:left}
.corner-head .corner-tag{flex:0 0 auto; margin:0}
.corner-head .corner-name{flex:1 1 auto; min-width:0; text-align:center;
  overflow-wrap:anywhere}
.corner-head > .btn.small{flex:0 0 auto}
.corner-name{font-weight:700; font-size:1rem; min-height:1.2em}
/* Smaller than a button somebody presses all the way through a match.
   Written as a plain rule rather than one scoped to a corner, because it
   was scoped to a direct child of .corner and so did nothing at all for the
   roster buttons a level further in -- which is why they stayed full
   size. */
.btn.small{padding:5px 11px; font-size:.78rem; min-height:30px}
.btn.small .uicon svg{width:14px; height:14px}
.corner > .btn.small{margin-top:2px}
.cornerwin{margin-top:8px; font-weight:800; color:var(--good);
  letter-spacing:.06em}
/* Said once, under the match, on every view that scores one: what the ring
   is playing to and where it stands, on the left; the clock on the right,
   where somebody reading that line can reach it. */
.verdictrow{display:flex; align-items:center; gap:10px; margin-top:8px;
  flex-wrap:wrap}
.verdictsay{flex:1 1 auto; min-width:0; color:var(--ink-2); font-size:.9rem}
.verdictrow.decided .verdictsay{color:var(--ink); font-weight:700}
.verdictrow.warn .verdictsay{color:var(--warn); font-weight:700}
.verdictrow.bye .verdictsay{color:var(--ink-2); font-style:italic}
.verdictrow > .btn{flex:0 0 auto}
/* One row, never two. A corner that wraps its buttons pushes the other
   corner off the screen, and at a ring the whole match has to be in front of
   somebody at once -- so these share the width they have rather than each
   claiming a fixed one. The shares are the buttons' importance: +1 is the
   common press, +3 the one you must not miss, and -1 a correction, kept
   smallest and last so a thumb does not find it by accident. */
.tallybtns{display:flex; gap:6px; justify-content:center; margin-top:10px;
  flex-wrap:nowrap}
.tallybtn.t1{flex:1 0 0}
.tallybtn.t2{flex:1.25 0 0}
.tallybtn.t3{flex:1.5 0 0}
.tallybtn.tminus{flex:.75 0 0}
.tallybtn{width:64px; height:52px; font-size:1.35rem; font-weight:800; border-radius:12px;
  border:1px solid var(--line); background:#fff; color:var(--ink); cursor:pointer}
.tallybtn.plus{background:var(--brand); border-color:var(--brand); color:#fff}
.tallybtn.big{width:96px}
.matchbanner{background:#e6f4ed; border:1px solid #bfe0ce; color:var(--good);
  border-radius:10px; padding:11px 14px; font-weight:700; text-align:center; margin:12px 0}
.teamgrid{display:grid; grid-template-columns:1fr; gap:8px}
@media(min-width:760px){ .teamgrid{grid-template-columns:1fr 1fr} }
.teamrow{display:flex; align-items:center; gap:8px; padding:7px 0;
  border-bottom:1px solid var(--line-2); flex-wrap:wrap}
.teamrow .grow{flex:1 1 120px; min-width:0}
.teamrow .grow{font-weight:600}
.teamrow input.grow{font-weight:400}
.unlinked{border-bottom:1px dotted var(--warn); color:var(--ink-2)}
.teamrow select{max-width:150px}
.teamtotal{font-size:2.2rem; font-weight:800; line-height:1}

/* A team match, scored one bout at a time.
   -------------------------------------------------------------------------
   The row that is lit up is the bout in front of you, and the same position
   is lit on both teams because that is who is facing whom. Everything else
   on the row is kept narrow so the name has the width: the number, the
   running total, two arrows and a small Edit. */
.teamlist{margin-top:10px; text-align:left}
.teamlist .teamrow{flex-wrap:nowrap; gap:7px; padding:6px 7px;
  border:2px solid transparent; border-radius:10px; margin-bottom:2px}
.teamlist .teamrow:not(:last-child){border-bottom-color:transparent}
.teamlist .teamrow[role=button]{cursor:pointer}
.teamname{flex:1 1 auto; min-width:0; font-weight:600;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.teamscore{flex:0 0 auto; font-size:1.15rem; font-variant-numeric:tabular-nums;
  min-width:1.6em; text-align:right}
/* Selected. A border and a lift off the background rather than a colour of
   its own: the box it sits in is already red or white, and a third colour
   in there would be read as meaning something about the competitor. */
.teamlist .teamrow.is-picked{border-color:var(--brand);
  background:rgba(255,255,255,.75)}
html[data-theme=dark] .teamlist .teamrow.is-picked{
  background:rgba(255,255,255,.07)}
/* An arrow the end rows do not get keeps its space, so the column does not
   jump about as rows are reordered. */
.miniicon.is-hidden{visibility:hidden; pointer-events:none}

/* The running order and the two controls that change it, kept together
   at the start of the card. Stacked, because a ring is scored with one
   thumb and two targets side by side at this size are one target. The
   box keeps its width whether it holds two arrows or one, so the names
   beside it do not shift as a row reaches the top or the bottom. */
/* ---- one box for a competitor's name, and what it finds ------------------ */
.namehits{display:flex; flex-direction:column; gap:4px; margin-top:6px}
.namehit{display:flex; align-items:baseline; justify-content:space-between;
  gap:10px; width:100%; text-align:left; padding:10px 12px;
  border:1px solid var(--line); border-radius:10px; background:var(--card);
  color:var(--ink); font:inherit; cursor:pointer}
.namehit:hover{border-color:var(--brand)}
.namehit:focus-visible{outline:2px solid var(--brand); outline-offset:2px}
.namehit-name{font-weight:600; min-width:0; overflow-wrap:anywhere}
.namehit-tag{font-size:.75rem; color:var(--ink-2); text-align:right;
  flex:0 1 auto}
.namepicked{display:flex; align-items:center; justify-content:space-between;
  gap:10px; margin-top:6px; padding:8px 10px 8px 12px; border-radius:10px;
  background:var(--brand-l); color:var(--ink); font-weight:600}
.carrylist{display:flex; flex-direction:column; gap:6px; margin-top:6px}
.entryorder{display:flex; flex-direction:column; gap:2px; flex:0 0 auto;
  margin-right:2px}
.entryorder .miniicon{padding:1px 5px; font-size:.65rem; line-height:1.25}
.teamlist .entryactions{flex:0 0 auto; gap:3px; align-items:center}
.teamlist .entryactions .miniicon{padding:4px 6px}
/* Two of these on one screen rather than one, and a whole team match has
   to be in front of somebody at once -- so a third shorter than a single
   bout's, which is as far as it goes while still being a thing you can hit
   without looking down. */
.tallybtns.compact .tallybtn{height:34px; font-size:1.05rem}
/* A position this team has nobody standing in. Switched off rather than
   left looking live: a button that changes no number reads as the app
   having lost the point. */
.tallybtns.is-off .tallybtn{opacity:.4; cursor:not-allowed}
.tallybtns.is-off .tallybtn.plus{background:var(--ink-2);
  border-color:var(--ink-2)}
.nobody{margin:6px 0 0; text-align:center}
/* Under the tally, and not competing with it for attention. */
.rosterrow{margin-top:8px}
/* Side by side even in a bracket corner, which is half the width of a
   standalone match. Without min-width:0 a flex item will not shrink past
   its own text, so "Fill from a team" pushed itself onto a row of its
   own. */
.rosterrow > .btn{flex:1 1 0; min-width:0; padding-left:8px;
  padding-right:8px}
.entryactions{display:flex; gap:4px}
.miniicon{background:none; border:1px solid var(--line); border-radius:7px; cursor:pointer;
  font-size:.78rem; padding:5px 8px; color:var(--ink-2); font-family:inherit}
.miniicon:hover{background:var(--line-2)}

/* ------------------------------------------------- arranging a page's cards

   The bar sits inside the card, above its own heading, so nothing about
   the card's layout or its folding header changes while the mode is on and
   a card does not jump when the mode is turned off. The dashed outline is
   there to say which cards can move: on a page that also has pinned cards
   at the top, "everything moves" would be a lie. */
.arrangebar{
  background:var(--line-2); border:1px solid var(--line); border-radius:10px;
  padding:12px 14px; margin-bottom:14px;
  display:flex; flex-wrap:wrap; gap:10px;
  align-items:center; justify-content:space-between;
}
.arrangebar p{margin:.25em 0 0}
.card.is-arranging{outline:1px dashed var(--line); outline-offset:3px}
/* The same trick the card's own heading band uses: pull out through the
   card's 16px padding so the row sits flush at the top edge. Without it
   the heading band, which pulls itself up by that 16px, lands on top of
   this one. */
.cardmove{
  display:flex; align-items:center; justify-content:flex-end; gap:10px;
  width:calc(100% + 32px);
  margin:-16px -16px 0; padding:6px 14px;
  background:var(--line-2); border-bottom:1px solid var(--line);
  border-radius:calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0 0;
}
/* With a move row above it the heading band is no longer the top of the
   card, so it stops behaving like it. */
.card.is-arranging > .card-toggle{margin-top:0; border-radius:0}
.cardmove-name{font-size:.78rem; font-weight:650; color:var(--ink-2);
  text-transform:uppercase; letter-spacing:.06em}

/* -------------------------------------------------------------- share/merge */
.pickerblock{border:1px solid var(--line); border-radius:10px; overflow:hidden;
  background:var(--card)}
.pickerhead{display:flex; align-items:center; gap:10px; width:100%; text-align:left;
  background:none; border:0; padding:11px 13px; cursor:pointer; font:inherit;
  color:var(--ink)}
.pickerhead:hover{background:var(--line-2)}
.pickerhead-label{font-weight:700; font-size:.8rem; text-transform:uppercase;
  letter-spacing:.06em; flex:1}
.pickerhead-count{font-size:.8rem; color:var(--ink-2)}
.pickerhead-count.on{color:var(--brand); font-weight:700}
.pickerhead-caret{color:var(--ink-2); font-size:.75rem}
.pickersummary{padding:0 13px 10px; font-size:.82rem; color:var(--ink-2)}
.pickersearch{padding:0 13px 8px}
.pickerblock .linkrow{padding:0 13px 8px; margin-top:0}
.pickerlist{display:flex; gap:6px; flex-wrap:wrap; padding:0 13px 13px;
  max-height:230px; overflow-y:auto; -webkit-overflow-scrolling:touch}
.summary{
  background:var(--line-2); border-radius:10px; padding:10px 12px; font-size:.85rem;
  color:var(--ink-2);
}
.tile-head{display:flex; align-items:center; gap:7px; margin-bottom:4px}
.tile-head .uicon{color:var(--brand); flex:none}
.catchoice{display:flex; align-items:center; gap:10px; width:100%; text-align:left;
  padding:10px 12px; border:1px solid var(--line); border-radius:10px;
  background:var(--card); color:var(--ink); cursor:pointer; font:inherit;
  margin-bottom:6px}
.catchoice .uicon{color:var(--brand); flex:none}
.catchoice.on{border-color:var(--brand); background:var(--brand-l); font-weight:700}
.callrow{display:flex; flex-wrap:wrap; gap:5px; margin-top:4px}
.callchip{display:inline-flex; align-items:center; gap:5px; font:inherit;
  font-size:.76rem; font-weight:700; border:1px solid var(--line);
  background:var(--brand-l); color:var(--ink); border-radius:999px;
  padding:3px 9px; cursor:pointer}
.callchip:hover{border-color:var(--brand)}
/* a ring assignment is a different instruction from a staging window, so it
   is told apart at a glance rather than only by its words */
.callchip.ring{background:var(--good-l,#e7f4ec); border-color:#b7d9c4}
.callchip.ring .uicon{color:#1f7a45}
html[data-theme=dark] .callchip.ring{background:#1b3327; border-color:#2f5c40}
.callchip .uicon{color:var(--brand); opacity:.8}
/* not a time, but where to find one: the host published something the app
   cannot read, and pointing at it beats reporting an absence. Dashed, so it
   never reads as a staging time somebody worked out. */
.callchip.attached{background:var(--card); border-style:dashed;
  font-weight:600; margin-top:8px}
.callchip.attached:hover{border-style:solid}

/* ---- the schedule as the host published it ---- */
.schedrop{border:2px dashed var(--line); border-radius:12px;
  padding:18px 14px; text-align:center; color:var(--ink-2);
  margin-bottom:10px}
.schedrop.over{border-color:var(--brand); background:var(--brand-l)}
.schedrop .uicon{color:var(--brand); opacity:.75}
.schedrop p{margin:6px 0 0}
.docrow{display:flex; align-items:center; gap:9px; width:100%;
  border:1px solid var(--line); border-radius:10px; padding:8px 10px;
  background:var(--card); color:var(--ink); text-align:left;
  font:inherit; margin-bottom:6px}
.docrow .uicon{color:var(--brand); flex:none}
.docrow .grow{min-width:0}
.docrow .grow div{overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.docrow.tappable{cursor:pointer}
.docrow.tappable:hover{border-color:var(--brand)}
.dayrow{display:flex; gap:10px; align-items:baseline; padding:3px 0;
  border-bottom:1px solid var(--line-2)}
.dayrow:last-child{border-bottom:0}
.daywhen{flex:none; min-width:92px; font-variant-numeric:tabular-nums;
  font-size:.8rem}
.dayrow .grow{font-size:.84rem; color:var(--ink-2)}
/* ---- the parts checklist ----
   Categories that open on what differs and fold what matches. The point of
   the indentation is that a person can see the shape of the thing without
   reading it: what they are being asked about sits proud, what they are not
   is one line saying how much of it there is. */
.parts{margin:6px 0 2px}
.partcat{margin-top:10px}
.partcat-head{display:flex; align-items:center; gap:8px; width:100%;
  font:inherit; font-weight:700; text-align:left; cursor:pointer;
  background:none; border:0; border-bottom:1px solid var(--line);
  padding:6px 2px; color:var(--ink)}
.partcat-caret{flex:none; color:var(--ink-2); font-size:.7rem}
.partcat-label{flex:1}
.partcat-count{flex:none; font-size:.74rem; font-weight:600;
  color:var(--ink-2); background:var(--line-2); border-radius:999px;
  padding:2px 8px}
.partcat-count.on{background:var(--brand-l); color:var(--brand)}
.partcat-hint{margin:3px 2px 0}
.partbody{padding:4px 0 2px 10px; border-left:2px solid var(--line-2);
  margin-left:4px}

.partall{display:flex; align-items:center; gap:8px; padding:6px 2px;
  font-size:.82rem; font-weight:600; cursor:pointer}

.partrow{display:flex; align-items:flex-start; gap:9px; padding:7px 2px;
  border-bottom:1px solid var(--line-2); cursor:pointer}
.partrow:last-child{border-bottom:0}
.partrow .grow{min-width:0}
.partrow-label{font-weight:600; font-size:.88rem}
.partrow-sides{display:flex; flex-wrap:wrap; gap:4px 14px; margin-top:3px}
.partside{font-size:.76rem; color:var(--ink-2);
  font-variant-numeric:tabular-nums}
/* Only the side that would change is marked. Colouring both would say
   "these disagree" twice and mean it neither time. */
.partside.other{color:var(--brand); font-weight:600}
.partrow.differs{background:var(--brand-l); border-radius:8px;
  padding-left:6px; padding-right:6px; border-bottom-color:transparent;
  margin-bottom:3px}

.partsame{display:block; width:100%; text-align:left; font:inherit;
  font-size:.78rem; color:var(--ink-2); background:none; border:0;
  padding:7px 2px; cursor:pointer}
.partsame:hover{color:var(--brand)}

/* ---- import review: the school choice ---- */
/* Two sides named by what they are, because "mine" and "theirs" both belong
   to the same person when a backup moves between their own devices. */
.sidepick{display:flex; flex-wrap:wrap; gap:8px; margin:8px 0}
.sidebtn{flex:1 1 220px; text-align:left; font:inherit; cursor:pointer;
  border:2px solid var(--line); border-radius:10px; padding:9px 11px;
  background:var(--card); color:var(--ink)}
.sidebtn:hover{border-color:var(--brand)}
.sidebtn.on{border-color:var(--brand); background:var(--brand-l)}
.sidelabel{display:flex; flex-direction:column; gap:1px}
.sidelabel .tiny{font-size:.74rem}

/* Nothing chosen yet, and nothing will be written until it is. */
.conflict.undecided{border-color:var(--warn,#b7791f); border-width:2px}

/* What this leaves you with, said before anything is written. The record
   counts never mentioned the school, which is the one thing in the file
   that cannot be typed back in afterwards. */
.outcome{border:1px solid var(--line); border-left:4px solid var(--brand);
  border-radius:8px; padding:9px 12px; margin-bottom:10px;
  background:var(--card)}
.outcome.warn{border-left-color:var(--bad,#c0392b)}
.outcome p{margin:3px 0 0; font-size:.86rem; color:var(--ink-2)}

/* the one banner that is not information but an alarm */
.samplebar-alarm{background:var(--bad-l,#fdecea); color:var(--ink);
  border-bottom:2px solid var(--bad,#c0392b); font-weight:600}
.samplebar-alarm button{border-color:var(--bad,#c0392b)}
.schedlist{margin:10px 0}
.schedgroup{margin-bottom:14px}
.schedgroup-head{display:flex; align-items:center; gap:7px; font-weight:800;
  font-size:.82rem; text-transform:uppercase; letter-spacing:.05em;
  color:var(--ink-2); margin-bottom:5px}
.schedgroup-head .uicon{color:var(--brand)}
.schedgroup .tbl{margin:0}
.schedgroup .tbl td{padding:6px 10px; font-size:.86rem}
.schedgroup .tbl th{padding:6px 10px}
.schedbox{border:1px solid var(--line); border-radius:10px; background:var(--card);
  margin:8px 0}
.schedbox-head{padding:9px 12px; cursor:pointer; font-weight:700; font-size:.86rem;
  list-style:none}
.schedbox-head::-webkit-details-marker{display:none}
.schedtext{margin:0; padding:0 12px 12px; font-size:.78rem; white-space:pre-wrap;
  word-break:break-word; color:var(--ink-2); font-family:ui-monospace,monospace}
.photogrid{display:grid; grid-template-columns:repeat(auto-fill,minmax(104px,1fr));
  gap:8px}
.photogrid.small{grid-template-columns:repeat(auto-fill,minmax(78px,1fr))}
.photothumb{position:relative; padding:0; border:1px solid var(--line);
  border-radius:10px; overflow:hidden; background:var(--line-2); cursor:pointer;
  width:100%; aspect-ratio:1; display:block}
.photothumb img{width:100%; height:100%; object-fit:cover; display:block}
.photothumb:hover{border-color:var(--brand)}

/* ---- picking several at once --------------------------------------------
   The mark sits on the tile rather than beside it. At this size a checkbox
   in its own column is most of the picture, and a row of them reads as a
   form rather than as a set of photographs. */
.photothumb.picked,.clipcard.picked{border-color:var(--brand);
  box-shadow:inset 0 0 0 3px var(--brand)}
.pickmark{position:absolute; top:6px; left:6px; z-index:4;
  width:22px; height:22px; border-radius:50%; box-sizing:border-box;
  border:2px solid #fff; background:rgba(0,0,0,.42); color:#fff;
  font-size:.78rem; font-weight:800; line-height:18px; text-align:center;
  pointer-events:none}
.picked>.pickmark,.picked .pickmark{background:var(--brand);
  border-color:#fff}
.clipcard{position:relative}

/* The bar that appears while picking. Sticky, because the thing somebody is
   about to do to forty photographs should not be scrolled off the screen by
   the forty photographs. */
/* It sticks below the banner and below the page's own header, not at the top
   of the window: at top:0 it slid underneath the banner, and at z-index 32 --
   above the banner's 30 -- the part that showed was drawn over it. */
.pickbar{position:sticky;
  top:calc(var(--appbar-h,56px) + var(--pagehead-h,0px));
  z-index:26; margin:-2px 0 10px;
  padding:9px 11px; border:1px solid var(--brand); border-radius:10px;
  background:var(--card); display:flex; flex-wrap:wrap; gap:8px;
  align-items:center}
.pickbar .pickcount{font-weight:800}
.pickbar .linkrow{margin:0}
@media(max-width:520px){
  .pickbar{padding:8px 9px}
}
.photothumb-cap{position:absolute; left:0; right:0; bottom:0; padding:4px 6px;
  font-size:.7rem; line-height:1.2; color:#fff; text-align:left;
  background:linear-gradient(transparent,rgba(0,0,0,.72)); overflow:hidden;
  text-overflow:ellipsis; white-space:nowrap}
.photostrip{display:flex; gap:8px; overflow-x:auto; padding-bottom:4px}
.photostrip .photothumb{flex:none; width:96px; height:96px}
.photoview-stage{background:var(--line-2); border-radius:10px; overflow:hidden;
  display:flex; align-items:center; justify-content:center; min-height:180px}
.photoview-stage img{max-width:100%; max-height:56vh; display:block}
.photoview-nav{display:flex; align-items:center; justify-content:space-between;
  gap:10px; margin-top:10px}
.tagchip{display:inline-flex; align-items:center; gap:5px; border:1px solid var(--line);
  background:var(--field); border-radius:999px; padding:4px 10px; font-size:.78rem;
  color:var(--ink); cursor:pointer; font:inherit}
.tagchip.on{border-color:var(--brand); background:var(--brand-l); font-weight:700}
.tagchip .uicon{opacity:.75}
.tagrow{display:flex; flex-wrap:wrap; gap:6px}
.media-loading{background:var(--line-2); min-width:24px; min-height:24px}
.media-missing{background:var(--line-2); opacity:.5}
.setuprow{display:flex; align-items:center; gap:11px; padding:10px 12px;
  border:1px solid var(--line); border-radius:10px; margin-bottom:6px;
  background:var(--card); color:var(--ink)}
a.setuprow:hover{border-color:var(--brand)}
.setuprow .uicon{color:var(--brand); flex:none}
.setuprow.done{opacity:.6}
.setuprow.done .uicon{color:#1f7a45}
.setuprow.done strong{text-decoration:line-through}
.setupbar{display:flex; gap:6px; margin-bottom:14px}
.setupdot{flex:1; height:4px; border-radius:999px; background:var(--line-2)}
.setupdot.on{background:var(--brand)}
.setupdot.past{background:var(--brand); opacity:.45}
.taskgrid{display:grid; gap:10px; margin-bottom:16px}
.taskcard{display:flex; align-items:center; gap:14px; padding:16px 18px;
  background:var(--card); border:1px solid var(--line); border-radius:var(--radius);
  box-shadow:var(--shadow); color:var(--ink);
  transition:transform .12s ease, box-shadow .12s ease, border-color .12s ease}
.taskcard:hover{border-color:var(--brand); box-shadow:0 3px 14px rgba(20,50,65,.16)}
.taskcard:active{transform:scale(.99)}
.taskcard-text{flex:1; min-width:0}
.taskcard-title{font-weight:700; margin-bottom:2px}
.taskcard-sub{font-size:.82rem; color:var(--ink-2)}
.taskcard > .uicon:first-child{color:var(--brand); flex:none}
/* The picture is what somebody aims at on a grid of tiles, so it is given
   room rather than set beside the title like a bullet. */
.taskcard{gap:16px}
.taskcard > .uicon:first-child{width:30px; height:30px}
.taskcard > .uicon:last-child{color:var(--ink-2)}
.sheetpick{display:flex; align-items:flex-start; gap:10px; padding:8px 0;
  border-bottom:1px solid var(--line-2); cursor:pointer}
.sheetpick .grow{flex:1}
.matchrow{border:1px solid var(--line); border-radius:10px; padding:11px 13px;
  margin-bottom:9px; background:var(--card)}
.matchrow-head{display:flex; align-items:flex-start; justify-content:space-between;
  gap:10px; margin-bottom:8px; flex-wrap:wrap}
.matchrow-body{display:flex; flex-direction:column; gap:5px}
/* The closed row's one job: name, whether a result is in, and whether they
   are competing. Everything else is behind the caret. */
.attendname{flex:0 0 auto; font-weight:600}
.attendstate{
  flex:0 0 auto; font-size:.78rem; font-weight:700;
  text-transform:uppercase; letter-spacing:.04em; white-space:nowrap;
}
.attendstate.here{color:var(--brand)}
.attendstate.notset{color:var(--ink-2); font-weight:600; text-transform:none;
  letter-spacing:0}
.attendstate.away{color:var(--ink-2); opacity:.7}
.attendtools{display:flex; gap:8px; align-items:center; flex-wrap:wrap;
  margin-top:10px}
.attendtools .input{flex:1 1 160px; min-width:0}
@media (max-width:480px){
  .foldhead .attendname{flex:1 1 100%}
}

.attendrow{display:flex; align-items:center; gap:10px; padding:8px 0;
  border-bottom:1px solid var(--line-2); flex-wrap:wrap}
.attendrow .grow{flex:1 1 160px}

/* ---- the four answers to "are they competing" --------------------------
   One box across the full width holding four figures, rather than four
   boxes: they are one question with four answers, and four separate boxes
   read as four unrelated counts. Each figure is its own button, so the
   divider between them is what says they can be pressed apart.

   Four across on anything with room, two by two on a phone -- four columns
   at 360px gives each label about forty pixels, which is not a label.
   ----------------------------------------------------------------------- */
.attendtotals{display:grid; grid-template-columns:repeat(4, 1fr);
  padding:0; overflow:hidden; margin-bottom:10px}
.attendtotal{
  display:flex; flex-direction:column; align-items:center; justify-content:flex-start;
  gap:2px; padding:10px 6px; background:none; border:0; cursor:pointer;
  font:inherit; color:inherit; text-align:center; min-width:0;
  border-left:1px solid var(--line);
}
.attendtotal:first-child{border-left:0}
.attendtotal:hover{background:rgba(255,255,255,.45)}
.attendtotal:active{background:rgba(255,255,255,.7)}
html[data-theme=dark] .attendtotal:hover{background:rgba(255,255,255,.06)}
html[data-theme=dark] .attendtotal:active{background:rgba(255,255,255,.1)}
.attendtotal-value{font-size:1.35rem; font-weight:700; line-height:1.1}
.attendtotal-label{font-size:.68rem; text-transform:uppercase;
  letter-spacing:.05em; color:var(--ink-2); line-height:1.25}
@media (max-width:520px){
  .attendtotals{grid-template-columns:repeat(2, 1fr)}
  /* With two per row the left edge of the third and fourth is the start of
     a row, not a divider, and the line between the rows is what separates
     them. */
  .attendtotal:nth-child(odd){border-left:0}
  .attendtotal:nth-child(n+3){border-top:1px solid var(--line)}
}

/* A whole stat box that can be pressed. Same box, same figure; the only
   difference is that it answers. */
.stat-press{
  display:block; width:100%; text-align:left; font:inherit; color:inherit;
  cursor:pointer;
  transition:transform .12s ease, box-shadow .12s ease;
}
.stat-press:hover{box-shadow:0 3px 12px rgba(20,50,65,.16)}
.stat-press:active{transform:scale(.985)}

/* ---- the list behind a pressed figure ---------------------------------
   Names and nothing else. Rows big enough to hit with a thumb, since the
   whole point is getting to somebody's page.
   ----------------------------------------------------------------------- */
.namelist{display:flex; flex-direction:column}
.namelist-row{
  display:flex; align-items:center; gap:10px; padding:11px 2px;
  border-bottom:1px solid var(--line-2); color:var(--brand);
  font-weight:600; min-height:44px;
}
.namelist-row:last-child{border-bottom:0}
.namelist-row:hover{background:var(--line-2)}
.namelist-row .grow{flex:1 1 auto; min-width:0}
.conflict{border:1px solid #f0d6ac; background:#fffdf7; border-radius:10px;
  padding:12px; margin-bottom:10px}
.conflict-head{display:flex; justify-content:space-between; align-items:baseline;
  margin-bottom:8px}
.logrow{display:flex; justify-content:space-between; align-items:center; gap:10px;
  padding:9px 0; border-bottom:1px solid var(--line-2); flex-wrap:wrap}
.catpick{display:flex; flex-wrap:wrap; gap:7px}
.catchip{display:inline-flex; align-items:center; gap:6px; border:1px solid var(--line);
  background:var(--field); color:var(--ink); border-radius:999px; padding:7px 13px;
  cursor:pointer; font:inherit; font-size:.85rem}
.catchip.on{border-color:var(--brand); background:var(--brand-l); font-weight:700}
.catchip 
.catrow{border:1px solid var(--line); border-radius:10px; margin-bottom:8px;
  background:var(--card)}
.catrow-head{display:flex; align-items:center; gap:11px; padding:11px 13px;
  cursor:pointer; list-style:none}
.catrow-head::-webkit-details-marker{display:none}
.catrow-head .grow{flex:1; min-width:0}
.catrow-body{padding:0 13px 12px}
.bar{height:8px; border-radius:999px; background:var(--line-2); overflow:hidden;
  margin-bottom:10px}
.bar-fill{height:100%; background:var(--brand); border-radius:999px}
.catitem{border:1px solid var(--line); border-radius:11px; margin-bottom:9px;
  background:var(--card)}
.catitem-head{display:flex; align-items:center; gap:10px; padding:11px 13px;
  cursor:pointer; list-style:none}
.catitem-head::-webkit-details-marker{display:none}
.catitem-head .grow{flex:1; min-width:0}
.catitem-body{padding:0 13px 13px; border-top:1px solid var(--line-2)}
.catrow{display:flex; gap:11px; align-items:center; padding:9px 0;
  border-bottom:1px solid var(--line-2); flex-wrap:wrap}
.catrow>div{flex:1 1 200px}

/* ------------------------------------------------------------------ modals */
.overlay{
  position:fixed; inset:0; background:rgba(15,40,52,.5); z-index:60;
  display:flex; align-items:flex-end; justify-content:center;
  padding:0 var(--safe-r) 0 var(--safe-l);
}
@media(min-width:700px){ .overlay{align-items:center; padding:24px} }
.modal{
  background:#fff; width:100%; max-width:680px; max-height:92vh;
  border-radius:16px 16px 0 0; display:flex; flex-direction:column; overflow:hidden;
}
@media(min-width:700px){ .modal{border-radius:16px} }
.modal-head{
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  padding:14px 16px; border-bottom:1px solid var(--line);
}
.modal-head h2{margin:0; font-size:1.05rem}
.modal-body{padding:16px; overflow-y:auto; -webkit-overflow-scrolling:touch}
.modal-foot{
  display:flex; gap:8px; justify-content:flex-end; padding:12px 16px;
  border-top:1px solid var(--line); flex-wrap:wrap;
  padding-bottom:calc(12px + var(--safe-b));
  padding-left:calc(16px + var(--safe-l));
  padding-right:calc(16px + var(--safe-r));
}
.sheetmenu{display:flex; flex-direction:column; gap:2px}
.sheetitem{
  text-align:left; background:none; border:0; border-bottom:1px solid var(--line-2);
  padding:15px 4px; font:inherit; font-size:1rem; cursor:pointer; color:var(--ink);
}
.sheetitem:last-child{border-bottom:0}

/* Every menu of actions, which used to be only the + button's.
   Undivided rows read as one list to scan; boxes read as things to choose
   between, which is what a menu of actions holds. Still scoped to .boxed
   because the same .sheetmenu carries the roster picker, and a school of
   forty in this treatment would be a page of boxes -- a list of people is
   a list, however it is reached.

   The wash a fillable box gets, for the same reason: a row somebody is
   meant to press should not be the same colour as the sheet behind it. */
.sheetmenu.boxed{gap:7px}
.sheetmenu.boxed .sheetitem{
  border:1px solid var(--line); border-bottom:1px solid var(--line);
  border-radius:11px; padding:12px 13px; background:var(--fieldbg);
}
.sheetmenu.boxed .sheetitem:active{background:var(--line-2)}
.sheetmenu.boxed .sheetitem.hasicon{gap:14px; align-items:center}
.sheetmenu.boxed .sheetitem.hasicon .uicon{margin-top:0; color:var(--brand)}
@media (max-width:400px){
  .sheetmenu.boxed .sheetitem{padding:11px}
  .sheetmenu.boxed .sheetitem.hasicon{gap:11px}
}

/* The running order of each ring, as boxes sized to the names with hyphens
   between them -- the same shape the judges' order strip uses, because it is
   the same kind of fact. */
.ringorder{display:flex; align-items:baseline; gap:10px; flex-wrap:wrap;
  padding:7px 0; border-bottom:1px solid var(--line-2)}
.ringorder:last-of-type{border-bottom:0}
.ringorder-name{font-size:.75rem; font-weight:700; color:var(--ink-2);
  text-transform:uppercase; letter-spacing:.05em; flex:none; min-width:11em}
.ringorder-list{display:flex; align-items:center; gap:6px; flex-wrap:wrap; flex:1}
.ringorder-box{
  border:1px solid var(--line); border-radius:8px; padding:3px 9px;
  background:var(--card); font-size:.85rem; white-space:nowrap;
}
.ringorder-sep{color:var(--ink-2)}
@media(max-width:560px){
  .ringorder{flex-direction:column; gap:4px}
  .ringorder-name{min-width:0}
}

/* Your own competitors, at the top of the home page. One row each, so two
   children fit above the fold on a phone and twelve still read as a list
   rather than a wall. */
.minecards{display:flex; flex-direction:column; gap:8px; margin:14px 0 4px}
.minecard{
  display:flex; align-items:center; gap:12px; text-decoration:none;
  background:var(--card); border:1px solid var(--line); border-radius:12px;
  padding:10px 13px; color:var(--ink); min-height:62px;
}
.minecard:hover{border-color:var(--brand)}
.minecard-text{display:flex; flex-direction:column; gap:2px; flex:1; min-width:0}
.minecard-name{font-size:1rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.minecard .medaltally{flex:none}
.minecard .avatar{flex:none}
@media(max-width:400px){
  .minecard{gap:9px; padding:9px 11px}
  .minecard-name{font-size:.95rem}
}

/* --------------------------------------------------------------------- fab */
.fab{
  position:fixed; right:calc(16px + var(--safe-r));
  bottom:calc(70px + var(--safe-b)); z-index:40;
  width:56px; height:56px; border-radius:50%; border:0; background:var(--accent);
  color:#fff; font-size:1.9rem; line-height:1; cursor:pointer;
  box-shadow:0 4px 16px rgba(20,50,65,.28);
  /* the mark is an SVG rather than a text character, so it needs centering
     explicitly — a button's default text alignment does not center a child
     element the way it centers a glyph */
  display:flex; align-items:center; justify-content:center; padding:0;
}
@media(min-width:820px){ .fab{bottom:24px} }

/* ------------------------------------------------------------------ tabbar */
.tabbar{
  position:fixed; left:0; right:0; bottom:0; z-index:35; display:flex;
  background:#fff; border-top:1px solid var(--line);
  padding-bottom:var(--safe-b);
  padding-left:var(--safe-l); padding-right:var(--safe-r);
}
.tabbar a{
  flex:1; text-align:center; padding:10px 2px; font-size:.72rem; color:var(--ink-2);
  font-weight:600;
}
.tabbar a.active{color:var(--brand)}
@media(min-width:820px){ .tabbar{display:none} }

/* ------------------------------------------------------------------- misc */
.muted{color:var(--ink-2)}
.tiny{font-size:.78rem}
.tiny.warn{color:var(--warn)}
.bullets{margin:0 0 .8em; padding-left:20px}
.bullets li{margin-bottom:.3em}
.bullets li.pass{color:var(--good); list-style:none}
.bullets li.fail{color:var(--bad); list-style:none; font-weight:600}
.prose h3{margin-top:1.2em; color:var(--brand)}
.prose .tablewrap{margin:.6em 0 1.1em}
details{margin-bottom:10px}
summary{cursor:pointer; font-weight:600; padding:6px 0}
.toast{
  position:fixed;
  left:calc(50% + (var(--safe-l) - var(--safe-r)) / 2);
  transform:translateX(-50%) translateY(20px);
  bottom:calc(80px + var(--safe-b)); background:var(--ink); color:#fff;
  padding:11px 18px; border-radius:10px; font-size:.88rem; z-index:80;
  opacity:0; pointer-events:none; transition:opacity .2s, transform .2s; max-width:90vw;
}
.toast.show{opacity:1; transform:translateX(-50%) translateY(0)}

/* ---------------------------------------------------------------------------
   Dark mode.

   The palette itself is set from JavaScript so a custom color scheme still
   looks like itself in the dark. What lives here is everything that cannot be
   expressed as a variable: native form controls, and the handful of places
   that were hard-coded white.

   color-scheme is what stops iOS painting dropdowns with its own dark palette
   while our CSS writes dark text on them — the blacked-out boxes.
   --------------------------------------------------------------------------- */
html{color-scheme:light}
html[data-theme=dark]{color-scheme:dark}

/* Form controls follow the theme rather than the operating system -- and
   carry a wash of it, so a box somebody is meant to fill in looks different
   from the card it sits on before a single word is read. White boxes on a
   white card were invisible until you looked for the border.

   One variable does all of them, which is the point: every route into this
   app's data entry goes through these selectors, so nothing can be left
   behind looking like the old flat white. */
.input, .scoreinput, select, textarea, input[type=text], input[type=number],
input[type=date], input[type=search], input[type=email], input[type=tel],
input[type=url]{
  background:var(--fieldbg); color:var(--ink); border-color:var(--line);
}
select{color-scheme:inherit}
/* The open dropdown panel is drawn by the operating system over whatever
   is behind it, so it needs an opaque color rather than a wash. */
select option{background:var(--field); color:var(--ink)}
input[type=checkbox], input[type=radio]{accent-color:var(--brand)}
/* A color swatch shows a color. Tinting the box around it would be a
   second color nobody chose. */
input[type=color]{background:var(--field); border-color:var(--line)}

/* ---- date and time boxes, which do not behave like the others ----------
   Safari on iOS draws these as its own control and gives it an intrinsic
   width it will not go below. width:100% is not enough on its own: the
   control keeps its own idea of how wide it needs to be, and in a
   two-column grid it grows past its column and over the field beside it.
   Start and End on the tournament form is where this shows.

   Resetting the appearance is what makes it size like a box rather than
   like a widget; min-width:0 is what lets a grid column actually shrink
   it. Neither is visible on a desktop browser, which draws these
   differently and was never the one getting it wrong.
   ----------------------------------------------------------------------- */
input[type=date], input[type=time], input[type=datetime-local],
input[type=month], input[type=week]{
  -webkit-appearance:none; appearance:none;
  min-width:0; width:100%; max-width:100%;
  /* iOS centres the text inside its own control; everything else in this
     app reads from the left. */
  text-align:left;
}
/* No special stacking rule for a pair holding a date. There was one here
   that stacked them below 430px, which is every iPhone made -- a row spent
   on every tournament form, permanently, to work around something that
   should not happen once the column is allowed to shrink. If it turns out
   the appearance reset and minmax(0,1fr) are not enough on a real phone,
   this is where the stack goes back. */
::placeholder{color:var(--ink-2); opacity:.75}

html[data-theme=dark] .btn.ghost,
html[data-theme=dark] .chip,
html[data-theme=dark] .tab,
html[data-theme=dark] .segbtn,
html[data-theme=dark] .tallybtn,
html[data-theme=dark] .miniicon,
html[data-theme=dark] .themecard{
  background:var(--field); color:var(--ink); border-color:var(--line);
}
html[data-theme=dark] .chip.on,
html[data-theme=dark] .tab.on,
html[data-theme=dark] .segbtn.on,
html[data-theme=dark] .tallybtn.plus{
  background:var(--brand); border-color:var(--brand); color:#0d161b;
}
/* --head-bg is a solid color in the dark, so the heading row takes it
   outright rather than as a layer over the card. */
html[data-theme=dark] .tbl th{background:var(--head-bg); background-image:none}
html[data-theme=dark] .modal,
html[data-theme=dark] .sheetitem,
html[data-theme=dark] .tabbar,
html[data-theme=dark] .pickerblock,
html[data-theme=dark] .loccard,
html[data-theme=dark] .matchrow,
html[data-theme=dark] .lifeseason,
html[data-theme=dark] .corner{background:var(--card); color:var(--ink)}
html[data-theme=dark] .corner.white{
  background:linear-gradient(180deg,#243138,#1c272d); border-color:#3a4a53;
}
html[data-theme=dark] .corner.red{
  background:linear-gradient(180deg,#2e2224,#241a1c); border-color:#5b3a3d;
}
html[data-theme=dark] .corner.white .corner-tag{background:#33444d; color:#dfe8ed}
/* logos are supplied by the user and usually assume a light backing */
html[data-theme=dark] .hero-logo,
html[data-theme=dark] .logo-preview,
html[data-theme=dark] .tourlogo{background:#f4f6f7}
html[data-theme=dark] .highlight,
html[data-theme=dark] .banner,
html[data-theme=dark] .tiebox,
html[data-theme=dark] .conflict{
  background:#2b2519; border-color:#4d4224; color:#f1e2b4;
}
html[data-theme=dark] .banner.warn{background:#32211f; border-color:#5c3430; color:#f3c9c2}
html[data-theme=dark] .banner.retired{background:var(--line-2);
  border-color:var(--line); color:var(--ink-2)}
html[data-theme=dark] .tbl tr.mine{background:#2b2519}
html[data-theme=dark] .tbl tbody tr:hover{background:var(--line-2)}
html[data-theme=dark] .btn.danger{background:#2e1e1d; border-color:#5f3330; color:#f0a9a2}
html[data-theme=dark] .retiredview .card{background:var(--line-2)}
html[data-theme=dark] .codepreview{background:var(--brand-l); border-color:var(--line)}
html[data-theme=dark] .codepreview.warn{background:#32271a; border-color:#5c4a28;
  color:#f0d9a8}
html[data-theme=dark] .helpbox, html[data-theme=dark] .summary,
html[data-theme=dark] .scopebar, html[data-theme=dark] .seasonbar{
  background:var(--line-2);
}
html[data-theme=dark] .seasonbar select{background:var(--card); color:var(--ink)}
html[data-theme=dark] .statlink:hover .stat{box-shadow:0 3px 12px rgba(0,0,0,.45)}
html[data-theme=dark] .toast{background:#e9eff2; color:#17242b}


/* ---------------------------------------------------------------------------
   Print.

   What is on screen is what prints, so there is no separate report to keep in
   step. Controls, navigation and anything interactive drop away; folded cards
   open, because folding is for reading rather than for excluding content.
   Saving as PDF is the same path — every print dialog offers it.
   --------------------------------------------------------------------------- */
.printstamp{display:none}

@media print{
  @page{ margin:14mm 12mm; }

  /* the staging list is the one thing anybody would carry to a venue on
     paper, so it must not break across a page mid-division */
  .schedgroup{break-inside:avoid; page-break-inside:avoid}
  .schedbox{display:none}

  html, body{
    background:#fff !important; color:#000 !important;
    font-size:10.5pt; -webkit-print-color-adjust:exact; print-color-adjust:exact;
  }
  html[data-theme=dark]{ color-scheme:light; }

  /* anything you cannot use on paper
     ------------------------------------------------------------------
     `button` was in this list, and it cost more than it saved.

     A button is a control on screen. In this app some buttons are also
     the content: the event name in a standings table is a
     button.countlink, so the name could be tapped to open the list
     behind it, and a rule hiding every button printed that column
     blank. The same rule took the clickable stat tiles (statBox returns
     a button when it is given an onClick and a div when it is not, so
     printouts lost exactly the tiles worth reading), the attendance
     total, the division and season chips, the title badge, and the
     attached documents -- a document you can open is a button and a
     document whose file is missing is a div, so a printed page listed
     only the ones that no longer work.

     Worst of it: card() builds its header as a button so the card can
     fold, with the h2.card-title inside. So no card on any printed page
     has had a heading, and the .card-title rule further down this block
     has never once applied.

     The default is now the other way around: a button prints, and the
     controls below say so by name. That is the right way round because
     of how the two failures read. A control that prints is a stray word
     on paper. A name that does not print is a blank where the data was,
     and nobody reading the printout can tell it was ever there. */
  .splash,
  .appbar, .tabbar, .fab, .toast, .overlay, .collapsebar, .pagenav,
  .card-caret, .seasonbar, .retiredbar, .filterpanel, .pickerblock,
  .tabs, .seg, .linkrow, .entryactions, .quickedit, .miniicon, .tallybtns,
  .scoreinput, select, input, textarea, .btn,
  /* Buttons that are only ever a control, now that buttons print. Each of
     these is a thing you press, carrying no reading of its own: the video
     recorder's controls, the scoring keypad, a close box, the pickers for
     theme and weapon, the share sheet's own menu. */
  .filmstart, .filmstop, .filmexit, .padkey, .padbox, .zoomclose,
  .starbtn, .sheetitem, .partsame, .pickerhead, .weaponbtn, .themecard,
  .segbtn, .plus,
  /* Arranging is a thing you do on screen. Printing while it is on should
     give the page, in the order it was arranged into, and nothing about
     the arranging. */
  .arrangebar, .cardmove{
    display:none !important;
  }
  .card.is-arranging{outline:none}
  /* the value of a form control still needs to print */
  .print-value{ display:inline !important; }

  /* What is left of a button on paper.
     ------------------------------------------------------------------
     Only the parts that mean "this is pressable" come off. Geometry and
     the button's own class are left alone on purpose: .card-toggle is
     the flex row that lays out a card heading, and .stat-press has to
     come out looking like the .stat tile beside it rather than like a
     different kind of thing, which is what stripping its padding and
     background would have made it. */
  button{
    cursor:default !important;
    -webkit-appearance:none !important; appearance:none !important;
  }
  /* The ones dressed as hyperlinks. On paper there is nothing to click,
     so the underline is a promise the page cannot keep. */
  .countlink{
    color:#000 !important; text-decoration:none !important;
  }

  /* One section on its own.
     ------------------------------------------------------------------
     A coach printing the registration for one tournament does not want
     the results, the score sheets and the expenses behind it. The chosen
     card is marked and the rest of them go; everything that is not a
     card stays, which is what keeps the tournament or competitor it
     belongs to at the top of the page.

     The second rule is what lets a card hold cards: hiding by
     :not(.print-this) would otherwise take the chosen section's own
     children with it. Same specificity as the rule above, written after
     it, so it wins where both apply. */
  html.printing-one .card:not(.print-this){ display:none !important; }
  html.printing-one .print-this .card{ display:block !important; }

  .view{ padding:0 !important; max-width:100% !important; }

  /* On paper nothing scrolls, so nothing sticks -- and the condensed shape
     the header may have been left in when Print was pressed would otherwise
     print a page whose subtitle had been thrown away. */
  .pagehead, .pagehead.pins, .pickbar{
    position:static !important; box-shadow:none !important;
    border-bottom:0 !important; margin-left:0 !important;
    margin-right:0 !important; padding-left:0 !important;
    padding-right:0 !important;
  }
  .pagehead.is-stuck .pagetitle p{ display:block !important; }
  .pagehead.is-rolling{ height:auto !important; overflow:visible !important; }
  .pagehead.is-rolling h1{ transform:none !important; }
  .pagehead.is-rolling .pagehead-actions, .pagehead.is-rolling .pagetitle p,
  .pagehead.is-rolling .tournav{ opacity:1 !important; }
  .pagehead.is-stuck h1{
    font-size:1.55rem !important; white-space:normal !important;
  }
  .pagehead-mark{ display:none !important; }
  .card{
    box-shadow:none !important; border:1px solid #ccc !important;
    background:#fff !important; break-inside:avoid; page-break-inside:avoid;
    margin-bottom:8mm;
  }
  .card-body.is-folded{ display:block !important; }
  .card-toggle[aria-expanded="false"]{ margin-bottom:14px !important; }
  .moreopts-body.is-folded{ display:flex !important; }
  .card-toggle{ cursor:default; }
  .card-title{ color:#000 !important; font-size:12pt; }

  .hero{ background:#fff !important; color:#000 !important; border:1px solid #ccc; }
  .hero-title, .hero-sub, .stat-value, .stat-label, .stat-sub{ color:#000 !important; }
  .statsection-title{ color:#000 !important; }

  .tbl{ width:100%; border-collapse:collapse; }
  .tbl th, .tbl td{ border:1px solid #ccc !important; padding:4pt 6pt !important; }
  .tbl th{ background:#f0f0f0 !important; color:#000 !important; }
  .tbl tbody tr{ break-inside:avoid; page-break-inside:avoid; }

  a{ color:#000 !important; text-decoration:none; }
  /* a printed link is useless without its address */
  .prose a[href^="http"]::after{ content:" (" attr(href) ")"; font-size:8.5pt; }

  .printstamp{
    display:block; border-bottom:1px solid #999; padding-bottom:3mm;
    margin-bottom:5mm; font-size:9pt; color:#333;
  }
  .disclaimer{ font-size:8.5pt; color:#444 !important; }
  .belt, .pill, .medalcount, .tabbar a{display:flex; flex-direction:column; align-items:center; gap:3px}





/* the glyph is a companion to the label, so it sits back a little */







.btn.hasicon:hover .tabbar a{display:flex; flex-direction:column; align-items:center; gap:3px}














.starbtn:hover{color:var(--ink)}

html[data-theme=dark] .starbtn.on{color:#F2B705}

.weaponchip{ break-inside:avoid; }
  h1{ font-size:15pt; margin-bottom:2mm; }
  h2, h3{ break-after:avoid; page-break-after:avoid; }
}

/* A compact tally inside a team row. The big .tallybtn used on an individual
   match would not fit six of them on a phone, so this is a smaller variant. */
.teamrow .tally{display:flex; gap:3px; margin-top:3px}
.teamrow .tallybtn{width:auto; height:auto; padding:2px 8px; font-size:.78rem;
  font-weight:700; border-radius:7px; border:1px solid var(--line);
  background:var(--card); color:var(--ink); cursor:pointer}
.teamrow .tallybtn:hover{border-color:var(--brand); color:var(--brand)}
.teamrow .tallybtn.minus{color:var(--ink-2)}

/* ---- bracket view ------------------------------------------------------
   A draw is a shape, and easier to read as one. Columns are rounds; each
   match sits in its round and connects visually to the next.
   ----------------------------------------------------------------------- */
.bracketview{display:flex; gap:18px; align-items:flex-start; overflow-x:auto;
  padding:4px 2px 10px}
.bvcol{flex:0 0 auto; min-width:190px}
.bvcol-head{font-weight:800; font-size:.78rem; text-transform:uppercase;
  letter-spacing:.05em; color:var(--ink-2); margin-bottom:8px;
  padding-bottom:4px; border-bottom:2px solid var(--line)}
.bvcol-body{display:flex; flex-direction:column; gap:14px;
  justify-content:space-around; height:100%}
.bvmatch{border:1px solid var(--line); border-radius:10px; overflow:hidden;
  background:var(--card)}
.bvmatch.tappable{cursor:pointer}
.bvmatch.tappable:hover{border-color:var(--brand); box-shadow:0 0 0 2px var(--brand-l)}
.bvmatch.bye{opacity:.75; border-style:dashed}
.bvmatch-head{display:flex; justify-content:space-between; align-items:center;
  gap:6px; padding:3px 8px; background:var(--bg-2); font-size:.7rem;
  font-weight:700; color:var(--ink-2); text-transform:uppercase;
  letter-spacing:.04em}
.bvside{display:flex; align-items:center; gap:8px; padding:7px 9px;
  border-top:1px solid var(--line); font-size:.86rem}
.bvside:first-of-type{border-top:0}
.bvside .bvname{flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis;
  white-space:nowrap}
.bvside .bvscore{font-weight:800; font-variant-numeric:tabular-nums}
.bvside.white{border-left:4px solid #cbd5e1}
.bvside.red{border-left:4px solid var(--danger,#c0392b)}
.bvside.won{background:var(--brand-l); font-weight:700}
.bvside.won .bvscore{color:var(--brand-d)}
.bvside.lost{opacity:.6}

@media(max-width:520px){
  .bracketview{gap:12px}
  .bvcol{min-width:158px}
  .bvside{padding:6px 7px; font-size:.8rem}
}

/* On paper the whole draw must be visible: no scrolling, no cut-off column. */
@media print{
  .bracketview{overflow:visible; gap:10px; page-break-inside:avoid}
  .bvcol{min-width:0; flex:1 1 0}
  .bvmatch{break-inside:avoid; page-break-inside:avoid}
  .bvside.won{background:#eef4f8 !important}
}

/* A corner nobody can score: a bye's empty side, or somebody disqualified.
   It must not look like a box waiting for points. */
.deadcorner{display:flex; align-items:center; justify-content:center; gap:8px;
  padding:14px 10px; border:1px dashed var(--line); border-radius:10px;
  color:var(--ink-2); font-size:.9rem; font-weight:600; background:var(--bg-2)}
.deadcorner-mark{font-size:1.3rem; opacity:.55}
.matchbanner.bye{background:var(--bg-2); color:var(--ink-2);
  border:1px dashed var(--line)}
.matchbanner.warn{background:#fdf3e7; color:#8a5a12; border:1px solid #e8c893}
html[data-theme=dark] .matchbanner.warn{background:#3a2f1c; color:#f0d3a0;
  border-color:#6b5327}
.bvside.dead{opacity:.55; font-style:italic}
.bvside .bvout{font-size:.66rem; font-weight:800; letter-spacing:.04em;
  padding:1px 5px; border-radius:4px; background:var(--line-2); color:var(--ink-2)}

/* A match that has not been created yet: keeps the bracket's shape without
   pretending there is anything to score. */
.bvmatch.pending{border-style:dashed; opacity:.5}
.bvside.pending{color:var(--ink-2); font-style:italic}
.bvside.dead .bvname{text-decoration:line-through}

/* Something just added, brought into view and briefly marked so it is
   obvious which one is new. */
.justadded{animation:justadded 1.4s ease-out}
@keyframes justadded{
  0%{box-shadow:0 0 0 3px var(--brand)}
  100%{box-shadow:0 0 0 0 transparent}
}

/* The third place match sits under the final rather than claiming a column
   of its own, which would imply a round of the draw that does not exist. */
.bvthird{margin-top:18px; padding-top:12px; border-top:2px dashed var(--line)}
.bvthird-head{font-weight:800; font-size:.7rem; text-transform:uppercase;
  letter-spacing:.05em; color:var(--ink-2); margin-bottom:6px}

.bvcol-head{display:flex; align-items:center; gap:6px}
.bvcol-head .grow{flex:1; min-width:0}
.bvcol-add{margin-top:10px}
.bvcol-add .btn{width:100%; justify-content:center}
.bvcol-new{min-width:130px; opacity:.85}
.bvcol-new .btn{width:100%; justify-content:center}

/* Where this match's winner goes next. Makes the positional pairing visible
   so a partly-recorded round can be spotted and corrected. */
.bvfeeds{padding:3px 9px; font-size:.68rem; color:var(--ink-2);
  border-top:1px dashed var(--line); background:var(--bg-2)}
@media print{ .bvfeeds{display:none} }

/* A slot nobody has named yet: says what it is waiting for rather than
   sitting blank, so a bracket built in advance still reads. */
.bvside.waiting .bvname{color:var(--ink-2); font-style:italic; font-size:.8rem}

/* The running total for one side of a team match, beside its heading. */
h3.formsec{display:flex; align-items:baseline; gap:10px}
/* A section heading standing on the page rather than inside a card.
   The bleed above exists to cancel a card's 16px of padding, and
   there is none to cancel out here: used bare it ran 2px past the
   edge of a 390px screen and gave the whole page a sideways scroll. */
.formsec.is-bare{margin-left:0; margin-right:0; width:auto}
h3.formsec .grow{flex:1; min-width:0}
.sidetotal{font-size:.82rem; font-weight:800; color:var(--brand-d);
  background:var(--brand-l); border-radius:999px; padding:2px 10px;
  font-variant-numeric:tabular-nums}
html[data-theme=dark] .sidetotal{color:var(--ink)}

/* ---- school and location heading ---------------------------------------
   The logo sits beside the name, at a size that reads as identity rather
   than decoration.
   ----------------------------------------------------------------------- */
.crest{display:flex; align-items:center; gap:14px; margin:2px 0 14px}
.crest-logo{width:64px; height:64px; object-fit:contain; flex:none;
  border-radius:10px; background:var(--card); padding:4px;
  border:1px solid var(--line)}
.crest-text{min-width:0}
.crest-name{margin:0; font-size:1.5rem; line-height:1.2;
  overflow-wrap:anywhere}
@media(max-width:520px){
  .crest{gap:10px; margin-bottom:10px}
  .crest-logo{width:48px; height:48px}
  .crest-name{font-size:1.2rem}
}
.locthumb{width:26px; height:26px; object-fit:contain; flex:none;
  border-radius:6px; background:var(--card)}
.foldbox > summary.foldhead{cursor:pointer; font-weight:800;
  list-style:none}
.foldbox > summary.foldhead::-webkit-details-marker{display:none}
.foldbox > summary.foldhead::after{content:' \25BE'; color:var(--ink-2)}
.foldbox[open] > summary.foldhead::after{content:' \25B4'}
@media print{ .crest-logo{width:52px; height:52px} }

/* Details two abreast where there is room. A short list of facts running
   down one long thin column wastes most of a screen. */
.detailcols{display:grid; grid-template-columns:1fr 1fr; gap:10px 22px}
.detailcols .detailblock{margin:0; min-width:0}
@media(max-width:560px){ .detailcols{grid-template-columns:1fr; gap:8px} }
@media print{ .detailcols{grid-template-columns:1fr 1fr} }

/* ---- clips --------------------------------------------------------------
   A still standing for a video that lives on the phone, not in the app.
   ------------------------------------------------------------------------ */
.clipgrid{display:grid; grid-template-columns:repeat(auto-fill,minmax(140px,1fr));
  gap:10px}
.clipcard{border:1px solid var(--line); border-radius:10px; overflow:hidden;
  background:var(--card); padding:0; cursor:pointer; text-align:left}
.clipcard:hover{border-color:var(--brand)}
.clipframe{position:relative; line-height:0; background:#0d1117}
.clipposter{width:100%; aspect-ratio:16/9; object-fit:cover; display:block}
.clipposter.empty{display:flex; align-items:center; justify-content:center;
  color:#8b98a5; font-size:.8rem; line-height:1.4}
/* a play mark, so a still is not mistaken for a photo */
.clipframe::after{content:''; position:absolute; inset:0; margin:auto;
  width:0; height:0; border-style:solid; border-width:11px 0 11px 18px;
  border-color:transparent transparent transparent rgba(255,255,255,.92);
  filter:drop-shadow(0 1px 3px rgba(0,0,0,.6))}
.cliplen{position:absolute; right:6px; bottom:6px; background:rgba(0,0,0,.72);
  color:#fff; font-size:.7rem; font-weight:700; padding:1px 6px;
  border-radius:4px; line-height:1.5}
.clipmarks{position:absolute; right:6px; top:6px; background:var(--brand-d);
  color:#fff; font-size:.66rem; font-weight:800; padding:1px 6px;
  border-radius:4px; line-height:1.5}
.clipat{position:absolute; left:6px; top:6px; background:var(--brand);
  color:#fff; font-size:.68rem; font-weight:700; padding:1px 6px;
  border-radius:4px; line-height:1.5}
.clipcap{padding:6px 8px; font-size:.82rem; line-height:1.3;
  overflow-wrap:anywhere}
.clipbig{width:100%; border-radius:10px; margin-bottom:10px}
@media print{ .clipframe::after{display:none} }

/* ---- scoring while filming ----------------------------------------------
   The preview is ours rather than the camera app's, which is the only way
   buttons can sit over it.
   ------------------------------------------------------------------------ */
.overlaywrap{display:flex; flex-direction:column; gap:10px}
.overlayhead{display:flex; align-items:center; gap:12px}
.overlayclock{font-variant-numeric:tabular-nums; font-weight:800;
  font-size:1.1rem; background:#0d1117; color:#fff; padding:3px 10px;
  border-radius:999px}
.overlaytally{display:flex; gap:8px; flex:1}
.overlayscore{flex:1; display:flex; align-items:baseline; gap:8px;
  padding:4px 10px; border-radius:8px; border:1px solid var(--line)}
.overlayscore.white{border-left:4px solid #cbd5e1}
.overlayscore.red{border-left:4px solid var(--danger,#c0392b)}
.overlayscore-tag{font-size:.72rem; font-weight:700; color:var(--ink-2);
  text-transform:uppercase; letter-spacing:.04em; flex:1; min-width:0;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.overlayscore-num{font-size:1.3rem; font-weight:800;
  font-variant-numeric:tabular-nums}
.overlaystage{position:relative; background:#0d1117; border-radius:10px;
  overflow:hidden; line-height:0}
.overlayvideo{width:100%; aspect-ratio:16/9; object-fit:cover; display:block}
.overlaypads{display:grid; grid-template-columns:1fr 1fr; gap:8px;
  margin-top:8px}
.overlaypad{border:1px solid var(--line); border-radius:10px; padding:7px}
.overlaypad.white{border-left:4px solid #cbd5e1}
.overlaypad.red{border-left:4px solid var(--danger,#c0392b)}
.overlaypad-name{font-size:.74rem; font-weight:700; color:var(--ink-2);
  margin-bottom:5px; overflow:hidden; text-overflow:ellipsis;
  white-space:nowrap}
.overlaypad-btns{display:flex; gap:5px}
.overlaypad-btns .tallybtn{flex:1; width:auto; height:46px; font-size:1.1rem}
.marklist{display:flex; flex-direction:column; gap:3px; max-height:180px;
  overflow-y:auto}
.markrow{display:flex; align-items:center; gap:9px; padding:4px 8px;
  border:1px solid var(--line); border-radius:8px; font-size:.85rem}
.markat{font-variant-numeric:tabular-nums; font-weight:800;
  color:var(--brand-d); min-width:44px}
/* The moment the ring stopped, kept among the points but not one of them. */
.markrow-time{border-style:dashed; background:var(--line-2)}
.markrow-time .grow{font-weight:700}
/* A judge's score sits at the end of its row, where a reader's eye can run
   down the column of numbers. */
.markscore{font-variant-numeric:tabular-nums; font-weight:800;
  color:var(--brand-d); font-size:.95rem}
@media(max-width:520px){
  .overlaypad-btns .tallybtn{height:52px}
  .overlayscore-num{font-size:1.1rem}
}

/* ---- score while filming -------------------------------------------------
   A camera that happens to score, rather than a form that happens to film.
   Everything but the footage gets out of the way: the pads sit under the
   thumbs in either orientation, and nothing else competes for the screen.
   ------------------------------------------------------------------------- */
.filmlayer{position:fixed; inset:0; z-index:9000; background:#000;
  display:flex; flex-direction:column; overflow:hidden;
  -webkit-user-select:none; user-select:none; touch-action:manipulation}
.filmstage{position:absolute; inset:0}
/* An empty video element draws a placeholder play button scaled to the
   whole screen, which looks like the camera has failed before it has even
   been asked for. Hidden until there is something to show. */
.filmvideo.live{display:block}
.filmvideo{width:100%; height:100%; object-fit:cover; display:none;
  background:#000}

/* a scrim top and bottom so white text and outlines hold over any footage */
.filmlayer::before,.filmlayer::after{content:''; position:absolute; left:0;
  right:0; height:34%; pointer-events:none; z-index:1}
.filmlayer::before{top:0;
  background:linear-gradient(to bottom,rgba(0,0,0,.72),transparent)}
.filmlayer::after{bottom:0;
  background:linear-gradient(to top,rgba(0,0,0,.72),transparent)}

.filmtop{position:relative; z-index:3;
  /* Inside a shell the app owns the whole screen, so the clock, signal and
     battery sit on top of this row unless it is pushed clear of them. The
     fallback keeps the web version unchanged. */
  padding:calc(10px + env(safe-area-inset-top, 0px)) 12px 10px;
  padding-left:calc(12px + env(safe-area-inset-left, 0px));
  padding-right:calc(12px + env(safe-area-inset-right, 0px));
  display:flex; align-items:flex-start; gap:10px; color:#fff}
.filmclock{font-variant-numeric:tabular-nums; font-weight:800;
  font-size:1.05rem; background:rgba(0,0,0,.42); border-radius:999px;
  padding:3px 11px}
.filmclock.live::before{content:''; display:inline-block; width:8px;
  height:8px; border-radius:50%; background:#e5484d; margin-right:7px;
  vertical-align:middle; animation:filmpulse 1.4s ease-in-out infinite}
@keyframes filmpulse{50%{opacity:.25}}
.filmscore{display:flex; gap:8px; margin-left:auto}
.filmscore-side{min-width:62px; text-align:center; border-radius:10px;
  padding:2px 8px; background:rgba(0,0,0,.42); border:2px solid transparent}
.filmscore-side.white{border-color:rgba(255,255,255,.85)}
.filmscore-side.red{border-color:rgba(229,72,77,.9)}
.filmscore-tag{display:block; font-size:.6rem; letter-spacing:.08em;
  text-transform:uppercase; opacity:.85; overflow:hidden;
  text-overflow:ellipsis; white-space:nowrap}
.filmscore-num{display:block; font-size:1.35rem; font-weight:800;
  line-height:1.1; font-variant-numeric:tabular-nums}
.filmexit{background:rgba(0,0,0,.42); border:0; color:#fff; border-radius:999px;
  width:34px; height:34px; font-size:1.1rem; cursor:pointer; flex:none}

/* who is in the ring. Top of screen, nowhere near a thumb. */
.filmslots{position:relative; z-index:3;
  padding:0 calc(12px + env(safe-area-inset-right,0px)) 4px
    calc(12px + env(safe-area-inset-left,0px));
  display:flex; gap:8px}
.filmslotcol{flex:1; min-width:0; display:flex; flex-wrap:wrap; gap:4px}
.filmslotcol.red{justify-content:flex-end}
.filmslot{border:2px solid rgba(255,255,255,.3); background:rgba(0,0,0,.42);
  color:#fff; border-radius:999px; padding:3px 10px; font-size:.76rem;
  font-weight:700; cursor:pointer; max-width:100%; overflow:hidden;
  text-overflow:ellipsis; white-space:nowrap}
.filmslotcol.white .filmslot.on{border-color:rgba(255,255,255,.95);
  background:rgba(255,255,255,.22)}
.filmslotcol.red .filmslot.on{border-color:rgba(229,72,77,.95);
  background:rgba(229,72,77,.28)}

/* the undo: only after a point, and out of reach of the thumbs */
.filmundo{position:absolute; top:52%; left:50%; transform:translate(-50%,-50%);
  z-index:5; background:rgba(0,0,0,.72); color:#fff; border:1px solid
  rgba(255,255,255,.4); border-radius:999px; padding:8px 16px;
  font-size:.85rem; font-weight:700; cursor:pointer;
  animation:filmfade .3s ease-out}
@keyframes filmfade{from{opacity:0; transform:translate(-50%,-40%)}}

.filmpads{position:relative; z-index:3; margin-top:auto;
  padding:0 calc(12px + env(safe-area-inset-right,0px))
    calc(12px + env(safe-area-inset-bottom,0px))
    calc(12px + env(safe-area-inset-left,0px));
  display:flex; justify-content:space-between; align-items:flex-end; gap:12px}
.filmpad{display:flex; flex-direction:column; gap:8px; width:38%;
  max-width:190px; min-width:0}
.filmpad.red{align-items:flex-end}
.filmpad-name{color:#fff; font-size:.7rem; font-weight:800;
  letter-spacing:.05em; text-transform:uppercase; opacity:.9;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width:100%}
.filmbtn{flex:1 1 0; min-width:0; width:auto; min-height:68px;
  border-radius:16px; font-size:1.45rem; padding:0 2px;
  font-weight:800; color:#fff; background:rgba(0,0,0,.34); cursor:pointer;
  font-variant-numeric:tabular-nums; backdrop-filter:blur(2px)}
.filmpad.white .filmbtn{border:3px solid rgba(255,255,255,.72)}
.filmpad.red .filmbtn{border:3px solid rgba(229,72,77,.78)}
.filmpad.white .filmbtn:active{background:rgba(255,255,255,.3)}
.filmpad.red .filmbtn:active{background:rgba(229,72,77,.4)}

.filmcenter{position:relative; z-index:4; display:flex; gap:10px;
  justify-content:center; padding:0 12px 12px}
/* The plain recorder has no scoring controls between the top bar and the
   buttons, so nothing else pushes them to the bottom of the screen. */
.plainlayer .filmcenter{margin-top:auto}
.filmstart{border:0; border-radius:999px; padding:14px 26px; font-size:1rem;
  font-weight:800; cursor:pointer; background:#fff; color:#111}
.filmstop{border:2px solid rgba(255,255,255,.7); border-radius:999px;
  padding:10px 22px; font-weight:800; cursor:pointer;
  background:rgba(229,72,77,.85); color:#fff}
/* The end of the round. Quieter than Stop, because it stops the match and
   not the recording, and the two must not be confused at a ring. Once
   pressed it fills in, so a glance says the clock has already been called. */
.filmtime{border:2px solid rgba(255,255,255,.55); border-radius:999px;
  padding:10px 18px; font-weight:700; cursor:pointer;
  background:rgba(0,0,0,.35); color:#fff}
.filmtime.on{background:#fff; color:#111; border-color:#fff}
.filmnote{position:relative; z-index:3; color:#fff; text-align:center;
  padding:0 22px calc(10px + env(safe-area-inset-bottom, 0px));
  font-size:.82rem; opacity:.85; line-height:1.4}
/* A failure has to stay on screen to be read — a toast is gone before
   somebody has looked down at it. */
.filmnote.bad{opacity:1; color:#ffb4ad; font-weight:600}

/* Landscape: the pads move to the outer edges, where thumbs already are. */
@media (orientation:landscape){
  /* Turned sideways the navigation bar runs down one edge, and the gesture
     area along the bottom stays where it is. Both are insets, so both are
     asked for rather than guessed at. */
  .filmpads{
    padding:0 calc(20px + env(safe-area-inset-right,0px))
      calc(10px + env(safe-area-inset-bottom,0px))
      calc(20px + env(safe-area-inset-left,0px))}
  .filmpad{width:26%; max-width:200px}
  .filmbtn{min-height:56px; font-size:1.25rem}
  .filmslots{padding-bottom:2px}
}

/* Which corner ran which order. The color has to be unmistakable here:
   getting it backwards would reorder the wrong team. */
.reorderside{border:1px solid var(--line); border-radius:10px;
  padding:8px 11px; margin-bottom:8px}
.reorderhead{display:flex; align-items:center; gap:8px; margin-bottom:5px}
.cornerdot{width:12px; height:12px; border-radius:50%; flex:none;
  border:2px solid var(--line)}
.cornerdot.white{background:#fff; border-color:#c9d2dc}
.cornerdot.red{background:var(--danger,#c0392b); border-color:var(--danger,#c0392b)}
.reorderlist{font-size:.9rem; line-height:1.6}

/* The organization's own mark on the school page. */
.orgcrest{margin-bottom:10px}
.orgcrest-logo{max-height:56px; max-width:180px; object-fit:contain}

/* Standings grouped by the level they belong to. */
.standgroup{margin-bottom:10px}

/* A group of bands, with its own controls beside the heading. */
.famhead{display:flex; align-items:center; gap:8px}
.famhead .grow{flex:1; min-width:0; margin:14px 0 6px}
.tiny.warn{color:#8a5a12}
html[data-theme=dark] .tiny.warn{color:#f0d3a0}

/* ---- judged score sheet, two rows per competitor -------------------------
   One row held a name, a weapon, three judges, a total, a place and three
   buttons, which ran off the side of a phone.
   ------------------------------------------------------------------------ */
.entrylist{display:flex; flex-direction:column; gap:8px}
.entrycard{border:1px solid var(--line); border-radius:10px; padding:8px 10px;
  background:var(--card)}
.entrycard-top{display:flex; align-items:center; gap:8px; min-width:0}
.entrycard-top .grow{flex:1; min-width:0}
.entrycard-no{flex:none; width:24px; height:24px; border-radius:50%;
  background:var(--brand); color:#fff; font-size:.78rem; font-weight:800;
  display:flex; align-items:center; justify-content:center}
.entrycard-scores{display:flex; gap:6px; margin-top:8px; flex-wrap:wrap}
.jbox{flex:1; min-width:56px; border:1px solid var(--line); border-radius:8px;
  padding:3px 6px; text-align:center; background:var(--bg)}
.jbox-tag{display:block; font-size:.58rem; letter-spacing:.06em;
  text-transform:uppercase; color:var(--ink-2)}
.jbox-val{display:block; font-size:1.02rem; font-weight:800;
  font-variant-numeric:tabular-nums}
.jbox-in{width:100%; border:0; background:transparent; text-align:center;
  font-size:1.02rem; font-weight:800; color:var(--ink); padding:0;
  font-variant-numeric:tabular-nums}
.jbox-in:focus{outline:2px solid var(--brand); outline-offset:2px;
  border-radius:4px}
.jtotal{background:var(--brand-soft,rgba(18,69,94,.08))}
.jplace .jbox-val{color:var(--brand)}
@media(max-width:400px){ .jbox{min-width:46px} }

/* ---- the number pad on the filming screen ------------------------------- */
.judgedlayer .padwrap{position:relative; z-index:4;
  padding:0 calc(14px + env(safe-area-inset-right, 0px))
    env(safe-area-inset-bottom, 0px)
    calc(14px + env(safe-area-inset-left, 0px));
  margin-top:auto; color:#fff}
.padtitle{font-size:.72rem; letter-spacing:.08em; text-transform:uppercase;
  opacity:.8; margin-bottom:5px}
.padboxes{display:flex; gap:8px; margin-bottom:8px}
.padbox{flex:1; border:2px solid rgba(255,255,255,.35);
  background:rgba(0,0,0,.45); border-radius:10px; padding:4px 6px;
  color:#fff; cursor:pointer}
.padbox.on{border-color:#f0b429; background:rgba(240,180,41,.22)}
.padbox-tag{display:block; font-size:.58rem; letter-spacing:.06em;
  text-transform:uppercase; opacity:.85}
.padbox-val{display:block; font-size:1.3rem; font-weight:800;
  font-variant-numeric:tabular-nums}
.padtotal{text-align:center; font-weight:800; margin-bottom:8px;
  font-variant-numeric:tabular-nums}
.padkeys{display:grid; grid-template-columns:repeat(6,1fr); gap:6px}
.padkey{min-height:44px; border-radius:10px; border:1px solid
  rgba(255,255,255,.3); background:rgba(0,0,0,.4); color:#fff;
  font-size:1.15rem; font-weight:700; cursor:pointer}
.padkey:active{background:rgba(255,255,255,.28)}
.padback{font-size:1rem}
.padhint{color:rgba(255,255,255,.7); text-align:center; margin:8px 0 0}
@media(orientation:landscape){
  .padkeys{grid-template-columns:repeat(12,1fr)}
  .padkey{min-height:38px}
}

/* ---- a photograph, full screen, with pinch to zoom ----------------------
   A picture shown inside a panel cannot be examined properly.
   ------------------------------------------------------------------------ */
.photoview-stage.tappable{cursor:zoom-in}
.zoomlayer{position:fixed; inset:0; z-index:9500; background:#000;
  display:flex; align-items:center; justify-content:center;
  overflow:hidden; touch-action:none}
.zoomimg{max-width:100%; max-height:100%; transform-origin:center center;
  will-change:transform; user-select:none; -webkit-user-drag:none}
.zoomclose{position:absolute; z-index:2;
  top:calc(12px + env(safe-area-inset-top,0px));
  right:calc(12px + env(safe-area-inset-right,0px));
  width:40px; height:40px; border-radius:50%; border:0; cursor:pointer;
  background:rgba(0,0,0,.55); color:#fff; font-size:1.1rem}
.zoomcap{position:absolute; left:0; right:0;
  bottom:calc(14px + env(safe-area-inset-bottom,0px));
  text-align:center; color:#fff; font-size:.85rem; padding:0 20px;
  text-shadow:0 1px 3px rgba(0,0,0,.8)}

/* A picture that is not there should read as an empty frame rather than as
   something broken. */
.media-missing{background:var(--line); object-fit:cover;
  min-height:40px; opacity:.55}

/* Small tiles, for when there are enough that seeing more at once matters
   more than seeing each one clearly. */
.clipgrid-small .clipgrid{grid-template-columns:repeat(auto-fill,minmax(110px,1fr))}
.clipgrid-small .clipcap{font-size:.68rem}
.clipgrid-small .cliplen, .clipgrid-small .clipat,
.clipgrid-small .clipmarks{font-size:.6rem; padding:1px 5px}

/* The print button on one side, the organization mark on the other. */
.hero-actions{display:flex; align-items:center; justify-content:space-between;
  gap:12px; margin-top:14px}
.hero-orglogo{width:clamp(40px,12vw,58px); height:clamp(40px,12vw,58px);
  object-fit:contain; background:#fff; border-radius:12px; padding:6px;
  flex:0 0 auto}

/* Marking who placed, on rings where the first three are called out rather
   than totalled. */
.firstthree{display:flex; align-items:center; gap:5px; flex:none;
  border:1px solid var(--line); border-radius:999px; padding:3px 9px;
  font-size:.7rem; font-weight:700; color:var(--ink-2); cursor:pointer;
  white-space:nowrap}
.firstthree.on{border-color:var(--brand); background:var(--brand);
  color:#fff}
.firstthree input{margin:0; accent-color:#fff}

/* ---- tables on a phone --------------------------------------------------
   A row of eight columns could only be read by dragging it sideways, a
   column at a time, with the name scrolled off the left. Below this width
   each row becomes a small block and each cell carries its own heading,
   taken from the column it came from.

   Wide screens, printing and anything exported are untouched: this is a
   view of the same table, not a different table.
   ------------------------------------------------------------------------ */
@media (max-width:620px){
  .tablewrap{overflow-x:visible; margin:0}
  .tbl{min-width:0; display:block; font-size:.88rem}
  .tbl thead{position:absolute; width:1px; height:1px; overflow:hidden;
    clip:rect(0 0 0 0); white-space:nowrap}
  .tbl tbody{display:block}

  .tbl tbody tr{display:block; border:1px solid var(--line);
    border-radius:10px; margin-bottom:8px; padding:2px 0;
    background:var(--card)}
  .tbl tbody tr:hover{background:var(--card)}

  .tbl tbody td{display:flex; align-items:baseline; gap:10px;
    border-bottom:1px solid var(--line-2); padding:7px 11px; text-align:left}
  .tbl tbody tr td:last-child{border-bottom:0}

  /* The heading sits beside the value rather than above it, so a block of
     six stays six lines rather than twelve. */
  .tbl tbody td::before{content:attr(data-label); flex:0 0 38%;
    color:var(--ink-2); font-size:.72rem; font-weight:700;
    text-transform:uppercase; letter-spacing:.04em}
  .tbl tbody td[data-label='']::before,
  .tbl tbody td:not([data-label])::before{display:none}
  /* Nothing to say, so nothing said. */
  .tbl tbody td.cell-blank{display:none}
  .tbl tbody td.align-right{text-align:left}

  /* The name of the thing reads as a heading for the block rather than as
     one more labelled line. */
  .tbl tbody td.rowhead{font-weight:700; font-size:.98rem; display:block;
    background:var(--line-2); border-radius:8px 8px 0 0; padding:9px 11px}
  .tbl tbody td.rowhead::before{display:none}

  /* Folding. A heading bar that opens and shuts its own block, so twenty
     competitors are twenty lines rather than a hundred and twenty. */
  .tbl tbody td.rowhead.rowfold{display:flex; align-items:center;
    justify-content:space-between; gap:10px; cursor:pointer;
    user-select:none}
  .tbl tbody td.rowhead.rowfold .rowcaret{display:inline; flex:0 0 auto;
    color:var(--ink-2); font-size:.85rem}
  .tbl tbody td.rowhead.rowfold:focus-visible{outline:2px solid var(--brand);
    outline-offset:-2px}
  .tbl tbody tr.is-shut td:not(.rowhead){display:none}
  /* Nothing under it, so it is the whole block rather than a lid. */
  .tbl tbody tr.is-shut td.rowhead{border-radius:8px}

  /* A column with no heading is a picture or a tick box. Those sit
     together on one line above the block rather than each taking a row of
     their own. */
  .tbl tbody td:not([data-label]){display:inline-flex; width:auto;
    border-bottom:0; padding:6px 4px 0 11px}
  .tbl tbody td:not([data-label])::before{display:none}

  .tbl .empty{display:block; text-align:center}
  .tbl tbody tr:has(.empty){border:0; background:none}

  /* Inside a trail, a table stays a table.
     Place and Points are two short values; stacked, five tournaments
     become fifteen labelled lines in a modal that is already narrow. The
     same override the print rules use, for the same reason. */
  .tbl.trailtable{display:table !important; min-width:0}
  .tbl.trailtable thead{position:static !important; width:auto !important;
    height:auto !important; clip:auto !important}
  .tbl.trailtable tbody{display:table-row-group !important}
  .tbl.trailtable tbody tr{display:table-row !important; border:0 !important;
    margin:0 !important; background:none !important}
  .tbl.trailtable tbody td{display:table-cell !important;
    border-bottom:1px solid var(--line-2); padding:7px 8px}
  .tbl.trailtable tbody td::before{display:none !important}
  .tbl.trailtable tbody td.rowhead{display:table-cell !important;
    background:none !important; border-radius:0; font-size:.9rem}
  .tbl.trailtable tbody td.align-right{text-align:right}
}

/* Printing is a page, not a phone: the table stays a table. */
@media print{
  .tbl{display:table !important; min-width:0}
  .tbl thead{position:static !important; width:auto !important;
    height:auto !important; clip:auto !important}
  .tbl tbody{display:table-row-group !important}
  .tbl tbody tr{display:table-row !important; border:0 !important;
    margin:0 !important; background:none !important}
  .tbl tbody td{display:table-cell !important; border-bottom:1px solid #ddd}
  .tbl tbody td::before{display:none !important}
  .tbl tbody td.rowhead{background:none !important; font-size:inherit;
    display:table-cell !important; font-weight:inherit}
}

/* Score sheets under the tournament they belong to. */
.sheetgroup{margin-top:8px; border:1px solid var(--line); border-radius:10px}
.sheetgroup-head{padding:9px 11px; cursor:pointer; list-style:none;
  display:flex; align-items:center; gap:8px}
.sheetgroup-head::-webkit-details-marker{display:none}
.sheetgroup-head strong{font-size:.95rem; flex:1}
.sheetgroup-head::after{content:'\25BE'; color:var(--ink-2); font-size:.8rem}
.sheetgroup[open] > .sheetgroup-head{border-bottom:1px solid var(--line)}
.sheetgroup[open] > .sheetgroup-head::after{content:'\25B4'}
.sheetgroup .tablewrap{padding:0 8px 8px}

/* The two sheet switches side by side rather than stacked. */
.sheetopts{display:flex; gap:14px; flex-wrap:wrap; align-items:center}
.sheetopts label{margin:0}

/* What to do with a competitor, on a line of its own beneath the scores.
   On one line with the name, a long name was pushed underneath the
   buttons and read as though it belonged to the row below. */
.entrycard-acts{display:flex; align-items:center; gap:8px; margin-top:8px;
  flex-wrap:wrap}
.entrycard-acts .entryactions{margin-left:auto}
.firstthree{flex:none; border-radius:999px; padding:3px 9px;
  font-size:.68rem; font-weight:700; white-space:nowrap;
  border:1px solid var(--brand); background:var(--brand); color:#fff}

/* ---- noticing the add button --------------------------------------------
   People were not finding it and decided the app was harder to get around
   than it is. It asks for attention the first few times and then stops.
   ------------------------------------------------------------------------ */
/* A panel opened from a button grows out of it. Short, and once -- the
   point is to connect the two, not to perform. */
.overlay.springing .modal{
  animation:modal-spring 200ms cubic-bezier(.2,.85,.3,1) both;
}
@keyframes modal-spring{
  from{opacity:0; transform:scale(.42)}
  to{opacity:1; transform:scale(1)}
}
.overlay.springing .sheetmenu > *{
  animation:sheetitem-in 180ms ease-out both;
}
/* Staggered down the list, so it reads as unrolling rather than appearing.
   Nine covers the longest menu the app builds; anything past it simply
   arrives with the last one. */
.overlay.springing .sheetmenu > *:nth-child(1){animation-delay:40ms}
.overlay.springing .sheetmenu > *:nth-child(2){animation-delay:70ms}
.overlay.springing .sheetmenu > *:nth-child(3){animation-delay:100ms}
.overlay.springing .sheetmenu > *:nth-child(4){animation-delay:125ms}
.overlay.springing .sheetmenu > *:nth-child(5){animation-delay:145ms}
.overlay.springing .sheetmenu > *:nth-child(6){animation-delay:162ms}
.overlay.springing .sheetmenu > *:nth-child(7){animation-delay:176ms}
.overlay.springing .sheetmenu > *:nth-child(8){animation-delay:188ms}
.overlay.springing .sheetmenu > *:nth-child(n+9){animation-delay:198ms}
@keyframes sheetitem-in{
  from{opacity:0; transform:translateY(7px)}
  to{opacity:1; transform:none}
}
@media(prefers-reduced-motion:reduce){
  .overlay.springing .modal,
  .overlay.springing .sheetmenu > *{animation:none}
}

/* The pulse that points the + button out. It is as much for whoever the
   phone is handed to at a tournament as for its owner, so it never stops,
   but it only runs on Home and only once every five seconds: often enough
   to be seen, not so often that it pulls the eye off a page being read.
   The rest of the cycle is still; the pulse itself takes under a second. */
@keyframes fabnudge{
  0%,81%,100%{transform:scale(1); box-shadow:0 6px 18px rgba(0,0,0,.22)}
  85%{transform:scale(1.09); box-shadow:0 0 0 10px rgba(232,183,87,.28)}
  90.5%{transform:scale(.99); box-shadow:0 0 0 18px rgba(232,183,87,0)}
}
.fab.nudge{animation:fabnudge 5s ease-in-out infinite}

/* Its own colors rather than the ink variable: in dark mode that turns
   pale and white text on it could not be read at all. */
.fabtip{position:fixed; z-index:41;
  right:calc(84px + var(--safe-r));
  bottom:calc(74px + var(--safe-b));
  max-width:min(16rem,64vw); background:#12222c; color:#f4f6f7;
  padding-right:26px;
  border-radius:12px; padding:10px 12px; font-size:.8rem; line-height:1.35;
  box-shadow:0 10px 28px rgba(0,0,0,.3); opacity:0;
  animation:fabtipin .45s ease-out .6s forwards}
.fabtip strong{display:block; margin-bottom:3px}
.fabtip span{opacity:.85}
.fabtip::after{content:''; position:absolute; right:-6px; bottom:16px;
  width:12px; height:12px; background:#12222c; transform:rotate(45deg)}
.fabtip strong, .fabtip span{color:#f4f6f7}
.fabtip-x{position:absolute; top:4px; right:4px; width:22px; height:22px;
  border:0; background:none; color:#f4f6f7; opacity:.75; cursor:pointer;
  font-size:.8rem; line-height:1; padding:0}
.fabtip-x:hover{opacity:1}
.fabtip.going{animation:fabtipout .35s ease-in forwards}
@keyframes fabtipin{from{opacity:0; transform:translateX(8px)}
  to{opacity:1; transform:none}}
@keyframes fabtipout{to{opacity:0; transform:translateX(8px)}}

@media (prefers-reduced-motion:reduce){
  .fab.nudge{animation:none}
  .fabtip{animation:none; opacity:1}
}

/* The division pickers on one line. Three stacked full-width rows were
   most of the form before anybody reached what they were filling in. */
.divpick{display:flex; gap:6px; flex-wrap:wrap}
.divpick select{flex:1 1 0; min-width:96px; width:auto;
  padding:7px 8px; font-size:16px}

/* Medal counts as marks rather than words. */
.statparts.asmedals{gap:10px}
.statparts.asmedals .statpart{display:inline-flex; align-items:center;
  gap:3px}
.statparts.asmedals .statpart-value{font-weight:700}

/* Two numbers about the season, under a heading that says so. */
.tourcount{flex:1 1 auto; min-width:150px}
.tourcount > .stat-label{margin-bottom:3px}
.tourcount-row{display:flex; gap:18px}

/* ---- a place and what it was worth ---------------------------------------
   Across a wide screen the place sits above the points, so reading along
   the top row gives the placings and along the bottom the scores. Narrow,
   they become two columns beside the event name.
   ------------------------------------------------------------------------ */
.pp{display:inline-flex; flex-direction:column; align-items:flex-end;
  line-height:1.25}
.pp-place{font-size:.78rem; color:var(--ink-2)}
.pp-place.muted{opacity:.7}
.pp-pts{font-weight:700; font-variant-numeric:tabular-nums}
.pp-pts.muted{font-weight:400; color:var(--ink-2)}
/* What sits in an event's column for a rank that takes no placings: the
   award won in it, in the colour awards wear everywhere else. */
.pp-award{font-size:.8rem; font-weight:600; color:var(--accent)}

@media (max-width:620px){
  /* Event, place, points — three columns on one line. */
  .pp{flex-direction:row; align-items:baseline; gap:10px; flex:1;
    justify-content:flex-end}
  .pp-place{flex:1; text-align:left}
  .pp-pts{min-width:2.4em; text-align:right}
}

/* The web trial, said on every page. */
.comparetbl .compare-feature{font-weight:700}
/* The phone trial's days left: quiet, one line, on Home. */
.unlock-price{font-weight:700; font-size:1.05rem}
.unlock-list{margin:.4em 0 .8em; padding-left:1.2em; line-height:1.5}
.trialline{display:flex; align-items:center; justify-content:space-between; gap:10px;
  font-size:.88rem; color:var(--muted,#5b6b73); padding:2px 2px 10px}
.trialbar[hidden]{display:none}
.trialbar{display:flex; align-items:center; gap:6px 14px; flex-wrap:wrap;
  background:var(--brand,#0d3346); color:#fff; font-size:.82rem;
  padding:7px calc(14px + var(--safe-r)) 7px calc(14px + var(--safe-l))}
.trialbar span{flex:1 1 220px}
.trialbar a{color:#f3c86b; font-weight:700}
.trialbar .trialbar-save{flex:1 1 100%; order:5; font-weight:600}
.trialbar .trialbar-save + a{order:6}
@media print{ .trialbar{display:none} }

/* Saying plainly that what is on screen is not real. */
.samplebar[hidden]{display:none}
.samplebar{display:flex; align-items:center; gap:10px; flex-wrap:wrap;
  background:#f6e2a8; color:#4a3a10; font-size:.82rem;
  padding:7px calc(14px + var(--safe-r)) 7px calc(14px + var(--safe-l));
  border-bottom:1px solid #e2c877}
.samplebar button{border:0; background:none; color:#7a5c12; cursor:pointer;
  font:inherit; font-weight:700; text-decoration:underline; padding:0}
@media print{ .samplebar{display:none} }

/* A taskcard built from a button centers its text the way buttons do,
   which is not how the ones built from links look. */
button.taskcard{text-align:left; font:inherit}

/* 5 — the checklist should be as noticeable as the example notice, since
   both are telling somebody something about the state of the app. */
.card.setupcard{background:#fdf4dc; border-color:#e2c877}
.card.setupcard .card-title{color:#6b5210}

/* The add button shown as it actually appears, beside what it does, so it
   is recognized rather than looked for. */
.helpbox.quickaccess{display:flex; align-items:center; gap:12px}
.quickaccess-btn{flex:0 0 auto; width:46px; height:46px; border-radius:50%;
  background:var(--brand); color:#fff; display:flex; align-items:center;
  justify-content:center; box-shadow:0 4px 12px rgba(0,0,0,.18)}
.helpbox.quickaccess p{margin:2px 0 0}

/* How far through the event pages it has got. Without it there is no way
   to tell whether anything is happening. */
#catalogProgress{margin:8px 0 4px}
.progressbar{height:4px; border-radius:999px; background:var(--line);
  overflow:hidden; margin-top:5px}
.progressbar span{display:block; height:100%; background:var(--brand);
  transition:width .3s ease}
.catitem-extra{margin-top:2px; font-style:italic}

/* The paste box folds away once there is a list, since the box somebody
   used to get here is not what they want to look at next. */
.warnline{color:#8a5b00}
.autostaging{margin:0 0 10px}
.autostaging p{margin:0}

/* Three buttons that should fit across a phone rather than stack. */
.addbar{flex-wrap:nowrap; gap:6px}
.addbar .btn{flex:1 1 0; min-width:0; padding-left:8px; padding-right:8px;
  font-size:.82rem; white-space:nowrap}

/* ---- medals, three lines rather than five --------------------------------
   Stacked on a phone each of these was a labelled line of its own, which
   made a five-line block out of two numbers and a count. Paired up, they
   read as what they are: what was won, what it was worth, and how much
   competing it took.
   ------------------------------------------------------------------------ */
@media (max-width:620px){
  .medalstack tbody td{width:50%; box-sizing:border-box}
  .medalstack tbody td::before{flex:0 0 auto; margin-right:6px}
  /* The medals keep a line to themselves. */
  .medalstack tbody td[data-label='Medals']{width:100%}
  .medalstack tbody tr{display:flex; flex-wrap:wrap}
  .medalstack tbody td.rowhead{width:100%}
  /* The name and how many entered it, on one line. */
  .medalstack .evhead{display:flex; align-items:baseline; gap:8px;
    justify-content:space-between; width:100%}
  .medalstack .evhead .tiny{flex:0 0 auto}
}

/* A number you can follow. */
.countlink{border:0; background:none; padding:0; font:inherit;
  font-weight:700; color:var(--brand); cursor:pointer;
  text-decoration:underline; text-underline-offset:2px}
.evhead .countlink{font-weight:400; font-size:.78rem}
/* A standing this competitor is not on. Still a link, because the list is
   worth opening either way, but it must not read with the weight of a
   place somebody actually took: a bold brand-blue "Not listed" in the
   same column as a bold brand-blue "3 of 24" scans as an achievement. */
.countlink.notlisted{font-weight:400; color:var(--ink-2);
  font-size:.86rem}

/* ---- who is in the top three, at a glance --------------------------------
   A ring is scored while people are standing in it, and the question asked
   over a shoulder is "who is in the top three". Three colors answer it
   faster than a column of numbers, and a tie shows as two boxes the same
   color without anybody scrolling to the tie-breaks.

   Dark text on all three: gold and silver are too pale to carry white, and
   a place nobody can read is worse than a plain one.
   ------------------------------------------------------------------------ */
.jbox-val.place-1{background:#e8b757; color:#3a2c07;
  border-radius:8px; padding:1px 8px; font-weight:800}
.jbox-val.place-2{background:#c8ced4; color:#26303a;
  border-radius:8px; padding:1px 8px; font-weight:800}
.jbox-val.place-3{background:#d09a6a; color:#3a2410;
  border-radius:8px; padding:1px 8px; font-weight:800}

/* ---- filter groups -------------------------------------------------------
   filterGroup() in ui.js has always produced this markup, but nothing here
   ever styled it. The summary fell back to a plain list-item, so its label
   and the "any" beside it sat inline with nothing between them and read as
   one word — "Roleany", "Belt levelany" — and the count that replaces "any"
   once a filter is on rendered as bare text rather than a badge.

   .grow is only ever defined scoped to a parent elsewhere in this file, so
   it needs its own rule here rather than being assumed.
   ------------------------------------------------------------------------ */
.filtergroup{border-bottom:1px solid var(--line-2)}
.filtergroup:last-child{border-bottom:0}
.filtergroup-head{display:flex; align-items:center; gap:10px;
  padding:9px 2px; cursor:pointer; font-weight:600; list-style:none}
.filtergroup-head::-webkit-details-marker{display:none}
.filtergroup-head .grow{flex:1; min-width:0}
/* The open/closed arrow sits at the end, where the eye leaves the row. */
.filtergroup-head::after{content:"\25BE"; color:var(--ink-2);
  font-size:.8em; transition:transform .15s ease}
.filtergroup[open] > .filtergroup-head::after{transform:rotate(180deg)}
.filtergroup-count{background:var(--brand); color:#fff; border-radius:20px;
  font-size:.72rem; font-weight:700; padding:1px 8px; min-width:20px;
  text-align:center}
.filtergroup-body{padding:2px 0 12px}

/* The web version's address. Shown as text rather than only as a link,
   because it is read off this screen and typed into a different one — a tap
   here would open it on the wrong device. Wraps instead of overflowing, and
   one tap selects the whole thing. */
.webaddr{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  font-size:.9rem; background:var(--field); border:1px solid var(--line);
  border-radius:8px; padding:9px 11px; margin:0 0 10px;
  overflow-wrap:anywhere; user-select:all; -webkit-user-select:all}

/* ---- a control the installed app has and this one does not ---------------
   Grayed so it reads as unavailable, and still pressable so it can say why.
   A disabled button cannot be pressed, cannot be focused and is skipped by
   a screen reader, which is exactly the silence this is meant to end: the
   whole point is that somebody can ask the control what happened to it.
   aria-disabled carries the state to a reader without taking the press away.
   ------------------------------------------------------------------------ */
.btn.locked, .check.locked{
  color:var(--ink-2); border-color:var(--line-2); background:var(--fieldbg);
  cursor:pointer;
}
.btn.locked .uicon{opacity:.55}
/* The padlock is the last thing in the row, after the label, so the label
   still starts where it started on a phone. */
.btn.locked{display:inline-flex; align-items:center; gap:7px}
.btn.locked .uicon:last-child{opacity:.75; margin-left:1px}
.btn.locked:active{background:var(--head-bg)}

.check.locked{cursor:pointer; opacity:.72}
.check.locked input{pointer-events:none}
.check.locked .uicon{margin-left:auto; opacity:.75}

@media print{ .btn.locked, .check.locked{display:none} }

/* ---- a medal awarded outside first, second and third ---------------------
   Gold, silver and bronze mean first, second and third to everybody who
   looks at them, so a fourth place gets no color of its own: the mark is
   drawn in the page's own ink, unfilled, and reads plainly as a medal that
   is not one of those three. It appears only when an organization awards
   one, so nobody sees an empty fourth mark sitting at zero.
   ------------------------------------------------------------------------ */
.medalcount.other .uicon, .statpart.other .uicon{opacity:.75}
.statpart.other .statpart-value{color:var(--ink-2)}
.hero .statpart.other .statpart-value{color:rgba(255,255,255,.88)}

/* ================================================================ analysis

   Charts are SVG and plain boxes rather than a library, so they take their
   colours from here and work in all six schemes, in both light and dark,
   and print with the page. A canvas would do none of those three.

   Every bar is sized as a percentage by the view, so nothing here has a
   fixed height that a longer season could overflow. */

.pickline{display:flex; gap:8px; align-items:center; margin-bottom:12px}
.pickline select{flex:1 1 auto; min-width:0}
.pickhead{margin-bottom:6px}

.chartstage{position:relative; height:132px; margin-top:12px}
.chartbars{position:absolute; inset:0; display:flex; align-items:flex-end;
  gap:6px}
.chartbar{flex:1 1 0; min-width:3px; border-radius:5px 5px 0 0;
  background:var(--line)}
.chartbar.is-other{background:var(--accent)}
.chartbar.is-none{background:var(--line)}
.chartbar.is-score{background:var(--brand)}

/* preserveAspectRatio:none stretches the line to the bars underneath, so
   the stroke has to be told not to stretch with it. */
.chart-trend{position:absolute; inset:0; width:100%; height:100%;
  pointer-events:none}
.chart-trend line{stroke:var(--ink); stroke-width:2; stroke-dasharray:5 4;
  stroke-linecap:round; vector-effect:non-scaling-stroke}

.chartends{display:flex; justify-content:space-between; margin-top:6px;
  font-size:.7rem; color:var(--ink-2)}
.chartkey{display:flex; flex-wrap:wrap; gap:10px; margin-top:12px;
  padding-top:10px; border-top:1px solid var(--line)}
.chartkey-one{display:flex; align-items:center; gap:5px; font-size:.72rem;
  color:var(--ink-2)}
.chartkey-dot{width:10px; height:10px; border-radius:2px;
  background:var(--line)}
.chartkey-dot.is-none{background:var(--line)}

/* ---- a seat, and how far it sat from its own panel --------------------
   The bar grows from the middle, because the number it draws is signed:
   a seat that marked below its panel is not a shorter version of one that
   marked above it. */
.seatlist{display:flex; flex-direction:column; gap:12px; margin-top:4px}
.seathead{display:flex; justify-content:space-between; align-items:baseline;
  margin-bottom:5px}
.seatname{font-size:.84rem; font-weight:650}
.seatfig{font-size:.84rem}
.seatbar{position:relative; height:8px; background:var(--line-2);
  border-radius:4px; overflow:hidden}
.seatbar-mid{position:absolute; left:50%; top:0; bottom:0; width:1px;
  background:var(--line)}
.seatbar-fill{position:absolute; left:50%; top:0; bottom:0;
  background:var(--brand); border-radius:0 4px 4px 0}
.seatbar-fill.is-under{left:auto; right:50%; border-radius:4px 0 0 4px;
  background:var(--ink-2)}

/* ---- somebody you keep meeting --------------------------------------- */
.metlist{display:flex; flex-direction:column; gap:9px; margin-top:10px}
.metrow{display:flex; align-items:center; gap:10px; text-decoration:none;
  color:inherit}
.metrow:hover .metname{text-decoration:underline}
.metbody{flex:1 1 auto; min-width:0}
.metname{display:block; font-size:.86rem; font-weight:650}
.metsub{display:flex; align-items:center; gap:5px; flex-wrap:wrap}
.mettally{display:flex; align-items:center; gap:6px; flex:none}
.metnum{font-size:.86rem; font-weight:700}
.metnum.is-ahead{color:var(--good)}
.metnum.is-behind{color:var(--bad)}
.metbar{display:flex; width:44px; height:7px; border-radius:4px;
  overflow:hidden; background:var(--line-2)}
.metbar.is-wide{width:100%; height:12px; border-radius:6px; margin-top:4px}
.metbar-ahead{background:var(--good)}
.metbar-behind{background:var(--bad)}

/* The payoff of the card. Only drawn when it is unanimous, so it has to
   read as a finding rather than as a label on every row. */
.metflag{font-size:.62rem; font-weight:700; letter-spacing:.04em;
  text-transform:uppercase; border-radius:999px; padding:1px 6px;
  border:1px solid}
.metflag.is-always{color:#14532d; background:#dcf0e3; border-color:#a8d5b8}
.metflag.is-never{color:#7f1d1d; background:#fbe4e4; border-color:#e6b3b3}

.recordline{display:flex; align-items:baseline; gap:8px; margin:10px 0 0}
.recordnum{font-size:2rem; font-weight:750; line-height:1}
.recordnum.is-ahead{color:var(--good)}
.recordnum.is-behind{color:var(--bad)}
.recorddash{font-size:1.1rem; color:var(--ink-2)}

.factrows{display:flex; flex-direction:column; gap:6px; margin-top:12px;
  padding-top:10px; border-top:1px solid var(--line)}
.factline{display:flex; justify-content:space-between; gap:12px;
  font-size:.84rem; align-items:baseline}

.moreherebox{background:var(--line-2); border:1px solid var(--line);
  border-left:3px solid var(--accent); border-radius:12px; padding:13px 14px;
  margin-bottom:14px}
.moreherebox p{margin:5px 0 10px}

html[data-theme=dark] .metflag.is-always{color:#bbf0cd; background:#183826;
  border-color:#2d5c3f}
html[data-theme=dark] .metflag.is-never{color:#f6c9c9; background:#3a1c1c;
  border-color:#5e2e2e}

/* === ring-mates ========================================================
   Who else the host put in a ring. A list rather than a run of commas:
   twenty names joined by punctuation is a paragraph, and what somebody is
   doing with it at a tournament is looking for one of them. */
.ringmates{margin-top:6px}
.ringmatelist{
  margin:2px 0 0;
  padding-left:18px;
  columns:2;
  column-gap:14px;
}
.ringmatelist li{margin:1px 0; break-inside:avoid}
@media (max-width:420px){ .ringmatelist{columns:1} }

/* === the startup animation =============================================
   The belt ties, a bronze medal, a silver, a gold and then the trophy fly
   in from off the edges of the screen, each one sinking into the belt and
   raising one bar of the chart out of the spot it hit. The mark takes one
   breath, a gold ring leaves the knot, and the name populates underneath.
   Three seconds, and a tap anywhere cuts it short.

   Two things about how this is built, both deliberate.

   It runs on nothing but these rules. The markup is in index.html, the
   head decides whether it plays, and from there the stylesheet does the
   whole thing including clearing it off the screen afterwards. No timer
   in a module can fail and leave a navy sheet over the app.

   And it is hidden by default. Visible is the special case, turned on by
   html.splash-play, because the overlay has to be real markup for its
   first frame to arrive with the first paint -- so every launch that is
   not meant to show it must never paint it even once.

   html.splash-play  this launch gets the animation; start clearing it
   html.splash-go    one painted frame later; the sequence runs
   html.splash-skip  somebody tapped
   ----------------------------------------------------------------------- */

.splash{display:none}

html.splash-play .splash{
  display:flex; align-items:center; justify-content:center;
  position:fixed; inset:0; z-index:9800;
  /* It opens in the same navy the native splash screen is painted in, so
     the hand-off from it is not a change of color, and then moves to the
     primary color chosen in Settings while the belt is tying.

     The move is a transition rather than part of the sequence because the
     two have different jobs: the sequence is the same for everybody, and
     this is one color settling into another. The ground itself is read
     before the page is painted, by the script in the head of
     index.html. */
  background:#0d3346;
  transition:background-color calc(.6s * var(--sp)) ease;
  overflow:hidden;
}
html.splash-go .splash{background:var(--sp-ground,#0d3346)}

html.splash-play .splash-stage{
  display:flex; flex-direction:column; align-items:center;
  width:100%; max-width:560px;
}
html.splash-play .splash-mark{position:relative; width:58%; max-width:300px}
html.splash-play .splash-svg{width:100%; height:auto; display:block}

/* The awards ride in their own layer over the mark rather than inside its
   viewBox. In the viewBox they were clipped to the tile and sized against
   the logo, so they could not start off the screen and arrived a twentieth
   of the logo's width. Here the layer matches the logo's box, so a
   percentage still lands on a bar center, but the only thing that clips
   them is the edge of the screen. */
html.splash-play .awards{position:absolute; inset:0; overflow:visible; pointer-events:none}
html.splash-play .awardpos{
  position:absolute; width:44%; aspect-ratio:1; transform:translate(-50%,-50%);
}
html.splash-play .awardpos > .award{width:100%; height:100%; display:block}
html.splash-play .awardpos > .award svg{width:100%; height:100%; display:block}
/* Bar centers as a share of the icon's 512 box: 147, 217, 287 and 357, all
   meeting the belt's top line at y=300. */
html.splash-play .p1{left:28.71%; top:54%}
html.splash-play .p2{left:42.38%; top:54%}
html.splash-play .p3{left:56.05%; top:54%}
html.splash-play .p4{left:69.73%; top:52%}

html.splash-play .splash-word{
  display:flex; margin-top:17px; white-space:nowrap;
  font-family:system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
  font-weight:600; letter-spacing:-.01em; font-size:1.9rem;
}
/* Each letter is handed its place in the queue as --i from the markup.
   The default is here as well because a custom property with no value at
   all makes the whole declaration that uses it invalid, so one letter
   missing its number would mean one letter that never appears. */
html.splash-play .splash-word span{--i:0}
/* White and gold is right on a deep ground. On a pale primary color the
   white disappears, so the head script hands these over: the Mat flips to
   the logo's own navy and the gold goes a shade deeper. */
html.splash-play .splash-word .m{color:var(--sp-mat,#fff)}
html.splash-play .splash-word .r{color:var(--sp-rec,#e8b757)}

/* What turns and what rises, in the icon's own coordinates. view-box for
   the parts that move across the tile; fill-box for the flashes, so each
   one grows about its own center rather than about the middle of the 512
   box, which sent it flying across the picture. */
html.splash-play .splash-svg .bars rect,
html.splash-play .splash-svg .band path{transform-box:view-box}
html.splash-play .splash-svg .bars rect{transform-origin:center 300px}
html.splash-play .splash-svg .band path{transform-origin:36px 331px}
html.splash-play .splash-svg .knot{transform-box:view-box; transform-origin:256px 360px}
html.splash-play .splash-svg .burst{transform-box:view-box; transform-origin:256px 330px}
html.splash-play .splash-svg .flash{transform-box:fill-box; transform-origin:center}

/* Nothing is on screen at the first frame but the navy and the empty tile.
   This is the state the hand-off from the native splash lands on, so it
   has to hold with no animation running at all. */
html.splash-play .splash .band path,
html.splash-play .splash .knot,
html.splash-play .splash .bars rect,
html.splash-play .splash .award,
html.splash-play .splash .flash,
html.splash-play .splash .burst,
html.splash-play .splash-word span{opacity:0}

/* Every duration is multiplied by --sp, so the whole thing can be slowed
   down and watched without re-timing any of it. */
html.splash-play .splash{--sp:1}

/* ---- the belt ties ---- */
html.splash-go .band path{
  animation:spWipe calc(.34s * var(--sp)) cubic-bezier(.22,.9,.3,1) both;
}
html.splash-go .knot{
  animation:spKnot calc(.26s * var(--sp)) cubic-bezier(.3,1.55,.5,1)
    calc(.3s * var(--sp)) both;
}
@keyframes spWipe{
  from{transform:scaleX(0); opacity:1}
  to{transform:scaleX(1); opacity:1}
}
@keyframes spKnot{
  from{transform:scale(.5); opacity:0}
  to{transform:scale(1); opacity:1}
}

/* ---- four awards arrive ----
   Each from a different edge, so four arrivals do not read as one move
   repeated. Each is at full opacity before it crosses in: a medal that
   fades up on its way reads as an effect rather than as an object
   arriving.

   Where each one waits is measured in screen widths and screen heights,
   not in its own width. In its own width it was not far enough. The
   award waits at its starting point all the way through its delay -- that
   is what holds it off the screen until its turn -- and on a phone the
   trophy's wait, four of its own widths above a mark that is a third of
   the way down an 844-point screen, left it poking over the top edge. So
   a gold trophy sat at the top of the screen for the first two seconds,
   in plain view, waiting to drop. One screen width or height moves
   anything that starts near the middle of the screen clear off it,
   whatever the screen is. */
@keyframes spFlyA{
  from{transform:translate(-100vw,30vh) scale(.9) rotate(-160deg); opacity:1}
  to{transform:translate(0,0) scale(1) rotate(0); opacity:1}
}
@keyframes spFlyB{
  from{transform:translate(100vw,-30vh) scale(.9) rotate(180deg); opacity:1}
  to{transform:translate(0,0) scale(1) rotate(0); opacity:1}
}
@keyframes spFlyC{
  from{transform:translate(100vw,30vh) scale(.9) rotate(150deg); opacity:1}
  to{transform:translate(0,0) scale(1) rotate(0); opacity:1}
}
@keyframes spFlyD{
  from{transform:translate(0,-100vh) scale(.9) rotate(-40deg); opacity:1}
  to{transform:translate(0,0) scale(1) rotate(0); opacity:1}
}

/* Then it is absorbed: it sinks into the belt and goes, and the bar it
   paid for rises out of the same spot.

   Two animations on one element, both driving transform. The sink is
   second so it wins once it starts, and its fill mode is forwards rather
   than both on purpose. A backwards fill applies an animation's own first
   frame all the way through its delay, which would park each award on the
   belt from the start and the fly-in would never show. */
html.splash-go .a1, html.splash-go .a2,
html.splash-go .a3, html.splash-go .a4{animation-name:var(--fly), spSink}
html.splash-go .a1{--fly:spFlyA}
html.splash-go .a2{--fly:spFlyB}
html.splash-go .a3{--fly:spFlyC}
html.splash-go .a4{--fly:spFlyD}
html.splash-go .award{
  animation-duration:calc(.36s * var(--sp)), calc(.18s * var(--sp));
  animation-timing-function:cubic-bezier(.34,.07,.2,1), ease-in;
  animation-fill-mode:both, forwards;
}
html.splash-go .a1{animation-delay:calc(.5s * var(--sp)), calc(.86s * var(--sp))}
html.splash-go .a2{animation-delay:calc(.94s * var(--sp)), calc(1.3s * var(--sp))}
html.splash-go .a3{animation-delay:calc(1.38s * var(--sp)), calc(1.74s * var(--sp))}
/* Slower in and slower out. The trophy is the heaviest thing here and the
   last beat before the burst, so it is given the time to land. */
html.splash-go .a4{
  animation-duration:calc(.44s * var(--sp)), calc(.2s * var(--sp));
  animation-delay:calc(1.82s * var(--sp)), calc(2.26s * var(--sp));
}
@keyframes spSink{
  from{transform:translateY(0) scale(1); opacity:1}
  to{transform:translateY(42%) scale(.45); opacity:0}
}

/* A flash on the belt at each landing, so the impact is felt.

   forwards, not both, for the reason above and it showed: with a backwards
   fill each of these painted its own first frame all through its delay,
   which is a white disc at .9 opacity sitting on the belt from the moment
   the animation starts. Four bright dots marking where the awards were
   going to land, for three seconds before any of them got there. */
html.splash-go .flash{animation:spFlash calc(.28s * var(--sp)) ease-out forwards}
html.splash-go .f1{animation-delay:calc(.84s * var(--sp))}
html.splash-go .f2{animation-delay:calc(1.28s * var(--sp))}
html.splash-go .f3{animation-delay:calc(1.72s * var(--sp))}
html.splash-go .f4{animation-delay:calc(2.24s * var(--sp))}
@keyframes spFlash{
  from{opacity:.9; transform:scale(.4)}
  to{opacity:0; transform:scale(1.6)}
}

/* And the bar rises out of the belt, from the belt's own top line. */
html.splash-go .bars rect{
  animation:spRise calc(.26s * var(--sp)) cubic-bezier(.2,1.25,.35,1) both;
}
html.splash-go .bars rect:nth-child(1){animation-delay:calc(.88s * var(--sp))}
html.splash-go .bars rect:nth-child(2){animation-delay:calc(1.32s * var(--sp))}
html.splash-go .bars rect:nth-child(3){animation-delay:calc(1.76s * var(--sp))}
html.splash-go .bars rect:nth-child(4){
  animation-duration:calc(.32s * var(--sp));
  animation-delay:calc(2.28s * var(--sp));
}
@keyframes spRise{
  from{transform:scaleY(0); opacity:.2}
  to{transform:scaleY(1); opacity:.6}
}

/* ---- the burst ----
   A gold ring leaves the knot and the whole mark takes one breath. This is
   what the name arrives on, rather than the name arriving on its own.
   forwards again: with a backwards fill this one sat on the knot as a fat
   gold ring for the first two and a half seconds. */
html.splash-go .burst{
  animation:spBurst calc(.46s * var(--sp)) cubic-bezier(.2,.7,.3,1)
    calc(2.62s * var(--sp)) forwards;
}
@keyframes spBurst{
  from{transform:scale(.2); opacity:.85; stroke-width:22}
  to{transform:scale(2.3); opacity:0; stroke-width:2}
}
html.splash-go .splash-mark{
  animation:spBreathe calc(.44s * var(--sp)) cubic-bezier(.3,1.4,.4,1)
    calc(2.6s * var(--sp)) both;
}
@keyframes spBreathe{
  0%{transform:scale(1)}
  38%{transform:scale(1.075)}
  100%{transform:scale(1)}
}

/* ---- the name populates, a letter at a time ---- */
html.splash-go .splash-word span{
  animation:spLetter calc(.26s * var(--sp)) cubic-bezier(.2,1.2,.4,1) both;
  animation-delay:calc((2.74s + var(--i) * .03s) * var(--sp));
}
@keyframes spLetter{
  from{opacity:0; transform:translateY(9px) scale(.9)}
  to{opacity:1; transform:none}
}

/* ---- and it gets off the screen ----
   Keyed to splash-play, not splash-go, so the overlay clears itself even
   if that second frame never arrives for some reason.

   The last letter of the name starts at 2.98s and takes .26s, so the word
   is not finished until 3.24s. This used to begin at 3.15s, which started
   taking the screen away while the d was still arriving and nobody ever
   saw the name whole. It waits three quarters of a second after the last
   letter now, which is about as long as it takes to read.

   visibility rather than display, because display is not animatable and
   this has to be one declaration that cannot be left half applied. */
html.splash-play .splash{
  animation:spDone calc(.22s * var(--sp)) ease-in calc(4s * var(--sp)) forwards;
}
@keyframes spDone{
  from{opacity:1}
  to{opacity:0; visibility:hidden; pointer-events:none}
}

/* A tap cuts it short, from any point in the sequence. */
html.splash-skip .splash{animation:spDone .15s ease-in forwards}

/* And then it is finished with, for good. The rule above is what the user
   sees happen; this is what makes sure a late tap cannot bring it back. */
html.splash-done .splash{display:none !important}

/* === the calendar =======================================================
   A month of boxes and one day beside it.

   The whole layout turns on one idea: both halves are always drawn, and
   this file decides which of them is on screen. On a phone it is the
   month, or the day once one is picked. Given room, it is both. Nothing
   in JavaScript measures anything, which is why folding a phone open
   mid-way through works without a line of code.
   ----------------------------------------------------------------------- */

.calpage{display:flex; flex-direction:column; gap:12px}

/* ---- the season's months ----
   Twelve chips with a count on each. This is what stops the grid being a
   maze: a family competes on nine days in a year, and the empty months
   have to look empty or somebody pages through them one at a time. */
/* Six and six rather than one scrolling row. A row of twelve put five of
   them off the right edge of a phone, and a strip whose whole job is to
   show which months hold something cannot hold half of them off screen:
   somebody looking for March would have found an empty August and
   concluded there was nothing to find. */
.calmonths{
  display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:5px;
}
@media(min-width:760px){
  .calmonths{grid-template-columns:repeat(12,minmax(0,1fr))}
}
.calmonth{
  text-align:center; padding:6px 2px; min-width:0;
  border:1px solid var(--line); border-radius:9px; background:var(--card);
  color:var(--ink); line-height:1.15;
}
.calmonth-name{display:block; font-size:.68rem; font-weight:600; letter-spacing:.3px}
.calmonth-n{display:block; font-size:.86rem; font-weight:700;
  font-variant-numeric:tabular-nums}
.calmonth-bare{background:transparent; color:var(--ink-2); opacity:.6}
.calmonth.on{background:var(--brand); border-color:var(--brand); color:#fff}

/* ---- which month ---- */
.calhead{display:flex; align-items:center; justify-content:space-between; gap:8px}
.calhead-mid{text-align:center; line-height:1.2}
.calhead-name{font-size:1.06rem; font-weight:700}
.calhead-today{font-size:.72rem; font-weight:600}
.calstep{
  flex:none; width:44px; height:40px; display:flex; align-items:center;
  justify-content:center; border:1px solid var(--line); border-radius:10px;
  background:var(--card); color:var(--brand); font-size:1.3rem; line-height:1;
}
/* An arrow with nowhere to go keeps its place rather than vanishing, so
   the month name does not jump sideways at the ends of a season. */
.calstep.is-off{color:var(--line); background:transparent; border-color:transparent}

/* ---- the grid ---- */
.calweek{display:grid; grid-template-columns:repeat(7,minmax(0,1fr));
  gap:2px; margin-bottom:3px}
.calwk{text-align:center; font-size:.62rem; font-weight:600; letter-spacing:.4px;
  color:var(--ink-2); text-transform:uppercase}
.calgrid{display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:2px}
.calcell{
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap:2px; min-height:52px; border-radius:9px; border:1px solid transparent;
  color:var(--ink);
}
.calnum{font-size:.88rem; font-variant-numeric:tabular-nums}
.calmarks{display:flex; gap:3px; align-items:center; justify-content:center;
  min-height:9px}
.calcell-out{color:var(--ink-2); opacity:.4}
.calcell-busy{background:var(--card); border-color:var(--line)}
.calcell-busy .calnum{font-weight:700}
.calcell-today{box-shadow:inset 0 0 0 2px var(--brand)}
.calcell-on{background:var(--brand-l); border-color:var(--brand)}

/* The markers differ in shape as well as in color, because a filled dot
   and a ring are told apart by anyone and two colors are not. */
.calmark{display:block; width:7px; height:7px; border-radius:999px}
.calmark-tournament{background:var(--brand)}
.calmark-registration{border:1.5px solid var(--accent)}
.calmark-correction{background:var(--ink-2); opacity:.5}
.calmark-seasonEnd{border:1.5px solid var(--ink-2); border-radius:2px}

.callegend{display:flex; flex-wrap:wrap; gap:6px 14px; margin-top:9px;
  font-size:.72rem; color:var(--ink-2)}
.callegend span{display:flex; align-items:center; gap:5px}

/* ---- a row that leads somewhere ----
   The same shape in the month list, the day panel and the deadlines, so
   the three read as one kind of thing. */
.calrow{
  display:flex; align-items:center; gap:10px; padding:9px 2px;
  border-bottom:1px solid var(--line-2); min-height:48px; color:var(--ink);
}
.calrow:last-child{border-bottom:0}
.calrow-text{flex:1 1 auto; min-width:0}
.calrow-name{display:block; font-size:.88rem; font-weight:600;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.calrow-sub{display:block; font-size:.74rem; color:var(--ink-2);
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.calrow-lead .calrow-name{font-size:1rem}
.calrow svg{flex:none; color:var(--ink-2)}

.calchip{
  flex:none; width:40px; border-radius:9px; padding:4px 0; text-align:center;
  background:var(--brand-l); color:var(--brand-d); line-height:1.15;
}
.calchip-m{display:block; font-size:.58rem; font-weight:700; letter-spacing:.4px;
  text-transform:uppercase}
.calchip-d{display:block; font-size:.94rem; font-weight:700;
  font-variant-numeric:tabular-nums}

.calplaces{flex:none; display:flex; gap:4px}
/* A ring in the medal's color with the place written in ink, rather than
   ink on a pale gold fill, which only just passes for contrast. */
.calplace{
  font-size:.7rem; font-weight:700; padding:2px 7px; border-radius:999px;
  background:var(--card); border:1.5px solid var(--line); color:var(--ink);
}

/* ---- the day ---- */
.caldayhead{margin-bottom:10px}
.caldayhead h2{margin:0; font-size:1.2rem}
.calalso{display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px}
.calalso-box{
  background:var(--fieldbg); border:1px solid var(--line-2); border-radius:10px;
  padding:9px 11px;
}
.calalso-n{display:block; font-size:1.1rem; font-weight:700; line-height:1.1}
.calalso-label{display:block; font-size:.7rem; color:var(--ink-2)}
.calback{display:inline-block; margin-bottom:8px; font-size:.82rem; font-weight:600}
.calday-empty{padding:18px 2px}

/* ---- which half is on screen ----
   Narrow: the month, or the day once one is picked, never both. The day
   is still in the page, which is what makes opening the phone show it
   without anything being fetched or re-rendered. */
.calsplit{display:flex; flex-direction:column; gap:12px}
.calsplit .caldayside{display:none}
.calsplit.has-day .calmonthside{display:none}
.calsplit.has-day .caldayside{display:block}

/* Wide enough for both, which is a tablet, a desktop window, a phone
   opened out, and half of a large screen. */
@media(min-width:760px){
  .calsplit, .calsplit.has-day{display:flex; flex-direction:row; gap:18px;
    align-items:flex-start}
  .calsplit .calmonthside, .calsplit.has-day .calmonthside{
    display:block; flex:1 1 0; min-width:0}
  .calsplit .caldayside, .calsplit.has-day .caldayside{
    display:block; flex:1 1 0; min-width:0}
  /* The way back to the month is the month, sitting right there. */
  .calback{display:none}
  .calcell{min-height:58px}
}

@media print{
  .calmonths, .calstep, .calhead-today, .calback{display:none !important}
  .calsplit, .calsplit.has-day{display:block}
  .calsplit .calmonthside, .calsplit .caldayside,
  .calsplit.has-day .calmonthside, .calsplit.has-day .caldayside{display:block}
  .calcell{border:1px solid #999; min-height:58px; break-inside:avoid}
  .calgrid{gap:0}
}

/* ---- the ways in to the calendar ----
   Two shapes, because the two places are different. Beside a season
   selector it is a control and sits in the row with one. In a sentence
   it is a date that happens to lead somewhere, and dressing that as a
   button would make the sentence read as a toolbar. */
.seasoncal{
  display:inline-flex; align-items:center; gap:7px; align-self:flex-end;
  min-height:44px; padding:0 13px; border:1px solid var(--line);
  border-radius:10px; background:var(--card); color:var(--brand);
  font-size:.86rem; font-weight:600; white-space:nowrap;
}
.seasoncal svg{flex:none}
/* On the hero it is text and nothing else. A bordered box directly under
   the season selector read as a second control in a pair, and the pair
   was not a pair. The tap target keeps its height; it is only the box
   around it that goes.

   ---- the negative bottom margin, which is the whole trick ----
   Stripped of its border this is a line of text about 16px tall sitting
   in a box 44px tall, because the box is a tap target and a tap target
   has to be 44. That leaves roughly 14px of nothing above the words and
   14 below, inside the box and invisible.

   So a gap set between the boxes is not the gap anybody sees: it is the
   gap plus 14. Set to the page's own section spacing it measured 31
   where the ink was, against 12 above, and read as a hole. The margin
   below pulls the next section back up through that dead half, so what
   is set is what is seen. The top is only -2 because the season bar
   above is painted and its edge really is where it ends. */
.seasoncal.on-hero{
  align-self:auto; margin:-2px 0 -14px; padding:0;
  border:0; background:transparent; color:#fff;
}
/* Nothing bordered of its own on the Tournaments page: the way in
   there is an ordinary ghost button, built by link() like every other
   bordered button on a page of cards, so it cannot drift away from
   them by being styled apart. A painted box also needs no ink
   compensation -- its edge is where it ends. */
/* The row that holds the link where it sits between cards rather than
   inside a hero. Named for what it is rather than as another calrow:
   .calrow is already a row inside the calendar's own day panel, and
   taking that name quietly inherited its border and its nine pixels of
   padding. Flex, not a plain block, because a block puts a line box
   under the link that measured seventeen pixels of nothing. The bottom
   margin is the one the cards use. */
.calwayin{display:flex; margin:0 0 14px}
/* In the hero it carries no margin of its own: the section below it
   brings its own sixteen, and the link's negative bottom margin is what
   turns that into the gap somebody actually sees. */
.hero .calwayin{margin:0}
.seasoncal.on-hero:hover{text-decoration:underline; text-underline-offset:3px}
@media print{ .seasoncal{display:none !important} }

.daylink{font-weight:600; text-decoration:underline; text-underline-offset:2px}

/* ---- previous and next, through a list of tournaments ----
   .pagenav does the buttons; this is the line above them. It exists
   because an arrow walking six of forty and an arrow walking all forty
   look exactly alike, and the difference is the whole point. */
/* In the page header, under the name and above the buttons. It went at
   the foot first, where it was out of the way and also out of mind: the
   arrows are about which tournament you are looking at, so they belong
   with its name rather than after everything it contains. One row, since
   a header that grows by two rows on a phone pushes the page off screen.

   flex-basis of 100% so it takes a line of its own in a header that
   wraps, rather than squeezing in beside the title. */
/* Chris's report: a long tournament name runs the row off the side of
   the screen.

   It was not the names. flex-shrink was zero, so the row could never
   be narrower than its contents, and max-width was a percentage of
   that unconstrained width rather than of the screen. Measured on a
   390px phone, the row came out 733px wide with each name allowed 308
   of them and the forward link starting at x=439, which is 49px past
   the right edge of the page.

   So no character count, which would only be right at one width. The
   counter in the middle takes what it needs, and the two names share
   whatever is left in equal halves, at every width there is. */
.tournav{
  flex:1 1 100%; min-width:0; display:flex; align-items:center; gap:10px;
  max-width:100%; justify-content:space-between; margin-top:2px;
}
.tourstep{
  display:flex; align-items:center; gap:6px; min-width:0;
  flex:1 1 0; min-height:38px; padding:0 2px; color:var(--brand);
  font-size:.84rem; font-weight:600;
}
/* Each on its own end of the row, so the arrows stay at the edges
   rather than drifting in beside a short name. */
.tourstep-back{justify-content:flex-start}
.tourstep-on{justify-content:flex-end}
.tourstep-name{
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap; min-width:0;
}
.tourarrow{flex:none; font-size:1rem; line-height:1}
/* The side with nowhere to go holds its place, so the one that is left
   stays on its own end of the row instead of sliding to the middle. */
.tourstep.is-off{visibility:hidden}
.tournav-say{
  flex:none; font-size:.7rem; color:var(--ink-2); text-align:center;
  white-space:nowrap; font-variant-numeric:tabular-nums;
}
/* The header condenses to the name alone once it pins, and the buttons
   go with it. These are navigation, not content, so they go too. */
.pagehead.is-stuck .tournav{display:none}
@media print{ .tournav{display:none !important} }

/* ---- medals beside a name on a day ----
   A count per metal rather than a chip per placing: six events put six
   chips on the row and pushed the name off the end of it. */
.calmedals{flex:none; display:flex; gap:7px; align-items:center}
.calmedal{display:flex; align-items:center; gap:2px}
.calmedal-n{font-size:.76rem; font-weight:700; font-variant-numeric:tabular-nums}

/* ---- a day row with two things you can do to it ----
   The name goes to their profile and everywhere else goes somewhere more
   useful. The second target is a stretched link under the whole row
   rather than a half of it, so "anywhere else" really is anywhere else
   and neither target is a sliver. resultTools says the same thing from
   the other end: a row that navigates wherever it is pressed cannot hold
   anything else, which is why these rows held only one thing. */
.calrow-two{position:relative}
.calrow-more{
  position:absolute; inset:0; z-index:1; display:block; width:100%;
  border:0; background:transparent; padding:0; cursor:pointer;
  border-radius:8px;
}
.calrow-more:focus-visible{outline:2px solid var(--brand); outline-offset:-2px}
.calrow-two > .calrow-text, .calrow-two > .calmedals,
.calrow-two > svg{position:relative; pointer-events:none}
/* The name alone sits above the stretched one and takes its own taps. */
.calrow-who{
  position:relative; z-index:2; pointer-events:auto;
  display:inline-block; font-size:.88rem; font-weight:600; color:var(--ink);
  max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.calrow-who:hover{color:var(--brand); text-decoration:underline;
  text-underline-offset:2px}

/* ---- results pasted out of a chat, waiting to be reviewed ----
   A name, a line saying what the app made of it, and the buttons that
   settle it. The buttons wrap under the name on a phone rather than
   squeezing it, because the sentence is the part being read. */
.pendlist{border-top:1px solid var(--line-2); margin-top:4px}
.pendrow{
  display:flex; align-items:center; flex-wrap:wrap; gap:6px 10px;
  min-height:48px; padding:8px 0; border-bottom:1px solid var(--line-2);
}
.pendwho{flex:1 1 180px; min-width:0}
.pendname{display:block; font-size:.88rem; font-weight:600;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
/* Wraps. It carries the reason a row is waiting, so clipping it to one
   line would hide the half of the sentence that says what to do. */
.pendsub{display:block; font-size:.74rem; color:var(--ink-2);
  line-height:1.35}
.pendacts{
  display:flex; flex-wrap:wrap; align-items:center; gap:6px;
  flex:0 1 auto; margin-left:auto; justify-content:flex-end;
}
.pendacts .btn{
  flex:none; max-width:100%; font-size:.78rem; padding:7px 11px;
  min-height:36px;
}
.pendrow .quickedit{flex:none}
/* 16px, like every other field in this app, because below it iPhone
   zooms the page in when the field is tapped and does not reliably zoom
   back out again -- which leaves the app clipped off the side of the
   screen with no way back. The monospace is kept; only the size moves. */
#pastebox{width:100%; font-size:16px; line-height:1.4}

/* ---- the one way in -----------------------------------------------------
   A dashed edge, because that is what everything else on a phone uses to
   mean "this takes a drop". It is also just a box on a touch screen,
   where there is nothing to drop, so the buttons inside it have to carry
   the whole thing on their own. */
.dropzone{
  border:2px dashed var(--line-2); border-radius:14px;
  padding:14px; display:flex; flex-direction:column; gap:10px;
  background:transparent;
  transition:border-color .15s ease, background .15s ease;
}
.dropzone.is-over{border-color:var(--brand); background:var(--brand-l)}
.dropzone-lead{margin:0; font-size:.82rem; color:var(--ink-2);
  line-height:1.4}
.dropzone .linkrow{margin:0}
.dropzone > p:last-child{margin-bottom:0}

/* ---- make a belt --------------------------------------------------------
   For a common opponent whose belt is not in the list. A layout, then a
   part of the belt, then a color: every answer a tap. */
.beltmaker{display:flex; flex-direction:column; gap:14px}
.bmpreview{display:flex; flex-direction:column; gap:8px; background:var(--bg);
  border-radius:14px; padding:16px 18px}
.bmpreview .belt.bmbelt{display:flex; width:100%; min-height:34px}
.bmdesc{font-size:.84rem; font-weight:700; text-align:center}
.ttiles.bmlayouts{grid-template-columns:repeat(3, minmax(0, 1fr)); gap:8px}
.bmlayout{padding:10px 9px; gap:7px}
.bmlayout.is-on{padding:9px 8px}
.bmlayout .belt.beltswatch{width:100%; min-height:14px}
.bmlayout .ttile-label{font-size:.82rem}
.bmparts .bmpart{display:inline-flex; align-items:center; gap:7px; padding-left:6px}
.bmdot{width:20px; height:20px; border-radius:50%; flex:none; box-sizing:border-box;
  border:1px solid rgba(0,0,0,.22)}
.bmdot.is-none{background:repeating-linear-gradient(45deg, var(--card) 0 3px,
  var(--line-2) 3px 5px)}
.bmpart-val{font-weight:600; color:var(--ink-2)}
.bmpart.is-on .bmpart-val{color:inherit}
.bmcount{display:flex; align-items:center; justify-content:space-between; gap:10px;
  background:var(--bg); border-radius:12px; padding:8px 12px; margin-top:10px}
.bmcount-text{display:flex; flex-direction:column; gap:1px; min-width:0}
.bmcount-label{font-size:.9rem; font-weight:800}
.bmcount-sub{font-size:.76rem; color:var(--ink-2)}
.bmcolors{display:grid; grid-template-columns:repeat(auto-fill, minmax(44px, 1fr));
  gap:10px 4px; margin-top:12px}
.bmcolor{display:flex; flex-direction:column; align-items:center; gap:4px; border:0;
  background:none; padding:3px 0; font:inherit; color:var(--ink-2); cursor:pointer;
  min-width:0}
.bmcolor-dot{width:36px; height:36px; border-radius:50%; box-sizing:border-box;
  border:1px solid rgba(0,0,0,.12)}
.bmcolor-dot.is-light{border-color:rgba(0,0,0,.28)}
.bmcolor-dot.is-none{border:1px dashed var(--line-2); background:var(--card)}
.bmcolor.is-on .bmcolor-dot{box-shadow:0 0 0 3px var(--card), 0 0 0 5px var(--brand)}
.bmcolor-name{font-size:.68rem; font-weight:700}
.bmcolor.is-on .bmcolor-name{color:var(--brand-d)}

/* ---- setup hubs ---------------------------------------------------------
   One page that says where each part of a setup stands, the parts
   themselves, and the reminder on the home page for a setup left halfway.
   Amber is "started": the same amber as anything else waiting on you. */
.hub{display:flex; flex-direction:column; gap:12px}
.hubhead{display:flex; flex-direction:column; gap:8px; background:var(--card);
  border:1px solid var(--line); border-radius:16px; padding:14px}
.hubhead-top{display:flex; justify-content:space-between; align-items:baseline; gap:10px}
.hubhead-name{font-size:1rem; font-weight:800; min-width:0}
.hubhead-count{font-size:.82rem; font-weight:700; color:var(--brand); flex:none}
.hubhead-sub{margin:0; font-size:.82rem; color:var(--ink-2)}
.hubbar{height:8px; border-radius:4px; background:var(--line); overflow:hidden}
.hubbar-fill{display:block; height:100%; background:var(--brand); border-radius:4px}
.hublist{display:flex; flex-direction:column; background:var(--card);
  border:1px solid var(--line); border-radius:16px; overflow:hidden}
.hubrow{display:flex; align-items:center; gap:12px; padding:13px 14px;
  border-bottom:1px solid var(--line); color:var(--ink); text-decoration:none}
.hubrow:last-child{border-bottom:0}
.hubrow.is-started{background:rgba(224,161,0,.1)}
.hubmark{width:30px; height:30px; border-radius:50%; flex:none; display:flex;
  align-items:center; justify-content:center; box-sizing:border-box;
  border:2px dashed var(--line-2); color:var(--ink-2); font-size:.8rem; font-weight:800}
.hubmark.is-done{border:0; background:var(--good); color:#fff}
.hubmark.is-done .uicon{color:#fff}
.hubmark.is-started{border:2px solid #e0a100; color:var(--warn)}
.hubrow-text{flex:1; display:flex; flex-direction:column; gap:1px; min-width:0}
.hubrow-label{font-size:.95rem; font-weight:800}
.hubrow-note{font-size:.78rem; color:var(--ink-2)}
.hubrow.is-started .hubrow-note{color:var(--warn)}
.hubrow-state{font-size:.74rem; font-weight:700; color:var(--ink-2); flex:none}
.hubrow.is-done .hubrow-state{color:var(--good)}
.hubrow.is-started .hubrow-state{color:var(--warn)}
.btn.hubgo{width:100%; justify-content:center; min-height:50px; font-size:1rem}
.hubfoot-note{margin:0; font-size:.78rem; color:var(--ink-2); text-align:center}
.hubstep{display:flex; flex-direction:column; gap:14px}
.hubstep > .tlive{display:flex; flex-direction:column; gap:18px}
.hubstep-intro{margin:0; font-size:.86rem; color:var(--ink-2)}
.hubstep-foot{position:sticky; bottom:0; display:flex; gap:10px; padding:12px 0;
  background:var(--bg); border-top:1px solid var(--line); z-index:5}
.hubstep-foot .btn{min-height:48px}
.hubstep-foot .btn:last-child{flex:1; justify-content:center}
.hubbanner{display:flex; flex-direction:column; gap:4px; margin-bottom:12px}
.hubbanner-main{display:flex; align-items:center; gap:12px; background:var(--card);
  border:1px solid #e8c34a; border-left:5px solid #e0a100; border-radius:14px;
  padding:12px}
.hubbanner-text{flex:1; display:flex; flex-direction:column; gap:4px; min-width:0}
.hubbanner-title{font-size:.95rem; font-weight:800}
.hubbanner-sub{font-size:.78rem; color:var(--ink-2)}
.hubbanner .hubbar{height:6px; background:rgba(224,161,0,.22)}
.hubbanner .hubbar-fill{background:#e0a100}
.hubbanner-later{align-self:flex-end; border:0; background:none; padding:4px 2px;
  font:inherit; font-size:.78rem; color:var(--ink-2); cursor:pointer;
  text-decoration:underline}
.sspair{display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:8px}
.tsec .input + .sspair, .tsec .sspair + .sspick{margin-top:8px}
.sspick{display:flex; align-items:center; justify-content:space-between; gap:10px;
  width:100%; border:1px solid var(--line); border-radius:10px; background:var(--card);
  padding:11px 12px; font:inherit; color:var(--ink); text-align:left; cursor:pointer}
.sspick-label{font-weight:700}
.sspick-sub{font-size:.78rem; color:var(--ink-2)}
.hubtabs{display:flex; gap:4px; overflow-x:auto; border-bottom:1px solid var(--line)}
.hubtab{border:0; border-bottom:3px solid transparent; background:none;
  padding:8px 8px; font:inherit; font-size:.92rem; font-weight:700; color:var(--ink-2);
  white-space:nowrap; cursor:pointer; display:inline-flex; gap:5px}
.hubtab.is-on{border-bottom-color:var(--brand); color:var(--brand-d); font-weight:800}
.hubtab-done{color:var(--good)}
.progcard{display:flex; flex-direction:column; gap:10px; border:1px solid var(--line);
  border-radius:14px; background:var(--card); padding:12px 13px}
.progcard.is-on{border:2px solid var(--brand); background:var(--brand-l); padding:11px 12px}
.progcard-head{display:flex; justify-content:space-between; align-items:baseline; gap:10px;
  border:0; background:none; padding:0; font:inherit; color:var(--ink); text-align:left;
  cursor:pointer}
.progcard-text{display:flex; flex-direction:column; gap:1px; min-width:0}
.progcard-name{font-size:.95rem; font-weight:800}
.progcard-sub{font-size:.76rem; color:var(--ink-2)}
.progcard-state{font-size:.74rem; font-weight:800; text-transform:uppercase;
  letter-spacing:.06em; color:var(--ink-2)}
.progcard.is-on .progcard-state{color:var(--brand-d)}
.progcard-belts{display:grid; grid-template-columns:repeat(4, minmax(0, 1fr)); gap:10px 8px}
.progcard:not(.is-on) .progcard-belts{opacity:.5}
.progbelt{display:flex; flex-direction:column; gap:4px; min-width:0}
.progbelt .belt.beltswatch{width:100%; min-height:16px}
.progbelt-name{font-size:.7rem; font-weight:700; line-height:1.2}
.progcard-edit{align-self:flex-end; font-size:.8rem; font-weight:700; color:var(--brand)}
.peoplechips .pchip{display:inline-flex; align-items:center; gap:4px; border:1px solid var(--brand);
  background:var(--brand-l); color:var(--brand-d); border-radius:999px;
  padding:5px 6px 5px 12px; font-size:.88rem; font-weight:700}
.pchip-x{border:0; background:none; padding:0 6px; font:inherit; font-size:1.1rem;
  line-height:1; color:inherit; cursor:pointer}
.tlink.is-danger{color:var(--bad)}

/* ---- organization setup -------------------------------------------------
   Each part is a stack of cards: what is set now, and Change to edit it. */
.orgtiles{display:flex; flex-direction:column; gap:8px}
.orgtile{display:flex; flex-direction:column; gap:3px; border:1px solid var(--line);
  border-radius:14px; background:var(--card); padding:13px 14px; font:inherit;
  color:var(--ink); text-align:left; cursor:pointer}
.orgtile.is-on{border:2px solid var(--brand); background:var(--brand-l); padding:12px 13px}
.orgtile-name{font-size:1rem; font-weight:800}
.orgtile.is-on .orgtile-name{color:var(--brand-d)}
.orgtile-sub{font-size:.8rem; color:var(--ink-2)}
.orgcards{display:flex; flex-direction:column; gap:12px}
.orgcard{display:flex; flex-direction:column; gap:8px; border:1px solid var(--line);
  border-radius:14px; background:var(--card); padding:12px 13px}
.orgcard.is-quiet{border-style:dashed; background:transparent}
.orgcard-head{display:flex; justify-content:space-between; align-items:baseline; gap:10px}
.orgcard-title{font-size:.95rem; font-weight:800}
.orgcard-change{border:0; background:none; padding:2px 0; font:inherit; font-size:.85rem;
  font-weight:700; color:var(--brand); cursor:pointer}
.orgcard-sub{margin:-4px 0 0; font-size:.78rem; color:var(--ink-2)}
.orgpills{display:flex; flex-wrap:wrap; gap:6px}
.orgpill{display:inline-flex; align-items:baseline; gap:5px; border:1px solid var(--line);
  background:var(--bg); border-radius:8px; padding:4px 8px; font-size:.78rem; font-weight:700}
.orgpill-code{font-family:ui-monospace, Menlo, monospace; font-size:.7rem; color:var(--brand)}
.orgfams{display:flex; flex-direction:column; gap:5px}
.orgfam{margin:0; font-size:.82rem}
.orgcode{display:flex; flex-direction:column; gap:4px; align-items:flex-start}
.orgcode-code{font-family:ui-monospace, Menlo, monospace; font-size:1.25rem; font-weight:800;
  letter-spacing:1px; color:var(--brand-d); background:var(--brand-l); border-radius:10px;
  padding:7px 12px}
.orgcode-who{font-size:.76rem; color:var(--ink-2)}
.tlink.orgback{margin-bottom:4px}
.orgbelts{display:grid; grid-template-columns:repeat(auto-fill, minmax(28px, 1fr)); gap:3px}
.orgbelts .belt.beltswatch{width:100%; min-height:12px}
.orgcard-limit{margin:-4px 0 0; font-size:.82rem}
.orgrules{display:flex; flex-direction:column; gap:3px; background:rgba(224,161,0,.12);
  border-radius:10px; padding:8px 10px; font-size:.8rem}
.orgtablewrap{overflow-x:auto}
.orgtable{width:100%; border-collapse:collapse; font-size:.84rem}
.orgtable th{text-align:left; font-size:.7rem; font-weight:700; color:var(--ink-2);
  padding:2px 4px}
.orgtable td{padding:8px 4px; border-top:1px solid var(--line); cursor:pointer}
.orgtable td:first-child{font-weight:700}
.orgtable .num{text-align:right; font-variant-numeric:tabular-nums; width:40px}
.orgpoints{display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:8px}
.orgpoint{display:flex; flex-direction:column; gap:4px; font-size:.78rem; font-weight:700;
  color:var(--ink-2)}
.orgseason{display:flex; gap:8px}
.orgseason-box{flex:1; display:flex; flex-direction:column; gap:1px; background:var(--bg);
  border-radius:12px; padding:9px 11px; font-size:.74rem; color:var(--ink-2)}
.orgseason-box strong{font-size:.95rem; color:var(--ink)}
.orgclassrow{display:flex; justify-content:space-between; gap:10px; border:0;
  border-top:1px solid var(--line); background:none; padding:8px 0; font:inherit;
  font-size:.86rem; font-weight:700; color:var(--ink); text-align:left; cursor:pointer}
.orgadd{display:flex; flex-wrap:wrap; gap:8px}
.oppbox{display:flex; flex-direction:column; margin-top:6px}
.oppbox:empty{display:none}

/* ---- score sheet: division, and judges' scores in words ------------------ */
.divcard{display:flex; align-items:center; gap:10px; background:var(--card);
  border:1px solid var(--line); border-radius:12px; padding:10px 12px; margin-bottom:12px}
.divcard-text{flex:1; display:flex; flex-direction:column; gap:1px; min-width:0}
.divcard-label{font-size:.68rem; font-weight:800; letter-spacing:.08em;
  text-transform:uppercase; color:var(--ink-2)}
.divcard-value{font-size:.95rem; font-weight:800}
.divcard-change{border:0; background:none; padding:4px 0; font:inherit; font-size:.88rem;
  font-weight:700; color:var(--brand); cursor:pointer}
.jgroup{flex:3 1 150px; display:flex; flex-direction:column; gap:3px; min-width:0}
.jgroup-label{font-size:.62rem; font-weight:800; letter-spacing:.06em;
  text-transform:uppercase; color:var(--ink-2)}
.jgroup-boxes{display:flex; gap:6px}
.entrycard-scores{align-items:flex-end}
.entrycard-scores > .jtotal, .entrycard-scores > .jplace{flex:1 1 52px}
.jbox.is-empty{background:var(--card); border:2px solid var(--brand); padding:2px 5px}

/* ---- ties, and small rings ---------------------------------------------- */
.tiewarn{display:flex; align-items:center; gap:8px; margin-top:6px; background:rgba(224,161,0,.14);
  border-radius:9px; padding:7px 9px; font-size:.8rem; font-weight:700; color:var(--warn)}
.tiewarn > span{flex:1; min-width:0}
.tiewarn-go{border:0; background:none; padding:0; font:inherit; font-weight:800;
  color:var(--brand); cursor:pointer; flex:none}
.smallring{display:flex; flex-direction:column; gap:6px; background:var(--brand-l);
  border-radius:12px; padding:10px 12px; margin:6px 0 10px}
.smallring p{margin:0}
.smallring .btn{align-self:flex-start}
.tbnote{background:var(--bg); border-radius:12px; padding:10px 12px; font-size:.82rem;
  color:var(--ink-2)}
.tbrec{display:flex; flex-direction:column; gap:14px}
.tblines{display:flex; flex-direction:column; gap:4px}
.tbline{margin:0; font-size:.8rem}
.tbcons{display:flex; flex-wrap:wrap; gap:6px}
.tbchip{border-radius:999px; padding:6px 12px; font:inherit; font-size:.86rem; font-weight:800;
  cursor:pointer}
.tbchip.is-on{border:2px solid var(--brand); background:var(--brand-l); color:var(--brand-d)}
.tbchip.is-out{border:1px dashed var(--line-2); background:var(--card); color:var(--ink-2);
  text-decoration:line-through}
.tbseat{display:flex; flex-direction:column; gap:5px}
.tbseat-head{display:flex; justify-content:space-between; align-items:baseline; gap:8px}
.tbseat-role{font-size:.86rem; font-weight:800}
.tbseat-why{font-size:.72rem; font-weight:700; color:var(--ink-2); text-align:right}
.tbseat-why.is-warn{color:var(--bad)}
.tbseat-picks{display:flex; gap:6px}
.tbpick{flex:1; border:1px solid var(--line); border-radius:10px; background:var(--card);
  padding:9px 4px; font:inherit; font-size:.88rem; font-weight:800; color:var(--ink); cursor:pointer}
.tbpick.is-on{background:var(--brand); border-color:var(--brand); color:#fff}
.tbnow{background:rgba(31,122,77,.12); border-radius:10px; padding:9px 11px; font-size:.84rem;
  font-weight:700; color:var(--good)}
.tbnow.is-waiting{background:var(--bg); color:var(--ink-2)}
.tbresult p{margin:2px 0; font-size:.95rem}
.tbrescore{display:flex; flex-direction:column; gap:5px}
.tbrescore-name{font-weight:800}
.tbrescore-boxes{display:flex; gap:6px}
.tbrescore-box{flex:1; display:flex; flex-direction:column; gap:2px; font-size:.7rem;
  font-weight:700; color:var(--ink-2); text-align:center}
/* A popup of tile sections built with Tiles.live: spaced like a page of
   tiles, rather than run together. */
.tlive.pform{display:flex; flex-direction:column; gap:20px}
.tbstep{display:flex; align-items:center; gap:12px}
.tbstep .ssstep{flex:0 0 auto}
.tbstep-unit{font-size:.88rem; font-weight:700; color:var(--ink-2)}
.tbtoggles{display:flex; flex-direction:column; gap:12px}
.tbsmall{display:flex; flex-direction:column; gap:10px; margin-top:12px}
.tbsmall p{margin:0}

/* ---- one line per row, on a phone held upright --------------------------
   Profiles and tournaments fold to their heading: the star and picture
   (or the logo), the name, and for a tournament its date. The rest opens
   beneath when the bar is tapped; the name itself opens the page. */
.onlystacked{display:none}
a.rowname{display:block; color:inherit; text-decoration:none; font-weight:700}
@media (max-width:620px){
  .tbl .onlystacked{display:block}
  .tbl td.stackhide{display:none}
  .tbl .namecell-text{display:flex; flex-direction:column; gap:1px; min-width:0}
  .tbl tbody td.rowhead a.rowname{text-decoration:underline;
    text-decoration-color:var(--line-2); text-underline-offset:3px}

  .tbl.foldlead tbody tr{display:flex; flex-wrap:wrap; align-items:center}
  .tbl.foldlead tbody td{flex:1 1 100%; box-sizing:border-box}
  .tbl.foldlead tbody td:not([data-label]){flex:0 0 auto; padding:8px 0 8px 10px;
    border-bottom:0}
  .tbl.foldlead tbody td.rowhead{flex:1 1 0; min-width:0; background:none;
    border-radius:0; padding:8px 11px 8px 10px}
  .tbl.foldlead tbody tr.is-shut td:not([data-label]){display:flex}
  /* Shut, the row is just the person: the line under the name (their track
     and location) opens with the rest. */
  .tbl.foldlead tbody tr.is-shut td.rowhead .tiny{display:none}
  .tbl.foldlead tbody tr:not(.is-shut) td.rowhead{border-bottom:1px solid var(--line-2)}
}

/* ---- home: what is coming up ----------------------------------------------
   The tournament card is the way in to the tournament (the logo, name and
   date are one link), the two things to do about it, and where your starred
   people have to be. Season totals and charts moved to Overview. */
.hero-logos > .hero-orglogo{flex:none; align-self:center}
.tourbar-link{text-decoration:none; color:var(--ink); border-radius:10px; padding:2px}
.tourbar-link:hover .tourbar-name{text-decoration:underline}
.tourbar-soon{font-size:.78rem; font-weight:700; color:var(--accent); margin-top:1px}
.tourbtns{display:grid; grid-template-columns:1fr 1fr; gap:8px}
.tourbtns .btn{justify-content:center; min-height:44px; margin:0}
.tourbar-all{align-self:flex-start; font-size:.84rem; padding:4px 0}
.homecalls{display:flex; flex-direction:column; border-top:1px solid var(--line-2);
  padding-top:8px}
.homecalls-head{font-size:.7rem; font-weight:800; letter-spacing:.08em;
  text-transform:uppercase; color:var(--ink-2); margin-bottom:4px}
.homecall{display:grid; grid-template-columns:minmax(0,7.5em) minmax(0,1fr) auto;
  gap:8px; align-items:baseline; font-size:.84rem; padding:3px 0}
.homecall-who{overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.homecall-what{color:var(--ink-2); min-width:0}
.homecall-what strong{color:var(--ink)}
.homecall-when{font-weight:800; font-variant-numeric:tabular-nums; text-align:right}
.card .minecards{margin:0}
.homemore{align-self:flex-end; font-size:.84rem; font-weight:700; color:var(--brand);
  text-decoration:none; padding:2px 4px}
.homehint{color:var(--ink-2); font-size:.88rem; text-align:center; margin:14px 8px}
.homepills{display:flex; flex-wrap:wrap; gap:6px}
.homepill{display:inline-flex; align-items:center; gap:6px; text-decoration:none;
  background:var(--card); border:1px solid var(--line); border-radius:18px;
  padding:7px 12px; font-size:.86rem; font-weight:700; color:var(--ink)}
.homepill .uicon{color:var(--brand)}
.homepill:hover{border-color:var(--brand)}
/* On a wide screen the times would sit a page away from the names. */
@media(min-width:620px){
  .tourbtns, .homecalls{max-width:560px}
  .homecall{grid-template-columns:minmax(0,11em) minmax(0,1fr) auto}
}

/* ---- overview: the season as charts ---------------------------------------
   Bars drawn as page elements rather than pictures, so they stay sharp on a
   phone, follow the theme, and every one is a link to what it counts. */
.ovstats .statsection:first-child{margin-top:0}
.ovchips{margin-bottom:10px}
.ovbars{display:flex; flex-direction:column; gap:7px}
.ovbar{display:grid; grid-template-columns:minmax(0,9.5em) minmax(0,1fr) 2.6em;
  gap:10px; align-items:center; text-decoration:none; color:var(--ink);
  font-size:.86rem; padding:2px 0; border-radius:6px}
.ovbar:hover .ovbar-name{text-decoration:underline}
.ovbar-name{font-weight:700; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.ovbar-track{display:flex; height:12px; border-radius:4px; overflow:hidden;
  background:var(--line-2)}
.ovbar-track.wide{height:16px; border-radius:5px}
.ovbar-part{display:block; height:100%}
.ovbar-part.one{background:var(--brand)}
.ovbar-part.gold, .ovkey-swatch.gold{background:#e8b757}
.ovbar-part.silver, .ovkey-swatch.silver{background:#b9c3ca}
.ovbar-part.bronze, .ovkey-swatch.bronze{background:#cf9465}
.ovbar-part.other, .ovkey-swatch.other{background:var(--ink-2); opacity:.55}
.ovbar-part.good{background:var(--good)}
.ovbar-value{text-align:right; font-weight:800; font-variant-numeric:tabular-nums}
.ovkey{display:flex; flex-wrap:wrap; gap:12px; font-size:.76rem; color:var(--ink-2);
  margin-top:4px}
.ovkey-item{display:inline-flex; align-items:center; gap:5px}
.ovkey-swatch{display:inline-block; width:10px; height:10px; border-radius:3px}
.ovall{margin-top:8px}
.ovcompeted{display:flex; flex-direction:column; gap:6px}
.ovstand{display:flex; flex-direction:column; gap:8px}
.ovstand-row{display:flex; flex-direction:column; gap:5px; padding:9px 0;
  border-bottom:1px solid var(--line-2); text-decoration:none; color:var(--ink)}
.ovstand-chips{display:flex; flex-wrap:wrap; gap:5px}
.ovstand-chip{background:var(--line-2); border-radius:8px; padding:3px 8px;
  font-size:.8rem; color:var(--ink-2)}
.ovstand-chip strong{color:var(--ink)}
.ovstand-chip.is-world{background:#fff4d6}
html[data-theme=dark] .ovstand-chip.is-world{background:rgba(232,183,87,.22)}
@media(max-width:400px){
  .ovbar{grid-template-columns:minmax(0,7.5em) minmax(0,1fr) 2.4em; gap:8px}
}
/* A long tournament name gets room: beside its bar on a wide screen, on a
   line of its own above it on a phone, rather than cut to "District Cha". */
@media(min-width:621px){
  .ovbar{grid-template-columns:minmax(0,16em) minmax(0,1fr) 2.6em}
}
@media(max-width:620px){
  .ovbar{grid-template-columns:minmax(0,1fr) 2.6em; row-gap:3px; gap:3px 8px}
  .ovbar-name{grid-column:1 / -1}
}

/* ---- home: More, as small tiles -------------------------------------------
   One grid with equal cells, so every tile is the same size and the gaps are
   the same both ways. A row on a wide screen; four or three across on a
   phone, whichever leaves no tile alone on its row. */
.hometiles{display:grid; gap:8px; grid-template-columns:repeat(3, minmax(0,1fr))}
.hometiles.by4{grid-template-columns:repeat(4, minmax(0,1fr))}
@media(min-width:900px){
  .hometiles.n8{grid-template-columns:repeat(8, minmax(0,1fr))}
  .hometiles.n9{grid-template-columns:repeat(9, minmax(0,1fr))}
}
.hometile{display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap:6px; min-height:76px; padding:10px 6px; text-align:center; text-decoration:none;
  background:var(--card); border:1px solid var(--line); border-radius:var(--radius);
  box-shadow:var(--shadow); color:var(--ink);
  transition:transform .12s ease, box-shadow .12s ease}
.hometile:hover{border-color:var(--brand)}
.hometile:active{transform:scale(.97)}
.hometile .uicon{color:var(--brand); flex:none}
.hometile-label{font-size:.78rem; font-weight:700; line-height:1.2}

/* ---- tournament page --------------------------------------------------------
   The class, season and how soon as tags beside the logo; a row of chips to
   get around a long page; one line per person; groups that fold. */
.tourhead{display:flex; align-items:center; gap:12px; margin-bottom:12px}
.tourhead .tourlogo.large{width:64px; height:64px; flex:none}
.tourtags{display:flex; flex-wrap:wrap; gap:6px}
.tourtag{font-size:.78rem; font-weight:700; background:var(--brand-l); color:var(--brand-d);
  border-radius:999px; padding:4px 10px; text-decoration:none; white-space:nowrap}
.tourtag.is-link:hover{text-decoration:underline}
.tourtag.is-soon{background:#fff4d6; color:#8a6500}
.tourtag.is-past{background:var(--line-2); color:var(--ink-2)}
html[data-theme=dark] .tourtag.is-soon{background:rgba(232,183,87,.2); color:#f2cf7a}
html[data-theme=dark] .tourtag{color:var(--ink)}
.tourglance{margin:0}
.jumpchips{display:flex; gap:6px; overflow-x:auto; padding:2px 0 12px;
  scrollbar-width:none; -webkit-overflow-scrolling:touch}
.jumpchips::-webkit-scrollbar{display:none}
.jumpchip{flex:none; white-space:nowrap; border:1px solid var(--line); background:var(--card);
  color:var(--ink); border-radius:999px; padding:7px 13px; font:inherit; font-size:.84rem;
  font-weight:700; cursor:pointer}
.jumpchip:hover{border-color:var(--brand); color:var(--brand)}

/* Who is competing: one line each. */
.attendtotals{grid-template-columns:repeat(4, 1fr)}
@media (max-width:520px){
  .attendtotals{grid-template-columns:repeat(4, 1fr)}
  .attendtotal:nth-child(odd){border-left:1px solid var(--line)}
  .attendtotal:first-child{border-left:0}
  .attendtotal{padding:8px 2px}
  .attendtotal-label{font-size:.6rem; letter-spacing:.02em}
}
.reportline{display:flex; flex-wrap:wrap; align-items:baseline; gap:2px; margin:0 0 6px;
  font-size:.9rem}
.countlink.is-warn{color:var(--warn)}
.resultin{display:inline-flex; align-items:center; justify-content:center; flex:none;
  width:18px; height:18px; border-radius:9px; background:var(--good); color:#fff}
.resultin .uicon{width:11px; height:11px}
.callsum{flex:none; font-size:.76rem; font-weight:700; background:var(--brand-l);
  color:var(--ink); border-radius:7px; padding:2px 7px; white-space:nowrap}
.callsum.is-none{background:none; color:var(--ink-2); font-weight:400; font-style:italic}
@media (max-width:400px){
  .callsum{font-size:.7rem; padding:2px 5px}
}

/* A group that folds: its name, how many, and its rows. */
.tgroup{border:1px solid var(--line); border-radius:12px; margin-top:10px; background:var(--card)}
.tgroup > summary{list-style:none}
.tgroup > summary::-webkit-details-marker{display:none}
.tgroup-head{display:flex; align-items:center; gap:8px; padding:10px 12px; cursor:pointer}
.tgroup-head::before{content:'\25B8'; color:var(--ink-2); font-size:.72rem}
.tgroup[open] > .tgroup-head::before{content:'\25BE'}
.tgroup-title{flex:1; font-weight:800}
.tgroup-count{font-size:.8rem; font-weight:700; color:var(--ink-2)}
.tgroup-body{padding:0 12px 10px}
.tgroup-body .tablewrap, .tgroup-body table{margin-top:0}

/* Results as a list. */
.respts{flex:none; font-size:.8rem; font-weight:800; min-width:3.4em; text-align:right}
.resevents{display:grid; grid-template-columns:1fr auto auto; gap:4px 14px; font-size:.88rem;
  padding:4px 0 6px}
.resevent{display:contents}

/* Notes, before and after, in one card. */
.noteparts{display:flex; flex-direction:column; gap:10px}
.notepart + .notepart{border-top:1px solid var(--line-2); padding-top:10px}
.notepart-label{font-size:.7rem; font-weight:800; letter-spacing:.08em;
  text-transform:uppercase; color:var(--ink-2)}

/* Update staging and rings. */
.updlist{display:flex; flex-direction:column; gap:6px}
.updhead{font-size:.7rem; font-weight:800; letter-spacing:.08em; text-transform:uppercase;
  color:var(--ink-2); margin-top:8px}
.updrow{display:flex; align-items:center; gap:10px; padding:8px 0;
  border-bottom:1px solid var(--line-2); cursor:pointer}
.updrow input{flex:none; width:20px; height:20px}
.updrow-text{flex:1; min-width:0; display:flex; flex-direction:column; gap:1px}
.updrow-when{flex:none; font-variant-numeric:tabular-nums; text-align:right}
.updnomatch{display:flex; flex-direction:column; gap:6px; background:#fff9e8;
  border:1px solid #e8c34a; border-radius:12px; padding:10px 12px}
html[data-theme=dark] .updnomatch{background:rgba(232,195,74,.12)}
.foldhead > .grow{flex:1 1 auto}
.foldhead > .attendname{flex:0 1 auto; min-width:0; overflow:hidden; text-overflow:ellipsis;
  white-space:nowrap}
.tgroup-body{overflow-x:auto}
@media (min-width:621px){ .tgroup-body{padding:0 4px 8px} }
/* On a phone the time goes on a line of its own under the name, so neither
   is cut short; "no time yet" is left off, since no time already says it. */
@media (max-width:520px){
  .foldlist .foldhead{flex-wrap:wrap; row-gap:3px}
  .foldhead > .callsum{order:5; margin-left:22px}
  .foldhead > .callsum.is-none{display:none}
}
/* Medals and points in columns down the list, whatever each row won. */
.resultlist .medaltally{min-width:6.6em; display:inline-flex; justify-content:flex-end}

/* ---- competitor and team profiles ------------------------------------------
   The picture and belt with the facts somebody checks first as tags, the
   season as a bar, every event once, and a line a tournament. */
.profhead{display:flex; align-items:center; gap:14px; margin-bottom:12px}
.profhead .avatar, .profhead > img{flex:none}
.profhead-id{display:flex; flex-direction:column; gap:8px; min-width:0}
.tourtag.is-good{background:#e3f3ea; color:#1f6b42}
html[data-theme=dark] .tourtag.is-good{background:rgba(31,122,77,.25); color:#9fe0bd}
.profseason{display:flex; align-items:center; gap:8px; background:var(--card);
  border:1px solid var(--line); border-radius:12px; padding:6px 8px; margin-bottom:12px}
.profseason .seasonstep{flex:none; width:32px; height:32px; border-radius:16px; border:0;
  background:var(--brand-l); color:var(--brand-d); font-size:1.15rem; font-weight:700; cursor:pointer}
.profseason .seasonstep:disabled{opacity:.35; cursor:default}
.profseason-mid{flex:1; min-width:0}
.profseason-mid select{width:100%; font-weight:800; text-align:center}
.profseason .seasoncal{flex:none; white-space:nowrap}
.profnext{display:flex; flex-direction:column; gap:6px}
.profnext-head{display:flex; justify-content:space-between; align-items:baseline; gap:10px}
.homecall.is-two{grid-template-columns:minmax(0,1fr) auto}
.evlist .foldhead{gap:8px}
.evname{font-weight:700; color:var(--brand-d); min-width:0; overflow:hidden;
  text-overflow:ellipsis; white-space:nowrap}
html[data-theme=dark] .evname{color:var(--ink)}
.evflag{flex:none; width:17px; height:17px; border-radius:9px; background:#fff1d6;
  color:var(--warn); font-size:.7rem; font-weight:900; display:inline-flex;
  align-items:center; justify-content:center}
.evmed{flex:none; font-size:.76rem; color:var(--ink-2); white-space:nowrap}
.evpts{flex:none; min-width:2.4em; text-align:right; font-variant-numeric:tabular-nums}
.evdetail{display:grid; grid-template-columns:auto 1fr; gap:5px 14px; align-items:baseline;
  font-size:.88rem; padding:4px 0 6px}
.evdetail .warnline{color:var(--warn)}
.evwarn{display:flex; align-items:center; gap:12px; background:#fff9e8;
  border:1px solid #e8c34a; border-radius:12px; padding:10px 12px; margin-top:10px;
  font-size:.88rem}
.evwarn > span{flex:1}
html[data-theme=dark] .evwarn{background:rgba(232,195,74,.12)}
.resname{display:flex; flex-direction:column; min-width:0}
.resname .attendname{overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.teamline{display:flex; align-items:center; gap:10px; padding:9px 0;
  border-bottom:1px solid var(--line-2)}
.teamline-name{flex:1; min-width:0; display:flex; flex-direction:column}
.teamline-name a{font-weight:700}
.teamline-pts{color:var(--ink-2); white-space:nowrap}
@media (max-width:520px){
  .evlist .foldhead{flex-wrap:nowrap}
  .evmed{display:none}
  .teamline{flex-wrap:wrap}
}
@media (max-width:520px){
  .evlist .foldhead > .callsum{order:0; margin-left:0}
  .resultlist .foldhead{flex-wrap:nowrap}
}
.evnoteline{padding:0 12px 8px 30px; font-size:.84rem}
.profhead-id{flex:1 1 auto}
.resname .attendname{white-space:normal}
/* A team's roster, a line a member. */
.memberlist{display:flex; flex-direction:column}
.memberline{display:flex; align-items:center; gap:10px; padding:8px 0;
  border-bottom:1px solid var(--line-2)}
.memberline .avatar{flex:none}
.memberline-name{flex:1; min-width:0; font-weight:700; overflow:hidden;
  text-overflow:ellipsis; white-space:nowrap}
.memberrole{font-size:.68rem; font-weight:800; letter-spacing:.05em; text-transform:uppercase;
  color:var(--ink-2); background:var(--line-2); border-radius:6px; padding:2px 6px}
.resname .attendname{overflow:visible; text-overflow:clip}

/* ---- live score sheets ------------------------------------------------------
   Season chips and a line saying what is shown; what is not in results yet;
   tournaments that fold; a line a sheet. */
.sheetfilters{display:flex; flex-direction:column; gap:8px; margin-bottom:12px}
.sheetfilters-line{display:flex; align-items:center; gap:8px}
.sheetwaiting{display:flex; flex-direction:column; gap:4px; background:#fff9e8;
  border:1px solid #e8c34a; border-radius:12px; padding:12px; margin-bottom:12px}
.sheetwaiting .linkrow{margin-top:4px}
html[data-theme=dark] .sheetwaiting{background:rgba(232,195,74,.12)}
.sheetgroups{display:flex; flex-direction:column; gap:10px}
.sheetgroups .tgroup{margin-top:0}
.sheetgroup-name{flex:1; min-width:0; display:flex; flex-direction:column}
.sheetgroup-count{display:flex; flex-direction:column; align-items:flex-end; gap:1px;
  font-size:.82rem; white-space:nowrap}
.sheetgroup-waiting{font-size:.74rem; font-weight:700; color:var(--warn)}
.sheetline{display:flex; align-items:center; gap:10px; padding:9px 2px;
  border-bottom:1px solid var(--line-2); text-decoration:none; color:var(--ink)}
.sheetline:last-child{border-bottom:0}
.sheetline:hover .sheetline-head strong{text-decoration:underline}
.sheetline-icon{flex:none; width:32px; height:32px; border-radius:9px; background:var(--brand-l);
  display:flex; align-items:center; justify-content:center}
.sheetline-text{flex:1; min-width:0; display:flex; flex-direction:column; gap:1px}
.sheetline-head strong{color:var(--brand-d)}
html[data-theme=dark] .sheetline-head strong{color:var(--ink)}
.sheetline-sub{overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.sheetline .pill{flex:none}
.sheetline-go{flex:none; color:var(--ink-2)}
.sheetformats{text-align:center; margin:14px 0 4px}
.sheetfilters-line .grow{flex:1 1 auto}

/* ---- quick score --------------------------------------------------------------
   Paper at the side of a ring: a numbered row a competitor, a box a judge,
   and the total and place by themselves. */
.sstart-modes{display:grid; grid-template-columns:1fr; gap:8px; margin-bottom:12px}
.sstart-mode{display:flex; flex-direction:column; gap:3px; text-align:left; font:inherit;
  color:var(--ink); background:var(--card); border:1px solid var(--line); border-radius:14px;
  padding:12px 14px; cursor:pointer}
.sstart-mode strong{font-size:1rem}
.sstart-mode.is-on{border:2px solid var(--brand); background:var(--brand-l)}
.quicktype{display:flex; gap:8px; margin-top:10px}
.quicktype .input{flex:1; min-width:0}
.quicksheet{display:flex; flex-direction:column; gap:8px}
.quickrows{display:flex; flex-direction:column}
.quickrow{display:flex; flex-direction:column; gap:6px; padding:10px 0;
  border-bottom:1px solid var(--line-2)}
.quickrow-head{display:flex; justify-content:space-between; align-items:baseline; gap:10px}
.quickrow-name{border:0; background:none; padding:0; font:inherit; font-weight:800;
  color:var(--ink); text-align:left; cursor:pointer}
.quickrow-name.is-blank{font-weight:600; font-style:italic; color:var(--ink-2)}
.quickrow-place{font-size:.8rem; font-weight:800; color:var(--accent); white-space:nowrap}
.quickrow-scores{display:flex; align-items:center; gap:6px}
.quickbox{width:3.4em; min-width:0; text-align:center; font-size:1.05rem; font-weight:800;
  padding:8px 4px}
.quickrow-total{flex:1; text-align:right; font-size:1.25rem; font-weight:800;
  font-variant-numeric:tabular-nums}
.quickfoot{display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-top:6px}
.quickfoot .btn{justify-content:center; margin:0}
.quickfile{display:flex; flex-direction:column; align-items:center; gap:6px; text-align:center;
  margin-top:6px}
.quickmatch{display:flex; flex-direction:column; gap:4px; padding:8px 0;
  border-bottom:1px solid var(--line-2)}
.quickmatch-name{font-weight:700}

/* ---- division changes -------------------------------------------------------
   The history on a profile, the preview in the popup, and the warning when a
   result would go to a different division from the last. */
.divchanges{margin-top:12px; border-top:1px solid var(--line-2); padding-top:10px}
.divchange{display:flex; align-items:baseline; gap:10px; padding:6px 0;
  border-bottom:1px solid var(--line-2); font-size:.88rem}
.divchange-text{flex:1; min-width:0}
.divpreview{display:flex; flex-direction:column; gap:4px; background:var(--brand-l);
  border-radius:12px; padding:10px 12px; font-size:.88rem; margin-top:10px}
.divstray{margin-top:10px; font-size:.86rem; align-items:flex-start}
.divwarn{display:flex; flex-direction:column; gap:4px}
.seasoncheckbanner{display:flex; flex-direction:column; gap:6px; background:#fff9e8;
  border:1px solid #e8c34a; border-radius:12px; padding:12px; margin-bottom:12px}
html[data-theme=dark] .seasoncheckbanner{background:rgba(232,195,74,.12)}
.seasonchecklist{display:flex; flex-direction:column; margin-top:10px}
.seasoncheckrow{display:flex; flex-direction:column; gap:5px; padding:10px 0;
  border-bottom:1px solid var(--line-2)}
.seasoncheckrow-head{display:flex; justify-content:space-between; align-items:baseline; gap:10px}
.seasoncheckrow-name{font-weight:800}
.seasoncheckrow-why{color:#8a6500}
html[data-theme=dark] .seasoncheckrow-why{color:#f2cf7a}
.divcard + .divcard{margin-top:8px}
/* A ring of three or fewer: one quiet line under Add competitor, not a
   notice above the ring. */
.smallring{display:flex; flex-direction:row; flex-wrap:wrap; align-items:center; gap:6px 10px;
  background:none; border:0; border-top:1px solid var(--line-2); border-radius:0;
  padding:10px 0 0; margin-top:10px}
.smallring-text{flex:1 1 12em; font-size:.86rem; color:var(--ink-2)}
.smallring .btn{align-self:center; margin:0}

/* ---- What's new ---------------------------------------------------------- */
.wn{display:flex; flex-direction:column; gap:18px}
.wn-release{display:flex; flex-direction:column; gap:12px}
.wn-head{display:flex; flex-wrap:wrap; align-items:baseline; gap:4px 10px;
  padding-bottom:6px; border-bottom:1px solid var(--line-2)}
.wn-date{font-size:.82rem; color:var(--ink-2)}
.wn-group{display:flex; flex-direction:column; gap:6px}
.wn-kind{align-self:flex-start; font-size:.72rem; font-weight:700;
  letter-spacing:.06em; text-transform:uppercase; padding:2px 8px;
  border-radius:999px; background:var(--brand-l); color:var(--brand-d)}
.wn-kind.is-fixed{background:none; border:1px solid var(--line); color:var(--ink-2)}
.wn-kind.is-changed{background:none; border:1px solid var(--brand); color:var(--brand)}
.wn-list{list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:10px}
.wn-item{display:flex; flex-direction:column; gap:2px}
.wn-title{font-weight:700; color:var(--ink)}
.wn-text{font-size:.9rem; line-height:1.4; color:var(--ink-2)}
.wn-go{align-self:flex-start; margin-top:2px}
.wn-rules{padding:12px; border:1px solid var(--line); border-radius:var(--radius); background:var(--card)}
.wn-orghead{display:flex; flex-wrap:wrap; align-items:baseline; gap:4px 8px}
.wn-state{font-size:.72rem; font-weight:700; letter-spacing:.04em; text-transform:uppercase; color:var(--good)}
.wn-state.is-yours{color:var(--ink-2)}
.wn-state.is-undone{color:var(--ink-2)}
.wn-notes{margin:0; padding-left:1.1em; display:flex; flex-direction:column; gap:2px}
.wn-org .btn{align-self:flex-start; margin-top:4px}
.wn-rules > .btn{align-self:flex-start; margin-top:6px}
.setupchanges{display:flex; flex-direction:column; gap:8px; margin:10px 0;
  padding:12px; border:1px solid var(--line); border-radius:var(--radius)}

/* ---- Settings as profiles ------------------------------------------------ */
.pfland{display:flex; flex-direction:column; gap:10px}
.pftile{display:flex; align-items:center; gap:12px; padding:14px; border:1px solid var(--line);
  border-radius:16px; background:var(--card); color:var(--ink); text-decoration:none}
.pftile-logo{width:46px; height:46px; border-radius:12px; flex:none; object-fit:contain;
  background:var(--brand-l)}
.pftile-logo.is-text, .pfhead-logo.is-text{display:flex; align-items:center; justify-content:center;
  font-weight:900; color:var(--brand); font-size:.82rem; letter-spacing:.02em}
.pftile-text{flex:1; min-width:0; display:flex; flex-direction:column; gap:1px}
.pftile-label{font-size:.68rem; font-weight:800; letter-spacing:.08em; text-transform:uppercase;
  color:var(--ink-2)}
.pftile-name{font-size:1.02rem; font-weight:800}
.pftile-sub{font-size:.8rem; color:var(--ink-2)}
.pftile-go{font-size:1.3rem; color:var(--ink-2)}
.pflines{border:1px solid var(--line); border-radius:16px; background:var(--card); padding:0 14px}
.pfline{display:flex; justify-content:space-between; gap:10px; padding:12px 2px;
  color:var(--ink); text-decoration:none; font-weight:700}
.pfline + .pfline{border-top:1px solid var(--line-2)}
.pfline-v{font-weight:400; color:var(--ink-2); font-size:.86rem}
.pfpage{display:flex; flex-direction:column; gap:10px}
.pfpage > .pfline{border:1px solid var(--line); border-radius:14px; background:var(--card); padding:12px 14px}
.pfhead{display:flex; flex-direction:column; gap:10px; padding:14px; border-radius:16px;
  background:var(--brand-l)}
.pfhead-top{display:flex; align-items:center; gap:12px}
.pfhead-logo{width:56px; height:56px; border-radius:14px; flex:none; object-fit:contain;
  background:var(--card); border:1px solid var(--line)}
.pfhead-text{flex:1; min-width:0; display:flex; flex-direction:column; gap:2px}
.pfhead-name{margin:0; font-size:1.3rem; line-height:1.15}
.pfhead-line{font-size:.86rem; color:var(--ink-2)}
.pfhead-tags{display:flex; flex-wrap:wrap; gap:6px}
.pfhead-tag{font-size:.74rem; font-weight:700; background:var(--card); color:var(--ink-2);
  border-radius:999px; padding:3px 9px}
a.pfhead-tag{color:var(--brand); text-decoration:none}
.pfedit{flex:none; align-self:flex-start; font-weight:800; font-size:.86rem; color:var(--brand);
  background:var(--card); border:1px solid var(--line); border-radius:10px; padding:7px 12px;
  text-decoration:none}
.pfacts{display:grid; grid-template-columns:repeat(auto-fit, minmax(70px, 1fr)); gap:8px}
.pfbig{display:flex; flex-direction:column; align-items:center; gap:4px; padding:9px 4px;
  border:1px solid var(--line); border-radius:12px; background:var(--card); color:var(--brand);
  font-size:.8rem; font-weight:800; text-decoration:none}
.pfsec .pfsec-note{font-weight:400; text-align:right; max-width:48%; white-space:nowrap;
  overflow:hidden; text-overflow:ellipsis}
.pfsec-top{display:flex; justify-content:flex-end; margin:-2px 0 4px}
.pfchange{font-weight:800; font-size:.86rem; color:var(--brand); text-decoration:none}
.pfrows{display:flex; flex-direction:column}
.pfrow{display:flex; align-items:center; gap:10px; padding:8px 0}
.pfrow + .pfrow{border-top:1px solid var(--line-2)}
.pfrow-k{flex:0 0 7.5em; font-size:.8rem; color:var(--ink-2)}
.pfrow-v{flex:1; min-width:0; font-weight:700; font-size:.9rem; white-space:pre-line;
  overflow-wrap:anywhere}
.pfact{flex:none; font-size:.78rem; font-weight:800; color:var(--brand); border:1px solid var(--line);
  border-radius:999px; padding:3px 10px; text-decoration:none}
.pfonoff{font-size:.72rem; font-weight:800; letter-spacing:.05em; text-transform:uppercase;
  color:var(--ink-2)}
.pfonoff.is-on{color:var(--good)}
.pfswatch{display:inline-flex; align-items:center; gap:4px}
.pfswatch-chip{width:16px; height:16px; border-radius:4px; border:1px solid rgba(0,0,0,.1)}
.pfswatch > span:last-child{margin-left:4px}
.pfgroup + .pfgroup{margin-top:8px}
.pfgroup-label{display:block; font-size:.74rem; font-weight:800; letter-spacing:.06em;
  text-transform:uppercase; color:var(--ink-2); margin-top:4px}
.pfbuttons{display:flex; flex-direction:column; gap:8px; margin-top:10px}
.pfbutton{display:flex; align-items:center; gap:10px; padding:12px; border:1px solid var(--line);
  border-radius:14px; background:var(--card); color:var(--ink); text-decoration:none}
.pfbutton svg{color:var(--brand)}
.pfbutton.is-primary{background:var(--brand); border-color:var(--brand); color:#fff}
.pfbutton.is-primary svg{color:#fff}
.pfbutton-text{display:flex; flex-direction:column; gap:1px}
.pfbutton-text span{font-size:.8rem; opacity:.8}
.pfpage > .tgroup{margin-top:0}
.pfrow.is-switch .pfrow-v{font-weight:600}
.pfcode{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  font-size:1.15rem; letter-spacing:.06em}
.pfnote{margin:6px 0 0; font-size:.8rem; color:var(--ink-2)}
/* The address has to read as one piece to be typed across: it is never
   broken mid-word, and the label beside it gives up the room. */
.pfsec[data-pfsec="computer"] .pfrow-k{flex-basis:6em}
.pfsec[data-pfsec="computer"] .pfrow-v{overflow-wrap:normal; white-space:nowrap}
button.pfact{background:none; cursor:pointer; font:inherit; font-size:.78rem; font-weight:800}
button.pfbutton{width:100%; text-align:left; font:inherit; cursor:pointer}

/* ---- territory profiles ----------------------------------------------------- */
.pflink{font-weight:800; color:var(--brand); text-decoration:none}
.pfchips{display:flex; flex-wrap:wrap; gap:4px 10px}
.pfabout{margin:0; line-height:1.45}
.pfterrs{display:flex; flex-direction:column; border:1px solid var(--line); border-radius:14px;
  background:var(--card)}
.pfterr{display:flex; align-items:center; gap:10px; padding:10px 12px; color:var(--ink);
  text-decoration:none}
.pfterr + .pfterr{border-top:1px solid var(--line-2)}
.pfterr-code{flex:none; min-width:2.6em; text-align:center; font-size:.72rem; font-weight:900;
  letter-spacing:.05em; background:var(--brand); color:#fff; border-radius:6px; padding:2px 6px}
.pfterr-text{flex:1; min-width:0; display:flex; flex-direction:column}
.pfterr-text span{font-size:.8rem; color:var(--ink-2)}
.pfterr-yours{font-size:.7rem; font-weight:800; color:var(--good); text-transform:uppercase}
.pfedit-form{display:flex; flex-direction:column; gap:4px}
.pfeditpair{display:grid; grid-template-columns:1fr 1fr; gap:8px}
.pfeditrow3{display:grid; grid-template-columns:1.5fr .8fr 1fr; gap:8px; margin-top:8px}
.pfeditlink{display:grid; grid-template-columns:1fr 1.4fr auto; gap:6px; align-items:center;
  margin-bottom:6px}
.pfremove{color:var(--bad); align-self:flex-start; margin:8px 0}
.pfmodes{display:grid; grid-template-columns:repeat(3, 1fr); gap:8px}
.pfmode{display:flex; flex-direction:column; align-items:center; gap:4px; padding:12px 6px;
  border:1px solid var(--line); border-radius:12px; background:var(--card); color:var(--ink);
  font:inherit; font-weight:800; font-size:.86rem}
.pfmode-glyph{font-size:1.3rem; line-height:1}
.pfmode.is-on, .pfscheme.is-on{border:2px solid var(--brand); background:var(--brand-l)}
.pfschemes{display:grid; grid-template-columns:repeat(3, 1fr); gap:8px}
.pfscheme{display:flex; flex-direction:column; align-items:flex-start; gap:6px; padding:9px;
  border:1px solid var(--line); border-radius:12px; background:var(--card); color:var(--ink);
  font:inherit; font-weight:800; font-size:.84rem}
.pffine{margin-top:10px}
.pffine > summary{cursor:pointer; font-weight:800; color:var(--brand); font-size:.88rem}
.pffine .controls{margin-top:10px}
.pfkinds{display:grid; grid-template-columns:repeat(3, 1fr); gap:8px}
.pfkind{display:flex; flex-direction:column; align-items:flex-start; gap:2px; padding:10px;
  border:1px solid var(--line); border-radius:12px; background:var(--card); color:var(--ink);
  font:inherit; text-align:left}
.pfkind strong{font-size:.86rem}
.pfkind span{font-size:.74rem; color:var(--ink-2)}
.pfkind.is-on{border:2px solid var(--brand); background:var(--brand-l)}
.pfadd{width:100%; margin-top:10px; padding:12px; border:1.5px dashed var(--line); border-radius:12px;
  background:none; color:var(--brand); font:inherit; font-weight:800}

/* ---- Features and Reminders: a switch a row --------------------------------
   The same checkboxes, drawn as switches with the words on the left, on the
   two pages that are nothing but yes-or-no questions. */
[data-settings="prefs/features"] label.check,
[data-settings="prefs/reminders"] label.check{display:flex; flex-direction:row-reverse;
  justify-content:space-between; align-items:center; gap:12px; padding:6px 0}
[data-settings="prefs/features"] label.check > input[type=checkbox],
[data-settings="prefs/reminders"] label.check > input[type=checkbox]{-webkit-appearance:none;
  appearance:none; flex:none; width:44px; height:26px; margin:0; border-radius:13px;
  background:var(--line); position:relative; cursor:pointer; transition:background .15s}
[data-settings="prefs/features"] label.check > input[type=checkbox]::after,
[data-settings="prefs/reminders"] label.check > input[type=checkbox]::after{content:'';
  position:absolute; top:3px; left:3px; width:20px; height:20px; border-radius:10px;
  background:#fff; box-shadow:0 1px 2px rgba(0,0,0,.25); transition:left .15s}
[data-settings="prefs/features"] label.check > input[type=checkbox]:checked,
[data-settings="prefs/reminders"] label.check > input[type=checkbox]:checked{background:var(--brand)}
[data-settings="prefs/features"] label.check > input[type=checkbox]:checked::after,
[data-settings="prefs/reminders"] label.check > input[type=checkbox]:checked::after{left:21px}
[data-settings="prefs/features"] label.check.locked,
[data-settings="prefs/reminders"] label.check.locked{flex-direction:row; justify-content:flex-start}
[data-settings="prefs/features"] label.check.locked > input[type=checkbox],
[data-settings="prefs/reminders"] label.check.locked > input[type=checkbox]{order:3; margin-left:auto; opacity:.5}
.orgpoints.is-steps{display:flex; flex-direction:column; gap:8px}
.orgpoints.is-steps .orgpoint{display:flex; flex-direction:row; align-items:center;
  justify-content:space-between; gap:12px}
.orgpoints.is-steps .orgpoint > span{font-weight:800}
.bandlist{display:flex; flex-direction:column; border:1px solid var(--line); border-radius:12px;
  background:var(--card)}
.bandlist .bandedit{display:flex; flex-direction:row; align-items:center; gap:6px;
  padding:0 8px 0 0; border:0; border-radius:0; margin:0}
.bandlist .bandedit + .bandedit{border-top:1px solid var(--line-2)}
.bandtap{flex:1; min-width:0; display:flex; flex-direction:column; align-items:flex-start; gap:1px;
  padding:10px 12px; background:none; border:0; text-align:left; font:inherit; color:var(--ink)}
.bandtap span{font-size:.78rem; color:var(--ink-2)}
.bandmove{display:flex; gap:4px}

/* ---- overview: who is counted, and the trends ---------------------------
   Five colors for up to five people side by side. Picked to stay apart
   from each other and from gold, silver and bronze, in either theme. */
:root{--cmp0:#156082; --cmp1:#7b4ea3; --cmp2:#2e7d4f; --cmp3:#c0602a; --cmp4:#b03a5b}
html[data-theme=dark]{--cmp0:#5fb0d6; --cmp1:#b292d6; --cmp2:#6cc493; --cmp3:#e8935c; --cmp4:#e07b98}
.cmp-0{--cmp:var(--cmp0)} .cmp-1{--cmp:var(--cmp1)} .cmp-2{--cmp:var(--cmp2)}
.cmp-3{--cmp:var(--cmp3)} .cmp-4{--cmp:var(--cmp4)}
.ovbar-part.one[class*="cmp-"]{background:var(--cmp)}

.ovwho{display:flex; flex-direction:column; gap:7px; margin:0 0 10px}
.ovwho-head{font-size:.72rem; font-weight:800; letter-spacing:.08em;
  text-transform:uppercase; color:var(--ink-2)}
.ovwho-picked{display:flex; flex-wrap:wrap; gap:6px}
.ovwho-person{display:inline-flex; align-items:center; gap:6px; border:1.5px solid var(--cmp);
  background:var(--card); color:var(--ink); border-radius:999px; padding:4px 10px;
  font:inherit; font-size:.8rem; font-weight:800; cursor:pointer}
.ovwho-dot, .ovt-swatch{display:inline-block; width:10px; height:10px; border-radius:50%;
  background:var(--cmp, var(--brand)); flex:none}
.ovwho-x{color:var(--ink-2); font-weight:600}

.ovpick{display:flex; flex-direction:column; gap:10px}
.ovpick-search{width:100%; font:inherit; font-size:1rem; padding:10px 12px;
  border:1px solid var(--line); border-radius:12px; background:var(--card); color:var(--ink)}
.ovpick-head{font-size:.72rem; font-weight:800; letter-spacing:.08em; text-transform:uppercase;
  color:var(--ink-2)}
.ovpick-count{font-size:.82rem; font-weight:700}
.ovpick-list{display:flex; flex-direction:column; max-height:46vh; overflow-y:auto;
  -webkit-overflow-scrolling:touch; border-top:1px solid var(--line)}
.ovpick-row{display:flex; align-items:center; gap:10px; padding:8px 2px; text-align:left;
  background:none; border:0; border-bottom:1px solid var(--line); font:inherit;
  color:var(--ink); cursor:pointer; width:100%}
.ovpick-box{width:22px; height:22px; border-radius:6px; border:2px solid var(--line);
  display:flex; align-items:center; justify-content:center; flex:none; font-weight:900;
  color:#fff; font-size:.85rem}
.ovpick-row.is-on .ovpick-box{background:var(--brand); border-color:var(--brand)}
.ovpick-name{display:flex; flex-direction:column; min-width:0}
.ovpick-name strong{overflow:hidden; text-overflow:ellipsis; white-space:nowrap}

.ovseg{display:flex; gap:3px; padding:3px; border-radius:10px; background:var(--line-2);
  margin:8px 0}
.ovseg-one{flex:1; border:0; background:none; border-radius:8px; padding:6px 4px; font:inherit;
  font-size:.8rem; font-weight:800; color:var(--ink-2); cursor:pointer}
.ovseg-one.is-on{background:var(--card); color:var(--ink); box-shadow:0 1px 2px rgba(0,0,0,.14)}
.ovlink{background:none; border:0; padding:0; font:inherit; font-size:.82rem; font-weight:700;
  color:var(--brand); cursor:pointer}

.ovt-charts{margin-bottom:10px}
.ovt-panel{display:flex; flex-direction:column; gap:8px}
.ovt-head{display:flex; justify-content:space-between; align-items:baseline; gap:10px}
.ovt-rankby{display:flex; flex-wrap:wrap; align-items:center; gap:6px}
.ovt-stage, .ovt-linestage{position:relative; height:170px; margin:16px 0 0 30px}
.ovt-grid{position:absolute; inset:0; pointer-events:none}
.ovt-gridline{position:absolute; left:0; right:0; border-top:1px solid var(--line)}
.ovt-gridline span{position:absolute; right:100%; margin-right:6px; transform:translateY(-50%);
  font-size:.66rem; color:var(--ink-2); font-variant-numeric:tabular-nums; white-space:nowrap}
.ovt-cols{position:absolute; inset:0; display:flex; align-items:flex-end}
.ovt-col{flex:1 1 0; height:100%; display:flex; align-items:flex-end; justify-content:center;
  text-decoration:none; color:var(--ink)}
.ovt-bar{position:relative; width:62%; max-width:44px; display:flex; flex-direction:column-reverse;
  border-radius:4px 4px 0 0; min-height:1px}
.ovt-seg{display:block; width:100%}
.ovt-seg.gold{background:#e8b757} .ovt-seg.silver{background:#b9c3ca}
.ovt-seg.bronze{background:#cf9465} .ovt-seg.other{background:var(--ink-2); opacity:.55}
.ovt-seg:last-child{border-radius:4px 4px 0 0}
.ovt-val{position:absolute; bottom:100%; left:50%; transform:translateX(-50%); margin-bottom:3px;
  font-size:.7rem; font-weight:800; white-space:nowrap; font-variant-numeric:tabular-nums}
.ovt-trend, .ovt-lines{position:absolute; inset:0; width:100%; height:100%; overflow:visible;
  pointer-events:none}
.ovt-trend line{stroke:var(--ink); stroke-width:2; stroke-dasharray:5 4;
  vector-effect:non-scaling-stroke}
.ovt-names{display:flex; margin-left:30px; gap:2px}
.ovt-names > span{flex:1 1 0; min-width:0; display:flex; flex-direction:column; align-items:center;
  font-size:.64rem; color:var(--ink-2); text-align:center; line-height:1.25}
.ovt-names strong{font-size:.68rem; color:var(--ink)}
.ovt-names > span > span{display:block; width:100%; overflow:hidden; text-overflow:ellipsis;
  white-space:nowrap}
.ovkey-dash{display:inline-block; width:14px; border-top:2px dashed var(--ink)}
.ovt-takeaway{border-radius:10px; padding:8px 10px; font-size:.84rem; font-weight:700;
  background:var(--line-2)}
.ovt-takeaway.is-up{background:rgba(46,125,79,.12); color:var(--good)}
.ovt-takeaway.is-down{background:rgba(192,96,42,.12); color:var(--cmp3)}
.ovbar-two{grid-template-columns:minmax(0,9.5em) minmax(0,1fr) 2.8em}
.ovbar-two .ovbar-name{display:flex; flex-direction:column; white-space:normal}
.ovbar-two .ovbar-name > span:first-child{overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.ovbar-sub{font-size:.7rem; font-weight:500; color:var(--ink-2)}
.ovt-total{display:flex; justify-content:space-between; align-items:flex-start; gap:10px;
  border-top:1px solid var(--line); padding-top:8px; margin-top:4px; font-size:.86rem;
  font-variant-numeric:tabular-nums}
.ovt-evhead, .ovt-evrow{display:grid; grid-template-columns:minmax(0,8em) minmax(0,1fr) 3em 2.4em;
  gap:8px; align-items:center}
.ovt-evhead{font-size:.66rem; font-weight:800; letter-spacing:.06em; text-transform:uppercase;
  color:var(--ink-2)}
.ovt-evhead span:nth-child(n+3), .ovt-num{text-align:right; font-variant-numeric:tabular-nums}
.ovt-evrow{font-size:.86rem}
.ovt-evrow .ovbar-name{display:flex; flex-direction:column}
.ovt-line{fill:none; stroke:var(--cmp, var(--brand)); stroke-width:2.5; stroke-linejoin:round}
.ovt-line.is-now{stroke:var(--brand); stroke-width:3}
.ovt-line.is-last{stroke:var(--ink-2); opacity:.6; stroke-dasharray:5 4}
.ovt-swatch.is-now{background:var(--brand); border-radius:2px; height:4px; width:14px}
.ovt-swatch.is-last{background:var(--ink-2); opacity:.6; border-radius:2px; height:4px; width:14px}
.ovt-linestage + .chartends{margin-left:30px}
.ovt-legend{display:flex; flex-direction:column; gap:4px; margin-top:6px}
.ovt-legend-one{display:flex; align-items:center; gap:8px; font-size:.84rem; color:var(--ink);
  text-decoration:none}
.ovt-legend-one strong{margin-left:auto; font-variant-numeric:tabular-nums}
.ovt-vs{margin-top:6px}
.ovt-compare{display:flex; flex-direction:column; margin-top:12px; border-top:1px solid var(--line)}
.ovt-compare-row{display:grid; grid-template-columns:minmax(0,1.7fr) repeat(4, minmax(0,.8fr));
  gap:4px; padding:7px 0; border-bottom:1px solid var(--line); font-size:.84rem;
  color:var(--ink); text-decoration:none; font-variant-numeric:tabular-nums}
.ovt-compare-row > span:not(:first-child){text-align:right}
.ovt-compare-row.is-head{font-size:.66rem; font-weight:800; letter-spacing:.06em;
  text-transform:uppercase; color:var(--ink-2)}
.ovt-compare-name{display:flex; align-items:center; gap:6px; min-width:0}
.ovt-compare-name strong{overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.ovt-evpick{display:flex; align-items:center; gap:8px; font-size:.82rem; font-weight:700;
  color:var(--ink-2)}
.ovt-evpick select{flex:1; min-width:0}
.ovbar.ovbar-two{grid-template-columns:minmax(0,8.5em) minmax(0,1fr) 2.8em}
.ovbar.ovbar-two .ovbar-name, .ovt-evrow .ovbar-name{grid-column:auto}
/* A division change made at a ring, waiting for its day to be checked. */
.ovcheck{background:none; border:0; padding:0; font:inherit; text-align:left; color:var(--ink); vertical-align:top;
  cursor:pointer; line-height:1.45}
.ovcheck strong{color:var(--brand); white-space:nowrap}
.divcheck{display:block; margin-top:3px; color:var(--warn)}
/* The rank under the belt, where the row of tags used to be. */
.profhead-rank{margin-top:5px; font-size:.92rem; font-weight:700; color:var(--ink-2)}
/* A link the organization keeps, with the line saying what it is. */
.orglink{display:flex; flex-direction:column; gap:1px; padding:8px 0; border-top:1px solid var(--line);
  text-decoration:none; color:var(--brand)}
.orglink .tiny{color:var(--ink-2)}

/* ---- the score keypad ----------------------------------------------------
   Docked at the bottom, above everything that is fixed there, with keys a
   thumb can find without looking. The box it is filling is outlined, since
   a read-only box shows no cursor. */
.kpad{position:fixed; left:0; right:0; bottom:0; z-index:60; background:var(--card);
  border-top:1px solid var(--line); box-shadow:0 -8px 24px rgba(10,30,40,.18);
  padding:8px calc(10px + var(--safe-r)) calc(10px + var(--safe-b)) calc(10px + var(--safe-l));
  display:flex; flex-direction:column; gap:7px}
.kpad[hidden]{display:none}
.kpad-head{display:flex; align-items:center; justify-content:space-between; gap:10px;
  min-height:30px}
.kpad-label{font-size:.85rem; font-weight:700; color:var(--ink-2); overflow:hidden;
  text-overflow:ellipsis; white-space:nowrap}
.kpad-keys{display:grid; grid-template-columns:repeat(3, 1fr); gap:7px}
.kpad-foot{display:grid; grid-template-columns:1fr 2fr; gap:7px}
.kpad-key{min-height:50px; border:1px solid var(--line); border-radius:12px;
  background:var(--bg); color:var(--ink); font:inherit; font-size:1.45rem; font-weight:700;
  cursor:pointer; touch-action:manipulation; -webkit-tap-highlight-color:transparent;
  font-variant-numeric:tabular-nums}
.kpad-key:active{background:var(--line-2); transform:scale(.97)}
.kpad-key.is-off{opacity:.3}
.kpad-key.is-back{font-size:1.25rem}
.kpad-key.is-clear{min-height:30px; font-size:.82rem; padding:0 12px; border-radius:999px}
.kpad-key.is-done{font-size:1rem; background:var(--card)}
.kpad-key.is-next{font-size:1.1rem; background:var(--brand); border-color:var(--brand); color:#fff}
input.is-keypad{outline:3px solid var(--brand); outline-offset:1px}
body{--kpad-room:330px}
body.kpad-open{padding-bottom:var(--kpad-room)}
body.kpad-open .fab{display:none}
@media print{ .kpad{display:none !important} }

/* ---- a point you can see go up -------------------------------------------
   Thrown up out of the button in its corner's color, bigger for bigger
   points; a take-back drops away grey. Over the camera, white stays white;
   on a sheet, the white corner's number is drawn in ink so it shows. */
.ptburst{position:fixed; z-index:9700; pointer-events:none; font-weight:900;
  font-size:1.9rem; line-height:1; transform:translate(-50%,-50%);
  font-variant-numeric:tabular-nums; color:var(--brand);
  text-shadow:0 2px 6px rgba(0,0,0,.25); animation:ptburst .9s cubic-bezier(.2,.8,.3,1) forwards}
.ptburst.is-2{font-size:2.3rem}
.ptburst.is-3{font-size:2.8rem}
.ptburst.red{color:#e04848}
.ptburst.white{color:var(--ink)}
.ptburst.onfilm.white{color:#fff; text-shadow:0 2px 8px rgba(0,0,0,.6)}
.ptburst.is-minus{color:var(--ink-2); animation-name:ptdrop}
@keyframes ptburst{
  0%{opacity:0; transform:translate(-50%,-30%) scale(.5)}
  18%{opacity:1; transform:translate(-50%,-90%) scale(1.2)}
  100%{opacity:0; transform:translate(-50%,-320%) scale(1)}
}
@keyframes ptdrop{
  0%{opacity:0; transform:translate(-50%,-50%) scale(.8)}
  20%{opacity:1}
  100%{opacity:0; transform:translate(-50%,120%) scale(.9)}
}
.filmscore-num.is-bump{display:inline-block; animation:scorebump .45s cubic-bezier(.3,1.6,.5,1)}
@keyframes scorebump{0%{transform:scale(1)} 35%{transform:scale(1.35)} 100%{transform:scale(1)}}
@media (prefers-reduced-motion:reduce){
  .ptburst{display:none}
  .filmscore-num.is-bump{animation:none}
}

/* ---- drilling down ---------------------------------------------------------
   Anything that opens what it was made from. Marked the same way everywhere:
   a pointer on a computer, and a faint underline-free press state on a phone,
   so a whole row can be pressed without every figure in it turning into a
   link-colored word. */
.drill{cursor:pointer; -webkit-tap-highlight-color:rgba(21,96,130,.12)}
.drill:focus-visible{outline:2px solid var(--brand); outline-offset:2px; border-radius:6px}
.drillrow.drill:active, .statbox.drill:active, .stat.drill:active, tr.drill:active{background:var(--line-2)}
svg .drill:hover, svg .drill:focus-visible{opacity:.78}
.statbox.drill, .stat.drill{position:relative}
.statbox.drill::after, .stat.drill::after{content:'\203A'; position:absolute; right:10px; top:8px;
  color:var(--ink-2); font-size:1.1rem; opacity:.55}
td.drill, .drilltxt{text-decoration:underline dotted; text-underline-offset:3px;
  text-decoration-color:var(--ink-2)}
tr.drill > td{cursor:pointer}
.drillbody{display:flex; flex-direction:column; gap:12px}
.drillfacts{display:flex; flex-direction:column; gap:8px}
.drillfact{display:grid; grid-template-columns:minmax(96px, 34%) 1fr; column-gap:10px; align-items:baseline}
.drillfact > strong{display:flex; align-items:center; gap:6px; flex-wrap:wrap}
.drillfact .drillsub{grid-column:2; line-height:1.35}
.drillhead{font-size:.72rem; font-weight:700; letter-spacing:.06em; text-transform:uppercase;
  color:var(--ink-2); margin-top:4px}
.drilllist{display:flex; flex-direction:column; border-top:1px solid var(--line)}
.drillrow{display:flex; align-items:center; gap:10px; padding:10px 4px;
  border-bottom:1px solid var(--line); min-height:44px}
.drillrow.drill::after{content:'\203A'; color:var(--ink-2); opacity:.6; font-size:1.1rem}
.drillrow-dot{width:16px; flex:0 0 16px}
.drillrow-text{display:flex; flex-direction:column; flex:1 1 auto; min-width:0}
.drillrow-main{overflow-wrap:anywhere}
.drillrow-value{white-space:nowrap; font-variant-numeric:tabular-nums}
.sheetview{display:flex; flex-direction:column; gap:6px}
.sv-who{font-weight:700}
.sv-table td, .sv-table th{padding:6px 8px}
.sv-table .sv-place{text-align:right; white-space:nowrap}
.sv-table .sv-mid{font-variant-numeric:tabular-nums; color:var(--ink-2)}
.sv-table tr.sv-head th{text-align:left; background:var(--line-2); font-size:.78rem}
.sv-table tr.faint td{color:var(--ink-2); font-size:.85rem}
.sv-table tr.groups td{border-bottom:none}
.sv-table tr.mine{background:#fff8e6}
html[data-theme=dark] .sv-table tr.mine{background:#2b2519}
/* The sheet's table keeps its columns on a phone (it is a trailtable for
   that), and keeps the competitor it was opened for marked. */
@media (max-width:620px){
  .tbl.trailtable.sv-table tbody tr.mine{background:#fff8e6 !important}
  html[data-theme=dark] .tbl.trailtable.sv-table tbody tr.mine{background:#2b2519 !important}
  .tbl.trailtable.sv-table tbody td.sv-place{display:table-cell !important; text-align:right}
  .tbl.trailtable.sv-table tbody tr.sv-head th{display:table-cell}
}
.sv-table td.sv-place > *{vertical-align:middle}
.sv-table td.sv-place svg{margin-right:4px}

/* ---- standings, one line to a place -------------------------------------
   Place, name and points on one line. The location is under it on a phone
   held upright, and on the same line where there is room for it. */
.stlist{display:flex; flex-direction:column; border-top:1px solid var(--line)}
.strow-headline, .strow-line{display:grid; align-items:center; column-gap:10px;
  grid-template-columns:3.6em minmax(0, 1fr) auto; padding:9px 4px}
.strow-headline{font-size:.72rem; font-weight:700; letter-spacing:.05em; text-transform:uppercase;
  color:var(--ink-2); border-bottom:1px solid var(--line); padding-top:4px; padding-bottom:4px}
.strow{border-bottom:1px solid var(--line)}
.strow-line{list-style:none; cursor:pointer}
.strow-line::-webkit-details-marker{display:none}
.strow.bare .strow-line{cursor:default}
.strow-place{font-variant-numeric:tabular-nums; color:var(--ink-2); font-weight:700}
.strow-name{overflow-wrap:anywhere}
.strow-pts{text-align:right; font-variant-numeric:tabular-nums}
.strow-where{display:none}
.strow-more{padding:0 4px 10px calc(3.6em + 14px); color:var(--ink-2)}
.strow.mine{background:#fff8e6}
html[data-theme=dark] .strow.mine{background:#2b2519}
.strow:not(.bare) .strow-name::after{content:' \25BE'; color:var(--ink-2); font-size:.75em}
.strow[open]:not(.bare) .strow-name::after{content:' \25B4'}
@media (min-width:621px){
  .strow-headline, .strow-line{grid-template-columns:3.6em minmax(0, 1.2fr) minmax(0, 1fr) auto}
  .strow-where{display:block; color:var(--ink-2); font-size:.86rem; overflow-wrap:anywhere}
  .strow-more{display:none}
  .strow-line{cursor:default}
  .strow:not(.bare) .strow-name::after,
  .strow[open]:not(.bare) .strow-name::after{content:none}
}
.drillseg{margin-bottom:2px}
.resevent.drill > span:first-child{text-decoration:underline dotted; text-underline-offset:3px;
  text-decoration-color:var(--ink-2)}
.resevent.drill{border-radius:6px}

/* Charts that open what they were drawn from. A line chart is cut into one
   invisible column per point along it, each of which can be pressed. */
.ovt-hits{position:absolute; inset:0; display:grid; z-index:2}
.ovt-hit{display:block; height:100%; border-radius:4px}
.ovt-hit:hover, .ovt-hit:focus-visible{background:rgba(21,96,130,.08)}
.ovt-col.drill:hover .ovt-bar{filter:brightness(1.06)}
.ovt-seg.drill{display:block}
div.ovbar.drill, .ovt-evrow.drill, .ovt-compare-row.drill, .ovt-legend-one.drill,
.metrow.drill, .seatrow.drill, .recordline.drill, .ovstand-chip.drill{cursor:pointer}
div.ovbar.drill:hover, .ovt-evrow.drill:hover, .ovt-compare-row.drill:hover,
.metrow.drill:hover, .seatrow.drill:hover{background:var(--line-2); border-radius:8px}
.chartbar.drill:hover{filter:brightness(1.08)}

/* ---- the tournament a form is about -------------------------------------
   Logo, name, dates and where, and Change: the same card on every page of
   the results forms, readable in either theme. */
.sstart-tour.has-logo{justify-content:flex-start; gap:12px; padding:10px 12px;
  background:var(--card); border:1px solid var(--line); color:var(--ink)}
.sstart-tour.has-logo .sstart-tourtext{flex:1 1 auto}
.sstart-tourlogo{width:46px; height:46px; border-radius:10px}
span.sstart-tourlogo{display:flex; align-items:center; justify-content:center;
  color:var(--brand); background:var(--line-2)}
.sstart-tourname{font-size:1rem; line-height:1.25; color:var(--ink); overflow-wrap:anywhere}
.sstart-tourwhen{font-size:.86rem; color:var(--ink); font-weight:600}
.sstart-tourwhere{font-size:.8rem; color:var(--ink-2)}
.sstart-tour.has-logo .tlink{align-self:center; flex:none; font-size:.9rem; font-weight:700}
html[data-theme=dark] span.sstart-tourlogo{background:rgba(255,255,255,.08); color:#9fd0e8}
/* The chip that names the team on page two of a team result, which carried
   the brand's palest wash and darkest ink and was close to unreadable once
   the theme turned dark. */
html[data-theme=dark] .pwho{background:rgba(120,190,225,.18); color:#d6ecf7}

/* The school's logo and name on Home open the school's page, and the
   organization's open the organization's: links that keep the look of the
   card rather than turning blue and underlined on a colored background. */
.hero-logolink{display:flex; flex:0 0 auto; align-self:stretch; border-radius:12px}
.hero-orglink{display:flex; flex:none; align-self:center; border-radius:12px}
.hero-link{color:inherit; text-decoration:none}
.hero-link:hover{text-decoration:underline; text-underline-offset:3px}
.hero-logolink:focus-visible, .hero-orglink:focus-visible, .hero-link:focus-visible{
  outline:2px solid #fff; outline-offset:2px}

/* ---- getting started: the welcome and the guided setup ----------------------
   Full screen. UI.render marks the page is-setup on the welcome and the
   guide itself, and the bars and the + button step aside so the one
   question is all there is. A page at a time, as tiles, with Back and Next
   kept at the bottom where a thumb is. */
html.is-setup .appbar, html.is-setup .tabbar, html.is-setup .fab,
html.is-setup .fabtip{display:none !important}
html.is-setup .view{max-width:560px;
  padding:0 calc(16px + var(--safe-r)) 0 calc(16px + var(--safe-l))}
.guide{min-height:100vh; min-height:100dvh; display:flex; flex-direction:column}
.guide-top{position:sticky; top:0; z-index:5; display:flex; align-items:center; gap:12px;
  padding:calc(12px + env(safe-area-inset-top, 0px)) 0 10px; background:var(--bg)}
.guide-name{flex:1; font-weight:800; font-size:.95rem}
.guide-top .sstart-steps{flex:none}
.guide-x{display:inline-flex; align-items:center; justify-content:center; flex:none;
  width:36px; height:36px; border-radius:18px; color:var(--ink-2)}
.guide-x:hover{background:var(--line-2)}
.guide-body{flex:1; display:flex; flex-direction:column; gap:12px; padding:8px 0 20px}
.guide-q{margin:0; font-size:1.45rem; text-wrap:balance}
.guide-sub{margin:-6px 0 0; font-size:.9rem; color:var(--ink-2)}
.guide-note{margin:0; font-size:.8rem; color:var(--ink-2)}
.hubbanner-actions{display:flex; gap:4px; justify-content:flex-end}
/* Something to type into, on a tile page: white and outlined like a field,
   so it is not read as part of the background. */
.guide-body .guide-field{background:var(--field,#fff); border:1.5px solid var(--ink-2);
  font-size:1rem; padding:12px 13px}
/* Adding somebody is the main thing on its page: a white tile. */
.guide-body .ptile.is-alt{background:var(--card); border-style:solid}
.guide-foot{position:sticky; bottom:0; display:flex; gap:10px; background:var(--bg);
  padding:12px 0 calc(12px + var(--safe-b)); border-top:1px solid var(--line)}
.guide-foot .btn:last-child{flex:1; justify-content:center}
.guide-hello{display:flex; align-items:center; gap:12px; margin-top:4px}
.guide-hello p{margin:0; font-size:1rem}
.guide-logo{width:56px; height:56px; border-radius:13px; flex:none}
a.ttile{text-decoration:none}
.guide-know{cursor:default}
a.guide-know{cursor:pointer}
.guide-know .quickaccess-btn{width:40px; height:40px}
.guide-know .quickaccess-btn .uicon{color:#fff}
.guide .pnote{display:flex; flex-direction:column; gap:2px; background:var(--card);
  border:1px solid var(--line)}
/* A chosen tile in dark mode: the darker brand shade is barely lighter
   than the tile behind it there, so the words take the ordinary ink. The
   border still says which one is chosen. Every tile form, not only this. */
[data-theme="dark"] .ttile.is-on, [data-theme="dark"] .belttile.is-on{color:var(--ink)}

/* ---- the fold arrow, everywhere --------------------------------------------
   Every fold in the app had its own text triangle, between .7rem and .85rem,
   in whatever the font made of it: easy to miss, and a different size from
   one page to the next. One drawn chevron now, 16px, the same weight as the
   icons, turning to show which way the fold goes.

   Two families, as before. Most point right when shut and down when open.
   The ones that sit at the end of a row, under which a list drops, point
   down when shut and up when open.

   The JS-drawn carets keep their text, which says the state for anything
   reading it, and draw the chevron over it; their state comes from the
   head's aria-expanded, or data-open where there is no head to ask. */
.tgroup-head::before, .tgroup[open] > .tgroup-head::before,
.titlegroup-head::after, .titlegroup[open] .titlegroup-head::after,
.lifeseason-head::after, .lifeseason[open] .lifeseason-head::after,
summary.filterbar::after, details[open] > summary.filterbar::after,
.foldbox > summary.foldhead::after, .foldbox[open] > summary.foldhead::after,
.sheetgroup-head::after, .sheetgroup[open] > .sheetgroup-head::after,
.filtergroup-head::after, .filtergroup[open] > .filtergroup-head::after,
.strow:not(.bare) .strow-name::after, .strow[open]:not(.bare) .strow-name::after,
.card-caret::before, .moreopts-caret::before, .rowcaret::before,
.partcat-caret::before, .pickerhead-caret::before{
  content:''; display:inline-block; flex:none; vertical-align:middle;
  width:16px; height:16px; background-color:currentColor; color:var(--ink-2);
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 6l4.5 4.5L12.5 6' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px 16px no-repeat;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 6l4.5 4.5L12.5 6' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px 16px no-repeat;
  transition:transform .15s ease; font-size:inherit}
/* The span carets: the glyph stays in the text, unseen, with the chevron
   drawn in its place. */
.card-caret, .moreopts-caret, .rowcaret, .partcat-caret, .pickerhead-caret{
  font-size:0 !important; line-height:0; color:var(--ink-2)}
/* A name in a standings row is followed by its arrow, a little apart. */
.strow:not(.bare) .strow-name::after{width:14px; height:14px; margin-left:4px;
  -webkit-mask-size:14px 14px; mask-size:14px 14px}

/* Right when shut, down when open. */
.tgroup-head::before, .card-caret::before, .moreopts-caret::before,
.rowcaret::before, .partcat-caret::before{transform:rotate(-90deg)}
.tgroup[open] > .tgroup-head::before,
.card-toggle[aria-expanded="true"] .card-caret::before,
.moreopts-toggle[aria-expanded="true"] .moreopts-caret::before,
[aria-expanded="true"] > .rowcaret::before,
.partcat-caret[data-open]::before{transform:none}

/* Down when shut, up when open. */
.titlegroup[open] .titlegroup-head::after,
.lifeseason[open] .lifeseason-head::after,
details[open] > summary.filterbar::after,
.foldbox[open] > summary.foldhead::after,
.sheetgroup[open] > .sheetgroup-head::after,
.filtergroup[open] > .filtergroup-head::after,
.strow[open]:not(.bare) .strow-name::after,
.pickerhead-caret[data-open]::before{transform:rotate(180deg)}
@media (prefers-reduced-motion: reduce){
  .tgroup-head::before, .card-caret::before, .moreopts-caret::before,
  .rowcaret::before, .partcat-caret::before, .pickerhead-caret::before,
  .titlegroup-head::after, .lifeseason-head::after, summary.filterbar::after,
  .foldbox > summary.foldhead::after, .sheetgroup-head::after,
  .filtergroup-head::after, .strow-name::after{transition:none}
}

/* ---- photos and video on a profile -----------------------------------------
   One row of square tiles, the last of them saying how many more there
   are. A filter above: by tournament on a person or team, by person or
   team on a tournament, and photos or video when there are both. */
.mediabox{display:flex; flex-direction:column; gap:10px}
.mediafilters{display:flex; flex-wrap:wrap; gap:8px; align-items:center}
.mediafilters select.input{flex:1 1 200px; min-width:0; width:auto}
.mediafilters .sschips{flex:0 0 auto}
.mediarow{display:grid; grid-template-columns:repeat(4, minmax(0, 1fr)); gap:8px}
@media (min-width:700px){ .mediarow{grid-template-columns:repeat(4, minmax(0, 140px))} }
.mediatile{position:relative; display:block; width:100% !important; height:auto !important;
  aspect-ratio:1; padding:0; border:1px solid var(--line); border-radius:10px;
  overflow:hidden; background:var(--line-2); cursor:pointer}
.mediatile:hover{border-color:var(--brand)}
.mediatile img, .mediatile .clipposter{width:100%; height:100%; aspect-ratio:auto;
  object-fit:cover; display:block}
.mediatile.is-clip .clipframe{height:100%}
.mediatile.is-clip .clipframe::after, .mediatile.is-clip .cliplen{display:none}
.mediatile-play{position:absolute; left:50%; top:50%; width:30px; height:30px;
  margin:-15px 0 0 -15px; border-radius:50%; background:rgba(0,0,0,.55)}
.mediatile-play::after{content:''; position:absolute; left:12px; top:9px;
  border-style:solid; border-width:6px 0 6px 9px;
  border-color:transparent transparent transparent #fff}
.mediatile-len{position:absolute; right:4px; bottom:4px; padding:1px 5px; border-radius:6px;
  background:rgba(0,0,0,.6); color:#fff; font-size:.66rem; font-weight:700; line-height:1.4}
.mediatile.is-more{display:flex !important; flex-direction:column; align-items:center;
  justify-content:center; gap:0; background:var(--brand-l); border:1px dashed var(--brand);
  color:var(--brand-d); font:inherit}
.mediatile.is-more strong{font-size:1.2rem; line-height:1.1}
.mediatile.is-more span{font-size:.75rem; font-weight:700}
[data-theme="dark"] .mediatile.is-more{color:var(--ink)}
.mediafold{align-self:flex-start}

/* ---- the game ----------------------------------------------------------------
   A layer over the app, not a page: the page underneath is left exactly as
   it was. The game draws its own safe areas. Not .overlay, which the
   Android back button reads as a dialog. */
.gamelayer{position:fixed; inset:0; z-index:1000; background:#0b2f40}
.gamelayer iframe{display:block; width:100%; height:100%; border:0}
html.is-gaming, html.is-gaming body{overflow:hidden}
.gametile{display:flex; align-items:center; gap:12px; width:100%; padding:12px;
  border:1px solid var(--line); border-radius:14px; background:var(--card);
  color:var(--ink); font:inherit; text-align:left; cursor:pointer}
.gametile:hover{border-color:var(--brand)}
.gametile:active{transform:scale(.99)}
.gametile-mark{display:inline-flex; align-items:center; justify-content:center; flex:none;
  width:44px; height:44px; border-radius:12px; background:var(--brand); color:#fff}
.gametile-mark .uicon{color:#fff}
.gametile-text{flex:1; display:flex; flex-direction:column; gap:1px; min-width:0}
.gametile-text strong{font-size:1rem}
.gametile-text span{font-size:.8rem; color:var(--ink-2)}
.gametile > .uicon:last-child{color:var(--ink-2)}

/* ---- common opponents in judged rings ----------------------------------------
   The gap chart: a bar a ring, above the line when your competitor scored
   higher, below it when the opponent did. The same columns, standing from
   the floor, show where somebody finished as a share of the field. */
.gapchart{display:flex; flex-direction:column; gap:4px; margin:6px 0}
.gapbars{display:flex; align-items:stretch; gap:3px; height:110px;
  border-top:1px solid transparent; position:relative}
.gapbars:not(.is-standing)::after{content:''; position:absolute; left:0; right:0; top:50%;
  border-top:1px solid var(--line)}
.gapcol{flex:1 1 0; min-width:6px; max-width:28px; display:flex; flex-direction:column; cursor:pointer}
.gapbars.is-standing .gapcol{justify-content:flex-end; border-bottom:1px solid var(--line)}
.gaphalf{flex:1 1 50%; display:flex; position:relative}
.gaphalf.is-up{align-items:flex-end}
.gaphalf.is-down{align-items:flex-start}
.gapbar{display:block; width:100%; border-radius:3px}
.gapbar.is-ahead{background:var(--good, #2e8b57)}
.gapbar.is-behind{background:var(--bad, #c0392b)}
.gapbar.is-standing{background:var(--brand)}
.gapcol:hover .gapbar{opacity:.8}
.namechecks{display:flex; flex-direction:column; gap:8px}
.namecheck{display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:8px;
  border:1px solid var(--line); border-radius:12px; padding:10px 12px; background:var(--card)}
.namecheck-text{display:flex; flex-direction:column; gap:1px; min-width:0; flex:1 1 200px}
.namecheck-btns{display:flex; gap:6px; flex:none}
