@charset "UTF-8";
/* Text Counter — gjsscと同じデザイントークン・コンポーネント語彙に合わせてある */

:root {
    --accent: #403999;
    --accent-dark: #322c7a;
    --accent-soft: #ece9fb;
    --accent-line: #d9d4f3;

    --ink: #1c1b26;
    --ink-2: #4a4857;
    --muted: #8a8796;

    --bg: #ffffff;
    --panel: #ffffff;
    --line: #e8e6ef;
    --line-2: #f2f1f7;

    --radius: 14px;
    --radius-sm: 10px;
    --shadow: 0 1px 2px rgba(28, 27, 38, .05), 0 8px 24px rgba(64, 57, 153, .06);
    --shadow-lg: 0 12px 40px rgba(64, 57, 153, .14);
}

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

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

body {
    font-family: "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--ink);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

/* ---------- ヘッダー（このツールはログイン不要のため、ロゴだけの簡易トップバー） ---------- */
.topbar {
    border-bottom: 1px solid var(--line);
    padding-top: env(safe-area-inset-top);
}
.topbar-in {
    display: flex; align-items: center; gap: 12px;
    min-height: 60px; padding: 8px 20px;
}
.brand { display: flex; align-items: center; gap: 10px; color: inherit; }
.brand-mark { width: 34px; height: 34px; border-radius: 9px; display: block; object-fit: contain; flex-shrink: 0; }
.brand-text { display: flex; flex-direction: row; align-items: baseline; gap: 4px; line-height: 1.15; white-space: nowrap; }
.brand-text strong {
    font-weight: 800; font-family: Outfit, sans-serif;
    font-size: 1.3rem; line-height: 1; letter-spacing: -.02em;
}
.brand-text small {
    display: inline-block; font-size: .9rem; font-weight: 600; color: var(--muted);
    font-family: 'Noto Sans JP', sans-serif; letter-spacing: 0; white-space: nowrap;
}

.page { flex: 1; display: flex; padding: 24px 16px 40px; }

.container {
    width: 100%;
    max-width: 1400px;
    margin-inline: auto;
    display: flex;
    flex-direction: column;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
}

/* Typography */
h1 {
    font-family: Outfit, sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 2px;
    color: var(--ink);
    letter-spacing: -.02em;
}

.subtitle {
    color: var(--muted);
    margin-bottom: 16px;
    font-size: .85rem;
}

/* Controls Area */
.controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    flex-wrap: wrap;
    gap: 12px;
}

/* Mode Toggle（gjsscの.tabsと同じ見た目） */
.mode-selector { display: flex; gap: 6px; background: var(--line-2); padding: 5px; border-radius: 999px; }
.mode-btn {
    background: transparent; border: none; padding: 9px 18px; border-radius: 999px;
    cursor: pointer; color: var(--ink-2); font-weight: 600;
    transition: background .15s, color .15s; font-family: inherit; font-size: .9rem;
}
.mode-btn:hover { color: var(--ink); }
.mode-btn.active { background: #fff; color: var(--accent); box-shadow: var(--shadow); }

/* Action Buttons（gjsscの.btnと同じ語彙） */
.actions { display: flex; gap: 10px; }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 9px 18px; border-radius: 999px; border: 1px solid var(--line);
    font: inherit; font-weight: 600; font-size: .9rem;
    cursor: pointer; background: transparent; color: var(--ink-2);
    transition: background .15s, border-color .15s, color .15s;
}
.btn:hover { background: var(--line-2); text-decoration: none; }
.btn-primary { background: var(--accent); color: #fff; border-color: transparent; }
.btn-primary:hover { background: var(--accent-dark); }

/* Layout */
.main-layout {
    display: flex;
    gap: 20px;
    align-items: stretch;
    flex-grow: 1;
    min-height: 0;
}

.left-panel {
    flex: 2;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.right-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 0;
}

/* Textarea */
textarea {
    width: 100%;
    flex-grow: 1;
    min-height: 200px;
    padding: 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
    font-family: inherit;
    font-size: 1rem;
    resize: none;
    overflow-y: auto;
    line-height: 1.6;
    transition: border-color .15s, box-shadow .15s;
}

textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(64, 57, 153, .12);
}

/* Results Vertical */
.results {
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    padding-right: 2px;
}

.stat-card {
    background: var(--line-2);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 12px;
    text-align: center;
}

.stat-value {
    font-family: Outfit, sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--accent);
    font-variant-numeric: tabular-nums;
}

.stat-label {
    font-size: .75rem;
    color: var(--muted);
    font-weight: 500;
}

/* Toast Notification（gjsscの.toastと同じ見た目・出し方） */
.toast {
    position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(8px);
    background: var(--ink); color: #fff; border-radius: 999px;
    padding: 9px 20px; font-size: .85rem; font-weight: 500;
    box-shadow: var(--shadow-lg); z-index: 200;
    opacity: 0; transition: opacity .18s, transform .18s;
    max-width: calc(100% - 32px);
    display: flex; align-items: center; gap: 8px;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.foot {
    text-align: center;
    color: var(--muted);
    font-size: .82rem;
    padding: 16px 0 24px;
}

@media (max-width: 768px) {
    .main-layout {
        flex-direction: column;
    }
}

@media (max-width: 600px) {
    .container {
        padding: 16px;
    }

    .controls {
        flex-direction: column;
        align-items: stretch;
    }

    .mode-selector {
        justify-content: center;
    }

    .actions {
        justify-content: center;
    }
}
