/* polyrithm.net の表紙（index.html）の見た目。CSP（style-src 'self'）のため HTML の中に書かない
   🔴 [Unit 492] このファイルを変えたら、index.html の読み込みの `?v=` の値も変える（ブラウザが古い CSS を使い続けないように） */
:root {
    --bg: #0b0d10;
    --bg-elevated: #14171b;
    --bg-card: #191c21;
    --border: #2a2e35;
    --text: #f2f3f5;
    --text-muted: #9aa0ab;
    --accent: #6ea8fe;
    --accent-2: #7ee8b8;
    --accent-3: #f6a97a;
    --radius: 16px;
    --max-width: 1080px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -webkit-text-size-adjust: 100%;   /* [Unit 492] iPhone を横にしたときに文字が勝手に大きくならないように */
    text-size-adjust: 100%;
}

a { color: inherit; }

img, svg { max-width: 100%; display: block; }

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

/* ===== Header ===== */
header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(11, 13, 16, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    max-width: var(--max-width);
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 18px;
    letter-spacing: 0.02em;
    text-decoration: none;
}

/* [Unit 492] アプリと同じ灰色の「P」のアイコン（assets/app-icon.png＝src-tauri/icons/app-icon.png を縮めたもの） */
.logo-mark {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.nav-links {
    display: flex;
    gap: 28px;
    font-size: 14px;
    color: var(--text-muted);
}

.nav-links a { text-decoration: none; }
.nav-links a:hover { color: var(--text); }

.cta-small {
    display: inline-block;
    padding: 8px 18px;
    border-radius: 999px;
    background: var(--accent);
    color: #0b0d10;
    font-weight: 700;
    font-size: 13px;
    text-decoration: none;
    white-space: nowrap;
}

@media (max-width: 720px) {
    .nav-links { display: none; }
}

/* スマートフォンの幅のときだけ出す「Mac 用です」の案内（Unit 492・JavaScript なし） */
.mobile-note { display: none; }
@media (max-width: 720px) {
    .mobile-note {
        display: block;
        margin: 20px auto 0;
        max-width: 560px;
        padding: 12px 16px;
        border: 1px solid var(--accent);
        border-radius: 12px;
        background: var(--bg-card);
        color: var(--text-muted);
        font-size: 14px;
    }
    .mobile-note a { color: var(--accent); }
}

/* ===== Hero ===== */
.hero {
    padding: 88px 0 64px;
    text-align: center;
}

.hero-eyebrow {
    display: inline-block;
    font-size: 12px;
    letter-spacing: 0.08em;
    color: var(--accent);
    background: rgba(110, 168, 254, 0.1);
    border: 1px solid rgba(110, 168, 254, 0.3);
    padding: 6px 14px;
    border-radius: 999px;
    margin-bottom: 28px;
}

.hero h1 {
    font-size: clamp(32px, 5vw, 52px);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0 0 20px;
}

.hero h1 .accent {
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero p.lead {
    font-size: clamp(16px, 2vw, 19px);
    color: var(--text-muted);
    max-width: 640px;
    margin: 0 auto 36px;
}

.hero-actions {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 56px;
}
/* [Unit 492] 携帯の幅では縦に並べる（ダウンロードが上・中央・押しやすい幅） */
@media (max-width: 720px) {
    .hero-actions { flex-direction: column; align-items: center; }
    .hero-actions .btn { width: min(320px, 100%); justify-content: center; }
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 28px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    border: 1px solid transparent;
}

.btn-primary {
    background: var(--text);
    color: #0b0d10;
}

.btn-secondary {
    border-color: var(--border);
    color: var(--text);
    background: var(--bg-elevated);
}

/* 複数行になる文章は左揃え（見出し・ボタン・短い 1 行は中央のまま）。
   word-break: auto-phrase は日本語を文節で折り返す（対応しないブラウザは通常の折り返し） */
.hero p.lead,
.section-head p,
footer .fine-print.notice {
    text-align: left;
    word-break: auto-phrase;
}

/* ===== 画面の例 ===== */
.mock-frame {
    /* 写真の表示の幅（左右の余白 24px を含む）。画像は 2068px のまま＝縮めて表示 */
    max-width: 880px;
    margin: 0 auto 88px;
    padding: 0 24px;
}

.mock-window {
    border: 1px solid var(--border);
    border-radius: 20px;
    overflow: hidden;
    background: var(--bg-elevated);
    box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.6);
}

.mock-titlebar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-card);
}

