/* Phone first: one column, big touch targets, bottom navigation. Wider screens just get more room. */
:root {
  --chosen-weight: .025em; /* a thin outline round the text of something chosen: heavier, not wider */
  --bg: #f4f6fa; --card: #fff; --ink: #1d2433; --muted: #667085; --line: #dde2ea;
  --accent: #1f5fbf; --accent-ink: #fff; --ok: #12805c; --ok-bg: #e3f6ee; --wait: #8a5a00; --wait-bg: #fff3d6;
  --bad: #b42318; --beau: #2f6fdf; --belle: #d6457a; --both: #7a4fd0;
  --radius: 12px; --conv: #975a16; --conv-bg: #fff6e0; --conv-ink: #fff;
  --mine: #1e7a3c; --mine-bg: #e6f6ea; --other: #b42318; --other-bg: #fdeceb;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #12151c; --card: #1c212b; --ink: #e8ecf3; --muted: #9aa4b5; --line: #2d3442;
    --accent: #5b8ff0; --ok-bg: #133a2c; --ok: #5fd3a3; --wait-bg: #3a2e12; --wait: #f2c46b;
    --conv: #f0b552; --conv-bg: #33280f; --conv-ink: #2a1d05;
    --mine: #6fd38f; --mine-bg: #15321f; --other: #f19189; --other-bg: #3a1a18;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
    --bg: #12151c; --card: #1c212b; --ink: #e8ecf3; --muted: #9aa4b5; --line: #2d3442;
    --accent: #5b8ff0; --ok-bg: #133a2c; --ok: #5fd3a3; --wait-bg: #3a2e12; --wait: #f2c46b;
    --conv: #f0b552; --conv-bg: #33280f; --conv-ink: #2a1d05;
    --mine: #6fd38f; --mine-bg: #15321f; --other: #f19189; --other-bg: #3a1a18;
  color-scheme: dark;
}
/* manipulation: no double-tap zoom, so tapping + or a name quickly changes it instead of zooming
   (pinching to zoom still works). Drag handles set touch-action: none themselves. */
* { box-sizing: border-box; touch-action: manipulation; }
/* Bigger text all over (Anders 2026-10-21): 17 px at the standard setting instead of 16, like the iPhone's own. */
html { -webkit-text-size-adjust: 100%; font-size: 106.25%; }
/* Text follows the reader's own text size (Anders 2026-10-20): the browser's font size setting, and on an
   iPhone or iPad the system's Text Size / Larger Text, which reaches a web page only through
   -apple-system-body (17 px at the standard setting, the same as everywhere else). */
@supports (font: -apple-system-body) and (-webkit-touch-callout: none) {
  html { font: -apple-system-body; }
}
/* Text size and high contrast chosen under Advanced settings (Anders 2026-11-01); light or dark is
   data-theme above. A chosen size is a fixed size, also on an iPhone. */
