/* --------------------------------------
   LATTEWORKS - Global Styles
----------------------------------------- */
:root {
    --ink: #171717;
    --muted: #6b6b6b;
    --paper: #ffffff;
    --line: #e6e6e6;
    --accent: #1a3a6b;
    --accent-soft: #eef2f8;
}

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

body {
    background-color: var(--paper);
    color: var(--ink);
    font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic Medium", "Yu Gothic", "Noto Sans JP", sans-serif;
    overflow-x: hidden;
    min-height: 100vh;
    min-height: 100svh;
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
}

.page-content p a,
.text-small a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.page-content p a:hover,
.text-small a:hover {
    opacity: 0.7;
}

.handwritten {
    font-family: 'Sue Ellen Francisco', cursive;
}

/* --------------------------------------
   Main Layout (Top / Gate page)
----------------------------------------- */
.container {
    display: flex;
    width: 100%;
    max-width: 1320px;
    margin: 0 auto;
    min-height: 100vh;
    min-height: 100svh;
    align-items: center;
    justify-content: space-between;
    padding: 0 10%;
}

.logo {
    font-size: clamp(1.2rem, 4vw, 2.8rem);
    font-weight: 900;
    letter-spacing: -0.02em;
    line-height: 1;
}

/* Gate logo intro: wordmark slides in from the left, badge drops from above,
   then hits k -> W -> t -> t -> L (timeline is built in js/script.js) */
.gate-logo {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.22em;
    font-size: clamp(2.2rem, 7vw, 4.6rem);
    font-weight: 400;
    letter-spacing: 0;
}

.gate-mark {
    display: block;
    width: 1.15em;
    height: 1.15em;
    flex-shrink: 0;
    opacity: 0;
    animation: gate-mark-fallback 0.4s 6s forwards;
}

.gate-mark-body,
.gate-mark-body svg {
    display: block;
    width: 100%;
    height: 100%;
}

.gate-word {
    position: relative;
    display: inline-block;
    font-size: 1.2em;
    line-height: 1;
    animation: gate-fade-left 0.7s ease-out both;
}

.gate-word span {
    display: inline-block;
}

