/*
  GoTogether's design tokens and base components. Colors come from sports fields (pitch green, asphalt) rather
  than from tech-product trends; color carries meaning only: actions are green, "almost full" is orange, and every
  sport keeps one color on the map and in lists. Pages use these variables, never raw values.
*/

@font-face { font-family: "Atkinson Hyperlegible Next"; font-weight: 400; font-display: swap; src: url("fonts/atkinson-hyperlegible-next-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible Next"; font-weight: 600; font-display: swap; src: url("fonts/atkinson-hyperlegible-next-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible Next"; font-weight: 700; font-display: swap; src: url("fonts/atkinson-hyperlegible-next-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 600; font-display: swap; src: url("fonts/barlow-condensed-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-display: swap; src: url("fonts/barlow-condensed-latin-700-normal.woff2") format("woff2"); }

:root {
    /* Color roles */
    --color-ink: #1C2321;          /* text, like the asphalt of an outdoor court */
    --color-muted: #55605B;        /* secondary text, 6:1 on white */
    --color-line: #D9DEDB;         /* borders */
    --color-line-soft: #EEF1EF;    /* dividers inside a panel */
    --color-control: #C7CECA;      /* borders of inputs and secondary buttons */
    --color-surface: #F4F6F5;      /* page background behind panels */
    --color-panel: #FFFFFF;
    --color-action: #1E6B45;       /* pitch green: everything you can do */
    --color-action-strong: #17553A;
    --color-action-tint: #E6F0EA;
    --color-selected: #F1F6F3;
    --color-signal: #B8410B;       /* only for "almost full" and "cancelled" */
    --color-map: #EEF1EC;

    /* Type */
    --font-body: "Atkinson Hyperlegible Next", system-ui, sans-serif;
    --font-display: "Barlow Condensed", "Arial Narrow", sans-serif;

    /* Shape and space */
    --radius: 6px;
    --radius-panel: 8px;
    --control-height: 44px;
    --top-bar-height: 64px;
    --bottom-bar-height: 72px;
}

*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; }

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.45;
    color: var(--color-ink);
    background: var(--color-panel);
}

h1, h2, h3 { margin: 0; line-height: 1.15; }

a { color: var(--color-action); }
a:hover { color: var(--color-action-strong); }

:focus-visible { outline: 3px solid var(--color-action); outline-offset: 2px; }

/* Titles and numbers in the condensed face, like a scoreboard. */
.display { font-family: var(--font-display); font-weight: 700; line-height: 1; }
.page-title { font-family: var(--font-display); font-weight: 700; font-size: 40px; line-height: 1; }
.numbers { font-variant-numeric: tabular-nums; }
.muted { color: var(--color-muted); }

/* Page and panels */
.page { max-width: 1080px; margin: 0 auto; padding: 28px 24px 48px; }
.panel { background: var(--color-panel); border: 1px solid var(--color-line); border-radius: var(--radius-panel); }
.panel-section { padding: 20px 24px; border-bottom: 1px solid var(--color-line-soft); }
.panel-section:last-child { border-bottom: 0; }
.section-title { margin: 0 0 12px; font-size: 16px; font-weight: 700; }

.back-link { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; text-decoration: none; }

/* Buttons: one primary action per screen, the rest secondary or plain links. */
.button {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: var(--control-height); padding: 0 18px;
    border: 1px solid var(--color-control); border-radius: var(--radius);
    background: var(--color-panel); color: var(--color-ink);
    font: inherit; font-size: 15px; font-weight: 600; text-decoration: none; cursor: pointer;
}
.button:hover { color: var(--color-ink); border-color: var(--color-muted); }
.button-primary { border-color: var(--color-action); background: var(--color-action); color: #FFFFFF; font-weight: 700; }
.button-primary:hover { border-color: var(--color-action-strong); background: var(--color-action-strong); color: #FFFFFF; }
.button:disabled { opacity: 0.55; cursor: not-allowed; }
.button-link { border: 0; background: none; padding: 0; min-height: 0; font: inherit; font-weight: 600; color: var(--color-action); cursor: pointer; }

/* Form controls */
.field { display: flex; flex-direction: column; gap: 6px; }
.label { font-size: 15px; font-weight: 700; }
.hint { font-size: 13px; color: var(--color-muted); }
.input, .select, .textarea {
    width: 100%; min-height: var(--control-height); padding: 0 12px;
    border: 1px solid var(--color-control); border-radius: var(--radius);
    background: var(--color-panel); color: var(--color-ink); font: inherit; font-size: 15px;
}
.textarea { padding: 10px 12px; line-height: 1.5; resize: vertical; }
/* Safari ignores the height of a native select, so it is drawn like the other fields, with its own arrow. */
.select {
    appearance: none; padding-right: 36px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%2355605B' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center;
}
.input:focus, .select:focus, .textarea:focus { outline: 2px solid var(--color-action); outline-offset: 0; border-color: var(--color-action); }
.check { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; font-size: 15px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--color-action); }
.validation-message { margin-top: 4px; font-size: 14px; color: var(--color-signal); }

/* Choice buttons (a pill per option). The selected one has a green border and a light green fill. */
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice {
    display: inline-flex; align-items: center; gap: 8px; min-height: var(--control-height); padding: 0 14px;
    border: 1px solid var(--color-control); border-radius: var(--radius); background: var(--color-panel);
    font: inherit; font-size: 15px; font-weight: 600; color: var(--color-ink); cursor: pointer;
}
.choice:has(input:checked), .choice[aria-pressed="true"] { border: 2px solid var(--color-action); padding: 0 13px; background: var(--color-selected); }
.choice input { accent-color: var(--color-action); }

/* Notices */
.notice { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border: 1px solid var(--color-line); border-radius: var(--radius); background: var(--color-selected); }
.notice-warning { border-color: #E9C5B0; background: #FBF1EA; }
.status-ok { color: var(--color-action); font-weight: 600; }

/* A sport's color dot, next to its name everywhere. */
.sport-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

/* Avatars: a photo, or initials on a tint. */
.avatar { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--color-action-tint); color: var(--color-action-strong); font-weight: 700; font-size: 14px; text-decoration: none; overflow: hidden; flex-shrink: 0; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }

.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

/* Blazor's error bar, restyled. */
#blazor-error-ui {
    display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 2000;
    padding: 12px 20px; background: #FBF1EA; border-top: 1px solid #E9C5B0; color: var(--color-ink);
}
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: 16px; top: 10px; }

