body {
    background:
        radial-gradient(circle at 12% 18%, rgba(255, 221, 104, 0.42), transparent 26%),
        linear-gradient(135deg, #fff6df 0%, #e7f7ff 45%, #ffe8ec 100%);
}

.header.board {
    border: 0;
    background: transparent;
}

.header {
    position: absolute;
    inset: 0 0 auto;
    z-index: 20;
    height: 0;
    color: #253044;
}

.text-header {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.game-menu {
    top: 18px;
}

.play-timer,
.track,
.footer.board {
    display: none;
}

.menu-button {
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.76);
    color: #253044;
    box-shadow: 0 10px 24px rgba(38, 50, 56, 0.1);
}

.menu-button:hover {
    background: #ffffff;
}

.game.board {
    border: 0;
    height: auto;
    max-height: none;
    min-height: 100dvh;
    justify-content: flex-start;
    padding: clamp(34px, 5dvh, 58px) 0 clamp(24px, 4dvh, 46px);
    box-sizing: border-box;
}

.home {
    display: grid;
    width: min(1120px, calc(100% - 32px));
    gap: clamp(14px, 2.2dvh, 22px);
    color: #263238;
}

.home-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
    align-items: center;
    min-height: clamp(280px, 44dvh, 430px);
    padding: clamp(20px, 4vw, 50px);
    border-radius: 8px;
    box-sizing: border-box;
}

.home-copy {
    text-align: left;
    max-width: 650px;
}

.home-kicker,
.home-age {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 8px;
    font-weight: 900;
    box-shadow: 0 8px 24px rgba(38, 50, 56, 0.08);
}

.home-kicker {
    background: rgba(255, 255, 255, 0.82);
    color: #006d77;
    font-size: clamp(0.85rem, 1.4vw, 1rem);
}

.home-age {
    min-height: 40px;
    margin-left: 8px;
    padding: 0 15px;
    background: #ffe36e;
    color: #253044;
    font-size: clamp(1rem, 1.7vw, 1.18rem);
}

.home h2 {
    max-width: 11ch;
    margin: 14px 0 12px;
    color: #253044;
    font-size: clamp(2.9rem, 5.6vw, 5.2rem);
    line-height: 0.94;
}

.home p {
    max-width: 520px;
    margin: 0;
    color: #465865;
    font-size: clamp(1rem, 1.7vw, 1.22rem);
    line-height: 1.45;
    font-weight: 700;
}

.home-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.home-start,
.home-guide,
.home-continue {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 54px;
    border-radius: 8px;
    color: #253044;
    font-weight: 900;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.home-start {
    min-width: 164px;
    padding: 0 24px;
    background: #ff6b4a;
    color: #ffffff;
    font-size: clamp(1.1rem, 1.8vw, 1.3rem);
    box-shadow: 0 16px 28px rgba(255, 107, 74, 0.28);
}

.home-guide {
    min-width: 164px;
    padding: 0 22px;
    background: rgba(255, 255, 255, 0.76);
    font-size: clamp(1.04rem, 1.6vw, 1.18rem);
    box-shadow: 0 10px 24px rgba(38, 50, 56, 0.1);
}

.home-start:hover,
.home-start:active,
.home-guide:hover,
.home-guide:active,
.home-continue:hover,
.home-continue:active,
.home-game:hover,
.home-game:active {
    transform: translateY(-2px);
}

.home-start:hover,
.home-start:active {
    background: #ee5737;
    box-shadow: 0 18px 34px rgba(255, 107, 74, 0.34);
}

.home-guide:hover,
.home-guide:active,
.home-game:hover,
.home-game:active {
    background: #ffffff;
    box-shadow: 0 16px 28px rgba(38, 50, 56, 0.14);
}

.home-side {
    display: grid;
    align-items: end;
    gap: 12px;
    justify-self: end;
    width: min(100%, 460px);
}

.home-scene {
    position: relative;
    min-height: clamp(180px, 28dvh, 270px);
}

.home-scene img {
    position: absolute;
    right: 50%;
    bottom: -4px;
    width: min(72%, 230px);
    transform: translateX(50%);
    filter: drop-shadow(0 22px 24px rgba(42, 61, 76, 0.22));
}

.home-token {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 54px;
    min-height: 54px;
    padding: 0 12px;
    border-radius: 8px;
    background: #ffffff;
    color: #253044;
    font-weight: 900;
    box-shadow: 0 14px 26px rgba(38, 50, 56, 0.14);
}

.token-a {
    top: 18%;
    left: 4%;
    font-size: 2rem;
    background: #ffe36e;
}

.token-b {
    top: 8%;
    right: 5%;
    font-size: 1.9rem;
    background: #97e8d2;
}

.token-c {
    left: 10%;
    bottom: 12%;
    min-width: 92px;
    font-size: 1.55rem;
}

.home-progress {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    width: 100%;
}

.home-progress-main,
.home-continue {
    min-height: 42px;
    padding: 0 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 8px 20px rgba(38, 50, 56, 0.08);
    box-sizing: border-box;
}

.home-progress-main {
    display: flex;
    align-items: center;
    gap: 8px;
}

.home-progress-main span {
    color: #465865;
    font-size: 0.88rem;
    font-weight: 900;
}

.home-progress-main strong {
    color: #253044;
    font-size: 0.98rem;
    font-weight: 900;
}

.home-continue {
    grid-row: span 2;
    align-self: stretch;
    min-width: 122px;
    background: #97e8d2;
}

.home .home-limit-message {
    display: block;
    grid-column: 1 / -1;
    max-width: none;
    color: #253044;
    font-size: 0.94rem;
    font-weight: 900;
    text-align: left;
}

.home .home-limit-message[hidden] {
    display: none;
}

.home-picker {
    display: grid;
    gap: 12px;
    width: 100%;
    padding: 16px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.34);
    box-sizing: border-box;
    box-shadow: 0 12px 32px rgba(38, 50, 56, 0.06);
}

