
/* =========================
   0. ベース（共通）
========================= */
:root {
    --accent-aura: #ff7edb;   /* ピンク（外リング） */
    --accent-psy: #6fa8ff;    /* 青（中リング） */
    --accent-dna: #7dffb3;    /* グリーン（内リング） */
}

* {
     box-sizing: border-box;
}

body {
     margin: 0;
     font-family: "Hiragino Sans", "Yu Gothic", sans-serif;
     background: #f3f5f9;
     color: #333;
     text-align: center;
}

.page {
     width: min(100%, 960px);
     margin: 0 auto;
     padding: 16px;
}

.tab {
    display: none;
}

.tab.active {
    display: block;
}

/* =========================
   1. BOX
========================= */
.hero-box,
.setting-box,
.report-box {
     border-radius: 16px;
     padding: 16px;
     margin: 16px auto;
     width: min(100%, 780px);
}

/* =========================
   2. ナビ
========================= */
.nav {
     display: flex;
     gap: 6px;
     margin-bottom: 12px;
}

.nav button {
     flex: 1;
     padding: 10px;
     border-radius: 14px;
     border: none;
     cursor: pointer;
     font-size: 13px;
}

/* =========================
   3. ボタン共通
========================= */
button {
     width: 100%;
     padding: 12px;
     border-radius: 14px;
     border: none;
     cursor: pointer;
     font-weight: bold;

     transition:
         transform 0.2s ease,
         opacity 0.2s ease;

     -webkit-tap-highlight-color: transparent;
			
}

/* 共通 hover */
button:hover {
     transform: scale(1.04);
}

/* スマホ押下 */
button:active {
     transform: scale(0.98);
}

/* =========================
   🌸 女性モード
========================= */
.mode-soft {
     background: linear-gradient(180deg, #fdf6ff, #eef4ff);
}

.mode-soft .hero-box,
.mode-soft .setting-box,
.mode-soft .report-box {
     background: rgba(255,255,255,0.7);
     box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

.mode-soft button {
     background: linear-gradient(135deg, #ff7edb, #6fa8ff);
     color: white;
     box-shadow: 0 4px 12px rgba(255, 126, 219, 0.3);
}

.mode-soft .nav button.active {
     background: linear-gradient(135deg, #ff5cd6, #4e8eff);
}

/* =========================
   🏥 医療モード
========================= */
.mode-medical {
     background: #eef7f2;
}

/* BOX */
.mode-medical .hero-box,
.mode-medical .setting-box,
.mode-medical .report-box {
     background: #ffffff;
     border: 1px solid #cfe8dc;
     box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

/* ボタン */
.mode-medical button {
     background: linear-gradient(135deg, #b7e4d3, #8fd3b6);
     color: #1b5e20;
}

/* ホバー 上書き*/
.mode-medical button:hover {
     transform: scale(1.00);
     opacity: 0.85;
}

/* ホバー 押した時*/
.mode-medical button:active {
     transform: scale(0.98);
}

/* activeタブ */
.mode-medical .nav button.active {
     background: linear-gradient(135deg, #7eddb5, #4ccfa3);
     color: #004d40;
}

.mode-medical .medical-panel {
     max-width: 400px;
     margin: 20px auto;
     padding: 16px;
     background: #ffffff;
     border-radius: 12px;
     border: 1px solid #cfe8dc;
}

.gauge {
     margin-bottom: 20px;
     text-align: left;
}

.gauge-title {
     font-size: 14px;
     margin-bottom: 6px;
     color: #333;
}

.bar {
     width: 100%;
     height: 14px;
     background: #e6f4ee;
     border-radius: 10px;
     overflow: hidden;
}

.fill {
     height: 100%;
     width: 0%;
     border-radius: 10px;
     transition: width 0.4s ease;
}

#stress_value,
#energy_value,
#medical_value {
     font-size: 12px;
     margin-top: 4px;
}

/* =========================
   例題（軽く・左寄せ）
========================= */
.example-box {
    margin-top: 10px;
    text-align: left;
    opacity: 0.85;
}

.example-title {
    font-size: 12px;
    color: #666;
    margin-bottom: 6px;
}

.example-list {
    padding-left: 18px;
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
    color: #444;
}

.example-list li {
    margin-bottom: 4px;
}

/* =========================
   Analyze 上エリア固定化
========================= */
#analyze-top {
    height: 260px;        /* ← ここが超重要 */
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

#analyze-top > div {
    position: absolute;
    width: 100%;
    text-align: center;
}

#analyze_idle_top img {
    width: 90%;
    max-width: 300px;
    border-radius: 12px;
}

#countdown {
    font-size: 64px;
    font-weight: bold;
}

#mic_canvas {
    width: 180px;
    height: 180px;
}

/* =========================
   カウントダウン映画風
========================= */

#countdown {
    font-size: 90px;
    font-weight: 800;
    color: white;
    text-align: center;
    position: relative;
    z-index: 2;

    text-shadow:
        0 0 10px rgba(255,255,255,0.8),
        0 0 20px rgba(255,120,200,0.6),
        0 0 40px rgba(255,120,200,0.4);
}

/* ドンッと出る */
.count-pop {
    animation: pop 0.6s ease;
}

@keyframes pop {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }
    40% {
        transform: scale(1.4);
        opacity: 1;
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
    }
}

