body.elder-mode .menu-search-item,
body.elder-mode li.menu-search-item,
body.elder-mode .top-nav li.menu-search-item,
body.elder-mode .top-nav ul li.menu-search-item,
body.elder-mode .top-nav .menu-search-item a {
    display: none !important;
}/* ══════════════════════════════════════════════════════════════════
   어르신 모드 — Elder Mode
   ══════════════════════════════════════════════════════════════════ */

/* ── Toggle Button ───────────────────────────────────────────────── */

#elder-mode-btn {
    position: absolute;
    top: 7.25rem;
    z-index: 9999;
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
    padding: 0.5em 0.9em;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 2em;
    font-size: 0.8rem;
    cursor: pointer;
    backdrop-filter: blur(6px);
    transition: background 0.2s, transform 0.2s;
    user-select: none;
}

@media (min-width: 769px) {
    #elder-mode-btn {
        right: 1rem;
    }
}

#elder-mode-btn:hover {
    background: rgba(0, 0, 0, 0.85);
    transform: scale(1.05);
}

#elder-mode-btn.active {
    background: #fff;
    color: #111;
    border-color: #ccc;
}


/* ══════════════════════════════════════════════════════════════════
   ELDER MODE OVERRIDES
   ══════════════════════════════════════════════════════════════════ */

/* ── Hide everything noisy ───────────────────────────────────────── */
body.elder-mode #login-perspective,
body.elder-mode #login,
body.elder-mode .logo-hidden,
body.elder-mode .top-nav-hidden,
body.elder-mode #showMenu,
body.elder-mode #search-toggle-btn,
body.elder-mode .hackya_search,
body.elder-mode .sticky-nav,
body.elder-mode #ap-bar,
body.elder-mode .stock-container,
body.elder-mode .scroll-to-top,
body.elder-mode #sidebar,
body.elder-mode .widget-area,
body.elder-mode .sidebar,
body.elder-mode .nav-toggle {
    display: none !important;
}

/* ── Kill all 3D transforms and animations ───────────────────────── */
body.elder-mode #perspective,
body.elder-mode .container,
body.elder-mode .wrapper {
    transform: none !important;
    perspective: none !important;
    transition: none !important;
    margin-top: 0 !important;
}

/* ── Full page white background ──────────────────────────────────── */
body.elder-mode,
body.elder-mode #perspective,
body.elder-mode .container,
body.elder-mode .wrapper {
    background: #fff !important;
    color: #1a1a1a !important;
}

/* ── Header — Medium-style minimal bar ───────────────────────────── */
body.elder-mode #masthead,
body.elder-mode .site-header {
    background: #fff !important;
    background-image: none !important;
    border: none !important;
    border-bottom: 1px solid #e8e8e8 !important;
    box-shadow: none !important;
    padding: 0.75rem 2rem !important;
}

/* Kill the logo 3D spin animation */
body.elder-mode .logo-3d {
    animation: none !important;
    transform: none !important;
}

body.elder-mode .logo-scene {
    display: block !important;
}

/* ── Nav — override the blue→purple gradient directly ───────────── */
body.elder-mode .top-nav {
    background: #fff !important;
    background-image: none !important;
    border-top: none !important;
    animation: none !important;
    justify-content: center !important;
    padding: 0 !important;
}

body.elder-mode .top-nav ul {
    display: flex !important;
    gap: 0.25rem !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    align-items: center !important;
}

body.elder-mode .top-nav ul li {
    margin: 0 !important;
}

/* Links: source uses plain color:white — just override with dark text */
body.elder-mode .top-nav a,
body.elder-mode .top-nav a:link,
body.elder-mode .top-nav a:visited {
    color: #242424 !important;
    font-size: 1.25rem !important;
    font-weight: 400 !important;
    padding: 0.75em 1em !important;
    text-decoration: none !important;
}

body.elder-mode .top-nav a:hover,
body.elder-mode .top-nav a:focus,
body.elder-mode .top-nav a:active {
    color: #000 !important;
    background: #f2f2f2 !important;
    border-radius: 4px !important;
}