/* Markers on the map: one colored dot per location, clusters in the action color. */
.location-marker { display: block; width: 18px; height: 18px; border-radius: 50%; border: 3px solid #FFFFFF; box-shadow: 0 0 0 1px rgba(28, 35, 33, 0.35); }
.location-marker-focused { width: 26px; height: 26px; box-shadow: 0 0 0 6px rgba(30, 107, 69, 0.25); }
.marker-cluster-small, .marker-cluster-medium, .marker-cluster-large { background: rgba(30, 107, 69, 0.18) !important; }
.marker-cluster-small div, .marker-cluster-medium div, .marker-cluster-large div { background: var(--color-action) !important; color: #FFFFFF; font-family: var(--font-display); font-weight: 700; font-size: 15px; }
.leaflet-container { font-family: var(--font-body); }
.leaflet-popup-content { font-size: 14px; }

/* Layout: a top bar, the page, and on phones a bottom bar instead of the top bar's links. */
.top-bar { position: sticky; top: 0; z-index: 1100; display: flex; align-items: center; gap: 24px; height: var(--top-bar-height); padding: 0 24px; border-bottom: 1px solid var(--color-line); background: var(--color-panel); }
.brand { font-family: var(--font-display); font-size: 28px; font-weight: 700; color: var(--color-ink); text-decoration: none; }
.brand:hover { color: var(--color-ink); }
.top-nav { margin-left: auto; display: flex; align-items: center; gap: 20px; }
.top-nav form { margin: 0; }
.top-nav-link { color: var(--color-ink); font-size: 15px; font-weight: 600; text-decoration: none; padding: 8px 0; border-bottom: 3px solid transparent; }
.top-nav-link:hover { color: var(--color-action); }
.top-nav-link.active { border-bottom-color: var(--color-action); }
.top-nav-plan { min-height: 40px; padding: 0 16px; }
.main { min-height: calc(100dvh - var(--top-bar-height)); background: var(--color-surface); }
.bottom-nav { display: none; }

/* The bell stays in the top bar on phones too: the bottom bar has room for four items, not five. */
.notification-bell { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: var(--radius); color: var(--color-ink); }
.notification-bell:hover, .notification-bell.active { color: var(--color-action); background: var(--color-selected); }
.notification-count { position: absolute; top: 3px; right: 1px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--color-action); color: #FFFFFF; font-family: var(--font-display); font-size: 13px; font-weight: 700; line-height: 18px; text-align: center; }

@media (max-width: 760px) {
    :root { --top-bar-height: 56px; }
    .top-bar { padding: 0 16px; }
    .top-nav-link, .top-nav-plan { display: none; }
    .main { min-height: calc(100dvh - var(--top-bar-height) - var(--bottom-bar-height)); padding-bottom: var(--bottom-bar-height); }
    .bottom-nav {
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 1100; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr);
        height: var(--bottom-bar-height); border-top: 1px solid var(--color-line); background: var(--color-panel);
    }
    .bottom-nav-link { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--color-muted); font-size: 12px; font-weight: 600; text-decoration: none; }
    .bottom-nav-link.active { color: var(--color-action); font-weight: 700; }
    .page { padding: 20px 16px 32px; }
}

