:root {
    --primary-color: #00f2fe;
    --secondary-color: #4facfe;
    --accent-color: #ff0080;
    --text-color: #333333;
    --bg-color: #fff478;
    --ui-bg: rgba(255, 255, 255, 1);
    --ui-border: #333333;
    --font-pixel: 'DotGothic16', sans-serif;
    --font-main: 'M PLUS Rounded 1c', sans-serif;
    --font-title: 'ab-kikori', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow: hidden;
    height: 100vh;
    height: 100dvh;
    width: 100vw;
}

/* ========== SVG Triangle Background ========== */
.overlay {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: -1;
    /* background: radial-gradient(circle, transparent 0%, rgba(98, 35, 210, 0.85) 100%); */
    pointer-events: none;
}

.triangle-container {
    position: fixed;
    top: 0;
    left: 0;
    z-index: -2;
    opacity: 0.6;
    display: grid;
    grid-template-columns: repeat(10, 200px);
    grid-template-rows: repeat(6, 230px);
    transform: translate(-3%, -4%);
    /* background-color: #6223D2; */
    pointer-events: none;
}

.shape {
    width: 200px;
    height: 230px;
    -webkit-clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
    pointer-events: none;
}

.shape * {
    pointer-events: none;
}

/* Hexagon row offsets */
.shape:nth-child(n+11) {
    transform: translate(-50%, -25%);
}
.shape:nth-child(n+21) {
    transform: translate(0%, -50%);
}
.shape:nth-child(n+31) {
    transform: translate(-50%, -75%);
}
.shape:nth-child(n+41) {
    transform: translate(0%, -100%);
}
.shape:nth-child(n+51) {
    transform: translate(-50%, -125%);
}

/* ========== Header Title ========== */
#site-header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 15;
    text-align: center;
    padding: 10px 10px 0px 10px;
    pointer-events: none;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#logo-wrapper {
    position: relative;
    display: inline-block;
    width: 96%;
    max-width: 768px;
    margin: 0 auto;
}

#site-logo {
    width: 100%;
    height: auto;
    display: block;
    position: relative;
    z-index: 1;
}

.logo-shadow {
    position: absolute;
    top: 4px;
    left: 4px;
    width: 100%;
    height: auto;
    z-index: 0;
    pointer-events: none;
}

/* ========== Header Buttons ========== */
#header-buttons {
    position: absolute;
    top: clamp(43px, calc(43px + (100vw - 320px) * (100 - 43) / (830 - 320)),100px);
    left: 10px;
    right: 10px;
    pointer-events: none;
}

/* ========== Toggle Button ========== */
.toggle-btn {
    position: absolute;
    left: 0;
    top: 0;
    pointer-events: auto;
    padding: 4px 12px;
    border-radius: 12px;
    background: var(--ui-bg);
    border: 2px solid var(--ui-border);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 2px 2px 0px rgba(0, 0, 0, 0.15);
    transition: all 0.2s;
}

.toggle-btn:hover {
    background: var(--primary-color);
    transform: translate(-1px, -1px);
    box-shadow: 3px 3px 0px rgba(0, 0, 0, 0.15);
}

.toggle-btn:active {
    transform: translate(1px, 1px);
    box-shadow: 1px 1px 0px rgba(0, 0, 0, 0.15);
}

.toggle-text {
    font-family: var(--font-main);
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--text-color);
    white-space: nowrap;
}

#choices-container.hidden,
#message-box.hidden {
    display: none !important;
    pointer-events: none !important;
}

/* ========== Header Restart Button ========== */
.header-restart-btn {
    position: absolute;
    right: 0;
    top: 0;
    pointer-events: auto;
    padding: 4px 12px;
    border-radius: 12px;
    background: var(--ui-bg);
    border: 2px solid var(--ui-border);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    box-shadow: 2px 2px 0px rgba(0, 0, 0, 0.15);
    transition: all 0.2s;
}

.header-restart-btn:hover {
    background: var(--primary-color);
    transform: translate(-1px, -1px);
    box-shadow: 3px 3px 0px rgba(0, 0, 0, 0.15);
}

.header-restart-btn:active {
    transform: translate(1px, 1px);
    box-shadow: 1px 1px 0px rgba(0, 0, 0, 0.15);
}

.header-restart-btn .restart-icon {
    font-size: 1rem;
    font-weight: bold;
    color: var(--text-color);
}

