/* ============================================================
   たのしくあそぼう！
   style.css
   ============================================================ */


/* ============================================================
   基本設定
   ============================================================ */

* {
    box-sizing: border-box;
}


html {
    margin: 0;
    padding: 0;

    scroll-behavior: smooth;
}


body {
    margin: 0;
    padding: 0;

    min-height: 100vh;

    background:
        linear-gradient(
            180deg,
            #fffaf2 0%,
            #f7fbff 55%,
            #f4fbf5 100%
        );

    color: #444;

    font-family:
        "Hiragino Kaku Gothic ProN",
        "Hiragino Sans",
        "Yu Gothic",
        "YuGothic",
        "Noto Sans JP",
        sans-serif;

    -webkit-font-smoothing: antialiased;

    -webkit-tap-highlight-color: transparent;
}


a {
    color: inherit;

    text-decoration: none;
}


button {
    font-family: inherit;
}


img {
    max-width: 100%;
}


.hidden {
    display: none !important;
}


/* ============================================================
   アプリ全体
   ============================================================ */

#app {
    min-height: 100vh;

    display: flex;

    flex-direction: column;
}


.main-content {
    width: 100%;

    flex: 1;

    padding:
        30px
        16px
        50px;
}


/* ============================================================
   ヘッダー
   ============================================================ */

.app-header {
    position: sticky;

    top: 0;

    z-index: 100;

    width: 100%;

    background:
        rgba(255, 255, 255, 0.96);

    border-bottom:
        2px solid #f0e6d8;

    box-shadow:
        0 2px 10px rgba(0, 0, 0, 0.05);

    backdrop-filter: blur(8px);
}


.header-inner {
    width:
        min(
            1100px,
            94%
        );

    min-height: 76px;

    margin: 0 auto;

    display: grid;

    grid-template-columns:
        120px
        1fr
        120px;

    align-items: center;
}


.header-title {
    margin: 0;

    text-align: center;

    font-size:
        clamp(
            27px,
            5vw,
            38px
        );

    font-weight: 800;

    letter-spacing:
        0.06em;

    color: #444;
}


.header-spacer {
    width: 100%;
}


/* ============================================================
   ホームタイトル
   ============================================================ */

.home-screen {
    width:
        min(
            1050px,
            100%
        );

    margin: 0 auto;
}


.home-title-area {
    text-align: center;

    margin-bottom: 38px;
}


.home-title-icon {
    margin-bottom: 8px;

    font-size:
        clamp(
            30px,
            6vw,
            50px
        );

    letter-spacing:
        0.12em;
}


.home-title {
    margin: 0;

    font-size:
        clamp(
            36px,
            7vw,
            60px
        );

    font-weight: 800;

    letter-spacing:
        0.05em;

    color: #444;
}


.home-subtitle {
    margin:
        12px 0 0;

    font-size:
        clamp(
            18px,
            3.5vw,
            25px
        );

    font-weight: 700;

    color: #777;
}


/* ============================================================
   ゲームカード一覧
   ============================================================ */

.game-menu {
    display: grid;

    grid-template-columns:
        repeat(
            2,
            minmax(
                0,
                1fr
            )
        );

    gap: 20px;
}


/* ============================================================
   ゲームカード
   ============================================================ */

.game-card {
    position: relative;

    min-height: 180px;

    padding:
        25px
        25px
        22px
        155px;

    display: flex;

    align-items: center;

    border:
        4px solid #e7ddd0;

    border-radius: 30px;

    background: #fff;

    box-shadow:
        0 6px 0 #e4d7c7,
        0 10px 22px
        rgba(
            0,
            0,
            0,
            0.07
        );

    overflow: hidden;

    cursor: pointer;

    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease,
        background 0.15s ease;
}


.game-card:hover {
    transform:
        translateY(-3px);

    background: #fffdf9;
}


.game-card:active {
    transform:
        translateY(4px);

    box-shadow:
        0 2px 0 #e4d7c7;
}


/* ============================================================
   カード番号
   ============================================================ */

.game-card-number {
    position: absolute;

    left: 18px;
    top: 18px;

    width: 46px;
    height: 46px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #f3eee8;

    color: #555;

    font-size: 24px;

    font-weight: 800;

    z-index: 3;
}


/* ============================================================
   カードアイコン
   ============================================================ */

.game-card-icon {
    position: absolute;

    left: 24px;
    top: 50%;

    width: 105px;

    transform:
        translateY(-42%);

    display: flex;

    align-items: center;
    justify-content: center;

    text-align: center;

    font-size:
        clamp(
            28px,
            4vw,
            46px
        );

    line-height: 1.1;

    font-weight: 800;

    letter-spacing: 0.03em;
}


.color-icons {
    font-size:
        clamp(
            25px,
            3.8vw,
            42px
        );
}


.kana-icon {
    width: 95px;

    height: 95px;

    border-radius: 28px;

    background: #fff;

    border: 4px solid #f0d5a8;

    color: #e69a38;

    font-size: 68px;

    line-height: 1;
}


.word-icon {
    font-size:
        clamp(
            25px,
            3.5vw,
            40px
        );

    letter-spacing:
        0.08em;
}


.kana-grid-icon {
    font-size: 29px;

    line-height: 0.9;

    letter-spacing: 0;
}


/* ============================================================
   カード本文
   ============================================================ */

.game-card-body {
    width: 100%;
}


.game-card-title {
    margin: 0;

    font-size:
        clamp(
            22px,
            3.2vw,
            31px
        );

    line-height: 1.4;

    font-weight: 800;

    letter-spacing:
        0.02em;

    color: #444;
}


