/* ============================================================
   juliachan - style.css
   全UIスタイル定義
   ============================================================ */

:root {
    --bg-color: #ff8fb8;
    --chat-bg: #f4f5f7;
    --primary-red: #e63946;
    --user-bubble: #e63946;
    --ai-bubble: #ffffff;
    --text-main: #333333;
}

html {
    font-size: 16px;
    box-sizing: border-box;
}

*,
*::before,
*::after {
    box-sizing: inherit;
}

body,
html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    font-family: 'Montserrat', 'Noto Sans JP', sans-serif;
    font-feature-settings: "palt" on;
    letter-spacing: 0.05rem;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;

    background: linear-gradient(135deg, #ff8fb8, #ff9ec0, #f78dae, #ee7ea2, #f78dae, #ff9ec0, #ff8fb8);
    background-size: 400% 400%;
    animation: bgPulse 25s ease infinite;
    color: var(--text-main);
    overflow: hidden;
}

@keyframes bgPulse {
    0% {
        background-position: 0% 50%;
    }

    25% {
        background-position: 50% 100%;
    }

    50% {
        background-position: 100% 50%;
    }

    75% {
        background-position: 50% 0%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* --- particles.js コンテナ --- */
#particles-js {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

#particles-js.visible {
    opacity: 1;
}


#mobile-blocker {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
    padding: 30px;
    box-sizing: border-box;
    color: #fff;
}

#mobile-blocker p {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.8;
}



/* --- 画面外からの超高速3D散開・結像オープニング --- */
#intro-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5000;
    background: transparent;
    transition: opacity 0.8s ease-in-out;
    perspective: 1200px;
    overflow: hidden;
}

#intro-logo-wrap {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 60%;
    max-width: 300px;
    transform-style: preserve-3d;
    animation: assembleZoom 5.5s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

#intro-logo-wrap svg {
    overflow: visible !important;
    width: 100%;
    height: auto;
    display: block;
    transform-style: preserve-3d;
}

.intro-path {
    fill: transparent;
    stroke: #ffffff;
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
    transform-box: fill-box;
    transform-origin: center;
    transform-style: preserve-3d;
    animation: scatterMorph3D 3s cubic-bezier(0.25, 1, 0.5, 1) forwards;
    animation-delay: var(--delay, 0s);
}

@keyframes scatterMorph3D {
    0% {
        stroke-width: 10px;
        stroke-dashoffset: 2000;
        transform: translate(var(--tx), var(--ty)) translateZ(var(--tz)) rotateX(var(--rotX)) rotateY(var(--rotY)) rotateZ(var(--rotZ)) scale(var(--scale));
        opacity: 0;
    }

    15% {
        opacity: 1;
    }

    60% {
        stroke-width: 2px;
        stroke-dashoffset: 0;
        fill: rgba(255, 255, 255, 0);
        transform: translate(calc(var(--tx) * 0.1), calc(var(--ty) * 0.1)) translateZ(calc(var(--tz) * 0.1)) rotateX(calc(var(--rotX) * 0.1)) rotateY(calc(var(--rotY) * 0.1)) rotateZ(calc(var(--rotZ) * 0.1)) scale(1.05);
    }

    100% {
        stroke-width: 0;
        stroke-dashoffset: 0;
        fill: #ffffff;
        transform: translate(0, 0) translateZ(0) rotateX(0) rotateY(0) rotateZ(0) scale(1);
        filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.9));
    }
}

@keyframes assembleZoom {
    0% {
        transform: translate(-50%, -50%) scale(0.6);
        opacity: 0;
    }

    20% {
        opacity: 1;
    }

    80% {
        transform: translate(-50%, -50%) scale(1.05);
        filter: blur(0px);
        opacity: 1;
    }

    100% {
        transform: translate(-50%, -50%) scale(3.5);
        filter: blur(10px);
        opacity: 0;
    }
}

.main-ui {
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    pointer-events: none;
}

.main-ui.visible {
    opacity: 1;
    pointer-events: auto;
}

.corner-space {
    position: fixed;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
    z-index: 100;
    pointer-events: none !important;
}

.corner-space>* {
    pointer-events: auto;
}

