* {
    max-width: 100%;
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
    font-size: 16px;
    font-family: "Noto Sans JP", "Helvetica Neue", "Helvetica", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Arial", "Yu Gothic", "Meiryo", sans-serif;
    line-height: 180%;
    letter-spacing: 0.1em;
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    background: linear-gradient(180deg, #D9EEF6 0%, #E3F2F9 5%, #F5FAFE 19.5%, #F3F3F3 100%), #FFF;
}

p,
table,
blockquote,
address,
pre,
iframe,
form,
figure,
dl {
    margin: 0;
}

button,
input,
optgroup,
select,
textarea {
    font-family: inherit;
    font-size: 100%;
    line-height: 1.8;
    letter-spacing: 0.1em;
    margin: 0;
    box-sizing: border-box;
}

button,
[type="button"],
[type="reset"],
[type="submit"] {
    -webkit-appearance: button;
}

button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner {
    border-style: none;
    padding: 0;
}

button:-moz-focusring,
[type="button"]:-moz-focusring,
[type="reset"]:-moz-focusring,
[type="submit"]:-moz-focusring {
    outline: 1px dotted ButtonText;
}

textarea {
    font-size: 18px;

}

ul,
ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

a {
    color: #22ACAC;
    text-decoration: none;
}

.overlay {
    position: relative;
    display: flex;
    flex-direction: column;
    z-index: 10;
}

.form-set,
.form-set_sp,
.form-set02 {
    display: flex;
    gap: 16px;
    align-items: center;
}

.form-set label {
    min-width: 8em;
    text-wrap: wrap;
}

.form-set select {
    min-width: 10em;
}

.form-set_sp label {
    min-width: 8em;
    text-wrap: wrap;
}

.form-set_sp select {
    min-width: 10em;
}

.form-set02 label {
    min-width: fit-content;
}

.form-set02 select {
    min-width: fit-content;
}


/* ------------------------エリアを非表示にする  start*/
label[for="prompt"],
#prompt,
label[for="prompt_sp"],
#prompt_sp,
label[for="prompt_tab"],
#prompt_tab,
label[for="messageInput"],
label[for="messageInput_sp"],
label[for="messageInput_tab"] {
    display: none;
}


/* 初期状態で一部要素を非表示に */
#submitButton_sp,
#messageOutput_sp,
label[for="messageOutput_sp"],
#voiceoutputButton_sp {
    display: none;
}

/* ------------------------エリアを非表示にする end*/