/* The map page: a list of places next to a map that fills the rest of the screen. */
.map-page { display: flex; height: calc(100dvh - var(--top-bar-height)); background: var(--color-panel); }
.map-panel { flex: 0 0 420px; display: flex; flex-direction: column; min-width: 0; border-right: 1px solid var(--color-line); }
.map-panel-header { display: flex; flex-direction: column; gap: 14px; padding: 16px 20px; border-bottom: 1px solid var(--color-line); }
.map-panel-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.map-panel-title .section-title { margin: 0; }
.map-panel-list { flex: 1; overflow-y: auto; }
.map-panel-message { margin: 0; padding: 12px 20px; font-size: 14px; color: var(--color-muted); border-bottom: 1px solid var(--color-line-soft); }
.map-panel-footer { margin: 0; padding: 16px 20px; font-size: 14px; color: var(--color-muted); }

/* Activities or places: two halves of one control, the chosen one filled. */
.view-switch { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 3px; border-radius: var(--radius); background: var(--color-surface); }
.view-switch-button {
    min-height: 38px; border: 0; border-radius: 4px; background: none;
    font: inherit; font-size: 15px; font-weight: 600; color: var(--color-muted); cursor: pointer;
}
.view-switch-button[aria-pressed="true"] { background: var(--color-panel); color: var(--color-ink); font-weight: 700; box-shadow: 0 0 0 1px var(--color-line); }
.view-switch-button .numbers { margin-left: 4px; font-weight: 400; color: var(--color-muted); }
.day-heading { margin: 0; padding: 14px 20px 6px; font-size: 13px; font-weight: 700; color: var(--color-muted); text-transform: uppercase; letter-spacing: 0.04em; }