.top-left {
    top: 30px;
    left: 30px;
}

.top-right {
    top: 30px;
    right: 30px;
    text-align: right;
}

.bottom-left {
    bottom: 20px;
    left: 30px;
}

.bottom-right {
    bottom: 20px;
    right: 30px;
    text-align: right;
}

.logo img {
    width: 220px;
    height: auto;
    display: block;
    margin-bottom: 5px;
}

.contact-btn {
    background: #fff;
    color: var(--primary-red);
    padding: 10px 20px;
    border-radius: 20px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: 0.2s;
}

.contact-btn:hover {
    transform: scale(1.05);
}

.main-wrapper {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    width: 100%;
    z-index: 10;
    transform-origin: center center;
    transition: transform 0.3s ease-out, opacity 1.5s ease-in-out;
    pointer-events: none !important;
}

.character-image {
    width: 350px;
    height: auto;
    filter: drop-shadow(0 15px 25px rgba(0, 0, 0, 0.2));
    animation: float 6s ease-in-out infinite;
    transition: opacity 1s ease-in-out;
    opacity: 1;
    margin-right: 0px;
    pointer-events: auto;
    -webkit-user-drag: none;
    user-select: none;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-15px);
    }
}

/* 🔴 iPhone 17 Pro モチーフのスマートフォンフレーム */
.smartphone-frame {
    width: 375px;
    height: 812px;
    background: linear-gradient(145deg, #2a2a2e, #1c1c1e, #2a2a2e);
    border-radius: 44px;
    border: 10px solid #2a2a2e;
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.35),
        inset 0 0 0 1px rgba(255, 255, 255, 0.08),
        0 0 0 1px rgba(0, 0, 0, 0.3);
    position: relative;
    transform: translateZ(0);
    overflow: visible;
    pointer-events: auto;
}

/* フレーム外周のチタニウム風エッジライン */
.smartphone-frame::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    border-radius: 45px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    pointer-events: none;
    z-index: 0;
}

/* アンテナライン（上部） */
.smartphone-frame::after {
    content: '';
    position: absolute;
    top: 85px;
    left: -11px;
    right: -11px;
    height: 1px;
    background: linear-gradient(90deg,
            rgba(80, 80, 85, 0.6) 0%,
            transparent 5%,
            transparent 95%,
            rgba(80, 80, 85, 0.6) 100%);
    pointer-events: none;
    z-index: 0;
}

/* --- iPhone 外装ボタン共通 --- */
.phone-btn {
    position: absolute;
    background: linear-gradient(180deg, #3a3a3e, #2a2a2e, #3a3a3e);
    border-radius: 2px;
    z-index: -1;
}

/* 左側ハイライト（ボタン上面の光沢） */
.phone-btn::after {
    content: '';
    position: absolute;
    border-radius: inherit;
}

/* アクションボタン（左側・上部） */
.phone-btn.action-btn {
    width: 4px;
    height: 28px;
    left: -14px;
    top: 130px;
    border-radius: 3px 0 0 3px;
    background: linear-gradient(180deg, #444, #333, #444);
    box-shadow: -1px 0 2px rgba(0, 0, 0, 0.3);
}

.phone-btn.action-btn::after {
    top: 2px;
    left: 0;
    width: 1px;
    height: calc(100% - 4px);
    background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.15), transparent);
}

/* 音量アップボタン（左側） */
.phone-btn.vol-up {
    width: 4px;
    height: 48px;
    left: -14px;
    top: 190px;
    border-radius: 3px 0 0 3px;
    background: linear-gradient(180deg, #444, #333, #444);
    box-shadow: -1px 0 2px rgba(0, 0, 0, 0.3);
}

.phone-btn.vol-up::after {
    top: 2px;
    left: 0;
    width: 1px;
    height: calc(100% - 4px);
    background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.15), transparent);
}

/* 音量ダウンボタン（左側） */
.phone-btn.vol-down {
    width: 4px;
    height: 48px;
    left: -14px;
    top: 250px;
    border-radius: 3px 0 0 3px;
    background: linear-gradient(180deg, #444, #333, #444);
    box-shadow: -1px 0 2px rgba(0, 0, 0, 0.3);
}

.phone-btn.vol-down::after {
    top: 2px;
    left: 0;
    width: 1px;
    height: calc(100% - 4px);
    background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.15), transparent);
}