#count_circle {
    position: absolute;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 5px solid rgba(255, 120, 200, 0.8);
    box-shadow: 0 0 20px rgba(255,120,200,0.6);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    z-index: 1;
}

.circle-pulse {
    animation: pulse 0.6s ease;
}

@keyframes pulse {
    0% {
        transform: translate(-50%, -50%) scale(0.3);
        opacity: 0.8;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.4);
        opacity: 0;
    }
}

.count-overlay {
    background: rgba(0,0,0,0.1);
    transition: 0.3s;
}

/* =========================
   4. Analyzeカード
========================= */
#analyze-bottom {
     width: min(100%, 360px);
     margin: 20px auto;
     padding: 16px;
     border-radius: 18px;
     line-height: 1.8;
}

.mode-soft #analyze-bottom {
     background: rgba(255,255,255,0.7);
}

.mode-medical #analyze-bottom {
     background: #ffffff;
     border: 1px solid #ddd;
}

/* =========================
   5. Canvas
========================= */
canvas {
     width: 100%;
     max-width: 600px;
     border-radius: 20px;
     display: block;
     margin: 0 auto;
}


/* =========================
   VoiceAura コメント（女性）
========================= */
.mode-soft #summary-box {
    background: linear-gradient(135deg, #fff0f8, #eef4ff);
    color: #333;
    box-shadow: 0 6px 16px rgba(255, 126, 219, 0.15);
}

.mode-soft #summary_text {
    color: #444;   /* ←これが重要 */
}


/* =========================
   6. メンタル
========================= */
#mental_box {
     text-align: left;
     padding: 16px;
     border-radius: 10px;
     line-height: 1.8;
}

.mode-medical #mental_box {
     border-left: 4px solid #4aa3ff;
     background: #ffffff;
}

@keyframes blink {
    0% { opacity:1; }
    50% { opacity:0.4; }
    100% { opacity:1; }
}

.danger-blink {
    animation: blink 1s infinite;
}

/* =========================
   7. フラグ
========================= */
#flag_box {
     padding: 14px;
     border-radius: 10px;
     font-weight: bold;
}

.flag-ok {
     background: #e8f5e9;
     color: #2e7d32;
}

.flag-warn {
     background: #fff3e0;
     color: #ef6c00;
}

.flag-danger {
     background: #ffebee;
     color: #c62828;
}

/* =========================
   8. お知らせ
========================= */
.news-section{
    margin-top:24px;
}

.news-card{

    background:#ffffff;

    border-radius:18px;

    padding:18px;

    margin-top:12px;

    box-shadow:
        0 4px 14px rgba(0,0,0,0.08);

    text-align:left;
}

.news-card.important{

    background:
        linear-gradient(
            135deg,
            #fff7f7,
            #fff2e8
        );

    border:1px solid rgba(255,120,120,0.2);
}

.news-title{

    font-size:18px;

    font-weight:bold;

    margin-bottom:10px;
}

.news-desc{

    font-size:14px;

    line-height:1.8;

    opacity:0.85;
}

.news-list{

    margin-top:14px;

    padding-left:18px;

    line-height:2;
}

.news-btn{

    margin-top:16px;

    width:100%;

    border:none;

    border-radius:14px;

    padding:14px;

    font-size:15px;

    font-weight:bold;

    background:
        linear-gradient(
            135deg,
            #6fa8ff,
            #8f7dff
        );

    color:white;

    cursor:pointer;

    transition:0.2s;
}

.news-btn:active{
    transform:scale(0.98);
}

/* =========================
   XXX . super ID
========================= */
#user_id_view{
    background:#f7f7f7;
    padding:10px;
    border-radius:10px;
    margin-bottom:10px;
    font-size:12px;
    text-align:center;
    word-break:break-all;
}


