* {
    box-sizing: border-box;
    touch-action: manipulation;
}

:root {
    /* 他アプリ(todo / prescription_audit)と統一したカラーパレット */
    --bg-0: #06131a;
    --bg-1: #0b1f2a;
    --card: rgba(10, 28, 38, 0.82);
    --stroke: rgba(120, 220, 210, 0.18);
    --mint: #5eead4;
    --mint-deep: #14b8a6;
    --amber: #fbbf24;
    --rose: #fb7185;
    --ink: #e8f6f4;
    --muted: #93b0b4;
    --key: #16313c;
    --key-hover: #1e4250;
    --shadow: 0 24px 64px rgba(0, 0, 0, 0.34);
    --radius: 14px;
    --radius-lg: 22px;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    font-family: "IBM Plex Sans JP", "Hiragino Sans", "Yu Gothic", sans-serif;
    background:
        radial-gradient(1100px 600px at 5% -10%, rgba(20, 184, 166, 0.2), transparent 55%),
        radial-gradient(800px 500px at 110% 8%, rgba(56, 189, 248, 0.14), transparent 50%),
        linear-gradient(180deg, var(--bg-0), var(--bg-1) 55%, #07151c);
    background-attachment: fixed;
}

a { color: var(--mint); text-decoration: none; }
a:hover { color: #a7fff1; text-decoration: underline; }

h1, h2, h3 { color: var(--ink); margin: 0 0 12px; }
p { color: var(--muted); line-height: 1.7; }

button, input, select, textarea { font: inherit; }

button {
    min-height: 44px;
    padding: 10px 18px;
    color: var(--ink);
    background: var(--key);
    border: 1px solid var(--stroke);
    border-radius: var(--radius);
    cursor: pointer;
    transition: transform 0.12s ease, background 0.12s ease, border-color 0.12s ease;
}
button:hover { background: var(--key-hover); }
button:active { transform: scale(0.98); }

.btn-cta {
    color: #04221d;
    font-weight: 700;
    background: linear-gradient(180deg, #2dd4bf, var(--mint-deep));
    border: 0;
}
.btn-cta:hover { filter: brightness(1.08); }

.btn-ghost { background: transparent; border: 1px solid var(--stroke); }

input[type="text"],
input[type="password"],
input[type="email"] {
    width: 100%;
    padding: 12px 14px;
    color: var(--ink);
    background: rgba(4, 16, 22, 0.78);
    border: 1px solid rgba(148, 176, 180, 0.26);
    border-radius: var(--radius);
}
input:focus { outline: 2px solid rgba(94, 234, 212, 0.42); outline-offset: 1px; }

/* ===================== ヘッダー / ナビ ===================== */

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px max(16px, calc((100vw - 1080px) / 2 + 16px));
    background: rgba(10, 28, 38, 0.94);
    border-bottom: 1px solid var(--stroke);
    backdrop-filter: blur(12px);
}

.site-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--ink);
    font-size: 18px;
    font-weight: 750;
    white-space: nowrap;
}
.site-brand:hover { color: var(--ink); text-decoration: none; }
.brand-mark { font-size: 22px; }

.site-nav { display: flex; gap: 22px; }
.site-nav a { color: var(--muted); font-size: 14px; font-weight: 600; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--mint); text-decoration: none; }

.site-main {
    max-width: 1080px;
    margin: 0 auto;
    padding: 36px 20px 60px;
}

.site-footer {
    padding: 24px 20px 40px;
    text-align: center;
    color: var(--muted);
    font-size: 13px;
}

/* ===================== トップページ: ヒーロー + ログイン ===================== */

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.9fr);
    gap: 32px;
    align-items: start;
}

.hero-concept {
    padding: 36px 32px;
    background: var(--card);
    border: 1px solid var(--stroke);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.hero-eyebrow {
    display: inline-block;
    margin-bottom: 14px;
    padding: 5px 14px;
    color: var(--mint);
    background: rgba(20, 184, 166, 0.14);
    border: 1px solid rgba(94, 234, 212, 0.25);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.hero-concept h1 {
    font-size: 30px;
    line-height: 1.4;
    letter-spacing: 0.01em;
}

.hero-concept .lead {
    font-size: 16px;
    color: var(--ink);
    opacity: 0.9;
}

.hero-points {
    display: grid;
    gap: 10px;
    margin: 24px 0 0;
    padding: 0;
    list-style: none;
}

.hero-points li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--muted);
    font-size: 14px;
}

