body {
    background: #0f0a1e;
    color: #f5f7fb;
}

.legal-page {
    min-height: 100vh;
    padding: 100px 20px 80px;
    background:
        linear-gradient(180deg, rgba(15, 10, 30, 0.92), rgba(8, 6, 18, 0.98)),
        url("../img/BG_03.png") center / cover fixed;
}

.legal-container {
    max-width: 980px;
    margin: 0 auto;
    padding: 40px;
    background: rgba(0, 0, 0, 0.72);
    border: 1px solid rgba(255, 215, 0, 0.28);
    border-radius: 8px;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
}

.legal-container h1 {
    color: #ffd700;
    font-size: 34px;
    margin-bottom: 8px;
}

.legal-updated {
    color: #b7c0d8;
    margin-bottom: 28px;
    font-size: 14px;
}

.legal-container h2 {
    color: #ffffff;
    font-size: 22px;
    margin: 30px 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.legal-container p,
.legal-container li {
    color: #d7dce8;
    font-size: 15px;
    line-height: 1.8;
}

.legal-container ul {
    padding-left: 22px;
}

.legal-container a {
    color: #ffd700;
}

.legal-note {
    margin-top: 28px;
    padding: 16px;
    background: rgba(255, 215, 0, 0.08);
    border-left: 4px solid #ffd700;
}

.site-footer {
    margin: 0;
    padding: 34px 24px !important;
    background: #000 !important;
    color: #d7dce8;
    width: 100%;
    box-sizing: border-box;
}

.site-footer .footer-content {
    max-width: 1280px;
    margin: 0 auto;
    display: grid !important;
    grid-template-columns: 240px 1fr 1.1fr;
    gap: 42px;
    align-items: center;
}

.site-footer .footer-brand {
    display: flex;
    align-items: center;
    gap: 16px;
}

.site-footer .footer-logo-image {
    width: 120px;
    height: 120px;
    object-fit: contain;
}

.site-footer .footer-legal {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 28px;
    align-items: start;
}

.site-footer .footer-link {
    display: inline-block !important;
    color: #ffffff;
    text-decoration: none;
    font-size: 28px;
    font-weight: 500;
    white-space: nowrap;
}

.site-footer .footer-link:hover {
    color: #ffd700;
}

.site-footer .footer-meta {
    list-style: none;
    margin: 28px 0 0;
    padding: 0;
    color: #b7c0d8;
    font-size: 12px;
    line-height: 1.8;
}

.site-footer .footer-divider {
    width: 1px;
    min-height: 88px;
    background: rgba(255, 255, 255, 0.35);
}

.site-footer .footer-rating {
    display: grid;
    grid-template-columns: 96px 1fr;
    gap: 28px;
    align-items: center;
}

.site-footer .fu15 {
    width: 92px;
    height: 92px;
    object-fit: contain;
    margin: 0 !important;
}

.site-footer .warning-text {
    color: #9ca8bd;
    font-size: 13px;
    line-height: 2;
}

.site-footer .warning-text ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.lang-nav-item {
    margin-left: 22px !important;
    margin-right: 0 !important;
}

.site-language-select {
    min-width: 132px;
    height: 32px;
    padding: 0 30px 0 10px;
    border: 1px solid rgba(255, 215, 0, 0.56);
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.58);
    color: #ffd700;
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Microsoft YaHei", sans-serif;
    font-size: 14px;
    font-weight: 700;
    outline: none;
}

.site-language-select:focus {
    border-color: #ffffff;
    box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.24);
}

.localized-text {
    display: none;
}

html:not([lang="ja"]) .localized-image-ja {
    display: none !important;
}

html:not([lang="ja"]) .localized-text {
    display: inline-flex;
}

.section-title-text {
    align-items: center;
    justify-content: center;
    min-width: 260px;
    min-height: 64px;
    color: #6d55a8;
    font-size: 44px;
    font-weight: 900;
    line-height: 1.12;
    text-align: center;
    text-shadow:
        2px 0 #fff,
        -2px 0 #fff,
        0 2px #fff,
        0 -2px #fff,
        0 5px 0 rgba(0, 0, 0, 0.12);
}

