@charset "utf-8";

/* ==========================================================================
    1. 基本リセットと全体設定
    ========================================================================== */
:root {
    --text: #2b2b2b;
    --border-color: #2b2b2b;
    --shadow-color: #a0fadf;
    --muted: #606166;
    --max: 1000px;
    --header-height: 65px;
    --page-gutter: 40px;
}

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

html {
    overflow-x: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: white;
    background: linear-gradient(20deg,rgba(255, 249, 240, 1) 5%, rgba(250, 255, 252, 1) 22%, rgba(247, 250, 250, 1) 45%, rgba(253, 247, 244, 1) 75%, rgba(245, 240, 255, 1) 95%);
    color: #2b2b2b;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
}

main {
    flex: 1 0 auto;
}

p {
    margin: 0 0 8px 0;
    font-weight: 400;
    font-size: 15px;
    letter-spacing: 0.1em;
    line-height: 1.7;
    text-align: left;
}

/* ==========================================================================
    2. ユーティリティ（便利な共通クラス）
    ========================================================================== */
.mt-10 { margin-top: 10px; }
.mb-0 { margin-bottom: 0; }

/* アイコン用の位置調整クラス */
.icon-heading {
    margin-right: 10px;
    vertical-align: -6px;
}
.icon-btn {
    margin-right: 5px;
    vertical-align: -3px;
}

/* ==========================================================================
    3. 共通ヘッダー（index.html / account.html）
    ========================================================================== */
.landing-page,
.account-page {
    --header-height: 65px;
    -webkit-font-smoothing: antialiased;
}

.account-page {
    --max: 1140px;
}

.landing-page a:not(.cta-button) {
    color: inherit;
    text-decoration: none;
}

/* サイト共通ナビのみ sticky（main 内の legal-hero 等の header は対象外） */
.landing-page > header,
.account-page > header {
    position: sticky;
    top: 0;
    z-index: 20;
    background-color: rgba(247, 242, 237, 0.268);
    backdrop-filter: blur(10px);
    border-bottom: 0.5px solid #7272724e;
}

.nav {
    min-height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 8px 0;
    flex-wrap: nowrap;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: 0.05em;
    color: var(--text);
    text-decoration: none;
    flex-shrink: 0;
    min-width: 0;
}

.logo span {
    white-space: nowrap;
}

.landing-page .hero-logo,
.account-page .hero-logo {
    height: 30px;
    width: auto;
    margin-bottom: 0;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 26px;
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
    min-width: 0;
    flex-shrink: 1;
}

.nav-links a:not(.cta-button) {
    color: inherit;
    text-decoration: none;
    white-space: nowrap;
}

.nav-links a:not(.cta-button):hover { color: var(--text); }