.game-card-description {
    margin:
        8px 0 0;

    font-size:
        clamp(
            15px,
            2vw,
            19px
        );

    line-height: 1.5;

    font-weight: 700;

    color: #777;
}


.game-card-subtitle {
    display: inline-block;

    margin-top: 7px;

    padding:
        4px 12px;

    border-radius: 12px;

    background: #f5f1eb;

    color: #777;

    font-size: 14px;

    font-weight: 800;
}


/* ============================================================
   カードごとのアクセント
   ============================================================ */

.card-shape {
    border-color: #ded7ce;
}


.card-color {
    border-color: #f0d9d0;
}


.card-vehicle {
    border-color: #d4e2ed;
}


.card-scratch {
    border-color: #dedede;
}


.card-hiragana {
    border-color: #f0dfbd;
}


.card-hiragana2 {
    border-color: #d9e6c8;
}


.card-word {
    border-color: #dfd4ec;
}


.card-zukan {
    border-color: #d2e4df;
}


/* ============================================================
   アイコンの細かな色
   ============================================================ */

.card-shape .game-card-icon {
    color: #777;
}


.card-vehicle .game-card-icon {
    font-size:
        clamp(
            28px,
            4vw,
            44px
        );
}


.card-scratch .game-card-icon {
    font-size:
        clamp(
            38px,
            5vw,
            55px
        );
}


.card-word .game-card-icon {
    color: #9a79b7;
}


.card-zukan .game-card-icon {
    color: #5d9d8f;
}


/* ============================================================
   ホーム下部
   ============================================================ */

.home-footer-message {
    margin:
        38px auto 0;

    display: flex;

    align-items: center;
    justify-content: center;

    gap: 14px;

    color: #777;

    text-align: center;
}


.home-footer-message p {
    margin: 0;

    font-size:
        clamp(
            17px,
            3vw,
            23px
        );

    font-weight: 700;
}


/* ============================================================
   フッター
   ============================================================ */

.app-footer {
    padding:
        20px
        16px
        28px;

    text-align: center;

    color: #999;
}


.app-footer p {
    margin: 0;

    font-size: 14px;

    font-weight: 700;
}


/* ============================================================
   キーボード操作
   ============================================================ */

.game-card:focus-visible {
    outline:
        5px solid #ffbf5b;

    outline-offset: 4px;
}


/* ============================================================
   タブレット
   ============================================================ */

@media (
    max-width: 800px
) {

    .main-content {
        padding:
            24px
            14px
            40px;
    }


    .game-menu {
        gap: 16px;
    }


    .game-card {
        min-height: 165px;

        padding-left: 135px;
    }


    .game-card-icon {
        left: 18px;

        width: 95px;
    }

}


/* ============================================================
   スマートフォン
   ============================================================ */

@media (
    max-width: 600px
) {

    .app-header {
        position: relative;
    }


    .header-inner {
        min-height: 64px;

        grid-template-columns:
            40px
            1fr
            40px;
    }


    .header-title {
        font-size: 25px;
    }


    .main-content {
        padding:
            20px
            12px
            35px;
    }


    .home-title-area {
        margin-bottom: 28px;
    }


    .home-title-icon {
        margin-bottom: 4px;
    }


    .home-title {
        font-size: 37px;

        line-height: 1.25;
    }


    .home-subtitle {
        margin-top: 8px;

        font-size: 18px;
    }


    .game-menu {
        grid-template-columns: 1fr;

        gap: 16px;
    }


    .game-card {
        min-height: 145px;

        padding:
            20px
            18px
            18px
            115px;

        border-width: 3px;

        border-radius: 24px;
    }


    .game-card-number {
        left: 13px;
        top: 13px;

        width: 38px;
        height: 38px;

        font-size: 20px;
    }


    .game-card-icon {
        left: 13px;

        width: 85px;

        font-size: 31px;
    }


    .color-icons {
        font-size: 28px;
    }


    .kana-icon {
        width: 76px;
        height: 76px;

        font-size: 54px;

        border-radius: 22px;
    }


    .word-icon {
        font-size: 25px;
    }


    .kana-grid-icon {
        font-size: 25px;
    }


    .game-card-title {
        font-size: 23px;

        line-height: 1.35;
    }


    .game-card-description {
        margin-top: 5px;

        font-size: 15px;

        line-height: 1.4;
    }


    .game-card-subtitle {
        margin-top: 5px;

        padding:
            3px
            9px;

        font-size: 13px;
    }


    .home-footer-message {
        margin-top: 28px;
    }

}


/* ============================================================
   とても小さいスマートフォン
   ============================================================ */

@media (
    max-width: 380px
) {

    .main-content {
        padding-left: 9px;
        padding-right: 9px;
    }


    .home-title {
        font-size: 33px;
    }


    .game-card {
        padding-left: 105px;

        min-height: 135px;
    }


    .game-card-icon {
        left: 8px;

        width: 82px;

        font-size: 27px;
    }


    .kana-icon {
        width: 68px;
        height: 68px;

        font-size: 48px;
    }


    .game-card-title {
        font-size: 21px;
    }


    .game-card-description {
        font-size: 14px;
    }

}


/* ============================================================
   タッチ端末
   ============================================================ */

@media (
    hover: none
) {

    .game-card:hover {
        transform: none;

        background: #fff;
    }


    .game-card:active {
        transform:
            translateY(4px);
    }

}