
/* =========================================
   Gomensensei AKB Fan Tools - App Layer
   Depends on assets/css/core.css
   ========================================= */

:root {
    --shell-max: 1180px;
    --glass-border: rgba(255, 255, 255, 0.55);
    --white-soft: rgba(255, 255, 255, 0.72);
    --ink: #2C3E50;
    --ink-soft: rgba(44, 62, 80, 0.72);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

a { color: inherit; }

button,
.app-button,
.nav-icon,
.site-nav a,
.lang-wrap,
.lang-wrap select {
    flex-shrink: 0;
    white-space: nowrap;
}

.skip-link {
    position: absolute;
    left: -999px;
    top: 12px;
    z-index: 99999;
    padding: 10px 14px;
    border-radius: 999px;
    background: #fff;
    color: var(--primary-hover);
    font-weight: 900;
}

.skip-link:focus { left: 12px; }

.top-shell {
    position: sticky;
    top: max(14px, env(safe-area-inset-top));
    z-index: 50;
    width: min(var(--shell-max), calc(100% - 28px));
    margin: 14px auto 0;
    padding: 12px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    overflow: visible;
}

.brand-lockup {
    min-width: 230px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: #fff;
    font-weight: 1000;
    letter-spacing: -0.06em;
    box-shadow: 0 10px 24px rgba(233, 30, 99, 0.26);
}

.brand-text strong {
    display: block;
    font-size: 15px;
    line-height: 1.2;
}

.brand-text small {
    display: block;
    color: var(--text-sec);
    font-size: 12px;
}

.site-nav {
    display: flex;
    justify-content: center;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.site-nav::-webkit-scrollbar { display: none; }

.site-nav a {
    padding: 8px 10px;
    border-radius: 999px;
    color: var(--text-sec);
    text-decoration: none;
    font-size: 13px;
    font-weight: 800;
    transition: background 0.2s ease, color 0.2s ease;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
    background: rgba(255, 255, 255, 0.48);
    color: var(--primary-hover);
}

.lang-wrap select {
    width: 104px;
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 999px;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.58);
    color: var(--text-main);
    font-weight: 800;
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    background: rgba(255,255,255,0.42);
}

.nav-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    background: var(--primary-hover);
}

.page-shell {
    width: min(var(--shell-max), calc(100% - 28px));
    margin: 0 auto;
    padding: 56px 0 24px;
}

.page-shell.narrow { max-width: 920px; }

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
    gap: 28px;
    align-items: center;
    min-height: 530px;
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--primary-hover);
    font-size: 12px;
    font-weight: 1000;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

h1, h2, h3, p { margin-top: 0; }

h1 {
    margin-bottom: 20px;
    font-size: clamp(44px, 7vw, 86px);
    line-height: 0.93;
    letter-spacing: -0.07em;
    color: var(--text-main);
}

h2 {
    margin-bottom: 12px;
    font-size: clamp(26px, 4vw, 42px);
    line-height: 1.08;
    letter-spacing: -0.045em;
}

.hero-lead,
.section-head p,
.content-panel p,
.notice-box p,
.body-copy p {
    color: var(--ink-soft);
}

.hero-lead {
    max-width: 740px;
    font-size: clamp(17px, 2vw, 20px);
}

.cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.app-button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 48px;
    padding: 12px 20px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 1000;
}

.app-button.primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: #fff;
    box-shadow: 0 12px 28px rgba(233, 30, 99, 0.25);
}

.app-button.secondary {
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.45);
}

.hero-panel {
    padding: 20px;
    transform: rotate(1.4deg);
}

.device-top {
    display: flex;
    gap: 7px;
    padding: 6px 6px 18px;
}

.device-top span {
    width: 11px;
    height: 11px;
    border-radius: 999px;
    background: var(--primary);
}
.device-top span:nth-child(2) { background: #ffb6c1; }
.device-top span:nth-child(3) { background: #9fd3ff; }

.mini-dashboard {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.mini-tile {
    min-height: 125px;
    justify-content: center;
    align-items: center;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.34);
    border: 1px solid rgba(255,255,255,0.42);
    text-align: center;
    box-shadow: inset 1px 1px 2px rgba(255,255,255,0.38);
}

.mini-tile .cq-title {
    font-size: 16cqw;
    color: var(--primary-hover);
}

.mini-tile small {
    font-weight: 900;
    color: var(--text-sec);
}

.notice-box {
    margin: 14px 0 64px;
    padding: 24px;
}

.notice-box p:last-child { margin-bottom: 0; }

.section-block { margin: 68px 0; }

.section-head {
    max-width: 760px;
    margin-bottom: 28px;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.tool-card {
    min-height: 260px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 22px;
    text-decoration: none;
}

.tool-card .label {
    align-self: flex-start;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(255, 64, 129, 0.12);
    color: var(--primary-hover);
    font-size: 12px;
    font-weight: 1000;
}

.tool-card h3 {
    margin-bottom: 0;
    font-size: 24px;
    line-height: 1.06;
    letter-spacing: -0.035em;
}

.tool-card p {
    color: var(--text-sec);
}

.tool-card .open {
    margin-top: auto;
    color: var(--primary-hover);
    font-weight: 1000;
}

.system-grid,
.contact-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin: 54px 0 18px;
}

.content-panel,
.page-title {
    padding: 28px;
}

.page-title {
    margin-bottom: 22px;
}

.page-title h1 {
    margin-bottom: 0;
    font-size: clamp(42px, 7vw, 72px);
}

.stack-list,
.timeline-list {
    display: grid;
    gap: 18px;
}

.stack-card,
.timeline-card {
    padding: 24px;
}

.timeline-card {
    display: grid;
    grid-template-columns: 138px minmax(0, 1fr);
    gap: 18px;
}

.timeline-date {
    color: var(--primary-hover);
    font-weight: 1000;
}

.check-list {
    margin: 0;
    padding-left: 22px;
    color: var(--text-sec);
    font-weight: 700;
}

.check-list li + li { margin-top: 10px; }

.body-copy p:last-child,
.content-panel p:last-child { margin-bottom: 0; }

.footer-shell {
    width: min(var(--shell-max), calc(100% - 28px));
    margin: 44px auto 24px;
    padding: 24px;
    display: grid;
    gap: 12px;
    color: var(--text-sec);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-links a {
    font-weight: 900;
    color: var(--primary-hover);
}

.copyright {
    margin: 0;
    font-size: 13px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

@media (max-width: 1000px) {
    .top-shell {
        grid-template-columns: auto auto auto;
        border-radius: 28px;
    }

    .site-nav {
        grid-column: 1 / -1;
        justify-content: flex-start;
        display: none;
        padding-top: 8px;
    }

    .site-nav.is-open { display: flex; }

    .nav-toggle { display: block; }

    .hero-grid,
    .system-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .hero-grid { min-height: auto; }

    .tools-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    .top-shell,
    .page-shell,
    .footer-shell {
        width: calc(100% - 20px);
    }

    .top-shell {
        padding: 10px;
        gap: 8px;
    }

    .brand-lockup {
        min-width: 0;
    }

    .brand-text small {
        display: none;
    }

    .lang-wrap select {
        width: 86px;
    }

    .page-shell {
        padding-top: 34px;
    }

    h1 {
        font-size: clamp(42px, 15vw, 58px);
    }

    .hero-panel {
        transform: none;
    }

    .mini-dashboard,
    .tools-grid {
        grid-template-columns: 1fr;
    }

    .timeline-card {
        grid-template-columns: 1fr;
    }

    .app-button {
        width: 100%;
    }
}
