:root {
    --color-primary: #1b6e4f;
    --color-primary-dark: #124d38;
    --color-primary-light: #e8f3ee;
    --color-accent: #e07b00;
    --color-accent-dark: #c96a00;
    --color-text: #222;
    --color-bg: #f7f8f7;
    --color-card: #ffffff;
    --color-border: #d9dcd9;
    --color-error: #c0392b;
    --shadow-sm: 0 1px 3px rgba(18, 77, 56, 0.08);
    --shadow-md: 0 8px 24px rgba(18, 77, 56, 0.1);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.7;
    overflow-x: hidden;
}

h1, h2, h3, p {
    overflow-wrap: anywhere;
}

.site-header {
    background: var(--color-primary);
    color: #fff;
    padding: 16px 20px;
}

.site-header__inner {
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 12px;
    justify-content: space-between;
}

.site-header__logo {
    font-size: 1.4rem;
    font-weight: bold;
}

.site-header__tagline {
    font-size: 0.85rem;
    opacity: 0.9;
}

.site-header__tagline {
    display: none;
}

@media (min-width: 640px) {
    .site-header__tagline {
        display: inline;
    }
}

.site-header__mypage {
    color: #fff;
    font-size: 0.85rem;
    font-weight: bold;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 999px;
    padding: 5px 14px;
    white-space: nowrap;
}

.site-header__mypage:hover {
    background: rgba(255, 255, 255, 0.15);
}

.stepper {
    background: #fff;
    border-bottom: 1px solid var(--color-border);
}

.stepper ol {
    max-width: 960px;
    margin: 0 auto;
    padding: 10px 20px;
    display: flex;
    gap: 24px;
    list-style: none;
    font-size: 0.9rem;
    color: #999;
}

.stepper li.is-current {
    color: var(--color-primary);
    font-weight: bold;
}

.page {
    max-width: 760px;
    margin: 0 auto;
    padding: 0 20px 64px;
}