@media screen and (min-width: 1401px){

    header {
        width: auto;
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
        margin: 0;
        padding: 8px 16px 16px 16px;
    }

    .header-left {
        display: flex;
        align-items: center;
        gap: 152px;
        justify-content: space-between;
    }

    .logo {
        display: flex;
        padding-top: 4px;
        justify-content: center;
        align-items: center;
        gap: 16px;
        width: auto;
        height: 53px;
    }


    .header-button,
    .header-lunguage {
        display: flex;
        align-items: center;
        gap: 16px;
        justify-content: space-between;
    }

    /* ヘッダー内ボタン　start */

    .button--normal {
        display: flex;
        padding: 8px 16px;
        justify-content: center;
        align-items: center;
        border-radius: 99px;
        background: #FFF;
        color: #22ACAC;
        font-size: 14px;
        font-style: normal;
        font-weight: 400;
        line-height: 180%;
        /* 21.6px */
        letter-spacing: 0.1em;
        text-wrap: nowrap;
    }

    .button--normal:hover {
        opacity: 0.7;
    }

    /* ヘッダー内ボタン　end */

    .left {
        position: relative;
        width: calc(60% - 40px);
        z-index: 99999999999;
    }

    #hikariOutput {
        border-radius: 0px 6px 6px 6px;
        border: 3px solid #22ACAC;
        background: rgba(255, 255, 255, 0.80);
    }

    .hikariOutput {
        position: fixed;
        left: 40px;
        bottom: 40px;
        width: calc(60% - 40px);
        z-index: 100000;
    }

    .outputlangSelect {
        position: absolute;
        right: 10%;
    }

    .messageOutput {
        color: #FFF;
        font-size: 16px;
        font-style: normal;
        font-weight: 300;
        line-height: 180%;
        /* 32.4px */
        letter-spacing: 0.1em;
        padding: 8px 16px 8px 16px;
        border-radius: 8px 8px 0px 0px;
        background: #22ACAC;
    }

    #messageOutput {
        width: 90%;
        min-height: 3em;
        padding: 16px;
        border-radius: 0px 6px 6px 6px;
        border: 3px solid #22ACAC;
        background: rgba(255, 255, 255, 0.80);
        background-clip: padding-box;
        color: #333;
        -webkit-text-fill-color: #333;
    }

    .hikaritxtbox {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        width: 100%;

    }


    .right-menu-wrap {
        width: 40%;
        height: calc(100svh - 78px);
        margin-right: 16px;
        border-radius: 16px 16px 0px 0px;
        background: #FFF;
        box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.02), 0px 0px 8px 0px rgba(0, 0, 0, 0.02);
    }

    .right-menu {
        display: flex;
        box-sizing: border-box;
        padding: 40px;
        flex-direction: column;
        align-items: end;
        gap: 24px;
        align-self: stretch;

    }

    .messageInput {
        position: relative;
        display: grid;
        grid-template-rows: minmax(250px, auto) minmax(0px, auto);
        width: 100%;
        padding-bottom: 24px;
    }

    #messageInput {
        min-width: 100%;
        min-height: 100%;
        max-width: 100%;
        max-height: 100%;
        padding: 8px 16px;
        box-sizing: border-box;
        resize: vertical;
    }


    .messageInput-button {
        display: flex;
        gap: 16px;
        align-items: center;
        justify-content: end;
        padding: 16px 0 0;
    }

    /* 入力ボタン Start*/

    .button--primary {
        font-size: 18px;
        letter-spacing: 0.1em;
        color: #22ACAC;
        border: none;
        padding: 8px 24px;
        width: fit-content;
        border-radius: 100px;
        background: #FFF;
        border: 1px solid #22ACAC;
        text-wrap: nowrap;
    }

    .mic-button {
        display: flex;
        gap: 16px;
        align-items: center;
        justify-content: center;
    }

    .button--primary:hover,
    .mic-button:hover {
        opacity: 0.5;
    }

    .button--primary:active,
    .mic-button:active {
        background: #22ACAC;
    }

    /* 入力ボタン end*/

    #customAvatarForm {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        gap: 40px;
    }

    .hamburger-menu {
        display: none;
    }

    #omnigridAvatarContainer {
        position: relative;
        z-index: 1;
    }

}

/* ------------------------タブレット用のスタイル Start*/