/* サイドボタン/電源ボタン（右側） */
.phone-btn.side-btn {
    width: 4px;
    height: 70px;
    right: -14px;
    top: 210px;
    border-radius: 0 3px 3px 0;
    background: linear-gradient(180deg, #444, #333, #444);
    box-shadow: 1px 0 2px rgba(0, 0, 0, 0.3);
}

.phone-btn.side-btn::after {
    top: 2px;
    right: 0;
    width: 1px;
    height: calc(100% - 4px);
    background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.15), transparent);
}

.smartphone-screen {
    width: 100%;
    height: 100%;
    background: var(--chat-bg);
    border-radius: 34px;
    /* フレームの厚みを差し引いた内側の角丸 */
    display: flex;
    flex-direction: column;
    overflow: hidden;
    /* ここで確実にはみ出しをカット */
    position: relative;
}

.chat-header {
    background: #fff;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    z-index: 30;
}

.avatar-progress-wrap {
    flex-shrink: 0;
    margin-right: 15px;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.chat-progress-bubble {
    position: absolute;
    top: -30px;
    left: 40px;
    transform: translateX(-50%);
    z-index: 120;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 0 14px;
    border-radius: 12px;
    background: rgb(255, 255, 100);
    color: #544500;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1;
    pointer-events: none;
    white-space: nowrap;
    opacity: 1;
    transition: opacity 0.45s ease, transform 0.45s ease;
}

.chat-progress-bubble::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -8px;
    width: 14px;
    height: 10px;
    background: rgb(255, 255, 100);
    clip-path: polygon(0 0, 100% 0, 50% 100%);
    transform: translateX(-50%);
}

.chat-progress-bubble[hidden] {
    display: none !important;
}

.chat-progress-bubble.is-fading {
    opacity: 0;
    transform: translateX(-50%) translateY(-6px);
}

.header-info h2 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
}

.header-info p {
    margin: 0;
    font-size: 0.7rem;
    font-weight: 400;
    color: #888;
}

.header-modal-btn {
    margin-left: auto;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 700;
    background: var(--primary-red);
    color: #ffffff;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(230, 57, 70, 0.4);
    transition: transform 0.2s, background 0.2s;
    font-family: inherit;
    flex-shrink: 0;
}

.header-modal-btn:hover {
    transform: scale(1.1);
    background: #c1272d;
}

.sp-only {
    display: none !important;
}

/* offsetTop の位置計算を正確に行うために position: relative を追加 */
.chat-area {
    position: relative;
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    scroll-behavior: smooth;
    padding-bottom: calc(500px + var(--chat-area-extra-bottom, 0px));
    background: var(--chat-bg);
}

.start-screen {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    z-index: 50;
    display: flex;
    justify-content: center;
    animation: fadeInStart 0.8s ease;
}

