@font-face {
    font-family: "Shancalluna";
    src: url("../fonts/Shancalluna_regular.ttf") format("truetype");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

html.preload body *,
html.preload body {
    transition: none !important;
}

html.dark-mode-preload *,
html.dark-mode-preload {
    transition: none !important;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    min-height: 100%;
    overscroll-behavior: none;
}

/* ── iOS Input Zoom Prevention ─────────────────────────────────────── */
@media (hover: none) and (pointer: coarse) {
    input, select, textarea {
        font-size: max(16px, 1em);
    }
}

body {
    min-height: 100vh;
}

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: #fff;
    color: #111;
    line-height: 1.5;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.navbar {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #e5e5e5;
    background-color: #fafafa;
    padding: 0.4rem 1rem;
    border-radius: 12px;
    width: min(950px, calc(100% - 2rem));
    height: 42px;
    font-size: 14px;
    margin-bottom: 3rem;
    position: sticky;
    top: 1rem;
    z-index: 999;
    transition: opacity .2s ease-out, transform .2s ease-out;
    will-change: opacity, transform;
    overflow: visible;
}
.navbar.is-hidden {
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
}

.navbar-left {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    font-size: 14px;
    color: #111;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
}

.logo i {
    font-size: 14px;
}

.docs-link {
    color: #666;
    font-weight: 400;
    text-decoration: none;
}

.docs-link:hover {
    color: #111;
}

.external-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.external-link i {
    font-size: 10px;
    opacity: 0.6;
}

/* ── Global logout spinner overlay ───────────────────── */

.global-spinner-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 9999;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.dark-mode .global-spinner-overlay {
    background: rgba(10, 10, 10, 0.72);
}

.global-spinner-overlay.active {
    display: flex;
    opacity: 1;
}

.global-spinner {
    position: relative;
    width: 36px;
    height: 36px;
}

.global-spinner span {
    position: absolute;
    top: 2px;
    left: calc(50% - 1.5px);
    width: 3px;
    height: 9px;
    border-radius: 999px;
    background: #1a1a1a;
    transform-origin: 1.5px 16px;
    opacity: 0.15;
    animation: global-apple-fade 1.2s linear infinite;
}

.dark-mode .global-spinner span {
    background: #e0e0e0;
}

.global-spinner span:nth-child(1)  { transform: rotate(0deg);   animation-delay: -1.1s; }
.global-spinner span:nth-child(2)  { transform: rotate(30deg);  animation-delay: -1.0s; }
.global-spinner span:nth-child(3)  { transform: rotate(60deg);  animation-delay: -0.9s; }
.global-spinner span:nth-child(4)  { transform: rotate(90deg);  animation-delay: -0.8s; }
.global-spinner span:nth-child(5)  { transform: rotate(120deg); animation-delay: -0.7s; }
.global-spinner span:nth-child(6)  { transform: rotate(150deg); animation-delay: -0.6s; }
.global-spinner span:nth-child(7)  { transform: rotate(180deg); animation-delay: -0.5s; }
.global-spinner span:nth-child(8)  { transform: rotate(210deg); animation-delay: -0.4s; }
.global-spinner span:nth-child(9)  { transform: rotate(240deg); animation-delay: -0.3s; }
.global-spinner span:nth-child(10) { transform: rotate(270deg); animation-delay: -0.2s; }
.global-spinner span:nth-child(11) { transform: rotate(300deg); animation-delay: -0.1s; }
.global-spinner span:nth-child(12) { transform: rotate(330deg); animation-delay:  0.0s; }

@keyframes global-apple-fade {
    0%   { opacity: 1; }
    100% { opacity: 0.15; }
}

.global-spinner-label {
    font-size: 13px;
    color: #555;
    font-family: 'Poppins', system-ui, sans-serif;
    margin: 0;
}

.dark-mode .global-spinner-label {
    color: #aaa;
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.search-box {
    display: flex;
    align-items: center;
    background-color: #f3f3f3;
    border: 1px solid #e3e3e3;
    border-radius: 8px;
    padding: 0 0.5rem;
    height: 28px;
    color: #999;
    margin-right: 10px;
}

.search-box input {
    border: none;
    outline: none;
    background: transparent;
    font-size: 13px;
    width: 200px;
    padding: 0 4px;
}

.search-placeholder-text {
    font-size: 14px;
    color: #999;
    opacity: 0.7;
    transform: scale(0.95);
    display: flex;
    align-items: center;
    font-family: 'Roboto', sans-serif;
}

.dark-mode .search-placeholder-text {
    color: #aaa;
    opacity: 0.8;
}

.shortcut {
    font-size: 11px;
    color: #999;
    margin-left: 0.4rem;
}

.theme-toggle,
.github-link {
    background: transparent;
    border: none;
    font-size: 15px;
    cursor: pointer;
    color: #111;
    padding: 2px;
}

.logout-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
    color: #666;
    font-size: 12px;
    padding: 5px 9px;
    border-radius: 7px;
    border: 1px solid #e5e5e5;
    background: transparent;
    transition: color 0.15s, background 0.15s, border-color 0.15s;
    line-height: 1;
}

.logout-link i {
    font-size: 11px;
}

.dark-mode .logout-link {
    color: #c0c0c0;
    border-color: #444;
}

.logout-link:hover {
    color: #e74c3c;
    border-color: #fca5a5;
    background: rgba(239, 68, 68, 0.05);
}

.dark-mode .logout-link:hover {
    color: #ff6b5e;
    border-color: rgba(255, 107, 94, 0.3);
    background: rgba(255, 107, 94, 0.07);
}

main {
    text-align: center;
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.title {
    font-size: 38px;
    font-weight: 700;
    margin-bottom: 1rem;
}

.subtitle {
    font-size: 15px;
    color: #555;
    margin-bottom: 1.4rem;
}

.btn-row {
    display: flex;
    justify-content: center;
    gap: 0.6rem;
    margin-bottom: 2rem;
}

.btn-row a {
    padding: 0.45rem 1rem;
    font-size: 14px;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid #ccc;
    color: #111;
    background: #fff;
}

.btn-row a:first-child {
    background: #111;
    color: #fff;
    border: none;
}

.btn-row a:hover {
    opacity: 0.9;
}

.footer {
    width: 100%;
    border-top: 1px solid #e5e5e5;
    padding: 0.55rem 1.4rem;
    font-size: 13px;
    color: #888;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    box-sizing: border-box;
}

.footer-left,
.footer-right {
    display: flex;
    gap: 0.85rem;
    align-items: center;
}

.footer a {
    text-decoration: none;
    color: #888;
    transition: color 0.2s;
}

.footer a:hover {
    color: #111;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
    text-decoration: none;
    color: inherit;
}
.logo:hover {
    opacity: 0.85;
}

.dark-mode {
    background-color: #0F0F10;
    color: #eee;
}

.dark-mode .navbar,
.dark-mode .footer {
    background-color: #1a1a1a;
    border-color: #333;
}

.dark-mode .docs-link,
.dark-mode .footer a,
.dark-mode .shortcut {
    color: #bbb;
}

.dark-mode .docs-link:hover,
.dark-mode .footer a:hover {
    color: #fff;
}

.dark-mode .search-box {
    background-color: #222;
    border-color: #444;
}

.dark-mode input {
    color: #eee;
}
.theme-toggle i,
.github-link i {
    transition: color 0.2s ease;
}

.dark-mode .theme-toggle i,
.dark-mode .github-link i {
    color: #eee;
}
.dark-mode .logo span {
    color: #ccc;
}
.dark-mode .footer-left span {
    color: #aaa;
}

#toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    pointer-events: none;
}

@media (max-width: 1400px) {
    #toast-container {
        top: 4.5rem;
    }
}