@keyframes gate-fade-left {
    from { opacity: 0; transform: translateX(-1.2em); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes gate-mark-fallback {
    to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .gate-mark {
        opacity: 1;
        animation: none;
    }

    .gate-word {
        animation: none;
    }
}

.nav {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.nav-list {
    list-style: none;
    text-align: right;
}

.nav-list li {
    margin: 0.2rem 0;
}

.nav-list a {
    display: inline-block;
    text-decoration: none;
    color: var(--ink);
    font-size: clamp(1rem, 2.5vw, 1.8rem);
    font-weight: normal;
    letter-spacing: 0.05em;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.3s ease;
    transform-origin: right center;
}

.nav-list a:hover {
    transform: scale(0.9);
    opacity: 0.5;
}

/* Scattered, playful stagger on wider screens (sample-inc.com inspired) */
@media (min-width: 769px) {
    .nav-list li:nth-child(1) { margin-right: 0.4rem; }
    .nav-list li:nth-child(2) { margin-right: 2.8rem; }
    .nav-list li:nth-child(3) { margin-right: 0.8rem; }
    .nav-list li:nth-child(4) { margin-right: 3.6rem; }
    .nav-list li:nth-child(5) { margin-right: 1.4rem; }
    .nav-list li:nth-child(6) { margin-right: 2.4rem; }
    .nav-list li:nth-child(7) { margin-right: 1.8rem; }
    .nav-list li:nth-child(8) { margin-right: 0.6rem; }

    .nav-list li:nth-child(2) a,
    .nav-list li:nth-child(4) a {
        font-size: clamp(1.2rem, 3vw, 2.1rem);
    }
}

/* --------------------------------------
   Menu UI (Trigger & Close)
----------------------------------------- */
.menu-trigger {
    position: absolute;
    top: 25px;
    right: 25px;
    width: 24px;
    height: 24px;
    cursor: pointer;
    z-index: 100;
    color: var(--ink);
}

.menu-close {
    position: absolute;
    top: 25px;
    right: 25px;
    width: 24px;
    height: 24px;
    cursor: pointer;
    z-index: 1000;
    color: var(--ink);
}

.menu-trigger svg, .menu-close svg {
    width: 100%;
    height: 100%;
}

/* --------------------------------------
   Overlay Menu
----------------------------------------- */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.30);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 500;
    overflow-y: auto;

    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateX(100%);
    transition: transform 0.6s cubic-bezier(0.77, 0, 0.175, 1);
}

.menu-overlay.is-active {
    transform: translateX(0);
}

.menu-content {
    text-align: center;
    width: 80%;
    max-width: 600px;
    margin: auto;
    padding: 2rem 0;
}

.menu-logo {
    font-size: clamp(1.5rem, 5vw, 3.5rem);
    font-weight: 900;
    margin-bottom: 2rem;
    line-height: 1;
}

.menu-grid {
    display: flex;
    justify-content: center;
    gap: 4rem;
    list-style: none;
}

.menu-col {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.menu-grid li {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.menu-overlay.is-active .menu-grid li {
    opacity: 1;
    transform: translateY(0);
}

.menu-col li:nth-child(1) { transition-delay: 0.05s; }
.menu-col li:nth-child(2) { transition-delay: 0.14s; }
.menu-col li:nth-child(3) { transition-delay: 0.23s; }
.menu-col li:nth-child(4) { transition-delay: 0.32s; }
.menu-col li:nth-child(5) { transition-delay: 0.41s; }

.menu-grid a {
    text-decoration: none;
    color: var(--ink);
    font-size: clamp(1.2rem, 3vw, 2.2rem);
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.3s ease;
}

.menu-grid a:hover {
    transform: scale(0.9);
    opacity: 0.5;
}

.menu-icon {
    width: 1em;
    height: 1em;
    object-fit: contain;
    opacity: 0.75;
}

/* --------------------------------------
   Site Header (inner pages)
----------------------------------------- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 6%;
    z-index: 200;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.header-logo {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.header-logo svg {
    height: clamp(28px, 4vw, 38px);
    width: auto;
    display: block;
}

.site-header .menu-trigger {
    position: static;
}

/* --------------------------------------
   Page Content (inner pages)
----------------------------------------- */
.page-content {
    max-width: 1040px;
    margin: 0 auto;
    padding: 150px 8% 120px;
}

.page-content {
    position: relative;
}

.page-content > section {
    position: relative;
    z-index: 1;
}

/* Large faint catchphrase behind the page content */
.page-watermark {
    position: absolute;
    top: 96px;
    left: 0;
    right: 0;
    z-index: 0;
    padding: 0 6%;
    font-size: var(--wm-size, clamp(2.4rem, 7.5vw, 6.2rem));
    font-weight: 900;
    line-height: 1.14;
    letter-spacing: -0.02em;
    text-align: right;
    color: rgba(26, 58, 107, 0.075);
    pointer-events: none;
    user-select: none;
    animation: wm-in 1.8s ease both;
}

.page-watermark span {
    display: block;
}

@keyframes wm-in {
    from { opacity: 0; transform: translateX(24px); }
    to   { opacity: 1; transform: translateX(0); }
}

@media (prefers-reduced-motion: reduce) {
    .page-watermark {
        animation: none;
    }
}

.gate-watermark {
    top: auto;
    bottom: 0;
    padding: 0 6% 7vh;
    font-size: clamp(2.6rem, 8vw, 7rem);
    text-align: left;
    animation-name: wm-in-left;
}

@keyframes wm-in-left {
    from { opacity: 0; transform: translateX(-24px); }
    to   { opacity: 1; transform: translateX(0); }
}

.container {
    position: relative;
    z-index: 1;
}

.home-sub {
    margin: -1.4rem 0 2.4rem;
    font-size: clamp(1rem, 2.6vw, 1.15rem);
    color: var(--accent);
    letter-spacing: 0.04em;
}

.fade-in {
    animation: fadeInUp 0.9s ease both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

/* Scroll-triggered reveal (JS adds .reveal then .is-visible via IntersectionObserver) */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.is-visible {
    opacity: 1;
    transform: none;
}

@media print {
    .reveal,
    .fade-in {
        opacity: 1;
        transform: none;
        animation: none;
    }
}

.section-label {
    display: block;
    font-size: clamp(2.2rem, 7vw, 3.6rem);
    margin-bottom: 2.5rem;
    line-height: 1;
}

.text-small {
    font-size: 0.95rem;
    color: var(--muted);
}

/* CTA */
.cta-wrap {
    margin-top: 3.5rem;
    text-align: left;
}

.cta-pair {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.6rem 0;
}

.cta-pair .cta-link + .cta-link {
    margin-left: 2.2rem;
    padding-left: 2.2rem;
    border-left: 1px solid var(--line);
}

@media (max-width: 640px) {
    .cta-pair {
        flex-direction: column;
        align-items: flex-start;
    }

    .cta-pair .cta-link + .cta-link {
        margin-left: 0;
        padding-left: 0;
        border-left: none;
    }
}

.cta-link {
    display: inline-block;
    text-decoration: none;
    color: var(--accent);
    font-size: clamp(1.3rem, 3.5vw, 1.7rem);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.cta-link::after {
    content: " →";
}

.cta-link:hover {
    transform: translateX(6px);
    opacity: 0.6;
}

/* Real form submit control keeps button affordance */
.cta-button {
    display: inline-block;
    padding: 0.9rem 2.4rem;
    border: 1px solid var(--accent);
    text-decoration: none;
    color: var(--accent);
    font-size: 1.15rem;
    letter-spacing: 0.04em;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.cta-button:hover {
    background-color: var(--accent);
    color: var(--paper);
}

/* Illustrations */
.illust-hero {
    max-width: 420px;
    margin: 0 0 2.5rem;
}

.illust-hero img {
    width: 100%;
    height: auto;
    display: block;
}

.illust-medium {
    max-width: 260px;
    margin: 0 0 2.5rem;
}

.illust-medium img {
    width: 100%;
    height: auto;
    display: block;
}

.illust-wide {
    max-width: 460px;
    margin: 0 0 2.5rem;
}

.illust-wide img {
    width: 100%;
    height: auto;
    display: block;
}

.avatar-circle {
    width: 140px;
    height: 140px;
    margin-bottom: 1.4rem;
}

.avatar-circle img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: block;
    object-fit: cover;
}

/* HOME */
.main-title {
    font-size: clamp(1.6rem, 5vw, 2.6rem);
    font-weight: 700;
    line-height: 1.5;
    margin: 1rem 0 2.5rem;
}

.description p {
    line-height: 2;
    margin-bottom: 1.3rem;
    color: #262626;
}

.description .highlight {
    font-weight: 700;
    margin-top: 1.8rem;
    font-size: 1.05rem;
}

/* ABOUT */
.philosophy-title {
    font-size: clamp(1.3rem, 4.2vw, 2rem);
    font-weight: 700;
    margin: 1.2rem 0 2.2rem;
    line-height: 1.6;
    color: var(--accent);
}

.about-description p {
    line-height: 2;
    margin-bottom: 1.2rem;
}

.motto {
    margin-top: 3.5rem;
}

.motto p:first-child {
    font-size: 1.3rem;
    font-weight: 700;
}

.motto .sub {
    margin-top: 0.6rem;
    color: var(--muted);
    line-height: 1.9;
}

/* PROFILE */
.profile-block {
    margin-bottom: 3rem;
}

.name-title {
    font-size: clamp(1.4rem, 4.4vw, 2rem);
    font-weight: 700;
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.name-title .en {
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--muted);
}

.badge {
    display: inline-block;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    color: var(--accent);
}

.tag-list .badge:not(:first-child)::before {
    content: "・ ";
    color: var(--muted);
}

.email-info {
    margin-top: 0.8rem;
    font-size: 1.15rem;
}

.bio-text {
    margin-top: 1.2rem;
    line-height: 2;
}

.info-block {
    margin-top: 3.5rem;
}

.sub-label {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    color: var(--accent);
    margin-bottom: 1.2rem;
}

.service-detail {
    margin-bottom: 1.6rem;
}

.service-detail h5 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--accent);
}

.service-detail p {
    line-height: 1.9;
    color: #333;
}

.skill-list-small {
    list-style: none;
    line-height: 1.9;
    font-size: 0.95rem;
    color: #333;
}

.skill-list-small li {
    padding-left: 1.1rem;
    position: relative;
}

.skill-list-small li::before {
    content: "―";
    position: absolute;
    left: 0;
    color: var(--muted);
}

.numbered-list {
    list-style: decimal;
    list-style-position: outside;
    margin-left: 1.3rem;
    line-height: 1.9;
    font-size: 0.95rem;
    color: #333;
}

.numbered-list li {
    padding-left: 0.3rem;
    margin-bottom: 0.3rem;
}

.numbered-list li::marker {
    color: var(--accent);
    font-weight: 700;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 0.5rem;
}


.company-data {
    display: grid;
    grid-template-columns: 7rem 1fr;
    row-gap: 0.9rem;
    column-gap: 1rem;
}

.company-data dt {
    color: var(--muted);
    font-size: 0.9rem;
}

.company-data dd {
    font-size: 0.95rem;
}

.message-block {
    margin-top: 3.5rem;
}

.message-block .quote {
    font-family: 'Sue Ellen Francisco', cursive;
    font-size: 1.4rem;
    line-height: 1.9;
}

/* PROJECT */
.project-intro {
    margin-bottom: 2.2rem;
    color: var(--muted);
    font-size: 1.05rem;
}

.project-grid {
    display: flex;
    flex-direction: column;
    gap: 2.4rem;
    counter-reset: proj;
}

.project-item {
    position: relative;
    padding-left: 3.2rem;
    transition: transform 0.3s ease;
    counter-increment: proj;
}

.project-item::before {
    content: counter(proj, decimal-leading-zero);
    position: absolute;
    left: 0;
    top: -0.15rem;
    font-family: 'Sue Ellen Francisco', cursive;
    font-size: 1.7rem;
    color: var(--muted);
}

.project-item:hover {
    transform: translateX(6px);
}

.project-item h4 {
    font-weight: 700;
    margin-bottom: 0.6rem;
    font-size: 1.1rem;
    color: var(--accent);
}

.project-item p {
    font-size: 0.95rem;
    color: var(--muted);
    line-height: 1.8;
}

/* ACHIEVEMENTS */
.stat-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 2.6rem 3.2rem;
    margin: 2.5rem 0 3rem;
}

.stat-number {
    font-size: clamp(2rem, 6vw, 2.6rem);
    font-weight: 700;
    line-height: 1.2;
    color: var(--accent);
}

.stat-label {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--muted);
    line-height: 1.7;
}

@media (min-width: 769px) {
    .stat-item:nth-child(2) {
        margin-top: 1.4rem;
    }

    .stat-item:nth-child(3) {
        margin-top: -0.5rem;
    }
}

.case-study {
    margin-bottom: 2.6rem;
}

.case-study:last-child {
    margin-bottom: 0;
}

.case-tag {
    display: block;
    font-size: 1.05rem;
    color: var(--muted);
    margin-bottom: 0.7rem;
}

.case-study h4 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    line-height: 1.6;
    color: var(--accent);
}