.dash-user-info {
    font-weight: 600;
    font-size: 14px;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dash-user-info:empty {
    display: none;
}

.dash-nav-actions {
    flex-wrap: nowrap;
    justify-content: flex-end;
    align-items: center;
    min-width: 0;
    flex-shrink: 1;
}

.wrap {
    width: min(calc(100% - 2 * var(--page-gutter)), var(--max));
    max-width: 100%;
    margin: 0 auto;
}

@media (max-width: 650px) {
    .nav-links--marketing a:not(.cta-button) { display: none; }
}

/* タブレット：左右余白をやや狭く（コンテンツ幅に応じて可変） */
@media (max-width: 768px) {
    .landing-page,
    .account-page,
    .manual-page {
        --page-gutter: 32px;
    }
}

/* 狭い画面：ヘッダー共通（account / index / マニュアル等） */
@media (max-width: 520px) {
    .landing-page,
    .account-page,
    .manual-page {
        --header-height: 56px;
        --page-gutter: 24px;
    }

    .nav {
        gap: 10px;
        padding: 10px 0;
    }

    .logo {
        font-size: 1.2rem;
        gap: 8px;
    }

    .landing-page .hero-logo,
    .account-page .hero-logo {
        height: 26px;
    }

    .nav-links {
        gap: 10px;
        font-size: 12px;
    }

    .nav-links .cta-button {
        font-size: 0.72rem;
        padding: 6px 11px;
        letter-spacing: 0.06em;
        white-space: nowrap;
    }

    .account-page .dash-nav-actions {
        gap: 8px;
    }

    /* マイページ：ロゴ・ユーザー名・ログインボタンを縦並び中央寄せ */
    .account-page .nav {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 8px;
        padding: 12px 0;
    }

    .account-page .logo {
        justify-content: center;
    }

    .account-page .dash-nav-actions {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 100%;
        gap: 6px;
    }

    .account-page .dash-user-info {
        font-size: 12px;
        max-width: 100%;
        text-align: center;
    }

    .nav-links--docs {
        gap: 8px;
        font-size: 11px;
    }
}

@media (max-width: 400px) {
    .nav-links .cta-button {
        font-size: 0.68rem;
        padding: 5px 9px;
    }

    .nav-links--docs {
        gap: 6px;
        font-size: 10px;
    }
}

/* ==========================================================================
    4. ランディングページ（index.html）
    ========================================================================== */
html:has(.landing-page) {
    scroll-behavior: smooth;
    scroll-padding-top: calc(65px + 30px);
    overscroll-behavior-y: none;
}

.block-line { display: block; }

/* ヒーローセクション */
.landing-page .hero {
    padding: 80px 0 60px;
    text-align: left;
    margin: 0;
    max-width: none;
    display: block;
}

.hero-grid {
    display: grid;
    grid-template-columns: 52fr 48fr;
    gap: 40px;
    align-items: center;
    overflow: visible;
}

.landing-page h1 {
    margin: 20px 0;
    font-size: clamp(32px, 4.5vw, 56px);
    line-height: 1.25;
    font-weight: 800;
    letter-spacing: 0.05em;
}

.hero-copy {
    font-size: 1.1rem;
    font-weight: 500;
    line-height: 1.8;
    margin-bottom: 30px;
    letter-spacing: 0.03em;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 28px;
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.05em;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-secondary {
    background-color: #ffffff;
    color: var(--text);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    box-shadow: 4px 4px 0px var(--shadow-color);
    transform: translateY(-2px);
}

.login-note {
    margin-top: 15px;
    font-size: 13px;
    color: var(--muted);
}

.hero-image-container {
    display: block;
    width: 100%;
    padding: 0;
    margin: 10px 18px 10px 6px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
    transform: rotate(1deg);
    transform-origin: center center;
    transition: transform 0.3s ease;
    cursor: pointer;
    font: inherit;
    text-align: inherit;
    color: inherit;
    box-sizing: border-box;
}

.hero-image-container:hover {
    transform: rotate(0deg) translateY(-5px);
}

.hero-image-container:focus-visible {
    outline: 2px solid var(--accent, #2563eb);
    outline-offset: 3px;
}

.hero-image-container img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    object-position: left top;
}

/* セクション共通（ランディング）— 左右は .wrap に任せる（account と同じ） */
.landing-page section:not(.legal-section):not(.manual-section) {
    padding: 40px 0;
}

.landing-page h2 {
    font-size: clamp(24px, 3vw, 36px);
    margin: 0 0 15px;
    font-weight: 800;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
    display: inline-block;
}

.landing-page h3 {
    font-size: clamp(28px, 4vw, 40px);
    margin: 0 0 20px;
    font-weight: 800;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
    display: inline-block;
    letter-spacing: 0.05em;
}

.landing-page section p {
    letter-spacing: 0.02em;
    line-height: 1.7;
    margin-bottom: 1rem;
}

/* リスト */
.sub-list {
    list-style: none;
    padding: 0 0 0 10px;
    margin: 0 0 15px 0;
}

.sub-list li {
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0.08em;
    line-height: 1.7;
    position: relative;
    padding-left: 1em;
}

.sub-list li::before {
    content: "・";
    position: absolute;
    left: 0;
}

/* セキュリティ・詳細機能 */
.security {
    background-image: linear-gradient(135deg, #ffffff3d 35%, #ffffff 100%);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 40px;
}

.security-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 30px;
}

.security-grid2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 30px;
}

.security-item {
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: #f9f9f9;
}

.security-item h3 {
    font-size: 1.1rem;
    margin-top: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.notice {
    margin-top: 30px;
    padding: 15px;
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.5);
}

/* CTA */
.cta {
    text-align: center;
    padding: 80px 0;
}

.cta h3 {
    border: none;
    display: block;
    margin-bottom: 15px;
}

.cta .hero-actions {
    justify-content: center;
    margin-top: 55px;
}

.cta p {
    text-align: center;
    margin-top: 25px;
    margin-bottom: 0;
}

.cta-images {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.cta-images img {
    object-fit: cover;
    flex-shrink: 0;
}

.img-book {
    padding-top: 7px;
    height: 100px;
    width: auto;
}

.img-words {
    width: 140px;
    height: auto;
}

.img-tasks {
    height: 120px;
    width: auto;
}

.img-memo {
    padding-top: 5px;
    width: 160px;
    height: auto;
}

/* ランディング：レスポンシブ */
@media (max-width: 1100px) {
    .price-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
    .hero-grid { grid-template-columns: 1fr; gap: 30px; }
    .hero-image-container {
        transform: none;
        margin: 0;
    }
    .hero-image-container:hover {
        transform: translateY(-5px);
    }
    .price-grid { grid-template-columns: 1fr; }
    .security-grid, .security-grid2 { grid-template-columns: 1fr; }
    .security { padding: 25px; }
}

@media (max-width: 650px) {
    .feature-grid { grid-template-columns: 1fr; }
    .block-line { display: inline; }

    .landing-page section:not(.hero):not(.legal-section):not(.manual-section) {
        padding: 28px 0;
    }
}

/* ==========================================================================
    5. ダッシュボード用レイアウト（account.html）
    ========================================================================== */
.dash-main {
    flex: 1;
    padding: 40px 0 60px;
}

.dash-news {
    padding-bottom: 40px;
}

.dash-news .feature-card {
    margin-bottom: 0;
}

.dash-news .feature-grid {
    grid-template-columns: 1fr;
}

/* ==========================================================================
    6. 汎用カードスタイル群
    ========================================================================== */
.list {
    font-size: 15px;
    line-height: 1.4;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--text);
    text-align: left;
    display: block;
}

.sub {
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0.08em;
    line-height: 1.7;
    padding-left: 10px;
}

.price-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.plan-card {
    background: white;
    padding: 30px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}

.plan-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(64, 75, 73, 0.11);
}