@keyframes fadeInStart {
    from {
        opacity: 0;
        transform: translate(-50%, -45%);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.start-btn {
    background: var(--primary-red);
    color: #fff;
    border: none;
    padding: 18px 30px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    margin-top: -50px;
    box-shadow: 0 10px 20px rgba(230, 57, 70, 0.3);
    transition: 0.2s;
}

.start-btn:hover {
    transform: scale(1.05);
    background: #c1272d;
}

.message {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 400;
    line-height: 1.7;
    word-wrap: break-word;
    white-space: pre-wrap;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ai-message {
    background: var(--ai-bubble);
    color: var(--text-main);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.user-message {
    background: var(--user-bubble);
    color: #fff;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
    box-shadow: 0 2px 5px rgba(230, 57, 70, 0.3);
}

.choices-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    animation: fadeIn 0.5s ease;
}

.choice-btn {
    background: #fff;
    border: 2px solid var(--primary-red);
    color: var(--primary-red);
    padding: 12px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s;
    text-align: center;
    font-family: inherit;
}

@media (hover: hover) {
    .choice-btn:hover {
        background: var(--primary-red);
        color: #fff;
    }
}

/* タップ時の視覚的フィードバック（スマホ・PC共通で瞬間的に適用） */
.choice-btn:active {
    background: var(--primary-red);
    color: #fff;
    transform: scale(0.98);
}

.choice-btn.other-btn {
    border-style: dashed;
}

.form-container {
    background: #fff;
    padding: 20px;
    border-radius: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    width: 100%;
    box-sizing: border-box;
    animation: fadeIn 0.5s ease;
    font-size: 0.9rem;
}

.form-group {
    margin-bottom: 12px;
}

.form-group label {
    display: block;
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--primary-red);
    font-size: 0.8rem;
    line-height: 1.7;
}

.form-group input,
.form-group textarea,
.text-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-sizing: border-box;
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
    line-height: 1.7;
}

.text-input {
    margin-bottom: 10px;
    resize: vertical;
}

.submit-btn {
    background: var(--primary-red);
    color: #fff;
    border: none;
    padding: 12px;
    width: 100%;
    border-radius: 25px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: 0.2s;
    font-family: inherit;
    margin-top: 10px;
}

.submit-btn:hover {
    background: #c1272d;
}

.radio-group {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.radio-group label {
    display: flex;
    align-items: center;
    font-weight: 700;
    color: var(--text-main);
    cursor: pointer;
    font-size: 0.85rem;
    line-height: 1.7;
}

.radio-group input[type="radio"] {
    margin-right: 5px;
    accent-color: var(--primary-red);
}

.required-badge {
    background: var(--primary-red);
    color: #fff;
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 5px;
    vertical-align: middle;
    font-weight: 400;
}

.required-badge.is-hidden {
    display: none;
}

/* S9: chat.jsのインラインスタイルから移行したクラス */
.form-radio-group {
    margin-bottom: 15px;
}

.form-select-industry {
    width: 100%;
    height: 30px;
    padding: 0 10px;
    border-radius: 8px;
    border: 1px solid #ddd;
    margin-bottom: 0;
    font-family: inherit;
}

.form-confirm-btn-size {
    font-size: 1.0rem;
}

.typing-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--ai-bubble);
    border-radius: 20px;
    border-bottom-left-radius: 4px;
    align-self: flex-start;
    width: fit-content;
}

.typing-text {
    font-size: 0.85rem;
    font-weight: 700;
    color: #888;
}

.typing-dots {
    display: flex;
    gap: 4px;
}

.typing-dot {
    width: 6px;
    height: 6px;
    background: #999;
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-dot:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes typing {

    0%,
    80%,
    100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1);
    }
}

.chat-area::-webkit-scrollbar {
    width: 6px;
}

.chat-area::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 3px;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    width: 90%;
    max-width: 520px;
    position: relative;
    color: #fff;
    font-weight: 400;
    line-height: 1.8;
    padding: 3px;
    border-radius: 22px;
    background: linear-gradient(135deg, #ff6b9d, #ff3c83, #e040a0, #ff6b9d, #ff9ec0);
    background-size: 300% 300%;
    animation: neonBorderFlow 4s ease infinite;
    box-shadow:
        0 0 15px rgba(255, 60, 131, 0.4),
        0 0 40px rgba(255, 60, 131, 0.15),
        inset 0 0 15px rgba(255, 60, 131, 0.1);
}

@keyframes neonBorderFlow {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.modal-inner {
    background: linear-gradient(160deg, rgba(30, 10, 25, 0.92), rgba(50, 15, 40, 0.95));
    border-radius: 20px;
    padding: 60px 45px 50px 45px;
    position: relative;
    overflow: hidden;
}

/* モーダル内サイバー装飾ライン */
.modal-inner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #ff6b9d, #ff3c83, #ff6b9d, transparent);
    animation: neonScan 3s ease-in-out infinite;
}

.modal-inner::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 107, 157, 0.5), transparent);
}

@keyframes neonScan {

    0%,
    100% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }
}

/* モーダル内コーナー装飾 */
.modal-corner {
    position: absolute;
    width: 20px;
    height: 20px;
    border-color: #ff6b9d;
    border-style: solid;
    opacity: 0.6;
}