.mock-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #4a4e57;
}

/* 画面の写真（2 倍の解像度で、表示の幅に合わせて縮める） */
.app-shot {
    display: block;
    width: 100%;
    height: auto;
}


/* ===== Section shared ===== */
section { padding: 64px 0; }

.section-head {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 48px;
}

.section-eyebrow {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--accent-2);
    margin-bottom: 10px;
}

.section-head h2 {
    font-size: clamp(24px, 3.5vw, 34px);
    font-weight: 800;
    letter-spacing: -0.01em;
    margin: 0 0 12px;
}

.section-head p {
    color: var(--text-muted);
    font-size: 15px;
    margin: 0;
}

/* ===== Problem / Solution ===== */
.problem-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

@media (max-width: 860px) {
    .problem-grid { grid-template-columns: 1fr; }
}

.problem-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 26px;
    background: var(--bg-card);
}

.problem-card .icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 16px;
    background: rgba(110, 168, 254, 0.12);
}

.problem-card h3 {
    font-size: 16px;
    margin: 0 0 8px;
}

.problem-card p {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0;
}

/* ===== Features ===== */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

@media (max-width: 860px) {
    .feature-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
    .feature-grid { grid-template-columns: 1fr; }
}

.feature-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    background: var(--bg-elevated);
}

.feature-card .badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 999px;
    margin-bottom: 12px;
}

.badge-mode { background: rgba(110, 168, 254, 0.15); color: var(--accent); }
.badge-tool { background: rgba(126, 232, 184, 0.15); color: var(--accent-2); }

.feature-card h3 {
    font-size: 16px;
    margin: 0 0 8px;
}

.feature-card p {
    font-size: 13.5px;
    color: var(--text-muted);
    margin: 0;
}

/* ===== Audience ===== */
.audience-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

@media (max-width: 860px) {
    .audience-list { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .audience-list { grid-template-columns: 1fr; }
}

.audience-item {
    text-align: center;
    padding: 24px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-card);
}

.audience-item .emoji { font-size: 28px; margin-bottom: 10px; }
.audience-item h4 { font-size: 14px; margin: 0 0 6px; }
.audience-item p { font-size: 12.5px; color: var(--text-muted); margin: 0; }

/* ===== Pricing ===== */
.pricing-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

@media (max-width: 720px) {
    .pricing-grid { grid-template-columns: 1fr; }
}

.price-card {
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 32px;
    background: var(--bg-card);
    position: relative;
}

.price-card.featured {
    border-color: var(--accent);
    background: linear-gradient(180deg, rgba(110,168,254,0.08), var(--bg-card) 40%);
}

.price-tag {
    position: absolute;
    top: -12px;
    right: 28px;
    background: var(--accent);
    color: #0b0d10;
    font-size: 11px;
    font-weight: 800;
    padding: 5px 12px;
    border-radius: 999px;
}

.price-card h3 {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin: 0 0 6px;
}

.price-amount {
    font-size: 40px;
    font-weight: 800;
    margin: 0 0 4px;
}

.price-amount span {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-muted);
}

.price-desc {
    font-size: 13.5px;
    color: var(--text-muted);
    margin: 0 0 24px;
}

/* Pro の年額の案内（金額のすぐ下） */
.price-annual {
    font-size: 13.5px;
    color: var(--text-muted);
    margin: -6px 0 12px;
    line-height: 1.7;
}
.price-annual b { color: var(--text); font-size: 16px; }

.price-btn {
    display: block;
    text-align: center;
    padding: 12px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
}