html {
  scroll-behavior: smooth;
}

.result-mini-box {
    margin-top: 12px;
    margin-bottom: 12px;
}

.result-mini-box h3 {
    font-size: 15px;
    margin: 8px 0;
}

.ring-help-box {
    display: flex;
    gap: 8px;
    margin: 14px 0 8px;
}

.ring-help-btn {
    flex: 1;
    border: none;
    border-radius: 999px;
    padding: 9px 6px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    background: rgba(90, 120, 255, 0.14);
    color: #345;
}

.ring-help-btn:hover {
    background: rgba(90, 120, 255, 0.24);
}

.ring-help-note {
    margin: 8px 0 14px;
    padding: 12px;
    border-radius: 14px;
    font-size: 13px;
    line-height: 1.7;
    background: rgba(255,255,255,0.75);
    color: #333;
}

.setting-toggle-box {
    margin-top: 14px;
}

.setting-toggle-btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 14px;
    background: rgba(120, 150, 255, 0.18);
    color: #234;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
}

.setting-toggle-btn:hover {
    background: rgba(120, 150, 255, 0.28);
}

#advanced_settings {
    margin-top: 12px;
}

#city_floating_btn {
    position: fixed;
    left: 50%;
    bottom: 14px;
    transform: translateX(-50%);
    width: calc(100% - 28px);
    max-width: 320px;

    padding: 15px 18px;
    border: none;
    border-radius: 18px;

    background: linear-gradient(135deg, #4a6cf7, #6fa8ff);
    color: #ffffff;

    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.03em;

    box-shadow: 0 8px 24px rgba(70, 100, 255, 0.35);
    z-index: 900;

    cursor: pointer;
}

body {
    padding-bottom: 86px;
}

.lp-floating-link {
    position: fixed;
    top: 12px;
    right: 12px;
    padding: 7px 12px;
    border-radius: 999px;

    background: rgba(200,200,255,0.5);
    color: #4a6cf7;

    font-size: 12px;
    font-weight: 700;
    text-decoration: none;

    z-index: 950;
    box-shadow: 0 4px 14px rgba(0,0,0,0.14);
    backdrop-filter: blur(8px);
}

.contact-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 2000;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 10px;
}

.contact-modal-inner {
    width: min(92vw, 520px);

    background: rgba(255,255,255,0.96);
    border-radius: 22px;
    padding: 18px 22px;

    box-shadow: 0 18px 45px rgba(0,0,0,0.25);

    max-height: none;
    overflow: visible;
}

.contact-modal-inner h3 {
    margin: 4px 0 14px;
    font-size: 20px;
}

.contact-modal-inner label {
    display: block;
    margin-top: 10px;
    margin-bottom: 5px;
    font-weight: bold;
    font-size: 14px;
}

.contact-modal-inner input,
.contact-modal-inner select,
.contact-modal-inner textarea {
    width: 100%;
    box-sizing: border-box;

    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.15);

    font-size: 15px;
    background: #fff;
}

.contact-modal-inner input,
.contact-modal-inner select {
    height: 46px;
}

.contact-modal-inner textarea {
    height: 110px;
    resize: vertical;
}

.contact-modal-inner .action-btn {
    margin-top: 8px;
    padding: 11px;
}

#contact_status {
    margin-top: 6px;
    font-size: 13px;
    line-height: 1.5;
}

@media (max-height: 760px) {
    .contact-modal {
        align-items: flex-start;
        overflow-y: auto;
        padding-top: 10px;
        padding-bottom: 30px;
    }

    .contact-modal-inner {
        margin-bottom: 20px;
    }

    .contact-modal-inner textarea {
        height: 90px;
    }
}

.privacy-agree-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    margin-top: 10px;
    font-size: 13px;
    line-height: 1.6;
    cursor: pointer;
}

.privacy-agree-box input {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
}

/* =========================
   カウント中・録音中・チェック中・完了だけ薄いグリーン
========================= */

body.analyze-count #analyze-container,
body.analyze-record #analyze-container,
body.analyze-processing #analyze-container,
body.analyze-done #analyze-container {
    background: linear-gradient(
        180deg,
        #efffe7 0%,
        #ffffef 58%,
        #f5fbef 100%
    );
    border-radius: 28px;
}

/* 完了画面だけ上の空白を少し減らす */
body.analyze-done #analyze-top {
    height: 140px;
}

body.analyze-done #analyze-bottom {
    margin-top: 0;
}

/* =========================
   Health Center 下ボタン
========================= */