.hero-points li::before {
    content: "✓";
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    color: #04221d;
    background: var(--mint);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

/* ログインカード */

.login-card {
    padding: 28px 26px;
    background: var(--card);
    border: 1px solid var(--stroke);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.login-card h2 { font-size: 20px; }
.login-card .lead { margin-top: -4px; font-size: 13px; }

.login-field { margin-top: 16px; }
.login-field label {
    display: block;
    margin-bottom: 6px;
    color: var(--mint);
    font-size: 13px;
    font-weight: 600;
}

.login-submit {
    width: 100%;
    margin-top: 20px;
    font-size: 16px;
}

.login-error {
    margin-top: 16px;
    padding: 10px 14px;
    color: #ffc0ca;
    background: rgba(251, 113, 133, 0.14);
    border: 1px solid rgba(251, 113, 133, 0.3);
    border-radius: var(--radius);
    font-size: 13px;
}

.login-note {
    margin-top: 16px;
    font-size: 12px;
    color: var(--muted);
    text-align: center;
}

/* ===================== セクション見出し共通 ===================== */

.page-intro { max-width: 640px; margin: 0 auto 36px; text-align: center; }
.page-intro h1 { font-size: 26px; }

/* ===================== アプリ紹介ページ ===================== */

.app-feature {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 28px;
    align-items: center;
    padding: 28px;
    margin-bottom: 28px;
    background: var(--card);
    border: 1px solid var(--stroke);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.app-feature:nth-child(even) .app-feature-media { order: 2; }

.app-feature-media img {
    display: block;
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
    border-radius: 16px;
    border: 1px solid var(--stroke);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.35);
}

.app-feature-icon { font-size: 28px; margin-bottom: 6px; }
.app-feature-body h2 { font-size: 21px; }
.app-feature-body .lead { color: var(--ink); opacity: 0.85; font-size: 14px; margin-bottom: 14px; }

.app-feature-list {
    display: grid;
    gap: 9px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.app-feature-list li {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    color: var(--muted);
    font-size: 14px;
}

.app-feature-list li::before {
    content: "・";
    color: var(--mint);
    font-weight: 700;
}

/* ===================== 料金ページ ===================== */

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.pricing-card {
    padding: 26px 24px;
    background: var(--card);
    border: 1px solid var(--stroke);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    text-align: center;
}

.pricing-card.is-highlight {
    border-color: rgba(94, 234, 212, 0.5);
    box-shadow: 0 0 0 1px rgba(94, 234, 212, 0.3), var(--shadow);
}

.pricing-card .pricing-badge {
    display: inline-block;
    margin-bottom: 10px;
    padding: 4px 12px;
    color: var(--mint);
    background: rgba(20, 184, 166, 0.14);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.pricing-card .pricing-figure {
    margin: 10px 0;
    font-size: 34px;
    font-weight: 800;
    color: var(--ink);
}
.pricing-card .pricing-figure small {
    font-size: 15px;
    font-weight: 600;
    color: var(--muted);
}

.pricing-card .pricing-trial {
    display: inline-block;
    margin-bottom: 14px;
    padding: 4px 12px;
    color: #451a03;
    background: var(--amber);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.pricing-list {
    margin: 16px 0 0;
    padding: 0;
    list-style: none;
    text-align: left;
    display: grid;
    gap: 8px;
}

.pricing-list li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
}

.pricing-list li::before {
    content: "✓";
    flex: none;
    color: var(--mint);
    font-weight: 700;
}

.pricing-notice {
    padding: 16px 18px;
    color: var(--muted);
    background: rgba(251, 191, 36, 0.08);
    border: 1px solid rgba(251, 191, 36, 0.25);
    border-radius: var(--radius);
    font-size: 13px;
}

.pricing-notice strong { color: var(--amber); }

.pricing-faq { margin-top: 36px; }
.pricing-faq-item {
    padding: 16px 0;
    border-bottom: 1px solid var(--stroke);
}
.pricing-faq-item:last-child { border-bottom: 0; }
.pricing-faq-item h3 { font-size: 15px; color: var(--mint); margin-bottom: 6px; }
.pricing-faq-item p { margin: 0; font-size: 14px; }

/* ===================== レスポンシブ ===================== */

@media (max-width: 860px) {
    .hero { grid-template-columns: minmax(0, 1fr); }
    .app-feature { grid-template-columns: minmax(0, 1fr); }
    .app-feature:nth-child(even) .app-feature-media { order: 0; }
}

@media (max-width: 600px) {
    .site-header { padding: 12px 14px; }
    .site-nav { gap: 14px; }
    .site-main { padding: 24px 14px 48px; }
    .hero-concept, .login-card, .app-feature, .pricing-card { padding: 20px; }
    .hero-concept h1 { font-size: 24px; }
    .page-intro h1 { font-size: 22px; }
    .pricing-card .pricing-figure { font-size: 28px; }
}

/* 新規会員登録 */
.signup-card { max-width: 560px; margin: 0 auto; }
.signup-card h1 { font-size: 26px; }
.field-required { margin-left: 6px; color: var(--muted); font-size: 11px; }
.field-help { margin-top: 8px; color: var(--muted); font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
.field-help ul { margin: 0; padding-left: 20px; }
.field-error { margin: 6px 0 0; color: #ffc0ca; font-size: 13px; }
input[aria-invalid="true"] { border-color: var(--rose); }

.consent-field { display: flex; align-items: flex-start; gap: 10px; }
.consent-field input { flex: none; width: 18px; height: 18px; margin: 2px 0; accent-color: var(--mint-deep); }
.consent-field label { margin: 0; line-height: 1.7; }
.legal-document { max-width: 800px; margin: 0 auto; }
.legal-document h2 { font-size: 18px; margin-top: 26px; }

/* Public information pages: three planned options and text-only app cards. */
.app-feature.app-feature--text {grid-template-columns:minmax(0,1fr);}
.pricing-grid {grid-template-columns:repeat(3,minmax(0,1fr));}
@media(max-width:860px){.pricing-grid {grid-template-columns:minmax(0,1fr);}}

/* Keep the service tagline readable on narrow screens. */
.hero-concept .hero-tagline { display: inline-block; font-size: clamp(14px, 3.6vw, 20px); line-height: 1.7; font-weight: 500; }

/* Keep the name and tagline together, allowing navigation to move below on small screens. */
.site-brand { min-width: 0; max-width: 100%; gap: 6px; font-size: clamp(14px, 4.4vw, 24px); }
.site-brand .brand-mark { flex: none; font-size: 1.2em; }
.brand-text { white-space: nowrap; }
.hero-concept { container-type: inline-size; }
.hero-concept h1.service-heading { white-space: nowrap; letter-spacing: 0; font-size: clamp(11px, 4.4cqw, 24px); }

.brand-tagline { font-size: .75em; font-weight: 500; }

/* Match the signed-in HOME logo and align the tagline with its lettering. */
.site-brand .brand-text, .hero-concept h1.service-heading { display: flex; align-items: center; gap: clamp(6px, 1.5vw, 16px); }
.site-brand { font-size: clamp(14px, 3.8vw, 24px); }
.yakusapo-logo { position: relative; display: inline-block; flex: 0 0 auto; width: clamp(100px, 27vw, 180px); aspect-ratio: 3 / 1; }
.yakusapo-logo img { display: block; width: 100%; height: 100%; object-fit: contain; }
.yakusapo-logo-white { filter: brightness(0) invert(1); }
.yakusapo-logo .yakusapo-logo-color { position: absolute; inset: 0; clip-path: inset(0 64% 0 0); }
.brand-text .brand-tagline, .service-heading .brand-tagline { white-space: nowrap; transform: translateY(3px); }
.hero-concept h1.service-heading { font-size: clamp(14px, 3.8cqw, 24px); gap: clamp(6px, 1.5cqw, 16px); }
.service-heading .yakusapo-logo { width: clamp(80px, 27cqw, 180px); }

/* Public overview and feature navigation. */
.action-link { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 12px 18px; border-radius: var(--radius); text-decoration: none; }
.action-link:hover { text-decoration: none; }
a.btn-cta:hover { color: #04221d; }
.action-link:focus-visible, .feature-link:focus-visible, .app-jump-nav a:focus-visible { outline: 2px solid var(--mint); outline-offset: 4px; }
.landing-features { margin-top: 52px; }
.section-heading { margin-bottom: 22px; }
.section-heading h2 { font-size: clamp(22px, 3vw, 28px); }
.section-heading p { margin-bottom: 0; }
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.feature-link { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 24px; border: 1px solid var(--stroke); border-radius: var(--radius-lg); background: var(--card); color: var(--ink); }
.feature-link:hover { color: var(--ink); text-decoration: none; border-color: var(--mint-deep); background: var(--key); }
.feature-link-icon { font-size: 28px; }
.feature-link strong { font-size: 19px; }
.feature-link > span:not(.feature-link-icon):not(.feature-link-more) { color: var(--muted); line-height: 1.8; font-size: 14px; }
.feature-link .feature-link-more { margin-top: auto; padding-top: 8px; color: var(--mint); font-size: 13px; }
.usage-note { margin-top: 28px; padding: 24px; border-left: 3px solid var(--mint-deep); border-radius: 0 14px 14px 0; background: rgba(20,184,166,.06); }
.usage-note h2 { font-size: 18px; }
.usage-note p, .usage-note a { font-size: 14px; }
.app-jump-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 20px; }
.app-jump-nav a { padding: 10px 16px; border: 1px solid var(--stroke); border-radius: 999px; background: var(--card); font-size: 14px; }
.apps-caption { text-align: center; font-size: 13px; margin-bottom: 28px; }
.app-feature[id] { scroll-margin-top: 160px; }
.apps-actions { justify-content: center; margin-top: 24px; }
@media (max-width: 860px) { .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .feature-grid { grid-template-columns: minmax(0, 1fr); } .feature-link { padding: 20px; } .landing-features { margin-top: 32px; } .hero-actions > .action-link { flex: 1 1 auto; } .app-jump-nav { justify-content: flex-start; } .usage-note { padding: 20px; } }

.trial-offer { margin: 28px 0; padding: 28px; border: 1px solid rgba(94,234,212,.5); border-radius: var(--radius-lg); background: rgba(20,184,166,.09); }
.trial-offer h2 { color: var(--mint); font-size: clamp(24px, 4vw, 32px); }
.trial-offer .trial-details { font-size: 13px; line-height: 1.9; }
.trial-offer .trial-status { color: var(--ink); font-size: 14px; }
.trial-pricing { display: inline-block; margin-top: 12px; font-size: 14px; }
.trial-offer .action-link { margin-right: 18px; }
.app-feature-media figure { margin: 0; }
.app-feature-media figcaption { max-width: 360px; margin: 12px auto 0; color: var(--muted); font-size: 13px; line-height: 1.8; }
.feature-workflow { padding: 24px; border: 1px solid var(--stroke); border-radius: 16px; background: rgba(20,184,166,.06); }
.feature-workflow > p { color: var(--mint); font-weight: 700; margin-top: 0; }
.feature-workflow ol { padding-left: 24px; margin-bottom: 0; }
.feature-workflow li { padding: 10px 0; color: var(--ink); line-height: 1.8; }
@media(max-width:600px) { .trial-offer { padding: 20px; } }

/* A clear introductory offer, without decorative icons. */
.trial-offer { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 32px; padding: 36px; border: 2px solid var(--mint); border-radius: 18px; background: #123e40; }
.trial-label { margin: 0 0 16px; color: #d2f7f0; font-size: 15px; font-weight: 600; }
.trial-offer h2 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; margin: 0; color: #fff; font-size: 24px; line-height: 1.2; }
.trial-duration { font-size: clamp(44px, 6vw, 68px); font-weight: 700; letter-spacing: -.04em; }
.trial-free { font-size: clamp(36px, 5vw, 56px); font-weight: 700; color: #9ffff0; }
.trial-offer .trial-description { color: #e8f6f4; margin: 18px 0 0; font-size: 16px; }
.trial-offer-info { padding-left: 28px; border-left: 1px solid rgba(210,247,240,.3); }
.trial-offer .trial-assurance { color: #fff; margin-top: 0; font-size: 16px; font-weight: 700; }
.trial-offer .trial-status { color: #e8f6f4; }
.trial-offer .trial-details { color: #bed6d5; }
.trial-offer .trial-pricing { color: #a7fff1; text-decoration: underline; text-underline-offset: 4px; }
.hero-points li::before { content: none; }
.hero-points li { padding-left: 12px; border-left: 2px solid var(--mint-deep); }
@media(max-width:700px) { .trial-offer { grid-template-columns: minmax(0,1fr); gap: 24px; padding: 24px; } .trial-offer-info { border-left: 0; border-top: 1px solid rgba(210,247,240,.3); padding: 22px 0 0; } }

/* Free-service account navigation keeps the existing header palette. */
.site-nav form { margin: 0; }
.site-nav form button { background: transparent; border: 0; color: inherit; font: inherit; cursor: pointer; padding: 10px 8px; min-height: 44px; }
@media (max-width: 600px) { .site-nav { flex-wrap: wrap; gap: 8px; } }

/* Signed-in account control shared by public pages. */
.site-nav { align-items: center; }
.public-account { position: relative; color: #13394f; }
.public-account > summary { display: flex; align-items: center; gap: 12px; cursor: pointer; list-style: none; border-radius: 28px; }
.public-account > summary::-webkit-details-marker { display: none; }
.public-account-icon { display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; flex: 0 0 auto; border-radius: 50%; background: #e3f5ef; }
.public-account-name { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.public-account-panel { position: absolute; right: 0; top: calc(100% + 10px); z-index: 50; width: 220px; padding: 8px; border: 1px solid #cddfe3; border-radius: 14px; background: #fff; box-shadow: 0 10px 30px #132f4b24; }
.site-header .site-nav .public-account-panel a, .site-header .site-nav .public-account-panel button { display: block; box-sizing: border-box; width: 100%; padding: 12px; text-align: left; border-radius: 8px; color: #13394f; }
.public-account-panel a:hover, .public-account-panel button:hover { background: #e3f5ef; }
.public-account summary:focus-visible { outline: 2px solid #027f80; outline-offset: 4px; }
@media(max-width: 480px) { .public-account-icon { width: 40px; height: 40px; } .public-account-name { max-width: 100px; font-size: 13px; } }

/* Clear, distinct registration and pricing actions. */
.site-header .site-nav a.header-signup { display:inline-flex; align-items:center; justify-content:center; min-height:40px; padding:11px 18px; box-sizing:border-box; border:0; border-radius:999px; background:#027f80; color:#fff; font-weight:700; text-decoration:none; white-space:nowrap; }
.site-header .site-nav a.header-signup:hover { background:#006769; color:#fff; }
.trial-offer-actions { display:flex; flex-wrap:wrap; align-items:stretch; gap:10px; margin-top:18px; }
.trial-offer .trial-offer-actions .trial-action { display:inline-flex; align-items:center; justify-content:center; min-height:44px; padding:10px 16px; box-sizing:border-box; border:1px solid transparent; border-radius:12px; font-size:13px; font-weight:700; line-height:1.5; text-align:center; text-decoration:none; }
.trial-offer .trial-offer-actions .trial-action-pricing { background:#173650; color:#fff; }
.trial-offer .trial-offer-actions .trial-action-signup { background:#027f80; color:#fff; }
.trial-offer .trial-offer-actions .trial-action:hover { filter:brightness(.9); }
.site-nav a.header-signup:focus-visible, .trial-action:focus-visible { outline:2px solid #027f80; outline-offset:4px; }
@media(max-width:600px) { .site-header .site-nav a.header-signup { padding:9px 12px; } .trial-offer-actions { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); } .trial-offer .trial-offer-actions .trial-action { padding:10px 8px; font-size:12px; } }
@media(max-width:400px) { .site-header .site-nav a.header-signup { padding:8px 10px; } }

/* Fit the logo and navigation on one mobile row. */
@media (max-width:760px) {
  body .site-header { flex-direction:row; flex-wrap:nowrap; align-items:center; gap:8px; padding:12px 10px; }
  body .site-header .site-brand { flex:0 0 auto; min-width:0; }
  body .site-header .yakusapo-logo { width:82px; }
  body .site-header .brand-tagline { display:none; }
  body .site-header .site-nav { width:auto; min-width:0; display:flex; flex-wrap:nowrap; justify-content:flex-end; align-items:center; gap:8px; font-size:10px; }
  body .site-header .site-nav > a { flex-shrink:0; white-space:nowrap; }
  body .site-header .site-nav a.header-login, body .site-header .site-nav a.header-signup { padding:8px 10px; min-height:40px; }
  body .site-header .public-account > summary { gap:5px; }
  body .site-header .public-account-name { max-width:70px; font-size:11px; }
  body .site-header .public-account-icon { width:34px; height:34px; }
}
@media (max-width:360px) {
  body .site-header { gap:6px; padding-inline:8px; }
  body .site-header .yakusapo-logo { width:68px; }
  body .site-header .site-nav { gap:6px; font-size:9px; }
  body .site-header .site-nav a.header-login, body .site-header .site-nav a.header-signup { padding:8px; }
}