.modal-corner.tl {
    top: 20px;
    left: 20px;
    border-width: 2px 0 0 2px;
}

.modal-corner.tr {
    top: 20px;
    right: 20px;
    border-width: 2px 2px 0 0;
}

.modal-corner.bl {
    bottom: 20px;
    left: 20px;
    border-width: 0 0 2px 2px;
}

.modal-corner.br {
    bottom: 20px;
    right: 20px;
    border-width: 0 2px 2px 0;
}

.modal-overlay.active .modal-content {
    transform: translateY(0) scale(1);
    animation: modalAppear 0.4s ease-out;
}

@keyframes modalAppear {
    0% {
        transform: translateY(20px) scale(0.95);
        opacity: 0;
    }

    100% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.modal-content h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #ff9ec0;
    font-weight: 700;
    font-size: 1.1rem;
    text-shadow: 0 0 10px rgba(255, 107, 157, 0.5);
    letter-spacing: 0.08em;
}

.modal-content p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
    text-align: justify;
}

.modal-policy-link-wrap {
    margin: 22px 0 0;
    text-align: center;
}

.modal-policy-link {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.76);
    text-decoration: underline;
    text-decoration-color: rgba(255, 255, 255, 0.34);
    text-underline-offset: 0.22em;
    transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.modal-policy-link:hover {
    color: #ffffff;
    text-decoration-color: rgba(255, 255, 255, 0.72);
}

.modal-close {
    position: absolute;
    top: 40px;
    right: 40px;
    background: transparent;
    border: 1px solid rgba(255, 107, 157, 0.5);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    padding: 0;
    line-height: 1;
}

.modal-close:hover {
    background: rgba(255, 107, 157, 0.2);
    border-color: #ff6b9d;
    box-shadow: 0 0 10px rgba(255, 60, 131, 0.3);
}

/* reCAPTCHAロゴ（バッジ）を非表示にする */
.grecaptcha-badge {
    visibility: hidden !important;
}

/* ============================================================
   MOBILE OVERRIDES (at the bottom to ensure precedence)
   ============================================================ */