@media screen and (min-width: 801px)and (max-width: 1400px) {

    header_tab {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        justify-content:space-between;
        align-items: center;
        margin: 0;
        padding: 8px 16px 16px 16px;
    }

    .header-left_tab {
        display: flex;
        align-items: center;
        gap: 15px;
        justify-content: flex-start;
    }

    .logo_tab {
        display: flex;
        padding-top: 4px;
        justify-content: center;
        align-items: center;
        gap: 16px;
        width: auto;
        height: 53px;
    }


    .header-button_tab,
    .header-lunguage_tab {
        display: flex;
        align-items: center;
        gap: 16px;
        justify-content: space-between;
    }

    /* ヘッダー内ボタン　start */

    .button--normal_tab {
        display: flex;
        padding: 8px 16px;
        justify-content: center;
        align-items: center;
        border-radius: 99px;
        background: #FFF;
        color: #22ACAC;
        font-size: 12px;
        font-style: normal;
        font-weight: 400;
        line-height: 180%;
        /* 21.6px */
        letter-spacing: 0.1em;
        text-wrap: nowrap;
    }

    .button--normal_tab:hover {
        opacity: 0.7;
    }

    /* ヘッダー内ボタン　end */

    .left_tab {
        position: relative;
        width: calc(60% - 40px);
        z-index: 99999999999;
    }

    #hikariOutput_tab {
        border-radius: 0px 6px 6px 6px;
        border: 3px solid #22ACAC;
        background: rgba(255, 255, 255, 0.80);
    }

    .hikariOutput_tab {
        position: fixed;
        left: 40px;
        bottom: 10px;
        width: calc(60% - 40px);
        z-index: 100000;
    }

    .outputlangSelect_tab {
        position: absolute;
        right: 10%;
    }

    .messageOutput_tab {
        color: #FFF;
        font-size: 16px;
        font-style: normal;
        font-weight: 300;
        line-height: 180%;
        /* 32.4px */
        letter-spacing: 0.1em;
        padding: 8px 16px 8px 16px;
        border-radius: 8px 8px 0px 0px;
        background: #22ACAC;
    }

    #messageOutput_tab {
        width: 90%;
        min-height: 3em;
        padding: 16px;
        border-radius: 0px 6px 6px 6px;
        border: 3px solid #22ACAC;
        background: rgba(255, 255, 255, 0.80);
        background-clip: padding-box;
        color: #333;
        -webkit-text-fill-color: #333;
    }

    .hikaritxtbox_tab {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        width: 100%;

    }


    .right-menu-wrap_tab {
        width: 40%;
        height: 100svh;
        margin-right: 16px;
        border-radius: 16px 16px 0px 0px;
        background: #FFF;
        box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.02), 0px 0px 8px 0px rgba(0, 0, 0, 0.02);
    }

    .right-menu_tab {
        display: flex;
        box-sizing: border-box;
        padding: 40px;
        flex-direction: column;
        align-items: end;
        gap: 65px;
        align-self: stretch;

    }

    .messageInput_tab {
        position: relative;
        display: grid;
        grid-template-rows: minmax(150px, auto) minmax(0px, auto);
        flex-direction: column; /* 縦方向に並べる */
        width: 100%;
        padding-bottom: 5px;
        justify-content: start; /* 要素を左寄せ */
    }

    #messageInput_tab {
        min-width: 80%;
        min-height: 80%;
        max-width: 85%;
        max-height: 80%;
        padding: 8px 16px;
        box-sizing: border-box;
        resize: vertical;
    }

    .messageInput-button_tab {
        display: flex;
        gap: 5px;
        align-items: center;
        justify-content: end;
        padding: 5px 0 0;
        max-width: 92%;
    }
    /* 入力ボタン Start*/

    .button--primary_tab {
        font-size: 12px;
        letter-spacing: 0.1em;
        color: #22ACAC;
        border: none;
        padding: 8px 24px;
        width: fit-content;
        border-radius: 100px;
        background: #FFF;
        border: 1px solid #22ACAC;
        text-wrap: nowrap;
    }

    .mic-button_tab {
        display: flex;
        gap: 16px;
        align-items: center;
        justify-content: center;
    }

    .button--primary_tab:hover,
    .mic-button_tab:hover {
        opacity: 0.5;
    }

    .button--primary_tab:active,
    .mic-button_tab:active {
        background: #22ACAC;
    }

    /* 入力ボタン end*/

    #customAvatarForm_tab {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        gap: 40px;
    }

    .hamburger-menu {
        display: none;
    }

    #omnigridAvatarContainer {
        position: relative;
        z-index: 1;
    }
}


/* ------------------------タブレット用のスタイル End */

/* ------------------------スマホ用のスタイル Start*/