.plan-card h4 {
    font-size: 1.3rem;
    margin-bottom: 18px;
    padding-bottom: 7px;
    letter-spacing: 0.09em;
    border-bottom: 2px solid var(--border-color);
    width: 100%;
}

.plan-card .plan-note {
    display: block;
    margin: 0 0 5px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #444;
    letter-spacing: 0.02em;
    line-height: 1.3;
}

.plan-card .plan-note + br {
    display: none;
}

.plan-card .plan-name {
    display: block;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 0.35em;
}

.plan-card .plan-name + br {
    display: none;
}

.plan-card .cta-button {
    margin-top: auto;
}

.early-access-notice,
.checkout-sales-note,
.checkout-test-notice {
    margin: 0 0 20px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.92rem;
    line-height: 1.5;
}

.early-access-notice {
    border: 1.5px solid #7b1fa2;
    background: #f3e5f5;
    color: #4a148c;
}

.early-access-notice__title {
    margin: 0 0 8px;
    font-weight: 700;
}

.early-access-notice__body {
    line-height: 1.32;
}

.early-access-notice p {
    margin: 0 0 8px;
}

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

.early-access-notice__link a {
    font-weight: 700;
    color: inherit;
}

.early-access-price-notes {
    margin: 16px 0 0;
    padding: 0;
    font-size: 0.88rem;
    line-height: 1.32;
    color: #555;
}

.early-access-price-notes__formal {
    display: inline-block;
    margin-top: 0.35rem;
    color: #444;
}

.checkout-sales-note {
    border: 1.5px solid #ccc;
    background: #fafafa;
    color: #444;
}

.checkout-test-notice {
    border: 1.5px solid #1565c0;
    background: #e3f2fd;
    color: #0d47a1;
}

.js-checkout-btn.is-pending {
    opacity: 0.55;
    cursor: not-allowed;
}

.js-checkout-btn.is-pending:hover {
    background-color: #000000;
    color: #ffffff;
}

.plan-card::before {
    position: absolute;
    top: 22px;
    right: -40px;
    width: 150px;
    text-align: center;
    padding: 2px 0;
    color: #000000;
    font-size: 0.9rem;
    font-weight: 700;
    transform: rotate(45deg);
    letter-spacing: 0.05em;
    z-index: 1;
}