/* A place chosen in the list: what you can do there, and what is planned. */
.place-detail { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 16px 20px 24px; }
.place-detail-name { margin-top: 6px; font-size: 34px; }
.place-detail-sports { display: flex; flex-wrap: wrap; gap: 6px; }
.place-detail-plan { margin-top: 6px; }
.place-detail-heading { margin: 18px 0 0; }
.place-detail .activity-list { align-self: stretch; }
.sport-chip, .status-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 0 10px; border-radius: 14px; background: var(--color-surface); font-size: 13px; font-weight: 700; }
.status-chip { background: #FBF1EA; }
.signal { color: var(--color-signal); }
.location-popup-link { display: inline-block; margin-top: 6px; font-weight: 700; }
.place-list { list-style: none; margin: 0; padding: 0; }
.place-row {
    display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 20px; border: 0; border-bottom: 1px solid var(--color-line-soft);
    background: var(--color-panel); color: var(--color-ink); font: inherit; text-align: left; cursor: pointer;
}
.place-row:hover { background: var(--color-surface); }
.place-row[aria-pressed="true"] { background: var(--color-selected); box-shadow: inset 3px 0 0 var(--color-action); }
.place-row-text { display: flex; flex-direction: column; min-width: 0; }
.place-row-name { font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.place-row-sports { font-size: 13px; color: var(--color-muted); }
.map-area { flex: 1; position: relative; min-width: 0; background: var(--color-map); }
.location-map { position: absolute; inset: 0; }

@media (max-width: 760px) {
    /* The map on top and the list below it, like a sheet pulled up from the bottom bar. */
    .map-page { flex-direction: column-reverse; height: calc(100dvh - var(--top-bar-height) - var(--bottom-bar-height)); }
    .map-area { flex: 1 1 55%; }
    .map-panel { flex: 1 1 45%; min-height: 0; border-right: 0; border-top: 1px solid var(--color-line); border-radius: 14px 14px 0 0; margin-top: -14px; z-index: 1000; background: var(--color-panel); }
    .map-panel-header { padding: 14px 16px; }
    .place-row { padding: 10px 16px; }
}

/* Profile: a summary next to the form, stacked on narrow screens. */
.profile-page { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; }
.profile-summary { flex: 1 1 260px; max-width: 300px; padding: 24px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.profile-photo { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; }
.profile-photo-initials { display: grid; place-items: center; background: var(--color-action-tint); color: var(--color-action-strong); font-family: var(--font-display); font-size: 48px; font-weight: 700; }
.profile-summary-name { margin-top: 6px; font-size: 30px; }
.profile-summary-meta { font-size: 14px; }
.profile-summary-button { width: 100%; margin-top: 10px; }
.file-input:focus-visible + .button { outline: 3px solid var(--color-action); outline-offset: 2px; }
.profile-summary-note { margin: 10px 0 0; padding-top: 16px; border-top: 1px solid var(--color-line-soft); font-size: 13px; line-height: 1.5; color: var(--color-muted); text-align: left; }
.profile-form { flex: 999 1 560px; min-width: 0; }
.profile-form form { margin: 0; }
.profile-form fieldset { margin: 0; border: 0; border-bottom: 1px solid var(--color-line-soft); min-width: 0; }
/* A legend ignores the fieldset's padding unless it floats; floating keeps it at the top of the section. */
.profile-form legend { float: left; width: 100%; padding: 0; }
.profile-form legend + * { clear: both; }
.profile-intro { margin: 8px 0 0; font-size: 15px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid-wide { grid-column: 1 / -1; }
.form-actions { display: flex; align-items: center; gap: 16px; }
.profile-show-gender { margin-top: 12px; }
.sport-levels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; margin-top: 8px; }
.sport-level { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; border-bottom: 1px solid var(--color-line-soft); }
.sport-level label { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.sport-level-chosen { font-weight: 700; }
.sport-level .select { width: 150px; min-height: 38px; font-size: 14px; }
.language-options { display: flex; flex-wrap: wrap; gap: 0 20px; }

@media (max-width: 760px) {
    .profile-summary { max-width: none; }
    .form-grid, .sport-levels { grid-template-columns: minmax(0, 1fr); }
    .page-title { font-size: 34px; }
}

/* Activities in a list: time on the left, what and where in the middle, places on the right. */
.activity-list-boxed { border: 1px solid var(--color-line); border-radius: var(--radius-panel); background: var(--color-panel); overflow: hidden; }
.activity-row {
    display: flex; align-items: center; gap: 14px; padding: 12px 20px; border-bottom: 1px solid var(--color-line-soft);
    background: var(--color-panel); color: var(--color-ink); text-decoration: none;
}
.activity-list-boxed .activity-row { padding: 12px 16px; }
.activity-list-boxed .activity-row:last-child { border-bottom: 0; }
a.activity-row:hover { color: var(--color-ink); background: var(--color-surface); }
.activity-row-selected { background: var(--color-selected); box-shadow: inset 3px 0 0 var(--color-action); }
.activity-row-when { display: flex; flex-direction: column; width: 72px; flex-shrink: 0; }
.activity-row-time { font-size: 24px; }
.activity-row-small { font-size: 12px; color: var(--color-muted); }
.activity-row-what { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.activity-row-sport { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; }
.activity-row-place { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.activity-row-meta { font-size: 13px; color: var(--color-muted); }
.activity-row-status { display: flex; flex-direction: column; align-items: flex-end; text-align: right; flex-shrink: 0; }
.activity-row-places { font-size: 14px; font-weight: 700; }

/* Planning: the form, and next to it how the activity will look in lists. */
.plan-title { margin: 10px 0 20px; }
.plan-notice { margin-bottom: 20px; }
.plan-choose-place { max-width: 560px; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.plan-choose-place p { margin: 0; }
.plan-layout { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; }
.plan-form { flex: 999 1 560px; min-width: 0; margin: 0; }
.plan-place { display: flex; align-items: center; gap: 14px; }
.plan-place-pin { display: grid; place-items: center; width: 52px; height: 52px; border-radius: var(--radius); background: var(--color-map); flex-shrink: 0; }
.plan-place-pin span { width: 18px; height: 18px; border-radius: 50%; border: 3px solid #FFFFFF; box-shadow: 0 0 0 1px var(--color-control); }
.plan-place-text { flex: 1; min-width: 0; }
.plan-place-name { font-weight: 700; }
.plan-place-other { font-size: 14px; font-weight: 600; flex-shrink: 0; }
.plan-sports { margin-top: 14px; }
.day-choice { flex-direction: column; justify-content: center; gap: 0; min-width: 72px; min-height: 56px; }
.day-choice-weekday { font-size: 12px; font-weight: 400; color: var(--color-muted); }
.day-choice-date { font-size: 15px; font-weight: 700; }
.plan-when-fields { display: flex; flex-wrap: wrap; gap: 16px 24px; margin-top: 16px; }
.plan-time, .plan-date { width: 160px; }
.plan-summary { margin: 14px 0 0; font-size: 15px; }
.plan-counts { display: flex; flex-wrap: wrap; gap: 20px 40px; }
.stepper { display: flex; }
.stepper-button { width: 44px; height: var(--control-height); border: 1px solid var(--color-control); background: var(--color-panel); font: inherit; font-size: 20px; color: var(--color-ink); cursor: pointer; }
.stepper-button:first-child { border-radius: var(--radius) 0 0 var(--radius); }
.stepper-button:last-child { border-radius: 0 var(--radius) var(--radius) 0; }
.stepper-button:disabled { color: var(--color-control); cursor: not-allowed; }
.stepper-value { width: 56px; height: var(--control-height); border: 1px solid var(--color-control); border-left: 0; border-right: 0; text-align: center; font: inherit; font-size: 17px; font-weight: 700; color: var(--color-ink); }
.plan-who { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 12px 16px; align-items: center; }
.plan-who .label { font-weight: 400; font-size: 14px; color: var(--color-muted); }
.plan-who .choice { min-height: 40px; padding: 0 12px; font-size: 14px; }
.plan-who .choice[aria-pressed="true"] { padding: 0 11px; }
.plan-who-hint { margin: 12px 0 0; }
.choice:disabled { color: var(--color-control); cursor: not-allowed; }
.plan-preview { flex: 1 1 320px; max-width: 380px; position: sticky; top: calc(var(--top-bar-height) + 24px); }
.plan-preview-note { margin: 14px 0 0; line-height: 1.5; }

/* One activity: the details, who takes part, and beside it the places and the button to join. */
.activity-notice { margin-top: 16px; }
.activity-missing { margin: 16px 0 8px; }
.activity-layout { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; margin-top: 16px; }
.activity-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.activity-summary, .activity-participants { padding: 24px; }
.activity-title { margin: 12px 0 0; font-size: 44px; }
.activity-place { margin: 10px 0 0; font-size: 16px; }
.activity-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 24px 0 0; padding-top: 20px; border-top: 1px solid var(--color-line-soft); }
.activity-facts dt { font-size: 13px; color: var(--color-muted); }
.activity-facts dd { margin: 4px 0 0; font-weight: 700; }
.activity-organizer { display: flex; gap: 12px; margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--color-line-soft); }
.avatar-large { width: 44px; height: 44px; font-size: 16px; }
.avatar-muted { background: var(--color-line-soft); color: var(--color-muted); }
.activity-organizer-label { font-size: 14px; }
.activity-organizer-name { color: var(--color-ink); }
.activity-description { margin: 4px 0 0; font-size: 16px; line-height: 1.5; white-space: pre-line; }
.participant-list { list-style: none; margin: 0; padding: 0; }
.participant { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--color-line-soft); }
.participant-name { flex: 1; display: flex; flex-direction: column; font-weight: 700; }
.participant-detail { font-size: 13px; font-weight: 400; }
.participant-role { font-size: 13px; }
.avatar-open { width: 40px; height: 40px; border-radius: 50%; border: 2px dashed var(--color-control); flex-shrink: 0; }
.join-panel { flex: 1 1 300px; max-width: 360px; position: sticky; top: calc(var(--top-bar-height) + 24px); display: flex; flex-direction: column; padding: 24px; }
.join-count { font-size: 40px; }
.places-bar { display: grid; gap: 4px; margin-top: 14px; }
.places-bar span { height: 8px; border-radius: 4px; background: #E1E6E3; }
.places-bar .places-bar-taken { background: var(--color-action); }
.join-status { margin: 14px 0 0; font-size: 15px; font-weight: 700; }
.join-note { margin: 16px 0 0; font-size: 15px; }
.join-button { width: 100%; margin-top: 10px; }
.join-button-main { min-height: 52px; margin-top: 16px; font-size: 17px; }
.join-hint { margin: 12px 0 0; line-height: 1.5; }

/* Mijn activiteiten: what I organize, what I joined, and what is over. */
.mine-page { max-width: 860px; }
.mine-notice { margin-top: 20px; }
.mine-section { margin-top: 28px; }
.mine-heading { margin: 0 0 10px; font-size: 17px; font-weight: 700; }
.mine-heading .numbers { font-weight: 400; }
.mine-empty { margin: 0; }

/* Notifications: a panel under the bell, with rows like the activity lists; new ones get the green bar of a selected
   row. The backdrop catches clicks outside the panel, which close it. */
.notification-menu { position: relative; }
.notification-bell { border: 0; background: none; cursor: pointer; }
.notification-backdrop { position: fixed; inset: 0; z-index: 1; }
.notification-panel { position: absolute; top: calc(100% + 10px); right: 0; z-index: 2; width: 400px; max-height: min(70vh, 560px); overflow-y: auto; border: 1px solid var(--color-line); border-radius: var(--radius-panel); background: var(--color-panel); }
.notification-panel-header { position: sticky; top: 0; display: flex; align-items: baseline; justify-content: space-between; padding: 14px 16px 10px; border-bottom: 1px solid var(--color-line-soft); background: var(--color-panel); }
.notification-panel-header .section-title { margin: 0; }
.notification-panel-note { margin: 0; padding: 16px; font-size: 15px; }
.notification-list { margin: 0; padding: 0; list-style: none; }
.notification-list li + li { border-top: 1px solid var(--color-line-soft); }
.notification-row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; color: var(--color-ink); text-decoration: none; }
.notification-row:hover { color: var(--color-ink); background: var(--color-surface); }
.notification-row-new { background: var(--color-selected); box-shadow: inset 3px 0 0 var(--color-action); }
.notification-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.notification-what { font-weight: 600; }
.notification-row-new .notification-what { font-weight: 700; }
.notification-meta { font-size: 14px; color: var(--color-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notification-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.notification-new { font-size: 13px; font-weight: 700; color: var(--color-action); }

@media (max-width: 760px) {
    /* On a phone: a sheet over the full width, between the top and bottom bars. */
    .notification-menu { position: static; }
    .notification-panel { position: fixed; top: calc(var(--top-bar-height) + 6px); left: 8px; right: 8px; width: auto; max-height: calc(100dvh - var(--top-bar-height) - var(--bottom-bar-height) - 16px); }
}

/* Notification settings on the profile page: one row per kind, a column per channel. */
.notification-settings { border-top: 1px solid var(--color-line-soft); }
.notification-settings .hint { margin: 0 0 14px; }
.notification-settings-grid { display: grid; grid-template-columns: minmax(0, 1fr) 84px 84px; align-items: center; row-gap: 4px; }
.notification-settings-channel { font-size: 13px; font-weight: 700; color: var(--color-muted); text-align: center; }
.notification-settings-kind { padding: 8px 0; font-size: 15px; }
.notification-settings-grid input { justify-self: center; width: 20px; height: 20px; accent-color: var(--color-action); cursor: pointer; }
.notification-settings-result { min-height: 22px; margin: 10px 0 0; font-size: 14px; }
.chat-settings { border-top: 1px solid var(--color-line-soft); }
.chat-settings .hint { margin: 4px 0 0 26px; }

/* The chat of an activity: messages in a scrolling area, your own on the right, the green of actions for them. */
.chat { display: flex; flex-direction: column; padding: 20px 24px; }
.chat .section-title { margin: 0; }
.chat-header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.chat-connection { font-size: 13px; font-weight: 700; color: var(--color-signal); }
.chat-loading, .chat-locked p { margin: 0; }
.chat-messages { display: flex; flex-direction: column; gap: 6px; max-height: 420px; min-height: 120px; overflow-y: auto; padding: 4px 2px 8px; }
.chat-older { align-self: center; margin-bottom: 6px; font-size: 14px; }
.chat-empty { margin: auto 0; text-align: center; font-size: 15px; }
.chat-day { align-self: center; margin: 10px 0 4px; font-size: 12px; font-weight: 700; color: var(--color-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.chat-message { display: flex; flex-direction: column; align-items: flex-start; max-width: 78%; }
.chat-message-mine { align-self: flex-end; align-items: flex-end; }
.chat-sender { margin: 6px 0 2px 2px; font-size: 13px; font-weight: 700; }
.chat-bubble { margin: 0; padding: 8px 12px; border-radius: 14px 14px 14px 4px; background: var(--color-surface); border: 1px solid var(--color-line-soft); white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-message-mine .chat-bubble { border-radius: 14px 14px 4px 14px; background: var(--color-action-tint); border-color: transparent; }
.chat-message-pending .chat-bubble { opacity: 0.7; }
.chat-meta { margin: 2px 4px 0; font-size: 12px; color: var(--color-muted); }
.chat-status { margin-left: 3px; }
.chat-status-failed { color: var(--color-signal); font-weight: 700; }
.chat-meta .button-link { margin-left: 6px; font-size: 12px; }
.chat-typing { min-height: 20px; margin: 4px 0 0; font-size: 13px; font-style: italic; color: var(--color-muted); }
.chat-compose { display: flex; align-items: flex-end; gap: 10px; margin-top: 6px; }
.chat-input { flex: 1; min-height: 44px; height: auto; padding: 10px 12px; resize: vertical; font: inherit; }
.chat-counter { align-self: flex-end; margin-top: 4px; }
.chat-closed { margin: 8px 0 0; }

@media (max-width: 760px) {
    .chat { padding: 16px; }
    .chat-messages { max-height: 60dvh; }
    .chat-message { max-width: 88%; }
}

@media (max-width: 760px) {
    .notification-settings-grid { grid-template-columns: minmax(0, 1fr) 64px 64px; }
}
.notification-when { font-size: 13px; color: var(--color-muted); }

@media (max-width: 760px) {
    .plan-who { grid-template-columns: minmax(0, 1fr); }
    .plan-preview, .join-panel { position: static; max-width: none; }
    .activity-title { font-size: 32px; }
    .activity-summary, .activity-participants, .join-panel { padding: 18px; }
    .activity-facts { gap: 10px; }
    .activity-row { padding: 12px 16px; }
}

/* Safety: someone's profile with blocking and reporting, the report form, and the moderators' page. Destructive actions
   use the signal orange, the only other color with a meaning. */
.button-danger { border-color: var(--color-signal); color: var(--color-signal); }
.button-danger:hover { border-color: var(--color-signal); background: #FBF1EA; color: var(--color-signal); }
.button-link-danger { color: var(--color-signal); }
.person-page { max-width: 760px; }
.person-card { margin-top: 16px; padding: 24px; }
.person-header { display: flex; align-items: center; gap: 20px; }
.person-meta { margin: 6px 0 0; }
.person-bio { margin: 18px 0 0; font-size: 16px; line-height: 1.5; white-space: pre-line; }
.person-section-title { margin: 22px 0 8px; }
.person-sports { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 0; padding: 0; list-style: none; }
.person-sports li { display: inline-flex; align-items: center; gap: 8px; }
.person-languages { margin: 0; }
.person-self { margin-top: 16px; }
.person-safety { margin-top: 16px; padding: 18px 24px; }
.person-safety .join-note { margin-top: 0; }
.person-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.person-safety .person-actions:first-child { margin-top: 0; }
.participant-link { color: var(--color-ink); text-decoration: none; }
.participant-link:hover { color: var(--color-action); text-decoration: underline; }
.join-report { align-self: center; margin-top: 16px; font-size: 14px; color: var(--color-muted); }
.report-form { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--color-line-soft); }
.chat .report-form { margin-top: 8px; }
.report-form-title { font-size: 16px; }
.report-form-reasons { display: flex; flex-direction: column; margin: 0; padding: 0; border: 0; }
.report-form-reasons .check { min-height: 34px; }
.report-form-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.report-form-done { margin: 0; }
.chat-report { font-size: 12px; opacity: 0; }
.chat-message:hover .chat-report, .chat-report:focus-visible { opacity: 1; }
.chat-bubble-removed { font-style: italic; color: var(--color-muted); }
.blocked-people { border-top: 1px solid var(--color-line-soft); }
.blocked-list { margin: 0; padding: 0; list-style: none; }
.blocked-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; border-bottom: 1px solid var(--color-line-soft); }
.account-data { border-top: 1px solid var(--color-line-soft); }
.account-data .hint { margin: 0 0 12px; }
.account-delete { margin-top: 18px; }
.account-delete form { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.account-deleted-text { max-width: 560px; margin: 16px 0 24px; font-size: 16px; line-height: 1.5; }
.moderation-page { max-width: 860px; }
.moderation-switch { max-width: 320px; margin-top: 16px; }
.moderation-empty { margin-top: 20px; }
.moderation-list { display: flex; flex-direction: column; gap: 14px; margin: 20px 0 0; padding: 0; list-style: none; }
.report-card { padding: 18px 20px; }
.report-card-header { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.report-card-when { font-size: 14px; }
.report-card-count { font-size: 14px; font-weight: 700; }
.report-card-subject { margin: 10px 0 0; }
.report-card-content { margin: 10px 0 0; padding: 10px 14px; border-left: 3px solid var(--color-control); background: var(--color-surface); white-space: pre-wrap; overflow-wrap: anywhere; }
.report-card-note { margin: 10px 0 0; }
.report-card-outcome { margin: 12px 0 0; }
.report-card-note-input { margin-top: 14px; }
.report-card-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }

@media (max-width: 760px) {
    .chat-report { opacity: 1; }
    .person-header { flex-direction: column; align-items: flex-start; }
    .person-card, .person-safety { padding: 18px; }
}
.place-detail-hide { align-self: flex-start; margin-top: 14px; font-size: 14px; }
.place-detail-hide-note { margin: 14px 0 0; }
.moderation-hidden { margin-top: 36px; }

/* The visitor's own position on the map: blue, the one color no sport has, so it never looks like a place. */
:root { --color-me: #2F6FDB; }
.user-location { fill: var(--color-me); fill-opacity: 1; stroke: #FFFFFF; stroke-width: 3; }
.user-location-accuracy { fill: var(--color-me); fill-opacity: 0.12; stroke: var(--color-me); stroke-opacity: 0.3; stroke-width: 1; }
.map-locate {
    display: grid; place-items: center; width: 34px; height: 34px; padding: 0; cursor: pointer;
    border: 2px solid rgba(0, 0, 0, 0.2); border-radius: 4px; background: var(--color-panel); color: var(--color-action);
}
.map-locate:hover { background: var(--color-surface); }