.hero {
    text-align: center;
    padding: 48px 16px 40px;
    margin: 0 -20px 32px;
    background: linear-gradient(160deg, var(--color-primary-light) 0%, #f7f8f7 70%);
    border-bottom: 1px solid var(--color-border);
}

.hero__eyebrow {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 999px;
    background: var(--color-primary);
    color: #fff;
    font-size: 0.75rem;
    font-weight: bold;
    letter-spacing: 0.02em;
    margin-bottom: 16px;
}

.hero h1 {
    font-size: 1.6rem;
    line-height: 1.5;
    margin: 0 0 12px;
    color: var(--color-primary-dark);
}

.hero__lead {
    max-width: 480px;
    margin: 0 auto 20px;
    color: #444;
    font-size: 0.95rem;
}

.trust-badges {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    padding: 0;
    margin: 0 0 24px;
}

.trust-badges li {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 0.8rem;
    font-weight: bold;
    color: var(--color-primary-dark);
    box-shadow: var(--shadow-sm);
}

.trust-badges__icon {
    font-size: 0.85rem;
}

.btn-hero {
    padding: 16px 36px;
    font-size: 1.1rem;
    box-shadow: var(--shadow-md);
}

.card {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 28px 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.card--primary {
    border: 2px solid var(--color-primary);
    scroll-margin-top: 16px;
}

.section-heading {
    text-align: center;
    margin-bottom: 24px;
}

.section-heading__eyebrow {
    display: block;
    font-size: 0.78rem;
    font-weight: bold;
    color: var(--color-accent-dark);
    letter-spacing: 0.03em;
    margin-bottom: 6px;
}

.section-heading h2 {
    margin: 0 0 8px;
    font-size: 1.25rem;
    color: var(--color-primary-dark);
}

.section-heading__desc {
    margin: 0 auto;
    max-width: 460px;
    font-size: 0.88rem;
    color: #666;
}

.form-row--step label {
    display: flex;
    align-items: center;
    gap: 8px;
}

.step-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.note--center {
    text-align: center;
}

.btn-lg {
    padding: 16px 40px;
    font-size: 1.1rem;
}

.benefits {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.benefits__item {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 20px 14px;
    text-align: center;
}

.benefits__icon {
    display: inline-block;
    font-size: 1.6rem;
    margin-bottom: 10px;
}

.benefits__item h3 {
    font-size: 0.92rem;
    margin: 0 0 6px;
    color: var(--color-primary-dark);
}

.benefits__item p {
    font-size: 0.78rem;
    color: #666;
    margin: 0;
    line-height: 1.6;
}

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

.form-row {
    margin-bottom: 18px;
}

.form-row label {
    display: block;
    font-weight: bold;
    margin-bottom: 6px;
}

.form-row .required {
    color: var(--color-error);
    font-size: 0.8rem;
    margin-left: 4px;
}

.form-row input[type="text"],
.form-row input[type="email"],
.form-row input[type="tel"],
.form-row select,
.form-row textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    font-size: 1rem;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 16px;
}

.errors {
    background: #fdecea;
    border: 1px solid var(--color-error);
    color: var(--color-error);
    padding: 14px 18px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.btn {
    display: inline-block;
    padding: 14px 28px;
    border-radius: 6px;
    border: none;
    background: #e07b00;
    color: #fff;
    font-size: 1.05rem;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
}

.btn:hover { background: #c96a00; }

.btn-secondary {
    background: #fff;
    color: var(--color-primary);
    border: 1px solid var(--color-primary);
}

.btn-secondary:hover { background: #f0f5f2; }

.btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-top: 24px;
}

table.confirm-table {
    width: 100%;
    border-collapse: collapse;
}

table.confirm-table th,
table.confirm-table td {
    border-bottom: 1px solid var(--color-border);
    padding: 10px 8px;
    text-align: left;
    vertical-align: top;
}

table.confirm-table th {
    width: 40%;
    color: #555;
    font-weight: normal;
}

.complete-box {
    text-align: center;
}

.assessment-no {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--color-primary);
}

.steps-after {
    list-style: none;
    padding: 0;
    counter-reset: step;
}

.steps-after li {
    counter-increment: step;
    position: relative;
    padding: 8px 8px 8px 40px;
    margin-bottom: 8px;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 6px;
}

.steps-after li::before {
    content: "STEP" counter(step);
    position: absolute;
    left: 8px;
    top: 8px;
    font-size: 0.7rem;
    color: var(--color-primary);
    font-weight: bold;
}

.site-footer {
    text-align: center;
    padding: 24px;
    font-size: 0.85rem;
    color: #777;
}

.note {
    font-size: 0.85rem;
    color: #666;
}

.chat-window {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 360px;
    overflow-y: auto;
    padding: 12px;
    margin: 12px 0;
    background: #f0f3f1;
    border-radius: 8px;
}

.chat-bubble {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 0.95rem;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
}

.chat-bubble--assistant {
    align-self: flex-start;
    background: #fff;
    border: 1px solid var(--color-border);
}

.chat-bubble--user {
    align-self: flex-end;
    background: var(--color-primary);
    color: #fff;
}

.chat-form {
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

.chat-form textarea {
    flex: 1;
    padding: 10px;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    font-size: 0.95rem;
    font-family: inherit;
    resize: vertical;
}

.chat-error {
    color: var(--color-error);
    margin-top: 8px;
}

.chat-cta {
    align-self: stretch;
    background: var(--color-primary-light);
    border: 1px solid var(--color-primary);
    border-radius: 10px;
    padding: 12px 14px;
    text-align: center;
}

.chat-cta__text {
    margin: 0 0 10px;
    font-size: 0.85rem;
    color: var(--color-primary-dark);
    font-weight: bold;
}

.chat-cta__btn {
    padding: 10px 20px;
    font-size: 0.9rem;
}

.card--highlight {
    animation: card-highlight-pulse 1.6s ease-out;
}

@keyframes card-highlight-pulse {
    0% { box-shadow: 0 0 0 4px rgba(27, 110, 79, 0.35); }
    100% { box-shadow: var(--shadow-sm); }
}

/* 悩み相談ポータル */

.consultation-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 16px 0 24px;
}

.consultation-card {
    display: block;
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 16px 18px;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shadow-sm);
}

.consultation-card:hover {
    border-color: var(--color-primary);
}

.consultation-card__head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.consultation-card__category {
    font-weight: bold;
}

.consultation-card__meta {
    margin: 0;
    font-size: 0.85rem;
    color: #666;
}

.status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: bold;
}

.status-badge--open {
    background: #fdecea;
    color: var(--color-error);
}

.status-badge--answered {
    background: var(--color-primary-light);
    color: var(--color-primary-dark);
}

.status-badge--closed {
    background: #eee;
    color: #666;
}

.status-badge--received {
    background: #fdecea;
    color: var(--color-error);
}

.status-badge--company_notified {
    background: var(--color-primary-light);
    color: var(--color-primary-dark);
}

.status-badge--failed {
    background: var(--color-error);
    color: #fff;
}

.chat-bubble__sender {
    display: block;
    font-size: 0.75rem;
    font-weight: bold;
    color: var(--color-primary-dark);
    margin-bottom: 4px;
}

.chat-bubble--user .chat-bubble__sender {
    color: rgba(255, 255, 255, 0.85);
}

.debug-box {
    margin-top: 16px;
    padding: 12px 14px;
    border: 1px dashed var(--color-accent);
    border-radius: 8px;
    background: #fff8ef;
    text-align: center;
}

.debug-box__label {
    margin: 0 0 8px;
    font-size: 0.75rem;
    font-weight: bold;
    color: var(--color-accent-dark);
}
