﻿/* === Reset & Base === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --main-bg: #f8f9fa;
    --card-bg: #ffffff;
    --text-primary: #1e1e2e;
    --text-secondary: #585b70;
    --text-muted: #9399b2;
    --accent: #2563eb;
    --accent-light: #eff6ff;
    --accent-hover: #1d4ed8;
    --border: #e6e9ef;
    --success: #40c057;
    --footer-bg: #1b2838;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.08);
    --shadow-xl: 0 12px 40px rgba(0, 0, 0, 0.12);
}

body {
    font-family: 'Inter', 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--main-bg);
    color: var(--text-primary);
    min-height: 100vh;
}

/* ============================
   Site Header
   ============================ */
.site-header {
    background-color: #ffffff;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* === Hamburger Button === */
.hamburger-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    padding: 6px;
    border-radius: var(--radius-sm);
    transition: background-color 0.2s ease;
}

.hamburger-btn:hover {
    background-color: var(--accent-light);
}

.hamburger-btn span {
    display: block;
    width: 20px;
    height: 2px;
    background-color: var(--text-primary);
    border-radius: 1px;
    transition: all 0.3s ease;
}

/* === Slide Menu === */
.slide-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.slide-menu-overlay.open {
    opacity: 1;
    visibility: visible;
}

.slide-menu {
    position: fixed;
    top: 0;
    left: -300px;
    width: 280px;
    height: 100vh;
    background: var(--card-bg);
    z-index: 201;
    box-shadow: var(--shadow-xl);
    transition: left 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

.slide-menu.open {
    left: 0;
}

.slide-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 20px 16px;
    border-bottom: 1px solid var(--border);
}

.slide-menu-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.slide-menu-close {
    width: 32px;
    height: 32px;
    border: none;
    background: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--text-muted);
    transition: all 0.2s ease;
}

.slide-menu-close:hover {
    background-color: var(--accent-light);
    color: var(--accent);
}

.slide-menu-list {
    list-style: none;
    padding: 12px;
}

.slide-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--text-primary);
    font-size: 0.88rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.slide-menu-item:hover {
    background-color: var(--accent-light);
    color: var(--accent);
}

.slide-menu-item svg {
    color: var(--text-muted);
    flex-shrink: 0;
}