.header-restart-btn .restart-text {
    font-family: var(--font-main);
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--text-color);
}

/* ========== Back Button ========== */
.back-btn {
    position: absolute;
    top: -20px;
    right: 20px;
    padding: 5px 15px;
    border-radius: 20px;
    background: var(--ui-bg);
    border: 2px solid var(--ui-border);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    box-shadow: 2px 2px 0px rgba(0, 0, 0, 0.2);
    transition: all 0.2s;
    z-index: 5;
}

.back-btn:hover {
    background: var(--primary-color);
    transform: translate(-1px, -1px);
    box-shadow: 3px 3px 0px rgba(0, 0, 0, 0.2);
}

.back-btn:active {
    transform: translate(1px, 1px);
    box-shadow: 1px 1px 0px rgba(0, 0, 0, 0.2);
}

.back-icon {
    font-size: 0.9rem;
    font-weight: bold;
    color: var(--text-color);
}

.back-text {
    font-family: var(--font-main);
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--text-color);
}

/* ========== Model Credit ========== */
#model-credit {
    position: absolute;
    bottom: calc(5px + env(safe-area-inset-bottom, 0px));
    left: 20px;
    z-index: 5;
    font-family: var(--font-main);
    font-size: 0.55rem;
    color: rgba(0, 0, 0, 0.25);
    pointer-events: none;
}

/* ========== Footer ========== */
#site-footer {
    position: absolute;
    bottom: calc(5px + env(safe-area-inset-bottom, 0px));
    right: 20px;
    z-index: 15;
    pointer-events: none;
}

#site-subtitle {
    font-family: var(--font-main);
    font-size: 0.8rem;
    font-weight: 500;
    color: #333;
    letter-spacing: 0.05em;
}

/* ========== Game Container ========== */
#game-container {
    position: relative;
    width: 100%;
    height: 100%;
}

#canvas-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background-color: transparent;
}

/* ========== UI Layer ========== */
#ui-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    pointer-events: none;
}

/* ========== Message Box ========== */
#message-box {
    pointer-events: auto;
    position: absolute;
    bottom: calc(28px + env(safe-area-inset-bottom, 0px));
    left: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    padding: 20px;
    background: var(--ui-bg);
    border: 3px solid var(--ui-border);
    border-radius: 15px;
    box-shadow: 5px 5px 0px rgba(0, 0, 0, 0.2);
    min-height: 150px;
    cursor: pointer;
}

#speaker-name {
    position: absolute;
    top: -20px;
    left: 20px;
    background: var(--ui-border);
    color: #fff;
    padding: 5px 20px;
    border-radius: 20px;
    font-family: var(--font-pixel);
    font-weight: bold;
    font-size: 0.9rem;
    box-shadow: 2px 2px 0px rgba(0, 0, 0, 0.3);
}

#message-text {
    font-size: 1.2rem;
    line-height: 1.6;
    font-weight: bold;
    white-space: pre-wrap;
}

/* ========== Cursor Animation ========== */
.cursor-next {
    display: inline-block;
    width: 12px;
    height: 22px;
    background: var(--text-color);
    animation: blink 0.8s infinite;
    vertical-align: middle;
    margin-left: 5px;
}

@keyframes blink {
    0%, 100% {
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
}

/* ========== Choices Container ========== */
#choices-container {
    pointer-events: auto;
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 0 20px;
    /* ヘッダー(ロゴ+トグルボタン)分の上余白、message-box分の下余白 */
    padding-top: calc(min(96vw, 768px) * 0.18 + 30px);
    padding-bottom: 190px;
}

.choice-btn {
    background: rgba(255, 255, 255, 0.9);
    border: 3px solid var(--ui-border);
    color: var(--text-color);
    padding: 15px 30px;
    border-radius: 30px;
    font-family: var(--font-main);
    font-weight: 800;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
    max-width: 500px;
    text-align: center;
    box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.2);
}

.choice-btn:hover {
    background: var(--primary-color);
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0px rgba(0, 0, 0, 0.2);
}

.choice-btn:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0px rgba(0, 0, 0, 0.2);
}

.choice-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

/* ========== Loading Screen ========== */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.loading-icon {
    position: relative;
    width: 80px;
    height: 80px;
}

.loading-spinner {
    width: 80px;
    height: 80px;
    border: 8px solid var(--ui-border);
    border-top: 8px solid var(--primary-color);
    border-radius: 50%;
    animation: spinLoader 0.8s linear infinite;
    box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.2);
}