.hero-slogan-text {
    max-width: 920px;
    margin: -260px auto 0;
    padding: 0 24px;
    color: #ffffff;
    font-size: 54px;
    font-weight: 900;
    line-height: 1.14;
    text-align: center;
    text-shadow:
        0 4px 0 rgba(91, 62, 154, 0.95),
        0 8px 22px rgba(0, 0, 0, 0.58);
}

.start-btn-text-localized {
    align-items: center;
    justify-content: center;
    width: 430px;
    min-height: 94px;
    margin-left: -100px;
    margin-top: -230px;
    border: 5px solid #ffffff;
    border-radius: 22px;
    background: linear-gradient(180deg, #fff176 0%, #ffc11e 52%, #f39600 100%);
    color: #5a3600;
    font-size: 42px;
    font-weight: 900;
    line-height: 1;
    text-align: center;
    text-decoration: none;
    box-shadow:
        0 9px 0 #a75b00,
        0 18px 26px rgba(0, 0, 0, 0.34);
    text-shadow: 0 2px 0 rgba(255, 255, 255, 0.52);
}

.start-btn,
.start-btn:hover,
.start-btn-text-localized {
    text-decoration: none !important;
}

.legal-translation-note {
    margin: -12px 0 24px;
    padding: 12px 14px;
    border-left: 4px solid #ffd700;
    background: rgba(255, 215, 0, 0.08);
    color: #e6ebf7 !important;
}

.mobile-character-name-container,
.mobile-character-text {
    display: none !important;
}

/* Static site layout polish: shared website pages only. */
.navbar {
    min-height: 60px;
    padding: 0 18px;
    backdrop-filter: blur(6px);
}

.nav-items {
    margin-left: 0 !important;
    align-items: center;
    justify-content: center;
    gap: clamp(18px, 4vw, 64px);
}

.nav-item,
.lang-nav-item {
    margin: 0 !important;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    white-space: nowrap;
}

.hero-section {
    min-height: 720px;
}

.logo {
    width: clamp(240px, 28vw, 420px) !important;
    top: 84px !important;
    left: clamp(18px, 4vw, 52px) !important;
}

.biaoyu {
    width: min(680px, 58vw) !important;
    margin: -150px auto 0 !important;
}

.start-btn {
    bottom: clamp(140px, 18vh, 210px) !important;
}

.start-btn img.localized-image-ja {
    width: min(520px, 62vw) !important;
    margin: 0 !important;
}

.download-area {
    left: clamp(18px, 3vw, 40px) !important;
    bottom: clamp(24px, 5vh, 46px) !important;
    transform-origin: left bottom;
}

.announcement-section {
    padding: clamp(42px, 6vw, 72px) 18px !important;
}

.announcement-container {
    max-width: 1120px !important;
    border-radius: 10px !important;
    padding: clamp(20px, 3vw, 34px) !important;
}

.announcement-title,
.characters-title {
    margin-bottom: clamp(22px, 3vw, 34px) !important;
    letter-spacing: 0 !important;
}

.announcement-title .localized-image-ja,
.characters-title .localized-image-ja {
    width: min(330px, 72vw) !important;
    height: auto;
}

.announcement-content {
    display: grid !important;
    grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.1fr);
    gap: 28px;
    align-items: start;
}

.announcement-image {
    width: 100% !important;
    margin: 0 !important;
}

.announcement-main,
.announcement-list {
    width: 100% !important;
    min-width: 0;
}

.announcement-list .announcement-item,
.announcement-item {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    min-height: 54px;
}

.announcement-text,
.site-news-title {
    max-width: none !important;
    min-width: 0;
}

.announcement-date {
    position: static !important;
    transform: none !important;
    width: auto !important;
    min-width: 84px;
    text-align: right;
}

.view-more-btn {
    position: static !important;
    justify-self: end;
    grid-column: 2;
    margin-top: 6px;
}

.characters-section {
    padding: clamp(52px, 7vw, 82px) 18px !important;
}

.site-footer {
    margin-top: 0 !important;
}