@media screen and (max-width: 768px) {

    /* Hide the blocker completely on mobile since this version supports it */
    #mobile-blocker {
        display: none !important;
    }

    /* Remove the PC background gradient and pulse animation on mobile */
    html,
    body {
        background: #ffffff !important;
        animation: none !important;
    }

    #particles-js {
        display: none;
    }

    #intro-screen {
        background: var(--bg-color) !important;
    }

    /* Hide corner spaces */
    .corner-space {
        display: none !important;
    }

    /* Hide the large floating character on mobile to save screen real estate */
    .character-image {
        display: none !important;
    }

    .app-container {
        width: 100% !important;
        height: 100vh !important;
        top: 0 !important;
        left: 0 !important;
        transform: none !important;
        padding: 0 !important;
        margin: 0 !important;
        position: fixed !important;
        box-shadow: none !important;
        background: transparent !important;
    }

    /* Make the wrapper fill the screen without PC scaling logic constraints */
    .main-wrapper {
        display: flex !important;
        width: 100vw !important;
        height: 100vh !important;
        top: 0 !important;
        left: 0 !important;
        transform: none !important;
        padding: 0 !important;
        margin: 0 !important;
        position: fixed !important;
    }

    /* Remove the physical phone frame styling and let the screen fill 100% */
    .smartphone-frame {
        width: 100% !important;
        height: 100% !important;
        border: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        background: transparent !important;
    }

    /* Hide hardware outer edge lines & buttons */
    .smartphone-frame::before,
    .smartphone-frame::after,
    .phone-btn {
        display: none !important;
    }

    /* Inner screen fills 100% with no rounded corners */
    .smartphone-screen {
        border-radius: 0 !important;
        width: 100% !important;
        height: 100% !important;
        box-shadow: none !important;
    }

    /* Adjust chat area padding for narrower screens */
    .chat-area {
        padding: 15px !important;
        padding-bottom: calc(300px + var(--chat-area-extra-bottom, 0px)) !important;
    }

    .chat-header {
        padding: 15px 20px !important;
    }

    .chat-progress-bubble {
        display: none !important;
    }

    .chat-area.start-screen-active {
        padding: 0 !important;
        overflow: hidden !important;
    }

    /* Header info font size optimization */
    .header-info h2 {
        font-size: 1.2rem !important;
    }

    /* Adjust message bubbles font size for readability */
    .message {
        font-size: 1.0rem !important;
        max-width: 90% !important;
    }

    /* Form groups optimization */
    .form-container {
        padding: 15px !important;
    }

    .form-group input,
    .form-group textarea,
    .text-input {
        font-size: 1.0rem !important;
    }

    .form-group {
        margin-bottom: 18px !important;
        /* 各項目間の余白をやや広げる */
    }

    .form-group label {
        font-size: 1.0rem !important;
        margin-bottom: 8px !important;
    }

    /* Radio button labels (contact preference) font size enhancement */
    .radio-group label {
        font-size: 1.0rem !important;
    }

    /* Adjust typing indicator (考え中 balloons) text size */
    .typing-text {
        font-size: 1.0rem !important;
    }

    .sp-only {
        display: block !important;
    }

    /* Redesign mobile start screen */
    .start-screen {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        height: var(--start-screen-visible-height, 100%) !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-between !important;
        align-items: center !important;
        background: var(--chat-bg) !important;
        z-index: 100 !important;
        transform: none !important;
        animation: fadeInStartMobile 0.8s ease !important;
        padding: 18px 0 calc(var(--start-button-bottom-gap, 32px) + env(safe-area-inset-bottom)) !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    .start-visual {
        width: 100% !important;
        flex: 1 1 auto !important;
        min-height: 0 !important;
        height: var(--start-visual-height, auto) !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 0 20px !important;
        box-sizing: border-box !important;
    }

    .start-character-img {
        display: block !important;
        width: min(75%, 280px) !important;
        max-width: 280px !important;
        max-height: var(--start-character-max-height, 296px) !important;
        height: auto !important;
        object-fit: contain !important;
        margin: 0 !important;
        opacity: 1;
        transition: opacity 1s ease-in-out;
        will-change: opacity;
    }

    .start-btn {
        position: static !important;
        transform: none !important;
        width: 85% !important;
        max-width: 320px !important;
        padding: 18px !important;
        margin: 0 auto !important;
        font-size: 1.1rem !important;
        box-shadow: 0 10px 25px rgba(230, 57, 70, 0.4) !important;
        flex-shrink: 0 !important;
    }

    @keyframes fadeInStartMobile {
        from {
            opacity: 0;
            transform: translateY(15px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    /* Modal layout optimization for mobile */
    .modal-content {
        max-width: 95% !important;
        padding: 2px !important;
    }

    .modal-inner {
        padding: 60px 30px 50px 30px !important;
    }

    .modal-inner h3 {
        text-align: center !important;
    }

    .modal-close-pc {
        display: none !important;
    }

    .modal-close-sp.sp-only {
        display: flex !important;
        position: absolute !important;
        top: 15px !important;
        right: 20px !important;
        width: 40px !important;
        height: 40px !important;
        background: #ff6b9d !important;
        border: none !important;
        box-shadow: 0 2px 5px rgba(255, 107, 157, 0.4) !important;
    }

    .modal-close-sp svg path {
        stroke: #ffffff !important;
    }

    .modal-footer-sp.sp-only {
        display: flex !important;
        flex-direction: column;
        align-items: center;
        text-align: center;
        position: absolute;
        bottom: 30px;
        left: 0;
        width: 100%;
        padding: 0 20px;
    }

    .modal-sp-logo {
        width: 160px;
        margin-right: 5px;
        margin-bottom: 12px;
    }

    .modal-sp-tagline {
        font-size: 0.8rem !important;
        color: #ffffff !important;
        margin: 0 0 10px 0 !important;
        line-height: 1.5;
        text-align: center !important;
    }

    .modal-policy-link-wrap {
        margin-top: 18px !important;
    }

    .modal-policy-link {
        font-size: 0.7rem !important;
    }

    .modal-sp-copyright {
        font-size: 0.7rem !important;
        color: rgba(255, 255, 255, 0.8) !important;
        margin: 0 !important;
        text-align: center !important;
    }
}
