:root {
  --text: #16191f;
  --muted: rgba(22, 25, 31, .62);
  --glass: rgba(255, 255, 255, .67);
  --glass-strong: rgba(255, 255, 255, .84);
  --glass-border: rgba(255, 255, 255, .55);
  --shadow: 0 18px 48px rgba(25, 31, 44, .16);
  --shadow-soft: 0 10px 28px rgba(25, 31, 44, .12);
  --radius-xl: 34px;
  --radius-lg: 26px;
  --radius-md: 18px;
  --page-max: 900px;
  --shortcut-columns: 5;
  --accent: #202731;
  --danger: #b42318;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body { min-height: 100vh; margin: 0; color: var(--text); overflow-x: hidden; }
button, input, select { font: inherit; }
button { cursor: pointer; }
svg { display: block; }

.background-layer {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at 16% 10%, rgba(255,255,255,.35), transparent 28%),
    radial-gradient(circle at 80% 35%, rgba(255,255,255,.11), transparent 23%),
    linear-gradient(180deg, #75abc6 0%, #a7c0d1 31%, #f0ad9e 58%, #8088aa 77%, #2e374c 100%);
  transform: scale(1.02);
  transition: background .45s ease, filter .45s ease;
}

body.bg-ocean .background-layer {
  background:
    radial-gradient(circle at 14% 10%, rgba(255,255,255,.33), transparent 28%),
    radial-gradient(circle at 80% 72%, rgba(118,229,231,.14), transparent 27%),
    linear-gradient(180deg, #78b8ca 0%, #83b6c9 30%, #76a2b9 54%, #55728f 75%, #28394d 100%);
}

body.bg-dusk .background-layer {
  background:
    radial-gradient(circle at 12% 12%, rgba(255,247,227,.30), transparent 28%),
    radial-gradient(circle at 75% 48%, rgba(255,164,128,.18), transparent 24%),
    linear-gradient(180deg, #9b93b8 0%, #bf9bb1 31%, #eda88e 58%, #a66f82 76%, #3e3856 100%);
}

body.bg-midnight {
  --text: #f4f6fb;
  --muted: rgba(244, 246, 251, .68);
  --glass: rgba(25, 31, 45, .64);
  --glass-strong: rgba(29, 36, 52, .78);
  --glass-border: rgba(255, 255, 255, .11);
  --accent: #f5f7fb;
}

body.bg-midnight .background-layer {
  background:
    radial-gradient(circle at 22% 12%, rgba(102,133,191,.18), transparent 27%),
    radial-gradient(circle at 78% 65%, rgba(122,99,176,.18), transparent 25%),
    linear-gradient(180deg, #172033 0%, #222d43 43%, #2d3148 68%, #171b29 100%);
}

body.dynamic-bg .background-layer { animation: skyShift 17s ease-in-out infinite alternate; }
@keyframes skyShift {
  0% { transform: scale(1.02) translate3d(0,0,0); filter: saturate(1); }
  100% { transform: scale(1.055) translate3d(-.5%, -.5%, 0); filter: saturate(1.05); }
}

.page-shell {
  width: min(100%, var(--page-max));
  min-height: 100vh;
  margin: 0 auto;
  padding: calc(env(safe-area-inset-top) + 16px) 22px calc(env(safe-area-inset-bottom) + 42px);
}

.topbar { display: flex; align-items: center; justify-content: space-between; min-height: 54px; }
.topbar-actions { display: flex; align-items: center; gap: 4px; flex: 0 0 auto; }
.weather-chip, .icon-btn, .text-btn, .close-btn { border: 0; color: inherit; }
.weather-chip {
  display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 9px 10px;
  border-radius: 15px; background: transparent; font-size: 16px; font-weight: 680;
  transition: background .2s ease, transform .2s ease;
}
.weather-chip:hover { background: rgba(255,255,255,.13); }
.weather-chip:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.weather-chip:active { transform: scale(.98); }
.weather-icon { font-size: 19px; }
.weather-place { max-width: 145px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icon-btn {
  width: 46px; height: 46px; display: grid; place-items: center; border-radius: 15px; background: transparent;
  transition: background .2s ease, transform .2s ease;
}
.icon-btn:hover { background: rgba(255,255,255,.13); }
.icon-btn:active { transform: scale(.96); }
.icon-btn svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.settings-gear { display: block; flex-shrink: 0; aspect-ratio: 1 / 1; fill: none; stroke: currentColor; stroke-width: 2.3; stroke-linecap: round; stroke-linejoin: round; }
#settingsBtn .settings-gear { width: 25px; height: 25px; stroke-width: 2.3; }
.account-icon-btn { position: relative; }
.account-session-indicator { position: absolute; right: 8px; bottom: 8px; width: 9px; height: 9px; border: 2px solid rgba(255,255,255,.96); border-radius: 50%; background: #30a46c; box-shadow: 0 1px 4px rgba(0,0,0,.2); }
.account-session-indicator[hidden] { display: none; }

.hero { padding-top: clamp(34px, 6.8vh, 72px); text-align: center; }
h1 {
  margin: 0 0 48px; font-size: clamp(54px, 12vw, 88px); line-height: .95; font-weight: 420;
  letter-spacing: -4px; text-shadow: 0 7px 30px rgba(255,255,255,.17);
}

.searchbar {
  width: min(100%, 730px); height: 66px; margin: 0 auto; padding: 0 15px 0 19px;
  display: flex; align-items: center; gap: 13px; background: var(--glass-strong);
  border: 1px solid var(--glass-border); border-radius: 999px; box-shadow: var(--shadow);
  backdrop-filter: blur(20px) saturate(1.08); -webkit-backdrop-filter: blur(20px) saturate(1.08);
  transition: transform .2s ease, box-shadow .2s ease, background .3s ease;
}
.searchbar:focus-within { transform: translateY(-1px); box-shadow: 0 20px 56px rgba(25,31,44,.22); }
.search-logo {
  width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%;
  background: #fff; color: #4285f4; font-weight: 850; box-shadow: 0 3px 10px rgba(0,0,0,.08);
}
.searchbar input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: clamp(17px,3.8vw,21px); color: var(--text); }
.searchbar input::placeholder { color: var(--muted); opacity: 1; }
.search-submit { width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; color: var(--text); display: grid; place-items: center; }
.search-submit svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

.shortcuts-section { margin-top: 50px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; padding: 0 6px; }
.section-heading h2 { margin: 0; font-size: 17px; font-weight: 780; letter-spacing: -.2px; }
.text-btn { padding: 8px 10px; border-radius: 12px; background: transparent; font-weight: 700; }
.text-btn:hover { background: rgba(255,255,255,.14); }
.text-btn.active { background: rgba(255,255,255,.22); }
.section-title-controls { display: flex; align-items: center; gap: 6px; min-width: 0; }
.section-icon-btn {
  width: 32px; height: 32px; flex: 0 0 32px; display: inline-grid; place-items: center;
  padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--muted);
  cursor: pointer; transition: color .16s ease;
}
.section-icon-btn .settings-gear { width: 20px; height: 20px; }
.section-icon-btn:hover { color: var(--text); }
.section-icon-btn:focus-visible { outline: 2px solid currentColor; outline-offset: 1px; }
.section-icon-btn.active { color: var(--text); }
.manage-hint { margin: -2px 6px 16px; color: var(--muted); font-size: 12px; }

.shortcuts-grid {
  display: grid; grid-template-columns: repeat(var(--shortcut-columns), minmax(0, 1fr));
  gap: 22px 12px; touch-action: pan-y; transition: gap .2s ease;
}
.shortcuts-grid[data-columns="4"] { --shortcut-columns: 4; }
.shortcuts-grid[data-columns="5"] { --shortcut-columns: 5; }
.shortcuts-grid[data-columns="6"] { --shortcut-columns: 6; }
.shortcut-item { position: relative; min-width: 0; user-select: none; -webkit-user-select: none; }
.shortcut-tile {
  width: 100%; border: 0; background: transparent; color: inherit; text-align: center; text-decoration: none;
  display: block; padding: 0; -webkit-tap-highlight-color: transparent;
}
.shortcut-icon {
  width: clamp(56px, 11vw, 76px); aspect-ratio: 1; margin: 0 auto 9px; display: grid; place-items: center;
  border-radius: 50%; background: rgba(255,255,255,.84); border: 1px solid rgba(255,255,255,.45);
  box-shadow: var(--shadow-soft); font-weight: 800; font-size: clamp(21px,5vw,32px); overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease, background .2s ease;
}
body.bg-midnight .shortcut-icon { background: rgba(255,255,255,.88); color: #202631; }
.shortcut-tile:hover .shortcut-icon { transform: translateY(-2px); box-shadow: 0 13px 31px rgba(25,31,44,.18); }
.shortcut-tile:active .shortcut-icon { transform: scale(.96); }
.shortcut-icon img { width: 100%; height: 100%; object-fit: contain; image-rendering: auto; padding: 13%; }
.shortcut-icon { color: #334155; }
.shortcut-icon-options { min-width: 0; margin: 0; padding: 12px 14px; border: 1px solid var(--line, rgba(100,116,139,.2)); border-radius: 14px; }
.shortcut-icon-options legend { padding: 0 5px; font-weight: 650; }
.shortcut-icon-options > label:not(.shortcut-custom-icon-field) { display: inline-flex; align-items: center; gap: 7px; margin: 4px 16px 2px 0; }
.shortcut-icon-options input[type="radio"] { accent-color: var(--accent, #5277d8); }
.shortcut-custom-icon-field { display: grid; gap: 6px; margin-top: 8px; }
.shortcut-custom-icon-field[hidden] { display: none; }
.shortcut-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 590; text-shadow: 0 1px 14px rgba(255,255,255,.28); }

.add-shortcut .shortcut-icon { font-size: 33px; font-weight: 300; color: #2f343c; }
.shortcut-edit-badge {
  position: absolute; top: -4px; right: calc(50% - 40px); width: 26px; height: 26px; border: 0; border-radius: 50%;
  display: none; place-items: center; background: rgba(25,29,37,.88); color: #fff; box-shadow: 0 5px 15px rgba(0,0,0,.18); z-index: 2;
}
.shortcut-edit-badge svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; }
.shortcuts-grid.manage-mode .shortcut-edit-badge { display: grid; }
.shortcuts-grid.manage-mode .shortcut-item:not(.add-item) { cursor: grab; }
.shortcuts-grid.manage-mode .shortcut-item:not(.add-item) .shortcut-icon { animation: shortcutWiggle 1.25s ease-in-out infinite alternate; }
.shortcuts-grid.manage-mode .shortcut-item:nth-child(even) .shortcut-icon { animation-delay: -.55s; }
.shortcuts-grid.manage-mode .shortcut-item.dragging { opacity: .58; cursor: grabbing; transform: scale(.97); z-index: 4; }
.shortcuts-grid.manage-mode .shortcut-item.dragging .shortcut-icon { animation: none; transform: scale(1.06); box-shadow: 0 18px 38px rgba(25,31,44,.24); }
@keyframes shortcutWiggle { from { transform: rotate(-.6deg); } to { transform: rotate(.6deg); } }

.sports-section { margin-top: 62px; }
.sports-list { display: grid; gap: 12px; }
.match-card {
  min-height: 92px; padding: 18px 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: var(--glass); border: 1px solid var(--glass-border); border-radius: var(--radius-lg); box-shadow: var(--shadow);
  backdrop-filter: blur(20px) saturate(1.06); -webkit-backdrop-filter: blur(20px) saturate(1.06);
}
.match-main { min-width: 0; display: flex; align-items: center; gap: 14px; }
.team-badge { flex: 0 0 auto; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 14px; background: rgba(255,255,255,.64); }
.team-name { font-weight: 760; }
.match-meta { margin-top: 3px; color: var(--muted); font-size: 13px; line-height: 1.35; }
.empty-state { width: 100%; border: 1px dashed var(--glass-border); border-radius: var(--radius-lg); padding: 22px 18px; background: rgba(255,255,255,.26); color: var(--muted); text-align: center; }
button.empty-state { color: var(--muted); }
.empty-state strong { display: block; margin-bottom: 4px; color: var(--text); }

.dialog {
  width: min(92vw, 470px); max-height: min(90vh, 760px); overflow: auto; border: 1px solid rgba(255,255,255,.72);
  border-radius: 28px; padding: 0; background: rgba(250,250,252,.97); color: #171a20;
  box-shadow: 0 30px 100px rgba(0,0,0,.28);
}
.dialog::backdrop { background: rgba(11,18,30,.40); backdrop-filter: blur(7px); -webkit-backdrop-filter: blur(7px); }
.dialog form, .dialog-body { padding: 22px; }
.dialog-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 20px; }
.teams-dialog .dialog-head { position: static; }
.teams-dialog .close-btn {
  position: sticky;
  top: 0;
  z-index: 3;
  margin-left: auto;
  background: #fafafc;
}
.dialog h3 { margin: 0; font-size: 23px; letter-spacing: -.4px; }
.eyebrow { margin: 0 0 3px; color: #7a808b; font-size: 11px; font-weight: 820; text-transform: uppercase; letter-spacing: .08em; }
.close-btn { width: 38px; height: 38px; flex: 0 0 auto; border-radius: 50%; background: transparent; font-size: 28px; line-height: 1; color: #30343a; }
.close-btn:hover { background: #eceef2; }
.dialog label { display: grid; gap: 7px; margin: 14px 0; font-size: 13px; font-weight: 720; }
.dialog input[type="text"], .dialog input[type="url"], .dialog input[type="number"], .dialog input[type="search"], .dialog select {
  width: 100%; border: 1px solid #d8dbe1; border-radius: 14px; padding: 13px 14px; outline: none; background: #fff; color: #1f2329;
}
.dialog input:focus, .dialog select:focus { border-color: #68839a; box-shadow: 0 0 0 3px rgba(104,131,154,.13); }
.switch-row { grid-template-columns: 1fr auto !important; align-items: center; }
.compact-switch { padding: 12px 0; }
.compact-switch span { display: grid; gap: 2px; }
.compact-switch strong { font-size: 13px; }
.compact-switch small { color: #7a808b; font-weight: 500; }
.compact-switch input[type="checkbox"] { width: 21px; height: 21px; accent-color: #252d39; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.split-actions { justify-content: space-between; align-items: center; }
.actions-right { display: flex; gap: 10px; }
.primary-btn, .secondary-btn, .danger-btn { border: 0; border-radius: 14px; padding: 11px 16px; font-weight: 760; }
.primary-btn { background: #202833; color: #fff; }
.secondary-btn { background: #eceef2; color: #292d34; }
.danger-btn { background: #fff0ee; color: var(--danger); }
.full-width { width: 100%; }
.settings-group { padding: 2px 0 15px; border-bottom: 1px solid #eceef2; }
.settings-group + .settings-group { padding-top: 15px; }
.settings-group:last-of-type { border-bottom: 0; }
.settings-group h4 { margin: 0 0 9px; font-size: 14px; }
.language-setting-row { min-height: 40px; display: flex; align-items: center; justify-content: space-between; gap: 14px; font-size: 13px; font-weight: 720; }
.language-picker { position: relative; flex: 0 1 auto; min-width: 0; }
.language-picker-trigger { display: inline-flex; align-items: center; gap: 8px; max-width: 220px; min-height: 38px; padding: 6px 9px; border: 1px solid #d8dbe1; border-radius: 12px; background: #fff; color: #222832; font-size: 13px; font-weight: 650; }
.language-picker-trigger:hover { background: #f7f8fa; }
.language-picker-trigger:focus-visible, .language-picker-panel input:focus-visible, .language-picker-panel [role="option"]:focus-visible { outline: 2px solid #68839a; outline-offset: 2px; }
.language-selected-icon, .language-option-icon { display: inline-grid; flex: 0 0 auto; width: 22px; height: 16px; place-items: center; }
.language-flag { display: block; width: 22px; height: 15px; border-radius: 2px; }
.language-globe { display: block; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.language-chevron { color: #717985; font-size: 14px; }
.language-picker-panel { position: absolute; z-index: 20; top: calc(100% + 7px); right: 0; width: min(360px, calc(100vw - 48px)); max-height: min(380px, 65vh); display: flex; flex-direction: column; padding: 9px; border: 1px solid #dfe2e7; border-radius: 16px; background: #fff; box-shadow: 0 18px 50px rgba(22,28,38,.22); }
.language-picker-panel[hidden] { display: none; }
.language-picker-panel > input { flex: 0 0 auto; width: 100%; margin: 0 0 7px; padding: 10px 12px; border: 1px solid #d8dbe1; border-radius: 11px; }
.language-picker-panel ul { min-height: 0; overflow-y: auto; margin: 0; padding: 0; list-style: none; }
.language-picker-panel li[hidden] { display: none; }
.language-picker-panel [role="option"] { width: 100%; min-height: 38px; display: grid; grid-template-columns: 24px minmax(0,1fr) auto; align-items: center; gap: 8px; padding: 7px 8px; border: 0; border-radius: 9px; background: transparent; color: #222832; text-align: start; }
.language-picker-panel [role="option"]:hover, .language-picker-panel [role="option"].selected { background: #eef2f6; }
.language-picker-panel [role="option"].selected { font-weight: 750; }
.language-picker-panel [role="option"]:disabled { opacity: .62; cursor: not-allowed; }
.language-picker-panel [role="option"] > small { color: #818894; font-size: 10px; }
.language-picker-panel [role="option"] .language-fallback { grid-column: 2 / -1; justify-self: start; margin-top: -4px; color: #8a6a37; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; clip-path: inset(50%); }
.location-button { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; margin-top: 2px; padding: 8px 12px; font-size: 12px; }
.location-button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.location-button:disabled { cursor: wait; opacity: .72; }
.location-status { margin-top: 8px; color: #58616d; font-size: 12px; line-height: 1.4; }
.location-status.is-error { color: #9b332b; }
.account-summary { color: #626873; font-size: 13px; line-height: 1.45; white-space: pre-line; }
.account-home-view > h4 { margin: 0 0 9px; font-size: 14px; }
.account-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.account-actions[hidden] { display: none; }
.account-sync-status { margin-top: 10px; }
.inline-status.error { background: #fff0ee; color: #8e3028; }
.account-conflict { margin-top: 12px; padding: 12px; border-radius: 15px; background: #f0f2f5; }
.account-conflict p { margin: 0; color: #4b5058; font-size: 13px; }
.account-conflict h5 { margin: 0 0 6px; font-size: 14px; }
.account-conflict > p { margin-bottom: 10px; }
.account-sync-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; align-items: start; }
.account-sync-choice { min-width: 0; }
.account-sync-choice[hidden] { display: none; }
.account-sync-choice .secondary-btn, .account-sync-choice .primary-btn { width: 100%; }
.account-sync-choice p { margin-top: 5px; font-size: 11px; line-height: 1.35; }
.account-sync-choices > .secondary-btn { justify-self: start; }
@media (max-width: 520px) { .account-sync-choices { grid-template-columns: 1fr; } }
.account-links { justify-content: space-between; }
.account-dialog .dialog-body { padding: 22px; }
.account-dialog form { padding: 0; }
.account-dialog .dialog-head { align-items: center; }
.account-turnstile, .account-turnstile-slot { min-height: 66px; margin: 10px 0; }
.account-dialog .dialog-actions { flex-wrap: wrap; }
.recovery-code { display: block; overflow-wrap: anywhere; padding: 14px; border-radius: 13px; background: #eceef2; color: #202833; font-size: 16px; font-weight: 800; text-align: center; }
.account-dialog .helper-text { margin: 0 0 12px; }
.two-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.background-options { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; margin: 12px 0 8px; }
.background-option { position: relative; min-height: 70px; margin: 0 !important; padding: 8px; align-content: end; border-radius: 15px; overflow: hidden; color: #fff; font-size: 11px !important; text-shadow: 0 1px 5px rgba(0,0,0,.45); cursor: pointer; }
.background-option input { position: absolute; top: 7px; right: 7px; width: 17px; height: 17px; accent-color: #fff; }
.bg-preview-aurora { background: linear-gradient(150deg,#78aec8,#f1ad9d 58%,#495473); }
.bg-preview-ocean { background: linear-gradient(150deg,#78bbcc,#76a2b9 58%,#2f465e); }
.bg-preview-dusk { background: linear-gradient(150deg,#9d94b7,#efa98f 58%,#4a3e5a); }
.bg-preview-midnight { background: linear-gradient(150deg,#1a2437,#2d3650 58%,#161b29); }

/* Compact settings layout: preserve the existing controls and visual language. */
#settingsDialog form { padding: 24px 26px; }
#settingsDialog .dialog-head { margin-bottom: 14px; }
#settingsDialog .settings-group { padding: 0 0 10px; }
#settingsDialog .settings-group + .settings-group { padding-top: 10px; }
#settingsDialog .settings-group h4 { margin-bottom: 6px; }
#settingsDialog .background-options { margin: 8px 0 4px; }
#settingsDialog .background-option { min-height: 58px; padding: 5px; }
#settingsDialog .compact-switch { margin: 2px 0; padding: 3px 0; }
#settingsDialog .compact-switch span { display: block; }
#settingsDialog .compact-switch small { display: none; }
#settingsDialog .language-setting-row { min-height: 34px; }
#settingsDialog .settings-shortcuts-group > label {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin: 4px 0 9px;
}
#settingsDialog #shortcutColumnsInput { width: 190px; padding: 9px 12px; }
#settingsDialog #resetShortcutsBtn { width: auto; padding: 9px 12px; font-size: 14px; }
#settingsDialog .dialog-actions { margin-top: 14px; }
#settingsDialog .background-option span { font-size: 9px; line-height: 1.1; overflow-wrap: anywhere; }

@media (max-width: 640px) {
  #settingsDialog form { padding: 18px; }
  #settingsDialog .compact-switch { padding: 9px 0; }
  #settingsDialog .background-option { min-height: 64px; }
#settingsDialog .settings-shortcuts-group > label { grid-template-columns: 1fr; gap: 7px; }
  #settingsDialog #shortcutColumnsInput,
  #settingsDialog #resetShortcutsBtn { width: 100%; }
}

.team-search-form { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.helper-text { margin: 9px 2px 16px; color: #6a6e76; font-size: 12px; line-height: 1.45; }
.inline-status { padding: 12px 14px; margin: 10px 0; border-radius: 14px; background: #f0f2f5; color: #4b5058; font-size: 13px; }
.team-results, .favorite-teams-list { display: grid; gap: 9px; }
.team-result, .favorite-team { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 12px; border: 1px solid #e3e5e8; border-radius: 15px; background: #fff; }
.team-result-main, .favorite-team-main { display: flex; min-width: 0; align-items: center; gap: 11px; }
.team-logo { width: 38px; height: 38px; object-fit: contain; flex: 0 0 38px; }
.team-copy { min-width: 0; }
.team-copy strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-copy small { color: #757982; }
.team-action { flex: 0 0 auto; border: 0; border-radius: 12px; padding: 9px 12px; font-weight: 750; background: #eef0f3; color: #2b3037; }
.team-action.add { background: #202833; color: #fff; }
.team-action.remove { color: #9b2c2c; }
.dialog-subheading { display: flex; justify-content: space-between; align-items: center; margin: 22px 2px 10px; }
.dialog-subheading h4 { margin: 0; font-size: 15px; }

.match-card.real-match { align-items: stretch; }
.match-info { flex: 1; min-width: 0; display: grid; gap: 9px; }
.match-league { color: var(--muted); font-size: 12px; font-weight: 720; }
.match-team-row { display: grid; grid-template-columns: 30px minmax(0,1fr) auto; align-items: center; gap: 10px; }
.match-team-logo { width: 28px; height: 28px; object-fit: contain; }
.match-team-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 720; }
.match-score { min-width: 30px; text-align: right; font-weight: 850; font-variant-numeric: tabular-nums; }
.match-side { min-width: 74px; display: flex; flex-direction: column; justify-content: center; align-items: flex-end; gap: 4px; text-align: right; }
.match-time { font-weight: 820; font-variant-numeric: tabular-nums; }
.match-status { font-size: 11px; font-weight: 850; color: var(--muted); text-transform: uppercase; }
.match-status.live { color: #b42318; }
.match-status.final { color: #475467; }

@media (max-width: 640px) {
  .page-shell { padding-left: 18px; padding-right: 18px; }
  .topbar { gap: 8px; }
  .weather-chip { min-width: 0; }
  .weather-place { max-width: min(31vw, 145px); }
  h1 { margin-bottom: 43px; }
  .searchbar { height: 61px; }
  .shortcuts-section { margin-top: 45px; }
  .shortcuts-grid { gap: 21px 8px; }
  .shortcut-name { font-size: 12px; }
  .sports-section { margin-top: 56px; }
  .dialog { width: min(100vw - 18px, 470px); border-radius: 25px; }
}

@media (max-width: 430px) {
  .topbar-actions { gap: 0; }
  .topbar-actions .icon-btn { width: 42px; height: 44px; }
  .topbar-actions .account-session-indicator { right: 6px; bottom: 7px; }
  :root { --shortcut-columns: 5; }
  .shortcut-icon { width: clamp(50px, 13.5vw, 60px); }
  .shortcuts-grid[data-columns="6"] .shortcut-icon { width: clamp(44px, 11.5vw, 52px); }
  .shortcut-edit-badge { right: calc(50% - 32px); }
  .two-columns { grid-template-columns: 1fr; gap: 0; }
  .background-options { grid-template-columns: repeat(2, 1fr); }
  .team-search-form { grid-template-columns: 1fr; }
  .split-actions { align-items: stretch; flex-direction: column; }
  .actions-right { width: 100%; }
  .actions-right > * { flex: 1; }
  .danger-btn { width: 100%; }
}

@media (min-width: 760px) {
  .page-shell { padding-left: 34px; padding-right: 34px; }
  .shortcuts-grid[data-columns="auto"] { --shortcut-columns: 6; }
}

@media (max-width: 759px) {
  .shortcuts-grid[data-columns="auto"] { --shortcut-columns: 5; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}

/* --- V0.3.1: polimento visual / maior densidade no desktop --- */
:root {
  --page-max: 920px;
}

.background-layer {
  background:
    radial-gradient(ellipse at 14% 7%, rgba(255,255,255,.38), transparent 27%),
    radial-gradient(ellipse at 82% 28%, rgba(255,255,255,.14), transparent 25%),
    radial-gradient(ellipse at 48% 58%, rgba(255,190,171,.16), transparent 30%),
    radial-gradient(ellipse at 68% 95%, rgba(43,55,85,.25), transparent 36%),
    linear-gradient(180deg, #77aec8 0%, #abc5d5 30%, #f1b0a1 56%, #818aaa 76%, #303a50 100%);
}

.background-layer::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(110deg, rgba(255,255,255,.055), transparent 34%, rgba(255,255,255,.025) 65%, transparent),
    radial-gradient(ellipse at center, transparent 44%, rgba(20,28,45,.08) 100%);
}

.hero {
  padding-top: clamp(20px, 3.8vh, 44px);
}

h1 {
  margin-bottom: 36px;
  font-size: clamp(50px, 8vw, 72px);
  font-weight: 410;
  letter-spacing: -3.2px;
}

.searchbar {
  width: min(100%, 720px);
  height: 64px;
  box-shadow: 0 16px 42px rgba(25,31,44,.15);
}

.shortcuts-section {
  margin-top: 38px;
}

.section-heading {
  margin-bottom: 12px;
  padding: 0 4px;
}

.section-heading h2 {
  font-size: 15.5px;
  font-weight: 720;
  letter-spacing: -.1px;
}

.text-btn {
  padding: 7px 9px;
  font-size: 14px;
  font-weight: 650;
  color: var(--muted);
}

.text-btn:hover,
.text-btn.active {
  color: var(--text);
}

.shortcuts-grid {
  gap: 20px 12px;
}

.shortcut-icon {
  width: clamp(55px, 10vw, 72px);
  margin-bottom: 8px;
}

.shortcut-name {
  font-size: 12.5px;
}

.sports-section {
  margin-top: 44px;
}

.match-card {
  min-height: 78px;
  padding: 15px 18px;
  border-radius: 22px;
  box-shadow: 0 13px 36px rgba(25,31,44,.13);
}

.empty-state {
  padding: 16px 18px;
  border-radius: 22px;
}

.empty-state strong {
  margin-bottom: 3px;
}

@media (min-width: 900px) and (min-height: 700px) {
  .page-shell {
    padding-top: calc(env(safe-area-inset-top) + 14px);
    padding-bottom: calc(env(safe-area-inset-bottom) + 28px);
  }
}

@media (max-width: 640px) {
  .hero { padding-top: clamp(24px, 6vh, 48px); }
  h1 {
    margin-bottom: 35px;
    font-size: clamp(48px, 15vw, 62px);
    letter-spacing: -2.8px;
  }
  .shortcuts-section { margin-top: 39px; }
  .sports-section { margin-top: 46px; }
  .section-heading h2 { font-size: 15px; }
  .text-btn { font-size: 13px; }
}


/* V0.3.2 — NewPage + opção de esconder o nome */
h1 {
  font-size: clamp(42px, 6.2vw, 60px);
  margin-bottom: 24px;
  letter-spacing: -2.6px;
  font-weight: 430;
}
.hero {
  padding-top: clamp(16px, 3vh, 34px);
}
body.hide-brand .hero {
  padding-top: clamp(2px, 1.2vh, 12px);
}
body.hide-brand h1 {
  display: none;
}
body.hide-brand .searchbar {
  margin-top: 0;
}
body.hide-brand .shortcuts-section {
  margin-top: 28px;
}
body.hide-brand .sports-section {
  margin-top: 34px;
}
@media (max-width: 640px) {
  h1 {
    font-size: clamp(38px, 12vw, 52px);
    margin-bottom: 22px;
    letter-spacing: -2.2px;
  }
  .hero {
    padding-top: clamp(12px, 3vh, 26px);
  }
  body.hide-brand .hero {
    padding-top: 0;
  }
  body.hide-brand .shortcuts-section {
    margin-top: 26px;
  }
  body.hide-brand .sports-section {
    margin-top: 32px;
  }
}


/* V0.3.3 — título mais discreto e ocultação robusta */
#brand[hidden] { display: none !important; }
#brand {
  font-size: clamp(34px, 4.8vw, 48px);
  line-height: 1;
  margin-bottom: 20px;
  letter-spacing: -1.9px;
  font-weight: 430;
}
.hero { padding-top: clamp(10px, 2.2vh, 24px); }
body.hide-brand .hero { padding-top: 0; }
body.hide-brand .searchbar { margin-top: 0; }
body.hide-brand .shortcuts-section { margin-top: 24px; }
body.hide-brand .sports-section { margin-top: 30px; }
@media (max-width: 640px) {
  #brand {
    font-size: clamp(32px, 9vw, 42px);
    margin-bottom: 18px;
    letter-spacing: -1.5px;
  }
  .hero { padding-top: 8px; }
  body.hide-brand .hero { padding-top: 0; }
  body.hide-brand .shortcuts-section { margin-top: 22px; }
  body.hide-brand .sports-section { margin-top: 28px; }
}


/* V0.3.4 — reorganização por manter premido + arrastar */
.shortcuts-grid.manage-mode .shortcut-item:not(.add-item) {
  cursor: default;
}

.shortcuts-grid.manage-mode .shortcut-item:not(.add-item) .shortcut-icon {
  cursor: grab;
  touch-action: none;
}

.shortcuts-grid.manage-mode .shortcut-item.drag-ready .shortcut-icon {
  animation: none;
  cursor: grabbing;
  transform: scale(1.07);
  box-shadow:
    0 0 0 4px rgba(255,255,255,.34),
    0 18px 38px rgba(25,31,44,.24);
}

.shortcuts-grid.manage-mode .shortcut-item.dragging {
  opacity: .78;
  cursor: grabbing;
  transform: scale(.98);
  z-index: 10;
}

.shortcuts-grid.manage-mode .shortcut-item.dragging .shortcut-icon {
  animation: none;
  cursor: grabbing;
  transform: scale(1.10);
  box-shadow:
    0 0 0 5px rgba(255,255,255,.42),
    0 22px 44px rgba(25,31,44,.30);
}

.shortcuts-grid.manage-mode .shortcut-item.dragging .shortcut-name {
  font-weight: 720;
}


/* V0.3.5 — drag-and-drop robusto no modo Organizar */
.shortcuts-grid.manage-mode {
  touch-action: pan-y;
}

.shortcuts-grid.manage-mode .shortcut-item:not(.add-item) .shortcut-icon {
  touch-action: none !important;
  -webkit-user-drag: none;
  user-select: none;
  -webkit-user-select: none;
}

.shortcuts-grid.manage-mode .shortcut-item:not(.add-item) .shortcut-icon img {
  pointer-events: none;
  -webkit-user-drag: none;
  user-select: none;
}

.shortcuts-grid.manage-mode .shortcut-item.drag-ready .shortcut-icon,
.shortcuts-grid.manage-mode .shortcut-item.dragging .shortcut-icon {
  outline: 3px solid rgba(255,255,255,.72);
  outline-offset: 3px;
}

.shortcuts-grid.manage-mode .shortcut-item.dragging {
  transition: none !important;
}


/* V0.3.6 — drag visual real com logótipo a acompanhar o ponteiro */
.shortcuts-grid.manage-mode .shortcut-item {
  transition:
    transform .16s ease,
    opacity .16s ease;
}

.shortcut-placeholder {
  min-width: 0;
  border-radius: 22px;
  background: rgba(255,255,255,.13);
  border: 2px dashed rgba(255,255,255,.62);
  box-shadow: inset 0 0 0 1px rgba(20,28,45,.06);
  animation: shortcutPlaceholderPulse 1.05s ease-in-out infinite alternate;
}

@keyframes shortcutPlaceholderPulse {
  from { background: rgba(255,255,255,.08); }
  to   { background: rgba(255,255,255,.19); }
}

.shortcut-drag-ghost {
  position: fixed !important;
  inset: auto auto auto auto !important;
  left: 0 !important;
  top: 0 !important;
  z-index: 99999 !important;
  margin: 0 !important;
  pointer-events: none !important;
  opacity: .94;
  will-change: transform;
  transform-origin: center;
  filter: drop-shadow(0 18px 24px rgba(20,28,45,.28));
}

.shortcut-drag-ghost .shortcut-tile {
  transform: scale(1.07);
}

.shortcut-drag-ghost .shortcut-icon {
  transform: scale(1.06);
  box-shadow:
    0 0 0 4px rgba(255,255,255,.55),
    0 18px 42px rgba(25,31,44,.28);
}

.shortcut-drag-ghost .shortcut-name {
  font-weight: 760;
}

.shortcut-drag-ghost .shortcut-edit-badge {
  display: none !important;
}

.shortcut-item.drag-source {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .shortcuts-grid.manage-mode .shortcut-item,
  .shortcut-placeholder {
    transition: none;
    animation: none;
  }
}


/* V0.4.0 — futebol: equipas, ligas e favoritas */
.football-settings-section {
  padding: 2px 0 20px;
}

.football-settings-section + .football-settings-section {
  margin-top: 20px;
  padding-top: 22px;
  border-top: 1px solid rgba(28, 34, 46, .10);
}

.football-settings-title {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.football-settings-title h4 {
  margin: 0 0 3px;
  font-size: 16px;
}

.football-settings-title p,
.football-helper {
  margin: 0;
  color: #6b7280;
  font-size: 12px;
  line-height: 1.45;
}

.dialog-subheading small {
  color: #6b7280;
  font-size: 12px;
}

.favorite-team.is-favorite {
  border-color: rgba(184, 134, 11, .34);
  background: rgba(255, 248, 220, .70);
}

.favorite-team-main {
  min-width: 0;
}

.favorite-toggle {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border: 0;
  border-radius: 11px;
  background: #eef0f3;
  color: #68707b;
  display: grid;
  place-items: center;
  font-size: 22px;
  line-height: 1;
}

.favorite-toggle.active {
  background: #fff2b8;
  color: #a26d00;
}

.match-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.match-priority-badge {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(31, 41, 55, .08);
  color: #59616e;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .3px;
}

.match-priority-badge.favorite {
  background: rgba(255, 224, 112, .70);
  color: #7a5400;
}

.match-card.favorite-match {
  border: 2px solid rgba(203, 153, 24, .55);
  background:
    linear-gradient(135deg, rgba(255,250,224,.82), rgba(255,255,255,.64));
  box-shadow:
    0 16px 40px rgba(68, 54, 20, .14),
    0 0 0 1px rgba(255,255,255,.44) inset;
}

.match-card.favorite-match .match-team-name {
  font-weight: 790;
}

@media (max-width: 520px) {
  .football-settings-section + .football-settings-section {
    margin-top: 14px;
    padding-top: 18px;
  }

  .match-topline {
    align-items: flex-start;
  }

  .match-priority-badge {
    font-size: 9px;
  }
}


/* V0.4.1 — OpenFoot logo fallbacks */
.team-logo-wrap {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
}

.team-logo-letter {
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255,255,255,.72);
  color: #353c47;
  font-size: 12px;
  font-weight: 850;
  box-shadow: inset 0 0 0 1px rgba(32,39,49,.08);
}

.match-team-logo.team-logo-letter {
  width: 28px;
  height: 28px;
}

.team-logo.team-logo-letter {
  width: 38px;
  height: 38px;
}


/* V0.4.2 — Central de jogo compacta, inspirada no comportamento do Opera */
.sports-list {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 2px 10px;
  scroll-snap-type: x mandatory;
  touch-action: pan-x;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.sports-list::-webkit-scrollbar {
  display: none;
}

.sports-scroll-control { display: none; }

@media (hover: hover) and (pointer: fine) {
  .sports-list { scrollbar-width: none; }
  .sports-list::-webkit-scrollbar { display: none; }

  .sports-scroll-control {
    display: block;
    height: 20px;
    margin: 2px 2px 4px;
  }

  .sports-scroll-control[hidden] { display: none !important; }

  .sports-scroll-control input[type="range"] {
    appearance: none;
    -webkit-appearance: none;
    display: block;
    width: 100%;
    height: 20px;
    margin: 0;
    padding: 0;
    background: transparent;
    cursor: grab;
    touch-action: pan-x;
  }

  .sports-scroll-control input[type="range"]:active { cursor: grabbing; }
  .sports-scroll-control input[type="range"]:focus-visible { outline: 2px solid rgba(45, 91, 143, .8); outline-offset: 2px; border-radius: 999px; }
  .sports-scroll-control input[type="range"]::-webkit-slider-runnable-track {
    height: 8px;
    border: 1px solid rgba(39, 64, 94, .3);
    border-radius: 999px;
    background: rgba(83, 113, 145, .3);
  }
  .sports-scroll-control input[type="range"]::-moz-range-track {
    height: 8px;
    border: 1px solid rgba(39, 64, 94, .3);
    border-radius: 999px;
    background: rgba(83, 113, 145, .3);
  }
  .sports-scroll-control input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    -webkit-appearance: none;
    width: 120px;
    height: 18px;
    margin-top: -6px;
    border: 2px solid rgba(255, 255, 255, .9);
    border-radius: 999px;
    background: #385c82;
    box-shadow: 0 1px 4px rgba(21, 37, 56, .34);
    cursor: grab;
  }
  .sports-scroll-control input[type="range"]::-moz-range-thumb {
    width: 120px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, .9);
    border-radius: 999px;
    background: #385c82;
    box-shadow: 0 1px 4px rgba(21, 37, 56, .34);
    cursor: grab;
  }
  .sports-scroll-control input[type="range"]:hover::-webkit-slider-thumb,
  .sports-scroll-control input[type="range"]:active::-webkit-slider-thumb,
  .sports-scroll-control input[type="range"]:hover::-moz-range-thumb,
  .sports-scroll-control input[type="range"]:active::-moz-range-thumb {
    background: #23476e;
    cursor: grabbing;
  }
}

.sports-list > .match-card,
.sports-list > .empty-state,
.sports-list > .sports-page {
  flex: 0 0 90%;
  scroll-snap-align: start;
}

.sports-page {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, auto);
  align-content: start;
  gap: 12px;
}

.sports-page .match-card {
  width: 100%;
  min-width: 0;
}

.sports-list > .empty-state {
  min-width: min(100%, 410px);
}

.match-card.real-match {
  min-height: 112px;
}

@media (max-width: 640px) {
  .sports-scroll-control { display: none !important; }
  .sports-list {
    margin-left: -2px;
    margin-right: -18px;
    padding-right: 38px;
    scrollbar-width: none;
  }
  .sports-list::-webkit-scrollbar {
    display: none;
  }

  .sports-list > .match-card,
  .sports-list > .empty-state,
  .sports-list > .sports-page {
    flex-basis: 88%;
  }

  .sports-page {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(4, minmax(0, auto));
  }
}


/* V0.4.3 — football-data.org visual identity */
.sports-attribution {
  margin: 4px 4px 0;
  color: rgba(22,25,31,.48);
  font-size: 10px;
  line-height: 1.35;
  text-align: right;
}
.sports-attribution a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.sports-attribution a:hover { color: rgba(22,25,31,.8); }

.match-league {
  display: flex;
  align-items: center;
  gap: 7px;
}

.real-match[role="button"] { cursor: pointer; }
.real-match[role="button"]:focus-visible { outline: 2px solid rgba(55,106,155,.75); outline-offset: 3px; }
.match-status.unavailable { color: #8b5360; }
.match-details-dialog { width: min(660px, calc(100vw - 28px)); max-width: 660px; max-height: min(88vh, 900px); }
.match-details-dialog .dialog-body { overflow: auto; }
.match-detail-scoreboard { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); align-items: center; gap: 16px; padding: 10px 0 18px; text-align: center; }
.match-detail-team { min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.match-detail-team strong { overflow-wrap: anywhere; }
.match-detail-logo { width: 46px; height: 46px; object-fit: contain; }
.match-detail-score { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.match-detail-external {
  grid-column: 1 / -1;
  justify-self: center;
  max-width: 100%;
  margin-top: -6px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
  text-align: center;
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
}
.match-detail-external:hover { color: var(--text); }
.match-detail-external:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; border-radius: 3px; }
.match-detail-external-button { padding: 0; border: 0; background: transparent; font: inherit; cursor: pointer; }
.match-detail-external-state { grid-column: 1 / -1; justify-self: center; max-width: 100%; color: var(--muted); font-size: 11px; line-height: 1.25; text-align: center; }
.match-detail-external-state.unavailable { text-decoration: none; }
.match-detail-score > strong { font-size: clamp(20px, 5vw, 30px); line-height: 1.1; }
.match-detail-section { border-top: 1px solid rgba(35,45,58,.1); padding: 14px 0 2px; margin-top: 10px; }
.match-detail-section h4 { margin: 0 0 10px; }
.match-detail-section h5 { margin: 12px 0 7px; }
.match-detail-section p { margin: 6px 0; }
.match-detail-competition { display: flex; align-items: center; gap: 8px; }
.match-detail-competition-logo { width: 22px; height: 22px; object-fit: contain; }
.match-detail-halftime { color: var(--muted, #69717d); }
.match-detail-loading, .match-detail-note { color: var(--muted, #69717d); font-size: .92em; }
.match-detail-events { list-style: none; padding: 0; margin: 0; display: grid; gap: 7px; }
.match-detail-events li { display: grid; grid-template-columns: 24px 42px minmax(0,1fr); align-items: start; gap: 8px; padding: 7px 9px; border-radius: 10px; background: rgba(60,75,95,.05); }
.match-detail-event-icon { text-align: center; }
.match-detail-event-time, .match-detail-number { color: var(--muted, #69717d); font-variant-numeric: tabular-nums; }
.match-detail-event-copy { display: grid; gap: 2px; }
.match-detail-event-copy small { color: var(--muted, #69717d); }
.match-detail-rosters { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.match-detail-rosters h5 { grid-column: 1 / -1; }
.match-detail-rosters ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.match-detail-rosters li { display: grid; grid-template-columns: 28px minmax(0,1fr) auto; gap: 6px; font-size: .9em; }
.match-detail-rosters li small { color: var(--muted, #69717d); }
@media (max-width: 560px) {
  .match-details-dialog { width: calc(100vw - 18px); max-height: 92vh; }
  .match-detail-scoreboard { gap: 8px; }
  .match-detail-logo { width: 38px; height: 38px; }
  .match-detail-rosters { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .sports-attribution {
    margin-right: 0;
    padding-right: 2px;
  }
}


/* V0.4.4 — seleção direta de equipas e competições */
.team-logo-letter[hidden] { display: none !important; }
.competition-picker {
  display: flex; gap: 8px; overflow-x: auto; padding: 2px 1px 12px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch; cursor: grab;
}
.competition-picker.is-dragging { cursor: grabbing; user-select: none; -webkit-user-select: none; scroll-behavior: auto; }
.competition-picker::-webkit-scrollbar { display: none; }
.competition-chip {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px;
  min-height: 38px; padding: 7px 11px; border: 1px solid #dde1e7;
  border-radius: 999px; background: #fff; color: #343a43; font-weight: 720;
}
.competition-chip img { width: 22px; height: 22px; object-fit: contain; }
.competition-chip.active { background: #202833; border-color: #202833; color: #fff; }
.team-browser { max-height: 330px; overflow: auto; padding-right: 2px; }
.team-result.is-followed { border-color: rgba(56, 96, 162, .25); background: #f8fbff; }
.team-picker-actions { display: flex; align-items: center; gap: 7px; flex: 0 0 auto; }
.browse-star { width: 34px; height: 34px; flex-basis: 34px; }
.league-browser { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.league-select-card {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px; border: 1px solid #e3e5e8; border-radius: 15px; background: #fff;
}
.league-select-card.is-followed { border-color: rgba(56, 96, 162, .25); background: #f8fbff; }
.match-league-logo { width: 18px; height: 18px; object-fit: contain; flex: 0 0 18px; }
.match-league-logo.team-logo-letter { font-size: 8px; }
@media (max-width: 560px) {
  .league-browser { grid-template-columns: 1fr; }
  .team-browser { max-height: 380px; }
}

/* Barra de deslocamento mais visível para as categorias da Central do Jogo. */
@media (hover: hover) and (pointer: fine) {
  .competition-picker {
    scrollbar-width: auto;
    scrollbar-color: rgba(55, 78, 105, .76) rgba(83, 113, 145, .18);
  }
  .competition-picker::-webkit-scrollbar {
    display: block;
    height: 14px;
    cursor: pointer;
  }
  .competition-picker::-webkit-scrollbar-track {
    border-radius: 999px;
    background: rgba(83, 113, 145, .18);
  }
  .competition-picker::-webkit-scrollbar-thumb {
    border: 2px solid rgba(83, 113, 145, .18);
    border-radius: 999px;
    background: rgba(55, 78, 105, .76);
    background-clip: padding-box;
    cursor: grab;
  }
  .competition-picker::-webkit-scrollbar-thumb:hover {
    background: rgba(40, 61, 88, .92);
    cursor: grabbing;
  }
  .competition-picker::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
}
@media (max-width: 640px) {
  .competition-picker { scrollbar-width: none; }
  .competition-picker::-webkit-scrollbar { display: none; }
}

/* V0.4.9 — cabeçalho compacto, com título centrado entre as zonas laterais */
.topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  min-height: 50px;
  column-gap: 8px;
}
.topbar > .weather-chip { grid-column: 1; justify-self: start; max-width: 100%; }
.topbar > #brand {
  grid-column: 2;
  justify-self: center;
  margin: 0;
  font-size: clamp(32px, 3.6vw, 36px);
  line-height: 1.05;
  letter-spacing: -1.2px;
  font-weight: 520;
  white-space: nowrap;
}
.topbar > .topbar-actions { grid-column: 3; justify-self: end; }
.hero { padding-top: clamp(12px, 1.8vh, 18px); }
.hero .searchbar { margin-top: 0; }
.shortcuts-section { margin-top: 32px; }
.sports-section { margin-top: 40px; }
@media (max-width: 640px) {
  .topbar { min-height: 46px; column-gap: 4px; }
  .topbar > #brand { font-size: clamp(24px, 6vw, 28px); letter-spacing: -0.8px; }
  .topbar > .weather-chip { padding-left: 4px; padding-right: 4px; gap: 4px; font-size: 14px; }
  .topbar > .weather-chip .weather-icon { font-size: 17px; }
  .topbar > .weather-chip .weather-place { max-width: min(8vw, 40px); }
  .topbar-actions { gap: 0; }
  .topbar-actions .icon-btn { width: 42px; height: 44px; }
  .topbar-actions .account-session-indicator { right: 6px; bottom: 7px; }
  .hero { padding-top: 12px; }
  .shortcuts-section { margin-top: 28px; }
  .sports-section { margin-top: 38px; }
}

/* Compact, independent live-score strip; does not share the match-card sizing. */
.live-now-section { margin-top: 18px; }
.live-now-section[hidden] { display: none !important; }
.live-now-heading { align-items: center; margin-bottom: 9px; }
.live-now-heading h2 { margin: 0; font-size: 16px; }
.live-now-count { margin-left: 5px; color: var(--muted); font-size: 11px; font-weight: 550; white-space: nowrap; }
.live-now-more { padding: 4px 0 4px 10px; font-size: 12px; }
.live-now-more[hidden] { display: none !important; }
.live-now-list {
  display: flex;
  gap: 9px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  padding: 1px 1px 7px;
}
.live-match-card {
  flex: 0 0 clamp(180px, 19vw, 220px);
  min-width: 0;
  display: grid;
  gap: 5px;
  padding: 8px 9px;
  border: 1px solid rgba(255,255,255,.78);
  border-radius: 13px;
  background: rgba(255,255,255,.58);
  color: var(--text);
  box-shadow: 0 5px 16px rgba(25,31,44,.08);
  text-align: left;
  scroll-snap-align: start;
  cursor: pointer;
}
.live-match-card:hover { background: rgba(255,255,255,.78); }
.live-match-heading { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 5px; }
.live-match-competition { min-width: 0; overflow: hidden; color: var(--muted); font-size: 10px; font-weight: 720; text-overflow: ellipsis; white-space: nowrap; }
.live-match-minute { min-width: 40px; display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: flex-end; gap: 4px; color: #b42318; font-size: 10px; font-weight: 850; font-variant-numeric: tabular-nums; white-space: nowrap; }
.live-now-dot { width: 6px; height: 6px; display: inline-block; border-radius: 50%; background: #d92d20; }
.live-match-team { min-width: 0; display: grid; grid-template-columns: 19px minmax(0,1fr) 22px; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; line-height: 1.15; }
.live-match-team > span:not(.team-logo-wrap):not(.team-logo-letter) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-match-logo { width: 17px; height: 17px; object-fit: contain; }
.live-match-team strong { width: 22px; min-width: 22px; text-align: right; font-size: 12px; font-variant-numeric: tabular-nums; }
.live-matches-dialog { width: min(92vw, 620px); }
.live-matches-full-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; max-height: min(68vh,580px); overflow: auto; padding: 2px; }
.live-match-card-full { width: 100%; min-height: 69px; flex-basis: auto; }
@media (max-width: 640px) {
  .live-now-section { margin-top: 15px; }
  .live-match-card { flex-basis: 165px; }
  .live-matches-full-list { grid-template-columns: 1fr; }
}

/* V0.6.30 — responsive polish; presentation only. */
.shortcut-icon img {
  display: block;
  width: auto;
  height: auto;
  max-width: 58%;
  max-height: 58%;
  padding: 0;
  object-fit: contain;
}

.section-heading {
  align-items: center;
  margin-bottom: 11px;
  padding-inline: 4px;
}
.section-heading h2 { line-height: 1.25; }
.section-title-controls { gap: 6px; }
.section-title-controls .section-icon-btn { margin: 0; }
.live-now-heading { margin-bottom: 11px; }
.live-now-heading h2 { display: flex; align-items: center; min-height: 32px; }
.live-now-more { min-height: 32px; }

.shortcuts-section { margin-top: clamp(24px, 3vw, 32px); }
.sports-section { margin-top: clamp(28px, 3.5vw, 36px); }
.live-now-section { margin-top: clamp(14px, 2vw, 18px); }

.sports-section .match-card.real-match {
  gap: clamp(8px, 1.2vw, 14px);
  padding: clamp(12px, 1.5vw, 16px);
}
.match-main { gap: clamp(9px, 1.1vw, 14px); }
.match-info { min-width: 0; }
.match-team-name,
.match-team-row,
.match-side { min-width: 0; }
.match-team-row { grid-template-columns: 28px minmax(0, 1fr) auto; }
.match-side { flex: 0 0 auto; min-width: clamp(58px, 7vw, 74px); }
.match-time,
.match-status { white-space: nowrap; }

.live-now-list { gap: 9px; scroll-padding-inline: 2px; }
.live-match-card { min-height: 70px; }
.live-match-team { min-height: 16px; }
.live-match-logo { flex: 0 0 17px; }

.sports-attribution {
  color: var(--muted);
  margin-top: 5px;
}
.sports-attribution a { text-underline-offset: 2px; }

.match-details-dialog {
  display: flex;
  flex-direction: column;
  width: min(660px, calc(100vw - 24px));
  max-height: min(88vh, 900px);
  max-height: min(88dvh, 900px);
  overflow: hidden;
  overscroll-behavior: contain;
}
/* V0.6.31 — Never let the flex layout expose a closed native dialog. */
.match-details-dialog:not([open]),
.match-details-dialog[hidden] {
  display: none !important;
}
.dialog[hidden] { display: none !important; }
.match-details-dialog .dialog-body {
  min-height: 0;
  flex: 1 1 auto;
  overflow: auto;
  overscroll-behavior: contain;
  padding: clamp(15px, 3vw, 22px);
}
.match-details-dialog .dialog-head {
  position: sticky;
  top: 0;
  z-index: 2;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
  padding: 0 0 10px;
  background: rgba(250, 250, 252, .98);
}
.match-details-dialog .dialog-head h3 { min-width: 0; overflow-wrap: anywhere; }
.match-details-dialog .close-btn { background: rgba(236, 238, 242, .8); }
.match-details-dialog .close-btn:hover { background: #e5e8ed; }
.match-detail-scoreboard { gap: clamp(6px, 2vw, 14px); }
.match-detail-team { min-width: 0; }
.match-detail-team strong {
  max-width: 100%;
  font-size: clamp(12px, 3.4vw, 15px);
  line-height: 1.25;
}
.match-detail-score { min-width: 48px; }
.match-status { font-size: 10px; }

@media (max-width: 640px) {
  .shortcuts-section { margin-top: 24px; }
  .sports-section { margin-top: 30px; }
  .live-now-section { margin-top: 14px; }
  .sports-section .match-card.real-match { min-height: 100px; gap: 8px; padding: 11px; }
  .match-main { gap: 8px; }
  .match-team-row { grid-template-columns: 24px minmax(0, 1fr) auto; gap: 6px; }
  .match-team-logo { width: 24px; height: 24px; }
  .match-side { min-width: 56px; }
  .match-info { gap: 7px; }
  .match-league { min-width: 0; font-size: 11px; }
  .match-detail-scoreboard { gap: 5px; padding: 6px 0 14px; }
  .match-detail-logo { width: 34px; height: 34px; }
  .match-detail-score { min-width: 42px; }
  .match-detail-score > strong { font-size: 23px; }
  .match-detail-section { padding-top: 12px; }
}

/* V0.6.32 — mobile balance; responsive presentation only. */
@media (max-width: 640px) {
  .topbar > .weather-chip {
    min-width: 0;
    overflow: hidden;
  }
  .topbar > .weather-chip .weather-icon,
  .topbar > .weather-chip #weatherTemp { flex: 0 0 auto; }
  .topbar > .weather-chip .weather-place { max-width: none; }

  .searchbar {
    width: 100%;
    height: 58px;
    min-width: 0;
    gap: clamp(8px, 2.5vw, 12px);
    padding: 0 10px 0 12px;
  }
  .search-logo { width: 32px; height: 32px; }
  .searchbar input { min-width: 0; font-size: clamp(15px, 4.25vw, 17px); }
  .search-submit { width: 36px; height: 36px; flex: 0 0 36px; }

  .shortcuts-grid {
    grid-template-columns: repeat(auto-fit, minmax(clamp(68px, 20vw, 90px), 1fr));
    align-items: start;
    gap: 17px 8px;
  }
  .shortcuts-grid .shortcut-item { min-width: 0; }
  .shortcuts-grid .shortcut-icon {
    width: clamp(46px, 14vw, 58px);
    margin-bottom: 7px;
  }
  .shortcuts-grid .shortcut-name {
    display: -webkit-box;
    min-height: 2.4em;
    max-width: 100%;
    overflow: hidden;
    overflow-wrap: anywhere;
    white-space: normal;
    text-overflow: clip;
    line-height: 1.2;
    font-size: clamp(11px, 3.1vw, 12px);
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }
  .shortcuts-grid .add-item .shortcut-name { text-wrap: balance; }

  .sports-list {
    max-width: calc(100% + 20px);
    margin-left: 2px;
    margin-right: -18px;
    padding-left: 2px;
  }
  .match-topline { min-width: 0; gap: 6px; }
  .match-topline .match-league { flex: 1 1 auto; min-width: 0; overflow: hidden; }
  .match-topline .match-league > span:not(.team-logo-wrap):not(.team-logo-letter) {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .match-priority-badge { max-width: 44%; padding: 3px 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .match-side { min-width: 56px; }

  .live-now-list {
    width: 100%;
    max-width: 100%;
    padding: 2px 16px 7px 4px;
    scroll-padding-inline: 4px;
  }
  .sports-attribution {
    width: calc(100% - 8px);
    margin: 5px 4px 0;
    text-align: right;
  }
}

@media (max-width: 350px) {
  .topbar > .weather-chip .weather-place { display: none; }
  .topbar > .weather-chip { gap: 4px; padding-inline: 4px; }
}

@media (min-width: 641px) and (max-width: 899px) {
  .shortcuts-grid {
    grid-template-columns: repeat(auto-fit, minmax(clamp(108px, 15vw, 120px), 1fr));
  }
}

/* V0.6.34 — live scores now precede followed matches. */
@media (min-width: 900px) {
  .shortcuts-grid {
    width: min(100%, 780px);
    gap: 20px 8px;
  }

  .sports-section { margin-top: 34px; }
  .sports-attribution {
    width: 100%;
    margin: 7px 0 0;
    text-align: right;
  }
  .live-now-section { margin-top: 22px; }
  .live-now-list {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    padding-inline: 8px;
    scroll-padding-inline: 8px;
  }
}

@media (max-width: 640px) {
  .live-now-section { margin-top: 12px; }
  .sports-section { margin-top: 22px; }
}

/* V0.6.35 — tighten only the gap following a visible LIVE strip. */
@media (min-width: 900px) {
  #liveNowSection:not([hidden]) + .sports-section { margin-top: 24px; }
}
@media (max-width: 640px) {
  #liveNowSection:not([hidden]) + .sports-section { margin-top: 16px; }
}