@media screen and (max-width: 800px) {
    html {
        height: 100svh;
        font-size: 14px;
        overflow: hidden;
    }

    body {
        height: 100svh;
        overflow: hidden;
    }

    header {
        position: fixed;
        top: 0;
        width: auto;
        height: 60px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin: 0;
        padding: 8px 16px 16px 16px;
        z-index: 3;
    }

    .logo {
        display: flex;
        padding-top: 4px;
        justify-content: center;
        align-items: center;
        gap: 7px;
        width: auto;
        height: 41px;
    }

    .header-button_sp,
    .header-select {
        flex-direction: column;
        padding: 60px 16px 0
    }


    .button--normal_sp {
        font-size: 1.0em !important; /* 優先度を上げる */
        padding: 0.5em 0.5em !important; /* 余白も小さく */
        display: inline-block; /* ボタンをインラインブロックに設定 */
        text-align: center; /* テキストを中央揃え */
        line-height: 1 !important; /* 高さの調整 */
        width: 170%; /* 必要に応じて幅を自動調整 */
    }

    .form-container_sp {
        display: flex; /* フレックスボックスを使用 */
        gap: 1em; /* 各フォーム間のスペースを設定 */
        justify-content: space-between; /* フォームを均等に配置 */
        align-items: center; /* フォーム内容を縦方向に中央揃え */
    }

    .form-set_sp {
        display: flex;
        flex-direction: column; /* ラベルとセレクトボックスを縦に並べる */
        align-items: flex-start; /* ラベルを左揃えに */
        min-width: 120px; /* 各フォームセットの最小幅を設定 */
        gap: 0.1em; /* ラベルとセレクトボックスの間隔を設定 */
    }

    /* メニュー内の要素のスタイリング */


    .menu-items select {
        width: 100%;
        padding: 8px;
    }


    .header-select {
        display: flex;
        gap: 24px;
    }

    .form-set label {
        min-width: 5em;
        text-wrap: wrap;
    }

    .center-container {
        position: relative;
        padding: 0 24px;
    }

    .hikariOutput_sp {
        position: relative;
        display: flex;
        align-items: end;
        height: 550px;
        width: calc(100vw - 48px);
        z-index: 2;
    }

    .messageOutput_sp {
        color: #FFF;
        font-size: 14px;
        font-style: normal;
        font-weight: 300;
        line-height: 180%;
        /* 32.4px */
        letter-spacing: 0.1em;
        padding: 8px 16px 8px 16px;
        border-radius: 8px 8px 0px 0px;
        background: #22ACAC;
    }

    #messageOutput_sp {
        width: calc(100vw - 70px);
        height: 10svh;
        font-size: 14px;
        box-sizing: content-box;
        padding: 8px;
        border-radius: 0px 6px 6px 6px;
        border: 3px solid #22ACAC;
        background: rgba(255, 255, 255, 90%);
        background-clip: padding-box;
        color: #333;
        -webkit-text-fill-color: #333;
        opacity: 1;
        overflow: scroll;
    }


    .messageInput-area_sp {
        position: fixed;
        bottom: 0;
        display: flex;
        width: 100%;
        height: 30svh;
        padding: 16px;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        gap: 16px;
        flex: 1 0 0;
        border-radius: 16px 16px 0px 0px;
        background: #FFF;
        box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.02), 0px 0px 8px 0px rgba(0, 0, 0, 0.02);
        z-index: 4;
    }

    #messageInput_sp {
        width: 100%;
        font-size: 14px;
        height: 40%;
    }

    .mic-button {
        align-items: center;
        justify-content: center;
    }

    .button--primary {
        font-size: 16px;
        letter-spacing: 0.1em;
        color: #22ACAC;
        border: none;
        padding: 6px 24px;
        width: fit-content;
        border-radius: 100px;
        background: #FFF;
        border: 1px solid #22ACAC;
    }

    .button--normal_sp{
        font-size: 16px;
        letter-spacing: 0.1em;
        color: #22ACAC;
        border: none;
        padding: 6px 24px;
        width: fit-content;
        border-radius: 100px;
        background: #FFF;
        border: 1px solid #22ACAC;
    }

    #startRecognitionButton_sp,
    #submitButton_sp {
        width: 10em;
    }


    .button-container_sp {
        display: flex; /* フレックスボックスで横並びに */
        gap: 1em; /* ボタン間のスペースを設定 */
        justify-content: center; /* ボタンを中央揃えに */
        align-items: center; /* ボタンを縦方向に中央揃え */
    }

    #omnigridAvatarContainer {
        position: relative;
        z-index: 1;
    }
}

/* ------------------------スマホ用のスタイル End */



/* ------------------------スクリーン幅が1400px以上の場合に適用 */

@media screen and (min-width: 1400px) {
    #mobile-version {
        display: none;
    }
    #tablet-version {
        display: none;
    }
    #desktop-version {
        display: block;
    }
    .hamburger-menu {
        display: none;
    }
}


/* ------------------------スクリーン幅が800px以上1400px以上の場合に適用 */

@media screen and (min-width: 800px)and (max-width: 1400px) {
    #mobile-version {
        display: none;
    }
    #tablet-version {
        display: block;

    }
    #desktop-version {
        display: none;
    }
    .hamburger-menu {
        display: none;
    }
}

/* ------------------------スクリーン幅が800px以下の場合に適用 */
@media only screen and (max-width: 800px) {
    #desktop-version {
        display: none;
    }
    #tablet-version {
        display: none;
    }
    #mobile-version {
        display: block;

    }
}