.case-study p {
    line-height: 1.9;
    color: #333;
}

/* CONTACT */
.contact-lead {
    line-height: 2;
    margin-bottom: 3rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item .contact-label {
    font-size: 0.8rem;
    letter-spacing: 0.16em;
    color: var(--muted);
    margin-bottom: 0.5rem;
}

.contact-item .contact-value {
    font-size: clamp(1.1rem, 3.4vw, 1.5rem);
    text-decoration: none;
    display: inline-block;
    color: var(--accent);
    transition: opacity 0.3s ease;
}

.contact-item .contact-value:hover {
    opacity: 0.5;
}

.line-box {
    display: flex;
    align-items: center;
    gap: 1.6rem;
    flex-wrap: wrap;
}

.line-text {
    max-width: 30rem;
}

.line-text p {
    font-size: 0.95rem;
    line-height: 1.9;
    margin-bottom: 0.9rem;
    color: #333;
}

.line-button {
    display: inline-block;
    padding: 0.7rem 1.9rem;
    border-radius: 4px;
    background: var(--ink);
    color: var(--paper);
    font-size: 0.95rem;
    letter-spacing: 0.06em;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.line-button:hover {
    opacity: 0.75;
}

.line-qr {
    width: 132px;
    height: 132px;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 6px;
    background: #fff;
}

@media (max-width: 768px) {
    .line-qr {
        display: none;
    }
}

.contact-note {
    margin-top: 2.4rem;
    font-size: 0.9rem;
    color: var(--muted);
    line-height: 1.9;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin: 2rem 0 3rem;
}

.form-row label {
    display: block;
    font-size: 0.82rem;
    letter-spacing: 0.1em;
    color: var(--muted);
    margin-bottom: 0.6rem;
}

.form-row input,
.form-row textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 0.85rem 1rem;
    font-size: 1rem;
    font-family: inherit;
    color: var(--ink);
    background: var(--paper);
}

.form-row input:focus,
.form-row textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.form-row textarea {
    resize: vertical;
    min-height: 150px;
    line-height: 1.8;
}

.contact-form .cta-button {
    border: none;
    background: var(--accent);
    color: var(--paper);
    cursor: pointer;
}

.contact-form .cta-button:hover {
    opacity: 0.8;
}

.honeypot-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.form-errors {
    background: #fdf3f3;
    border: 1px solid #e6bcbc;
    color: #a53a3a;
    padding: 1.2rem 1.4rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    line-height: 1.9;
}

.form-errors ul {
    list-style: none;
}

.form-success {
    background: #f2f8f4;
    border: 1px solid #bcdec8;
    color: #2f6b45;
    padding: 1.6rem;
    border-radius: 6px;
    margin: 1.5rem 0 3rem;
    line-height: 1.9;
}

/* PROJECT: 過去患者検索システム モックアップ（架空のサンプルデータ） */
.karte-mockup {
    border: 1px solid var(--line);
    margin: 1rem 0 1.2rem;
    font-size: 12px;
    color: #2d3748;
    background: #f0f4f8;
    overflow: hidden;
}

.km-header {
    background: #1a3a6b;
    color: #fff;
    padding: 10px 14px;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}

.km-header .km-title { font-size: 1.05em; font-weight: bold; }
.km-header .km-sub { font-size: 0.72em; opacity: 0.7; }
.km-header .km-stats { font-size: 0.78em; opacity: 0.85; white-space: nowrap; }

.km-body { display: flex; flex-wrap: wrap; }

.km-list {
    width: 180px;
    flex-shrink: 0;
    border-right: 1px solid #e2e8f0;
    background: #fff;
}

.km-row {
    padding: 7px 10px;
    border-bottom: 1px solid #f0f4f8;
    border-left: 3px solid transparent;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.km-row:hover {
    background-color: #f7fafc;
}

.km-row.active { background: #ebf4ff; border-left-color: #1a3a6b; }
.km-row .km-name { font-weight: bold; font-size: 0.95em; }
.km-row .km-kana { font-size: 0.72em; color: #718096; }
.km-row .km-info { font-size: 0.72em; color: #4a5568; margin-top: 2px; }
.km-sex-m { color: #2b6cb0; font-weight: bold; }
.km-sex-f { color: #c53030; font-weight: bold; }

.km-detail { flex: 1; min-width: 240px; background: #f8fafc; }

.km-det-head { background: #1a3a6b; color: #fff; padding: 8px 14px; }
.km-det-name { font-size: 1.1em; font-weight: bold; }
.km-det-sub { font-size: 0.75em; opacity: 0.75; margin-top: 3px; }

.km-tabs { background: #fff; border-bottom: 2px solid #e2e8f0; display: flex; padding: 0 10px; flex-wrap: wrap; }
.km-tab { padding: 7px 10px; font-size: 0.82em; color: #718096; border-bottom: 3px solid transparent; font-weight: bold; white-space: nowrap; }
.km-tab.active { color: #1a3a6b; border-bottom-color: #1a3a6b; }
.km-tab .km-badge { background: #e2e8f0; color: #4a5568; border-radius: 10px; padding: 1px 6px; font-size: 0.85em; margin-left: 3px; }

.km-panel { padding: 12px; }
.km-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.km-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 6px; overflow: hidden; }
.km-card.km-full { grid-column: 1 / -1; }
.km-card .km-lbl { background: #1a3a6b; color: #fff; padding: 3px 8px; font-size: 0.72em; font-weight: bold; }
.km-card .km-val { padding: 6px 8px; font-size: 0.88em; }

.km-section-head {
    font-size: 0.8em;
    font-weight: bold;
    color: #1a3a6b;
    background: #ebf4ff;
    padding: 6px 10px;
    border-left: 3px solid #1a3a6b;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.km-badge-dark {
    background: #1a3a6b;
    color: #fff;
}

.km-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85em;
    background: #fff;
}

.km-table th {
    background: #2d3748;
    color: #fff;
    padding: 5px 8px;
    text-align: left;
    font-size: 0.85em;
}

.km-table td {
    padding: 5px 8px;
    border-bottom: 1px solid #f0f4f8;
}

.km-status {
    background: #c6f6d5;
    color: #276749;
    border-radius: 8px;
    padding: 1px 7px;
    font-size: 0.85em;
}

.km-val-h {
    color: #c53030;
    font-weight: bold;
}

.km-lab-table th:nth-child(n+4),
.km-lab-table td:nth-child(n+4) {
    text-align: right;
}

/* PROJECT: 予約システムのギャラリー（架空のサンプル画面） */
.yoyaku-gallery {
    margin: 1rem 0 1.4rem;
}

.yoyaku-stage {
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #f4f6f9;
    max-height: 560px;
    overflow-y: auto;
}

.yoyaku-main {
    display: block;
    width: 100%;
    height: auto;
}

.yoyaku-stage.is-narrow .yoyaku-main {
    width: min(100%, 340px);
    margin: 0 auto;
}

.yoyaku-caption {
    margin: 0.9rem 0 0.8rem;
    font-size: 0.92rem;
    color: #333;
    line-height: 1.8;
    min-height: 3.4em;
}

.yoyaku-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.yoyaku-tab {
    padding: 0.4rem 0.95rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--paper);
    color: var(--muted);
    font: inherit;
    font-size: 0.85rem;
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.yoyaku-tab:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.yoyaku-tab.is-active {
    border-color: var(--accent);
    background: var(--accent);
    color: var(--paper);
}

.yoyaku-points {
    margin-top: 0.4rem;
}

/* スマホ幅：画像のタップ拡大（js/script.js の openZoom） */
.yoyaku-hint {
    display: none;
    margin: 0.5rem 0 0;
    font-size: 0.8rem;
    color: var(--muted);
    line-height: 1.6;
}

.yoyaku-zoom {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(15, 23, 42, 0.94);
}

.yoyaku-zoom.is-open {
    display: block;
}

.yoyaku-zoom-scroll {
    width: 100%;
    height: 100%;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    padding: 56px 12px 24px;
    box-sizing: border-box;
}

.yoyaku-zoom-scroll img {
    display: block;
    max-width: none;
    height: auto;
    background: #fff;
}

.yoyaku-zoom-close {
    position: fixed;
    top: 8px;
    right: 8px;
    z-index: 1;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: #111;
    font-size: 1.7rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.3), 0 2px 8px rgba(0, 0, 0, 0.4);
}

body.yoyaku-zoom-lock {
    overflow: hidden;
}

@media (max-width: 768px) {
    .yoyaku-hint:not([hidden]) {
        display: block;
    }

    .yoyaku-stage.is-zoomable .yoyaku-main {
        cursor: zoom-in;
    }
}

.karte-mockup-caption {
    font-size: 0.85rem;
    color: var(--muted);
    margin-top: -0.6rem;
    margin-bottom: 1.6rem;
}

@media (max-width: 640px) {
    .km-list { width: 100%; max-height: 160px; overflow-y: auto; border-right: none; border-bottom: 1px solid #e2e8f0; }
    .km-detail { width: 100%; }
}

/* --------------------------------------
   Responsive
----------------------------------------- */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
        justify-content: center;
        gap: 2rem;
    }

    .nav {
        flex: none;
    }

    .gate-watermark {
        font-size: clamp(1.9rem, 9vw, 3rem);
        padding-bottom: 3vh;
    }

    .gate-logo {
        justify-content: center;
        font-size: 2.6rem;
    }

    .nav-list {
        text-align: center;
    }

    .nav-list a {
        transform-origin: center center;
        font-size: 1.8rem;
    }

    .menu-grid {
        flex-direction: column;
        gap: 1.5rem;
    }

    .page-content {
        padding: 120px 7% 90px;
    }

    .project-grid {
        grid-template-columns: 1fr;
    }

    .company-data {
        grid-template-columns: 1fr;
        row-gap: 0.3rem;
    }

    .company-data dt {
        margin-top: 0.6rem;
    }
}

/* --------------------------------------
   Interactive widgets (JS-driven)
----------------------------------------- */
.nav-list a.is-current,
.menu-grid a.is-current {
    text-decoration: underline;
    text-underline-offset: 6px;
}

#scrollProgress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: var(--accent);
    z-index: 250;
    transition: width 0.1s linear;
}

#backToTop {
    position: fixed;
    right: 22px;
    bottom: 22px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--accent);
    background: var(--paper);
    color: var(--accent);
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.3s ease, color 0.3s ease;
    z-index: 300;
}

#backToTop.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

#backToTop:hover {
    background: var(--accent);
    color: var(--paper);
}

.email-info.is-copyable {
    cursor: pointer;
    border-bottom: 1px dashed var(--muted);
    display: inline-block;
}

.email-info.is-copied {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.char-counter {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--muted);
    text-align: right;
}

.char-counter.is-warning {
    color: #a53a3a;
}

.field-hint {
    margin-top: 0.5rem;
    font-size: 0.82rem;
    color: var(--muted);
    min-height: 1.2em;
}

.field-hint.is-warning {
    color: #a53a3a;
}

@media (max-width: 640px) {
    #backToTop {
        right: 16px;
        bottom: 16px;
        width: 40px;
        height: 40px;
    }
}

/* --------------------------------------
   MEMBERS (契約施設専用ページ)
----------------------------------------- */
.doc-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 2rem 0 3rem;
}

.doc-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 1rem 1.2rem;
    border: 1px solid var(--line);
    border-radius: 4px;
    text-decoration: none;
    color: var(--ink);
    transition: border-color 0.3s ease, background-color 0.3s ease;
}

.doc-item:hover {
    border-color: var(--accent);
    background-color: var(--accent-soft);
}

.doc-info {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.doc-name {
    font-size: 1rem;
}

.doc-name::before {
    content: "↓ ";
    color: var(--accent);
}

.doc-desc {
    font-size: 0.85rem;
    color: var(--muted);
    line-height: 1.7;
}

.doc-meta {
    font-size: 0.82rem;
    color: var(--muted);
    white-space: nowrap;
    padding-top: 0.15rem;
}

.doc-empty {
    color: var(--muted);
    margin: 2rem 0 3rem;
}

.doc-search {
    margin: 2rem 0 2.5rem;
}

.doc-search input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 0.85rem 1rem;
    font-size: 1rem;
    font-family: inherit;
    color: var(--ink);
    background: var(--paper);
}

.doc-search input:focus {
    outline: none;
    border-color: var(--accent);
}

.doc-group {
    margin-bottom: 2.6rem;
}

.doc-group:last-of-type {
    margin-bottom: 1rem;
}

.doc-no-result {
    color: var(--muted);
    margin: 1rem 0 3rem;
}

/* --------------------------------------
   Accessibility / touch / motion
----------------------------------------- */
html {
    overflow-x: clip;
}

a:focus-visible,
button:focus-visible,
[role="button"]:focus-visible,
select:focus-visible,
summary:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

/* メニューの開閉：閉じている間は、キーボードのTabでも入れないようにする */
.menu-overlay {
    visibility: hidden;
    transition: transform 0.6s cubic-bezier(0.77, 0, 0.175, 1), visibility 0s linear 0.6s;
}

.menu-overlay.is-active {
    visibility: visible;
    transition: transform 0.6s cubic-bezier(0.77, 0, 0.175, 1), visibility 0s;
}

.menu-trigger,
.menu-close {
    position: relative;
}

.menu-trigger::after,
.menu-close::after {
    content: "";
    position: absolute;
    inset: -12px;
}

.menu-trigger {
    position: absolute;
}

.site-header .menu-trigger {
    position: relative;
}

.menu-close {
    position: absolute;
}

.menu-grid a {
    padding: 0.45rem 0;
}

.cta-link {
    padding: 0.4rem 0;
}

.contact-item .contact-value {
    padding: 0.35rem 0;
}

.yoyaku-tab {
    padding: 0.62rem 1rem;
}

@media (prefers-reduced-motion: reduce) {
    .fade-in {
        opacity: 1;
        animation: none;
    }

    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .menu-overlay,
    .menu-grid li,
    #scrollProgress,
    #backToTop {
        transition: none;
    }
}


/* トップ（入口）の、検索エンジンと読む人のための、ひとこと */
.gate-lead {
    pointer-events: none;
    position: fixed;
    right: 10%;
    bottom: 2rem;
    margin: 0;
    font-size: 0.8rem;
    color: var(--muted);
    letter-spacing: 0.08em;
    text-align: right;
    z-index: 1;
}

@media (max-width: 640px) {
    .gate-lead {
        right: 0;
        left: 0;
        bottom: 1.4rem;
        padding: 0 1.2rem;
        text-align: center;
        font-size: 0.72rem;
    }
}


/* ACHIEVEMENTS：事例の、小見出し（こんな場面／やったこと／ポイント） */
.case-study p + p {
    margin-top: 0.55rem;
}

.case-label {
    display: inline-block;
    margin-right: 0.7em;
    padding: 0.05em 0.7em;
    border: 1px solid var(--accent);
    border-radius: 3px;
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    line-height: 1.6;
    vertical-align: 0.1em;
}


/* ACHIEVEMENTS：事例の絞り込み */
.case-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1.2rem 0 2rem;
}

.case-filter-btn {
    padding: 0.4rem 0.95rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--paper);
    color: var(--muted);
    font: inherit;
    font-size: 0.85rem;
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.case-filter-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.case-filter-btn.is-active {
    border-color: var(--accent);
    background: var(--accent);
    color: var(--paper);
}

.case-study[hidden] {
    display: none;
}


/* PROJECT：予約システムの料金 */
.yoyaku-price-title {
    margin: 1.6rem 0 0.5rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--accent);
}

.yoyaku-price dd {
    font-size: 1.05rem;
    font-weight: 700;
}

/* 項目名の列を、文字の長さに合わせる（「ご契約のない施設」が、2行に折れないように） */
@media (min-width: 769px) {
    .yoyaku-price {
        grid-template-columns: max-content 1fr;
        column-gap: 2rem;
    }

    .yoyaku-price dt {
        white-space: nowrap;
    }
}

/* 画面が低いとき（小さいスマホ・横向き）は、ひとことを、固定せず、ページの最後に置く（ナビに重ならないように） */
@media (max-height: 700px) {
    .gate-lead {
        position: static;
        margin: 0 0 1.4rem;
        padding: 0 10%;
        text-align: right;
    }
}