/* Active/current page link */
body.elder-mode .top-nav .current-menu-item > a,
body.elder-mode .top-nav .current_page_item > a {
    color: #000 !important;
    font-weight: 600 !important;
}

/* Hide the animated underline highlight span (#lit) */
body.elder-mode .top-nav #lit {
    display: none !important;
}

body.elder-mode .thumb-frame {
    display: none !important;
}

/* ── Pagination ──────────────────────────────────────────────────── */
body.elder-mode .page-numbers {
    border: 1px solid #000 !important;
    padding: 0.3em 0.6em !important;
    border-radius: 3px !important;
    display: inline-block !important;
}

body.elder-mode .page-numbers.current {
    border: none !important;
    font-weight: 700 !important;
}

/* ── "더 읽기" read-more link — strip excessive top padding ─────── */
body.elder-mode .front-view-content {
    padding: 0 0.5em 0 0 !important;
    float: none !important;
    display: inline !important;
    font-weight: 400 !important;
}

/* ── Mobile dropdown menu — clear boundaries ─────────────────────── */
@media (max-width: 768px) {
    body.elder-mode .top-nav ul ul,
    body.elder-mode .top-nav .sub-menu {
        background: #fff !important;
        border: 1px solid #ddd !important;
        border-radius: 6px !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
        margin: 0.25rem 0 0.5rem 0 !important;
        padding: 0.25rem 0 !important;
        overflow: hidden !important;
    }

    body.elder-mode .top-nav ul li {
        border-bottom: 1px solid #eee !important;
    }

    body.elder-mode .top-nav ul li:last-child {
        border-bottom: none !important;
    }

    /* Indent sub-menu items so hierarchy is obvious */
    body.elder-mode .top-nav .sub-menu li a {
        padding-left: 2rem !important;
        font-size: 1.1rem !important;
        color: #555 !important;
        -webkit-text-fill-color: #555 !important;
    }

    body.elder-mode .top-nav .sub-menu li a:hover {
        background: #f5f5f5 !important;
        color: #000 !important;
        -webkit-text-fill-color: #000 !important;
    }
}

/* Search icon — muted, consistent with Medium style */
body.elder-mode .top-nav .menu-search-item a {
    color: #6b6b6b !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.3em !important;
}

body.elder-mode .top-nav .menu-search-item a:hover {
    color: #000 !important;
    background: #f2f2f2 !important;
}

/* ── Content area — centered narrow column ───────────────────────── */
body.elder-mode .wrapper {
    max-width: 100% !important;
    padding: 0 !important;
}

body.elder-mode main,
body.elder-mode .site-main,
body.elder-mode article,
body.elder-mode .single-section,
body.elder-mode .page-content {
    max-width: 720px !important;
    margin: 2rem auto !important;
    float: none !important;
    width: 100% !important;
    padding: 0 1rem !important;
    box-sizing: border-box !important;
    background: #fff !important;
}

/* ── Typography — Medium.com style ──────────────────────────────── */
body.elder-mode {
    font-size: 20px !important;
    line-height: 1.9 !important;
}

body.elder-mode h1,
body.elder-mode h2,
body.elder-mode h3,
body.elder-mode h4 {
    color: #242424 !important;
    font-weight: 700 !important;
    line-height: 1.4 !important;
    /* Kill any gradient text the theme applies to headings */
    background: none !important;
    background-image: none !important;
    -webkit-background-clip: unset !important;
    background-clip: unset !important;
    -webkit-text-fill-color: #242424 !important;
}

body.elder-mode p {
    font-size: 1em !important;      /* ~20px — inherits elder-mode base */
    color: #292929 !important;
    margin-bottom: 1.5em !important;
    line-height: 1.9 !important;
}

/* General links — dark gray, not blue */
body.elder-mode a {
    color: #242424 !important;
    text-decoration: none !important;
    background: none !important;
    background-image: none !important;
    -webkit-background-clip: unset !important;
    background-clip: unset !important;
    -webkit-text-fill-color: #242424 !important;
}