@keyframes spinLoader {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.loading-text-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.loading-en {
    display: flex;
    font-family: 'Arial Black', 'Helvetica', sans-serif;
    font-size: clamp(2.5rem, 10vw, 4rem);
    font-weight: 900;
    color: var(--ui-border);
    text-shadow:
        4px 4px 0px #fff,
        6px 6px 0px rgba(0, 0, 0, 0.15);
    letter-spacing: 0.05em;
}

.loading-en span {
    display: inline-block;
    animation: letterWave 1.4s ease-in-out infinite;
    animation-delay: calc(var(--i) * 0.1s);
}

.loading-ja {
    font-family: var(--font-main);
    font-size: clamp(1rem, 4vw, 1.5rem);
    font-weight: 800;
    color: var(--text-color);
    letter-spacing: 0.1em;
}

@keyframes letterWave {
    0%, 100% {
        transform: scale(1);
    }
    20% {
        transform: scale(1.3);
    }
    40% {
        transform: scale(1);
    }
}

/* ========== Result Top Bar ========== */
.result-top-bar {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    z-index: 25;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ========== Restart Button ========== */
.restart-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    margin: 0 10px;
    padding: 10px 20px;
    background: var(--ui-bg);
    border: 3px solid var(--ui-border);
    border-radius: 30px;
    cursor: pointer;
    box-shadow: 3px 3px 0px rgba(0, 0, 0, 0.2);
    transition: all 0.2s;
}

.restart-btn:hover {
    background: var(--primary-color);
    transform: translate(-2px, -2px);
    box-shadow: 5px 5px 0px rgba(0, 0, 0, 0.2);
}

.restart-btn:active {
    transform: translate(1px, 1px);
    box-shadow: 2px 2px 0px rgba(0, 0, 0, 0.2);
}

.restart-icon {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--text-color);
}

.restart-text {
    font-family: var(--font-main);
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--text-color);
}

/* ========== Service Info Button ========== */
.service-info-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    background: var(--ui-bg);
    border: 3px solid var(--ui-border);
    border-radius: 30px;
    font-family: var(--font-main);
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--text-color);
    cursor: pointer;
    box-shadow: 3px 3px 0px rgba(0, 0, 0, 0.2);
    transition: all 0.2s;
}

.service-info-btn:hover {
    background: var(--primary-color);
    transform: translate(-2px, -2px);
    box-shadow: 5px 5px 0px rgba(0, 0, 0, 0.2);
}

.service-info-btn:active {
    transform: translate(1px, 1px);
    box-shadow: 2px 2px 0px rgba(0, 0, 0, 0.2);
}

/* ========== Result Overlay ========== */
#result-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 242, 92, 0.95);
    z-index: 20;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    padding-top: 70px;
}

.result-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 600px;
    max-height: 100%;
    overflow: hidden;
}

.result-header {
    text-align: center;
    padding-bottom: 15px;
    flex-shrink: 0;
}

.result-title {
    font-family: var(--font-pixel);
    color: var(--text-color);
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.result-subtitle {
    font-family: var(--font-main);
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-color);
}

.result-scroll-area {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 5px;
    margin: 0 -5px;
    -webkit-overflow-scrolling: touch;
}

.result-scroll-area::-webkit-scrollbar {
    width: 8px;
}

.result-scroll-area::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

.result-scroll-area::-webkit-scrollbar-thumb {
    background: var(--ui-border);
    border-radius: 4px;
}

.result-cards {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding-bottom: 10px;
}

.result-footer {
    padding-top: 15px;
    text-align: center;
    flex-shrink: 0;
}

.cta-btn {
    background: var(--accent-color);
    border: 3px solid var(--ui-border);
    color: white;
    padding: 15px 40px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.2);
    transition: all 0.2s;
}

.cta-btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0px rgba(0, 0, 0, 0.2);
}

.cta-btn:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0px rgba(0, 0, 0, 0.2);
}

/* ========== Accordion Card ========== */
.accordion-card {
    background: #fff;
    border: 3px solid var(--ui-border);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.15);
    transition: box-shadow 0.2s;
}

.accordion-card:hover {
    box-shadow: 5px 5px 0px rgba(0, 0, 0, 0.2);
}

.accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    cursor: pointer;
    background: #fff;
    transition: background 0.2s;
}

.accordion-header:hover {
    background: rgba(0, 242, 254, 0.1);
}

