.app-top-header {
  padding: 0.35rem 0 !important;
  margin-bottom: 0.75rem;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: sticky;
  top: 0;
  z-index: 50;
}

.app-nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 38px;
  position: relative;
}

.brand-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  transition: opacity 0.15s ease;
}
.brand-logo:hover {
  opacity: 0.85;
  text-decoration: none;
}
.brand-logo-img {
  /* The PitchTag logo (app-icons/logo.svg, built by assets/brand/build_logo.php); the square app-icons/icon.svg stays the app icon and favicon */
  display: block;
  width: auto;
  height: 32px;
}

/* ---- Navigation (core/header.php): Home · Teams · Stats, ＋ New match, 🔔 panel, avatar menu; phones: bottom bar ---- */
.notification-bubble {
  background: #ef4444; color: #ffffff; font-size: 0.65rem; font-weight: 800; min-width: 16px; height: 16px; line-height: 16px;
  text-align: center; border-radius: 999px; padding: 0 4px; box-shadow: 0 0 6px rgba(239, 68, 68, 0.8); display: inline-block;
}
a.notification-bubble { text-decoration: none; }
.nav-main { display: flex; gap: 4px; margin: 0 auto 0 28px; }
.nav-link { padding: 5px 12px; font-size: 0.85rem; font-weight: 700; color: #94a3b8; border-radius: 6px; text-decoration: none; }
.nav-link:hover { color: #f8fafc; background: rgba(255, 255, 255, 0.06); text-decoration: none; }
.nav-link.active { color: #38bdf8; background: rgba(56, 189, 248, 0.12); }
.nav-right { display: flex; align-items: center; gap: 8px; }
.nav-new { width: auto; margin: 0; padding: 4px 12px; font-size: 0.8rem; font-weight: 700; }
.nav-guest { display: flex; align-items: center; gap: 6px; }
.nav-signup { width: auto; margin: 0; padding: 5px 12px; font-size: 0.8rem; }
.nav-pop { position: relative; margin: 0; }
.nav-pop > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 999px;
  border: 1px solid #334155; background: #111827; font-size: 0.85rem; color: #e2e8f0; }
.nav-pop > summary::-webkit-details-marker, .nav-pop > summary::marker { display: none; content: ""; }
.nav-pop > summary::after { display: none !important; }
.nav-pop[open] > summary { border-color: #38bdf8; }
.nav-bell > summary { padding: 4px 9px; font-size: 0.95rem; }
.nav-avatar { width: 24px; height: 24px; border-radius: 50%; background: linear-gradient(135deg, #0ea5e9, #10b981); color: #0b1120;
  display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 0.78rem; flex-shrink: 0; }
.nav-me-name { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.nav-panel { position: absolute; right: 0; top: calc(100% + 8px); width: 320px; max-height: 70vh; overflow-y: auto; z-index: 60; padding: 10px;
  background: #0f172a; border: 1px solid #334155; border-radius: 12px; box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55); }
.nav-panel-head { display: flex; justify-content: space-between; align-items: center; padding: 2px 4px 8px; font-size: 0.85rem; }
.nav-note { display: flex; gap: 10px; align-items: flex-start; padding: 8px; border-radius: 8px; color: #e2e8f0; text-decoration: none; font-size: 0.85rem; }
.nav-note:hover { background: rgba(255, 255, 255, 0.05); text-decoration: none; }
.nav-note small { display: block; color: #94a3b8; font-size: 0.75rem; }
.nav-note strong { font-size: 0.82rem; }
.nav-alert.unread { box-shadow: inset 3px 0 0 #fbbf24; background: rgba(251, 191, 36, 0.06); }
.nav-empty { color: #94a3b8; font-size: 0.85rem; margin: 8px 4px; }
.nav-read-all { width: 100%; margin: 6px 0 0; padding: 5px; font-size: 0.78rem; background: transparent; border: 1px dashed #475569; color: #cbd5e1; }
.nav-me-head { display: flex; justify-content: space-between; align-items: center; padding: 2px 4px 10px; border-bottom: 1px solid #1e293b; margin-bottom: 8px; }
.nav-me-head a { font-size: 0.8rem; }
.nav-me-label { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.06em; color: #64748b; margin: 4px 4px 6px; }
.nav-me-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.nav-me-grid a, .nav-me-links a { padding: 7px 8px; border-radius: 7px; color: #cbd5e1; text-decoration: none; font-size: 0.84rem; }
.nav-me-grid a:hover, .nav-me-links a:hover, .nav-me-grid a.active { background: rgba(255, 255, 255, 0.06); color: #f8fafc; }
.nav-me-links { display: flex; flex-direction: column; gap: 2px; margin-top: 8px; padding-top: 8px; border-top: 1px solid #1e293b; }
.nav-me-links .nav-signout { color: #f87171; }
.nav-bottom, .nav-sheet, .nav-sheet-backdrop { display: none; }

@media (max-width: 768px) {
  .nav-main, .nav-right .nav-new, .nav-me { display: none !important; }
  .app-top-header .brand-logo-img { height: 30px; }
  .nav-panel { position: fixed; left: 8px; right: 8px; top: 52px; width: auto; }
  /* Bottom bar: Home · Teams · ＋ · Stats · Me */
  body:has(.nav-bottom) { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .nav-bottom { display: grid; grid-template-columns: repeat(5, 1fr); align-items: end; position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); background: rgba(11, 17, 32, 0.96); backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px); border-top: 1px solid rgba(255, 255, 255, 0.08); }
  .nav-bottom > a, .nav-bottom > button { display: flex; flex-direction: column; align-items: center; gap: 2px; margin: 0; padding: 2px 0; width: auto;
    background: none; border: none; color: #94a3b8; font-size: 0.66rem; font-weight: 700; text-decoration: none; }
  .nav-bottom > a > span:first-child, .nav-bottom > button > span:first-child { font-size: 1.25rem; line-height: 1.2; }
  .nav-bottom .active { color: #38bdf8; }
  .nav-bottom .nav-avatar { width: 26px; height: 26px; font-size: 0.8rem; }
  .nav-bottom .nav-plus { align-self: center; }
  .nav-bottom .nav-plus span { width: 48px; height: 48px; border-radius: 50%; display: flex !important; align-items: center; justify-content: center; margin-top: -18px;
    background: linear-gradient(135deg, #0ea5e9, #10b981); color: #0b1120; font-size: 1.7rem !important; font-weight: 800; box-shadow: 0 6px 18px rgba(14, 165, 233, 0.45); }
  .nav-sheet-backdrop:not([hidden]) { display: block; position: fixed; inset: 0; z-index: 75; background: rgba(0, 0, 0, 0.5); }
  .nav-sheet:not([hidden]) { display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 80; max-height: 80vh; overflow-y: auto;
    padding: 8px 16px calc(16px + env(safe-area-inset-bottom)); background: #0f172a; border-top: 1px solid #334155; border-radius: 16px 16px 0 0;
    box-shadow: 0 -12px 30px rgba(0, 0, 0, 0.5); }
  .nav-sheet-grip { width: 40px; height: 4px; border-radius: 4px; background: #334155; margin: 2px auto 12px; }
  .nav-game { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid #1e293b; }
  .nav-game > span { flex: 1; min-width: 0; }
  .nav-game small { display: block; color: #94a3b8; font-size: 0.75rem; }
  .nav-game [role="button"], .nav-sheet-actions [role="button"] { width: auto; margin: 0; padding: 6px 12px; font-size: 0.82rem; }
  .nav-sheet-actions { display: flex; gap: 8px; margin-top: 12px; }
  .nav-sheet-actions [role="button"] { flex: 1; text-align: center; }
}

/* ---- Match navigation (render_match_nav): same bar on every match page ---- */
.match-nav {
  display: inline-flex; align-items: center; flex-wrap: wrap; gap: 2px;
  background: #090d16; border: 1px solid #334155; border-radius: 6px; padding: 2px;
  max-width: 100%;
}
.match-nav-item {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  height: 26px; padding: 3px 9px; box-sizing: border-box;
  font-size: 0.73rem; font-weight: 600; line-height: 1.2; white-space: nowrap;
  color: #cbd5e1; background: transparent; text-decoration: none;
  border: 1px solid transparent; border-radius: 4px; margin: 0;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.match-nav-item:hover { background: #1e293b; color: #ffffff; border-color: #475569; text-decoration: none; }
.match-nav-item.active { background: rgba(56, 189, 248, 0.15); border-color: #38bdf8; color: #38bdf8; }
.match-nav-item.back { color: #94a3b8; }
.match-nav-item.back::after { content: ""; width: 1px; height: 14px; background: #334155; margin-left: 9px; }
.match-nav-item.disabled { opacity: 0.4; cursor: not-allowed; }
.match-nav-item.disabled:hover { background: transparent; border-color: transparent; color: #cbd5e1; }
/* compact variant inside match tables */
.match-nav-row { background: transparent; border: none; padding: 0; flex-wrap: nowrap; }
.match-nav-row .match-nav-item { border-color: #334155; }

@media (max-width: 600px) {
  .match-nav-bar { display: flex; width: 100%; }
  .match-nav-bar .match-nav-item { flex: 1 1 auto; height: 32px; font-size: 0.78rem; }
}

/* View-only marker after a team name (team the user was invited to) */
.team-ro-mark { font-size: 0.8em; opacity: 0.75; cursor: help; }
/* "Viewer" / "Editor" after the name of a team the user was invited to (team_access_mark) */
.team-access-badge { display: inline-block; vertical-align: middle; margin-left: 4px; padding: 1px 7px; border-radius: 999px; border: 1px solid;
                     font-size: 0.6rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; line-height: 1.5; cursor: help; white-space: nowrap; }
h1 .team-access-badge, h2 .team-access-badge, h3 .team-access-badge { font-size: 0.7rem; }
.team-access-badge.viewer { color: #94a3b8; border-color: #475569; }
.team-access-badge.editor { color: #38bdf8; border-color: rgba(56, 189, 248, 0.5); }

/* Tagging completeness pill: --tp-hue goes from 0 (red, 0%) to 120 (green, 100%) */
.tag-progress {
  display: inline-block; padding: 1px 7px; border-radius: 999px; font-size: 0.72rem; font-weight: 700;
  white-space: nowrap; cursor: help; line-height: 1.5;
  color: hsl(var(--tp-hue), 75%, 62%);
  background: hsla(var(--tp-hue), 75%, 45%, 0.16);
  border: 1px solid hsla(var(--tp-hue), 75%, 50%, 0.55);
}

/* A game with tagging reminders off (match.no_tagging), and the 🔕 / 🔔 switch next to the badge */
.tag-progress.tag-skip { color: #94a3b8; background: rgba(148, 163, 184, 0.12); border-color: rgba(148, 163, 184, 0.4); }
.tag-status { white-space: nowrap; }
.tag-skip-btn { width: auto; margin: 0; padding: 0 4px; font-size: 0.72rem; line-height: 1.4; background: transparent; border: 1px solid transparent; border-radius: 6px; opacity: 0.55; }
.tag-skip-btn:hover, .tag-skip-btn:focus-visible { opacity: 1; border-color: #334155; background: transparent; }

/* Season timeline (render_season_timeline) */
.season-timeline {
  position: relative; width: 100%; margin: 6px 0 4px; border-radius: 6px;
  background: rgba(255, 255, 255, 0.03); border: 1px solid var(--pico-muted-border-color); overflow: hidden;
}
.season-year { position: absolute; top: 0; bottom: 0; border-left: 1px dashed rgba(148, 163, 184, 0.35); }
.season-year span { position: absolute; bottom: 2px; left: 4px; font-size: 0.65rem; color: #94a3b8; }
.season-bar {
  position: absolute; height: 24px; border-radius: 5px; padding: 0 6px; overflow: hidden; white-space: nowrap;
  text-overflow: ellipsis; font-size: 0.72rem; font-weight: 700; line-height: 24px; color: #fff !important;
  text-decoration: none !important; opacity: 0.85; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}
a.season-bar:hover, .season-bar.active { opacity: 1; outline: 2px solid #f8fafc; outline-offset: -2px; }
.season-match { position: absolute; bottom: 16px; width: 5px; height: 5px; margin-left: -2px; border-radius: 50%; background: #e2e8f0; opacity: 0.7; }
.season-today { position: absolute; top: 0; bottom: 0; width: 2px; background: #f59e0b; }
.period-selector select { margin: 0; padding: 6px 12px; font-size: 0.9rem; min-width: 180px; cursor: pointer; }

/* Seasons editor (manage_teams.php) */
.season-rows { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.season-row { display: grid; grid-template-columns: minmax(120px, 1.4fr) 1fr 1fr 80px auto auto; gap: 6px; align-items: center; margin: 0; }
.season-row input { margin: 0; padding: 6px 8px; font-size: 0.85rem; height: auto; }
.season-row button { margin: 0; padding: 6px 12px; font-size: 0.8rem; }
.season-row .season-del { border: none; color: #ef4444; padding: 6px 8px; }
.season-row.new { padding-top: 8px; border-top: 1px dashed var(--pico-muted-border-color); }
.season-count { color: var(--pico-muted-color); font-size: 0.75rem; text-align: center; }
@media (max-width: 720px) {
  .season-row { grid-template-columns: 1fr 1fr; }
  .season-row input[name="season_name"] { grid-column: 1 / -1; }
}

/* manage_teams.php */
.view-only-badge { font-size: 0.75rem; color: var(--pico-muted-color); border: 1px solid var(--pico-muted-border-color); border-radius: 4px; padding: 1px 6px; }
.public-form-switch { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.public-form-switch input[role="switch"] { margin: 0; }

/* Contact page */
.contact-notice { border-radius: 6px; padding: 0.6rem 1rem; margin-bottom: 1rem; font-size: 0.88rem; }
.contact-notice.ok { background: rgba(16, 185, 129, 0.12); border: 1px solid #10b981; color: #6ee7b7; }
.contact-notice.err { background: rgba(239, 68, 68, 0.12); border: 1px solid #ef4444; color: #fca5a5; }
.contact-notice.info { background: rgba(56, 189, 248, 0.10); border: 1px solid #38bdf8; color: #bae6fd; }
.contact-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* Account page */
.app-user-link { color: inherit; text-decoration: none; }
.app-user-link:hover { color: #38bdf8; text-decoration: underline; }
.account-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--pico-spacing); }
.account-grid > article { margin: 0; }
.account-switch { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 1rem; cursor: pointer; }
.account-switch input[role="switch"] { margin-top: 3px; flex-shrink: 0; }
.account-switch small { display: block; color: var(--pico-muted-color); font-size: 0.78rem; }
.account-pending { font-size: 0.85rem; padding: 0.5rem 0.75rem; border-left: 3px solid #f59e0b; background: rgba(245, 158, 11, 0.08); }
.account-danger { margin-top: var(--pico-spacing); border: 1px solid rgba(239, 68, 68, 0.45); }
.account-delete-row { display: flex; gap: 8px; flex-wrap: wrap; }
.account-delete-row input { flex: 1; min-width: 200px; margin: 0; }
.account-delete-row button { margin: 0; background: #b91c1c; border-color: #b91c1c; }
@media (max-width: 768px) { .account-grid { grid-template-columns: 1fr; } }

/* Claiming / merging teams (manage_teams.php) */
.claim-list { display: flex; flex-direction: column; gap: 6px; }
.claim-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0; padding: 6px 10px; border: 1px solid var(--pico-muted-border-color); border-radius: 6px; font-size: 0.85rem; }
.claim-row small { display: block; color: var(--pico-muted-color); font-size: 0.72rem; }
.claim-row button { margin: 0; padding: 4px 12px; font-size: 0.8rem; width: auto; }
label.claim-row { justify-content: flex-start; cursor: pointer; }
label.claim-row input[type="checkbox"] { margin: 0; }
.opp-rename { display: flex; align-items: center; gap: 6px; margin: 0; flex: 1; }
.opp-rename small { min-width: 48px; color: var(--pico-muted-color); }
.opp-rename input[type="text"] { margin: 0; padding: 4px 8px; height: auto; font-size: 0.85rem; }

/* Calendars (manage_calendars.php) and calendar notifications */
.cal-list { list-style: none; padding: 0; margin: 8px 0 0; }
.cal-list li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 6px; border-bottom: 1px solid rgba(255,255,255,0.05); list-style: none; border-radius: 4px; }
.cal-list li.active { background: rgba(56, 189, 248, 0.08); }
.cal-list small { display: block; color: var(--pico-muted-color); font-size: 0.72rem; }
.cal-new-badge { display: inline-block; margin-left: 6px; padding: 0 7px; border-radius: 999px; background: #0284c7; color: #fff; font-size: 0.68rem; font-weight: 700; }
.cal-del { padding: 2px 6px !important; font-size: 0.75rem; border: none !important; color: #ef4444 !important; margin: 0; }
.cal-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.cal-tabs { display: flex; gap: 4px; margin-bottom: 10px; border-bottom: 1px solid var(--pico-muted-border-color); }
.cal-tabs a { padding: 6px 12px; font-size: 0.85rem; text-decoration: none; color: var(--pico-muted-color); border-bottom: 2px solid transparent; }
.cal-tabs a.active { color: #38bdf8; border-bottom-color: #38bdf8; }
.cal-tabs small { opacity: 0.7; }
.cal-table td { vertical-align: top; font-size: 0.85rem; padding: 8px 6px; }
.cal-table small { display: block; color: var(--pico-muted-color); font-size: 0.75rem; }
.cal-table tr.ignored td { opacity: 0.6; }
.cal-when { white-space: nowrap; }
.cal-reason { font-style: italic; }
.cal-change { color: #fbbf24 !important; }
.cal-actions-row { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.cal-act { margin: 0; display: inline; }
.cal-act button, a.cal-act-link { margin: 0; padding: 3px 10px; font-size: 0.78rem; width: auto; white-space: nowrap; }
.notif-card { margin-bottom: var(--pico-spacing); border: 1px solid rgba(56, 189, 248, 0.35); }
.notif-count { display: inline-block; margin-left: 4px; padding: 0 8px; border-radius: 999px; background: #ef4444; color: #fff; font-size: 0.75rem; }
.notif-table { margin: 0; }
.notif-table td { vertical-align: middle; font-size: 0.88rem; }
.notif-table small { display: block; color: var(--pico-muted-color); font-size: 0.78rem; }
.notif-icon { width: 34px; font-size: 1.1rem; text-align: center; }
.notif-actions { text-align: right; white-space: nowrap; }

/* "Manage" dropdown in the header (replaces the old Settings page) */
.nav-dropdown { position: relative; margin: 0 !important; padding: 0; border: 0; display: flex; align-items: center; }  /* flex: no 30px line box pushing the label down */
/* Pico spaces every <details> and open summary; keep the label in line with the other menu links */
.nav-dropdown > summary { list-style: none; cursor: pointer; user-select: none; margin: 0 !important; display: inline-flex; align-items: center; }
.nav-dropdown[open] > summary { margin-bottom: 0 !important; }
.nav-dropdown > summary::-webkit-details-marker { display: none; }
/* One arrow only: switch off Pico's own chevron image on details > summary and draw a small ▾ instead */
.nav-dropdown > summary::after {
  content: '▾'; display: inline-block; float: none; width: auto; height: auto; margin: 0 0 0 4px;
  background-image: none; transform: none; font-size: 0.75em; opacity: 0.8; transition: transform 0.15s ease;
}
.nav-dropdown[open] > summary::after { transform: rotate(180deg); }
.nav-dropdown > ul {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 1000; min-width: 190px; margin: 0; padding: 6px;
  list-style: none; background: #0f172a; border: 1px solid #334155; border-radius: 8px; box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5);
}
.nav-dropdown > ul li { list-style: none; margin: 0; padding: 0; }
.nav-dropdown > ul a {
  display: block; padding: 7px 12px; border-radius: 6px; font-size: 0.88rem; color: #e2e8f0; text-decoration: none; white-space: nowrap;
}
.nav-dropdown > ul a:hover, .nav-dropdown > ul a.active { background: rgba(56, 189, 248, 0.14); color: #38bdf8; }
a.notification-bubble { text-decoration: none; }
@media (max-width: 768px) {
  .nav-dropdown { width: 100%; }
  .nav-dropdown > ul { position: static; box-shadow: none; border: none; background: transparent; padding: 0 0 0 12px; }
}

/* Dashboard month calendar (render_team_month_calendar) */
.mcal-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.mcal-head strong { font-size: 1.05rem; min-width: 150px; text-align: center; }
.mcal-head small { margin-left: auto; color: var(--pico-muted-color); }
.mcal-nav { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; height: 30px; padding: 0 10px; border: 1px solid #334155; border-radius: 6px; text-decoration: none; color: #e2e8f0; font-weight: 700; }
.mcal-nav:hover { border-color: #38bdf8; color: #38bdf8; }
.mcal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.mcal-wd { text-align: center; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--pico-muted-color); padding: 2px 0; }
.mcal-day { min-height: 92px; padding: 4px; border-radius: 6px; background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.05); display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.mcal-day.other { opacity: 0.45; }
.mcal-day.today { border-color: #38bdf8; box-shadow: inset 0 0 0 1px rgba(56, 189, 248, 0.35); }
.mcal-num { font-size: 0.75rem; color: #94a3b8; font-weight: 700; }
.mcal-day.today .mcal-num { color: #38bdf8; }
.mcal-dow, .mcal-mon { display: none; }
.mcal-match {
  display: flex; flex-direction: column; gap: 1px; padding: 3px 5px; border-radius: 5px; text-decoration: none !important;
  font-size: 0.7rem; line-height: 1.2; color: #f1f5f9; border-left: 3px solid #64748b; background: rgba(148, 163, 184, 0.12); min-width: 0;
}
.mcal-match:hover { filter: brightness(1.25); }
.mcal-score { font-weight: 800; font-size: 0.78rem; }
.mcal-opp { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #cbd5e1; }
.mcal-match.win { border-left-color: #10b981; background: rgba(16, 185, 129, 0.16); }
.mcal-match.win .mcal-score { color: #34d399; }
.mcal-match.draw { border-left-color: #94a3b8; background: rgba(148, 163, 184, 0.16); }
.mcal-match.draw .mcal-score { color: #e2e8f0; }
.mcal-match.loss { border-left-color: #ef4444; background: rgba(239, 68, 68, 0.16); }
.mcal-match.loss .mcal-score { color: #f87171; }
.mcal-match.upcoming { border-left-color: #38bdf8; background: rgba(56, 189, 248, 0.12); }
.mcal-match.upcoming .mcal-score { color: #7dd3fc; font-weight: 700; }
.mcal-match.unknown { opacity: 0.75; font-style: italic; }
/* A competition the team is registered for (team_competition_calendar_days): a placeholder, not a game */
.mcal-match.comp { border-left-color: #f59e0b; border-left-style: dashed; background: rgba(245, 158, 11, 0.12); }
.mcal-match.comp .mcal-score { color: #fbbf24; font-weight: 700; }
.mcal-legend { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; font-size: 0.72rem; color: var(--pico-muted-color); }
.mcal-legend span::before { content: ''; display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 5px; vertical-align: middle; background: #64748b; }
.mcal-legend .win::before { background: #10b981; } .mcal-legend .draw::before { background: #94a3b8; }
.mcal-legend .loss::before { background: #ef4444; } .mcal-legend .upcoming::before { background: #38bdf8; }
.mcal-legend .comp::before { background: #f59e0b; }

/* Phones: the month becomes a list of the days that have matches */
@media (max-width: 640px) {
  .mcal-grid { display: flex; flex-direction: column; gap: 6px; }
  .mcal-wd, .mcal-day.empty { display: none; }
  /* date on the left, that day's matches stacked on the right */
  .mcal-day { min-height: 0; display: grid; grid-template-columns: 78px minmax(0, 1fr); align-items: start; gap: 0 8px; padding: 6px 8px; }
  .mcal-day > .mcal-match + .mcal-match { margin-top: 4px; }
  .mcal-num { grid-row: 1 / span 9; }
  .mcal-day > .mcal-match { grid-column: 2; }
  .mcal-day.other { opacity: 0.6; }
  .mcal-num { min-width: 78px; }
  .mcal-dow, .mcal-mon { display: inline; }
  .mcal-match { font-size: 0.8rem; }
  .mcal-day:not(:has(.mcal-match)) { display: none; }
}
.mcal-none { margin: 8px 0 0; font-size: 0.82rem; color: var(--pico-muted-color); text-align: center; }
.score-final { white-space: nowrap; }
.score-upcoming { color: var(--pico-muted-color); font-weight: 600; letter-spacing: 0.04em; }
.shared-entry { color: var(--pico-muted-color); font-size: 0.75rem; }
.kit-icon { display: inline-block; vertical-align: -3px; margin: 0 4px; flex-shrink: 0; }

/* Jersey picker (js/kits.js) */
.kit-picker { margin: 4px 0 10px; }
.kit-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.kit-choice {
  display: inline-flex; align-items: center; gap: 2px; margin: 0; padding: 3px 10px 3px 4px; width: auto;
  font-size: 0.78rem; background: #1e293b; border: 1px solid #334155; color: #e2e8f0; border-radius: 999px; cursor: pointer;
}
.kit-choice.kit-other { padding-left: 10px; }
.kit-choice.selected { border-color: #38bdf8; background: rgba(56, 189, 248, 0.15); color: #ffffff; }
.kit-palette { display: flex; flex-wrap: wrap; gap: 7px; margin: 4px 0 6px; }
.kit-dot {
  width: 26px; height: 26px; min-width: 26px; padding: 0; margin: 0; border-radius: 50%; cursor: pointer;
  border: 2px solid rgba(226, 232, 240, 0.35); box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.35);
}
.kit-dot:hover { transform: scale(1.12); }
.kit-dot.selected { border-color: #38bdf8; box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.45); }
.kit-none { margin: 0; padding: 2px 8px; width: auto; font-size: 0.72rem; background: transparent; border: 1px dashed #475569; color: #94a3b8; border-radius: 6px; cursor: pointer; }
.kit-none.selected { border-style: solid; }

/* Jerseys card (manage_teams.php) */
.jersey-list { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 1rem; }
.jersey-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--pico-muted-border-color); border-radius: 8px; min-width: 220px; }
.jersey-item.is-default { border-color: rgba(56, 189, 248, 0.6); }
.jersey-meta { flex: 1; line-height: 1.2; }
.jersey-meta small { display: block; color: #38bdf8; font-size: 0.72rem; }
.jersey-actions { display: flex; gap: 4px; }
.jersey-actions button { margin: 0; padding: 3px 8px; font-size: 0.75rem; width: auto; }
.jersey-del { border: none !important; color: #ef4444 !important; }
.jersey-add { display: grid; grid-template-columns: minmax(160px, 1fr) 2fr 2fr auto; gap: 12px; align-items: start; border-top: 1px dashed var(--pico-muted-border-color); padding-top: 12px; }
.jersey-add label { margin: 0; font-size: 0.85rem; }
.jersey-add input[type="text"] { margin: 4px 0 0; }
.jersey-add button[type="submit"] { margin: 18px 0 0; width: auto; }
.jersey-label { display: block; color: var(--pico-muted-color); font-size: 0.78rem; margin-bottom: 4px; }
@media (max-width: 900px) { .jersey-add { grid-template-columns: 1fr; } .jersey-add button[type="submit"] { margin-top: 0; } }
.kit-label { display: block; color: var(--pico-muted-color); font-size: 0.72rem; margin: 6px 0 2px; }
.member-role-select { margin: 0 0 0 4px; width: auto; padding: 1px 6px; height: auto; font-size: 0.72rem; }
.member-create-toggle { display: inline-flex; align-items: center; gap: 4px; margin: 0; font-size: 0.72rem; color: var(--pico-muted-color); cursor: pointer; white-space: nowrap; }
.member-create-toggle input { margin: 0; width: 0.95rem; height: 0.95rem; }
.admin-access-add { display: grid; grid-template-columns: 2fr 1fr auto; gap: 8px; align-items: center; margin-top: 0.75rem; }
.admin-access-add select, .admin-access-add button { margin: 0; }
@media (max-width: 720px) { .admin-access-add { grid-template-columns: 1fr; } }

/* "Go tag it" cards (render_promo_card) */
.promo-card {
  display: flex; align-items: center; gap: 14px; margin: 0 0 var(--pico-spacing); padding: 12px 14px 12px 16px; position: relative;
  border-radius: 10px; border: 1px solid rgba(56, 189, 248, 0.35);
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.18), rgba(16, 185, 129, 0.10));
}
.promo-icon { font-size: 1.8rem; line-height: 1; }
.promo-text { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.promo-text strong { color: #f8fafc; font-size: 0.98rem; }
.promo-text span { color: #cbd5e1; font-size: 0.85rem; }
.promo-cta { margin: 0; padding: 6px 14px; font-size: 0.85rem; white-space: nowrap; }
.promo-close { position: absolute; top: 4px; right: 6px; margin: 0; padding: 0 6px; width: auto; background: transparent; border: none; color: #94a3b8; font-size: 0.8rem; cursor: pointer; }
.promo-close:hover { color: #f8fafc; }
@media (max-width: 640px) {
  .promo-card { flex-wrap: wrap; }
  .promo-cta { width: 100%; text-align: center; }
}

/* Admin: cards tab */
.promo-admin-list { display: flex; flex-direction: column; gap: 12px; }
.promo-admin-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(220px, 1fr); gap: 12px; align-items: center; padding-bottom: 12px; border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.promo-admin-row.inactive .promo-admin-preview { opacity: 0.4; filter: grayscale(1); }
.promo-admin-meta small { color: var(--pico-muted-color); display: block; margin-bottom: 6px; word-break: break-all; }
.promo-admin-actions { display: flex; gap: 6px; align-items: flex-start; flex-wrap: wrap; }
.promo-admin-actions button, .promo-admin-actions summary { margin: 0; padding: 3px 10px; font-size: 0.78rem; width: auto; }
.promo-admin-actions details { margin: 0; }
.promo-form { display: grid; grid-template-columns: 110px 1fr 1fr; gap: 6px 10px; margin-top: 8px; align-items: end; }
.promo-form label { margin: 0; font-size: 0.78rem; }
.promo-form label.wide { grid-column: span 2; }
.promo-form label.chk { display: flex; align-items: center; gap: 6px; }
.promo-form input { margin: 2px 0 0; padding: 5px 8px; height: auto; font-size: 0.85rem; }
.promo-form button { margin: 0; width: auto; }
@media (max-width: 760px) { .promo-admin-row { grid-template-columns: 1fr; } .promo-form { grid-template-columns: 1fr; } .promo-form label.wide { grid-column: auto; } }

/* "Get the app" banner (index.php, js/ui.js) */
.app-banner {
  display: flex; align-items: center; gap: 12px; margin: 0 0 var(--pico-spacing); padding: 10px 34px 10px 12px; position: relative;
  border-radius: 10px; border: 1px solid rgba(56, 189, 248, 0.35); background: rgba(2, 132, 199, 0.14);
}
.app-banner[hidden] { display: none; }
.app-banner img { border-radius: 10px; flex: none; }
.app-banner-text { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.app-banner-text strong { color: #f8fafc; font-size: 0.95rem; }
.app-banner-text span { color: #cbd5e1; font-size: 0.83rem; }
.app-banner-cta { margin: 0; padding: 6px 14px; font-size: 0.85rem; white-space: nowrap; width: auto; }
.app-banner-cta[hidden] { display: none; }
.app-banner-close { position: absolute; top: 4px; right: 6px; margin: 0; padding: 0 6px; width: auto; background: transparent; border: none; color: #94a3b8; font-size: 0.8rem; cursor: pointer; }
.app-banner-close:hover { color: #f8fafc; }
@media (max-width: 640px) {
  .app-banner { flex-wrap: wrap; }
  .app-banner-text { flex-basis: calc(100% - 56px); }
  .app-banner-cta { margin-left: 56px; }
}

/* Team bar (render_team_bar): team picker + team navigation under the header */
@media (max-width: 640px) {
          }

/* ⋯ match actions in tables (render_match_nav 'menu', js/ui.js) */
.row-menu { display: inline-block; }
.row-menu-btn { margin: 0; width: auto; padding: 0 10px; height: 28px; line-height: 1; font-size: 1.15rem; font-weight: 700; letter-spacing: 1px;
                background: transparent; border: 1px solid #334155; color: #cbd5e1; border-radius: 6px; }
.row-menu-btn:hover, .row-menu-btn[aria-expanded="true"] { background: #1e293b; color: #fff; border-color: #475569; }
.row-menu-list { position: fixed; z-index: 1000; min-width: 190px; padding: 6px; background: #0f172a; border: 1px solid #334155;
                 border-radius: 8px; box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5); text-align: left; }
.row-menu-list[hidden] { display: none; }
.row-menu-list a { display: block; padding: 7px 12px; border-radius: 6px; font-size: 0.88rem; color: #e2e8f0; text-decoration: none; white-space: nowrap; }
.row-menu-list a:hover { background: rgba(56, 189, 248, 0.14); color: #38bdf8; }

/* Competition names link to competition.php (competition_link_html) */
a.comp-link { color: inherit; text-decoration: underline dotted rgba(148, 163, 184, 0.6); text-underline-offset: 3px; }
a.comp-link:hover { color: #38bdf8; text-decoration-color: #38bdf8; }

/* manage_competitions.php: standings rules */
.comp-rules { margin: 0.4rem 0 1rem; padding: 10px 12px; border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 8px; }
.comp-points { display: flex; gap: 10px; }
.comp-points label { flex: 1; font-size: 0.85rem; margin: 0; }
.comp-points input { margin: 2px 0 0; padding: 4px 8px; height: auto; }
.comp-edition { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr) auto; gap: 8px; align-items: end; margin: 0 0 8px; }
.comp-edition label { font-size: 0.8rem; margin: 0; min-width: 0; }
.comp-edition input { margin: 2px 0 0; padding: 4px 8px; height: auto; }
.comp-edition-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.comp-edition-actions button { width: auto; margin: 0; padding: 4px 10px; font-size: 0.8rem; }
.comp-edition-new { padding-top: 8px; border-top: 1px dashed #334155; }
@media (max-width: 768px) { .comp-edition { grid-template-columns: minmax(0, 1fr); } }
.comp-rules-help { display: block; color: var(--pico-muted-color); font-size: 0.75rem; margin: 6px 0; }
.comp-cross { display: block; margin: 10px 0 0; font-size: 0.85rem; cursor: pointer; }
.tb-list { list-style: none; margin: 0; padding: 0; }
.tb-list li { list-style: none; display: flex; align-items: center; gap: 8px; padding: 4px 8px; margin: 0 0 4px; border: 1px solid #334155; border-radius: 6px; background: #0f172a; cursor: grab; }
.tb-list li.dragging { opacity: 0.4; }
.tb-list label { flex: 1; margin: 0; font-size: 0.85rem; cursor: pointer; }
.tb-list label input { margin: 0 6px 0 0; }
.tb-grip { color: #475569; font-size: 0.8rem; letter-spacing: -2px; }
.tb-move { display: flex; gap: 2px; }
.tb-move button { margin: 0; width: auto; padding: 0 7px; font-size: 0.8rem; background: transparent; border: 1px solid #334155; color: #94a3b8; }
.tb-move button:hover { color: #f8fafc; border-color: #475569; }
.tb-list li:first-child .tb-up, .tb-list li:last-child .tb-down { visibility: hidden; }

/* Dashboard: summary cards with the site news beside them (render_announcements) */
.dash-top { margin-bottom: var(--pico-spacing); }
.dash-top .dash-stats { margin: 0; }
.dash-top .dash-stats > article { margin: 0; display: flex; flex-direction: column; justify-content: center; }
.dash-top.with-news { display: grid; grid-template-columns: minmax(0, 3fr) minmax(260px, 2fr); gap: var(--pico-spacing); align-items: start; }
@media (max-width: 1000px) { .dash-top.with-news { grid-template-columns: 1fr; } }
.news-card { margin: 0 0 var(--pico-spacing); padding: 0.75rem 1rem; max-height: 340px; overflow-y: auto; border: 1px solid rgba(56, 189, 248, 0.35); }
.dash-top .news-card { margin: 0; }
.news-card > header { margin: -0.75rem -1rem 0.6rem; padding: 0.45rem 1rem; }
.news-item { display: flex; gap: 12px; align-items: flex-start; }
.news-item + .news-item { margin-top: 0.8rem; padding-top: 0.8rem; border-top: 1px solid rgba(255, 255, 255, 0.07); }
.news-item .promo-icon { font-size: 1.6rem; }
.news-text { flex: 1; min-width: 0; }
.news-text > strong { color: #f8fafc; font-size: 0.95rem; display: block; }
.news-date { color: var(--pico-muted-color); font-size: 0.72rem; }
.news-body { color: #cbd5e1; font-size: 0.86rem; line-height: 1.45; margin-top: 4px; }
.news-body p, .news-body ul { margin: 0 0 0.5rem; }
.news-body p:last-child, .news-body ul:last-child { margin-bottom: 0; }
.news-body ul { padding-left: 1.1rem; }
.news-body li { list-style: disc; margin: 0; }
.news-cta { display: inline-block; margin-top: 0.5rem; padding: 4px 12px; font-size: 0.8rem; }
.news-preview { max-height: none; margin: 0; }
.promo-form label.full { grid-column: 1 / -1; }
.promo-form textarea { margin: 2px 0 0; font-size: 0.85rem; min-height: 120px; }

/* Icon picker (js/icon-picker.js): a button next to an <input data-icon-picker> opens a searchable grid */
.icon-pick-wrap { display: flex; gap: 4px; align-items: stretch; position: relative; }
.icon-pick-wrap input { flex: 1; min-width: 0; }
.icon-pick-btn { margin: 2px 0 0 !important; padding: 0 8px !important; width: auto !important; font-size: 0.85rem; }
.icon-pick-pop { position: absolute; z-index: 1000; top: calc(100% + 4px); left: 0; width: 300px; max-width: 90vw; background: #0f172a; border: 1px solid #334155; border-radius: 8px; padding: 8px; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6); }
.icon-pick-pop input[type="search"] { margin: 0 0 6px; padding: 4px 8px; height: auto; font-size: 0.82rem; }
.icon-pick-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; max-height: 210px; overflow-y: auto; }
.icon-pick-grid button { margin: 0; padding: 4px 0; font-size: 1.25rem; line-height: 1.2; background: transparent; border: 1px solid transparent; border-radius: 4px; cursor: pointer; }
.icon-pick-grid button:hover, .icon-pick-grid button:focus { background: #1e293b; border-color: #38bdf8; }
.icon-pick-empty { grid-column: 1 / -1; color: #94a3b8; font-size: 0.8rem; text-align: center; padding: 8px 0; }

/* Club form (manage_clubs.php): logo preview + upload */
.club-logo-field { display: flex; gap: 14px; align-items: flex-start; margin-bottom: var(--pico-spacing); }
.club-logo-field > div { flex: 1; min-width: 0; }
/* Fixed 64 px preview, whatever the logo's shape */
.club-logo-preview { flex: 0 0 64px; width: 64px; height: 64px; display: flex; align-items: center; justify-content: center;
                     border: 1px solid var(--pico-muted-border-color); border-radius: 8px; background: rgba(255, 255, 255, 0.03); overflow: hidden; }
.club-logo-preview > img, .club-logo-preview > span { width: 56px !important; height: 56px !important; margin: 0 !important; }
.club-logo-field input[type="file"] { margin-bottom: 0; }
.club-logo-field small { display: block; margin-top: 8px; line-height: 1.4; }
.club-logo-remove { margin-top: 6px; font-size: 0.85rem; }

/* Layout columns may shrink below their content's width, so a wide table scrolls inside its card instead of
   pushing the card off the screen (a grid item's default min-width is its content) */
.grid > *, .season-split > *, .setup-grid > *, .conn-layout > *, .insights-split > *, .dash-top > *, .match-bottom-grid > * { min-width: 0; }

/* ---------------------------------------------------------------- phones: one column */
@media (max-width: 768px) {
  /* Pico stacks .grid on phones, but pages that set their own columns inline (manage pages: "1fr 2fr") kept them */
  .grid[style*="grid-template-columns"] { grid-template-columns: 1fr !important; }
  /* Tab bars (admin): one row that scrolls sideways instead of squeezing the labels */
  .tabs-nav { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; scrollbar-width: thin; scrollbar-color: #334155 transparent; }
  .tabs-nav > * { flex: 0 0 auto; white-space: nowrap; }
}

/* ---------------------------------------------------------------- large tables (js/ui.js: sticky tables)
   Every data table in <main> scrolls inside its own box (at most about a screen tall), so its header row and first
   column stay visible. --sticky-bg is the opaque colour behind the table, measured by ui.js. Opt out: .no-sticky;
   keep two columns: data-sticky-cols="2". */
.table-scroll { overflow: auto; max-height: calc(100vh - 110px); max-height: calc(100dvh - 110px); -webkit-overflow-scrolling: touch;
                scrollbar-width: thin; scrollbar-color: #334155 transparent; }
.table-scroll > table { margin-bottom: 0; }
.sticky-table thead th { position: sticky; top: 0; z-index: 3; background-color: var(--sticky-head-bg, var(--sticky-bg, #11191f)); }
.sticky-table thead tr:nth-child(2) th { top: var(--sticky-top-2, 0); }
.sticky-table tr > :first-child { position: sticky; left: 0; z-index: 2; background-color: var(--sticky-bg, #11191f); }
.sticky-table.sticky-2 tr > :nth-child(2) { position: sticky; left: var(--sticky-left-2, 0); z-index: 2; background-color: var(--sticky-bg, #11191f); }
.sticky-table thead tr > :first-child, .sticky-table.sticky-2 thead tr > :nth-child(2) { z-index: 4; background-color: var(--sticky-head-bg, var(--sticky-bg, #11191f)); }
/* Row tints in these tables must be a background-image (over the solid colour): a see-through background-color on a
   frozen cell lets the scrolled cells show through it */
/* the edge of the frozen column(s), only when the table really scrolls sideways (.scroll-x, set by ui.js) */
.scroll-x > .sticky-table:not(.sticky-2) tr > :first-child, .scroll-x > .sticky-table.sticky-2 tr > :nth-child(2) { box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.12); }
@media (max-width: 768px) {
  .table-scroll { max-height: 72vh; max-height: 72dvh; }
  /* Wide tables scroll sideways rather than wrapping every cell into a narrow column */
  .sticky-table th, .sticky-table td { white-space: nowrap; }
  /* …except the frozen first column: it wraps (dates, names) so it never takes more than ~45% of the screen */
  .sticky-table:not(.sticky-2) tr > :first-child { white-space: normal; min-width: min(9.5em, 40vw); max-width: 45vw; overflow-wrap: anywhere; }
  /* Two frozen columns (standings: "#" + team): the first as narrow as its number, the second wraps */
  .sticky-table.sticky-2 tr > :first-child { width: 1%; padding-left: 6px; padding-right: 6px; text-align: center; }
  .sticky-table.sticky-2 tr > :nth-child(2) { white-space: normal; min-width: min(8em, 34vw); max-width: 40vw; overflow-wrap: anywhere; }
}

/* account.php: an example tip (not clickable) */
.tips-example { pointer-events: none; opacity: 0.9; margin-bottom: 0.75rem; }
.tips-example .promo-card { margin: 0; }

/* admin.php → Newsletter */
.nl-list { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 1rem; }
.nl-item { display: inline-flex; gap: 6px; align-items: center; padding: 4px 10px; border: 1px solid var(--pico-muted-border-color); border-radius: 6px; font-size: 0.85rem; text-decoration: none; }
.nl-item.active { border-color: #38bdf8; background: rgba(56, 189, 248, 0.1); }
.nl-item small { color: var(--pico-muted-color); }
.nl-status { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; padding: 1px 6px; border-radius: 4px; background: rgba(148, 163, 184, 0.2); }
.nl-status.nl-sending { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }
.nl-status.nl-sent { background: rgba(16, 185, 129, 0.2); color: #34d399; }
.nl-editor { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--pico-spacing); align-items: start; }
.nl-editor > form, .nl-editor > .nl-progress { grid-column: 1; }
.nl-preview { grid-column: 2; grid-row: 1 / span 3; position: sticky; top: 70px; }
.nl-preview iframe { width: 100%; min-height: 400px; border: 1px solid var(--pico-muted-border-color); border-radius: 8px; background: #090d16; }
.nl-toolbar { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 4px; }
.nl-toolbar button { width: auto; margin: 0; padding: 2px 8px; font-size: 0.78rem; background: transparent; border: 1px solid var(--pico-muted-border-color); color: var(--pico-color); }
.nl-toolbar button:hover { border-color: #38bdf8; }
#nlBody { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.85rem; }
.nl-help { font-size: 0.78rem; color: var(--pico-muted-color); }
.nl-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.nl-actions button { width: auto; margin: 0; }
.nl-progress { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 0.5rem; }
.nl-progress progress { flex: 1; min-width: 160px; margin: 0; }
@media (max-width: 1000px) { .nl-editor { grid-template-columns: minmax(0, 1fr); } .nl-preview { grid-column: 1; grid-row: auto; position: static; } }

/* signup.php: email choices */
.signup-emails { margin: 0.5rem 0 1rem; }
.signup-emails legend { font-weight: 600; }
.signup-emails legend small { color: var(--pico-muted-color); font-weight: 400; }

/* Management pages: latest activity (activity_html in common.php) */
.activity-cell { white-space: nowrap; font-size: 0.85em; color: var(--pico-muted-color); }

/* Clubs awaiting an admin (manage_clubs.php) */
.club-pending-badge { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; font-size: 0.68rem; font-weight: 700;
                      color: #fbbf24; border: 1px solid rgba(251, 191, 36, 0.5); white-space: nowrap; vertical-align: middle; }
.club-review-note { font-size: 0.82rem; color: var(--pico-muted-color); margin: 0 0 1rem; }

/* admin.php → Pending (admin_tasks) */
.pt-count { display: inline-block; min-width: 1.3em; padding: 0 5px; border-radius: 999px; background: #f59e0b; color: #111827; font-size: 0.7rem; font-weight: 800; text-align: center; }
.pt-task { border: 1px solid var(--pico-muted-border-color); border-radius: 8px; padding: 12px 14px; margin-bottom: 12px; }
.pt-task.done { opacity: 0.65; }
.pt-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; margin-bottom: 8px; }
.pt-type { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; padding: 1px 8px; border-radius: 999px; }
.pt-type.new { background: rgba(56, 189, 248, 0.15); color: #38bdf8; }
.pt-type.claim { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.pt-outcome { font-size: 0.8rem; color: var(--pico-muted-color); }
.pt-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; font-size: 0.88rem; }
.pt-label { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--pico-muted-color); margin-bottom: 2px; }
.pt-guess { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 4px 0; padding: 4px 8px; border-radius: 6px; background: rgba(255, 255, 255, 0.03); }
.pt-guess button { width: auto; margin: 0; padding: 2px 10px; font-size: 0.75rem; flex-shrink: 0; }
.pt-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.pt-actions form { margin: 0; display: flex; gap: 6px; align-items: center; }
.pt-actions button { width: auto; margin: 0; padding: 4px 12px; font-size: 0.82rem; }
.pt-merge input { margin: 0; padding: 4px 8px; height: auto; font-size: 0.82rem; width: 13rem; }
.pt-done { margin-left: auto !important; }
.pt-done label { margin: 0; font-size: 0.85rem; }
.pt-note { display: flex; gap: 8px; align-items: flex-start; margin: 10px 0 0; }
.pt-note textarea { margin: 0; font-size: 0.82rem; min-height: 2.6rem; }
.pt-note button { width: auto; margin: 0; padding: 4px 10px; font-size: 0.78rem; flex-shrink: 0; }
@media (max-width: 768px) { .pt-body { grid-template-columns: 1fr; } .pt-note { flex-direction: column; } .pt-done { margin-left: 0 !important; } }

/* Tab bars (admin): on wide screens the tabs wrap onto a second row rather than squeezing their labels */
@media (min-width: 769px) {
  .tabs-nav { flex-wrap: wrap; row-gap: 2px; }
  .tabs-nav > * { white-space: nowrap; }
}

/* Official team of its club (team_official_mark) */
.team-official { color: #34d399; font-weight: 800; font-size: 0.85em; cursor: help; }
.club-aff { font-size: 0.72rem; font-weight: 600; }
.club-aff-verified { color: #34d399; }
.club-aff-declared { color: #94a3b8; }
.club-aff-refused { color: #f87171; }

/* manage_clubs.php: club managers and the club's teams */
.club-sec-title { font-size: 0.95rem; margin: 0 0 0.3rem; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.club-mgr-list { list-style: none; padding: 0; margin: 0 0 0.5rem; }
.club-mgr-list li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 4px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.05); font-size: 0.88rem; }
.club-mgr-list form { margin: 0; }
.club-mgr-list button, .club-team-act button { width: auto; margin: 0; padding: 2px 10px; font-size: 0.75rem; }
.club-mgr-add { display: flex; gap: 6px; }
.club-mgr-add input { margin: 0; font-size: 0.85rem; }
.club-mgr-add button { width: auto; margin: 0; padding: 4px 12px; font-size: 0.82rem; }
.club-team-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.05); font-size: 0.88rem; }
.club-team-act { display: flex; gap: 4px; margin: 0; flex-wrap: wrap; justify-content: flex-end; }

/* club.php: club overview for its managers */
.club-teams { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 460px), 1fr)); gap: var(--pico-spacing); }
.club-team-card { margin: 0; }
.club-team-card header { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.club-team-record { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; margin-bottom: 10px; }
.club-team-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.club-game { display: flex; gap: 8px; align-items: flex-start; margin: 6px 0; font-size: 0.85rem; }
.club-game-date { min-width: 4.8rem; font-weight: 600; }
.club-game-date small { color: var(--pico-muted-color); font-weight: 400; }
@media (max-width: 600px) { .club-team-cols { grid-template-columns: 1fr; } }
.club-game .form-pill { white-space: nowrap; flex-shrink: 0; min-width: max-content; height: auto; line-height: 1.6; }

/* Match rows (match_row_attrs()): highlighted on hover, click opens the match stats (js/ui.js). An image layer, so the
   frozen first column (solid --sticky-bg) is tinted too. */
tr.row-link { cursor: pointer; }
tr.row-link:hover > td { background-image: linear-gradient(rgba(56, 189, 248, 0.10), rgba(56, 189, 248, 0.10)); }

/* Admin → Pending: "find another club" picker (js/admin_club_pick.js) */
.pt-pick { position: relative; display: inline-block; }
.pt-merge .pt-pick-q { width: 17rem; max-width: 100%; }
.pt-pick-q.picked { border-color: #10b981; }
.pt-pick-list { position: absolute; top: calc(100% + 4px); left: 0; z-index: 50; width: min(30rem, 86vw); max-height: 20rem; overflow-y: auto;
  background: #0f172a; border: 1px solid #334155; border-radius: 8px; box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5); }
.pt-pick-item { padding: 6px 10px; cursor: pointer; font-size: 0.85rem; line-height: 1.35; border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
.pt-pick-item small { display: block; color: var(--pico-muted-color); font-size: 0.75rem; }
.pt-pick-item code { font-size: 0.72rem; padding: 0 3px; }
.pt-pick-item:hover, .pt-pick-item.active { background: rgba(56, 189, 248, 0.14); }
.pt-pick-none { padding: 8px 10px; font-size: 0.82rem; color: var(--pico-muted-color); }
@media (max-width: 768px) { .pt-pick, .pt-merge .pt-pick-q { width: 100%; } }

/* Followed players (core/follows.php): ★ after the name, the row tinted gold in any table */
.follow-star { color: #fbbf24; font-size: 0.85em; margin-left: 3px; }
tr:has(.follow-star) > td { background-image: linear-gradient(rgba(251, 191, 36, 0.09), rgba(251, 191, 36, 0.09)); }
tr:has(.follow-star) > td:first-child { box-shadow: inset 3px 0 0 #fbbf24, inset -1px 0 0 rgba(255, 255, 255, 0.12); }
/* ☆ / ★ after a player's name (follow_toggle(): Squad tables) */
.follow-toggle { width: auto; margin: 0 0 0 3px; padding: 0 3px; border: 0; background: transparent; color: var(--pico-muted-color); font-size: 0.95em; line-height: 1; box-shadow: none; cursor: pointer; vertical-align: baseline; }
.follow-toggle:hover, .follow-toggle:focus-visible { color: #fbbf24; background: transparent; }
.follow-toggle.is-following { color: #fbbf24; }
.follow-btn { width: auto; margin: 0; padding: 6px 14px; font-size: 0.9rem; background: transparent; border-color: #fbbf24; color: #fbbf24; }
.follow-btn.is-following { background: #fbbf24; color: #1f2937; }
.follow-list { margin-top: 10px; }
.follow-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-top: 1px solid rgba(255, 255, 255, 0.06); flex-wrap: wrap; }
.follow-row small { flex: 1; }
.follow-row button { width: auto; margin: 0 0 0 auto; padding: 3px 10px; font-size: 0.78rem; }
.push-box { padding: 10px 12px; border-radius: 8px; background: rgba(56, 189, 248, 0.06); border: 1px solid rgba(56, 189, 248, 0.2); }
.push-box .push-state { margin: 0 0 8px; font-size: 0.88rem; }
.push-box button { width: auto; margin: 0; padding: 6px 14px; font-size: 0.85rem; }
.push-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Dashboard: followed players' notifications */
.follow-notifs header { display: flex; align-items: center; gap: 8px; }
.follow-notifs .notif-read-all { margin: 0 0 0 auto; width: auto; padding: 2px 10px; font-size: 0.75rem; }
.notif-item { display: grid; grid-template-columns: 1fr auto; gap: 0 10px; padding: 8px 10px; margin: 0 -10px; border-radius: 8px; color: inherit; text-decoration: none; }
.notif-item:hover { background: rgba(255, 255, 255, 0.04); }
.notif-item strong { font-size: 0.92rem; }
.notif-item span { grid-column: 1; font-size: 0.82rem; color: var(--pico-muted-color); }
.notif-item small { grid-column: 2; grid-row: 1 / span 2; align-self: center; color: var(--pico-muted-color); font-size: 0.72rem; white-space: nowrap; }
.notif-item.unread { background: rgba(251, 191, 36, 0.07); box-shadow: inset 3px 0 0 #fbbf24; }
.follow-notifs footer { font-size: 0.85rem; }

/* User dashboard (index.php + core/dashboard.php) */
.user-dash .ud-hello { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 1rem; }
.user-dash .ud-hello h2 { margin: 0; }
.user-dash .ud-hello p { margin: 0; color: var(--pico-muted-color); }
.user-dash .ud-hello [role="button"] { width: auto; margin: 0; padding: 6px 14px; }
.ud-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--pico-spacing); align-items: start; }
.ud-side { grid-column: 2; grid-row: 1; display: flex; flex-direction: column; gap: var(--pico-spacing); min-width: 0; }
.ud-main { grid-column: 1; grid-row: 1; min-width: 0; }
.ud-side > article { margin: 0; }
.ud-section { margin-bottom: var(--pico-spacing); }
.ud-title { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--pico-muted-color); margin: 0 0 8px; }
.ud-teams { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; }
.ud-team { margin: 0; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.ud-team a { color: inherit; text-decoration: none; }
.ud-team-head { display: flex; align-items: flex-start; gap: 10px; padding: 6px 8px; margin: -6px -8px; border-radius: 8px; transition: background 0.12s; }
.ud-team-head:hover { background: rgba(255, 255, 255, 0.06); }
.ud-team-head > span:nth-child(2) { flex: 1; min-width: 0; }
.ud-team-head small { display: block; color: var(--pico-muted-color); font-size: 0.75rem; }
.ud-team-head > :first-child { flex-shrink: 0; }
.ud-role { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; margin-left: 4px; font-size: 0.65rem; font-weight: 700; line-height: 1; border-radius: 50%; cursor: default; border: 1px solid #475569; color: #94a3b8; flex-shrink: 0; }
.ud-role-owner { border-color: #10b981; color: #34d399; }
.ud-role-editor { border-color: #38bdf8; color: #38bdf8; }
.ud-form { display: flex; gap: 4px; align-items: center; min-height: 22px; }
.ud-line { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; padding: 4px 6px; margin: 0 -6px; border-radius: 6px; }
.ud-line:hover, .ud-game:hover, .ud-player:hover, .ud-club:hover { background: rgba(255, 255, 255, 0.06); }
.ud-line small, .ud-game small { color: var(--pico-muted-color); font-size: 0.75rem; }
.ud-k { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--pico-muted-color); width: 2.6rem; flex-shrink: 0; }
.ud-score { width: auto !important; padding: 0 6px !important; white-space: nowrap; flex-shrink: 0; }
.ud-team-links { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; margin: auto -14px -12px; padding: 5px 8px; border-top: 1px solid rgba(255, 255, 255, 0.06); font-size: 0.82rem; }
.ud-team-links a { color: var(--pico-primary); padding: 3px 6px; border-radius: 6px; transition: background 0.12s; }
.ud-team-links a:hover { background: rgba(255, 255, 255, 0.07); }
.ud-team-links .ud-to-tag { color: #fbbf24; }
.ud-team-links .ud-role { margin-left: auto; margin-right: 2px; }
.ud-two { display: grid; grid-template-columns: 1fr 1fr; gap: var(--pico-spacing); }
.ud-two > section { min-width: 0; }
.ud-list { margin: 0; padding: 6px 10px; }
.ud-game { display: flex; align-items: center; gap: 10px; padding: 7px 6px; border-radius: 6px; color: inherit; text-decoration: none; font-size: 0.88rem; }
.ud-game + .ud-game { border-top: 1px solid rgba(255, 255, 255, 0.05); }
.ud-game > span:last-child { min-width: 0; }
.ud-game small { display: block; }
.ud-date { width: 4.6rem; flex-shrink: 0; font-weight: 700; font-size: 0.8rem; }
.ud-date small { display: block; font-weight: 400; }
.ud-empty { margin: 6px 4px; font-size: 0.85rem; }
.ud-players { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.ud-player { display: flex; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--pico-card-background-color); border: 1px solid rgba(251, 191, 36, 0.25); color: inherit; text-decoration: none; }
.ud-jersey { font-size: 1.3rem; font-weight: 800; color: #38bdf8; min-width: 2.6rem; white-space: nowrap; }
.ud-pmain { min-width: 0; }
.ud-pmain small { display: block; color: var(--pico-muted-color); font-size: 0.76rem; }
.ud-plast .form-pill { width: auto; padding: 0 5px; font-size: 0.65rem; }
.ud-clubs .ud-club { display: flex; align-items: center; gap: 8px; padding: 6px; margin: 0 -6px; border-radius: 6px; color: inherit; text-decoration: none; font-size: 0.9rem; }
.ud-welcome { text-align: center; padding: 2rem 1.25rem; }
.ud-welcome p { color: var(--pico-muted-color); max-width: 460px; margin: 0 auto 1rem; }
.ud-tip { font-size: 0.85rem; }
@media (max-width: 1024px) {
  .ud-grid { grid-template-columns: minmax(0, 1fr); }
  .ud-side, .ud-main { grid-column: 1; grid-row: auto; }
}
@media (max-width: 768px) {
  .ud-two { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 480px) { .ud-teams, .ud-players { grid-template-columns: minmax(0, 1fr); } }
.follow-notifs header strong { white-space: nowrap; }
.ud-side .follow-notifs .notif-read-all { padding: 2px 8px; font-size: 0.7rem; }
/* Dashboard notifications in the narrow side column: icon | text, the buttons under the text (no sideways scroll) */
.ud-side .notif-table, .ud-side .notif-table tbody { display: block; }
.ud-side .notif-table tr { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 6px 8px; padding: 10px 0; border-bottom: 1px solid var(--pico-muted-border-color); }
.ud-side .notif-table tr:last-child { border-bottom: 0; }
.ud-side table.notif-table[role] tbody tr td { display: block; padding: 0; border: 0; background: transparent; }
.ud-side .notif-icon { width: auto; grid-row: 1 / span 2; align-self: start; }
.ud-side .notif-actions { grid-column: 2; text-align: left; white-space: normal; }
.ud-side .notif-actions .cal-actions-row { justify-content: flex-start; }
.notif-actions a.cal-act { margin: 0; padding: 3px 10px; font-size: 0.78rem; }
.ud-more { margin-top: 10px; }
.ud-more summary { font-size: 0.88rem; color: var(--pico-primary); cursor: pointer; }
.ud-more-list { margin-top: 6px; border-radius: 10px; background: var(--pico-card-background-color); padding: 4px 10px; }
.ud-more-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 4px; color: inherit; text-decoration: none; font-size: 0.88rem; }
.ud-more-row + .ud-more-row { border-top: 1px solid rgba(255, 255, 255, 0.05); }
.ud-more-row:hover { background: rgba(255, 255, 255, 0.04); }
.ud-more-row small { margin-left: auto; color: var(--pico-muted-color); }
.ud-more-row .ud-to-tag { color: #fbbf24; font-size: 0.8rem; }

/* Suggestion chips (render_related in core/stats_hub.php) */
.sb-chip { display: flex; align-items: center; gap: 7px; flex: 0 0 auto; max-width: 330px; padding: 4px 11px 4px 8px; border-radius: 10px;
  background: rgba(30, 41, 59, 0.85); border: 1px solid #334155; color: #e2e8f0; text-decoration: none; scroll-snap-align: start; }
.sb-chip:hover { border-color: #38bdf8; text-decoration: none; }
.sb-chip strong { display: block; font-size: 0.74rem; line-height: 1.2; color: #f8fafc; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-chip small { display: block; font-size: 0.7rem; line-height: 1.2; color: #94a3b8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-chip > span:last-child { min-width: 0; }
.sb-chip-icon { font-size: 1.05rem; }
.sb-chip-player { border-color: rgba(251, 191, 36, 0.35); }

/* Stats hub lists (stats_hub.php, club_stats.php) */
.hub-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 1rem; }
.hub-head h2 { margin: 0; }
.hub-head p { margin: 2px 0 0; }
.hub-filter { width: 240px; margin: 0; }
.hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.hub-grid-tight { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px; }
.hub-item { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border-radius: 12px; background: var(--pico-card-background-color);
  border: 1px solid rgba(255, 255, 255, 0.06); color: inherit; text-decoration: none; transition: border-color 0.15s, transform 0.15s; }
.hub-item:hover { border-color: #38bdf8; transform: translateY(-1px); text-decoration: none; }
.hub-item[hidden], .hub-row[hidden], .hub-group[hidden] { display: none; }
.hub-item-head { display: flex; align-items: center; gap: 10px; }
.hub-item-head small { display: block; color: var(--pico-muted-color); font-size: 0.76rem; }
.hub-icon { font-size: 1.6rem; width: 36px; text-align: center; }
.hub-facts { display: flex; align-items: center; gap: 12px; font-size: 0.8rem; color: var(--pico-muted-color); }
.hub-big { font-size: 1.35rem; font-weight: 800; color: #f8fafc; white-space: nowrap; }
.hub-form { display: inline-flex; gap: 3px; margin-top: 3px; }
.hub-form .form-pill, .hub-row .form-pill, .hub-line .form-pill { width: auto; min-width: 22px; height: 20px; padding: 0 5px; font-size: 0.68rem; }
.hub-line { color: var(--pico-muted-color); font-size: 0.78rem; }
.hub-line strong { color: #e2e8f0; }
.hub-player { flex-direction: row; align-items: center; padding: 10px 12px; }
.hub-player.followed { border-color: rgba(251, 191, 36, 0.35); }
.hub-pmain { min-width: 0; }
.hub-pmain small { display: block; color: var(--pico-muted-color); font-size: 0.75rem; }
.hub-stat { color: #e2e8f0 !important; }
.hub-group { margin-bottom: 1.25rem; }
.hub-group .ud-title small { text-transform: none; letter-spacing: 0; font-weight: 400; }
.hub-list { border-radius: 12px; background: var(--pico-card-background-color); padding: 4px 10px; }
.hub-row { display: flex; align-items: center; gap: 12px; padding: 9px 6px; color: inherit; text-decoration: none; border-radius: 8px; }
.hub-row + .hub-row { border-top: 1px solid rgba(255, 255, 255, 0.05); }
.hub-row:hover { background: rgba(255, 255, 255, 0.04); text-decoration: none; }
.hub-date { width: 2.6rem; flex-shrink: 0; text-align: center; font-size: 0.68rem; text-transform: uppercase; color: var(--pico-muted-color); line-height: 1.1; }
.hub-date strong { display: block; font-size: 1.1rem; color: #f8fafc; }
.hub-rmain { flex: 1; min-width: 0; font-size: 0.9rem; }
.hub-rmain small { display: block; color: var(--pico-muted-color); font-size: 0.76rem; }
.hub-star { color: #fbbf24 !important; }
.hub-tag { flex-shrink: 0; }
.hub-empty p { margin: 0; }
.club-vs-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-bottom: 12px; }
@media (max-width: 768px) {
  .hub-filter { width: 100%; }
  .hub-grid, .hub-grid-tight { grid-template-columns: minmax(0, 1fr); }
  .hub-tag { display: none; }
}
.hub-chips { display: flex; gap: 6px; flex-wrap: wrap; margin: -0.4rem 0 1rem; }
.hub-chip, .hub-chip-clear { transition: none; width: auto; margin: 0; padding: 4px 12px; border-radius: 999px; font-size: 0.82rem; background: transparent; border: 1px solid #334155; color: #cbd5e1; }
.hub-chip small { color: #64748b; margin-left: 2px; }
.hub-chips .hub-chip.active { background-color: #38bdf8 !important; border-color: #38bdf8 !important; color: #0b1120 !important; font-weight: 700; }
.hub-chips .hub-chip.active small { color: #0b1120; }
.hub-chip-clear { border-style: dashed; color: #f87171; border-color: rgba(248, 113, 113, 0.5); }

/* Object header (render_page_head in common.php): title block + ONE sticky tab row — teams, matches, players, clubs, competitions, the stats hub */
.obj-head { margin: -0.75rem 0 0; padding: 14px 0 10px; background: linear-gradient(180deg, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.4)); }
.obj-head-inner { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.obj-title { min-width: 0; flex: 1; }
.obj-kicker { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: #64748b; margin-bottom: 2px; }
.obj-kicker a { color: #94a3b8; text-decoration: none; }
.obj-kicker a:hover { color: #38bdf8; }
.obj-sep { color: #475569; margin: 0 2px; }
.obj-title-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.obj-title-row h1 { margin: 0; font-size: 1.55rem; line-height: 1.2; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.obj-score { white-space: nowrap; color: #38bdf8; font-variant-numeric: tabular-nums; }
.obj-vs { color: #64748b; font-size: 0.8em; font-weight: 600; }
.obj-sub { color: var(--pico-muted-color); font-size: 0.85rem; margin-top: 3px; }
.obj-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.obj-actions [role="button"], .obj-actions button, .obj-btn { width: auto; margin: 0; padding: 6px 14px; font-size: 0.85rem; }
.obj-link { font-size: 0.85rem; }
.obj-switch { margin: 0; }
.obj-switch select { margin: 0; padding: 3px 28px 3px 10px; height: auto; font-size: 0.8rem; width: auto; max-width: 220px; border-radius: 999px; }
.obj-tabs { position: sticky; top: var(--app-header-h, 52px); z-index: 45; margin-bottom: 1rem; background: rgba(11, 17, 32, 0.95);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid rgba(56, 189, 248, 0.18); }
.obj-tabs-inner { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.obj-tab-list { display: flex; align-items: center; gap: 2px; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; }
.obj-tab-list::-webkit-scrollbar { display: none; }
.obj-tab { padding: 11px 12px 9px; font-size: 0.85rem; font-weight: 700; color: #94a3b8; text-decoration: none; white-space: nowrap; border-bottom: 2px solid transparent; }
.obj-tab:hover { color: #f8fafc; text-decoration: none; }
.obj-tab.active { color: #38bdf8; border-bottom-color: #38bdf8; }
.obj-tab.disabled { opacity: 0.4; cursor: not-allowed; }
.obj-tab-sel { margin: 0 2px; width: auto; max-width: 200px; padding: 3px 26px 3px 10px; height: auto; font-size: 0.8rem; border-radius: 999px; }
.obj-tab-sel.active { border-color: #38bdf8; color: #38bdf8; }
.obj-tools { flex-shrink: 0; display: flex; align-items: center; min-width: 0; }
.obj-tools > form { margin: 0; min-width: 0; }
.obj-tools select { margin: 0; padding: 3px 28px 3px 10px; height: auto; font-size: 0.8rem; width: auto; max-width: 240px; min-width: 0; }
/* Several pickers (competition: edition + period) read as one joined control, not a stack */
.obj-tools > form:not(:last-child) select { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.obj-tools > form + form select { border-top-left-radius: 0; border-bottom-left-radius: 0; margin-left: -1px; }
/* Related suggestions under the header (render_related) */
.related { display: flex; align-items: center; gap: 10px; margin: 0 0 1rem; min-width: 0; }
.related-label { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: #64748b; white-space: nowrap; }
.related-chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; scroll-snap-type: x proximity; min-width: 0; }
.related-chips::-webkit-scrollbar { display: none; }
@media (max-width: 768px) {
  .obj-head { padding: 10px 0 8px; }
  .obj-title-row h1 { font-size: 1.25rem; }
  .obj-actions { width: 100%; }
  .obj-tabs-inner { flex-wrap: wrap; gap: 0 8px; }
  .obj-tools { width: 100%; padding-bottom: 6px; }
  .obj-tools > form { flex: 1 1 0; }
  .obj-tools select { max-width: 100%; width: 100%; }
  .obj-tab { padding: 10px 10px 8px; font-size: 0.82rem; }
  .related { flex-direction: column; align-items: stretch; gap: 4px; }
  .sb-chip { max-width: 230px; }
}

/* Layout stability: the scrollbar's space is always reserved (pages that scroll and pages that don't keep the same
   width, so the header doesn't shift), and an open 🔔 / avatar panel never changes the header row's height
   (Pico gives an open <details>' summary a bottom margin). */
html { scrollbar-gutter: stable; }
/* Links to #anchors (and scrollIntoView) stop below the sticky header + the object's tab row (heights measured in
   js/ui.js: --app-header-h, --obj-tabs-h, 0 on pages without tabs). */
html { scroll-padding-top: calc(var(--app-header-h, 52px) + var(--obj-tabs-h, 0px) + 12px); }
.nav-pop, .nav-pop[open] { margin: 0 !important; }
.nav-pop > summary, .nav-pop[open] > summary { margin: 0 !important; height: 32px; box-sizing: border-box; }

/* ---------------------------------------------------------------- smart picker (js/smart-pick.js) */
.sp { position: relative; display: block; }
.sp-compact { display: inline-block; }
.sp select.sp-native { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; pointer-events: none; margin: 0; }
.sp-input { padding-right: 2rem !important; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.5' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important; background-position: right 0.7rem center !important; background-size: 14px !important; text-overflow: ellipsis; }
.sp-input:focus { background-image: none !important; }
.sp-compact .sp-input { margin: 0; padding: 3px 26px 3px 10px; height: auto; font-size: 0.8rem; width: 200px; max-width: 60vw; border-radius: 999px; background-position: right 0.55rem center !important; background-size: 12px !important; }
.sp-compact .sp-input.active { border-color: #38bdf8; color: #38bdf8; }
.sp-list { position: fixed; z-index: 1200; margin: 0; padding: 4px; list-style: none; overflow-y: auto; max-width: min(460px, calc(100vw - 8px));
  background: #0f172a; border: 1px solid #334155; border-radius: 10px; box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5); }
.sp-list[hidden] { display: none; }
.sp-list li { list-style: none; margin: 0; }
.sp-opt { display: flex; flex-direction: column; padding: 6px 10px; border-radius: 7px; cursor: pointer; font-size: 0.88rem; color: #e2e8f0; }
.sp-opt small { color: var(--pico-muted-color); font-size: 0.74rem; }
.sp-opt.sp-active { background: rgba(56, 189, 248, 0.15); }
.sp-opt.sp-on > span::after { content: ' ✓'; color: #38bdf8; }
.sp-opt.sp-off { opacity: 0.45; cursor: default; }
.sp-group { padding: 8px 10px 3px; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.05em; color: #64748b; }
.sp-none { padding: 8px 10px; font-size: 0.8rem; color: var(--pico-muted-color); font-style: italic; }
@media (max-width: 768px) { .sp-compact .sp-input { width: 160px; } }

/* ---------------------------------------------------------------- Directory (core/directory.php, manage_*.php) */
.dir-bar { display: flex; gap: 8px; align-items: center; margin-bottom: 0.75rem; flex-wrap: wrap; }
.dir-search { flex: 1; min-width: 200px; margin: 0 !important; }
.dir-bar > a[role="button"], .dir-bar > button { width: auto; margin: 0; padding: 8px 14px; font-size: 0.85rem; white-space: nowrap; }
.dir-chips { margin: 0 0 0.75rem; }
.dir-list { border-radius: 12px; background: var(--pico-card-background-color); padding: 4px 8px; margin-bottom: 1.5rem; }
.dir-list-title { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin: 0 0 0.5rem; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; color: #64748b; font-weight: 700; }
.dir-list-title small { text-transform: none; letter-spacing: 0; font-weight: 400; }
.dir-row { position: relative; display: flex; align-items: center; gap: 14px; padding: 11px 8px; border-radius: 9px; }
.dir-row + .dir-row { border-top: 1px solid rgba(255, 255, 255, 0.05); }
.dir-row[hidden] { display: none; }
.dir-row.has-link:hover { background: rgba(255, 255, 255, 0.04); }
.dir-row.is-current { box-shadow: inset 3px 0 0 #38bdf8; background: rgba(56, 189, 248, 0.06); }
.dir-ico { width: 40px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; }
.dir-ico img { width: 36px; height: 36px; object-fit: contain; border-radius: 6px; }
.dir-num { width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 0.95rem;
  background: rgba(56, 189, 248, 0.12); color: #7dd3fc; border: 1px solid rgba(56, 189, 248, 0.3); }
.dir-main { flex: 1; min-width: 0; }
.dir-title { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 0.95rem; }
.dir-link { color: #f1f5f9; font-weight: 700; text-decoration: none; }
.dir-link::after { content: ''; position: absolute; inset: 0; border-radius: 9px; }   /* the whole row opens it */
.dir-link:hover { color: #38bdf8; text-decoration: none; }
.dir-line { color: var(--pico-muted-color); font-size: 0.78rem; margin-top: 1px; overflow: hidden; text-overflow: ellipsis; }
.dir-line strong { color: #cbd5e1; font-weight: 600; }
.dir-facts { display: flex; gap: 16px; flex-shrink: 0; }
.dir-facts span { display: flex; flex-direction: column; align-items: center; min-width: 44px; }
.dir-facts strong { font-size: 1rem; color: #e2e8f0; }
.dir-facts small { font-size: 0.66rem; color: #64748b; text-transform: uppercase; letter-spacing: 0.04em; }
.dir-when { width: 92px; flex-shrink: 0; text-align: right; font-size: 0.78rem; }
.dir-actions { position: relative; z-index: 1; display: flex; gap: 6px; align-items: center; flex-shrink: 0; }
.dir-actions a[role="button"], .dir-actions button { width: auto; margin: 0; padding: 4px 10px; font-size: 0.78rem; }
.dir-actions form { margin: 0; }
.dir-row a:not(.dir-link), .dir-row button, .dir-row form, .dir-row select, .dir-row input { position: relative; z-index: 1; }
.dir-del button { border: none !important; color: #ef4444 !important; padding: 4px 8px !important; background: transparent; }
.dir-pill { display: inline-block; font-size: 0.68rem; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: rgba(148, 163, 184, 0.14); color: #cbd5e1; white-space: nowrap; }
.dir-pill.ok { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.dir-pill.warn { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.dir-pill.blue { background: rgba(56, 189, 248, 0.15); color: #7dd3fc; }
.dir-none { text-align: center; color: var(--pico-muted-color); padding: 1rem 0; margin: 0; }
.dir-empty { text-align: center; padding: 2.5rem 1rem; color: var(--pico-muted-color); }
.dir-empty strong { display: block; color: #e2e8f0; font-size: 1.05rem; margin-bottom: 4px; }
.dir-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--pico-spacing); }

/* Edit pages: sections on the left (sticky), one card per section */
.ed-layout { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.ed-nav { position: sticky; top: calc(var(--app-header-h, 60px) + 60px); }
.ed-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.ed-nav li { list-style: none; margin: 0; padding: 0; }
.ed-nav a { display: block; padding: 7px 12px; border-radius: 8px; color: #94a3b8; font-size: 0.88rem; text-decoration: none; border-left: 2px solid transparent; }
.ed-nav a:hover { color: #e2e8f0; background: rgba(255, 255, 255, 0.04); }
.ed-nav a.active { color: #38bdf8; background: rgba(56, 189, 248, 0.08); border-left-color: #38bdf8; }
.ed-main { min-width: 0; display: flex; flex-direction: column; gap: 1.25rem; }
.ed-card { background: var(--pico-card-background-color); border-radius: 14px; border: 1px solid rgba(255, 255, 255, 0.05); }
.ed-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 16px 20px 0; flex-wrap: wrap; }
.ed-card-head h2 { margin: 0; font-size: 1.05rem; }
.ed-card-head p { margin: 3px 0 0; font-size: 0.82rem; color: var(--pico-muted-color); max-width: 70ch; }
.ed-card-tools { display: flex; gap: 6px; align-items: center; }
.ed-card-tools a[role="button"], .ed-card-tools button { width: auto; margin: 0; padding: 5px 12px; font-size: 0.8rem; }
.ed-card-body { padding: 14px 20px 18px; }
.ed-card-body > :last-child { margin-bottom: 0; }
.ed-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 16px; }
.ed-grid .ed-wide { grid-column: 1 / -1; }
.ed-grid label { font-size: 0.85rem; }
.ed-help { display: block; margin: -0.6rem 0 0.9rem; font-size: 0.76rem; color: var(--pico-muted-color); }
.ed-save { position: sticky; bottom: 0; z-index: 5; display: flex; justify-content: flex-end; align-items: center; gap: 10px; padding: 10px 0; margin-top: -0.5rem;
  background: linear-gradient(to top, var(--pico-background-color) 70%, transparent); }
.ed-save button, .ed-save a[role="button"] { width: auto; margin: 0; padding: 8px 20px; }
.ed-save small { color: var(--pico-muted-color); margin-right: auto; }
.ed-danger, #danger { border-color: rgba(239, 68, 68, 0.25); }
#danger .ed-card-head h2 { color: #fca5a5; }
#danger button { width: auto; margin: 0; border-color: rgba(239, 68, 68, 0.5) !important; color: #f87171 !important; background: transparent; }
.ed-list { display: flex; flex-direction: column; gap: 6px; }
.ed-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; background: rgba(255, 255, 255, 0.025); border: 1px solid rgba(255, 255, 255, 0.05); }
.ed-item > .grow { flex: 1; min-width: 0; }
.ed-item small { color: var(--pico-muted-color); }
.ed-item form { margin: 0; }
.ed-item input, .ed-item select, .ed-item button { margin: 0; }
.ed-item button, .ed-item a[role="button"] { width: auto; padding: 4px 10px; font-size: 0.78rem; }
.ed-inline { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.ed-inline > * { margin: 0 !important; }
.ed-inline > label { flex: 1; min-width: 160px; font-size: 0.8rem; }
.ed-inline > label input, .ed-inline > label select, .ed-inline > label .sp { margin: 2px 0 0 !important; }
.ed-inline button { width: auto; white-space: nowrap; }
.ed-checks { max-height: 260px; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 2px 14px; padding: 8px 10px; border-radius: 8px; background: rgba(0, 0, 0, 0.15); border: 1px solid var(--pico-muted-border-color); }
.ed-checks label { display: flex; gap: 8px; align-items: center; font-size: 0.85rem; margin: 3px 0; cursor: pointer; }
.ed-checks label[hidden] { display: none; }
.ed-checks input { margin: 0; }
.ed-subfilter { margin: 0 0 6px !important; padding: 5px 10px !important; font-size: 0.82rem !important; height: auto !important; }

@media (max-width: 900px) {
  .ed-layout { grid-template-columns: minmax(0, 1fr); gap: 0.75rem; }
  .ed-nav { position: sticky; top: calc(var(--app-header-h, 56px) + 44px); z-index: 6; background: var(--pico-background-color); margin: 0 -16px; padding: 6px 16px; }
  .ed-card { scroll-margin-top: 44px; }   /* + the sticky section index */
  .ed-nav ul { flex-direction: row; overflow-x: auto; gap: 4px; scrollbar-width: none; }
  .ed-nav a { white-space: nowrap; border-left: none; border: 1px solid #334155; border-radius: 999px; padding: 4px 12px; font-size: 0.8rem; }
  .ed-nav a.active { border-color: #38bdf8; }
  .dir-two { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 768px) {
  .dir-row { gap: 10px; align-items: flex-start; flex-wrap: wrap; }
  .dir-main { flex-basis: calc(100% - 60px); }
  .dir-facts, .dir-when { display: none; }
  .dir-actions { margin-left: 50px; }
  .ed-card-head, .ed-card-body { padding-left: 14px; padding-right: 14px; }
}
.contact-notice.warn { background: rgba(245, 158, 11, 0.10); border: 1px solid rgba(245, 158, 11, 0.6); color: #fde68a; }
.contact-notice a { color: inherit; font-weight: 700; }
.dir-mini { text-decoration: none; padding: 2px 6px; border-radius: 6px; }
.dir-mini:hover { background: rgba(255, 255, 255, 0.06); }
.dir-foot { font-size: 0.85rem; text-align: right; margin-top: -0.75rem; }
/* Players: teams & numbers, import, duplicates (manage_players.php) */
.pt-team-name { display: flex; align-items: center; gap: 8px; margin: 0; cursor: pointer; font-size: 0.9rem; }
.pt-team-name input { margin: 0; }
.pt-num { display: flex; align-items: center; gap: 4px; margin: 0; color: #64748b; font-weight: 700; }
.pt-num input { width: 76px; margin: 0; padding: 4px 8px; height: auto; text-align: center; }
.pt-num-ro { color: #cbd5e1; font-weight: 700; padding-right: 8px; }
.imp-text { font-family: ui-monospace, monospace; font-size: 0.82rem; }
.imp-table { width: 100%; font-size: 0.85rem; }
.imp-table td { vertical-align: middle; }
.imp-num { width: 70px; margin: 0 !important; padding: 4px 8px !important; height: auto !important; }
.imp-act { margin: 0 !important; font-size: 0.82rem; padding: 4px 28px 4px 8px !important; height: auto !important; min-width: 220px; }
.imp-dup td { opacity: 0.7; }
.dup-group { margin-bottom: 1rem; }
.dup-head { margin-bottom: 0.5rem; }
.dup-keep, .dup-merge { display: flex; align-items: center; gap: 4px; margin: 0; font-size: 0.8rem; white-space: nowrap; cursor: pointer; }
.dup-keep input, .dup-merge input { margin: 0; }
.dup-go { width: auto; margin: 0.75rem 0 0; }
.ed-single { grid-template-columns: minmax(0, 860px); justify-content: center; }
.ed-card-foot { display: flex; justify-content: flex-end; align-items: center; gap: 10px; margin-top: 0.75rem; }
.ed-card-foot button { width: auto; margin: 0; }
.ed-card-foot small { margin-right: auto; }
.ed-sub { font-size: 0.9rem; margin: 1.25rem 0 0.5rem; }
.invite-form { margin: 0; }
.member-opts { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 8px; }
.member-opts label { display: flex; align-items: center; gap: 6px; font-size: 0.8rem; color: var(--pico-muted-color); margin: 0; cursor: pointer; }
.member-opts input { margin: 0; }
.member-role-pick { flex: 0 0 130px !important; min-width: 0 !important; }
.squad-del { border: none !important; color: #ef4444 !important; background: transparent !important; padding: 4px 8px !important; }
.squad-list .ed-item { padding: 5px 10px; }
.squad-list .grow small { display: block; }
.num-clash { border-color: #f59e0b !important; color: #fbbf24 !important; }
.num-clash-note { color: #fbbf24; }
.squad-add { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid rgba(255, 255, 255, 0.06); }
.squad-add-num { flex: 0 0 90px !important; min-width: 0 !important; }
.ed-item .opp-rename { display: flex; align-items: center; gap: 8px; }
.ed-item .opp-rename input[type="text"] { padding: 4px 8px; height: auto; font-size: 0.85rem; }
.ed-item .opp-rename small { white-space: nowrap; }
.ed-danger-form button { width: auto; }
input[type="search"].ed-subfilter { padding-left: 2.1rem !important; background-position: 0.7rem center !important; background-size: 0.9rem !important; border-radius: 999px; }
.squad-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 6px; }
.squad-list .ed-item { padding: 4px 8px 4px 6px; gap: 8px; }
.squad-list .grow a { color: #f1f5f9; text-decoration: none; font-size: 0.9rem; }
.squad-list .grow a:hover { color: #38bdf8; }
.squad-list .grow small { font-size: 0.72rem; }
.squad-list .pt-num input { width: 62px; padding: 3px 6px; font-size: 0.9rem; font-weight: 700; }
.club-initial { width: 36px; height: 36px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, 0.08); font-weight: 800; font-size: 1rem; color: #cbd5e1; }
.club-logo-field { display: flex; gap: 16px; align-items: flex-start; }
.club-team-act { display: flex; gap: 6px; }
.field-row { display: flex; align-items: center; gap: 8px; }
.field-row input[type="text"] { flex: 1; min-width: 120px; padding: 4px 8px; height: auto; font-size: 0.88rem; }
.field-row select { width: auto; padding: 4px 28px 4px 8px; height: auto; font-size: 0.82rem; }
.field-row small { white-space: nowrap; }
@media (max-width: 768px) { .field-row { flex-wrap: wrap; } .field-row input[type="text"] { flex-basis: 100%; } }
/* Calendars (manage_calendars.php): feeds + add on the left, the selected feed's games on the right */
.cal-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 1.25rem; align-items: start; }
.cal-side, .cal-main { display: flex; flex-direction: column; gap: 1.25rem; min-width: 0; }
.cal-feeds .dir-row { padding: 8px 6px; }
.cal-feeds .dir-ico { width: 28px; font-size: 1.1rem; }
.cal-remove { display: flex; align-items: center; gap: 10px; margin: 1rem 0 0; padding-top: 1rem; border-top: 1px solid rgba(255, 255, 255, 0.06); }
.cal-remove button { width: auto; margin: 0; border-color: rgba(239, 68, 68, 0.5) !important; color: #f87171 !important; background: transparent; }
@media (max-width: 900px) { .cal-layout { grid-template-columns: minmax(0, 1fr); } .cal-main { order: -1; } }
.field-row input[type="text"] { flex: 1 1 220px; width: auto; }
.field-row small { align-self: center; margin: 0 !important; line-height: 1; }
@media (max-width: 768px) {
  body:has(.nav-bottom) .ed-save { bottom: calc(64px + env(safe-area-inset-bottom)); }
  .dir-actions .dir-del, .dir-actions .dir-mini { display: none; }
  .dir-actions:not(:has(> :not(.dir-del):not(.dir-mini))) { display: none; }
}