.home-picker-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.home-picker h3 {
    margin: 0;
    color: #253044;
    font-size: clamp(1.25rem, 2vw, 1.6rem);
    line-height: 1;
}

.home-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    padding: 4px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.58);
    box-shadow: 0 8px 20px rgba(38, 50, 56, 0.06);
}

.home-tab {
    min-width: 0;
    min-height: 38px;
    padding: 0 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #465865;
    font: inherit;
    font-size: 0.98rem;
    font-weight: 900;
    cursor: pointer;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-tab.active {
    background: #253044;
    color: #ffffff;
}

.home-game-panel {
    display: grid;
    grid-template-columns: 1.12fr repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.home-game-panel[hidden] {
    display: none;
}

.home-game-panel-compact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.home-game {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    min-height: 76px;
    padding: 12px;
    border: 2px solid rgba(255, 255, 255, 0.78);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.72);
    color: #253044;
    text-align: left;
    text-decoration: none;
    box-shadow: 0 10px 24px rgba(38, 50, 56, 0.08);
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.home-game-feature {
    grid-row: span 2;
    min-height: 162px;
    align-content: center;
}

.home-game-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: #253044;
    color: #ffffff;
    font-size: 1.08rem;
    font-weight: 900;
}

.home-game-text {
    min-width: 0;
    font-size: clamp(0.94rem, 1.2vw, 1.04rem);
    font-weight: 900;
    line-height: 1.1;
}

@media (max-width: 820px) {
    .home {
        width: min(100% - 24px, 720px);
    }

    .home-hero {
        grid-template-columns: 1fr;
        min-height: 0;
        padding: 22px 16px 14px;
    }

    .home-copy {
        width: 100%;
        justify-self: center;
        text-align: center;
    }

    .home h2 {
        margin-inline: auto;
        font-size: clamp(2.25rem, 8vw, 3.35rem);
    }

    .home p {
        max-width: 500px;
        margin-inline: auto;
    }

    .home-actions {
        justify-content: center;
        margin-top: 16px;
    }

    .home-side {
        justify-self: center;
        width: min(100%, 520px);
    }

    .home-scene {
        min-height: 160px;
    }

    .home-scene img {
        width: min(34vw, 150px);
    }

    .home-picker-head {
        display: grid;
        justify-content: center;
        justify-items: center;
        gap: 10px;
    }

    .home-tabs {
        width: min(100%, 360px);
        box-sizing: border-box;
    }

    .home-game-panel {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .home-game-panel-compact {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .home-game-feature {
        grid-row: auto;
        min-height: 76px;
    }
}

@media (max-width: 560px) {
    .game-menu {
        top: 12px;
        right: 10px;
    }

    .menu-button {
        padding: 9px 13px;
    }

    .game.board {
        justify-content: flex-start;
        padding: 18px 0 22px;
    }

    .home {
        width: min(100% - 18px, 520px);
        gap: 10px;
    }

    .home-hero {
        padding: 8px 8px 0;
    }

    .home-kicker {
        display: none;
    }

    .home-age {
        min-height: 34px;
        margin-left: 0;
        padding: 0 12px;
        font-size: 1rem;
    }

    .home h2 {
        max-width: 10ch;
        font-size: clamp(2rem, 9.4vw, 2.95rem);
    }

    .home p {
        display: none;
    }

    .home-start,
    .home-guide {
        min-width: 142px;
        min-height: 48px;
        padding: 0 16px;
    }

    .home-scene {
        min-height: 154px;
    }

    .home-scene img {
        width: min(44vw, 160px);
    }

    .home-token {
        min-width: 46px;
        min-height: 46px;
        padding: 0 10px;
    }

    .token-a {
        left: 6%;
        top: 18px;
    }

    .token-b {
        right: 8%;
        top: 18px;
    }

    .token-c {
        left: 8%;
        bottom: 24px;
        min-width: 76px;
    }

    .home-progress {
        grid-template-columns: 1fr;
        gap: 7px;
    }

    .home-progress-main,
    .home-continue {
        min-height: 36px;
        justify-content: center;
    }

    .home-continue {
        grid-row: auto;
    }

    .home .home-limit-message {
        text-align: center;
        font-size: 0.88rem;
    }

    .home-picker {
        padding: 10px;
    }

    .home-tabs {
        width: 100%;
        box-sizing: border-box;
    }

    .home-tab {
        padding: 0 8px;
        font-size: clamp(0.82rem, 3.6vw, 0.9rem);
    }

    .home-game-panel {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .home-game-panel-compact {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .home-game {
        grid-template-columns: 1fr;
        justify-items: center;
        min-height: 88px;
        gap: 7px;
        padding: 10px 8px;
        text-align: center;
    }

    .home-game-icon {
        width: 42px;
        height: 42px;
        font-size: 0.96rem;
    }

    .home-game-text {
        font-size: 0.86rem;
    }
}
