/* 移住データAIナビ - ティール × ウォームレッド */

:root {
    --color-primary: #0D8A6A;
    --color-primary-dark: #065E48;
    --color-accent: #D94B3E;
    --color-accent-sub: #E87461;
    --color-bg: #F4FAF7;
    --color-card: #FFFFFF;
    --color-text: #1A2F2A;
    --color-text-sub: #6B8F84;
    --color-header: #0F3D30;
    --color-border: #D4E8E0;
    --font-heading: 'M PLUS Rounded 1c', sans-serif;
    --font-body: 'Zen Maru Gothic', sans-serif;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-pill: 20px;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: var(--font-body);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    padding-top: 0;
}

/* ヘッダー */
.header {
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    max-width: 640px;
    margin: 0 auto;
}

.header__logo {
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.header__logo-text {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    color: var(--color-text);
    letter-spacing: 1px;
}

.header__logo-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
}

.header__logo-text span {
    color: var(--color-primary);
}

/* ハンバーガーメニューボタン */
.header__menu-btn {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.header__menu-btn span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--color-text);
    border-radius: 1px;
    transition: all 0.3s;
}

.header__menu-btn.is-open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.header__menu-btn.is-open span:nth-child(2) {
    opacity: 0;
}

.header__menu-btn.is-open span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ナビメニュー */
.header__nav {
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.header__nav a {
    display: block;
    padding: 14px 20px;
    color: var(--color-text);
    text-decoration: none;
    font-size: 14px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    transition: background 0.2s;
}

.header__nav a:hover {
    background: rgba(0, 0, 0, 0.03);
}

/* ヒーローエリア */
.hero {
    padding: 0 16px 72px;
    min-height: 300px;
    background-color: var(--color-primary);
    background-image: url('icons/hero-bg.webp');
    background-repeat: repeat;
    background-size: 600px auto;
}

.hero-text {
    text-align: center;
    padding: 40px 16px 20px;
    background: var(--color-bg);
}

.hero-text__title {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--color-text);
    margin-bottom: 12px;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.hero-text__title span {
    color: var(--color-primary);
}

.hero-text__icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
}

.hero-text__catch {
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--color-text-sub);
    line-height: 1.7;
}

.hero-text__illust {
    width: 100%;
    max-width: 480px;
    height: auto;
    margin: 24px auto 0;
    display: block;
    border-radius: var(--radius);
}

.result-illust {
    width: 100%;
    max-width: 480px;
    height: auto;
    margin: 64px auto 24px;
    display: block;
    border-radius: var(--radius);
}

/* コンテンツエリア */
.content {
    max-width: 640px;
    margin: 0 auto;
    padding: 32px 16px;
}

/* フォームセクション */
.form-section {
    margin-bottom: 32px;
}

.form-section__label {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 600;
    color: var(--color-accent);
    margin-bottom: 12px;
    display: block;
}

/* セレクトボックス */
.select-box {
    width: 100%;
    height: 48px;
    padding: 0 16px;
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--color-text);
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238A8A8A' stroke-width='2' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    cursor: pointer;
}

.select-box:focus {
    outline: none;
    border-color: var(--color-primary);
}

/* タグ選択 */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag {
    display: inline-flex;
    align-items: center;
    padding: 10px 16px;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 500;
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid var(--color-border);
    background: var(--color-card);
    color: var(--color-text);
    user-select: none;
}

.tag--active {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: #FFFEF5;
}

.tag:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

/* テキストエリア */
.textarea {
    width: 100%;
    min-height: 80px;
    padding: 12px 16px;
    font-family: var(--font-body);
    font-size: 13px;
    color: var(--color-text);
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    resize: vertical;
}

.textarea::placeholder {
    color: #ADADAD;
}

.textarea:focus {
    outline: none;
    border-color: var(--color-primary);
}

/* ボタン */
.btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 56px;
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    color: #FFFFFF;
    background: var(--color-accent);
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.2s;
    gap: 8px;
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* ローディング */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    padding-top: 100px;
    gap: 24px;
    padding: 40px 20px;
}

.loading__text {
    font-family: var(--font-heading);
    font-size: 18px;
    color: var(--color-text);
    text-align: center;
}

.loading__sub {
    font-size: 13px;
    color: var(--color-text-sub);
}

/* 提灯アニメーション */
.loading__illust {
    width: 100%;
    max-width: 400px;
    height: auto;
    border-radius: var(--radius);
}

/* 進捗ステップ */
.progress-steps {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    max-width: 300px;
}

.progress-step {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--color-text-sub);
    transition: color 0.3s;
}

.progress-step--active {
    color: var(--color-primary);
    font-weight: 500;
}

.progress-step--done {
    color: var(--color-primary);
}

.progress-step__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-border);
    flex-shrink: 0;
}

.progress-step--active .progress-step__dot {
    background: var(--color-primary);
    animation: pulse 1s infinite;
}