.accordion-title-area {
    flex: 1;
    min-width: 0;
}

.recommend-badge {
    display: inline-block;
    background: var(--accent-color);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 20px;
    margin-bottom: 5px;
}

.accordion-name {
    font-family: var(--font-main);
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-color);
    margin: 0 0 5px 0;
}

.accordion-desc {
    font-family: var(--font-main);
    font-size: 0.85rem;
    color: #666;
    margin: 0;
    line-height: 1.4;
}

.accordion-icon {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--ui-border);
    margin-left: 15px;
    flex-shrink: 0;
    width: 24px;
    text-align: center;
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    border-top: 0 solid var(--ui-border);
}

.accordion-card.open .accordion-content {
    max-height: 1000px;
    border-top-width: 2px;
    transition: max-height 0.4s ease-in;
}

.accordion-content > * {
    padding: 0 20px;
}

.accordion-content > *:first-child {
    padding-top: 15px;
}

.accordion-content > *:last-child {
    padding-bottom: 20px;
}

/* Detail Grid */
.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

.detail-item {
    background: rgba(0, 0, 0, 0.03);
    padding: 10px 12px;
    border-radius: 8px;
}

.detail-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 800;
    color: #999;
    margin-bottom: 3px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.detail-value {
    display: block;
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--text-color);
}

.cost-low {
    color: #4caf50;
}

.cost-mid {
    color: #ff9800;
}

.cost-high {
    color: #f44336;
}

/* Detail Sections */
.detail-section {
    margin-bottom: 12px;
}

.detail-list {
    margin: 5px 0 0 0;
    padding-left: 20px;
    font-size: 0.85rem;
    color: #555;
    line-height: 1.6;
}

.detail-list li {
    margin-bottom: 3px;
}

.detail-text {
    margin: 5px 0 0 0;
    font-size: 0.85rem;
    color: #555;
    line-height: 1.5;
}

.merit-section .detail-text.merit {
    color: #2e7d32;
    font-weight: 600;
}

.note-section .detail-text.note {
    color: #c62828;
    font-weight: 600;
}

/* Access Note */
.access-note {
    background: #fff;
    border: 2px solid #e65100;
    border-radius: 10px;
    padding: 12px 15px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #e65100;
    text-align: center;
}

/* Switch Result Card (乗り換えフロー用) */
.switch-result-card {
    background: #fff;
    border: 3px solid var(--ui-border);
    border-radius: 15px;
    padding: 30px 25px;
    text-align: center;
    box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.15);
}

.switch-message {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-color);
    line-height: 1.8;
    margin: 0;
}

/* ========== Plan Checkbox ========== */
.plan-checkbox-label {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-right: 12px;
    flex-shrink: 0;
}

.plan-checkbox {
    display: none;
}

.plan-checkbox-custom {
    width: 24px;
    height: 24px;
    border: 3px solid var(--ui-border);
    border-radius: 6px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.plan-checkbox-custom::after {
    content: "";
    width: 6px;
    height: 12px;
    border: solid var(--accent-color);
    border-width: 0 4px 4px 0;
    transform: rotate(45deg) scale(0);
    opacity: 0;
    transition: all 0.2s;
    margin-top: -2px;
}

.plan-checkbox:checked + .plan-checkbox-custom::after {
    opacity: 1;
    transform: rotate(45deg) scale(1);
}

.plan-checkbox-label:hover .plan-checkbox-custom {
    border-color: var(--accent-color);
}

/* Result Instruction & Check All Button */
.result-instruction {
    font-family: var(--font-main);
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--accent-color);
    margin-top: 8px;
}

.check-all-btn {
    margin-top: 10px;
    padding: 8px 20px;
    background: #fff;
    border: 2px solid var(--ui-border);
    border-radius: 20px;
    font-family: var(--font-main);
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--text-color);
    cursor: pointer;
    box-shadow: 2px 2px 0px rgba(0, 0, 0, 0.15);
    transition: all 0.2s;
}

.check-all-btn:hover {
    background: var(--primary-color);
    transform: translate(-1px, -1px);
    box-shadow: 3px 3px 0px rgba(0, 0, 0, 0.15);
}

.check-all-btn:active {
    transform: translate(1px, 1px);
    box-shadow: 1px 1px 0px rgba(0, 0, 0, 0.15);
}

/* CTA Button Disabled State */
.cta-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #999;
}

