/* =========================================================
   名刺のトップ（/）と、お店・販売用のカードのトップ（/cards）を行き来する部品
   home.html・cards.html の両方から読む。
   ========================================================= */

/* ページ最上部の切替。スマホでナビが隠れても、常に見える位置に置く */
.top-switch {
    border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
    background: var(--surface);
}

.top-switch-inner {
    display: flex;
    gap: 4px;
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.top-switch-link {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 14px;
    border-bottom: 3px solid transparent;
    color: var(--ink-2);
    font-size: 13.5px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.top-switch-link:hover {
    color: var(--accent);
}

.top-switch-link[aria-current="page"] {
    border-bottom-color: var(--coral);
    color: var(--ink);
}

/* もう一方のトップへの案内。どちらのトップでも、ヒーローの直後に置く */
.top-entry {
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.top-entry-link {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    max-width: 880px;
    margin: 0 auto;
    padding: 18px 22px;
    border: 1.5px solid var(--line-strong);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    color: var(--ink);
    text-decoration: none;
    transition: border-color 0.15s, transform 0.15s;
}

.top-entry-link:hover {
    border-color: var(--accent-line);
    transform: translateY(-1px);
}

.top-entry-text {
    display: grid;
    gap: 4px;
}

.top-entry-text b {
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 900;
}

.top-entry-text span {
    color: var(--ink-2);
    font-size: 14px;
    line-height: 1.7;
    text-wrap: pretty;
    word-break: auto-phrase;
}

.top-entry-link svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: var(--accent);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 0.15s;
}

.top-entry-link:hover svg {
    transform: translateX(3px);
}

@media (max-width: 600px) {
    .top-switch-inner {
        justify-content: center;
    }

    .top-switch-link {
        flex: 1;
        justify-content: center;
        padding: 0 8px;
        font-size: 13px;
    }

    .top-entry-link {
        padding: 16px 18px;
    }
}