.progress-step--done .progress-step__dot {
    background: var(--color-primary);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* 結果カード */
.result-cards {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.result-card {
    background: var(--color-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.2s;
    animation: cardSlideIn 0.5s ease-out;
}

.result-card:nth-child(2) { animation-delay: 0.15s; }
.result-card:nth-child(3) { animation-delay: 0.3s; }

@keyframes cardSlideIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.result-card__image {
    width: 100%;
    height: 160px;
    background: var(--color-border);
    background-size: cover;
    background-position: center;
}

.result-card__body {
    padding: 16px;
}

.result-card__top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.result-card__pref {
    font-size: 12px;
    color: var(--color-text-sub);
}

.result-card__city {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 700;
    color: var(--color-text);
}

.result-card__score {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background: var(--color-primary);
    border-radius: var(--radius-pill);
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 700;
    color: #FFFEF5;
    white-space: nowrap;
    flex-shrink: 0;
}

.result-card__catch {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 600;
    color: var(--color-accent);
    margin-bottom: 12px;
}

/* 魅力ポイント */
.highlights {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.highlight {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--color-text);
}

.highlight__icon {
    font-size: 16px;
    flex-shrink: 0;
}

/* 詳しく見るボタン */
.btn-detail {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 40px;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 500;
    color: var(--color-primary);
    background: var(--color-bg);
    border: 1px solid var(--color-primary);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-detail:hover {
    background: var(--color-primary);
    color: #FFFEF5;
}

/* 詳細展開エリア */
.detail-panel {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--color-border);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.detail-section {
    margin-bottom: 16px;
}

.detail-section__title {
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.detail-section__text {
    font-size: 13px;
    color: var(--color-text);
    line-height: 1.7;
}

/* 自治体リンク */
.migration-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px;
    background: var(--color-primary);
    color: #FFFEF5;
    text-decoration: none;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 500;
    transition: opacity 0.2s;
}

.migration-link:hover {
    opacity: 0.9;
}

/* PDF保存ボタン */
.action-buttons {
    display: flex;
    justify-content: center;
    margin-top: 24px;
}

.btn-pdf {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    background: var(--color-accent);
    color: #FFFFFF;
    border: none;
    border-radius: var(--radius);
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: box-shadow 0.2s, transform 0.2s;
    box-shadow: 0 2px 8px rgba(217, 75, 62, 0.3);
}

.btn-pdf:hover:not(:disabled) {
    box-shadow: 0 4px 16px rgba(217, 75, 62, 0.4);
    transform: translateY(-2px);
}

.btn-pdf:disabled {
    background: var(--color-border);
    color: var(--color-text-sub);
    cursor: not-allowed;
    box-shadow: none;
}

/* シェアセクション */
.share-section {
    margin: 24px 0;
    padding: 20px;
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
}

.share-section__title {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--color-text);
    text-align: center;
}

.share-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: filter 0.2s;
}

.share-btn:hover {
    filter: brightness(1.15);
}

.share-btn--native {
    background: var(--color-primary);
    color: #FFFFFF;
}

.share-btn--x {
    background: #000000;
    color: #FFFFFF;
}

.share-btn--line {
    background: #06C755;
    color: #FFFFFF;
}

.share-btn--copy {
    background: #6C757D;
    color: #FFFFFF;
}

/* エラー */
.error {
    text-align: center;
    padding: 40px 20px;
}

.error__icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.error__title {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 8px;
}

.error__message {
    font-size: 14px;
    color: var(--color-text-sub);
    margin-bottom: 24px;
}

.btn-retry {
    display: inline-flex;
    padding: 12px 32px;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    color: var(--color-primary);
    background: transparent;
    border: 1px solid var(--color-primary);
    border-radius: var(--radius);
    cursor: pointer;
}

/* フッター */
.footer {
    background: var(--color-header);
    color: #A8C8BC;
    margin-top: 40px;
}

.footer__inner {
    max-width: 640px;
    margin: 0 auto;
    padding: 24px 16px;
    text-align: center;
}

.footer__links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 16px;
    margin-bottom: 16px;
}

.footer__links a {
    color: #FFFEF5;
    text-decoration: none;
    font-size: 13px;
}

.footer__links a:hover {
    text-decoration: underline;
}

.footer__about {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 16px;
    margin-bottom: 16px;
    text-align: left;
}

.footer__about-title {
    font-size: 13px;
    font-weight: 700;
    color: #FFFEF5;
    margin-bottom: 8px;
}

.footer__about-text {
    font-size: 11px;
    color: #8A8A8A;
    line-height: 1.7;
    margin-bottom: 8px;
}

.footer__about-text strong {
    color: #B0B0B0;
}

.footer__copyright {
    font-size: 12px;
    color: #8A8A8A;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 16px;
}

.footer__copyright a {
    color: #B0B0B0;
    text-decoration: none;
}

.footer__copyright a:hover {
    text-decoration: underline;
}

/* 法務ページ */
.legal-page {
    max-width: 640px;
    margin: 0 auto;
    padding-top: 16px;
}



.legal-page__title {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--color-primary);
}

.legal-page h3 {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text);
    margin: 24px 0 8px;
}

.legal-page p {
    font-size: 14px;
    line-height: 1.8;
    color: var(--color-text);
    margin-bottom: 8px;
}

.legal-page ul {
    margin: 8px 0 16px 20px;
    font-size: 14px;
    line-height: 1.8;
    color: var(--color-text);
}

.legal-page section {
    margin-bottom: 16px;
}

.article-img {
    width: 100%;
    height: auto;
    border-radius: var(--radius);
    margin-bottom: 16px;
}

.legal-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 24px;
}

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

.legal-table th {
    font-weight: 600;
    color: var(--color-text);
    width: 35%;
    background: rgba(0, 0, 0, 0.02);
}

.legal-table td a {
    color: var(--color-primary);
    text-decoration: none;
}

.legal-table td a:hover {
    text-decoration: underline;
}

.legal-date {
    font-size: 13px;
    color: var(--color-text-sub);
    margin-top: 24px;
    text-align: right;
}

/* レスポンシブ */
@media (min-width: 640px) {
    .content {
        padding: 32px 24px;
    }
}