.cta-btn:disabled:hover {
    transform: none;
    box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.2);
}

/* ========== Contact Form ========== */
.contact-form-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 600px;
    max-height: 100%;
    overflow: hidden;
}

.contact-form-header {
    display: flex;
    align-items: center;
    gap: 15px;
    padding-bottom: 15px;
    flex-shrink: 0;
}

.back-to-result-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 15px;
    background: #fff;
    border: 2px solid var(--ui-border);
    border-radius: 20px;
    font-family: var(--font-main);
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--text-color);
    cursor: pointer;
    box-shadow: 2px 2px 0px rgba(0, 0, 0, 0.15);
    transition: all 0.2s;
}

.back-to-result-btn:hover {
    background: var(--primary-color);
    transform: translate(-1px, -1px);
    box-shadow: 3px 3px 0px rgba(0, 0, 0, 0.15);
}

.contact-form-title {
    font-family: var(--font-main);
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-color);
    margin: 0;
}

.contact-form-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 5px;
    margin: 0 -5px;
}

.selected-plans {
    background: #fff;
    border: 2px solid var(--ui-border);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
}

.selected-plans-label {
    font-size: 0.85rem;
    font-weight: 800;
    color: #666;
    margin: 0 0 8px 0;
}

.selected-plans-list {
    margin: 0;
    padding-left: 20px;
    font-size: 1rem;
    color: var(--text-color);
}

.selected-plans-list li {
    margin-bottom: 5px;
}

/* Switch Summary (乗り換えフロー用) */
.switch-summary {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.switch-summary-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.switch-summary-label {
    font-size: 0.75rem;
    font-weight: 800;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.switch-summary-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-color);
    line-height: 1.4;
}

.contact-form {
    background: #fff;
    border: 3px solid var(--ui-border);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.15);
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--text-color);
    margin-bottom: 8px;
}

.form-label .required {
    color: var(--accent-color);
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-family: var(--font-main);
    font-size: 1rem;
    color: var(--text-color);
    background: #fff;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: #aaa;
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

.form-submit-btn {
    width: 100%;
    padding: 15px;
    background: var(--accent-color);
    border: 3px solid var(--ui-border);
    border-radius: 30px;
    font-family: var(--font-main);
    font-size: 1.1rem;
    font-weight: 800;
    color: #fff;
    cursor: pointer;
    box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.2);
    transition: all 0.2s;
}

.form-submit-btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0px rgba(0, 0, 0, 0.2);
}

.form-submit-btn:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0px rgba(0, 0, 0, 0.2);
}

/* ========== Accepted Effect ========== */
#accepted-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 50;
    display: none;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

#accepted-overlay.show {
    display: flex;
}

.accepted-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    animation: acceptedPop 0.6s ease-out forwards;
}

.accepted-en {
    font-family: var(--font-pixel);
    font-size: clamp(3rem, 12vw, 6rem);
    font-weight: bold;
    color: #fff;
    text-shadow:
        4px 4px 0px var(--ui-border),
        -2px -2px 0px var(--ui-border),
        2px -2px 0px var(--ui-border),
        -2px 2px 0px var(--ui-border),
        0px 6px 10px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.1em;
}

.accepted-ja {
    font-family: var(--font-main);
    font-size: clamp(1.5rem, 6vw, 3rem);
    font-weight: 800;
    color: var(--primary-color);
    text-shadow:
        2px 2px 0px var(--ui-border),
        -1px -1px 0px var(--ui-border),
        1px -1px 0px var(--ui-border),
        -1px 1px 0px var(--ui-border);
}

@keyframes acceptedPop {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Button blink effect */
.choice-btn.blink {
    animation: buttonBlink 0.125s ease-in-out 6;
}

@keyframes buttonBlink {
    0%, 100% {
        background: var(--primary-color);
        transform: scale(1);
    }
    50% {
        background: #fff;
        transform: scale(1.05);
    }
}

/* ========== Free Text Input Styles ========== */

/* その他（自由入力）用のラッパー */
.choice-input-wrapper {
    width: 100%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.choice-btn-other.selected {
    background: var(--primary-color);
    border-color: var(--ui-border);
}

.input-container {
    display: flex;
    gap: 10px;
    width: 100%;
}

.input-container.hidden {
    display: none;
}

.free-text-input {
    flex: 1;
    padding: 12px 20px;
    border: 3px solid var(--ui-border);
    border-radius: 20px;
    font-family: var(--font-main);
    font-size: 1rem;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.95);
    color: var(--text-color);
    box-shadow: 3px 3px 0px rgba(0, 0, 0, 0.15);
    transition: all 0.2s;
}

.free-text-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.2);
}