.city-bottom-btn {
    width: min(100%, 720px);
    margin: 20px auto 10px;
    display: block;

    padding: 15px 18px;
    border-radius: 18px;

    font-size: 16px;
    font-weight: 700;

    background: linear-gradient(135deg, #ff7edb, #6fa8ff);
    color: #ffffff;

    box-shadow: 0 8px 24px rgba(100, 120, 255, 0.28);
}

/* =========================
   Trait / State / Impression 色ブロック
========================= */
.type-card.trait-card {
    background: linear-gradient(135deg, #f3edff, #eef4ff);
    border-left: 6px solid #8f7dff;
}

.type-card.state-card {
    background: linear-gradient(135deg, #effff7, #eef9ff);
    border-left: 6px solid #58d6a4;
}

.type-card.impression-card {
    background: linear-gradient(135deg, #fff4ed, #fff0f8);
    border-left: 6px solid #ff9a7a;
}

/* =========================
   小さい物語
========================= */
.intro-vision {
    line-height: 1.9;
}

.vision-lead {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 18px;
    text-align: center;
}

.vision-lead b {
    font-size: 22px;
}

.vision-dialog {
    background: linear-gradient(135deg, #f8f5ff, #f3fbff);
    border-radius: 20px;
    padding: 16px 18px;
    margin: 18px 0;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.04);
}

.vision-dialog p {
    margin: 10px 0;
}

.vision-dialog span {
    font-weight: 800;
    color: #4b5fdc;
}

.vision-message {
    font-size: 17px;
    font-weight: 700;
    text-align: center;
    margin: 18px 0 10px;
}

.vision-mini {
    font-size: 14px;
    opacity: 0.78;
    line-height: 1.8;
    text-align: center;
}

/* =========================
   VoiceAura Phrase Check β
========================= */

.phrase-box {
    margin: 12px 0 14px;
    padding: 14px 14px;
    border-radius: 18px;

    background:
        linear-gradient(
            135deg,
            #f8f5ff,
            #f3fbff
        );

    border: 1px solid rgba(90,120,255,0.12);

    box-shadow:
        inset 0 0 0 1px rgba(255,255,255,0.7),
        0 4px 12px rgba(80,100,180,0.08);

    text-align: center;
}

.phrase-label {
    font-size: 12px;
    font-weight: 800;
    color: #4b5fdc;
    margin-bottom: 6px;
    letter-spacing: 0.04em;
}

.phrase-text {
    font-size: 18px;
    font-weight: 800;
    color: #333;
    line-height: 1.6;
    margin-bottom: 6px;
}

.phrase-keywords {
    font-size: 12px;
    opacity: 0.68;
    margin-bottom: 8px;
}

.phrase-status {
    display: inline-block;

    padding: 6px 10px;
    border-radius: 999px;

    font-size: 12px;
    font-weight: 700;

    background: rgba(255,255,255,0.75);
    color: #555;
}

.phrase-status-idle {
    background: rgba(255,255,255,0.8);
    color: #555;
}

.phrase-status-listening {
    background: #fff7d6;
    color: #8a5a00;
}

.phrase-status-ok {
    background: #e8f5e9;
    color: #2e7d32;
}

.phrase-status-ng {
    background: #ffebee;
    color: #c62828;
}

.phrase-status-warn {
    background: #fff3e0;
    color: #ef6c00;
}

.phrase-retry-message {
    margin: 12px 0;
    padding: 14px;
    border-radius: 14px;

    background: #fff3cd;
    color: #8a5a00;

    font-weight: bold;
    line-height: 1.7;
    text-align: center;
}

.phrase-transcript {
    font-size: 12px;
    opacity: 0.8;
    font-weight: normal;
}

/* =========================
   Phrase Select UI
========================= */

.phrase-select-box {
    margin: 10px 0 14px;
    padding: 12px;
    border-radius: 16px;
    background: rgba(255,255,255,0.65);
    border: 1px solid rgba(120,140,255,0.16);
}

.phrase-select-title {
    font-size: 12px;
    font-weight: 800;
    color: #4b5fdc;
    margin-bottom: 8px;
    letter-spacing: 0.04em;
}

.phrase-select-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.phrase-select-btn {
    flex: 1 1 calc(50% - 8px);
    min-width: 120px;

    padding: 9px 8px;
    border-radius: 999px;

    font-size: 12px;
    font-weight: 800;

    background: rgba(120,140,255,0.12);
    color: #4b5fdc;

    box-shadow: none;
}

.phrase-select-btn.active {
    background: linear-gradient(135deg, #ff7edb, #6fa8ff);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(120,140,255,0.25);
}