.toast-icon {
    font-family: "Material Symbols Outlined";
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 14;
    font-size: 16px; 
    transform: scale(0.75); 
    transform-origin: center;
    line-height: 1;
    margin-right: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast-text {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    line-height: 1.35;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    text-align: left;
}

.toast-close {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: #aaa;
    font-size: 16px;
    cursor: pointer;
    padding: 0;
    height: 100%;
}

.toast-message.success .toast-icon {
    color: #5cbf72;  
}
.toast-message.error .toast-icon {
    color: #e57373;  
}
.toast-message.warning .toast-icon {
    color: #f6c244; 
}
.toast-message.info .toast-icon {
    color: #64a6f2;  
}
.dark-mode .toast-message {
    background-color: #1a1a1a;
    color: #eee;
    border-color: #333;
}

.dark-mode .toast-close {
    color: #888;
}
.search-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(30, 30, 30, 0.6);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 15vh;
    z-index: 9999;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0s linear 0.25s;
}

.search-modal.active {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transition-delay: 0s;
}

.search-input-container {
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 16px;
    display: flex;
    align-items: center;
    padding: 0.75rem 1.2rem;
    gap: 0.8rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    min-width: 680px;
    max-width: 90vw;
    position: relative;
    transform: scale(1.08);
    opacity: 0;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.search-modal.active .search-input-container {
    transform: scale(1);
    opacity: 1;
}

.search-input-container input {
    flex-grow: 1;
    border: none;
    outline: none;
    font-size: 1rem;
    background: transparent;
    color: inherit;
}

.search-icon {
    font-size: 20px;
    color: #666;
    margin-right: 0.2rem;
}

.esc-label {
    font-size: 0.8rem;
    color: #888;
    padding: 0.25rem 0.7rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    background-color: #f8f8f8;
    font-family: monospace;
}

.dark-mode .search-input-container {
    background: #121212;
    border-color: #333;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.dark-mode .search-icon {
    color: #bbb;
}

.dark-mode .esc-label {
    color: #ccc;
    border-color: #444;
    background-color: #1e1e1e;
}
.search-suggestions {
    position: absolute;
    top: 100%; 
    left: 0;
    margin-top: 0.4rem;
    padding: 0;
    list-style: none;
    width: 100%; 
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 12px;
    z-index: 10000;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    max-height: 260px;
    overflow-y: auto;
    overflow-x: hidden;
    word-break: break-word;
}

.search-suggestions li {
    padding: 0.6rem 1rem;
    cursor: pointer;
    font-size: 14px;
    overflow-x: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.search-suggestions li:hover,
.search-suggestions li.active {
    background-color: #eee;
    border: 1px dashed #999;
    margin: -1px; 
}

.dark-mode .search-suggestions {
    background: #1a1a1a;
    border-color: #333;
    color: #eee;
}

.dark-mode .search-suggestions li:hover,
.dark-mode .search-suggestions li.active {
    background-color: #2c2c2c;
    border: 1px dashed #777;
}
.search-suggestions.hidden {
    display: none;
    border: none;
    box-shadow: none;
}
.suggestion-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.suggestion-info {
    flex-grow: 1;
    overflow: hidden;
}

.suggestion-main {
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 1.2;
    padding: 2px 0;
}

.suggestion-email {
    font-size: 12px;
    color: #888;
}

.suggestion-code {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 140px;
    justify-content: flex-end; 
    flex-shrink: 0;
}

.code-text .digit {
    display: inline-block;
    animation: otpDigitFlyUp 200ms ease-out;
}

.countdown-circle {
    transform: rotate(90deg) scaleX(-1);
}

.circle-bg {
    fill: none;
    stroke: #ccc;
    stroke-width: 3;
}

.circle-fg {
    fill: none;
    stroke: rgb(246, 81, 81);
    stroke-width: 3;
    stroke-linecap: round;
    transition: stroke-dashoffset 1s linear;
    stroke-dasharray: 100;
    stroke-dashoffset: 0;
}

.dark-mode .circle-bg {
    stroke: #333;
}

.dark-mode .circle-fg {
    stroke: #39f;
}
body:not(.dark-mode) .search-modal {
    background-color: rgba(255, 255, 255, 0.6);
}
.suggestion-main .material-symbols-outlined {
    font-size: 18px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1px; 
}
.search-suggestions li.company-entry {
    padding: 0.5rem 1rem;
}
.select-wrapper {
    position: relative;
    display: inline-block;
}

.select-wrapper select {
    appearance: none;
    border: none;
    outline: none;
    background-color: #f3f3f3;
    font-size: 13px;
    padding: 4px 32px 4px 8px;
    width: 180px;
    cursor: pointer;
    border-radius: 6px;
    color: inherit;
    transition: none !important;
}

.select-wrapper::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 10px;
    pointer-events: none;
    width: 10px;
    height: 6px;
    transform: translateY(-50%);
    mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'><path d='M0 0l5 6 5-6' fill='white'/></svg>") no-repeat center / contain;
    background-color: #666;
}

.dark-mode .select-wrapper select {
    background-color: #222;
}

.dark-mode .select-wrapper::after {
    background-color: #ccc;
}
@keyframes toastSlideUpMobile {
    0% {
        opacity: 0;
        transform: translateY(16px) scale(0.97);
    }
    60% {
        opacity: 1;
        transform: translateY(-3px) scale(1.005);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes toastFlyInTop {
    0% {
        opacity: 0;
        transform: translateY(-100%) scale(0.95);
    }
    50% {
        opacity: 1;
        transform: translateY(4%) scale(1.01);
    }
    70% {
        transform: translateY(-1%) scale(0.99);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes toastFlyOutVideo {
    0% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
    20% {
        transform: translateX(-4%) scale(0.99);
    }
    100% {
        opacity: 0;
        transform: translateX(120%) scale(0.95);
    }
}

.toast-message {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    border: 1px solid #e5e5e5;
    background-color: #fafafa;
    color: #111;
    padding: 0.4rem 0.6rem;
    border-radius: 12px;
    font-size: 13px;
    width: fit-content;
    max-width: min(560px, calc(100vw - 2rem));
    min-height: 42px;
    pointer-events: auto;
    transform: translateY(-100%);
    opacity: 0;
    will-change: transform, opacity, margin;
    transition: margin 0.3s ease, transform 0.3s ease;
}

.toast-message.visible {
    animation: toastFlyInTop 0.45s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.toast-message.hide {
    animation: toastFlyOutVideo 0.4s cubic-bezier(0.7, 0, 0.84, 0) forwards;
    margin-bottom: -50px; 
}
.search-box-otp {
    display: flex;
    align-items: center;
    background-color: #f3f3f3;
    border: 1px solid #e3e3e3;
    border-radius: 8px;
    padding: 0 0.5rem;
    height: 28px;
    margin-right: 10px;
}

.search-box-otp input {
    border: none;
    outline: none;
    background: transparent;
    font-size: 13px;
    width: 100px;
    padding: 0 4px;
}

.dark-mode .search-box-otp {
    background-color: #222;
    border-color: #444;
}

.otp-search-placeholder-text {
    color: #999;
}
#search-otp-input {
    display: none;
}

body.home #search-otp-input {
    display: inline-block;
}

body.home #search-otp-fake {
    display: none;
}

#search-otp-fake {
    display: inline-block;
    font-size: 13px;
    color: #999;
    font-family: 'Roboto', sans-serif;
    cursor: pointer;
    user-select: none;
}

.dark-mode #search-otp-fake {
    color: #999;
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background-color: #222;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background-color: #333;
}

* {
    scrollbar-width: thin;
    scrollbar-color: #222 transparent;
}

.dark-mode * {
    scrollbar-color: #444 transparent;
}
.footer-badges {
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-badges img {
    width: 88px;
    height: 31px;
    image-rendering: pixelated;
    transition: opacity 0.15s ease, transform 0.15s ease;
    opacity: 0.82;
}

.dark-mode .footer-badges img {
    opacity: 0.82;
}

.footer-right{
    display:flex;
    align-items:center;
    gap: 0.85rem;
}

.footer-badges a{
    display:flex;
    align-items:center;
}

.footer-badges img{
    display:block;
}
.logo-img.logo-dark { display: none; }
.dark-mode .logo-img.logo-light { display: none; }
.dark-mode .logo-img.logo-dark { display: inline-block; }

/* ── Hamburger ────────────────────────────────────────── */

.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 4.5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    transition: background 0.15s;
}

.hamburger:hover {
    background: rgba(0, 0, 0, 0.05);
}

.hamburger span {
    display: block;
    width: 17px;
    height: 1.5px;
    background: #111;
    border-radius: 2px;
    transition: transform 0.22s ease, opacity 0.22s ease;
}

.dark-mode .hamburger span {
    background: #eee;
}

.hamburger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ── Mobile nav (inline — no float) ──────────────────── */

.mobile-nav {
    display: none;
    flex-direction: column;
    gap: 2px;
    width: 100%;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    padding: 0 0;
    border-top: 1px solid transparent;
    transition: max-height 0.28s ease, opacity 0.22s ease, padding 0.28s ease, border-color 0.28s ease;
}

.dark-mode .mobile-nav {
    border-top-color: transparent;
}

.mobile-nav.open {
    max-height: 320px;
    opacity: 1;
    padding: 6px 0;
    border-top-color: #e8e8e8;
    pointer-events: all;
}

.dark-mode .mobile-nav.open {
    border-top-color: #2e2e2e;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 12px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    color: #333;
    transition: background 0.15s;
}

.mobile-nav-link i {
    font-size: 13px;
    width: 16px;
    text-align: center;
    color: #888;
}

.mobile-nav-link:hover {
    background: rgba(0, 0, 0, 0.04);
}

.dark-mode .mobile-nav-link {
    color: #ddd;
}

.dark-mode .mobile-nav-link:hover {
    background: rgba(255, 255, 255, 0.06);
}

.mobile-logout-link {
    color: #e74c3c !important;
}

.mobile-logout-link i {
    color: #e74c3c !important;
}

.mobile-nav-divider {
    height: 1px;
    background: #e8e8e8;
    margin: 3px 6px;
}

.dark-mode .mobile-nav-divider {
    background: #2e2e2e;
}

/* ── Mobile breakpoint ────────────────────────────────── */

@media (max-width: 700px) {
    body {
        padding-top: 0;
    }

    .navbar {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        border-radius: 0;
        width: 100%;
        margin-bottom: 0;
        border-left: none;
        border-right: none;
        border-top: none;
        will-change: auto;
        transition: none;
        /* allow navbar to expand vertically when menu opens */
        height: auto;
        min-height: 42px;
        flex-wrap: wrap;
        align-items: center;
        padding: 0 1rem;
    }

    .navbar-left,
    .navbar-right {
        height: 42px;
        display: flex;
        align-items: center;
    }

    main {
        padding-top: 42px;
    }

    .nav-desktop {
        display: none !important;
    }

    .hamburger {
        display: flex;
    }

    .mobile-nav {
        display: flex;
    }

    .footer {
        flex-wrap: wrap;
        gap: 0.4rem 0.6rem;
        padding: 0.65rem 1rem;
        font-size: 12px;
        justify-content: center;
    }

    .footer-left {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.4rem 0.6rem;
    }

    #toast-container {
        top: auto;
        bottom: 1.2rem;
        left: 1rem;
        right: 1rem;
        align-items: stretch;
    }

    .toast-message {
        max-width: 100%;
        width: 100%;
        position: relative;
        overflow: visible;
    }

    .dark-mode .toast-message::before {
        content: '';
        position: absolute;
        inset: -6px;
        border-radius: 16px;
        background: rgba(0, 0, 0, 0.45);
        filter: blur(14px);
        z-index: -1;
    }

    .toast-message.visible {
        animation: toastSlideUpMobile 0.38s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    }
}