.free-text-input::placeholder {
    color: #999;
}

.submit-input-btn {
    padding: 12px 25px;
    border: 3px solid var(--ui-border);
    border-radius: 20px;
    background: var(--accent-color);
    color: #fff;
    font-family: var(--font-main);
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 3px 3px 0px rgba(0, 0, 0, 0.2);
    transition: all 0.2s;
    white-space: nowrap;
}

.submit-input-btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: 5px 5px 0px rgba(0, 0, 0, 0.2);
}

.submit-input-btn:active {
    transform: translate(1px, 1px);
    box-shadow: 2px 2px 0px rgba(0, 0, 0, 0.2);
}

.submit-input-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Q0D用のテキストエリア */
.text-input-wrapper {
    width: 100%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.free-text-area {
    width: 100%;
    padding: 15px 20px;
    border: 3px solid var(--ui-border);
    border-radius: 15px;
    font-family: var(--font-main);
    font-size: 1rem;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.95);
    color: var(--text-color);
    box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.15);
    transition: all 0.2s;
    resize: none;
    line-height: 1.5;
}

.free-text-area:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 5px 5px 0px rgba(0, 0, 0, 0.2);
}

.free-text-area::placeholder {
    color: #999;
}

.submit-text-btn {
    align-self: center;
    padding: 15px 40px;
    border: 3px solid var(--ui-border);
    border-radius: 30px;
    background: var(--accent-color);
    color: #fff;
    font-family: var(--font-main);
    font-size: 1.1rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.2);
    transition: all 0.2s;
}

.submit-text-btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0px rgba(0, 0, 0, 0.2);
}

.submit-text-btn:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0px rgba(0, 0, 0, 0.2);
}

.submit-text-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.submit-text-btn.blink {
    animation: buttonBlink 0.125s ease-in-out 6;
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
    #site-title .shadow {
        transform: translate(3px, 3px);
    }

    #site-subtitle {
        font-size: 0.8rem;
    }

    .toggle-btn {
        padding: 4px 10px;
    }

    .toggle-text {
        /* font-size: 0.6rem; */
    }

    .choice-btn {
        padding: 10px 20px;
        font-size: 1rem;
    }

    #message-box {
        min-height: 120px;
        left: 10px;
        right: 10px;
        bottom: calc(25px + env(safe-area-inset-bottom, 0px));
        padding: 24px 15px 10px 15px;
    }

    #choices-container {
        /* 320px → 70px, 768px → 135px の線形補間 */
        padding-top: clamp(20px, calc(20px + (135 - 20) * (100vw - 320px) / (768 - 320)), 85px);
        padding-bottom: 160px;
    }

    #message-text {
        font-size: 1rem;
    }

    /* Free Text Input Responsive */
    .free-text-input {
        padding: 10px 15px;
        font-size: 0.9rem;
    }

    .submit-input-btn {
        padding: 10px 18px;
        font-size: 0.9rem;
    }

    .free-text-area {
        padding: 12px 15px;
        font-size: 0.9rem;
    }

    .submit-text-btn {
        padding: 12px 30px;
        font-size: 1rem;
    }

    .input-container {
        flex-direction: row;
        gap: 8px;
    }

    .submit-input-btn {
        padding: 10px 15px;
        font-size: 0.85rem;
        flex-shrink: 0;
    }

    /* Result Overlay Responsive */
    #result-overlay {
        padding: 15px;
        padding-top: 60px;
    }

    /* お問い合わせフォーム表示時はpadding-topを小さく */
    #result-overlay.contact-mode {
        padding-top: 20px;
    }

    .result-title {
        font-size: 1.5rem;
    }

    .result-subtitle {
        font-size: 0.9rem;
    }

    .accordion-header {
        padding: 12px 15px;
    }

    .accordion-name {
        font-size: 1rem;
    }

    .accordion-desc {
        font-size: 0.8rem;
    }

    .accordion-icon {
        font-size: 1.3rem;
    }

    .accordion-content > * {
        padding: 0 15px;
    }

    .detail-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .detail-item {
        padding: 8px 10px;
    }

    .detail-label {
        font-size: 0.65rem;
    }

    .detail-value {
        font-size: 0.8rem;
    }

    .detail-list {
        font-size: 0.8rem;
    }

    .detail-text {
        font-size: 0.8rem;
    }

    .cta-btn {
        padding: 12px 30px;
        font-size: 1rem;
    }

    .switch-result-card {
        padding: 25px 20px;
    }

    .switch-message {
        font-size: 1rem;
    }

    .access-note {
        font-size: 0.8rem;
        padding: 10px 12px;
    }

    /* Contact Form Responsive */
    .contact-form-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .contact-form-title {
        font-size: 1.1rem;
    }

    .contact-form {
        padding: 20px;
    }

    .form-label {
        font-size: 0.85rem;
    }

    .form-input,
    .form-textarea {
        padding: 10px 12px;
        font-size: 0.9rem;
    }

    .form-submit-btn {
        padding: 12px;
        font-size: 1rem;
    }

    /* Checkbox Responsive */
    .plan-checkbox-custom {
        width: 22px;
        height: 22px;
    }

    .plan-checkbox-custom::after {
        width: 10px;
        height: 10px;
    }
}

