:root {
    --bg: #F0F5F5;
    --bg-soft: #F9FAFB;
    --fg: #1F2937;
    --card: #FFFFFE;
    --muted: #6B7280;
    --primary: #4A8B8D;
    --primary-light: #7BB5B7;
    --primary-dark: #376A6C;
    --border: #E5E7EB;

    --container: 1040px;
    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-pill: 9999px;

    --shadow-sm: 0 1px 2px rgba(31, 41, 55, 0.05);
    --shadow-md: 0 8px 24px rgba(31, 41, 55, 0.08);

    --font-sans: "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Yu Gothic UI", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--fg);
    font-family: var(--font-sans);
    font-weight: 500;
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: var(--primary-dark);
    text-decoration: none;
}

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--primary);
    color: #fff;
    padding: 8px 16px;
    z-index: 100;
}
.skip-link:focus {
    left: 16px;
    top: 16px;
}

/* ---------- Header ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(240, 245, 245, 0.85);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--fg);
    font-weight: 900;
    font-size: 1.125rem;
}

.header-nav {
    display: flex;
    gap: 8px;
    align-items: center;
}

.nav-link {
    color: var(--fg);
    font-size: 0.95rem;
    font-weight: 700;
    padding: 8px 14px;
    border-radius: var(--radius-pill);
    transition: background 0.2s;
}
.nav-link:hover {
    background: rgba(74, 139, 141, 0.08);
}

/* ---------- Language menu ---------- */
.lang-menu {
    position: relative;
}
.lang-menu summary {
    list-style: none;
    cursor: pointer;
    padding: 8px 14px;
    border-radius: var(--radius-pill);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--fg);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s;
}
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary:hover { background: rgba(74, 139, 141, 0.08); }
.lang-menu summary::after {
    content: "▾";
    margin-left: 2px;
    opacity: 0.5;
    font-size: 0.85rem;
}
.lang-globe {
    font-size: 1rem;
    line-height: 1;
}
.lang-menu ul {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    margin: 0;
    padding: 6px;
    list-style: none;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    min-width: 220px;
    z-index: 60;
}
.lang-menu li {
    display: block;
}
.lang-menu li a,
.lang-menu li .lang-pending {
    display: block;
    padding: 9px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--fg);
    text-decoration: none;
}
.lang-menu li a[aria-current="page"] {
    background: var(--bg-soft);
    color: var(--primary-dark);
}
.lang-menu li a[aria-current="page"]::after {
    content: " ✓";
    color: var(--primary);
}
.lang-menu li .lang-pending {
    color: var(--muted);
    font-weight: 500;
    cursor: not-allowed;
}
.lang-menu li .lang-pending em {
    font-style: normal;
    font-size: 0.75rem;
    color: var(--muted);
    opacity: 0.7;
    margin-left: 6px;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    border-radius: var(--radius-pill);
    font-weight: 700;
    font-size: 1rem;
    text-align: center;
    line-height: 1.2;
    transition: transform 0.1s ease, background 0.2s;
    border: none;
    cursor: pointer;
    min-width: 180px;
}

.btn-main {
    font-size: 1rem;
    font-weight: 900;
}
.btn-sub {
    font-size: 0.7rem;
    font-weight: 500;
    margin-top: 2px;
    opacity: 0.85;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}
.btn-primary:hover {
    background: var(--primary-dark);
}
.btn-primary:active {
    transform: translateY(1px);
}

.btn-disabled {
    background: transparent;
    color: var(--muted);
    border: 1.5px solid var(--border);
    cursor: not-allowed;
}

.cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

/* ---------- Eyebrow ---------- */
.eyebrow {
    margin: 0 0 20px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--muted);
    letter-spacing: 0.04em;
    text-transform: none;
}

.eyebrow-light {
    color: rgba(255, 255, 255, 0.85);
}

/* ---------- Hero ---------- */
.hero {
    padding: 48px 0 40px;
}

.hero-head {
    text-align: center;
    margin-bottom: 20px;
}

.hero-inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: 28px;
    align-items: center;
}

.hero-text {
    text-align: center;
}

.hero-title {
    margin: 0 auto;
    font-size: clamp(2rem, 5.5vw, 3.25rem);
    font-weight: 900;
    line-height: 1.3;
    letter-spacing: -0.015em;
    color: var(--fg);
}

.hero-subtitle {
    margin: 0 auto;
    max-width: 560px;
    font-size: 1.125rem;
    color: var(--muted);
    font-weight: 500;
    line-height: 1.8;
}

.hero-visual {
    display: flex;
    justify-content: center;
}

/* ---------- iPad frame ---------- */
.ipad-frame {
    position: relative;
    background: #1f2937;
    padding: 14px;
    border-radius: 28px;
    box-shadow: var(--shadow-md);
    width: 100%;
    max-width: 420px;
}

.ipad-frame::before {
    content: "";
    position: absolute;
    top: 7px;
    left: 50%;
    transform: translateX(-50%);
    width: 5px;
    height: 5px;
    background: #4b5563;
    border-radius: 50%;
}