.site-footer .footer-content {
    align-items: start;
}

.site-footer .footer-link {
    font-size: clamp(20px, 2vw, 26px);
}

#characterInfo {
    position: absolute !important;
    top: auto !important;
    right: auto !important;
    bottom: -80px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: min(700px, 82vw) !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 18px !important;
    overflow: visible !important;
    color: #fff4a6 !important;
    font-family: "Microsoft YaHei", "Hiragino Sans", "Noto Sans JP", sans-serif !important;
    font-size: clamp(22px, 2.2vw, 34px) !important;
    font-weight: 900 !important;
    line-height: 1.45 !important;
    text-align: center !important;
    text-shadow: 0 3px 8px rgba(0, 0, 0, 0.48) !important;
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: anywhere !important;
    writing-mode: horizontal-tb !important;
    z-index: 12 !important;
}

html[lang="en"] #characterInfo {
    width: min(640px, 78vw) !important;
    font-size: clamp(17px, 1.55vw, 24px) !important;
    line-height: 1.42 !important;
}

html[lang="en"] #characterName {
    width: 90px;
    max-width: 90px;
    font-size: 24px !important;
    line-height: 1.06;
    overflow-wrap: break-word;
}

html[lang="zh-CN"] #characterName,
html[lang="zh-TW"] #characterName {
    width: 150px;
    max-width: 150px;
    font-size: 34px !important;
    line-height: 1.1;
    overflow-wrap: break-word;
}