.plan-card.free-trial::before { content: "Free Trial"; background: #ffee6899; }
.plan-card.single::before { content: "Single"; background: #72ffba99; }
.plan-card.more::before { content: "More"; background: #9ed4ff99; }
.plan-card.collection::before { content: "Collection"; background: #e472ff99; }

.feature-card {
    background-image: linear-gradient(135deg, #ffffff3d 35%, #ffffff 100%);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 40px;
}

.feature-card h4 {
    font-size: 1.4rem;
    margin-bottom: 25px;
    padding-bottom: 10px;
    letter-spacing: 0.08em;
    border-bottom: 2px solid var(--border-color);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
}

.feature {
    background: #ffffff;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 30px;
    box-shadow: 6px 6px 0px var(--shadow-color);
    transition: transform 0.3s ease;
}

.feature:hover { transform: translateY(-4px); }

.feature h3 {
    font-size: 1.4rem;
    margin: 0 0 15px;
    border-bottom: none;
    padding-bottom: 0;
}

.feature-item {
    background: #f9f9f9;
    padding: 25px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
}

.feature-item-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text);
    display: inline-block;
    background: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-family: monospace, sans-serif;
    letter-spacing: 0.05em;
}

.chip {
    padding: 4px 12px;
    border-radius: 20px;
    background: #f9f9f9;
    color: var(--text);
    font-size: 12px;
    font-weight: 600;
    border: 1px solid var(--border-color);
}

@media (max-width: 768px) {
    .price-grid, .feature-grid { grid-template-columns: 1fr; gap: 20px; }
    .feature-card { padding: 20px; }
    .feature-item { padding: 15px; }
}

.cta-button {
    display: inline-block;
    background-color: #000000;
    color: #ffffff;
    padding: 8px 19px 8px 15px;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    border: 0.9px solid #000000;
    border-radius: 28px;
    transition: background-color 0.2s, color 0.2s;
    text-decoration: none;
    cursor: pointer;
    font-family: inherit;
    line-height: 1.2;
}

.cta-button:hover {
    background-color: #ffffff;
    color: #000000;
}

/* ヘッダーナビのみ：白背景・黒文字 → ホバーで反転 */
.nav-links .cta-button {
    background-color: #ffffff;
    color: #000000;
    padding: 9px 15px;
    margin: 0;
}

.nav-links .cta-button:hover {
    background-color: #000000;
    color: #ffffff;
}

.nav-links .cta-button[hidden] {
    display: none;
}

/* ==========================================================================
    7. ダッシュボード用スタイル
    ========================================================================== */
.dash-title-area {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 40px;
    border-bottom: 1.5px solid #2b2b2b;
    padding-bottom: 15px;
}

.dash-title-area h1 {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.status-group {
    display: flex;
    align-items: center;
    gap: 20px;
}

.plan-badge {
    background: #72ffbadb;
    color: #000;
    padding: 4px 16px;
    border-radius: 5px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.plan-badge[title]:not([title=""]) {
    cursor: help;
}

.scatter-access-mode-status[title]:not([title=""]) {
    cursor: help;
}

.file-list-error {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 20px;
    margin-bottom: 24px;
    padding: 14px 18px;
    border: 1.5px solid #c62828;
    border-radius: 8px;
    background: #fff5f5;
}

.file-list-error[hidden] {
    display: none !important;
}

.file-list-error-text {
    margin: 0;
    flex: 1 1 220px;
    font-size: 0.92rem;
    line-height: 1.5;
    color: #8b0000;
}

.file-list-retry-btn {
    flex-shrink: 0;
}

.trial-welcome-banner {
    margin-bottom: 20px;
    padding: 14px 18px;
    border: 1.5px solid #2b2b2b;
    border-radius: 8px;
    background: #fff8e1;
}

.trial-welcome-banner p {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.55;
    color: #222;
}

.trial-welcome-banner[hidden] {
    display: none !important;
}

.file-list-status {
    color: #666;
    font-size: 0.9rem;
}

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

.file-card {
    background: #ffffff;
    border: 2px solid #2b2b2b;
    border-radius: 8px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
    position: relative;
    min-width: 0;
}

.file-card.active:hover {
    transform: translateY(-4px);
    background: white;
}

.file-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
}

.file-access-badge {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 5px;
    white-space: nowrap;
}

.file-access-badge.mode-edit {
    background: #72ffbadb;
    color: #000;
}

.file-access-badge.mode-view {
    background: #ececec;
    color: #444;
}

.file-access-badge.mode-slot {
    background: #fff8e1;
    color: #333;
}

.file-card-slot {
    border-style: dashed;
    background: #fafafa;
    justify-content: center;
    min-height: 180px;
}

.file-slot-note {
    margin: 12px 0 0;
    font-size: 0.85rem;
    color: #666;
    line-height: 1.5;
}

.plan-badge.plan-expired {
    background: #ececec;
}

/* 未払い。expired の灰色と分けて「直せば戻る問題」だと分かるようにする */
.plan-badge.plan-past-due {
    background: #fff789;
}

.billing-portal-btn {
    display: inline-block;
    background-color: #000000;
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 8px 18px;
    letter-spacing: 0.06em;
    white-space: nowrap;
    border: none;
    font-family: inherit;
    line-height: 1.2;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}

.billing-portal-btn:hover {
    background-color: #ffffff;
    color: #000000;
}

.billing-portal-btn[hidden] {
    display: none !important;
}

.tab-billing-row {
    display: flex;
    justify-content: flex-end;
    margin-top: -2px;
    position: relative;
    z-index: 11;
}

.tab-billing-row:not(:has(.billing-portal-btn:not([hidden]))) {
    display: none;
}

.tab-container:has(.billing-portal-btn:not([hidden])) .tab-content.active {
    border-bottom-right-radius: 0;
}

.tab-container .billing-portal-btn {
    border: 2px solid #2b2b2b;
    border-top: none;
    border-radius: 0 0 8px 8px;
}

.app-type {
    font-size: 0.75rem;
    font-weight: 500;
    display: inline-block;
    margin-bottom: 12px;
    align-self: flex-start;
}
.type-word { color: #606166; }
.type-task { color: #606166; }

.file-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 15px;
    flex-grow: 1;
    color: #2b2b2b;
}

.last-modified {
    font-size: 0.85rem;
    color: #606166;
    margin-bottom: 2px;
    text-align: center;
}

.open-btn {
    display: block;
    text-align: center;
    background: #000000;
    color: #ffffff;
    padding: 10px 15px;
    border-radius: 28px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    border: 0.9px solid #000000;
    transition: background-color 0.2s, color 0.2s;
    margin-bottom: 20px;
}
.open-btn:hover {
    background-color: #ffffff;
    color: #000000;
}

/* タブレット・スマホ画面（1024px以下）のダッシュボードタイトル配置 */
@media (max-width: 1024px) {
    .dash-title-area { 
        flex-direction: column;  
        align-items: flex-start; 
        gap: 15px;               
    }
    .status-group { 
        width: 100%; 
        flex-direction: column;  
        align-items: flex-start; 
        gap: 12px;               
    }
    
    .plan-badge {
        order: 1;
    }
}

@media (max-width: 768px) {
    .file-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 650px) {
    .tab-content {
        padding: 20px 16px;
    }

    .dash-main {
        padding: 28px 0 48px;
    }

    .dash-title-area h1 {
        font-size: 1.55rem;
    }

    .plan-badge {
        font-size: 0.72rem;
        padding: 4px 12px;
        line-height: 1.45;
        max-width: 100%;
        overflow-wrap: anywhere;
    }

    .tab-btn {
        padding: 10px 16px;
        font-size: 0.9rem;
    }

    .tab-btn.active {
        padding-top: 14px;
    }

    .tab-container .billing-portal-btn {
        font-size: 0.72rem;
        padding: 7px 14px;
    }

    .create-form {
        flex-direction: column;
    }

    .create-form .create-input,
    .create-form .cta-button {
        width: 100%;
    }

    .file-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .file-card {
        padding: 20px;
    }
}

/* ==========================================================================
    8. フッター
    ========================================================================== */
.global-footer {
    width: 100%;
    background-color: rgba(245, 245, 245, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 20px 20px;
    border-top: 2px solid #2b2b2b;
    margin-top: auto;
    box-sizing: border-box;
}

.footer-icons {
    order: 1;
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.footer-icons a { transition: opacity 0.2s; }
.footer-icons a:hover { opacity: 0.7; }

.footer-legal {
    order: 2;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 16px;
    margin-bottom: 8px;
    font-size: 13px;
    letter-spacing: 0.05em;
}

.footer-legal a {
    color: #333;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.footer-copyright {
    order: 3;
    font-size: 0.875rem;
    color: #333;
    letter-spacing: 0.05em;
}

/* ==========================================================================
    9. タブUI用スタイル (ダッシュボード)
    ========================================================================== */
.tab-container {
    width: 100%;
    min-width: 0;
    margin-bottom: 40px;
}

/* タブボタンの並び */
.tab-header {
    display: flex;
    margin-bottom: -2px; /* コンテンツの枠線に重ねて一体化させる */
    position: relative;
    z-index: 10;
}

/* タブボタンの基本スタイル（非選択） */
.tab-btn {
    background: #cccccc;
    border: 2px solid #2b2b2b;
    border-bottom: none;
    padding: 12px 30px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    border-radius: 8px 8px 0 0;
    margin-right: 8px;
    color: #ffffff;
    transition: all 0.2s ease;
    letter-spacing: 0.05em;
}

/* アクティブ（選択中）のタブボタン */
.tab-btn.active {
    background: #ffffff;
    color: #000000;
    padding-top: 16px; /* 少し背を高くして目立たせる */
    /* border-bottom: 2px solid #ffffff; 下線を消してコンテンツと繋げる */
}

/* タブの中身のエリア */
.tab-content {
    display: none; /* 基本は隠しておく */
    border: 2px solid #2b2b2b;
    border-radius: 0 8px 8px 8px;
    padding: 30px;
    min-width: 0;
    overflow-x: auto;
}

#task-tab.tab-content {
    background-image: linear-gradient(166deg, #fffeff 7%, #f1ffd69c 100%);
}

#word-tab.tab-content {
    background-image: linear-gradient(166deg, #fffeff 7%, #dfd6ff8a 100%);
}

/* アクティブなコンテンツだけ表示する */
.tab-content.active {
    display: block;
}

/* 新規作成フォームの並び */
.create-form {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1.5px dashed #ccc;
}

.create-form .create-input {
    min-width: 0;
}

.create-form .cta-button {
    flex-shrink: 0;
}

/* 入力枠のスタイル */
.create-input {
    flex-grow: 1;
    padding: 12px 20px;
    font-size: 1rem;
    border: 2px solid #2b2b2b;
    border-radius: 28px;
    outline: none;
    font-family: inherit;
    transition: box-shadow 0.2s;
}

.create-input:focus {
    box-shadow: 0 0 0 4px rgba(160, 250, 223, 0.4); /* フォーカス時に影をつける */
}

/* ==========================================================================
    追加: ファイルカード内のシステム名と削除ボタン
    ========================================================================== */

/* システムファイル名（データ名）のデザイン */
.system-filename {
    font-size: 0.75rem;
    color: #606166;
    margin-top: 0;
    margin-bottom: 15px;
    text-align: center;
    overflow-wrap: anywhere;
    word-break: break-all;
    line-height: 1.45;
}

/* 削除ボタンのデザイン */
.delete-btn {
    margin-top: 15px;
    background: none;
    border: none;
    color: #202020;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
    display: flex;          /* アイコンと文字を横並びにする */
    align-items: center;    /* 縦の真ん中で揃える */
    justify-content: center;/* 横の真ん中で揃える */
    transition: color 0.2s; /* ホバー時の色変化を滑らかに */
}

/* 削除ボタン：マウスを乗せた時に少し濃い赤にする */
.delete-btn:hover {
    color: #cc0000;
}

/* 作成・削除ボタンの処理中表示 */
.cta-button.is-loading,
.delete-btn.is-loading {
    pointer-events: none;
    cursor: wait;
    opacity: 0.85;
}

.cta-button:disabled:not(.is-loading),
.delete-btn:disabled:not(.is-loading) {
    cursor: not-allowed;
    opacity: 0.55;
}

.cta-button.is-loading {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.delete-btn.is-loading {
    color: #666;
}

/* Scatter 内確認（confirm 代替 — マイページ・ランディング用） */
.scatter-confirm-modal {
    position: fixed;
    inset: 0;
    z-index: 4000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
}

.scatter-confirm-modal[hidden] {
    display: none !important;
}

body.scatter-confirm-open {
    overflow: hidden;
}

.scatter-confirm-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
}

.scatter-confirm-panel {
    position: relative;
    z-index: 1;
    width: min(420px, 100%);
    padding: 22px 18px;
    border-radius: 12px;
    background: #fff;
    border: 2px solid var(--border-color);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
}

.scatter-confirm-title {
    margin: 0 0 12px;
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
}

.scatter-confirm-message {
    margin: 0 0 20px;
    font-size: 14px;
    line-height: 1.55;
    color: var(--text);
    white-space: pre-line;
}

.scatter-confirm-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.scatter-confirm-actions button {
    min-height: 44px;
    min-width: 0;
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: #fff;
    color: var(--text);
    font-size: 14px;
    cursor: pointer;
}

.scatter-confirm-ok {
    border-color: var(--text);
    background: var(--text);
    color: #fff;
}

.scatter-confirm-ok.danger {
    border-color: #c0392b;
    background: #c0392b;
    color: #fff;
}

.scatter-confirm-cancel:hover,
.scatter-confirm-ok:hover {
    opacity: 0.92;
}

/* Scatter 内入力（prompt 代替） */
.scatter-prompt-modal .scatter-prompt-panel {
    text-align: left;
}

.scatter-prompt-input {
    display: block;
    width: 100%;
    margin: 0 0 8px;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    line-height: 1.4;
    color: var(--text);
    background: #fff;
    box-sizing: border-box;
}

.scatter-prompt-input:focus {
    outline: 2px solid var(--text);
    outline-offset: 1px;
}

.scatter-prompt-error {
    margin: 0 0 12px;
    font-size: 13px;
    line-height: 1.45;
    color: #c0392b;
}

body.scatter-prompt-open {
    overflow: hidden;
}

body.scatter-alert-open {
    overflow: hidden;
}

.scatter-alert-panel .scatter-confirm-title,
.scatter-alert-panel .scatter-confirm-message {
    text-align: center;
}

.scatter-alert-actions {
    display: flex;
    justify-content: center;
}

.scatter-alert-actions .scatter-alert-ok {
    min-width: 140px;
    min-height: 44px;
}

.btn-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: btn-spin 0.7s linear infinite;
    flex-shrink: 0;
}

@keyframes btn-spin {
    to { transform: rotate(360deg); }
}

/* ==========================================================================
    Google アカウント確認モーダル（購入・ログイン）
    ========================================================================== */
body.google-account-confirm-open {
    overflow: hidden;
}

.google-account-confirm-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.google-account-confirm-modal[hidden] {
    display: none !important;
}

.google-account-confirm-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(43, 43, 43, 0.45);
}

.google-account-confirm-panel {
    position: relative;
    width: min(100%, 480px);
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(43, 43, 43, 0.18);
    padding: 28px 24px 24px;
}

.google-account-confirm-title {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.5;
    margin-bottom: 14px;
}

.google-account-confirm-email {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text);
    word-break: break-all;
    margin-bottom: 14px;
}

.google-account-confirm-note {
    font-size: 0.92rem;
    color: var(--muted);
    line-height: 1.7;
    margin-bottom: 22px;
}

.google-account-confirm-actions {
    display: flex;
    flex-direction: column-reverse;
    gap: 10px;
}

.google-account-confirm-switch {
    background: #fff;
    color: var(--text);
    border: 1px solid var(--border-color);
    box-shadow: none;
}

.google-account-confirm-switch:hover {
    background: #f7f7f7;
}

.google-account-confirm-continue {
    width: 100%;
}

@media (min-width: 520px) {
    .google-account-confirm-actions {
        flex-direction: row;
        justify-content: flex-end;
    }

    .google-account-confirm-switch,
    .google-account-confirm-continue {
        width: auto;
        min-width: 0;
    }
}

/* ==========================================================================
    プラン変更確認モーダル
    ========================================================================== */
body.plan-change-confirm-open {
    overflow: hidden;
}

.plan-change-confirm-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.plan-change-confirm-modal[hidden] {
    display: none !important;
}

.plan-change-confirm-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(43, 43, 43, 0.45);
}

.plan-change-confirm-panel {
    position: relative;
    width: min(100%, 520px);
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(43, 43, 43, 0.18);
    padding: 28px 24px 24px;
}

.plan-change-confirm-title {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.5;
    margin-bottom: 14px;
}

.plan-change-confirm-body {
    font-family: inherit;
    font-size: 0.92rem;
    color: var(--text);
    line-height: 1.7;
    white-space: pre-wrap;
    margin: 0 0 22px;
    background: transparent;
    border: none;
    padding: 0;
}

.plan-change-confirm-actions {
    display: flex;
    flex-direction: column-reverse;
    gap: 10px;
}

.plan-change-confirm-cancel {
    background: #fff;
    color: var(--text);
    border: 1px solid var(--border-color);
    box-shadow: none;
}

.plan-change-confirm-cancel:hover {
    background: #f7f7f7;
}

@media (min-width: 520px) {
    .plan-change-confirm-actions {
        flex-direction: row;
        justify-content: flex-end;
    }
}

/* ==========================================================================
    ランディング / マイページ — ops 風見出し・お知らせ（2026-08-31）
    ========================================================================== */

.landing-page .scatter-kicker {
    font-size: 0.92rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    margin: 20px 0 12px;
    padding: 0 0 8px;
    border-bottom: 1px dashed var(--border-color);
    color: var(--text);
    line-height: 1.4;
}

.landing-page .security .feature-grid + h2 {
    margin-top: 36px;
}

.landing-page .security {
    padding: 32px 28px;
}

.landing-page .security .feature {
    background: #fbfbfbe8;
    padding: 28px 26px;
}

.landing-page .security .feature h3 {
    margin-bottom: 12px;
}

.landing-page .security .feature--flat {
    box-shadow: none;
}

.landing-page .security .feature--flat:hover {
    transform: none;
}

.landing-page .security .feature .scatter-kicker {
    margin-top: 28px;
}

.landing-page .security .feature .list {
    margin-bottom: 8px;
}

.landing-page .security .feature .sub {
    margin-bottom: 4px;
    padding-left: 0;
}

.landing-page .security .security-item {
    padding: 22px 20px;
}

.landing-page .security .security-item h3 {
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    margin: 0 0 10px;
    padding-bottom: 8px;
    border-bottom: 1px dashed var(--border-color);
}

.landing-page .security .security-item .sub {
    padding-left: 0;
    margin-bottom: 0;
    line-height: 1.85;
}

.landing-page .security .security-grid {
    gap: 18px;
    margin-top: 24px;
}

.landing-page .security .sub-list {
    margin: 0 0 8px;
    padding-left: 8px;
}

.landing-page .security .sub-list li {
    margin-bottom: 8px;
    line-height: 1.8;
    letter-spacing: 0.06em;
}

.landing-page .security .sub-list li:last-child {
    margin-bottom: 0;
}

.landing-page .format-chip-item {
    line-height: 1.85;
    padding-bottom: 2px;
}

.landing-page .chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 12px;
    margin-top: 12px;
    line-height: 1;
}

.landing-page .chip-row .chip {
    display: inline-block;
    margin: 0;
    line-height: 1.4;
    padding: 5px 12px;
}

.landing-page .preview-notice {
    background: rgba(255, 255, 255, 0.45);
    border: 1px dashed var(--border-color);
    border-radius: 8px;
    padding: 16px 20px;
    margin: 28px 0 0;
    font-size: 14px;
    line-height: 1.9;
    letter-spacing: 0.05em;
}

.account-page .preview-news .preview-news-panel {
    background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.28) 35%, rgba(255, 255, 255, 0.78) 100%);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 32px 36px;
}