/* ── PWA Safe Area ────────────────────────────────────────────────────
   viewport-fit=cover extends content behind the iOS status bar.
   env(safe-area-inset-top) pushes the navbar below it so the
   navbar background fills the status bar area (native app look).
   ─────────────────────────────────────────────────────────────────── */
@media (display-mode: standalone) and (max-width: 700px) {
    .navbar {
        padding-top: env(safe-area-inset-top);
    }
    main {
        padding-top: calc(42px + env(safe-area-inset-top));
    }
    #toast-container {
        bottom: calc(1.2rem + env(safe-area-inset-bottom));
    }
}

@media (display-mode: standalone) {
    .footer {
        padding-bottom: calc(0.55rem + env(safe-area-inset-bottom));
    }
}

/* ── iOS Install Banner ───────────────────────────────────────────── */
.ios-install-banner {
    display: none;
    position: fixed;
    bottom: 4rem; /* overridden by JS */
    left: 1rem;
    right: 1rem;
    z-index: 1200;
    background: #fafafa;
    border: 1px solid #e5e5e5;
    border-radius: 16px;
    padding: 12px 14px;
    align-items: center;
    gap: 12px;
    transform: translateY(calc(100% + 1.5rem));
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.34, 1.3, 0.64, 1), opacity 0.3s ease;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.ios-install-banner.visible {
    display: flex;
    transform: translateY(0);
    opacity: 1;
}