.price-card.featured .price-btn { background: var(--accent); color: #0b0d10; }
.price-card:not(.featured) .price-btn { background: var(--bg-elevated); border: 1px solid var(--border); color: var(--text); }

/* ===== Comparison table（携帯の幅でも 3 列） ===== */
.compare-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.compare-table th, .compare-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    text-align: left;
}

.compare-table th { background: var(--bg-card); color: var(--text-muted); font-weight: 600; }
.compare-table td.center, .compare-table th.center { text-align: center; }
.compare-table tr:last-child td { border-bottom: none; }

/* [Unit 492] 携帯の幅でも 3 列の表のまま（以前はカードの形に変えていた＝ユーザーの希望で 3 列に）。
   文字と余白を小さくし、機能の名前と長い値は折り返す。 */
@media (max-width: 640px) {
    .compare-table { font-size: 12.5px; table-layout: fixed; }
    .compare-table th, .compare-table td { padding: 10px 8px; overflow-wrap: anywhere; }
    .compare-table th:first-child, .compare-table td:first-child { width: 46%; }
    .compare-table th:nth-child(2), .compare-table td:nth-child(2) { width: 20%; }
}

/* ===== FAQ ===== */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.faq-item {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bg-card);
    overflow: hidden;
}

.faq-item summary {
    list-style: none;
    cursor: pointer;
    padding: 18px 20px;
    font-weight: 600;
    font-size: 14.5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
    content: '+';
    font-size: 20px;
    color: var(--text-muted);
    flex-shrink: 0;
    margin-left: 12px;
}

.faq-item[open] summary::after { content: '–'; }

.faq-item .faq-a {
    padding: 0 20px 18px;
    font-size: 13.5px;
    color: var(--text-muted);
}

/* ===== Final CTA ===== */
.final-cta {
    text-align: center;
    padding: 80px 24px;
    border-top: 1px solid var(--border);
}

.final-cta h2 {
    font-size: clamp(24px, 3.5vw, 34px);
    margin: 0 0 16px;
}

.final-cta p {
    color: var(--text-muted);
    margin: 0 0 32px;
}

/* ===== Footer ===== */
footer {
    border-top: 1px solid var(--border);
    padding: 40px 24px 48px;
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    text-align: center;
}

.yagxis-mark {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}
.yagxis-mark:hover .brand-name { color: var(--text); }

/* 運営元であることを示す小さな見出し */
.yagxis-mark .operator-label {
    font-size: 11px;
    letter-spacing: 0.08em;
    color: #6b7078;
}

.yagxis-mark .mark-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    /* [Unit 492] 上に赤・左下に青・右下に緑・中央は白に近い（円形のグラデーションを 3 つ重ねる） */
    background:
        radial-gradient(circle at 50% -8%, #ff5a5a 0, transparent 54%),
        radial-gradient(circle at -6% 106%, #3f6fff 0, transparent 57%),
        radial-gradient(circle at 106% 106%, #22c466 0, transparent 57%),
        #fbfbfc;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: #0b0d10;
    font-size: 15px;
    letter-spacing: -0.03em;
}

.yagxis-mark .brand-name {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

footer .fine-print {
    font-size: 12px;
    color: #6b7078;
}

footer .fine-print.notice { max-width: 720px; margin: 0; }

footer .footer-links {
    display: flex;
    flex-wrap: wrap;            /* [Unit 492] iPhone の幅で 1 行に収まらずはみ出していた */
    justify-content: center;
    gap: 10px 20px;
    font-size: 12.5px;
    color: var(--text-muted);
}

footer .footer-links a { text-decoration: none; white-space: nowrap; }  /* 折り返すときはリンク単位で（文字を途中で割らない） */
footer .footer-links a:hover { color: var(--text); }
footer .footer-links a.official { color: var(--text); font-weight: 600; }  /* [Unit 499] 運営元のサイトと公式 X は明るく・少し太く（大きさは同じ＝並びを崩さない） */

/* 以前は HTML の style 属性に書いていたもの（CSP で style 属性を許さないためクラスに） */
.mock-note { text-align: center; font-size: 12px; color: var(--text-muted); margin-top: 14px; }
.spacer-32 { height: 32px; }
.wrap.narrow { max-width: 760px; }
