.afd-share-open { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 44px; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 10px; background: transparent; color: #3643ba; cursor: pointer; touch-action: manipulation; }
.afd-share-open svg { display: block; width: 22px; height: 22px; }
.afd-share-open:focus-visible { outline: 2px solid #3643ba; outline-offset: 2px; }
.afd-share-open:active, .afd-share-open[data-ready="true"] { background: #e8ebfc; }
@media (hover: hover) { .afd-share-open:hover { background: #eef0fb; } }
.afd-compact-header .global-nav:has(.afd-share-open) { align-items: center; gap: 8px; }
.afd-share-layer { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom)); background: transparent; }
.afd-share-layer[hidden] { display: none; }
.afd-share-card { position: relative; display: grid; place-items: center; width: 160px; height: 64px; max-width: 100%; box-sizing: border-box; border: 0; background: transparent; }
.afd-share-send:focus-visible, .afd-share-retry:focus-visible { outline: 3px solid #3643ba; outline-offset: 3px; }
.afd-share-loader, .afd-share-send { position: absolute; inset: 0; margin: auto; }
.afd-share-loader { width: 44px; height: 44px; opacity: 0; transform: translateY(-5px) scale(.93); transition: opacity .16s ease, transform .24s cubic-bezier(.2,.75,.2,1); pointer-events: none; }
.afd-share-card[data-share-state="loading"] .afd-share-loader { opacity: 1; transform: none; }
.afd-share-three-body { --uib-size: 44px; --uib-speed: .8s; --uib-color: #3643ba; position: relative; display: inline-block; width: var(--uib-size); height: var(--uib-size); animation: afd-share-spin-three calc(var(--uib-speed) * 2.5) infinite linear; }
.afd-share-dot { position: absolute; width: 30%; height: 100%; }
.afd-share-dot::after { content: ''; position: absolute; width: 100%; height: 0; padding-bottom: 100%; background-color: var(--uib-color); border-radius: 50%; }
.afd-share-dot:nth-child(1) { bottom: 5%; left: 0; transform: rotate(60deg); transform-origin: 50% 85%; }
.afd-share-dot:nth-child(1)::after { bottom: 0; left: 0; animation: afd-share-wobble-one var(--uib-speed) infinite ease-in-out; animation-delay: calc(var(--uib-speed) * -.3); }
.afd-share-dot:nth-child(2) { bottom: 5%; right: 0; transform: rotate(-60deg); transform-origin: 50% 85%; }
.afd-share-dot:nth-child(2)::after { bottom: 0; left: 0; animation: afd-share-wobble-one var(--uib-speed) infinite ease-in-out; animation-delay: calc(var(--uib-speed) * -.15); }
.afd-share-dot:nth-child(3) { bottom: -5%; left: 0; transform: translateX(116.666%); }
.afd-share-dot:nth-child(3)::after { top: 0; left: 0; animation: afd-share-wobble-two var(--uib-speed) infinite ease-in-out; }
@keyframes afd-share-spin-three { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes afd-share-wobble-one { 0%, 100% { transform: translateY(0) scale(1); opacity: 1; } 50% { transform: translateY(-66%) scale(.65); opacity: .8; } }
@keyframes afd-share-wobble-two { 0%, 100% { transform: translateY(0) scale(1); opacity: 1; } 50% { transform: translateY(66%) scale(.65); opacity: .8; } }
.afd-share-send { display: flex; align-items: center; justify-content: center; gap: 7px; width: 112px; height: 44px; padding: 0; border: 0; border-radius: 17px; background: #3643ba; color: #fff; box-shadow: 0 18px 34px #3643ba4d, 0 7px 14px #17233926, inset 0 1px 0 #ffffff35; font: 650 16px/1 system-ui; letter-spacing: .02em; cursor: pointer; touch-action: manipulation; opacity: 0; transform: translateY(7px) scale(.92); transition: opacity .2s ease, transform .34s cubic-bezier(.18,1.12,.35,1), background-color .2s ease, box-shadow .28s ease; pointer-events: none; }
.afd-share-send svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; transition: transform .24s ease; }
@media (hover: hover) { .afd-share-send:hover { background: #2c399f; } .afd-share-card[data-share-state="ready"] .afd-share-send:hover { transform: translateY(-4px); box-shadow: 0 23px 42px #3643ba57, 0 9px 16px #1723392b, inset 0 1px 0 #ffffff35; } .afd-share-send:hover svg { transform: translate(2px,-2px); } }
.afd-share-card[data-share-state="ready"] .afd-share-send { opacity: 1; transform: translateY(-2px); pointer-events: auto; transition-delay: .12s; }
.afd-share-card[data-share-state="ready"] .afd-share-send:active { transform: translateY(0) scale(.97); box-shadow: 0 6px 13px #3643ba30, 0 2px 4px #17233912; transition-delay: 0s; }
.afd-share-error { display: none; width: 100%; max-height: min(56vh, 400px); overflow: auto; padding: 22px 18px 16px; box-sizing: border-box; color: #172339; font: 14px/1.5 system-ui; text-align: center; }
.afd-share-error p { margin: 0; }
.afd-share-error a { display: block; margin-top: 10px; color: #3643ba; overflow-wrap: anywhere; text-decoration: underline; }
.afd-share-retry { min-width: 88px; min-height: 40px; margin-top: 14px; padding: 8px 16px; border: 0; border-radius: 10px; background: #3643ba; color: #fff; font: 650 14px system-ui; cursor: pointer; }
.afd-share-retry[hidden] { display: none; }
.afd-share-card[data-share-state="error"] { width: min(340px, calc(100vw - 32px)); height: auto; min-height: 112px; border: 1px solid #dce3f5; border-radius: 16px; background: #fff; box-shadow: 0 12px 36px #17233925; }
.afd-share-card[data-share-state="error"] .afd-share-loader, .afd-share-card[data-share-state="error"] .afd-share-send { display: none; }
.afd-share-card[data-share-state="error"] .afd-share-error { display: block; }
.afd-share-a11y { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) {
  .afd-share-three-body, .afd-share-dot::after, .afd-share-loader, .afd-share-send, .afd-share-send svg { animation: none !important; transition: none !important; }
}
.account-verification-note {
  display: block;
  padding: 12px;
  text-align: center;
  background: #eef0ff;
  color: #3643ba;
  font: 14px system-ui;
}
.afd-compact-dashboard main { position: relative; padding-top: 0; }
.afd-compact-dashboard main > .view { margin-top: 10px; }
.afd-compact-header { display: flex; align-items: center; flex-wrap: nowrap; height: 80px; min-height: 80px; min-width: 0; margin-bottom: 0; }
.afd-compact-header .header-left { flex: 1 1 auto; }
.afd-compact-header .header-right { flex: 0 0 auto; min-width: 0; max-width: 100%; margin-top: 0; }
.afd-top-nav {
  display: flex; align-items: center; justify-content: flex-start; gap: 8px;
  width: 100%; max-width: none; height: 52px; min-height: 52px;
  margin: 0; padding: 8px 18px; box-sizing: border-box;
  background: #fff; border-bottom: 1px solid #e2e7f0;
  flex-wrap: nowrap;
}
nav.afd-top-nav { overflow-x: auto; }
@media (min-width: 601px) { html { scrollbar-gutter: stable; } }
.afd-top-nav .afd-nav-placeholder { width: 78px; background: #f0f2f5; border-color: transparent; box-shadow: none; }
.afd-nav-status { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.afd-nav-pending { position: relative; }
.afd-nav-error { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 12px; padding: 8px 14px; background: #fff; color: #64748b; font: 13px/1.4 system-ui; }
.afd-nav-error a { color: #3643ba; }
.afd-compact-dashboard main > .afd-top-nav { width: calc(100% + 36px); margin-left: -18px; }
.afd-store-title { display: inline-flex; align-items: center; position: relative; max-width: 100%; box-sizing: border-box; }
.afd-store-title h1 { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.afd-store-title .store-select:not([hidden]) { position: absolute; inset: 0; display: block; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.afd-store-title .store-select[hidden] { display: none; }
.afd-store-title:has(.store-select:not([hidden])) { padding-right: 19px; cursor: pointer; }
.afd-store-title:has(.store-select:not([hidden]))::after { content: ''; position: absolute; right: 3px; top: calc(50% - 4px); width: 7px; height: 7px; border-right: 2px solid #6b7280; border-bottom: 2px solid #6b7280; transform: rotate(45deg); pointer-events: none; }
.afd-store-title:focus-within { outline: 2px solid #3643ba; outline-offset: 4px; border-radius: 3px; }
.topbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; background: #f7f8fa; }
.topbar .topline { display: contents; }
.topbar .afd-report-store { display: flex; flex-direction: column; justify-content: center; min-width: 0; height: 80px; padding: 0 18px; }
.topbar .afd-report-store h1 { margin: 0; overflow: hidden; color: #111827; font: 700 26px/1.25 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; text-overflow: ellipsis; white-space: nowrap; }
.topbar .afd-report-store .meta { margin-top: 6px; color: #9aa0a6; font: 14px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.topbar .tools { grid-column: 2; grid-row: 1; align-self: center; padding-right: 18px; }
.topbar .tools select { min-width: min(260px, 55vw); }
.afd-weekly-feedback:not([hidden]) { position:fixed; inset:auto 16px 16px; z-index:40; width:fit-content; max-width:calc(100vw - 32px); margin:auto; padding:12px 16px; background:#fff; color:#111827; border:1px solid #d1d5db; border-radius:10px; box-shadow:0 3px 16px #0002; }
.afd-weekly-feedback button { margin-left:8px; min-height:36px; padding:4px 12px; }
.topbar > .afd-top-nav { grid-column: 1 / -1; grid-row: 2; }
.topbar > .nav { grid-column: 1 / -1; grid-row: 3; background: #fff; }
.topbar > .sport-nav { grid-column: 1 / -1; grid-row: 4; background: #fff; }
@media (min-width:601px) and (max-width:760px) {
  .topbar .tools { grid-column:1 / -1; grid-row:3; min-height:48px; justify-content:flex-end; padding:6px 14px; background:#fff; }
  .topbar > .nav { grid-row:4; }
  .topbar > .sport-nav { grid-row:5; }
}
.afd-profile-page, .afd-profile-loading { background: #f7f8fa; }
.afd-profile-page .page-header, .afd-profile-loading .page-header { height: 80px; min-height: 80px; padding: 0 18px; background: #f7f8fa; border-bottom: 0; }
.afd-profile-page .page-header .brand, .afd-profile-loading .page-header .brand { display: none; }
.afd-profile-page .account-store-heading { display: block; min-width: 0; }
.afd-profile-page .account-store-heading h1 { margin: 0; overflow: hidden; color: #111827; font: 700 26px/1.25 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; text-overflow: ellipsis; white-space: nowrap; }
.afd-profile-page .account-store-heading .meta { margin-top: 6px; color: #9aa0a6; font: 14px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.afd-top-nav[hidden] { display: none; }
.afd-profile-loading .afd-top-nav[hidden] { display: flex; visibility: hidden; }
.afd-top-nav .tab-button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 34px; padding: 7px 13px; border: 1px solid #e2e7f0;
  border-radius: 9px; background: #fff; color: #090909;
  box-shadow: 4px 4px 9px #17233916, -4px -4px 9px #ffffff;
  font: 600 13px/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-decoration: none; white-space: nowrap; box-sizing: border-box;
  transition: background-color .18s ease, color .18s ease, box-shadow .18s ease;
}
.afd-top-nav .tab-button:hover { transform: none; box-shadow: 4px 4px 9px #17233916, -4px -4px 9px #ffffff; }
.afd-top-nav .tab-button.active,
.afd-top-nav .tab-button[aria-current="page"] {
  border-color: #090909; background: #090909; color: #fff;
  box-shadow: 4px 5px 11px #09090935, -3px -3px 8px #fff;
}
.afd-top-nav .tab-button:active { box-shadow: inset 3px 3px 7px #17233954, inset -3px -3px 7px #ffffff24; }
.afd-top-nav .tab-button:focus-visible { outline: 2px solid #3643ba; outline-offset: 3px; }
.afd-top-nav .afd-notification-link { position: relative; }
.afd-notification-dot { position: absolute; right: -3px; top: -3px; width: 10px; height: 10px; border-radius: 50%; background: #eb4346; box-shadow: 0 0 0 2px #fff; pointer-events: none; opacity: 0; transform: scale(.2); transition: opacity .18s ease, transform .22s cubic-bezier(.2,.7,.3,1); }
.afd-notification-link[data-unread="true"] .afd-notification-dot { opacity: 1; transform: scale(1); animation: afd-notification-arrive .34s cubic-bezier(.2,.8,.3,1); }
@keyframes afd-notification-arrive { 0% { opacity: 0; transform: scale(.25); } 65% { opacity: 1; transform: scale(1.18); } 100% { opacity: 1; transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .afd-notification-dot { animation: none !important; transition: none !important; } }
.afd-release-page { min-width: 320px; margin: 0; background: #f7f8fa; color: #111827; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", sans-serif; -webkit-font-smoothing: antialiased; }
.afd-release-header { display: flex; align-items: center; min-height: 80px; padding: 0 18px; box-sizing: border-box; }
.afd-release-header .store-name { margin: 0; font-size: 26px; font-weight: 700; line-height: 1.24; letter-spacing: -.035em; }
.afd-release-header .store-meta { margin: 6px 0 0; color: #949ca8; font-size: 13px; line-height: 1.4; }
.afd-release-main { width: min(760px, calc(100% - 36px)); margin: 0 auto; padding: 30px 0 72px; box-sizing: border-box; }
.afd-release-main h1 { margin: 0 0 10px; font-size: clamp(29px, 4vw, 34px); line-height: 1.2; letter-spacing: -.04em; }
.afd-release-row { padding: 16px 2px 17px; border-bottom: 1px solid #e1e5eb; }
.afd-release-row-head { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; }
.afd-release-row h2 { margin: 0; font-size: 18px; line-height: 1.3; letter-spacing: -.025em; }
.afd-release-row time { flex: none; color: #858c98; font-size: 12.5px; font-weight: 500; white-space: nowrap; }
.afd-release-row p { margin: 6px 0 0; color: #303744; font-size: 14px; line-height: 1.55; overflow-wrap: anywhere; white-space: pre-line; }
.afd-release-row p.bug-fix { color: #555e6d; }
.afd-release-older summary { width: fit-content; margin: 16px auto 0; padding: 10px 18px; border: 1px solid #e8e8e8; border-radius: 10px; background: #e8e8e8; color: #090909; font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer; list-style: none; box-shadow: 6px 6px 12px #c5c5c5, -6px -6px 12px #fff; transition: box-shadow .3s ease, color .3s ease; }
.afd-release-older summary::-webkit-details-marker { display: none; }
.afd-release-older summary:focus-visible { outline: 2px solid #3643ba; outline-offset: 3px; }
.afd-release-older summary:active,
.afd-release-older[open] summary { color: #666; box-shadow: inset 4px 4px 12px #c5c5c5, inset -4px -4px 12px #fff; }
.afd-release-older[open] summary { margin-bottom: 6px; }
.afd-release-collapse, .afd-release-older[open] .afd-release-expand { display: none; }
.afd-release-older[open] .afd-release-collapse { display: inline; }
@media (prefers-reduced-motion: reduce) { .afd-release-older summary { transition: none; } }
.afd-compact-dashboard .overview-heading {
  margin: 0;
  padding: 12px 12px 8px;
  border: 1px solid #e5e7eb;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: #fff;
}
.afd-compact-dashboard .overview-heading + .grid {
  margin-bottom: 10px;
  border: 1px solid #e5e7eb;
  border-radius: 0 0 8px 8px;
  background: #fff;
  box-shadow: none;
}
@media (max-width: 375px) {
  .afd-compact-dashboard .overview-heading,
  .afd-compact-dashboard .overview-heading + .grid,
  .afd-compact-dashboard .view[data-view="realtime"] .chart-block,
  .afd-compact-dashboard .view[data-view="realtime"] .region-details {
    margin-left: -10px;
    margin-right: -10px;
  }
  .afd-compact-dashboard .overview-heading + .grid .card {
    padding-left: 4px;
    padding-right: 4px;
    column-gap: 2px;
  }
}
@media (max-width: 325px) {
  .afd-compact-dashboard .overview-heading + .grid .delta { font-size: 12px; }
}
@media (max-width: 900px) {
  .afd-compact-dashboard main > .afd-top-nav { width: calc(100% + 28px); margin-left: -14px; }
}
@media (max-width: 650px) {
  .afd-compact-header { position: relative; }
  .afd-compact-header .header-left { padding-right: 0; }
  .afd-compact-header .afd-store-title { max-width: calc(100% - 112px); }
  .afd-compact-header .header-right { position: absolute; top: 8px; right: 0; }
}
@media (max-width: 600px) {
  .afd-release-header { padding: 0 14px; }
  .afd-release-header .store-name { font-size: 21px; }
  .afd-release-header .store-meta { font-size: 12px; }
  .afd-release-main { width: calc(100% - 28px); padding: 20px 0 54px; }
  .afd-release-row { padding: 15px 0 16px; }
  .afd-release-row p { font-size: 13.5px; }
  .afd-top-nav {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: repeat(2, 32px);
    gap: 6px; height: 88px; min-height: 88px; padding: 8px 14px;
  }
  nav.afd-top-nav { overflow: visible; }
  .afd-top-nav .tab-button { width: 100%; min-width: 0; height: 32px; padding: 5px 2px; font-size: 12px; }
  .afd-compact-header .header-right { margin-top: 0; }
  .topbar .afd-report-store { padding: 0 14px; }
  .topbar .afd-report-store h1, .afd-profile-page .account-store-heading h1 { font-size: 21px; }
  .topbar .tools { grid-column: 1 / -1; grid-row: 3; min-height: 48px; justify-content: flex-end; padding: 6px 14px; background: #fff; }
  .topbar > .nav { grid-row: 4; }
  .topbar > .sport-nav { grid-row: 5; }
  .afd-profile-page .page-header, .afd-profile-loading .page-header { padding: 0 14px; }
}
@media (max-width: 480px) {
  .afd-compact-header h1 { font-size: 21px; line-height: 1.25; }
  .afd-compact-header .meta { margin-top: 4px; font-size: 12px; }
  .afd-compact-header .global-nav { font-size: 12px; }
  .afd-compact-dashboard .chart-channel-note { display: none; }
}
@media (max-width: 340px) {
  .afd-compact-header h1 { font-size: 18px; }
}
/* Keep the gear outside the horizontally scrolling business entries on every viewport. */
nav.afd-top-nav:has(.afd-settings-gear) { overflow: visible; min-width: 0; gap: 8px; }
.afd-business-tabs { display: flex; align-items: center; gap: 8px; flex: 1 1 0; min-width: 0; overflow-x: auto; padding: 5px 4px; scrollbar-width: none; }
.afd-business-tabs::-webkit-scrollbar { display: none; }
.afd-business-tabs > * { flex: 0 0 auto; }
.afd-top-nav .afd-settings-gear { flex: 0 0 44px; width: 44px; min-height: 34px; padding: 6px; margin-left: auto; }
.afd-settings-back { display: inline-block; margin: 14px 0; color: #3643ba; font: 14px system-ui; text-decoration: none; }
.afd-important-notices { height: 32px; min-height: 32px; box-sizing: border-box; position: relative; overflow: hidden; background: #f7f8fa; padding: 0 12px; display: flex; align-items: center; gap: 8px; }
.afd-important-notices[hidden] { display: none; }
.afd-important-notices button { display: block; overflow: hidden; min-width: 0; flex: 1; height: 28px; padding: 0; border: 0; background: transparent; color: #66521d; font: 13px system-ui; text-align: left; cursor: pointer; white-space: nowrap; }
.afd-important-notices button[hidden] { display: none; }
.afd-important-notices button span { display: inline-block; padding-right: 28px; animation: afd-notice-scroll 18s linear infinite; }
.afd-important-notices:hover button span,.afd-important-notices:focus-within button span { animation-play-state: paused; }
.afd-notice-feedback { flex: 0 1 auto; max-width: 40%; font: 12px system-ui; color: #b42318; }
@keyframes afd-notice-scroll { 0%,15% { transform: translateX(0); } 85%,100% { transform: translateX(min(0px, calc(var(--notice-room, 0px) - 100%))); } }
@media (prefers-reduced-motion: reduce) { .afd-important-notices button span { animation: none; } .afd-important-notices button { text-overflow: ellipsis; } }
.afd-settings-fold { margin: 10px 0; background: #fff; border: 1px solid #e0e5ef; border-radius: 12px; overflow: hidden; }
.afd-settings-fold > summary { display: flex; align-items: center; gap: 12px; padding: 18px; min-height: 68px; box-sizing: border-box; cursor: pointer; list-style: none; }
.afd-settings-fold > summary::-webkit-details-marker,.afd-group-summary::-webkit-details-marker { display: none; }
.afd-settings-fold > summary strong { flex: 0 0 auto; font-size: 17px; }
.afd-settings-fold > summary small { margin-left: auto; font-size: 12px; color: #778191; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.afd-settings-fold > summary::after { content: '›'; color: #778191; font-size: 22px; }
.afd-settings-fold[open] > summary::after { transform: rotate(90deg); }
.afd-settings-fold-body { border-top: 1px solid #edf0f5; padding: 16px; }
.afd-settings-fold-body .settings-section-title { justify-content: flex-end; }
.afd-settings-fold .management-group-row { display: block; padding: 0; }
.afd-group-summary { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr) auto; gap: 12px; padding: 15px 12px; cursor: pointer; list-style: none; font-size: 14px; }
.afd-group-summary span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.afd-group-summary span:last-child { color: #778191; font-size: 12px; }
.afd-group-editor { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr) auto auto; gap: 10px; padding: 12px; border-top: 1px solid #edf0f5; }
.afd-group-editor .management-summary { grid-column: 1/-1; white-space: normal; }
.afd-group-editor input { width: 100%; box-sizing: border-box; }
.afd-compact-dashboard:has([data-view="settings"].active) main { padding-bottom: 140px; }
.afd-compact-dashboard [data-view="settings"] .settings-actions { position: fixed; right: max(16px,env(safe-area-inset-right)); bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 40; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; max-width: min(400px,calc(100vw - 32px)); padding: 0; }
.afd-compact-dashboard .settings-actions [data-save-settings] { min-width: 88px; min-height: 44px; border-radius: 14px; box-shadow: 0 6px 22px #17233924; }
.afd-compact-dashboard .settings-actions [data-save-settings]:disabled { opacity: .55; }
.afd-compact-dashboard .settings-actions .settings-status { max-width: 100%; font-size: 12px; line-height: 1.5; text-align: right; padding: 6px 10px; border-radius: 9px; background: #f7f8faf5; }
.afd-compact-dashboard:has(dialog[open]) .settings-actions { visibility: hidden; }
.afd-settings-fold summary:focus-visible { outline: 2px solid #3643ba; outline-offset: -4px; }
@media(max-width:600px) { .afd-settings-fold > summary { flex-wrap: wrap; gap: 6px; } .afd-settings-fold > summary small { flex: 1 0 100%; order: 2; margin-left: 0; } .afd-settings-fold > summary::after { margin-left: auto; } .afd-group-editor { grid-template-columns: minmax(0,1fr) minmax(0,1fr); } }
nav.afd-top-nav { display: flex; height: 52px; min-height: 52px; padding: 4px 10px; box-sizing: border-box; }
.afd-business-tabs .tab-button { width: auto; min-height: 34px; height: 34px; padding: 7px 13px; font-size: 13px; }
.afd-top-nav .afd-settings-gear { min-height: 44px; height: 44px; }
.afd-business-tabs .tab-button[hidden] { display: none; }
.settings-actions .afd-discard-draft { border: 0; padding: 4px 8px; background: transparent; color: #697386; font: 12px system-ui; text-decoration: underline; cursor: pointer; }
.settings-actions .afd-discard-draft[hidden] { display: none; }

/* Shared right edge: header and nav use the same inset as the main content. */
.afd-top-nav .afd-settings-gear {display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;border:0;box-shadow:none;background:transparent;border-radius:10px;padding:0;}
.afd-top-nav .afd-settings-gear.active {background:#eef0f3;color:#000;box-shadow:none;}
.afd-settings-gear img {display:block;width:24px;height:24px;}
.afd-settings-gear .afd-notification-dot {right:3px;top:3px;}
.afd-compact-dashboard .comparison-toggle {right:0;width:44px;}
.afd-compact-dashboard .afd-global-channel {right:50px;}
.afd-compact-dashboard .comparison-anchor {top:8px;}
.afd-compact-dashboard [data-overview-channel-toggle],.afd-compact-dashboard [data-chart-channel-toggle] {display:none!important;}
.afd-compact-dashboard .chart-heading {display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);padding:0;gap:0;}
.afd-compact-dashboard .chart-heading > h2 {grid-column:2;grid-row:1;}
.afd-compact-dashboard .chart-heading > :not(h2) {grid-column:3;grid-row:1;justify-self:end;}

nav.afd-top-nav {padding-left:18px;padding-right:18px;}
@media(max-width:900px) {nav.afd-top-nav {padding-left:14px;padding-right:14px;}}
.settings-controls .seg-button.active {background:#000;border-color:#000;}
.settings-controls .seg-button {min-height:44px;padding:6px 10px;font-size:12px;}

/* Shared animated settings switches, adapted from:
 * https://uiverse.io/TCdesign-dev/strange-zebra-89
 * MIT License - Copyright (c) 2026 TCdesign-dev (Custyyyy)
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */

.settings-controls:has(.preview-toggle){display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 20px!important;align-items:center}
.settings-switch-row{display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:0;min-height:44px;text-align:left}
.settings-switch-row[hidden]{display:none!important}
.settings-switch-label{font:500 13px system-ui;color:#111827;line-height:1.4;min-width:0}
button.preview-toggle{appearance:none!important;position:relative;display:inline-block!important;flex:none!important;width:55px!important;min-width:55px!important;max-width:55px!important;height:25px!important;min-height:25px!important;margin:0!important;padding:0!important;border:0!important;border-radius:25px!important;background:#e2e5e9!important;box-shadow:none!important;font-size:0!important;color:transparent!important;cursor:pointer;transition:background .35s ease-in-out}
button.preview-toggle::before{content:'';position:absolute;left:2.5px;top:2.5px;width:20px;height:20px;border-radius:50%;background:linear-gradient(45deg,#f0f3f5,#fff);box-shadow:0 3px 5px #0002;transition:transform .35s ease-in-out}
button.preview-toggle::after{content:'· ·';position:absolute;left:8px;top:7px;width:9px;height:9px;color:#9b9b9b;font:600 12px/5px 'Times New Roman',serif;letter-spacing:-1px;border-bottom:1px solid #9b9b9b;border-radius:0 0 6px 6px;transition:transform .35s ease-in-out;pointer-events:none}
button.preview-toggle[aria-checked="true"]{background:#0bd46f!important}
button.preview-toggle[aria-checked="true"]::before{transform:translateX(30px)}
button.preview-toggle[aria-checked="true"]::after{transform:translateX(30px) rotateY(360deg)}
button.preview-toggle:disabled{opacity:.4!important;cursor:not-allowed}
button.preview-toggle:focus-visible{outline:2px solid #0bd46f!important;outline-offset:4px}
.share-choices:has(.preview-toggle){display:grid!important;grid-template-columns:1fr;gap:6px}
@media(max-width:480px){.settings-controls:has(.preview-toggle){grid-template-columns:1fr}}
@media(prefers-reduced-motion:reduce){button.preview-toggle,button.preview-toggle::before,button.preview-toggle::after{transition:none}}
[data-afd-settings-section="features"] > summary small,[data-afd-settings-section="board"] > summary small,
[data-afd-settings-section="features"] .setting-note,[data-afd-settings-section="board"] .setting-note{display:none!important}