.slide-menu-item:hover svg {
    color: var(--accent);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-link {
    font-size: 0.82rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.header-link:hover {
    color: var(--accent);
}

.header-link.login-link {
    padding: 6px 16px;
    border: 1.5px solid var(--accent);
    border-radius: var(--radius-xl);
    color: var(--accent);
}

.header-link.login-link:hover {
    background-color: var(--accent);
    color: #fff;
}

.site-logo img {
    height: 48px;
    width: auto;
}

/* ============================
   Main Wrapper
   ============================ */
.main-wrapper {
    min-height: calc(100vh - 61px - 160px);
}

/* ============================
   Gallery View
   ============================ */
.view-gallery {
    overflow-y: auto;
}

/* === Hero Section === */
.hero-section {
    padding: 48px 40px;
    background: linear-gradient(135deg, #f0f9ff 0%, #dbeafe 50%, #e0f2fe 100%);
    border-bottom: 1px solid var(--border);
}

.hero-content {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.hero-text {
    flex: 1;
    min-width: 0;
}

/* === Hero Cards (名刺モックアップ) === */
.hero-cards {
    position: relative;
    width: 340px;
    flex-shrink: 0;
}

.hero-card {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15), 0 8px 20px rgba(0, 0, 0, 0.1);
    transform: perspective(800px) rotateY(-5deg) rotateX(3deg);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.hero-card img {
    width: 100%;
    height: auto;
    display: block;
}

.hero-cards:hover .hero-card {
    transform: perspective(800px) rotateY(0deg) rotateX(0deg);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.2), 0 10px 24px rgba(0, 0, 0, 0.12);
}

/* === Hero Decorations === */
.hero-deco {
    position: absolute;
}

.hero-deco-cursor {
    bottom: -10px;
    right: 30px;
    animation: float 3s ease-in-out infinite;
}

.hero-deco-spark1 {
    top: -12px;
    right: 20px;
    animation: sparkle 2s ease-in-out infinite;
}

.hero-deco-spark2 {
    top: 30px;
    left: -14px;
    animation: sparkle 2.5s ease-in-out infinite 0.5s;
}

.hero-deco-chips {
    bottom: 20px;
    left: -20px;
    display: flex;
    gap: 4px;
    transform: rotate(-8deg);
}

.hero-deco-chips span {
    display: block;
    width: 16px;
    height: 16px;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

@keyframes sparkle {
    0%, 100% { transform: scale(1); opacity: 0.7; }
    50% { transform: scale(1.2); opacity: 1; }
}

.hero-section h1 {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.4;
    color: var(--text-primary);
}

.hero-service-name {
    display: inline-block;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent);
    background-color: var(--accent-light);
    padding: 6px 16px;
    border-radius: var(--radius-xl);
    margin-bottom: 14px;
    letter-spacing: 0.02em;
}

.hero-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-top: 12px;
    line-height: 1.6;
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 24px;
    padding: 14px 28px;
    border: none;
    background: linear-gradient(135deg, var(--accent), #60a5fa);
    color: #fff;
    font-size: 0.88rem;
    font-weight: 500;
    border-radius: var(--radius-xl);
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    white-space: nowrap;
    box-shadow: 0 2px 12px rgba(37, 99, 235, 0.3);
    flex-shrink: 0;
}

.cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.4);
}

.cta-btn-secondary {
    background: #fff;
    color: var(--accent);
    border: 1px solid var(--accent);
    box-shadow: none;
}

.cta-btn-secondary:hover {
    background: #f0f4ff;
    box-shadow: 0 2px 12px rgba(37, 99, 235, 0.15);
}

/* === Features Section === */
.features-section {
    padding: 40px;
    border-bottom: 1px solid var(--border);
    background-color: var(--card-bg);
}

.features-grid {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 24px;
}

.feature-card {
    text-align: left;
    padding: 24px 16px;
    border-radius: var(--radius-lg);
    transition: all 0.2s ease;
}

.feature-card:hover {
    background-color: var(--accent-light);
}

.feature-icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 14px;
    background: linear-gradient(135deg, var(--accent-light), #e0f2fe);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
}

.feature-card h3 {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.feature-card p {
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* === Templates Section === */
.templates-section {
    padding: 40px;
}

.section-title {
    max-width: 1000px;
    margin: 0 auto 8px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.section-desc {
    max-width: 1000px;
    margin: 0 auto 24px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* === Category Tabs === */
.category-tabs {
    max-width: 1000px;
    margin: 0 auto 28px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.category-tab {
    padding: 8px 20px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-xl);
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--card-bg);
    color: var(--text-secondary);
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.category-tab:hover {
    border-color: var(--accent);
    color: var(--accent);
    background-color: var(--accent-light);
}

.category-tab.active {
    border-color: var(--accent);
    background-color: var(--accent);
    color: #fff;
}

.category-tab-icon {
    font-size: 0.9rem;
}

/* === Gallery Grid === */
.gallery-grid {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.gallery-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid var(--border);
}

.gallery-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: transparent;
}

.gallery-card-preview {
    width: 92%;
    /*height: 200px;*/
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    margin: 10px auto;
    border-radius: 4px;
    /*box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);*/
}

.gallery-card-preview .card-mockup {
    width: 70%;
    height: 65%;
    border-radius: 4px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 12px;
    gap: 4px;
    position: relative;
}

.gallery-card-preview .card-preview-img {
    /* img要素自体を名刺SVGの比率(910:550)に合わせ、枠線がデザイン外周に
       ぴったり付くようにする（object-fitの余白に線が付くのを防ぐ）。
       デザインの表示サイズは max-height で維持し、コンテナを高くした分が
       上下の余白になる（デザインは小さくならない）。 */
    height: auto;
    width: auto;
    max-height: 160px;
    max-width: 100%;
    aspect-ratio: 910 / 550;
    object-fit: fill;
    border-radius: 4px;
    /* 白地デザインがプレビュー背景(白)と同化しないよう外線を付ける */
    border: 1px solid rgba(0, 0, 0, 0.12);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* 既存移行テンプレ(is_legacy)はSVG自体に枠があるので外線を付けない（2重線防止） */
.gallery-card-preview .card-preview-img.is-legacy {
    border: none;
}

/* 縦型テンプレ(direction=tate)は比率を縦向き(550:900)にし、縦に長いので少し高めまで使う */
.gallery-card-preview .card-preview-img.is-tate {
    aspect-ratio: 550 / 900;
    max-height: 185px;
}

.card-mockup .mock-line {
    height: 3px;
    border-radius: 2px;
    opacity: 0.6;
}

.card-mockup .mock-line.title {
    width: 50%;
    opacity: 1;
    height: 4px;
}

.card-mockup .mock-line.subtitle {
    width: 35%;
}

.card-mockup .mock-line.detail {
    width: 60%;
    height: 2px;
}

.gallery-card-body {
    padding: 16px 20px;
}

.gallery-card-name {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.gallery-card-desc {
    font-size: 0.78rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.gallery-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.gallery-card-tag {
    font-size: 0.68rem;
    padding: 3px 8px;
    background-color: var(--accent-light);
    color: var(--accent);
    border-radius: 12px;
    font-weight: 500;
}

/* === Gallery Card Hover Overlay === */
.gallery-card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(37, 99, 235, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 500;
    gap: 6px;
}

.gallery-card:hover .gallery-card-overlay {
    opacity: 1;
}

/* ============================
   Chat View
   ============================ */
.view-chat {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 61px);
    overflow: hidden;
}

/* === Chat View Header === */
.chat-view-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 32px;
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.back-to-gallery-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    background: none;
    color: var(--text-secondary);
    font-size: 0.8rem;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
}

.back-to-gallery-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.chat-view-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.reset-chat-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    background: none;
    color: var(--text-muted);
    font-size: 0.75rem;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
}

.reset-chat-btn:hover {
    border-color: #e74c3c;
    color: #e74c3c;
}

/* === Step Indicator (horizontal) === */
.step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 14px 32px;
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.step-dot {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    border-radius: var(--radius-xl);
    font-size: 0.72rem;
    color: var(--text-muted);
    transition: all 0.2s ease;
}

.step-dot span {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-muted);
}

.step-dot.active {
    color: var(--accent);
    font-weight: 500;
}

.step-dot.active span {
    background: linear-gradient(135deg, var(--accent), #60a5fa);
    color: #fff;
}

.step-dot.completed span {
    background: var(--success);
    color: #fff;
    font-size: 0;
}

.step-dot.completed span::after {
    content: '✓';
    font-size: 0.6rem;
}

/* === Chat Area === */
.chat-area {
    flex: 1;
    overflow-y: auto;
    padding: 32px;
}

.chat-messages {
    max-width: 680px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* === Message Bubbles === */
.message {
    display: flex;
    gap: 14px;
    animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.message.user {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 600;
    flex-shrink: 0;
}

.message.user .message-avatar {
    background: linear-gradient(135deg, #3b82f6, #1e40af);
    color: #fff;
}

.message.assistant .message-avatar {
    background: linear-gradient(135deg, var(--accent), #60a5fa);
    color: #fff;
}

.message-content {
    padding: 14px 18px;
    border-radius: var(--radius-lg);
    line-height: 1.7;
    font-size: 0.88rem;
    white-space: pre-wrap;
    word-break: break-word;
    max-width: 520px;
}

.message-content:has(.selection-group),
.message-content:has(.template-cards) {
    white-space: normal;
}

.message.user .message-content {
    background-color: var(--accent);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.message.assistant .message-content {
    background-color: var(--card-bg);
    color: var(--text-primary);
    border-bottom-left-radius: 4px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

/* === Template Cards (in chat) === */
.template-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.template-card {
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    background: var(--card-bg);
    overflow: hidden;
}

.template-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.template-card.selected {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.template-card-image {
    /* TOPギャラリー(.gallery-card-preview)と同じ見え方に合わせる。
       コンテナを高くして、デザイン画像の上下に余白を作る。 */
    width: 92%;
    height: 190px;
    margin: 10px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 600;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.template-card-image img {
    /* img要素自体を名刺SVGの比率(910:550)に合わせ、枠線がデザイン外周に
       ぴったり付くようにする（object-fitの余白に線が付くのを防ぐ）。
       デザインの表示サイズは max-height で維持し、コンテナを高くした分が上下余白になる。 */
    height: auto;
    width: auto;
    max-height: 150px;
    max-width: 100%;
    aspect-ratio: 910 / 550;
    object-fit: fill;
    border-radius: 4px;
    /* 白地デザインがプレビュー背景(白)と同化しないよう外線を付ける */
    border: 1px solid rgba(0, 0, 0, 0.12);
}

/* 既存移行テンプレ(is_legacy)はSVG自体に枠があるので外線を付けない（2重線防止） */
.template-card-image img.is-legacy {
    border: none;
}

/* 縦型テンプレ(direction=tate)は比率を縦向き(550:900)にし、縦に長いので少し高めまで使う */
.template-card-image img.is-tate {
    aspect-ratio: 550 / 900;
    max-height: 178px;
}

.template-card-body {
    padding: 10px 12px;
}

.template-card-name {
    font-size: 0.78rem;
    font-weight: 600;
    margin-bottom: 3px;
    color: var(--text-primary);
}

.template-card-desc {
    font-size: 0.7rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* === Selection Options === */
.selection-group {
    margin-top: 16px;
}

.selection-group-title {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.selection-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.selection-option {
    padding: 8px 16px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-xl);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--card-bg);
    color: var(--text-primary);
    font-family: inherit;
}

.selection-option:hover {
    border-color: var(--accent);
    background-color: var(--accent-light);
}

.selection-option.selected {
    border-color: var(--accent);
    background-color: var(--accent);
    color: #fff;
}

/* === Confirm Button === */
.confirm-btn {
    margin-top: 20px;
    padding: 12px 24px;
    border: none;
    background: linear-gradient(135deg, var(--accent), #60a5fa);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: var(--radius-xl);
    cursor: pointer;
    transition: all 0.2s ease;
    display: none;
    font-family: inherit;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.confirm-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

/* === Typing Indicator === */
.typing-indicator {
    display: flex;
    gap: 5px;
    padding: 4px 0;
    align-items: center;
}

.typing-indicator span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: var(--text-muted);
    animation: typing 1.4s infinite;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

/* === Input Area === */
.chat-input-area {
    padding: 20px 32px;
    background-color: var(--main-bg);
    border-top: 1px solid var(--border);
}

.input-container {
    max-width: 680px;
    margin: 0 auto;
}

.input-wrapper {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    background-color: var(--card-bg);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 10px 14px 10px 20px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-wrapper:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.input-wrapper textarea {
    flex: 1;
    border: none;
    background: none;
    resize: none;
    font-size: 0.9rem;
    line-height: 1.5;
    max-height: 120px;
    outline: none;
    font-family: inherit;
    color: var(--text-primary);
}

.input-wrapper textarea::placeholder {
    color: var(--text-muted);
}

.send-btn {
    width: 38px;
    height: 38px;
    border: none;
    background: linear-gradient(135deg, var(--accent), #60a5fa);
    color: #fff;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.send-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.4);
}

.send-btn:disabled {
    background: var(--border);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.input-hint {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 8px;
    text-align: center;
}

/* ============================
   Page Content (sub pages)
   ============================ */
.page-content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px;
}

.page-header {
    margin-bottom: 40px;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.page-desc {
    font-size: 0.88rem;
    color: var(--text-secondary);
}

/* === Empty State === */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    border: 1px dashed var(--border);
}

.empty-state-icon {
    color: var(--text-muted);
    margin-bottom: 16px;
}

.empty-state-text {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.empty-state-sub {
    font-size: 0.82rem;
    color: var(--text-muted);
}

/* === Slide Menu Active Item === */
.slide-menu-item.active {
    background-color: var(--accent-light);
    color: var(--accent);
}

.slide-menu-item.active svg {
    color: var(--accent);
}

/* ============================
   Site Footer
   ============================ */
.site-footer {
    background-color: var(--footer-bg);
    color: #ccc;
    padding: 40px 24px 24px;
}

.site-footer-inner {
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.footer-logo {
    margin-bottom: 20px;
}

.footer-logo img {
    height: 30px;
    width: auto;
    opacity: 0.9;
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 24px;
    margin-bottom: 20px;
}

.footer-nav a {
    color: #ccc;
    text-decoration: none;
    font-size: 0.8rem;
    transition: color 0.2s ease;
}

.footer-nav a:hover {
    color: #fff;
}

.footer-copyright {
    font-size: 0.72rem;
    color: #888;
}

/* === Animations === */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.4;
    }
    30% {
        transform: translateY(-4px);
        opacity: 1;
    }
}

/* === Scrollbar === */
.chat-area::-webkit-scrollbar,
.view-gallery::-webkit-scrollbar {
    width: 6px;
}

.chat-area::-webkit-scrollbar-track,
.view-gallery::-webkit-scrollbar-track {
    background: transparent;
}

.chat-area::-webkit-scrollbar-thumb,
.view-gallery::-webkit-scrollbar-thumb {
    background-color: var(--border);
    border-radius: 3px;
}

.chat-area::-webkit-scrollbar-thumb:hover,
.view-gallery::-webkit-scrollbar-thumb:hover {
    background-color: var(--text-muted);
}

/* === Responsive === */
@media (max-width: 768px) {
    .hero-section {
        padding: 32px 20px;
    }

    .hero-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero-section h1 {
        font-size: 1.4rem;
    }

    .hero-cards {
        width: 280px;
        align-self: center;
    }

    .features-section {
        padding: 32px 20px;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .templates-section {
        padding: 32px 20px;
    }

    .category-tabs {
        gap: 6px;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .chat-area {
        padding: 20px 16px;
    }

    .chat-input-area {
        padding: 16px;
    }

    .chat-view-header {
        padding: 12px 16px;
    }

    .step-indicator {
        padding: 10px 16px;
        gap: 2px;
        overflow-x: auto;
    }

    .step-dot {
        font-size: 0.65rem;
        padding: 4px 8px;
    }

    .message-content {
        max-width: 100%;
    }

    .template-cards {
        grid-template-columns: 1fr;
    }

    .footer-nav {
        gap: 6px 16px;
    }
}

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

    .feature-card {
        text-align: center;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    /* ヘッダー：会員登録・ログインが折り返さないように詰める */
    .site-header-inner {
        padding: 10px 12px;
    }

    .header-left {
        gap: 6px;
    }

    .header-actions {
        gap: 8px;
    }

    .header-link {
        font-size: 0.72rem;
        white-space: nowrap;
    }

    .header-link.login-link {
        padding: 5px 10px;
    }

    .site-logo img {
        height: 38px;
    }
}

.ui-dialog, .ui-dialog-content, .ui-dialog-buttonpane{
  background-color: #fff!important;
}

/* jQuery UI フォントサイズ上書き */
.ui-widget {
    font-size: 12pt !important;
}