html.text-large { font: inherit; font-size: 121%; }
html.text-larger { font: inherit; font-size: 137%; }
html.contrast { --muted: #343b48; --line: #7d879a; --ink: #000; }
html.contrast a { text-decoration: underline; }
html.contrast[data-theme="dark"] { --muted: #d3d9e3; --line: #6b7587; --ink: #fff; }
@media (prefers-color-scheme: dark) {
  html.contrast:not([data-theme="light"]) { --muted: #d3d9e3; --line: #6b7587; --ink: #fff; }
}
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-size: 1.06rem; line-height: 1.45; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  padding-bottom: calc(16px + env(safe-area-inset-bottom));
}
a { color: var(--accent); }
a.plain, a.grow { color: inherit; text-decoration: none; }
h2 { font-size: 1.3rem; margin: .4em 0 .5em; }
/* A long word in a heading breaks instead of running off the screen when the text is made bigger. */
h1, h2, h3 { overflow-wrap: break-word; hyphens: auto; }
h3 { font-size: 1.05rem; margin: .2em 0 .5em; }
p { margin: .4em 0; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.center { text-align: center; }
.grow { flex: 1; min-width: 0; }
.push { margin-left: auto; }
.warn { color: var(--bad); }

/* top bar */
.top {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 8px;
  padding: 10px 16px; padding-top: calc(10px + env(safe-area-inset-top));
  background: var(--accent); color: var(--accent-ink);
}
/* On a short screen (a laptop zoomed to 200 %, a phone on its side) the top bar scrolls away,
   so it and the bottom menu do not take most of the screen. */
@media (max-height: 500px) { .top { position: static; } }
.brand { display: block; flex: none; line-height: 0; }
.brand .logo { display: block; height: 34px; margin: -4px 0; }
.logo svg { display: block; height: 100%; width: auto; }
.logo-big { display: block; height: 96px; margin: 4px 0 8px; }
.badge { font-size: .75rem; background: rgba(255,255,255,.2); padding: 2px 6px; border-radius: 6px; }
.who { margin-left: auto; color: inherit; text-decoration: none; font-size: .95rem; opacity: .9; }
.flag { display: inline-block; width: 22px; height: 15px; vertical-align: -2px; border-radius: 2px; overflow: hidden; box-shadow: 0 0 0 1px rgba(0,0,0,.15); }
.flag svg { width: 100%; height: 100%; display: block; }
/* the menu under my picture (logged out: under the flag): language, about, what is new */
.set-picker { position: relative; flex: none; }
.top .set-picker { margin-left: auto; }
.set-btn { position: relative; background: rgba(255,255,255,.15); color: inherit; border: 0; padding: 4px 6px; min-height: 36px; min-width: 36px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; }
.cog svg { display: block; }
.set-menu { position: absolute; right: 0; top: 115%; background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 12px; padding: 6px; box-shadow: 0 8px 24px rgba(0,0,0,.2); z-index: 20; min-width: 250px;
  max-height: calc(100dvh - 64px - env(safe-area-inset-top)); overflow-y: auto; overscroll-behavior: contain; }
.set-menu[hidden] { display: none; }
/* the languages on one row */
.set-menu .set-langs { display: flex; gap: 4px; padding: 2px; }
.set-menu .set-langs button { flex: 1; justify-content: center; border: 1px solid var(--line); }
.set-menu .set-langs .flag { width: 28px; height: 19px; }
.set-menu .set-langs button.on { border-color: var(--accent); }
.set-menu-head { padding: 4px 8px; font-size: .85rem; color: var(--muted); font-weight: 700; }
.set-menu button, .set-menu a { display: flex; width: 100%; gap: 8px; align-items: center; justify-content: flex-start; border: 0; background: none; text-align: left; border-radius: 8px; color: inherit; text-decoration: none; padding: 8px 10px; min-height: 40px; font: inherit; }
.set-menu button.on { background: var(--bg); -webkit-text-stroke: var(--chosen-weight) currentColor; }
.set-menu a:hover, .set-menu button:hover { background: var(--bg); }
.set-menu hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }
.set-ico { width: 22px; text-align: center; flex: none; }
.set-menu a { white-space: nowrap; }
.about h3 { margin-bottom: 4px; }
.about ul { padding-left: 1.2em; margin: 4px 0 0; }
.feedback-body { white-space: pre-wrap; margin: 4px 0 2px; }
/* role views: each role has its own colour (top bar, buttons, menu) and a switch top right */
body.role-caller { --accent: #6b3fb5; }
body.role-organiser { --accent: #11734f; }
body.role-admin { --accent: #8a2c2c; }
body.role-assoc { --accent: #0d6b7a; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) body.role-caller { --accent: #a07ae6; }
  :root:not([data-theme="light"]) body.role-organiser { --accent: #3fae84; }
  :root:not([data-theme="light"]) body.role-admin { --accent: #d06a6a; }
  :root:not([data-theme="light"]) body.role-assoc { --accent: #4fb6c6; }
}
.role-picker { position: relative; min-width: 0; flex: 0 1 auto; }
/* not logged in, on a public page: the login is a button in the top bar */
.login-btn { margin-left: auto; flex: none; background: rgba(255,255,255,.95); color: var(--accent); min-height: 34px; padding: 4px 14px; font-weight: 700; border-radius: 999px; text-decoration: none; display: inline-flex; align-items: center; white-space: nowrap; }
.login-btn:hover { background: #fff; }
.login-btn + .set-picker { margin-left: 0; }
.role-btn { background: rgba(255,255,255,.95); color: var(--accent); border: 0; min-height: 36px; padding: 4px 12px; font-weight: 700; border-radius: 999px; max-width: 100%; white-space: nowrap; display: flex; align-items: center; gap: 4px; }
.role-btn-name { max-width: 16em; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.role-menu { position: absolute; left: 0; top: 115%; background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 12px; padding: 6px;
  box-shadow: 0 8px 24px rgba(0,0,0,.2); z-index: 20; min-width: min(260px, calc(100vw - 80px)); max-width: calc(100vw - 80px); }
.role-menu[hidden] { display: none; }
.role-menu-head { padding: 6px 8px 8px; font-weight: 700; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.role-menu-head small, .role-menu button small { display: block; font-weight: 400; color: var(--muted); font-size: .85rem; }
.role-menu button { display: flex; width: 100%; gap: 10px; align-items: center; justify-content: flex-start; border: 0; background: none; text-align: left; border-radius: 8px; border-left: 4px solid transparent; }
.role-menu button.on { background: var(--bg); }
.role-menu .rm-ico { font-size: 1.4rem; flex: none; width: 1.6em; text-align: center; }
/* The menu never runs past the bottom of the screen; when the screen is low (a phone on its side),
   each choice is just the icon and its name on one line. */
.role-menu { max-height: calc(100vh - 64px); max-height: calc(100dvh - 64px - env(safe-area-inset-top)); overflow-y: auto; overscroll-behavior: contain; }
@media (max-height: 560px) {
  .role-menu { padding: 4px; }
  .role-menu-head { padding: 2px 8px 4px; }
  .role-menu-head small, .role-menu button small { display: none; }
  .role-menu button { min-height: 36px; padding: 2px 10px; gap: 8px; }
  .role-menu button strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
  .role-menu button > span:last-child { min-width: 0; }
  .role-menu .rm-ico { font-size: 1.1rem; }
}
/* ...and in two columns when the screen is also wide */
@media (max-height: 560px) and (min-width: 560px) {
  .role-menu { display: grid; grid-template-columns: 1fr 1fr; column-gap: 4px; min-width: 460px; }
  .role-menu-head, .role-menu > p { grid-column: 1 / -1; }
}
.rm-dancer { border-left-color: #1f5fbf !important; } .rm-caller { border-left-color: #6b3fb5 !important; }
.rm-organiser { border-left-color: #11734f !important; } .rm-admin { border-left-color: #8a2c2c !important; } .rm-assoc { border-left-color: #0d6b7a !important; }
.hints { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.role-hint { display: block; width: 100%; text-align: left; font: inherit; font-size: .95rem; padding: 8px 12px; border-radius: 10px; text-decoration: none; border: 1px dashed; background: none; cursor: pointer; min-height: 0; }
.hint-organiser { color: #11734f; border-color: #11734f; } .hint-caller { color: #6b3fb5; border-color: #6b3fb5; }
.panel.job { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 8px 12px; align-items: center; }
.job > .button, .job-btns { grid-column: 1 / -1; }
.job-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.job-btns > * { flex: 1; }
@media (max-width: 420px) { .badge { display: none; } .brand .logo { height: 30px; } .account-btn { margin-left: 2px; } .role-btn { padding: 4px 8px; gap: 2px; font-size: .97rem; } }

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

/* The menu: on a phone under the menu button (☰) in the top bar, left of my picture (Anders 2026-10-21);
   on a computer (1000 px and wider) the same pages stand in a column on the left. */
nav.bottom { display: none; }
.menu-picker { position: relative; flex: none; margin-left: auto; }
.menu-picker + .set-picker, .menu-picker ~ .acc-picker { margin-left: 0; }
.menu-btn { position: relative; background: rgba(255,255,255,.15); color: inherit; border: 0; padding: 4px 6px; min-height: 40px; min-width: 40px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; }
.menu-ico, .menu-ico svg { display: block; }
.menu-btn .nbadge { position: absolute; top: -2px; right: -4px; }
.nav-menu { position: absolute; right: -52px; top: 115%; background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 12px; padding: 6px; box-shadow: 0 8px 24px rgba(0,0,0,.2); z-index: 20;
  width: min(300px, calc(100vw - 24px)); max-height: calc(100dvh - 64px - env(safe-area-inset-top)); overflow-y: auto; overscroll-behavior: contain; }
.nav-menu[hidden] { display: none; }
.nav-menu a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; min-height: 48px; border-radius: 8px; color: inherit; text-decoration: none; font-size: 1.1rem; }
.nav-menu a:hover { background: var(--bg); }
.nav-menu a.on { color: var(--accent); background: var(--bg); -webkit-text-stroke: var(--chosen-weight) currentColor; }
.nav-menu a .ico { width: 1.6em; text-align: center; font-size: 1.3rem; flex: none;
  /* Colour emoji, never the grey text versions some phones pick for symbols */
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; }
.nav-menu a .nbadge { margin-left: auto; }
/* More (the dancer's menu, Anders 2026-11-12): a row like the others, quieter, at the bottom of the short menu */
.nav-more { display: flex; align-items: center; justify-content: flex-start; gap: 12px; width: 100%; padding: 10px 12px; min-height: 48px; border: 0; border-radius: 8px; background: none;
  color: var(--muted); font: inherit; font-size: 1.1rem; text-align: left; cursor: pointer; border-top: 1px solid var(--line); }
.nav-more .ico { width: 1.6em; text-align: center; flex: none; }
.nav-more:hover:not(:disabled) { background: var(--bg); }
.nav-more:disabled { cursor: default; opacity: .7; }
nav.bottom .nav-more { padding: 12px 16px; font-size: .95rem; border-radius: 0; gap: 10px; }
.nav-menu a.nav-back { color: var(--muted); font-size: 1rem; border-bottom: 1px solid var(--line); border-radius: 8px 8px 0 0; }
@media (min-width: 1000px) {
  .menu-picker { display: none; }
  .menu-picker + .set-picker, .menu-picker ~ .acc-picker { margin-left: auto; }
  nav.bottom { position: fixed; left: 0; bottom: 0; z-index: 5; display: flex; background: var(--card); }
  nav.bottom:empty { display: none; }
  nav.bottom a { color: var(--muted); text-decoration: none; }
  nav.bottom a .ico { font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; }
  nav.bottom a.on { color: var(--accent); -webkit-text-stroke: var(--chosen-weight) currentColor; }
}
.req-list { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 8px; }
.req-list h4 { margin: 0 0 4px; font-size: .95rem; color: var(--muted); }

/* building blocks */
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin: 0 0 12px; }
.panel.org { border-color: var(--accent); }
/* A dance that is not published yet: a small box at its top, and a mark in the organiser's list. */
.panel.unpublished { background: var(--wait-bg); border-color: var(--wait); color: var(--ink); padding: 10px 14px; display: flex; gap: 8px 12px; align-items: center; flex-wrap: wrap; }
.panel.unpublished p { margin: 0; flex: 1 1 16em; font-size: .97rem; }
.chip.unpublished-chip { background: var(--wait-bg); color: var(--wait); border-color: var(--wait); }
/* A dance not yet published, in the organiser's and caller's own lists: tinted, with a bar at its start. */
.drow.unpublished, .drow.unpublished:hover { background: var(--wait-bg); box-shadow: inset 5px 0 0 var(--wait); }
.drow.unpublished .drow-title { font-style: italic; }
/* A club event (round40, Anders 2026-10-20): light green when I can join it (my club's), light red
   when it is another club's and only its members can. */
.chip.internal-chip.mine { background: var(--mine-bg); color: var(--mine); border-color: var(--mine); font-weight: 600; }
.chip.internal-chip.other, .chip.internal-chip:not(.mine) { background: var(--other-bg); color: var(--other); border-color: var(--other); font-weight: 600; }
.ditem.internal-mine, .drow.internal-mine, .card.internal-mine .card-body { background: var(--mine-bg); }
.ditem.internal-other, .drow.internal-other, .card.internal-other .card-body { background: var(--other-bg); }
.ditem.internal-mine, .drow.internal-mine { box-shadow: inset 5px 0 0 var(--mine); }
.ditem.internal-other, .drow.internal-other { box-shadow: inset 5px 0 0 var(--other); }
.card.internal-mine { border-color: var(--mine); }
.card.internal-other { border-color: var(--other); }
.panel.internal-note.other { border-color: var(--other); background: var(--other-bg); }
.panel.internal-note p { margin: 0 0 8px; }
.panel.internal-panel { border-color: var(--mine); }
/* A part of a panel that holds several (onePanel in dance-edit.js): a line above each. */
.panel-part { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 12px; }
.panel-part > h4:first-child, .panel-part > .info-head:first-child { margin-top: 0; }
.panel-part.canceled-note { display: flex; gap: 8px 12px; align-items: center; flex-wrap: wrap; box-shadow: inset 5px 0 0 var(--bad); padding-left: 12px; }
.panel-part.canceled-note p { margin: 0; flex: 1 1 16em; }
.panel-part.canceled-note strong { color: var(--bad); }
.club-events { margin-bottom: 16px; }
/* A cancelled dance (Anders 2026-10-17): still listed, but struck through, faded and marked in red,
   so nobody takes it for one that happens. */
.chip.canceled-chip { background: var(--bad); color: #fff; border-color: var(--bad); font-weight: 700; text-decoration: none; }
.panel.canceled-note { border-color: var(--bad); box-shadow: inset 5px 0 0 var(--bad); padding: 10px 14px 10px 18px; display: flex; gap: 8px 12px; align-items: center; flex-wrap: wrap; }
.panel.canceled-note p { margin: 0; flex: 1 1 16em; }
.panel.canceled-note strong { color: var(--bad); }
.ditem.canceled, .drow.canceled { box-shadow: inset 5px 0 0 var(--bad); }
.ditem.canceled .ditem-title, .ditem.canceled .drow-time, .ditem.canceled .drow-lvl, .drow.canceled .drow-title, .drow.canceled .drow-time,
.gather-pass.canceled .drow-time, .gather-pass.canceled .drow-lvl, .card.canceled .card-title, .card.canceled .card-when-text, .canceled-title { text-decoration: line-through; text-decoration-color: var(--bad); }
.ditem.canceled .citem-main > :not(.ditem-top), .card.canceled .card-body > :not(.card-title), .gather-pass.canceled > :not(.canceled-chip) { opacity: .6; }
.card.canceled .card-img { position: relative; }
.card.canceled .card-img img { opacity: .45; }
.canceled-badge { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) rotate(-8deg); background: var(--bad); color: #fff; font-weight: 800; font-size: 1.2rem;
  letter-spacing: .06em; text-transform: uppercase; padding: 4px 16px; border-radius: 6px; box-shadow: 0 2px 8px rgba(0, 0, 0, .35); white-space: nowrap; }
.head-row { flex-wrap: nowrap; margin: 4px 0 8px; }
.head-row h3 { margin: 0; }
.head-row .button, .head-row button { flex: none; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row + .row { margin-top: 8px; }
button, .button {
  font: inherit; min-height: 44px; padding: 8px 14px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--card); color: var(--ink); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 4px;
}
button.small, .button.small { min-height: 2.4em; padding: 4px 10px; font-size: .95rem; }
/* Buttons and choices look different (Anders 2026-10-21, docs/designregler.md "Knappar och val"):
   - An action is a button: outlined, and the panel's main action (Klar, Spara, Anmäl) is .primary,
     the only filled look in the app. Nothing that is merely chosen is ever filled.
   - Something chosen (a chip, a view, a tab, a filter that is on) is calm: a light tint of the
     role colour, a border in it and the text in it.
   - Choosing never changes a size, so nothing around it moves (Anders 2026-11-12): no ✓ that is added,
     no bolder font. Instead of a bolder font the text gets a thin outline (--chosen-weight), which looks
     heavier but is exactly as wide, and a chip's border is drawn twice as thick inside it (inset shadow),
     so the choice is not shown by colour alone. */
button.primary, .button.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
button.primary:hover, .button.primary:hover { filter: brightness(1.08); }
button.big { font-size: 1.1rem; padding: 12px 20px; }
button.danger { color: var(--bad); border-color: var(--bad); background: none; }
button.on { background: color-mix(in srgb, var(--accent) 12%, var(--card)); color: var(--accent); border-color: var(--accent); }
/* a state that is good news (a fee paid) stays green */
button.on.ok { background: var(--ok-bg); color: var(--ok); border-color: var(--ok); }
input, select, textarea {
  font: inherit; width: 100%; min-height: 44px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--card); color: var(--ink);
}
input[type=checkbox] { width: 22px; min-height: 22px; height: 22px; }
.row select { width: auto; flex: 1; min-width: 0; }
.field { display: block; margin: 0 0 10px; }
.field > span { display: block; font-size: .9rem; color: var(--muted); margin-bottom: 3px; }
.check-line { display: flex; align-items: center; gap: 8px; margin: 4px 0 12px; }
ul.plain { list-style: none; padding: 0; margin: 0 0 8px; }
ul.plain li { padding: 6px 0; border-bottom: 1px solid var(--line); }
details summary { cursor: pointer; font-weight: 600; }

/* Segmented choice (list/cards/map, tabs, beau/belle): a grey track with the chosen part lifted out
   of it, like a switch on a phone, so it reads as "this one is showing" and not as a button to press. */
.seg { display: flex; gap: 2px; margin-bottom: 10px; padding: 3px; border-radius: 12px;
  background: color-mix(in srgb, var(--ink) 8%, var(--bg)); }
.seg button { flex: 1; border: 0; border-radius: 9px; background: none; color: var(--muted); min-height: 38px; box-shadow: none; }
.seg button:hover { color: var(--ink); }
.seg button.on { background: var(--card); color: var(--ink); -webkit-text-stroke: var(--chosen-weight) currentColor; box-shadow: 0 1px 3px rgba(0, 0, 0, .18); }
:root[data-theme="dark"] .seg button.on { background: color-mix(in srgb, var(--ink) 16%, var(--card)); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .seg button.on { background: color-mix(in srgb, var(--ink) 16%, var(--card)); }
}

/* chips and role letters */
.chip { display: inline-block; font-size: .83rem; padding: 2px 8px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); white-space: nowrap; }
.chip.signed_up { background: var(--wait-bg); color: var(--wait); border-color: transparent; }
.chip.attended { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
/* On the waiting list of a full dance (round101). */
.chip.waiting { background: var(--wait-bg); color: var(--wait); border-color: var(--wait); border-style: dashed; }
.max-row input { max-width: 110px; }
.chip.cancelled { color: var(--muted); }
.chip.caller { background: #efe7ff; color: #5a32b0; border-color: transparent; }
.chip.noacc { color: var(--muted); font-style: italic; }
.ri { display: inline-flex; align-items: center; justify-content: center; width: 1.45em; height: 1.45em; border-radius: 50%; color: #fff; font-size: .72em; font-weight: 700; vertical-align: .1em; }
.ri-beau { background: var(--beau); } .ri-belle { background: var(--belle); } .ri-both { background: var(--both); }

/* dance list: filters, list or cards with pictures */
/* Wraps so the view buttons go below the title when the phone's text is made bigger. */
.list-head { display: flex; align-items: center; gap: 8px; position: relative; }
.list-head h2 { flex: 1; min-width: 0; }
/* The view of a list: on a phone one button with a menu; on a computer the switch (Anders 2026-11-14). */
.view-pick { position: relative; flex: none; }
.view-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 2px 10px; white-space: nowrap; }
.view-btn .svg-icon svg { width: 1.375rem; height: 1.375rem; display: block; }
.view-caret { font-size: .8rem; color: var(--muted); }
.list-head.tight .view-word { display: none; }
.view-menu { min-width: 200px; top: 110%; }
.view-menu .set-ico { display: inline-flex; justify-content: center; }
.list-head .view-seg { display: none; }
@media (min-width: 1000px) { .list-head .view-seg { display: flex; } .list-head .view-pick { display: none; } }
/* Quick choices over the dance list: one line, scrolling sideways on a narrow phone */
.fchips.quick-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 0 10px; padding: 1px; gap: 5px; }
.quick-chips::-webkit-scrollbar { display: none; }
.quick-chips .fchip { flex: none; white-space: nowrap; min-height: 32px; padding: 2px 9px; font-size: .87rem; }
.view-seg { margin: 0; }
.view-seg button { min-height: 34px; padding: 2px 12px; }
.fchips { display: flex; flex-wrap: wrap; gap: 6px; }
.fchip { min-height: 34px; padding: 4px 12px; border-radius: 999px; font-size: .95rem; }
.fchip.on { background: color-mix(in srgb, var(--accent) 12%, var(--card)); color: var(--accent); border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent); -webkit-text-stroke: var(--chosen-weight) currentColor; }
.filter-line { margin-bottom: 10px; }
/* The dance list's filter bar: button, chosen filters, count, clear. On a phone the chips move to a
   line of their own under the button that scrolls sideways, so the bar never grows tall. */
.filter-bar { flex-wrap: nowrap; }
.filter-bar > button, .nowrap { flex: none; white-space: nowrap; }
.active-filters .fchip { min-height: 28px; padding: 2px 10px; font-size: .87rem; max-width: 16em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: none; }
@media (max-width: 560px) {
  .filter-bar { flex-wrap: wrap; row-gap: 6px; }
  .filter-bar > .nowrap { margin-left: auto; }
  .active-filters { order: 9; flex-basis: 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .active-filters::-webkit-scrollbar { display: none; }
  .filter-bar > .muted.grow { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex-basis: 0; }
}
.filters .fgroup { margin-bottom: 12px; }
.flabel { display: block; font-size: .9rem; color: var(--muted); margin-bottom: 4px; }
/* The dance list's filters: from date, levels and callers first; the rest under "Advanced", closed until opened. */
.from-row { gap: 8px; align-items: center; flex-wrap: nowrap; }
.from-row .pick-value, .from-row .pick-wrap { flex: 1 1 auto; min-width: 0; max-width: 16em; }
.adv-toggle { display: flex; align-items: center; gap: 4px; width: 100%; justify-content: flex-start; background: none; border: 0; border-top: 1px solid var(--line); border-radius: 0;
  padding: 12px 2px; margin: 4px 0 8px; font: inherit; font-weight: 700; color: var(--ink); text-align: left; }
.adv-toggle.on { color: var(--accent); background: none; border-color: var(--line); }
.adv-arrow { width: 1.1em; display: inline-block; }
.advanced { padding-bottom: 4px; }
.row.dates { align-items: flex-start; flex-wrap: nowrap; }
.row.dates > .field { flex: 1; min-width: 0; }
/* iPhone Safari gives date and time fields a fixed width of their own, wider than the column; this
   makes them fit. On a narrow screen the date gets its own line above the start and end times. */
input[type=date], input[type=time] { -webkit-appearance: none; appearance: none; min-width: 0; max-width: 100%; display: block; }
input::-webkit-date-and-time-value { text-align: left; }
@media (max-width: 560px) {
  .row.dates { flex-wrap: wrap; }
  .row.dates > .field:has(.pick-date-value), .row.dates > .field:has(.birth-input) { flex-basis: 100%; }
}
.row.dates select { width: 100%; }
/* An activity's start and end (round115): the day and the time side by side, also on a phone. */
.row.dates.activity-when { flex-wrap: nowrap; }
.row.dates.activity-when > .field { flex: 3 1 0; }
.row.dates.activity-when > .field + .field { flex: 2 1 0; }
.fav { color: #e0a100; }
/* type-to-search picker (callers, clubs) and the levels a caller calls */
.picker .fchips { margin-bottom: 6px; }
.picker input[type=search], .filter-line input[type=search] { width: 100%; }
.pick-list { border: 1px solid var(--line); border-radius: 10px; margin-top: 4px; overflow: hidden; background: var(--card); }
.pick-hit { display: block; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; min-height: 40px; background: none; }
.pick-hit:last-child { border-bottom: 0; }
.pick-head { flex-wrap: nowrap; margin-bottom: 4px; }
.pick-head .flabel { margin-bottom: 0; }
.pick-list.browse { max-height: 320px; overflow-y: auto; }
/* The (i) after a heading that shows or hides its help text (docs/designregler.md "Förklarande texter").
   Small and grey so it does not compete with the heading; the tap area reaches 44px around it. */
button.info-btn { position: relative; min-height: 0; padding: 0 2px; margin-left: 6px; border: 0; border-radius: 50%; background: none;
  color: var(--muted); vertical-align: -.1em; line-height: 0; font-size: 1rem; }
button.info-btn::after { content: ''; position: absolute; inset: -12px -10px; }
button.info-btn .svg-icon svg { width: 1.15em; height: 1.15em; }
button.info-btn:hover, button.info-btn.on { color: var(--accent); }
button.info-btn.on .svg-icon svg { fill: color-mix(in srgb, var(--accent) 14%, transparent); }
button.info-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.help-text { margin: -.2em 0 .5em; }
button.linkish { border: 0; background: none; color: var(--accent); min-height: 0; padding: 2px 4px; text-decoration: underline; }
.course-signup { margin-top: 8px; }
.lvl-chips { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0; }
.lvl { font-size: .83rem; font-weight: 600; padding: 1px 7px; border-radius: 6px; background: #efe7ff; color: #5a32b0; }
.club-place { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 10px; }
.cards.as-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.cards.as-cards .card { margin: 0; }
.thumb { width: 64px; height: 64px; flex: none; border-radius: 10px; overflow: hidden; background: var(--bg); align-self: center; }
.thumb img, .card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card.big-card { flex-direction: column; padding: 0; overflow: hidden; gap: 0; }
.card-img { aspect-ratio: 16 / 9; background: var(--bg); }
.card-img img { object-fit: contain; background: #000; }
/* dance cards: the flyer at the card's full width and its own height, never cropped or shrunk (a
   dance without one gets a picture of a flyer's shape); then date, time and length on one line;
   long texts are cut. Cards may differ in height. */
.cards.as-cards:not(.tiles) { align-items: start; }
.big-card .card-img { aspect-ratio: auto; flex: none; }
.big-card .card-img img { height: auto; background: none; }
.card-when { display: flex; align-items: center; gap: 4px; min-height: 36px; padding: 2px 6px 2px 12px; background: var(--bg); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: .97rem; flex: none; }
.card-when-text { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-act { flex: none; display: inline-flex; gap: 2px; }
.card-when.today button.icon-btn { color: inherit; }
.card-when.today { background: var(--accent); color: var(--accent-ink); }
.big-card .card-body { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px 12px; }
.card-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
/* a dance card: one thing per line, wrapping rather than cut */
.card-line { overflow-wrap: anywhere; }
.card-callers { font-size: .95rem; }
.card-pass > * { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.card-pass > .card-pass-callers { flex-basis: 100%; white-space: normal; }
.big-card .card-info { -webkit-line-clamp: 2; }
.card-contact { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.big-card .card-foot { margin-top: auto; padding-top: 4px; }
.flyer { display: block; width: 100%; max-height: 340px; object-fit: contain; background: var(--bg); border-radius: 10px; margin: 8px 0; }
.club-img { width: 48px; height: 48px; border-radius: 10px; object-fit: contain; background: #fff; flex: none; }
.club-img.big { width: 72px; height: 72px; }
.club-head { display: flex; gap: 12px; align-items: center; }
/* A thing's own picture where it would otherwise have a small icon (🏠, 📍, 🤝): same size as the
   text, round corners, white behind a logo with transparent parts (round55). */
.thing-ico { display: inline-block; width: 1.4em; height: 1.4em; object-fit: contain; vertical-align: -.35em; border-radius: 4px; background: #fff; margin-right: .3em; flex: none; }
.role-menu .rm-ico .thing-ico, .role-btn .thing-ico { margin-right: 0; }
.place-img { display: block; width: 100%; max-height: 220px; object-fit: contain; background: var(--bg); border-radius: 10px; margin: 8px 0; }
.picture-row { align-items: center; gap: 12px; flex-wrap: wrap; }
.actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; margin-top: 12px; }
.actions > * { min-height: 52px; font-size: 1.05rem; width: 100%; }
.action-chip { display: flex; align-items: center; justify-content: center; border-radius: 10px; font-size: 1.05rem; }

/* the dance list as a list: one dance per line, as low as possible; cut at the end on a narrow phone */
.drows { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 12px; }
.drow { display: flex; align-items: baseline; gap: 10px; padding: 7px 12px; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; white-space: nowrap; min-width: 0; line-height: 1.3; }
.drow:first-child { border-top: 0; }
.drow:hover { background: var(--bg); }
.drow.today .drow-date { color: var(--accent); font-weight: 700; }
.drow-date { flex: none; width: 7.2em; font-size: .95rem; overflow: hidden; text-overflow: ellipsis; }
.drow-time { flex: none; width: auto; min-width: 5.9em; font-size: .95rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.drow-len { flex: none; width: 5.6em; font-size: .83rem; color: var(--muted); }
.drow-lvl { flex: none; width: 9em; overflow: hidden; text-overflow: ellipsis; font-size: .83rem; font-weight: 600; color: var(--muted); }
.drow-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; flex: 0 1 auto; max-width: 45%; }
.drow-meta { flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--muted); font-size: .93rem; }
.drow .chip { flex: none; padding: 0 6px; }
/* A dance with several passes: one link, a line per pass, read as one row of the list. */
/* the dance list: a heading per day; a dance is a title line, a line per pass and maybe a line of information */
.dday { font-size: .85rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin: 14px 2px 5px; }
.dlist > .dday:first-child { margin-top: 4px; }
.dday.today { color: var(--accent); }
.ditem { display: grid; gap: 1px; padding: 7px 12px; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; min-width: 0; line-height: 1.35; }
.drows > .ditem:first-child { border-top: 0; }
.ditem:hover { background: var(--bg); }
.ditem-top { display: flex; gap: 8px; align-items: baseline; min-width: 0; white-space: nowrap; }
.ditem-date { flex: none; font-size: .95rem; }
.ditem.today .ditem-date { color: var(--accent); font-weight: 700; }
.ditem-title { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ditem-meta { flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--muted); font-size: .93rem; }
.ditem-span { flex: none; font-size: .83rem; border: 1px solid var(--line); background: var(--bg); border-radius: 6px; padding: 0 5px; }
.ditem .chip { flex: none; padding: 0 7px; font-size: .8rem; }
.ditem-top .chip:first-of-type { margin-left: auto; }
.dpass { display: flex; gap: 10px; align-items: baseline; min-width: 0; white-space: nowrap; font-size: .95rem; }
.dpass .drow-time { flex: none; width: 6.9em; min-width: 0; font-size: inherit; color: var(--ink); }
.dpass .drow-lvl { flex: none; width: auto; min-width: 4.5em; overflow: visible; font-size: .85rem; color: var(--ink); }
.dpass-meta { flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: .93rem; }
.dpass.off, .dpass.off .drow-time, .dpass.off .drow-lvl, .card-pass.off, .card-pass.off strong { color: var(--muted); opacity: .6; }
/* lines of their own on a phone only (club, place); on a computer they sit on the title line */
.dline-phone { display: none; font-size: .93rem; color: var(--muted); min-width: 0; overflow-wrap: anywhere; }
/* the callers: once for the dance, on their own line, whole names (they wrap rather than being cut) */
.dcallers { font-size: .93rem; color: var(--muted); min-width: 0; overflow-wrap: anywhere; }
.dline { font-size: .93rem; min-width: 0; overflow-wrap: anywhere; }
.dpass-callers { white-space: normal; }
/* The dance list is what dancers use most: bigger still (Anders 2026-10-21). */
.ditem { padding: 9px 12px; gap: 2px; }
.ditem-title { font-size: 1.15rem; }
.ditem-date, .dpass, .dline { font-size: 1rem; }
.ditem-meta, .dpass-meta, .dline-phone, .dcallers, .gather-pass .gather-day { font-size: .97rem; }
.dpass .drow-lvl { font-size: .92rem; }
.ditem-info { font-size: .93rem; }
.dday { font-size: .9rem; }
.big-card .card-title { font-size: 1.15rem; }
.big-card .card-when, .big-card .card-callers, .big-card .card-line { font-size: 1rem; }
.big-card .card-info { font-size: .97rem; }
/* an event's passes in the dance list: the date on the first pass of each day, then time and levels */
.gather-pass .gather-day { flex: none; width: 6.2em; color: var(--ink); font-size: .93rem; }
.gather-pass.first:not(:first-child) { margin-top: 2px; }
.card-pass.gather-pass { flex-wrap: nowrap; }
.card-pass.gather-pass .gather-day { width: 5.6em; }
.flyer-panel .flyer { margin: 0; max-height: 560px; }
.ditem-info { font-size: .9rem; color: var(--muted); font-style: italic; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.card-info { color: var(--muted); font-style: italic; font-size: .95rem; white-space: pre-line; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin-top: 4px; }
.card-contact { margin-top: 2px; }
.dance-info h3 { font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 12px 0 2px; }
.dance-info p { margin: 0 0 4px; }
.info-text { white-space: pre-line; }
.card-passes { margin-top: 4px; }
.card-pass { display: flex; flex-wrap: wrap; gap: 0 8px; align-items: baseline; }
.card-pass .drow-time { width: auto; }
.pass-line { margin: 2px 0; }
/* a dance's own page: the facts one per line, an icon in a column of its own */
.dance-facts { display: grid; gap: 4px; margin: 6px 0 12px; }
.dline-row { display: flex; gap: 10px; align-items: baseline; min-width: 0; overflow-wrap: anywhere; }
.dline-ic { flex: none; width: 1.4em; text-align: center; }
.dline-lvls { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.dance-pass h3 { font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 10px 0 2px; }
.dance-pass { display: grid; gap: 4px; }
.dance-callers { display: grid; gap: 0; margin-top: 6px; }
.dance-callers .dline-row { align-items: center; margin: 0; }
.pass-edit { border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 10px; margin: 8px 0; }
.add-levels .fchip { opacity: .75; }
@media (max-width: 560px) {
  .drow { gap: 7px; padding: 7px 10px; }
  .drow-date { width: 6.2em; font-size: .9rem; }
  .drow-time { min-width: 5.5em; font-size: .9rem; }
  .drow-lvl { width: auto; min-width: 5em; overflow: visible; } /* levels never wrap (non-breaking spaces): the column grows instead */
  .drow-len { display: none; }
  .drow-title { max-width: 60%; }
  .dline-phone { display: block; }
  .ditem-meta { display: none; }
  .dpass { flex-wrap: wrap; row-gap: 0; }
  .dpass .dpass-callers { flex-basis: 100%; }
  .ditem-top { white-space: normal; }
  .ditem-title { overflow: visible; overflow-wrap: break-word; }
  /* With the bigger text a mark (club event, cancelled) goes below a long title rather than squeezing it. */
  .ditem-top { flex-wrap: wrap; row-gap: 2px; }
  .ditem-top .chip:first-of-type { margin-left: 0; }
  .gathering .ditem-top { flex-wrap: wrap; row-gap: 2px; } /* a long title goes to its own line, not one letter a line */
  .gathering .ditem-title { overflow-wrap: break-word; }
  /* course cards: one per row on a phone, so every line has room */
  .cards.as-cards.tiles:has(> .course-tile) { grid-template-columns: 1fr; }
  .course-tile .tile-img { aspect-ratio: 16 / 9; }
}
/* every other list as a list: the same lines (a name, small marks, a little about it, a button) */
.lrow { align-items: center; padding-top: 5px; padding-bottom: 5px; }
.lrow:hover { background: none; }
a.drow-title { color: var(--ink); text-decoration: none; }
a.drow-title:hover { text-decoration: underline; }
.lrow-marks { flex: none; display: inline-flex; gap: 4px; align-items: center; }
.lrow-act { flex: none; max-width: 100%; display: inline-flex; gap: 6px; align-items: center; margin-left: auto; }
.lrow-act .row { flex-wrap: nowrap; margin: 0; }
.lrow-act button, .lrow-act .button { padding: 3px 9px; min-height: 0; font-size: .9rem; }
@media (max-width: 560px) { .lrow .drow-meta { display: none; } .lrow .drow-title { max-width: none; flex: 1 1 auto; }
  /* Many buttons (the organiser's dances) go to a line of their own instead of off the screen. */
  .drow.lrow { flex-wrap: wrap; } .drow.lrow .lrow-act { flex-wrap: wrap; justify-content: flex-end; } }
/* When the buttons do not fit beside the title they go to a line of their own, instead of off the edge. */
.drow.lrow { flex-wrap: wrap; row-gap: 4px; }
.lrow .drow-title { min-width: 6em; }
.lrow .drow-lvl { flex: 0 1 9em; min-width: 2.5em; }
/* the locations list keeps the address on a phone, on a second line, so two halls with the same name can be told apart */
@media (max-width: 560px) { .loc-rows .lrow { flex-wrap: wrap; row-gap: 0; } .loc-rows .lrow .drow-meta { display: block; flex-basis: 100%; white-space: normal; order: 2; } .loc-rows .lrow .drow-title { flex: 1 1 0; } }

/* cards with pictures on every list; people's pictures (photo or flag) are all the same size */
.cards.as-cards.tiles { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
@media (min-width: 1000px) { .cards.as-cards.tiles { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); } }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.tile-img { display: block; aspect-ratio: 4 / 3; background: var(--bg); }
.tile-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile-img img.flag-img { object-fit: cover; }
/* A club's picture is usually its logo: show all of it, on white. */
.tile-img img.club-logo { object-fit: contain; background: #fff; }
.tile-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.tile-action { margin-top: auto; padding-top: 6px; }
.lvl.dancer-lvl { background: var(--bg); color: var(--ink); }

/* website and social media */
.links { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.link-btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 999px; padding: 3px 12px 3px 4px; font-size: .93rem; text-decoration: none; color: var(--ink); background: var(--card); }
.link-ico { display: inline-flex; align-items: center; justify-content: center; width: 1.6em; height: 1.6em; border-radius: 50%; background: var(--bg); font-weight: 700; font-size: .9rem; }
.link-facebook .link-ico { background: #1877f2; color: #fff; }
.link-instagram .link-ico { background: #d6249f; color: #fff; }
.link-youtube .link-ico { background: #ff0000; color: #fff; }
.link-tiktok .link-ico { background: #000; color: #fff; }
.links-edit input { width: 100%; }

/* dance cards */
.card { display: flex; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; margin-bottom: 10px; color: inherit; text-decoration: none; }
.card-len { opacity: .8; }
.card-body { flex: 1; min-width: 0; }
.card-foot { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 4px; }
.role-links { margin-top: 10px; }

/* my place */
.place { background: var(--card); border: 4px solid var(--line); border-radius: 18px; padding: 16px; margin: 0 0 12px; text-align: center; }
.place-tip { color: var(--muted); font-weight: 600; }
.place-sq { font-size: 2.6rem; font-weight: 800; border-radius: 12px; margin: 8px auto; padding: 4px 16px; display: inline-block; color: #1d2433; }
.place.out .place-sq { background: var(--bg); color: var(--ink); }
.place-line { font-size: 1.1rem; margin: 4px 0; }
.place.waiting { border-style: dashed; }
/* Tonight on the whole screen: the place larger, the choices under it. */
.panel.full.tonight .place { padding: 22px 16px; }
.panel.full.tonight .place-sq { font-size: 4rem; }
.panel.full.tonight .place-line { font-size: 1.35rem; }
.now-strip { display: flex; align-items: center; gap: 10px; background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); padding: 8px 12px; margin: 0 0 12px; color: var(--ink); }
.now-sq { font-weight: 800; font-size: 1.3rem; border-radius: 8px; padding: 2px 10px; color: #1d2433; }
.now-sq.out { background: var(--bg); color: var(--ink); font-size: 1rem; }
.tip-alert { z-index: 40; }
.tip-alert .modal-box .place { margin-bottom: 14px; }
.tip-alert .modal-box button { width: 100%; }
.announce { background: var(--wait-bg); color: var(--wait); border-radius: var(--radius); padding: 10px 14px; margin: 0 0 12px; font-weight: 600; }
.announce.big { font-size: 1.6rem; }

/* organiser and caller */
.counts { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; margin: 8px 0 12px; }
.counts div { background: var(--bg); border-radius: 10px; text-align: center; padding: 6px 2px; }
.counts strong { display: block; font-size: 1.3rem; }
.counts span { font-size: .75rem; color: var(--muted); }
/* The main number is grey like the others, with a coloured number and edge: filled, it looked like a pressed button
   (Anders 2026-11-03). */
.counts .hi { box-shadow: inset 0 0 0 2px var(--accent); }
.counts .hi strong { color: var(--accent); }
/* The number here is the big one; beau, belle and both under it are only a breakdown. */
.counts .big { grid-column: span 2; }
/* The number here is as big as the others; beau, belle and both underneath, each number above its name */
.counts .sides { display: flex; justify-content: center; gap: 0 12px; font-size: .73rem; color: var(--muted); margin-top: 2px; }
.counts .sides span { display: flex; flex-direction: column; align-items: center; line-height: 1.15; font-size: inherit; color: inherit; }
.counts .sides b { font-size: 1rem; color: var(--ink); }
.counts .extra { background: var(--wait-bg); color: var(--wait); }
.counts .extra span { color: inherit; }
.hfilter { margin: 8px 0 4px; }
.hfilter button { min-height: 0; padding: 5px 6px; font-size: .9rem; }
.tipbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tipnow { flex-basis: 100%; font-size: 1.1rem; }
.clock { font-variant-numeric: tabular-nums; color: var(--muted); }
.clist { margin-top: 8px; }
/* Check-in: one card per dancer, as many columns as fit (three on a laptop). Only the name on the
   card; names never wrap. */
.clist { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(330px, 100%), 1fr)); gap: 6px; }
/* Column by column (the default): top to bottom, then the next column; as many columns as the grid. */
.clist.bycol { display: block; columns: 330px; column-gap: 6px; }
.clist.bycol > .crow { break-inside: avoid; margin-bottom: 6px; }
/* The filter and the order switch on one line; the order only matters with more than one column. */
.clist-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 8px 0 4px; }
.clist-tools .seg { margin: 0; }
.clist-tools .hfilter { flex: 1 1 auto; }
.corder button { min-height: 0; padding: 5px 8px; font-size: .9rem; white-space: nowrap; }
@media (max-width: 760px) { .corder { display: none; } }
.crow { display: flex; align-items: center; gap: 4px; padding: 5px 6px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); min-width: 0; }
.crow.here { border-color: var(--ok); }
.crow.left { opacity: .6; }
.crow .cname { flex: 1; min-width: 0; font-weight: 600; cursor: pointer; user-select: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crow button.small { padding: 4px 6px; flex: none; font-size: .9rem; }
.crow .tick { width: 32px; min-height: 32px; padding: 0; font-size: 1.2rem; flex: none; }
.checkin-tools { flex-wrap: nowrap; }
/* The search box stays at the top of the screen while the list of names scrolls (Anders 2026-10-31), just
   under the top bar; on a short screen the top bar scrolls away, so the box goes to the very top. */
.checkin-tools { position: sticky; top: var(--top-h, 60px); z-index: 5;
  background: var(--card); padding: 6px 0; margin-top: -6px; }
@media (max-height: 500px) { .checkin-tools { top: 0; } }
.checkin-tools input { flex: 1; min-width: 0; }
/* A button label as wide as its longest choice (see fixedLabel). */
.fixed-label { display: inline-grid; }
.fixed-label > span { grid-area: 1 / 1; text-align: center; white-space: nowrap; }
.fixed-label > .hidden-choice { visibility: hidden; }
.st-left { background: #e2e2e2; color: #666; border-color: transparent; }
.ask-buttons { display: flex; flex-direction: column; gap: 8px; }
.crow.here .tick { background: var(--ok); color: #fff; border-color: var(--ok); }
.crow:not(.here) .cname { color: var(--muted); }
.st-sitout { background: var(--wait-bg); color: var(--wait); border-color: transparent; }
.st-must { background: #ffe4e4; color: var(--bad); border-color: transparent; }
.approve { padding: 8px 0; border-bottom: 1px solid var(--line); }
.members .member { display: flex; gap: 6px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); }
.pick button { display: flex; justify-content: space-between; width: 100%; margin: 4px 0; text-align: left; }
.pick small { color: var(--muted); }

/* squares, couple 1 at the bottom, then counter-clockwise: 2 right, 3 top, 4 left */
.sq-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.box { position: relative; border: 3px solid; border-radius: 14px; padding: 8px; display: grid; grid-template-columns: 1fr 1fr 1fr; grid-template-rows: auto auto auto; gap: 4px; min-height: 170px; font-size: .87rem; }
.box-n { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; color: #1d2433; }
.couple { display: flex; gap: 4px; align-items: center; }
.couple .cn { font-weight: 800; color: var(--muted); }
.couple .pair { display: flex; flex-direction: column; }
.c-bottom { grid-row: 3; grid-column: 1 / 4; justify-content: center; }
.c-top { grid-row: 1; grid-column: 1 / 4; justify-content: center; }
.c-right { grid-row: 2; grid-column: 3; justify-content: flex-end; text-align: right; }
.c-left { grid-row: 2; grid-column: 1; }
.c-top .pair, .c-bottom .pair { flex-direction: row; gap: 10px; }
.outline { grid-column: 1 / -1; padding: 6px 2px; }

/* big screen: dark, everything on one screen (sizes set by the program), like the standalone program */
body.on-display { padding: 0; overflow: hidden; }
body.on-display .top { display: none; }
body.on-display main { max-width: none; padding: 0; }
.display { position: fixed; inset: 0; background: #111; color: #f4f4f4; padding: 1.2vh 1.5vw; overflow: hidden; z-index: 50; }
.display .d-head { display: flex; align-items: baseline; gap: 1.2em; margin-bottom: .3em; font-size: .6em; white-space: nowrap; }
.display .d-legend { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.display .d-title { font-weight: 700; }
.display .d-meta, .display .d-legend { color: #aaa; }
.display .d-clock .clock { font-size: 1.6em; color: #fff; font-weight: 700; }
.display .d-next { color: #f4a261; }
.display .d-btn { font: inherit; font-size: 14px; min-height: 0; padding: 4px 10px; border-radius: 8px; background: #333; color: #eee; border: 1px solid #555; text-decoration: none; cursor: pointer; }
.display .d-tools { flex: none; display: flex; gap: 8px; align-items: center; margin-left: auto; }
.display .d-go { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 700; }
/* On a phone the header wraps: tip and clock on the first line, the buttons on their own line, so
   Close and the tip buttons are always on the screen. The legend is left out (no room). */
@media (max-width: 760px) {
  .display .d-head { flex-wrap: wrap; row-gap: 6px; white-space: normal; }
  .display .d-tools { width: 100%; margin-left: 0; flex-wrap: wrap; }
  .display .d-btn { font-size: 15px; min-height: 40px; padding: 6px 12px; display: inline-flex; align-items: center; }
  .display .d-close { margin-left: auto; }
  .display .d-legend, .display .d-tools .d-wide { display: none; }
}
body.on-display .toast { z-index: 60; }
/* The big screen in a window of its own: only the tip; the buttons show while the mouse moves. */
.display.d-screen .d-tools { opacity: 0; transition: opacity .4s; }
.display.d-screen.d-show-tools .d-tools, .display.d-screen .d-tools:focus-within { opacity: 1; }
/* The pause between tips: large text on the left, the QR code to the dance's page on the right. */
.display .d-pause { display: flex; gap: 4vw; align-items: center; justify-content: center; height: calc(100% - 3em); font-size: max(16px, 3.2vmin); }
.display .d-pause-main { flex: 1 1 auto; max-width: 60vw; }
.display .d-pause-title { font-size: 3.2em; font-weight: 800; line-height: 1.1; }
.display .d-pause-sub { font-size: 1.5em; color: #ccc; margin: .3em 0 .8em; }
.display .d-pause-sub .clock { color: #fff; font-weight: 700; }
.display .d-pause-ann { font-size: 1.4em; margin-bottom: .6em; }
.display .d-pause-info { font-size: 1.1em; margin: .35em 0; }
.display .d-pause-info.muted { color: #888; }
.display .d-pause-qr { flex: none; width: min(32vw, 52vh); text-align: center; color: #ccc; font-size: .9em; }
.display .d-pause-qr .qr { background: #fff; border-radius: .4em; padding: .4em; margin-bottom: .5em; }
.display .d-pause-qr .qr svg { display: block; width: 100%; height: auto; }
@media (max-width: 760px) { .display .d-pause { flex-direction: column; gap: 1em; } .display .d-pause-main { max-width: none; } .display .d-pause-qr { width: 50vw; } }
.display .d-announce { background: #3a2e12; color: #f2c46b; border-radius: .3em; padding: .15em .5em; margin-bottom: .3em; font-weight: 600; }
.display .d-grid { column-gap: 2.2em; }
.display .d-row { display: grid; grid-template-columns: var(--nw, max-content) var(--pw, max-content) 1.8em; align-items: baseline; width: max-content;
  column-gap: .6em; break-inside: avoid; padding: .08em 0; border-bottom: 1px solid #2a2a2a; }
.display .d-name { font-weight: 700; display: flex; align-items: baseline; gap: .3em; min-width: 0; white-space: nowrap; }
.display .d-n { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.display .d-icons { flex: none; display: inline-flex; gap: .2em; align-items: center; font-size: .8em; }
.display .d-sq { font-weight: 800; text-align: center; border-radius: .3em; color: #111; }
.display .d-partner { color: #ccc; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* OUT: the name stays bold and bright so dancers find themselves; only "OUT" is muted. */
.display .d-out .d-partner { color: #777; }
/* Gone home for the evening ("Lämnat"): greyed out, nobody needs to look for them. */
.display .d-away .d-name, .display .d-away .d-partner { color: #555; font-weight: 400; }
.display .d-out .d-sq { background: transparent; color: #777; font-weight: 400; }
.display .d-out .ri { opacity: .6; }
.display .d-empty { font-size: 2em; text-align: center; color: #888; margin-top: 20vh; }
.ri.flex { position: relative; }
.ri.flex, .sides.flex { position: relative; }
.ri.flex::after, .sides.flex::after { content: ''; position: absolute; top: -.15em; right: -.2em; width: .5em; height: .5em; border-radius: 50%; background: #c9a0ff; border: .08em solid #111; }
/* Left or right as two dots or two figures: this tip's side filled in its colour, the other an outline. */
.sides { display: inline-flex; align-items: center; flex: none; vertical-align: -.1em; padding-right: .45em; }
.sides.flex::after { right: 0; top: -.2em; }
.side-beau { --side: var(--beau); } .side-belle { --side: var(--belle); } .side-both { --side: var(--both); }
.sides-dots { gap: .16em; }
.sides-dots .dot { width: .75em; height: .75em; border-radius: 50%; box-sizing: border-box; border: .1em solid #8a8a8a; }
.sides-dots .dot.on { background: var(--side); border-color: var(--side); }
.sides-figures svg { width: 2.3em; height: 1.45em; display: block; }
.sides-figures .on { fill: var(--side); }
.sides-figures .off { fill: none; stroke: #8a8a8a; stroke-width: .9; }
.display .d-out .sides { opacity: .6; }
.display .d-sides { font: inherit; font-size: 14px; min-height: 0; padding: 4px 6px; border-radius: 8px; background: #333; color: #eee; border: 1px solid #555; cursor: pointer; }
.display .d-squares { display: grid; gap: .6em; }
.display .d-box { position: relative; display: grid; border: .15em solid; border-radius: .5em; padding: .3em .4em;
  grid-template-columns: minmax(0, 1fr) 2.2em minmax(0, 1fr); column-gap: .3em; row-gap: .1em; align-items: center; }
.display .d-box-n { grid-row: 2; grid-column: 2; justify-self: center; width: 1.8em; height: 1.8em; line-height: 1.8em; border-radius: .3em;
  text-align: center; font-weight: 800; color: #111; font-size: 1.1em; }
.display .d-couple { display: flex; align-items: center; gap: .3em; min-width: 0; }
.display .d-top { grid-row: 1; grid-column: 1 / 4; justify-self: center; }
.display .d-bottom { grid-row: 3; grid-column: 1 / 4; justify-self: center; }
.display .d-left { grid-row: 2; grid-column: 1; justify-self: end; }
.display .d-right { grid-row: 2; grid-column: 3; justify-self: start; }
.display .d-cn { flex: none; font-size: .6em; color: #888; border: 1px solid #555; border-radius: 50%; width: 1.5em; height: 1.5em; line-height: 1.4em; text-align: center; }
.display .d-pair { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.display .d-outline { margin-top: .4em; font-size: .8em; color: #999; line-height: 1.5; }
.display .d-outline .d-out, .display .d-outline .d-name { display: inline-flex; color: #f4f4f4; }
.display .d-outline .d-away .d-name { color: #555; }

/* QR dialog and toast */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 30; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal-box { background: var(--card); border-radius: 18px; padding: 18px; max-width: 380px; width: 100%; text-align: center; }
.qr { background: #fff; border-radius: 12px; padding: 8px; margin: 0 auto; max-width: 300px; }
.qr svg { width: 100%; height: auto; display: block; }
.url { word-break: break-all; }
.toast { position: fixed; left: 16px; right: 16px; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translateY(20px); opacity: 0; pointer-events: none;
  background: #1d2433; color: #fff; padding: 10px 16px; border-radius: 10px; transition: .2s; z-index: 40; max-width: 560px; margin: 0 auto; width: fit-content;
  display: flex; align-items: center; justify-content: space-between; gap: 14px; text-align: left; }
.toast.show { opacity: 1; transform: none; pointer-events: auto; cursor: pointer; }
.toast .toast-undo { flex: none; min-height: 40px; background: none; color: #9cc3ff; border: 1px solid #9cc3ff; font-weight: 700; padding: 4px 14px; }

/* computers and tablets: navigation on the left, wider pages, two columns where it helps */
@media (min-width: 1000px) {
  body { padding-bottom: 0; padding-left: 200px; }
  body.on-display { padding-left: 0; }
  .top { margin-left: -200px; padding-left: 20px; }
  nav.bottom { top: 0; bottom: 0; right: auto; width: 200px; flex-direction: column; border-top: 0; border-right: 1px solid var(--line);
    padding-top: 64px; z-index: 5; }
  nav.bottom a { flex: none; display: flex; gap: 10px; align-items: center; text-align: left; padding: 12px 16px; font-size: .95rem; }
  nav.bottom a .ico { display: inline; font-size: 1.2rem; }
  main { max-width: 1200px; padding: 16px 24px; }
  .cards:not(.as-cards) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 12px; }
  .two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 16px; align-items: start; }
  .run-cols { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 0 16px; align-items: start; }
  /* The member list is a wide table (Anders 2026-11-23): it gets most of the width, the panels a narrow column. */
  .two-col.mem-cols { grid-template-columns: minmax(0, 2.4fr) minmax(16rem, 1fr); }
  main:has(.mem-cols) { max-width: 1400px; }
  main:has(.run-page) { max-width: 1280px; padding: 10px; }
  .toast { bottom: 24px; }
}
@media (min-width: 1500px) {
  .cards:not(.as-cards) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 420px) {
  .sq-grid { grid-template-columns: 1fr; }
}

/* A person's short number (#65) */
.num { display: inline-block; font-size: .83rem; font-weight: 600; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 0 7px; vertical-align: .1em; }
.my-id { display: flex; gap: 24px; flex-wrap: wrap; align-items: baseline; margin: 4px 0 2px; }
.my-id > div { display: flex; flex-direction: column; }
.big-num { font-size: 1.6rem; color: var(--accent); }

/* My account: avatar in the top bar, photo and camera */
.acc-picker { position: relative; flex: none; }
.top .acc-picker { margin-left: auto; }
.account-btn .news-dot { position: absolute; top: -1px; right: -1px; margin: 0; box-shadow: 0 0 0 2px var(--accent); }
.account-btn { position: relative; display: inline-flex; margin-left: 6px; text-decoration: none; background: none; border: 0; padding: 0; min-height: 0; border-radius: 50%; cursor: pointer; }
.avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex: none; border: 2px solid rgba(255,255,255,.7); }
.avatar.initials { display: inline-flex; align-items: center; justify-content: center; background: #fff; color: var(--accent); font-weight: 700; font-size: min(.85rem, 14px); }
.avatar.big { width: 112px; height: 112px; font-size: 2.2rem; border-color: var(--line); }
.account-photo { display: flex; gap: 16px; align-items: center; margin-bottom: 12px; }
.photo-buttons { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
video.camera { width: 100%; border-radius: 12px; background: #000; transform: scaleX(-1); margin-bottom: 10px; }
.age { display: block; padding: 10px 0; }
.profile-head { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.profile-head > div { min-width: 0; }
.profile-head h2 { margin: 0; }
.profile-head .avatar { width: 48px; height: 48px; border-color: var(--line); }
table.level-table { border-collapse: collapse; width: 100%; margin: 6px 0 12px; }
table.level-table th, table.level-table td { overflow-wrap: anywhere; hyphens: auto; padding: 4px 6px; border-bottom: 1px solid var(--line); text-align: left; }
table.level-table td select { width: 100%; min-width: 0; }
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; margin: 0 0 8px; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; }

/* Merging two numbers ("#5 into #72") */
.merge-nums { align-items: flex-end; }
.merge-nums .swap { margin-bottom: 6px; }
.merge-preview { margin-top: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.merge-sentence { font-weight: 600; }
.merge-diff { display: flex; gap: 8px; align-items: baseline; margin: 4px 0; }
/* Merging two places (round60): the choices, and the merged place before it is made. */
.place-merge { text-align: left; }
.place-merge h4 { margin: 12px 0 4px; }
.place-merge .check-line { margin: 4px 0; }
.place-merge input[type=radio] { width: 22px; min-height: 22px; height: 22px; flex: none; margin: 0; }
.place-merge input[type=text] { width: 100%; margin-top: 4px; }
.place-merge-result { border: 1px solid var(--line); border-radius: 10px; padding: 4px 10px; margin: 8px 0; }
.place-merge-row { display: grid; grid-template-columns: 7.5em 1fr; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.place-merge-row:last-child { border-bottom: 0; }
.place-merge-row.both strong { color: var(--wait); }
.modal-box:has(.place-merge) { max-height: calc(100vh - 32px); overflow-y: auto; }
.merge-thumb { max-width: 100%; max-height: 90px; border-radius: 8px; display: block; }

/* Login: Google/Facebook buttons, consent boxes, the robot check */
.providers { display: grid; gap: 8px; margin: 8px 0 4px; }
.providers button { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; }
.providers svg { width: 18px; height: 18px; flex: none; }
.or-line { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .85rem; margin: 14px 0 10px; }
.or-line::before, .or-line::after { content: ''; flex: 1; border-top: 1px solid currentColor; opacity: .35; }
.consent-line { display: flex; align-items: flex-start; gap: 8px; margin: 6px 0; }
.consent-line input { margin-top: 3px; flex: none; }
.consent-line .need { color: var(--muted); font-size: .8rem; }
.captcha-box { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 1000; }
.terms-text h3 { margin-top: 18px; }
.gdpr-steps { padding-left: 1.4em; }
.gdpr-steps li h3 { margin-bottom: 4px; }
.gdpr-template { white-space: pre-wrap; word-break: break-word; font: inherit; font-size: 0.92em; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 12px; margin: 8px 0; }
.gdpr-owner { background: var(--wait-bg); border-left: 4px solid var(--wait); border-radius: 8px; padding: 4px 12px; margin: 8px 0; }
/* Notifications */
.nbadge { display: inline-block; min-width: 1.4em; padding: 0 5px; margin-left: 6px; border-radius: 999px; background: var(--bad); color: #fff; font-size: 0.75em; line-height: 1.5; text-align: center; font-weight: 600; }
.cards.notices { display: flex; flex-direction: column; gap: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.notice { display: flex; align-items: center; gap: 10px; padding: 6px 12px; background: var(--card); border-top: 1px solid var(--line); }
.notice:first-child { border-top: 0; }
.notice.unread { border-left: 4px solid var(--accent); }
.notice.unread .notice-text { font-weight: 600; }
.notice .grow { flex: 1; min-width: 0; }
.notice-ico { font-size: 1.3em; }
.notice-text { color: var(--ink); text-decoration: none; cursor: pointer; }
.notice-text:hover { text-decoration: underline; }

/* Money */
table.fin-table { width: 100%; border-collapse: collapse; }
.fin-table th, .fin-table td { text-align: left; padding: 6px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.fin-table th { color: var(--muted); font-weight: 500; font-size: 0.9em; }
.fin-table .amt { text-align: right; white-space: nowrap; }
.neg { color: var(--bad); }
.pay-box h3 { margin-top: 0; }
.pay-option { padding: 10px 0; border-top: 1px solid var(--line); }
.pay-option .actions { margin-top: 8px; }
button.pay-waiting { background: var(--wait-bg); color: var(--wait); }
button.pay-confirmed { background: var(--ok-bg); color: var(--ok); }
button.pay-none { opacity: .45; }
@media (max-width: 560px) { .fin-table th, .fin-table td { padding: 5px 3px; font-size: .95rem; } }
.fin-table th.amt { white-space: normal; }
/* Members, courses and the association's clubs: wide tables scroll sideways on a phone. */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.fin-table tr.total th, .fin-table tr.total td { border-top: 2px solid var(--line); font-weight: 600; }
.course-grid td, .assoc-clubs td, .assoc-clubs th.amt { white-space: nowrap; }
.course-grid td:first-child, .assoc-clubs td:first-child { white-space: normal; min-width: 9rem; }
button.th-sort { background: none; border: 0; padding: 0; min-height: 0; font: inherit; color: inherit; cursor: pointer; box-shadow: none; }
button.th-sort.sorted { color: var(--ink); font-weight: 600; }
button.th-sort.sorted::after { content: ' ▾'; }
.age-counts { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 10px; }
.age-count { display: flex; flex-direction: column; align-items: center; min-width: 4.5rem; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; }
.age-count strong { font-size: 1.3rem; }
.age-count small { color: var(--muted); }
.profile-top h2 { margin: 0 0 2px; }
.born-edit { display: flex; flex-wrap: wrap; gap: 6px; align-items: flex-start; }
.birth-parts { display: flex; gap: 6px; }
/* A time or date: a button that looks like a field and opens the picking window (OK saves). */
.pick-value { width: 100%; min-height: 44px; padding: 8px 10px; text-align: left; font-weight: normal; border: 1px solid var(--line); border-radius: 10px;
  background: var(--card); color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.pick-value.empty { color: var(--muted); }
.pick-modal .modal-box h3 { margin-top: 0; }
.pick-time { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 1.4em; }
.pick-time select { width: auto; min-width: 4.2em; font-size: inherit; text-align: center; }
.pick-date input { font-size: 1.15em; }
/* The date field behind a date button: invisible, over the button, so the calendar opens where it was tapped. */
.date-pick { position: fixed; opacity: 0; pointer-events: none; margin: 0; padding: 0; border: 0; z-index: -1; }
.pick-text { margin: 6px 0 0; min-height: 1.2em; }
/* iPhone and iPad: the date field itself lies invisible over the date button, so a tap opens the calendar
   (16px text, so the phone does not zoom in). */
.pick-wrap { position: relative; display: block; min-width: 0; }
.pick-wrap > .date-over { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; margin: 0; padding: 0; border: 0;
  opacity: 0; font-size: 16px; z-index: 1; cursor: pointer; }
.pick-buttons { margin-top: 16px; gap: 8px; }
/* Each part at least as wide as its longest choice plus the arrow, so the whole year and month show on a computer
   too (Anders 2026-10-31); any room left over is shared. */
.birth-parts select { flex: 1 1 0; width: auto; min-width: 5.2em; }
.birth-parts select:nth-child(2) { flex-grow: 1.6; min-width: 8.2em; }
.birth-parts select:nth-child(3) { min-width: 4em; }
/* A birth date next to other fields (Age) gets the room its three menus need; the others wrap below if needed. */
.row.dates:has(.birth-input) { flex-wrap: wrap; }
.row.dates > .field:has(.birth-input) { flex: 1 0 20.5rem; max-width: 100%; }
.birth-text { margin-top: 4px; min-height: 1.2em; }
.born-edit .birth-input { flex: 1 1 20.5rem; max-width: 26rem; }
@media (max-width: 560px) { .members-table .wide-only { display: none; } }
/* The member list as a table (Anders 2026-11-23): one line per member, like a sheet in Excel. */
.members-table th, .members-table td { padding: 3px 6px; vertical-align: middle; }
.members-table th { position: sticky; top: 0; background: var(--card, var(--bg)); z-index: 1; white-space: nowrap; }
.members-table tr:nth-child(even) td { background: color-mix(in srgb, var(--line) 22%, transparent); }
.members-table tr.on-row td { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.members-table tr.open td { border-bottom-color: transparent; }
.members-table .mem-tick { width: 1.6em; }
.members-table .mem-name a { font-weight: 500; }
@media (min-width: 561px) { .members-table .mem-name { white-space: nowrap; } }
.members-table .mem-courses { white-space: normal; }
.members-table .mem-paid { white-space: nowrap; }
.members-table .narrow-only { display: none; }
@media (max-width: 560px) { .members-table .narrow-only { display: block; } .members-table select.cell-select { min-width: 0; max-width: 7em; padding-right: 18px; }
  .mem-card { max-width: calc(100vw - 72px); } .members-table th, .members-table td { padding: 3px 3px; } .members-table th { white-space: normal; } }
.chip.mem-course { font-size: .76rem; padding: 0 6px; text-decoration: none; color: inherit; margin: 1px 2px 1px 0; }
.chip.unpaid { background: color-mix(in srgb, var(--bad) 14%, transparent); color: var(--bad); border-color: transparent; }
select.cell-select { border: 1px solid transparent; background-color: transparent; padding: 2px 22px 2px 4px; width: auto; min-width: 6em; min-height: 30px; font: inherit; }
.members-table input[type=checkbox] { width: 18px; height: 18px; min-height: 18px; vertical-align: middle; }
.members-table button.small { min-height: 30px; padding: 2px 10px; }
select.cell-select:hover, select.cell-select:focus { border-color: var(--line); }
.mem-summary { align-items: center; }
.mem-tools { flex-wrap: wrap; gap: 6px; }
.mem-tools input[type=search] { flex: 1 1 12rem; width: auto; }
.mem-tools select { width: auto; }
.mem-filters { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
select.mem-filter { width: auto; max-width: 16rem; font-size: .86rem; padding: 3px 24px 3px 10px; min-height: 34px; border-radius: 999px; }
select.mem-filter.on { border-color: var(--accent); color: var(--accent); font-weight: 600; }
.mem-chosen { align-items: center; gap: 6px; flex-wrap: wrap; padding: 6px 8px; border: 1px dashed var(--line); border-radius: 8px; margin: 6px 0; }
.mem-chosen button:disabled { opacity: .45; }
.mem-chosen.on { border-style: solid; border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.mem-mail .row { flex-wrap: wrap; gap: 6px; }
.mem-mail-text { width: 100%; font-family: ui-monospace, monospace; font-size: .8rem; }
.mem-card { padding: 8px 4px 12px; max-width: 40rem; white-space: normal; }
.mem-sect { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 10px 0 2px; font-weight: 600; }
ul.mem-lines { list-style: none; padding: 0; margin: 0; font-size: .92rem; }
ul.mem-lines li { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; border-bottom: 1px dashed var(--line); flex-wrap: wrap; }
.mem-email { font-family: ui-monospace, monospace; font-size: .88rem; overflow-wrap: anywhere; }
.mem-actions { flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.mem-stats { margin: 4px 0 8px; }
/* The main administrators' Accounts page (round76): long e-mail addresses wrap instead of widening the table. */
.accounts-table td { overflow-wrap: anywhere; }
.accounts-table td:first-child { min-width: 12rem; }
.accounts-table td:last-child { white-space: nowrap; }
@media (max-width: 560px) {
  .accounts-table, .accounts-table tbody, .accounts-table tr, .accounts-table td { display: block; }
  .accounts-table tr:first-child { display: none; }
  .accounts-table tr { padding: 8px 0; border-bottom: 1px solid var(--line); }
  .accounts-table td, .accounts-table td.amt { border: 0; padding: 2px 0; text-align: left; min-width: 0; }
  .accounts-table td[data-label]::before { content: attr(data-label) ': '; color: var(--muted); font-size: .9em; }
  .accounts-table td.amt div { display: inline; margin-left: .5em; }
}
/* The member import preview (Excel): the choice per row fits its longest word. */
.member-import select { width: auto; min-width: 10em; }
.profile-top .club-head p { margin: 0 0 6px; }
.assoc-badge { display: inline-flex; align-items: center; justify-content: center; width: 72px; height: 72px; border-radius: 10px; font-size: 2.4rem; background: var(--line); flex: none; }

/* One dance open as its organiser: the way back to the club in the menu */
nav.bottom a.nav-back { color: var(--muted); font-size: .85rem; }
@media (min-width: 1000px) { nav.bottom a.nav-back { border-bottom: 1px solid var(--line); padding: 10px 20px; } }

/* Prices (card 50, cash 50, free 0) and check-in */
.price-rows { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.price-row { display: flex; gap: 6px; align-items: center; }
.price-row input[type=text] { flex: 1 1 auto; min-width: 0; }
.price-row input[type=number] { flex: none; width: 7em; }
.price-row .drag-handle { flex: none; cursor: grab; touch-action: none; user-select: none; padding: 6px 4px; color: var(--muted); font-size: 1.2rem; line-height: 1; }
.price-row.dragging { opacity: .6; }
.pchips { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.ci-row .pchips { flex: none; max-width: 100%; margin-left: auto; justify-content: flex-end; }
.ci-row .pchip { padding: 2px 7px; }
.pchip { padding: 2px 8px; font-size: .85rem; min-height: 0; border-radius: 999px; }
.pchip.on { background: var(--ok-bg); color: var(--ok); border-color: var(--ok); box-shadow: inset 0 0 0 1px var(--ok); -webkit-text-stroke: var(--chosen-weight) currentColor; }
.pchip.self { outline: 2px dashed var(--accent); }
.ci-row { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; padding: 5px 12px; border-top: 1px solid var(--line); }
.ci-row:first-child { border-top: 0; }
.ci-row.here { background: var(--ok-bg); }
/* The whole name always shows: when the prices don't fit beside it (on a phone), they go on a line of their own
   under the name (Anders 2026-11-03, second review card 31). */
.ci-row .cname { flex: 1 1 11em; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.walkin { display: flex; gap: 8px; align-items: center; padding: 6px 0; border-top: 1px solid var(--line); }
.walkin:first-child { border-top: 0; }
.walkin .grow { flex: 1; }
.walkin .grow { min-width: 0; overflow-wrap: anywhere; }
.walkin .wamt { flex: none; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.walkin strong.n { min-width: 2.2em; text-align: center; font-size: 1.2rem; }
/* The pen is small and quiet; the field it opens takes the count's place and is just as narrow.
   16px or more, so the iPhone does not zoom in when the field gets focus. */
.walkin button.wpen { min-width: 36px; padding: 0 4px; font-size: 1rem; }
.walkin button.wpen:not(.primary) { background: none; border-color: transparent; opacity: .75; }
.walkin form.wedit { display: contents; }
.walkin input.wnum { -webkit-user-select: text; user-select: text; width: 2.2em; min-width: 0; min-height: 40px; padding: 2px; text-align: center; font-size: max(16px, 1.2rem); font-weight: 700; font-variant-numeric: tabular-nums; flex: none; }
/* − and + stay easy to hit while the rows stay low; quick taps neither zoom nor select text */
.walkin button.small { min-width: 44px; min-height: 40px; padding: 0 8px; font-size: 1.2rem; }
.walkin, .ci-row, .counts { -webkit-user-select: none; user-select: none; }

/* Statistics for the main administrators */
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; margin: 8px 0; }
.stats > div { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.stats strong { display: block; font-size: 1.4rem; }
.stats span { color: var(--muted); font-size: .85rem; }
.bars { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; align-items: end; height: 90px; margin-top: 8px; }
.bars > div { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; font-size: .75rem; color: var(--muted); }
.bars i { display: block; width: 70%; background: var(--accent); border-radius: 4px 4px 0 0; min-height: 2px; }
.ci-row .tick { width: 28px; height: 28px; min-height: 0; padding: 0; flex: none; }
/* The chosen levels of a pass: drag to change the order (touch too), ✕ removes. */
.level-sort .sortable { cursor: grab; touch-action: none; user-select: none; display: inline-flex; align-items: center; gap: 4px; }
.level-sort .sortable.dragging { opacity: .6; cursor: grabbing; }
.chip-x { border: 0; background: none; color: inherit; padding: 0 0 0 2px; font-size: .8em; cursor: pointer; min-height: 0; }
.add-row { display: flex; gap: 8px; align-items: baseline; margin-top: 6px; }
.add-row .fchips { flex: 1; }
.add-caller { margin-top: 6px; max-width: 20em; }

/* Map to pick a place (Leaflet), above everything else. */
.map-modal { z-index: 1000; }
/* a list as a map: its own stacking context, so the map's layers stay under the top bar and menus */
.list-map { position: relative; z-index: 0; height: min(68vh, 600px); border-radius: 10px; border: 1px solid var(--line); margin: 6px 0; }
.map-pop { display: grid; gap: 6px; max-height: 260px; overflow-y: auto; font-size: .95rem; }
.map-pop a { color: var(--ink); text-decoration: none; }
.map-pop-head { font-weight: 700; color: var(--accent) !important; }
.map-pop-item { display: grid; line-height: 1.3; padding-top: 4px; border-top: 1px solid var(--line); }
.map-pop-item:hover strong { text-decoration: underline; }
/* The same box shown when pointing at a pin: no scrolling (it cannot be reached), width like the popup. */
.leaflet-tooltip:has(.map-tip) { padding: 8px 10px; white-space: normal; }
.map-tip { max-height: none; overflow: visible; width: max-content; max-width: 260px; }
.map-dialog { max-width: 640px; text-align: left; display: flex; flex-direction: column; gap: 10px; max-height: calc(100vh - 32px); }
.map-dialog h2 { margin: 0; }
.map-box { height: min(60vh, 420px); border-radius: 10px; border: 1px solid var(--line); }
.map-where { margin: 0; min-height: 1.4em; }
.origin-line { margin: 6px 0; align-items: baseline; }

/* Full screen for any panel: the button in the top right corner, and the panel covering the screen */
.full-btn { float: right; margin: -8px -8px 4px 8px; width: 34px; height: 34px; min-height: 0; padding: 0; display: inline-grid; place-items: center;
  font-size: 1.05rem; line-height: 1; border: 1px solid transparent; border-radius: 8px; background: none; color: var(--muted); cursor: pointer; }
.full-btn:hover, .full-btn:focus-visible { border-color: var(--line); color: var(--ink); }
summary .full-btn { margin-top: -6px; }
.full-btn[hidden] { display: none; }
html.has-full, html.has-full body { overflow: hidden; }
.panel.full { position: fixed; inset: 0; z-index: 25; margin: 0; border: 0; border-radius: 0; overflow: auto; overscroll-behavior: contain;
  padding: calc(14px + env(safe-area-inset-top)) calc(16px + env(safe-area-inset-right)) calc(20px + env(safe-area-inset-bottom)) calc(16px + env(safe-area-inset-left)); }
.panel.full > .full-btn, .panel.full > summary > .full-btn { position: sticky; top: 0; z-index: 1; margin: -6px -6px 4px 8px; width: 44px; height: 44px;
  font-size: 1.3rem; background: var(--card); border-color: var(--line); color: var(--ink); }
@media (min-width: 1000px) { .panel.full { padding-left: 32px; padding-right: 32px; } }
/* Tickets at the door full screen: the same size as on the page, so every price fits on one screen;
   the help text gives way. */
.panel.full .door-help { display: none; }
/* side by side when the screen is wide enough (a phone on its side), so more prices fit */
.panel.full .walkins { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); column-gap: 28px; }
.panel.full .walkins .walkin { border-top: 0; border-bottom: 1px solid var(--line); padding: 4px 0; }

/* resources: sections that fold in and out, rows or cards; a link without a picture gets a big icon */
.res-section > summary { font-size: 1.1rem; margin-bottom: 8px; }
.res-section:not([open]) > summary { margin-bottom: 0; }
.res-section .drows, .res-section .cards { margin-bottom: 8px; }
.res-row .drow-title { max-width: 55%; }
.res-admin { flex: none; display: inline-flex; gap: 4px; }
.tile-img.res-ph { display: flex; align-items: center; justify-content: center; font-size: 2.6rem; text-decoration: none; }
.res-form { border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 10px; margin: 8px 0; }
.res-suggestion { border-top: 1px solid var(--line); padding: 8px 0; overflow-wrap: anywhere; }
.res-suggestion .row { margin-top: 6px; }
/* small icon buttons in lists: a star for favourites, 📝/✅ for signing up for a course (see iconLegend) */
/* The icons grow with the text, and the area that answers a tap is 44 px or more (WCAG, Apple)
   without making the row taller: the button reaches a few px past its visible edge. */
button.icon-btn { position: relative; min-height: 2em; min-width: 2em; padding: 0 6px; font-size: 1.1rem; line-height: 1; background: transparent; border-color: transparent; }
button.icon-btn::after, .set-btn::after, .account-btn::after { content: ''; position: absolute; inset: -5px; }
.icon-btn + .icon-btn { margin-left: 4px; }
button.icon-btn:hover { background: var(--bg); }
/* line icons (svg-icon): the view switch and the plus that signs up */
.svg-icon { display: inline-block; vertical-align: -.2em; line-height: 0; }
.svg-icon svg { width: 1.2em; height: 1.2em; }
.view-seg .svg-icon svg { width: 1.375rem; height: 1.375rem; }
button.icon-btn:not(.star):not(.on) { color: var(--accent); }
button.icon-btn .svg-icon svg { width: 1.25em; height: 1.25em; stroke-width: 2.6; }
/* Sign up from a list row, in words: a small pill; filled once I am signed up */
button.sign-btn { position: relative; min-height: 1.9em; padding: 1px 10px; font-size: .85rem; font-weight: 700; line-height: 1.2; border-radius: 999px; background: transparent; color: var(--accent); border: 1.5px solid var(--accent); white-space: nowrap; }
button.sign-btn::after { content: ''; position: absolute; inset: -6px -2px; }
button.sign-btn.on { background: var(--wait-bg); color: var(--wait); border-color: transparent; }
button.sign-btn.part { border-style: dashed; }
.card-when.today button.sign-btn { color: inherit; border-color: currentColor; }
.icon-btn + .sign-btn, .sign-btn + .icon-btn { margin-left: 4px; }
button.icon-btn.star { color: var(--muted); }
button.icon-btn.star.on { color: #d99a00; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0 2px 6px; }
/* a course in a list: the text (a link) and its buttons beside it */
.citem { display: flex; gap: 6px; align-items: flex-start; }
.citem-main { flex: 1 1 auto; min-width: 0; display: grid; gap: 1px; color: var(--ink); text-decoration: none; }
.citem-act { order: 2; flex: none; display: inline-flex; gap: 2px; align-items: center; margin: -5px -6px 0 0; }
/* On a phone the plus and the star sit side by side in the top corner; only the first line goes
   beside them, the lines under it use the whole width (Anders 2026-10-25). */
@media (max-width: 560px) {
  .citem { display: flow-root; }
  .citem-act { float: right; margin: -5px -6px -12px 6px; }
  .citem-main { display: block; }
  .citem-main > * { display: block; }
  .citem-main > .dpass { display: flex; }
  .citem-main > .ditem-top > * + * { margin-left: 8px; }
  .citem-main > .ditem-top > .ditem-meta { display: none; }
  .citem-main > * + * { margin-top: 1px; }
  /* An event's title stays in one piece next to the buttons: it goes to the next line rather than breaking mid-word. */
  .gathering .citem-main > .ditem-top > .ditem-title { display: inline-block; max-width: 100%; }
}
.dpass.muted { color: var(--muted); }
.cnext { flex: none; max-width: 100%; font-size: .95rem; }

/* A convention stands out in the dance list (Anders 2026-10-16, made stronger 2026-10-17): its own
   warm colour, a frame all round with a thick stripe on the left, and a filled "Convention" badge. */
.ditem.convention { background: var(--conv-bg); box-shadow: inset 0 0 0 2px var(--conv), inset 6px 0 0 var(--conv); padding-left: 16px; }
.ditem.convention:hover { background: var(--conv-bg); filter: brightness(.98); }
.ditem.convention .ditem-title { font-size: 1.05rem; color: var(--conv); }
.panel.convention { background: var(--conv-bg); border-left: 4px solid var(--conv); }
.card.convention { border: 2px solid var(--conv); background: var(--conv-bg); }
.card.convention .card-when:not(.today) { background: var(--conv-bg); border-color: var(--conv); }
.card.convention .card-title { color: var(--conv); }
.conv-badge { flex: none; align-self: center; background: var(--conv); color: var(--conv-ink); border-radius: 999px; padding: 1px 8px; font-size: .77rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.card-img:has(> .conv-badge) { position: relative; }
.card-img > .conv-badge { position: absolute; top: 10px; left: 10px; padding: 3px 10px; font-size: .85rem; box-shadow: 0 1px 4px rgba(0, 0, 0, .3); }
.chip.convention-chip { background: var(--conv-bg); color: var(--conv); border-color: var(--conv); text-decoration: none; font-weight: 600; }
.convention-note { color: var(--conv); font-weight: 600; }

/* Finances: the dance opened from its menu is marked in the per-dance table, and each dance's money
   per price folds out below it. */
.fin-table tr.on td { background: color-mix(in srgb, var(--accent) 12%, transparent); -webkit-text-stroke: var(--chosen-weight) currentColor; }
details.fin-dance { margin-top: .5rem; }
details.fin-dance .fin-table { margin-top: .25rem; }
/* Club events keep their colour under the pointer (after .ditem:hover). */
.ditem.internal-mine:hover, .drow.internal-mine:hover { background: var(--mine-bg); filter: brightness(.98); }
.ditem.internal-other:hover, .drow.internal-other:hover { background: var(--other-bg); filter: brightness(.98); }
/* Other dances on the chosen date (round 39). */
.panel.collisions { background: var(--wait-bg); border-color: var(--wait); box-shadow: inset 5px 0 0 var(--wait); padding: 10px 14px 10px 18px; margin: 8px 0; }
.panel.collisions p { margin: 0 0 4px; }
.panel.collisions ul { margin: 4px 0 6px; padding-left: 1.2em; }
.panel.collisions li { margin: 2px 0; overflow-wrap: break-word; }
.collisions.none p { margin: 4px 0; color: var(--ok); }
.chip.collide-chip { background: var(--bad); color: #fff; border-color: var(--bad); }
.panel.full h3:has(+ .door-help) .info-btn { display: none; }

/* The welcome guide (Anders 2026-10-24): on a phone a card at the bottom where the thumb reaches;
   on a computer beside the button it points at (placed by guide.js). The ring round the button
   dims the rest of the page with its shadow. Below the "New tip!" alert and the toasts. */
.guide { position: fixed; inset: 0; z-index: 35; }
.guide-dim { position: fixed; inset: 0; background: rgba(0,0,0,.5); }
.guide.pointing .guide-dim { background: transparent; }
.guide-ring { position: fixed; border-radius: 14px; box-shadow: 0 0 0 4px #fff, 0 0 0 9999px rgba(0,0,0,.5); pointer-events: none; transition: all .2s; }
.guide-card { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); width: min(420px, calc(100vw - 32px));
  max-height: calc(100vh - 48px); overflow: auto; background: var(--card); color: var(--ink); border-radius: 18px;
  padding: 18px 18px 14px; box-shadow: 0 12px 40px rgba(0,0,0,.35); }
.guide-card h2 { margin: 2px 32px 6px 0; font-size: 1.25rem; }
.guide-card p { margin: 0 0 10px; line-height: 1.45; }
.guide-icon { font-size: 2rem; line-height: 1; margin-bottom: 4px; }
.guide-x { position: absolute; top: 8px; right: 8px; width: 44px; height: 44px; border: 0; background: none; box-shadow: none; color: var(--muted); font-size: 1.1rem; }
.guide-choice { display: grid; gap: 8px; margin: 4px 0 12px; }
.guide-choice label { display: grid; gap: 2px; }
.guide-choice label span { font-size: .9rem; color: var(--muted); }
.guide-choice label.check-line { display: flex; align-items: center; gap: 8px; }
.guide-ok { color: var(--ok); font-weight: 600; }
.guide-dots { display: flex; justify-content: center; gap: 6px; margin: 4px 0 10px; }
.guide-dots span { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.guide-dots span.on { background: var(--accent); }
.guide-buttons { display: flex; gap: 8px; justify-content: space-between; }
.guide-buttons .primary { margin-left: auto; min-width: 9em; }
.link-btn { border: 0; background: none; box-shadow: none; color: var(--accent); padding: 0; min-height: 0; text-decoration: underline; }
@media (max-width: 560px) {
  .guide-card { left: 0; right: 0; bottom: 0; transform: none; width: 100%; border-radius: 18px 18px 0 0;
    padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) { .guide-ring { transition: none; } }

/* A course's schedule (round46): one row per session; a session taken out is struck through. */
.course-sessions { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; }
.course-session { display: flex; align-items: flex-start; gap: 8px; border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 8px; }
.course-session .cs-no { min-width: 1.6em; font-weight: bold; padding-top: 10px; text-align: right; }
.course-session .cs-fields { display: grid; grid-template-columns: minmax(0, 1fr) 5.5em 5.5em; gap: 6px; min-width: 0; }
.course-session .cs-fields select { min-width: 0; width: 100%; }
.course-session .cs-fields > select:nth-of-type(2) { grid-column: 2 / span 2; }
.course-session.removed, .course-session.past { color: var(--muted); align-items: center; }
.course-session.removed .cs-no, .course-session.past .cs-no { padding-top: 0; }
.room-row { display: flex; align-items: center; gap: 8px; }
/* A place that looks like the same place (round50): name, address and why on lines of their own. */
.same-row { white-space: normal; align-items: center; }
.same-places { margin: 4px 0 10px; }
.course-session .cs-fields > select:last-child:first-of-type { grid-column: 1 / -1; }
@media (max-width: 560px) {
  .course-session .cs-fields { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .course-session .cs-fields > .pick-value:first-child, .course-session .cs-fields > .pick-wrap:first-child { grid-column: 1 / -1; }
  .course-session .cs-fields > select:nth-of-type(2) { grid-column: auto; }
}
/* The promo film before logging in (js/promo-player.js): the canvas draws its own background. */
.promo { position: relative; max-width: 420px; margin: 0 auto 12px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.promo canvas { display: block; width: 100%; height: auto; cursor: pointer; }
.promo .promo-btn { position: absolute; left: 50%; bottom: 4%; transform: translateX(-50%); border-radius: 999px; white-space: nowrap; }
.promo .promo-btn[hidden] { display: none; }
/* Changes (round70): one box per change, its rows under each other, Undo below. */
.change { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin: 8px 0; background: var(--card); }
.change > div { margin: 2px 0; }
.change.undone { opacity: .7; }
.change button { margin-top: 6px; }
/* What's new: one part per role within a date, when someone has several roles. */
.change .news-role { margin-top: 8px; }
/* Something new in the app (#/news): a small dot on my picture and on its menu line until it is seen. */
.news-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #ff4d4f; box-shadow: 0 0 0 2px var(--card); margin-left: auto; }
.set-btn .news-dot { position: absolute; top: 2px; right: 2px; margin: 0; box-shadow: none; }
/* Two-step login (round72): the picture to scan, on white so every phone camera reads it. */
.mfa-qr { width: 180px; height: 180px; background: #fff; padding: 8px; border-radius: 8px; display: block; margin: 8px 0; }
/* Calls gone through at a course session (round86). */
.call-row, .call-pick { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 6px 0; border-top: 1px solid var(--line); }
.call-row .grow, .call-pick .grow { min-width: 0; }
.call-pick.on { background: var(--ok-bg); }
.call-links { white-space: nowrap; }
/* Anders 2026-11-12: new is not marked; a repeat says so quietly, a call's comment (round93) follows its name. */
.call-repeat { margin-left: 6px; color: var(--muted); font-size: .8rem; font-style: italic; }
.call-comment { margin-left: 6px; color: var(--muted); font-size: .9rem; }
.call-comment::before { content: '– '; }
.call-comment-input { flex: 1 1 100%; font-size: .9rem; padding: 4px 8px; }
button.small.quiet { background: transparent; border-color: var(--line); color: var(--muted); font-weight: normal; }
section.call-session { padding-top: 6px; }
section.call-session h4 { margin: 10px 0 2px; gap: 8px; }
section.call-session h4 a { font-weight: normal; white-space: nowrap; }
.call-bar { height: 8px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); overflow: hidden; margin: 4px 0 10px; }
.call-bar i { display: block; height: 100%; background: var(--ok); }
.call-session summary { cursor: pointer; padding: 6px 0; font-weight: 600; }
/* Course diary in the menu (round94): each course's heading folds it to one line; the arrow turns, nothing changes size. */
h3.diary-course { display: flex; margin: 0 0 6px; gap: 8px; align-items: center; }
.course-calls.folded h3.diary-course { margin: 0; }
button.diary-fold { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; cursor: pointer; font: inherit; }
button.diary-fold:focus-visible { outline: 2px solid var(--accent, #5a32b0); outline-offset: 2px; border-radius: 6px; }
.fold-arrow { display: inline-block; width: 1em; text-align: center; transition: transform .15s; }
.fold-arrow.open { transform: rotate(90deg); }
.past-sessions { margin: 10px 0; }
.past-sessions summary { cursor: pointer; padding: 6px 0; }
.call-list { max-height: 60vh; overflow-y: auto; }
.chip.call-level { margin-left: 6px; font-size: .75rem; }
/* The club's courses as a week (Anders 2026-11-12): a table per term, a column per weekday, a row per time. */
.course-week h3 { margin-top: 0; }
.week-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.week-table th, .week-table td { border: 1px solid var(--line); padding: 6px; vertical-align: top; text-align: left; }
.week-table th:not(.week-time) { min-width: 8rem; }
.week-table .week-time { width: 7.5rem; white-space: nowrap; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.week-course { display: block; margin: 2px 0; padding: 8px 10px; border-radius: 8px; font-weight: 600; text-decoration: none; color: var(--ink);
  background: color-mix(in srgb, var(--accent) 10%, var(--card)); border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line)); }
.week-course:hover { border-color: var(--accent); }
.week-course.done { opacity: .6; }
.week-course { overflow-wrap: break-word; }
@media (max-width: 560px) {
  .week-table { table-layout: auto; }
  .week-table th, .week-table td { padding: 4px; }
  .week-table .week-time { width: 3.6rem; white-space: normal; font-size: .8rem; }
  .week-table th:not(.week-time) { min-width: 7.5rem; font-size: .9rem; }
  .week-course { padding: 6px 8px; font-size: .88rem; }
}
/* The course diary (Anders 2026-11-12): the sessions as a row of buttons, a note, the calls, buttons at the bottom. */
.diary { max-width: 760px; }
.diary-strip { display: flex; gap: 6px; overflow-x: auto; padding: 4px 2px 8px; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
.diary-strip button { flex: none; position: relative; display: flex; flex-direction: column; align-items: center; min-width: 3.4rem; min-height: 52px; padding: 4px 6px; border-radius: 10px; scroll-snap-align: center; }
.diary-strip button b { font-size: 1.1rem; line-height: 1.1; }
.diary-strip button span { font-size: .75rem; color: var(--muted); }
.diary-strip button.later { opacity: .7; }
.diary-strip button.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, var(--card)); opacity: 1; }
.diary-strip button.on span { color: var(--ink); }
.diary-strip button i { position: absolute; top: 1px; right: 4px; font-style: normal; font-size: .7rem; color: var(--ok); }
.diary-head { align-items: center; flex-wrap: nowrap; }
.diary-head h3 { margin: 0; text-align: center; }
.diary-session h4 { margin: 12px 0 4px; }
.diary-session textarea { width: 100%; }
.diary .call-pick label { padding: 6px 0; cursor: pointer; }
.diary .call-list { max-height: none; }
.diary-bar { position: sticky; bottom: 0; display: flex; gap: 8px; justify-content: flex-end; padding: 10px 0; background: var(--bg); border-top: 1px solid var(--line); z-index: 5; }
.diary-bar .primary { min-width: 7rem; }
.diary-note { white-space: pre-wrap; margin: 4px 0 8px; padding: 8px 10px; border-radius: 8px; background: var(--bg); border: 1px solid var(--line); }
/* Course programs (round89): on the course's panel and above the course diary. */
.course-program { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 6px; }
.course-program h4 { margin: 4px 0; }
.diary-program { align-items: center; margin: 0 0 6px; }
.diary-program .fchip { text-decoration: none; display: inline-flex; align-items: center; }
/* Course plans and moments (round91), and a level's page. */
.plan-list { display: grid; gap: 4px; margin-bottom: 10px; }
.plan-card { padding: 8px 0; border-bottom: 1px solid var(--line); }
.plan-card .chip { text-decoration: none; }
.plan-edit .call-list, .level-page .call-list, .diary-moments { max-height: none; }
.plan-run { padding: 6px 0; border-top: 1px solid var(--line); }
.plan-run ul { margin: 4px 0; padding-left: 1.2em; }
.level-page .fchips { margin-bottom: 8px; }
.level-page .fchip { text-decoration: none; display: inline-flex; align-items: center; border: 1px solid var(--line); }
.level-index .level-name { text-decoration: none; }
.level-index .level-name b { display: inline-block; min-width: 2.6em; }
.call-no { min-width: 2em; text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.plan-runs { margin-top: 14px; }
/* Seeing the app as a regular dancer (main administrators). */
/* "Show as" in the top bar (Anders 2026-11-12): the pages below look as they do for everyone. */
.preview-chip { display: inline-flex; align-items: center; min-width: 0; flex: 0 1 auto; border-radius: 999px; background: #fde68a; color: #422006; font-size: .85rem; font-weight: 600; overflow: hidden; }
.preview-chip .preview-what { display: inline-flex; gap: 4px; min-width: 0; padding: 4px 4px 4px 10px; color: inherit; text-decoration: none; }
.preview-chip .preview-what span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preview-chip .preview-stop { flex: none; background: #422006; color: #fde68a; border: 0; border-radius: 999px; margin: 2px; padding: 4px 10px; min-height: 30px; font-size: .85rem; font-weight: 600; }
@media (max-width: 600px) { .preview-chip .preview-stop-text { display: none; } .preview-chip .preview-stop { padding: 4px 9px; } }
.show-as-person { display: block; width: 100%; text-align: left; margin: 4px 0; }

/* My schedule as a calendar (round94): whole weeks, small enough for several weeks on a phone.
   A day with something on it is tinted and marked, each kind in its own colour and shape (2026-11-13):
   a blue dot for a dance, an orange ring for a course session, a green square for a club event (green
   as on the dance list). Fixed colours, not --accent, which is purple in the caller's view.
   The chosen day gets a thicker border drawn inside, so nothing moves.
   One column that may not grow: a long text in the chosen day's list (a course's description) is cut
   with … instead of making the whole page wider than the phone. */
:root { --cal-dance: #1f5fbf; --cal-course: #c2560c; --cal-club: var(--mine); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --cal-dance: #5b8ff0; --cal-course: #f59a52; } }
:root[data-theme="dark"] { --cal-dance: #5b8ff0; --cal-course: #f59a52; }
.cal { display: grid; grid-template-columns: minmax(0, 1fr); gap: 3px; margin: 8px 0 4px; }
.cal > * { min-width: 0; }
.cal-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.cal-week.with-no { grid-template-columns: 1.6em repeat(7, minmax(0, 1fr)); }
.cal-head { font-size: .78rem; color: var(--muted); text-align: center; text-transform: capitalize; }
.cal-no { font-size: .7rem; color: var(--muted); align-self: center; text-align: right; padding-right: 2px; }
.cal-day { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 2px;
  min-height: 46px; padding: 4px 0 0; border: 0; border-radius: 8px; background: var(--card); color: var(--ink); font: inherit; font-size: .9rem; box-sizing: border-box; }
.cal-day.odd { background: color-mix(in srgb, var(--card) 88%, var(--line)); }
.cal-day.past { color: var(--muted); opacity: .6; }
.cal-day.today .cal-d { display: inline-block; min-width: 1.5em; border-radius: 999px; background: var(--ink); color: var(--card); -webkit-text-stroke: 0; }
.cal-num { line-height: 1.1; display: flex; flex-direction: column; align-items: center; }
.cal-mon { font-size: .62rem; color: var(--muted); text-transform: lowercase; line-height: 1; }
button.cal-day.has { --k: var(--ink); cursor: pointer; background: color-mix(in srgb, var(--k) 10%, var(--card)); min-height: 46px; }
button.cal-day.k-dance { --k: var(--cal-dance); }
button.cal-day.k-course { --k: var(--cal-course); }
button.cal-day.k-club { --k: var(--cal-club); }
button.cal-day.k-dance, button.cal-day.k-course, button.cal-day.k-club { background: color-mix(in srgb, var(--k) 14%, var(--card)); }
button.cal-day.has .cal-num { color: var(--k); -webkit-text-stroke: var(--chosen-weight) currentColor; }
button.cal-day.on { box-shadow: inset 0 0 0 2px var(--k); background: color-mix(in srgb, var(--k) 24%, var(--card)); }
button.cal-day.off .cal-marks { opacity: .45; }
.cal-marks { display: flex; gap: 3px; height: 9px; }
.cal-mark { display: inline-block; width: 8px; height: 8px; border-radius: 50%; box-sizing: border-box; vertical-align: middle; }
.cal-mark.dance { background: var(--cal-dance); }
.cal-mark.course { border: 2px solid var(--cal-course); }
.cal-mark.club { background: var(--cal-club); border-radius: 1px; }
.cal-picked { margin: 2px 0 6px; }
.cal-picked .dlist h3.dday { margin-top: 4px; }
.session-no { font-weight: 400; color: var(--muted); white-space: nowrap; }

.loading-note { text-align: center; padding: 40px 0; }
.news-points { margin: 4px 0 0; padding-left: 20px; }
.news-points li { margin: 3px 0; }
/* The dance page: directions, calendar and share on one row */
.dance-links { display: flex; gap: 6px; margin: 0 0 10px; }
.dance-links > * { flex: 1 1 0; min-width: 0; justify-content: center; white-space: nowrap; padding-left: 6px; padding-right: 6px; }
/* Signing up together (round102): the question to me, and asking for someone else. */
.together { margin: 8px 0; }
.together-ask { border-left: 4px solid var(--accent); }
.together-ask p { margin: 0 0 8px; }
.together-ask .row { flex-wrap: nowrap; gap: 6px; }
/* Going together by car (round103): one row on the dance page that opens the list. */
.rides { margin: 8px 0; border: 1px solid var(--line); border-radius: 10px; padding: 0 10px; }
.rides.open { padding-bottom: 8px; }
.ride-head { display: flex; align-items: center; gap: 8px; width: 100%; padding: 10px 0; background: none; border: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.rides h4 { margin: 10px 0 2px; }
.ride-row { display: flex; align-items: center; gap: 6px; padding: 6px 0; border-top: 1px solid var(--line); }
.rides h4 + .ride-row, .ride-mine .ride-row:first-child { border-top: 0; }
.ride-row button { white-space: nowrap; flex: none; }
.ride-add { flex-wrap: wrap; gap: 6px; }
.ride-fields { display: flex; gap: 8px; }
.ride-fields label:first-child:not(:only-child) { flex: 0 0 110px; }
.ride-fields label { flex: 1; }
.ride-mine { background: var(--bg); border-radius: 8px; padding: 2px 8px; }
.ride-contact a { white-space: nowrap; }
/* Shown only in two columns, or only in one (the panel To approve on Members, round109). */
@media (max-width: 999px) { .only-wide { display: none !important; } }
@media (min-width: 1000px) { .only-narrow { display: none !important; } }