.account-page .preview-news-heading {
    display: block;
    width: 100%;
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    padding-bottom: 12px;
    margin: 0 0 22px;
    border-bottom: 2px solid var(--border-color);
    line-height: 1.35;
}

.account-page .preview-news-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.account-page .preview-news-item {
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 18px 22px;
}

.account-page .preview-news-title {
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    margin: 0 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px dashed var(--border-color);
    line-height: 1.45;
}

.account-page .preview-news-body {
    font-size: 14px;
    line-height: 1.9;
    letter-spacing: 0.05em;
    margin: 0;
    padding-left: 0;
}

.account-page .preview-news-body a {
    color: var(--text);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.account-page .dash-news.preview-news {
    padding-bottom: 48px;
}

@media (max-width: 900px) {
    .landing-page .security {
        padding: 26px 22px;
    }

    .landing-page .security .feature {
        padding: 24px 20px;
    }
}

@media (max-width: 640px) {
    .landing-page .security {
        padding: 22px 18px;
    }

    .landing-page .security .feature {
        padding: 22px 18px;
    }

    .landing-page .security .security-item {
        padding: 18px 16px;
    }

    .landing-page .scatter-kicker {
        margin: 18px 0 10px;
    }

    .landing-page .chip-row {
        gap: 12px 10px;
        margin-top: 14px;
    }

    .landing-page .chip-row .chip {
        padding: 6px 12px;
    }

    .landing-page .preview-notice {
        padding: 14px 16px;
        margin-top: 22px;
    }

    .account-page .preview-news .preview-news-panel {
        padding: 24px 20px;
    }

    .account-page .preview-news-item {
        padding: 16px 18px;
    }
}