@media (max-width: 1024px) {
    .legal-container {
        padding: 26px 20px;
    }

    .navbar {
        height: auto;
        min-height: 60px;
        padding: 8px 6px;
        overflow: hidden;
    }

    .nav-items {
        flex-wrap: nowrap;
        justify-content: center;
        margin-left: 0 !important;
        gap: 8px !important;
        row-gap: 8px;
    }

    .nav-item,
    .lang-nav-item {
        margin: 0 7px !important;
    }

    .nav-link {
        min-height: 34px;
        font-size: 14px !important;
    }

    .hero-section {
        min-height: 680px;
    }

    .logo {
        top: 76px !important;
        width: min(230px, 58vw) !important;
    }

    .biaoyu {
        width: min(360px, 86vw) !important;
        margin-top: -80px !important;
    }

    .start-btn {
        bottom: 190px !important;
        width: min(288px, calc(100vw - 48px));
    }

    .start-btn img.localized-image-ja {
        width: min(330px, 82vw) !important;
    }

    .download-area {
        width: min(300px, calc(100vw - 32px)) !important;
        height: 106px !important;
        padding: 13px !important;
        gap: 10px !important;
    }

    .qr-code-container {
        margin-left: 22px !important;
    }

    .qr-code {
        width: 78px !important;
        height: 78px !important;
    }

    .download-btn img {
        width: 132px !important;
    }

    .site-language-select {
        height: 28px;
        min-width: 88px;
        max-width: 96px;
        padding: 0 16px 0 6px;
        font-size: 11px;
    }

    .section-title-text {
        min-width: 190px;
        min-height: 48px;
        font-size: 30px;
    }

    #characterInfo {
        bottom: -165px !important;
        right: auto !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        width: min(312px, calc(100vw - 72px)) !important;
        max-width: 312px !important;
        margin: 0 !important;
        padding: 0 10px !important;
        font-size: clamp(18px, 5vw, 26px) !important;
        line-height: 1.42 !important;
    }

    html[lang="en"] #characterInfo {
        width: min(312px, calc(100vw - 72px)) !important;
        max-width: 312px !important;
        font-size: clamp(14px, 3.6vw, 17px) !important;
        line-height: 1.36 !important;
    }

    .mobile-avatar-grid {
        margin-top: 150px !important;
    }

    .hero-slogan-text {
        display: block !important;
        max-width: min(340px, calc(100vw - 36px));
        width: min(340px, calc(100vw - 36px));
        margin-top: -160px;
        font-size: 24px;
        line-height: 1.2;
        white-space: normal !important;
        overflow-wrap: break-word;
    }

    .start-btn {
        left: 50% !important;
        right: auto !important;
        width: min(300px, calc(100vw - 48px));
        display: flex;
        justify-content: center;
        transform: translateX(-50%) !important;
    }

    .start-btn-text-localized {
        width: 100%;
        min-height: 58px;
        margin-left: 0;
        margin-top: 0 !important;
        font-size: 24px;
        border-width: 4px;
        box-shadow:
            0 6px 0 #a75b00,
            0 12px 18px rgba(0, 0, 0, 0.32);
    }

    .announcement-section {
        min-height: auto !important;
        padding: 82px 0 40px !important;
    }

    .announcement-container {
        width: calc(100% - 24px) !important;
        max-width: none !important;
        margin: 0 auto !important;
        padding: 20px 14px !important;
        border-radius: 10px !important;
        min-height: 0 !important;
    }

    .announcement-title {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 10px !important;
        margin-bottom: 18px !important;
        line-height: 1.1 !important;
    }

    .announcement-title .xx1,
    .announcement-title .xx2 {
        position: static !important;
        top: auto !important;
        left: auto !important;
        margin: 0 !important;
        font-size: 34px !important;
    }

    .announcement-title .section-title-text {
        min-width: 0 !important;
        margin: 0 !important;
    }

    .announcement-content {
        display: block !important;
        position: relative !important;
    }

    .announcement-image {
        display: block !important;
        visibility: visible !important;
        width: 100% !important;
        height: auto !important;
        margin: 0 0 18px !important;
        overflow: hidden !important;
        position: relative !important;
        border-radius: 8px !important;
    }

    .announcement-image img,
    .announcement-image img.pic {
        display: block !important;
        visibility: visible !important;
        position: static !important;
        z-index: auto !important;
        opacity: 1 !important;
        width: 100% !important;
        height: auto !important;
        max-height: 220px !important;
        object-fit: cover !important;
    }

    .announcement-main,
    .announcement-list {
        width: 100% !important;
        margin: 0 !important;
        min-height: 0 !important;
    }

    .announcement-list .announcement-item,
    .announcement-item {
        display: flex !important;
        align-items: flex-start !important;
        gap: 12px !important;
        margin: 0 !important;
        padding: 12px 0 !important;
    }

    .announcement-text {
        display: block !important;
        flex: 1 1 auto !important;
        max-width: none !important;
        white-space: normal !important;
        line-height: 1.45 !important;
    }

    .announcement-date {
        position: static !important;
        transform: none !important;
        width: auto !important;
        min-width: 72px !important;
        margin-left: auto !important;
        text-align: right !important;
        white-space: nowrap !important;
    }

    .view-more-btn {
        position: static !important;
        display: block !important;
        width: auto !important;
        height: auto !important;
        min-height: 40px !important;
        margin: 18px auto 0 !important;
        padding: 9px 24px !important;
        line-height: 1.2 !important;
    }

    .characters-section {
        min-height: auto !important;
        height: auto !important;
    }

    .character-display {
        display: block !important;
        height: 520px !important;
        overflow: visible !important;
    }

    .character-stage {
        display: block !important;
        position: relative !important;
        width: 100% !important;
        height: 520px !important;
        margin: 0 auto !important;
        overflow: visible !important;
    }

    .character-image {
        top: 88px !important;
        bottom: auto !important;
        left: 50% !important;
        width: min(230px, 66vw) !important;
        height: 260px !important;
        transform: translateX(-50%) !important;
    }

    .character-glow {
        width: 340px !important;
        height: 340px !important;
        top: 220px !important;
    }

    [id^="avatarContainer"] {
        display: none !important;
    }

    .character-stage div[onclick],
    .character-stage div[style*="font-size: 120px"] {
        display: none !important;
    }

    .characters-section div[onclick][style*="font-size"] {
        display: none !important;
    }

    .character-stage > div:first-of-type > div[style*="position: relative"] {
        display: flex !important;
        position: absolute !important;
        top: 330px !important;
        left: 50% !important;
        width: 100% !important;
        margin-left: 0 !important;
        transform: translateX(-50%) !important;
        justify-content: center !important;
        z-index: 20 !important;
    }

    .bo {
        display: none !important;
    }

    #characterName {
        position: static !important;
        width: auto !important;
        max-width: calc(100vw - 48px) !important;
        padding: 4px 14px !important;
        border-radius: 999px;
        background: rgba(255, 215, 0, 0.9);
        color: #261400 !important;
        font-size: clamp(24px, 7vw, 32px) !important;
        line-height: 1.2 !important;
        text-shadow: none !important;
        transform: none !important;
        overflow-wrap: anywhere;
    }

    #characterInfo {
        bottom: 8px !important;
        left: 16px !important;
        right: 16px !important;
        width: auto !important;
        max-width: none !important;
        transform: none !important;
        padding: 12px 14px !important;
        border-radius: 8px;
        background: rgba(12, 8, 24, 0.72);
        color: #fff5bb !important;
        font-size: clamp(15px, 4vw, 18px) !important;
        line-height: 1.5 !important;
        text-align: left !important;
    }

    .mobile-avatar-grid {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px !important;
        width: min(220px, calc(100vw - 72px)) !important;
        margin: 18px auto 28px !important;
        padding: 0 !important;
        position: relative !important;
        transform: none !important;
    }

    .mobile-avatar-grid .avatar-item {
        width: auto !important;
        height: auto !important;
        min-width: 0;
        aspect-ratio: 1;
        padding-bottom: 0 !important;
    }

    .site-footer .footer-content {
        grid-template-columns: 1fr !important;
        gap: 24px;
        text-align: center;
        max-width: 520px !important;
    }

    .site-footer .footer-brand {
        justify-content: center;
    }

    .site-footer .footer-legal {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .site-footer .footer-divider {
        width: 100%;
        min-height: 1px;
    }

    .site-footer .footer-rating {
        grid-template-columns: 1fr;
        gap: 16px;
        justify-items: center;
    }
}