/* ========== Email Registration Overlay ========== */
#email-overlay,
#profile-overlay,
#complete-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    backdrop-filter: blur(5px);
}

.email-container,
.profile-container,
.complete-container {
    background: var(--ui-bg);
    border: 3px solid var(--ui-border);
    border-radius: 20px;
    padding: 40px;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideInUp 0.4s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.email-header,
.profile-header {
    text-align: center;
    margin-bottom: 30px;
}

.email-title,
.profile-title {
    font-family: var(--font-title);
    font-size: 1.6rem;
    color: var(--text-color);
    margin-bottom: 10px;
}

.email-subtitle,
.profile-subtitle {
    font-size: 0.95rem;
    color: #666;
}

.email-form,
.profile-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.email-note {
    font-size: 0.8rem;
    color: #888;
    text-align: center;
    margin-top: -10px;
    margin-bottom: 10px;
}

/* Email Sent Message */
#email-sent-message {
    text-align: center;
    padding: 20px 0;
}

.email-sent-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    animation: bounce 1s ease infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

#email-sent-message h3 {
    font-family: var(--font-title);
    font-size: 1.3rem;
    color: var(--text-color);
    margin-bottom: 15px;
}

#email-sent-message p {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.6;
    margin-bottom: 25px;
}

.resend-btn {
    background: transparent;
    color: var(--secondary-color);
    border: 2px solid var(--secondary-color);
    padding: 12px 25px;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.resend-btn:hover {
    background: var(--secondary-color);
    color: white;
}

.resend-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Complete Overlay */
.complete-container {
    text-align: center;
}

.complete-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: white;
    margin: 0 auto 25px;
    animation: scaleIn 0.5s ease-out;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.complete-title {
    font-family: var(--font-title);
    font-size: 1.8rem;
    color: var(--text-color);
    margin-bottom: 15px;
}

.complete-message {
    font-size: 1rem;
    color: #666;
    line-height: 1.8;
    margin-bottom: 30px;
}

/* ========== Responsive for New Overlays ========== */
@media screen and (max-width: 768px) {
    .email-container,
    .profile-container,
    .complete-container {
        padding: 30px 25px;
        margin: 20px;
    }

    .email-title,
    .profile-title {
        font-size: 1.3rem;
    }

    .email-subtitle,
    .profile-subtitle {
        font-size: 0.85rem;
    }

    .complete-icon {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }

    .complete-title {
        font-size: 1.4rem;
    }

    .complete-message {
        font-size: 0.9rem;
    }
}

/* ========== Progress Text ========== */
#progress-text {
    position: absolute;
    left: 110px;
    top: 0;
    font-family: var(--font-pixel);
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-color);
    pointer-events: auto;
}

#progress-text .mini-label {
    font-size: 0.9rem;
}

#progress-text .progress-number {
    margin-left: 0.2em;
    margin-right: 0.25em;
}

/* ========== Contact Overlay (乗り換えフロー) ========== */
#contact-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    z-index: 100;
    padding: 30px;
    padding-top: 80px;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    pointer-events: auto;
}

#contact-overlay > .contact-form-container {
    flex-shrink: 0;
    margin-bottom: 30px;
}

@media (max-width: 600px) {
    #contact-overlay {
        padding: 15px;
        padding-top: 60px;
    }
}