body.elder-mode a:hover,
body.elder-mode .front-title a:hover,
body.elder-mode a:focus {
    color: #000 !important;
    -webkit-text-fill-color: #000 !important;
    background: none !important;
    background-image: none !important;
    -webkit-background-clip: unset !important;
    background-clip: unset !important;
    text-decoration: underline !important;
}

/* Post/article h1 — keep size, neutral left border */
body.elder-mode .post.type-post h1,
body.elder-mode .post h1 {
    font-size: 1.25em !important;
    border-left: 0.25em solid #555 !important;
    padding-left: 0.5em !important;
    color: #242424 !important;
    -webkit-text-fill-color: #242424 !important;
    background: none !important;
    background-image: none !important;
}

/* Post/article title cards — strip gradient borders, go neutral */
body.elder-mode .post.type-post h2,
body.elder-mode .post h2 {
    color: #242424 !important;
    font-weight: 700 !important;
    border-bottom: 0.025em solid #ddd !important;
    border-left: 0.25em solid #aaa !important;
    padding-bottom: 0.25em !important;
    padding-left: 0.5em !important;
    background: none !important;
    background-image: none !important;
    -webkit-text-fill-color: #242424 !important;
}

/* ── Mobile nav — large hamburger, theme JS handles the toggle ───── */
@media (max-width: 768px) {
    /* Show the hamburger, properly sized for older users */
    body.elder-mode .nav-toggle {
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        gap: 5px !important;
        width: 48px !important;
        height: 48px !important;
        padding: 10px !important;
        background: none !important;
        border: 1px solid #ccc !important;
        border-radius: 6px !important;
        cursor: pointer !important;
    }

    /* Make the three bars dark and clearly visible on white */
    body.elder-mode .nav-toggle span {
        display: block !important;
        width: 100% !important;
        height: 2px !important;
        background: #242424 !important;
        border-radius: 2px !important;
    }

    /* Keep .top-nav visible so the menu can open into it */
    body.elder-mode .top-nav {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        border: 1px solid #ddd !important;
        border-radius: 6px !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12) !important;
        overflow: hidden !important;
        margin: 0.25rem 1rem !important;
    }
}

/* ── Footer — left-aligned, clean ───────────────────────────────── */
body.elder-mode footer {
    background: #f9f9f9 !important;
    border-top: 1px solid #eee !important;
    border-left: none !important;
    border-right: none !important;
    border-bottom: none !important;
    box-shadow: none !important;
    color: #444 !important;
    padding: 2rem !important;
    text-align: left !important;
}

/* Logo in footer — left aligned */
body.elder-mode footer .footer-logo,
body.elder-mode footer h2 {
    text-align: left !important;
    margin: 0 0 1rem 0 !important;
}

/* Email row — icon and text side by side */
body.elder-mode .footer-email-row {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 0.5em !important;
}

body.elder-mode .footer-email-row .icon-email,
body.elder-mode .footer-email-row .email-icon {
    display: inline-flex !important;
    flex-shrink: 0 !important;
    width: 1.2em !important;
    height: 1.2em !important;
}

body.elder-mode .footer-email-row .email {
    display: inline !important;
    line-height: 1 !important;
}

/* Force the white paths in the SVG logo to show on white bg */
body.elder-mode footer #footer_logo path[fill="#ffffff"] {
    fill: #242424 !important;
}

body.elder-mode footer a {
    color: #444 !important;
}

/* Block-display only for standalone footer nav/widget links, not inline text */
body.elder-mode footer li a,
body.elder-mode footer .widget a {
    display: block !important;
    margin-bottom: 0.4rem !important;
}

body.elder-mode footer a:hover {
    color: #1a73e8 !important;
}

/* Email links — larger and clearly clickable */
body.elder-mode footer a[href^="mailto"] {
    font-size: 1.1rem !important;
    color: #1a73e8 !important;
    text-decoration: underline !important;
}

/* ── Elder mode button — top-left on mobile ─────────────────────── */
@media (max-width: 768px) {
    #elder-mode-btn {
        left: 1rem;
    }
}