@media (max-width: 480px) {
    .navbar {
        padding: 0 6px !important;
        overflow: hidden;
    }

    .nav-items {
        width: 100%;
        gap: 6px !important;
        flex-wrap: nowrap !important;
    }

    .nav-item,
    .lang-nav-item {
        margin: 0 !important;
    }

    .nav-link {
        min-height: 34px;
        font-size: 13px !important;
    }

    .site-language-select {
        min-width: 82px;
        max-width: 88px;
        height: 28px;
        font-size: 11px;
        padding: 0 16px 0 6px;
    }

    .hero-section {
        height: auto !important;
        min-height: 640px;
    }

    .hero-slogan-text {
        display: block !important;
        max-width: min(320px, calc(100vw - 32px));
        width: min(320px, calc(100vw - 32px));
        padding: 0;
        font-size: 24px;
        line-height: 1.18;
        white-space: normal !important;
        overflow-wrap: break-word;
    }

    .start-btn {
        left: 50% !important;
        right: auto !important;
        width: min(288px, calc(100vw - 48px));
        bottom: 154px !important;
        transform: translateX(-50%) !important;
    }

    .start-btn-text-localized {
        width: 100%;
        min-height: 58px;
        font-size: 24px;
        box-shadow:
            0 6px 0 #a75b00,
            0 12px 18px rgba(0, 0, 0, 0.32);
    }

    .hero-bg {
        object-position: 69% center !important;
    }

    .download-area {
        left: 50% !important;
        transform: translateX(-50%) scale(0.92);
    }

    .site-news-tabs {
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 12px 18px !important;
        overflow-x: visible !important;
    }

    .site-news-tab {
        font-size: 22px !important;
    }

    .site-footer .footer-meta,
    .site-footer .warning-text {
        overflow-wrap: anywhere;
    }

    .announcement-title {
        gap: 6px !important;
    }

    .announcement-title .xx1,
    .announcement-title .xx2 {
        font-size: 28px !important;
    }

    .announcement-title .section-title-text {
        font-size: 26px !important;
    }

    .site-footer {
        padding: 28px 18px !important;
    }

    .site-footer .footer-link {
        font-size: 20px !important;
    }
}