.ios-install-banner.hiding {
    transform: translateY(calc(100% + 1.5rem));
    opacity: 0;
}

.ios-banner-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    flex-shrink: 0;
    background: linear-gradient(135deg, #6e5ab4 0%, #2d1e64 100%);
    object-fit: contain;
    padding: 4px;
}

.ios-banner-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.ios-banner-title {
    font-size: 13px;
    font-weight: 600;
    color: #111;
    font-family: 'Roboto', sans-serif;
    line-height: 1.3;
}

.ios-banner-sub {
    font-size: 11.5px;
    color: #666;
    font-family: 'Roboto', sans-serif;
    line-height: 1.4;
}

.ios-banner-sub i {
    font-size: 11px;
    color: #007aff;
}

.ios-banner-sub strong {
    color: #333;
}

.ios-banner-close {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: none;
    background: #f0f0f0;
    color: #666;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.dark-mode .ios-install-banner {
    background: #1a1a1a;
    border-color: #2e2e2e;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
}

.dark-mode .ios-banner-title {
    color: #f0f0f0;
}

.dark-mode .ios-banner-sub {
    color: #888;
}

.dark-mode .ios-banner-sub strong {
    color: #ccc;
}

.dark-mode .ios-banner-close {
    background: rgba(255, 255, 255, 0.08);
    color: #aaa;
}
}
