.ads-section { display: grid; gap: 16px; }
.ads-section h2, .ads-section h3 { margin: 0; }
.ads-intro { display: flex; align-items: start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ads-section p { overflow-wrap: anywhere; margin-block: 0; }
.ads-actions button { min-height: 44px; }
.ads-tasks, .ads-history ul { margin: 0; padding: 0; list-style: none; }
.ads-campaigns article { border-top: 1px solid var(--line); padding-block: 11px; }
.ads-history { border-top: 1px solid var(--line); padding-top: 12px; }
.ads-history summary { cursor: pointer; color: var(--blue); font-weight: 650; }
.ads-history li { margin-top: 8px; overflow-wrap: anywhere; }
.ads-player { display: grid; gap: 9px; border-radius: 14px; background: var(--soft); padding: clamp(12px, 3vw, 18px); }
.ads-player img, .ads-player video, .ads-player iframe, #ads-placement iframe {
  display: block; width: 100%; max-height: 52vh; object-fit: contain; border: 0; border-radius: 10px;
}
.ads-player iframe, #ads-placement iframe { height: 280px; background: #fff; }
.ads-player video { background: var(--navy); }
.ads-player .button { margin-block: 10px 2px; }
.ads-error { color: #8e1f2d; }
#ads-admin-message:empty { display: none; }
#ads-admin h2 { margin-bottom: 12px; }
#ads-admin .ads-intro h2 { margin-top: 9px; }
.ads-form { display: grid; gap: 14px; justify-items: stretch; margin-top: 12px; }
.ads-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; }
.ads-form label:not(.ads-check) { display: grid; gap: 4px; min-width: 0; }
.ads-check { display: flex; align-items: start; gap: 8px; }
.ads-check input { width: 18px; height: 18px; margin: 2px 0 0; flex: none; }
.ads-campaigns article { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 14px; overflow-wrap: anywhere; }
.ads-campaigns article > div:first-child { min-width: 0; }
.ads-campaigns article > div:first-child div { color: var(--muted); font-size: .88rem; }
#ads-stats { margin-block: 16px 0; }

#access { align-items: start; }
.vpn-panel { display: grid; gap: 14px; }
.vpn-panel h2, .vpn-panel h3, .vpn-panel p { margin: 0; }
.vpn-panel-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; }
.vpn-panel-header h3 { font-size: 1rem; }
.vpn-panel-meta { padding: 4px 8px; border-radius: 7px; color: #344e76; background: #edf3ff; font-size: .82rem; font-weight: 600; }
.vpn-panel-meta:empty, .vpn-panel-status:empty { display: none; }
.vpn-refresh { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 44px; padding: 5px 9px; font-size: .86rem; }
.vpn-refresh-icon { display: inline-block; font-size: 1.35rem; line-height: 1; }
.vpn-refresh[aria-busy="true"] .vpn-refresh-icon { animation: vpn-refresh-turn .75s linear infinite; }
@keyframes vpn-refresh-turn { to { transform: rotate(360deg); } }
.renewal-schedule { margin: 0; padding: 12px 14px; border: 1px solid #dce7fa; border-radius: 11px; background: #f5f8ff; }
.renewal-schedule > div + div { margin-top: 10px; padding-top: 10px; border-top: 1px solid #dce7fa; }
.renewal-schedule dt { color: var(--navy); font-size: .9rem; font-weight: 750; }
.renewal-schedule dd { margin: 3px 0 0; color: var(--muted); overflow-wrap: anywhere; }
#ads-start { min-height: 44px; justify-self: start; }
.vpn-panel-status { padding: 10px 12px; border-radius: 10px; background: #f0f4fb; color: #283e61; overflow-wrap: anywhere; }
.ads-tasks { display: grid; gap: 7px; }
.ads-tasks li { border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; overflow-wrap: anywhere; }
.ads-tasks li > div { display: flex; align-items: baseline; flex-wrap: wrap; gap: 3px 7px; }
.ads-tasks li > div > span, .ads-tasks p { color: var(--muted); font-size: .82rem; }
.ads-tasks p { margin-top: 3px; }
.ads-actions:not(:has(> button:not([hidden]))) { display: none; }
#access #wheel .cabinet-wheel { width: min(100% - 16px, 220px); margin: 4px auto; }
#access #wheel .wheel-panel-actions { justify-content: center; margin: 0; }
#access #wheel .wheel-panel-actions:not(:has(> button:not([hidden]))) { display: none; }
.wheel-last { color: var(--muted); font-size: .87rem; }
.wheel-wallet { padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.wheel-wallet h3 { margin-bottom: 6px; font-size: .95rem; }
.wheel-panel-details { display: grid; gap: 8px; border-top: 1px solid var(--line); padding-top: 10px; }
#access #wheel .wheel-panel-details details { margin: 0; }

@media (prefers-reduced-motion: reduce) { .vpn-refresh[aria-busy="true"] .vpn-refresh-icon { animation: none; } }

@media (max-width: 560px) {
  .ads-fields { grid-template-columns: minmax(0, 1fr); }
  .ads-player iframe, #ads-placement iframe { height: 240px; }
}
