/* Shared responsive polish. Loaded after page styles to keep controls consistent. */
body { font-family: system-ui, -apple-system, 'Segoe UI', sans-serif !important; }
h1, h2, h3, h4, h5, h6, .logo { font-family: inherit !important; }
[hidden] { display: none !important; }
.analytics-consent { padding: 16px; margin: 16px 0 24px; border: 1px solid #c7d2fe; border-radius: 12px; background: #eef2ff; color: #1e293b; }
.analytics-consent h2 { font-size: 20px; margin-bottom: 8px; }
.analytics-consent p { margin-bottom: 12px; }
.analytics-consent button, #analyticsPreferences { min-height: 48px; padding: 12px 16px; border: 1px solid #475569; border-radius: 8px; background: #fff; color: #1e293b; font: inherit; cursor: pointer; margin: 4px; }
:focus-visible { outline: 3px solid #4338ca !important; outline-offset: 4px; }
main, #result, #error, #loading { scroll-margin-top: 100px; }
.skip-link { position: fixed; top: 8px; left: 16px; z-index: 2000; padding: 12px 18px; background: #fff; color: #312e81; border-radius: 8px; transform: translateY(-150%); }
.skip-link:focus { transform: none; }
body > header .header-content { gap: 16px; }
.mobile-menu-btn { min-width: 48px; min-height: 48px; border-radius: 12px; }
.nav-link { min-height: 44px; display: inline-flex; align-items: center; }
header.contact-header { position: static !important; z-index: auto; backdrop-filter: none !important; box-shadow: none !important; background: transparent !important; }
.hero-section { background: #fff; border: 1px solid #dbe3ef; border-radius: 24px !important; box-shadow: 0 8px 28px rgba(15,23,42,.06) !important; }
.hero-content-col { background: linear-gradient(145deg, #fff, #eef2ff); backdrop-filter: none; }
.hero-section .subtitle { max-width: 640px; margin-bottom: 24px !important; }
.hero-section .input-group { border-radius: 16px; margin-bottom: 12px !important; }
.hero-section .url-input { min-width: 0; min-height: 52px; padding: 14px 16px !important; }
.hero-section .url-input::placeholder { color: #64748b; }
.hero-section .paste-btn, .hero-section .download-btn { min-height: 48px; white-space: nowrap; }
.tool-hint { margin: 0 auto 20px; max-width: 640px; color: #475569; font-size: 14px; }
.tool-status { margin: 16px 0; border: 1px solid #c7d2fe; background: #eef2ff; color: #312e81; padding: 14px 18px; border-radius: 12px; }
.loading-label { flex-basis: 100%; font-weight: 600; color: #334155; }
.skeleton-card { flex-wrap: wrap; }
.preview-card .preview-thumb { height: auto !important; max-height: 320px; object-fit: contain !important; }
.dl-btn-option { min-height: 52px; }
.dl-btn-option:disabled, .download-btn:disabled, .paste-btn:disabled { opacity: .65; cursor: wait; }
.faq-card summary { min-height: 52px; gap: 16px; }
.faq-card summary::after { flex-shrink: 0; }
.related-tools-strip { padding: 24px; }
.related-tools-links .rt-link { min-height: 44px; display: inline-flex; align-items: center; }
.platform-illustration { margin: 32px 0; padding: 16px; border: 1px solid #e2e8f0; border-radius: 16px; text-align: center; background: #f8fafc; }
.platform-illustration img { display: block; width: auto; max-width: 100%; max-height: 280px; margin: auto; border-radius: 8px; }
.form-input, .form-select, .form-textarea { font-size: 16px !important; }
.submit-btn { min-height: 48px; }
footer { margin-top: 48px; padding: 40px 0 24px; }
.footer-links { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 24px; align-items: start; }
.footer-group { min-width: 0; }
.footer-group summary { font-size: 15px; font-weight: 700; color: #f8fafc; cursor: pointer; list-style: none; min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.footer-group summary::-webkit-details-marker { display: none; }
.footer-group summary::after { content: '+'; font-size: 20px; }
.footer-group[open] summary::after { content: '−'; }
.footer-group ul { list-style: none; margin: 8px 0 0; padding: 0; }
.footer-group li { margin: 0; }
.footer-group a { color: #cbd5e1 !important; display: inline-flex; align-items: center; min-height: 40px; padding: 6px 0; font-size: 14px; line-height: 1.5; text-decoration: none; }
.footer-group a:hover { text-decoration: underline; text-underline-offset: 4px; }
footer :focus-visible { outline-color: #a5b4fc !important; }
@media (max-width: 1024px) and (min-width: 769px) {
    .footer-links { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
    .contact-form-card { order: -1; }
}
@media (max-width: 768px) {
    body.nav-open { overflow: hidden; }
    /* A filtered ancestor contains fixed children; keep the drawer viewport-bound. */
    body > header { padding: 8px 0 !important; background: #fff !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
    /* Fully remove the closed drawer so it cannot extend the mobile canvas. */
    .nav-links { display: none; visibility: hidden; pointer-events: none; transform: none; height: 100vh; height: 100dvh; width: min(320px, 100vw); overflow-y: auto; overscroll-behavior: contain; align-items: stretch; transition: none; }
    .nav-links.active { display: flex; visibility: visible; pointer-events: auto; }
    .nav-link { min-height: 52px; }
    .menu-overlay { height: 100vh; height: 100dvh; }
    .footer-links { grid-template-columns: 1fr; gap: 0; }
    .footer-group { border-bottom: 1px solid #334155; padding: 6px 0; }
    .footer-group summary { min-height: 48px; }
    .footer-group a { min-height: 44px; }
    .footer-group ul { margin: 0 0 12px; }
    footer { padding-top: 24px; }
}
@media (max-width: 640px) {
    .container { padding: 0 16px !important; }
    .logo { font-size: clamp(18px, 4.8vw, 22px) !important; gap: 6px !important; }
    .hero-content-col { padding: 24px 16px; }
    .hero-section .platform-badge { display: none; }
    .hero-section .hero-h1 { font-size: clamp(27px, 7.2vw, 36px) !important; line-height: 1.18; margin-bottom: 14px !important; }
    .hero-section .subtitle { font-size: 16px !important; line-height: 1.6; margin-bottom: 20px !important; }
    .hero-section .input-group { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: stretch; padding: 8px; gap: 8px; }
    .hero-section .url-input { grid-column: 1; margin: 0; padding: 12px 8px !important; font-size: 16px !important; }
    .hero-section .paste-btn { grid-column: 2; position: static !important; transform: none !important; justify-content: center; padding: 10px !important; margin: 0 !important; min-width: 48px; }
    .hero-section .download-btn { grid-column: 1 / -1; width: 100%; margin: 0 !important; padding: 14px !important; }
    .tool-hint { font-size: 13px; margin-bottom: 16px; }
    .trust-badges-container { gap: 8px 12px; margin-top: 12px; }
    .main-article { padding: 24px 18px !important; }
    .section-title { font-size: 24px; }
    .preview-card { padding: 20px 16px; }
    .preview-info { width: 100%; min-width: 0; }
    .download-options { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
    .preview-card .dl-btn-option { margin: 0; width: 100%; min-width: 0; }
    .faq-card summary { padding: 16px; font-size: 16px; }
    .faq-content { padding: 0 16px 20px; }
    .related-tools-strip { margin-top: 28px; padding: 18px; }
    .related-tools-links { gap: 8px; }
    .related-tools-links .rt-link { padding: 10px 12px; }
    .howto-steps { grid-template-columns: minmax(0, 1fr) !important; gap: 12px !important; }
    .howto-steps > div { padding: 20px 16px !important; }
    .contact-header p { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
    button:active, .input-group:focus-within { transform: none !important; }
}