.ipad-frame video {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 16px;
    background: var(--bg-soft);
}

/* ---------- Feature blocks ---------- */
.feature {
    padding: 40px 0;
}

.feature-alt {
    background: var(--bg-soft);
}

.feature-inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: 48px;
    align-items: center;
}

.feature-text {
    text-align: center;
}

.feature-title {
    margin: 0 0 16px;
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 900;
    line-height: 1.4;
    letter-spacing: -0.02em;
    color: var(--fg);
}

.feature-body {
    margin: 0;
    color: var(--muted);
    font-size: 1.05rem;
    font-weight: 500;
    line-height: 1.85;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
    white-space: pre-line;
}

.feature-visual {
    display: flex;
    justify-content: center;
}

.phone-frame {
    position: relative;
    background: #1f2937;
    padding: 10px;
    border-radius: 38px;
    box-shadow: var(--shadow-md);
    width: 100%;
    max-width: 280px;
}

.phone-frame img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 28px;
    background: var(--bg-soft);
}

/* ---------- FAQ ---------- */
.faq {
    padding: 32px 0 48px;
    background: var(--bg-soft);
}

.faq-inner {
    max-width: 720px;
}

.faq-title {
    margin: 0 0 24px;
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 900;
    color: var(--fg);
    letter-spacing: -0.01em;
}

.faq-list {
    display: grid;
    gap: 8px;
}

.faq-item {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 18px 22px;
}
.faq-item summary {
    cursor: pointer;
    font-size: 1rem;
    font-weight: 700;
    color: var(--fg);
    list-style: none;
    position: relative;
    padding-right: 28px;
}
.faq-item summary::-webkit-details-marker {
    display: none;
}
.faq-item summary::after {
    content: "+";
    position: absolute;
    right: 0;
    top: -2px;
    font-size: 1.25rem;
    color: var(--muted);
    transition: transform 0.2s;
}
.faq-item[open] summary::after {
    transform: rotate(45deg);
}
.faq-item p {
    margin: 14px 0 0;
    color: var(--muted);
    font-weight: 500;
    line-height: 1.8;
    font-size: 0.95rem;
}

/* ---------- Sticky CTA ---------- */
.sticky-cta {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-top: 1px solid var(--border);
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
}

.sticky-cta-inner {
    max-width: var(--container);
    margin: 0 auto;
    display: flex;
    gap: 8px;
    justify-content: center;
}

.sticky-cta .btn {
    flex: 1;
    min-width: 0;
    padding: 8px 12px;
    max-width: 220px;
}

.sticky-cta .btn-main {
    font-size: 0.9rem;
}

.sticky-cta .btn-sub {
    font-size: 0.65rem;
}

body {
    padding-bottom: 88px;
}

/* ---------- Footer ---------- */
.site-footer {
    background: var(--card);
    padding: 48px 0 24px;
    border-top: 1px solid var(--border);
}

.footer-inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 32px;
    align-items: start;
}

.footer-brand .brand {
    margin-bottom: 12px;
}
.footer-tagline {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.7;
    max-width: 480px;
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
}
.footer-nav a {
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 700;
}
.footer-nav a:hover {
    color: var(--primary-dark);
}

.footer-copy {
    margin: 0;
    text-align: center;
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 500;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

/* ---------- Legal pages ---------- */
.legal {
    padding: 48px 0 64px;
}

.legal-inner {
    max-width: 720px;
}

.legal-title {
    margin: 0 0 32px;
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 900;
    color: var(--fg);
    letter-spacing: -0.01em;
}

.legal section {
    margin-bottom: 28px;
}

.legal h2 {
    margin: 0 0 8px;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--fg);
}

.legal p {
    margin: 0 0 12px;
    color: var(--fg);
    font-size: 0.95rem;
    line-height: 1.85;
    font-weight: 500;
}

.legal ul {
    margin: 8px 0 12px;
    padding-left: 1.25em;
    color: var(--fg);
    font-size: 0.95rem;
    line-height: 1.85;
    font-weight: 500;
}

.legal-updated {
    margin-top: 32px;
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 500;
}

body.legal-page {
    padding-bottom: 0;
}

/* ---------- Responsive ---------- */
@media (min-width: 768px) {
    .hero {
        padding: 80px 0 72px;
    }
    .hero-head {
        margin-bottom: 24px;
    }
    .ipad-frame {
        max-width: 480px;
    }
    .feature {
        padding: 64px 0;
    }
    .feature-inner {
        grid-template-columns: 1fr 1fr;
        gap: 56px;
    }
    .feature-text {
        text-align: left;
    }
    .feature-body {
        margin-left: 0;
        margin-right: 0;
    }
    .feature-reverse .feature-visual {
        order: 1;
    }
    .feature-reverse .feature-text {
        order: 2;
    }
    .footer-inner {
        grid-template-columns: 1fr auto;
    }
    .footer-nav {
        align-self: end;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    html {
        scroll-behavior: auto;
    }
}
