@charset "UTF-8";

* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial;
    background: #f5f7fb;
    margin: 0;
    padding: 0;
}

.splash {
    min-height: 100svh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f3f4f7;
}

.splash-inner {
    display: flex;
    justify-content: center;
    align-items: center;
}

.splash-characters {
    width: 300px;
    animation: float 2s ease-in-out infinite;
}

@keyframes float {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-6px);
    }

    100% {
        transform: translateY(0);
    }
}

/* 文章の改行 */
#typing .line {
    white-space: pre-line;
}

.intro {
    position: relative;
    min-height: 100svh;
    overflow: hidden;
}

.intro-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

.intro-bg img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.intro-character {
    position: relative;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    overflow: hidden;
}

.intro-character img {
    height: 100svh;
    width: auto;

}

.intro-text {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    margin: 0 auto 0;
    z-index: 2;
    width: calc(100% - 20px);
    max-width: 90vw;
    height: 300px;
    overflow: hidden;
    padding: 0 40px 24px;

    background: linear-gradient(to bottom,
            rgba(42, 61, 88, 0.78),
            rgba(73, 69, 178, 0.68));
    border: 1px solid rgba(255, 255, 255, 0.75);
    border-radius: 28px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.14);

    font-size: 28px;
    line-height: 1.7;
    text-align: center;
    color: #e7e7e7;
}

.intro-text::before {
    content: "";
    position: absolute;
    top: 6px;
    left: 12px;
    right: 12px;
    bottom: 12px;
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 20px;
    pointer-events: none;
    margin-top: 50px;
}


.intro-name {
    margin: 0;
    padding-top: 8px;
    font-size: 34px;
    font-weight: 700;
    text-align: left;
}

.intro-menu {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 24px;
    display: flex;
    justify-content: center;
    gap: 16px;

    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.intro-menu.is-show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

@keyframes kanataFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


.intro-head {
    display: flex;
    align-items: center;
    gap: 16px;
}

.intro-head>button,
.intro-head>a {
    margin-left: auto;
}

.intro-head>button+a,
.intro-head>a+a {
    margin-left: 8px;
}

.user-btn {
    min-width: 116px;
    height: 40px;
    padding: 0 16px;
    border: 1px solid rgba(255, 255, 255, 0.32);
    border-radius: 12px;
    background: linear-gradient(180deg,
            rgba(255, 255, 255, 0.18) 0%,
            rgba(210, 225, 255, 0.10) 100%);
    color: #eef7ff;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.06) inset,
        0 6px 16px rgba(20, 40, 90, 0.12);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.user-btn:hover {
    background: linear-gradient(180deg,
            rgba(255, 255, 255, 0.24) 0%,
            rgba(220, 235, 255, 0.14) 100%);
    border-color: rgba(255, 255, 255, 0.48);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.10) inset,
        0 8px 20px rgba(20, 40, 90, 0.18);
}

.user-btn:active {
    transform: scale(0.98);
}

/* intro画面ボタン仕様 */
.menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 180px;
    height: 56px;
    padding: 0 24px;
    border-radius: 999px;

    font-size: 16px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;

    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.38);

    transition: all 0.2s ease;
}


.menu-btn.primary {
    background: #ffffff;
    color: #2a3d5f;
    border: 1px solid rgba(255, 255, 255, 0.92);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
    font-weight: 700;
}

.menu-btn:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.22);
}

.menu-btn.primary:hover {
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

.race-btn {
    min-width: 116px;
    height: 40px;
    padding: 0 16px;
    border: 1px solid rgba(173, 216, 255, 0.45);
    border-radius: 12px;
    background: linear-gradient(180deg,
            rgba(112, 152, 255, 0.28) 0%,
            rgba(66, 110, 220, 0.20) 100%);
    color: #dff4ff;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.08) inset,
        0 6px 16px rgba(20, 40, 90, 0.18);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.race-btn:hover {
    background: linear-gradient(180deg,
            rgba(130, 170, 255, 0.34) 0%,
            rgba(78, 124, 235, 0.26) 100%);
    border-color: rgba(200, 232, 255, 0.7);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.12) inset,
        0 8px 20px rgba(20, 40, 90, 0.24);
}

.race-btn:active {
    transform: scale(0.98);
}

.race-info {
    position: absolute;
    top: 20px;
    right: 0px;
    left: auto;
    /* ←顔の横に寄せる */

    z-index: 5;
    width: 350px;

    text-align: left;
    max-width: 90vw;
    /* ←デカくする */
    padding: 0;

    border-radius: 18px 0 0 18px;

    background: linear-gradient(145deg,
            rgba(20, 30, 80, 0.9),
            rgba(70, 110, 220, 0.6));

    border: 2px solid rgba(255, 255, 255, 0.4);

    box-shadow:
        0 0 10px rgba(100, 150, 255, 0.25),
        0 0 20px rgba(80, 120, 255, 0.2),
        inset 0 0 6px rgba(255, 255, 255, 0.12);

    backdrop-filter: blur(6px);

    color: #fff;
}



.race-title {
    font-size: 16px;
    opacity: 0.85;
    margin: 8px 16px;
}

.race-days {
    margin-left: 16px;
    font-size: 42px;
    font-weight: 700;
    color: #9fe4ff;
    text-shadow:
        0 0 20px rgba(80, 160, 255, 0.8),
        0 0 40px rgba(80, 160, 255, 0.6);
}

.race-info::before {
    content: "";
    position: absolute;
    top: 6px;
    left: 6px;
    bottom: 6px;
    right: 0;
    border-radius: 18px 0 0 18px;
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.race-info::after {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: 18px 0 0 18px;
    border: 1px solid rgba(120, 180, 255, 0.4);
}

/* 大会登録ページ */
.race-page {
    margin: 0;
    min-height: 100svh;
    font-family: sans-serif;
    background: linear-gradient(to bottom,
            #eaf5ff 0%,
            #d7eaf8 100%);
}

.race-wrap {
    max-width: 900px;
    min-height: 100svh;
    margin: 0 auto;
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.race-panel {
    width: 600px;
    padding: 48px;
    display: flex;
    align-items: center;
    justify-content: center;

    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(160, 190, 215, 0.55);
    border-radius: 28px;
    box-shadow: 0 18px 45px rgba(60, 90, 120, 0.14);
}

.race_title {
    font-size: 18px;
    color: #70879d;
    letter-spacing: 0.06em;
}

.race-form-area {
    width: 380px;
}

.race-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.race-form input {
    height: 52px;
    padding: 0 16px;
    border: 1px solid #bfd4e6;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.78);
    color: #26384a;
    font-size: 16px;
    outline: none;
}

.race-form input::placeholder {
    color: #8aa1b5;
}

.race-form button {
    height: 52px;
    border: none;
    border-radius: 14px;
    background: #58aeea;
    color: #ffffff;
    font-size: 16px;
    cursor: pointer;
}

.race-character {
    width: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.race-char-title {
    margin: 0 0 8px;
    font-size: 16px;
    font-weight: 700;
    color: #26384a;
    opacity: 0.45;
}

.race-character img {
    width: 210px;
    display: block;
    opacity: 0.45;
}


/* ===== PC 会話エリア調整 ===== */
#talkArea {
    position: absolute;
    left: 50%;
    bottom: 28px;
    transform: translateX(-50%);
    width: calc(100% - 64px);
    min-height: 150px;

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

    text-align: center;
    z-index: 2;
}

#talkSelect,
#talkChoices {
    width: 100%;
    text-align: center;
}

.topic,
.choice {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 180px;
    height: 56px;
    margin: 0 8px;
    padding: 0 24px;

    border: 1px solid rgba(255, 255, 255, 0.34);
    border-radius: 999px;
    background: linear-gradient(180deg,
            rgba(255, 255, 255, 0.18) 0%,
            rgba(195, 220, 255, 0.10) 100%);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.06) inset,
        0 10px 24px rgba(20, 40, 90, 0.16);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);

    color: #f4fbff;
    font-size: 17px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;

    transition:
        transform 0.2s ease,
        background 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.topic:hover,
.choice:hover {
    transform: translateY(-2px);
    background: linear-gradient(180deg,
            rgba(255, 255, 255, 0.24) 0%,
            rgba(210, 230, 255, 0.14) 100%);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.10) inset,
        0 14px 28px rgba(20, 40, 90, 0.20);
}

.topic:active,
.choice:active {
    transform: scale(0.98);
}

/* 質問 */
.talk-question {
    margin: 0 0 48px;
    font-size: 28px;
    line-height: 1.6;
    color: #eef7ff;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.22);
}

/* 横並び調整 */
.intro-head {
    display: flex;
    align-items: center;
    gap: 8px;
}

.intro-head>button,
.intro-head>a {
    min-width: 132px;
    height: 40px;
}

#talkBtn {
    min-width: 132px;
    height: 40px;
    padding: 0 18px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 999px;
    background: rgba(70, 120, 255, 0.22);
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

#talkBtn:hover {
    background: rgba(70, 120, 255, 0.32);
    border-color: rgba(255, 255, 255, 0.5);
}

#talkBtn.active {
    background: #4da3ff;
    color: #fff;
    border: 1px solid #4da3ff;
    transform: scale(0.98);
}

#talkBtn::after {
    content: "";
    position: absolute;
    right: 10px;
    font-size: 14px;
    transition: 0.2s ease;
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(173, 216, 255, 0.45);
    border-radius: 12px;
    background: linear-gradient(180deg,
            rgba(112, 152, 255, 0.28) 0%,
            rgba(66, 110, 220, 0.20) 100%);
    color: #dff4ff;
    font-size: 22px;
    line-height: 1;
    text-align: center;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.08) inset,
        0 6px 16px rgba(20, 40, 90, 0.18);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

/* -------------------------------------------------- */

h1 {
    font-size: 28px;
    letter-spacing: 0.1em;
}

p {
    line-height: 1.7;
    margin: 0;
}

strong {
    font-weight: 600;
}

a {
    display: inline-block;

    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
}

/* 中央カード */
.container {
    width: 100%;
    padding: 24px 16px;
    background: #ffffff;

    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.story-box {
    background: #f0f3f8;
    padding: 16px;
    border-radius: 10px;
    margin-top: 10px;
}

.page {
    width: 100%;
    max-width: 720px;
    background: #fff;
    border: 1px solid #dbe3ec;
    border-radius: 16px;
    padding: 32px 24px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    margin: 0 auto;
}

.time-note {
    display: block;
    margin-top: 4px;
    font-size: 14px;
    color: #888;
}

.form {
    display: grid;
    gap: 20px;
}

.form__group {
    display: grid;
    gap: 8px;
}

.form__label {
    color: #111;
    font-weight: 700;
}

input[type="time"] {
    width: 100%;
}

.form__input,
.form__select,
textarea.form_input {
    display: block;
    width: 100%;
    padding: 10px 12px;

    border: 1px solid #cfd8e3;
    border-radius: 8px;
    background: #fff;

    font-size: 16px;
    color: #222;
}

.form__input:focus,
.form__select:focus {
    outline: none;
    border-color: #60a5fa;
    box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.15);
}




.talk-overlay,
.menu-overlay {
    position: fixed;
    inset: 0;
    opacity: 0;
    pointer-events: none;
}


/* index画面-------------------------------------- */
/* はじめに戻る（弱いリンク） */
.back-intro {
    display: block;
    margin-top: 16px;
    font-size: 12px;
    color: #888;
    text-align: center;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 180px;
    height: 56px;
    padding: 0 24px;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s ease;
}

.button-group {
    display: flex;
    gap: 12px;
}

.button-group .button {
    flex: 1;
    width: auto;
}

.button--main {
    color: #1e3a8a;
    border: 1px solid #93c5fd;
    background: linear-gradient(180deg, #ffffff 0%, #eaf2ff 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        0 3px 0 #bfd7ff,
        0 6px 12px rgba(59, 130, 246, 0.12);
}

.button--sub {
    color: #ffffff;
    border: 1px solid #2563eb;
    background: linear-gradient(180deg, #4f8cff 0%, #3b6eea 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        0 3px 0 #1e40af,
        0 6px 12px rgba(37, 99, 235, 0.18);
}

.button--main:hover,
.button--sub:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
}

.button--main:active,
.button--sub:active {
    transform: translateY(3px);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.25),
        0 1px 0 rgba(0, 0, 0, 0.08);
}

/* 時間制御 */
.drum-btn {
    width: 58px;
    height: 32px;
    border: 1px solid #cfd6df;
    border-radius: 8px;
    background: #f5f7fb;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.drum-btn:active {
    background: #e2e8f0;
}


.time-unit {
    font-size: 12px;
    color: #888;
}

.time-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.time-box {
    width: 80px;
    height: 56px;
    border: 1px solid #cfd6df;
    border-radius: 12px;
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    outline: none;
    user-select: text;
    /* iOS対応 */
}

.time-box:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.15);
}

.time-colon {
    font-size: 32px;
    padding-bottom: 20px;
}

/* result画面 */
.result-character {
    width: 100%;
    display: flex;
    justify-content: center;
}

.result-character img {
    width: 450px;
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.result {
    display: grid;
    gap: 18px;
}

.result__item {
    margin: 0;
    font-size: 1.05rem;
}

.result__label {
    font-weight: 700;
    margin-right: 8px;
}

.result__story {
    margin: 0;
    padding: 20px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    white-space: pre-line;
}

/* ボタン位置 */
.result-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 24px;
}

/* テキストリンク */
.text-link {
    display: block;
    margin-top: 16px;
    text-align: center;
    color: #4A90E2;
    font-weight: 600;
    text-decoration: none;
    transition: 0.2s;
}

.text-link:hover {
    opacity: 0.7;
}

.result-summary {
    background: #ffffff;
    border-radius: 16px;
    padding: 16px 18px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    border: 1px solid #e5e7eb;
}

/* 小説ページ------------------------------ */
.novel-page {
    min-height: 100svh;
    background: #1f1b17;
    display: flex;
    justify-content: center;
    align-items: center;
}

.novel-box {
    width: 100%;
    max-width: 420px;
    padding: 36px 28px;

    background: #e4d7bd;

    border: 1px solid #b59b6a;
    border-radius: 2px;

    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.novel-paragraph {
    color: #3e3120;
    line-height: 2;
    text-align: left;
    letter-spacing: 0.03em;
}

.novel-box::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 15% 20%, rgba(120, 80, 30, 0.10), transparent 18%),
        radial-gradient(circle at 85% 75%, rgba(100, 70, 25, 0.08), transparent 20%),
        radial-gradient(circle at 50% 100%, rgba(70, 45, 15, 0.06), transparent 30%);
    opacity: 0.9;
}

.novel-title {
    color: #4b3a22;
}

.novel-page-btn.is-current {
    background: #5e4523;
    color: #f3e7cf;
}

.novel-back {
    position: fixed;
    right: 40px;
    bottom: 40px;
    display: inline-block;
    padding: 12px 18px;
    border-radius: 9999px;
    background: #b19268;
    color: #25211b;
    text-decoration: none;
    font-weight: 600;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

.novel-menu {
    margin-bottom: 24px;
}

.novel-menu summary {
    list-style: none;
}

.novel-menu summary::-webkit-details-marker {
    display: none;
}

.novel-open {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 180px;
    height: 52px;
    padding: 0 20px;
    margin-bottom: 20px;
    border: none;
    border-radius: 999px;
    background: #9b773e;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
}

.novel-drawer {
    position: fixed;
    inset: 0;
    display: none;
    background: rgba(0, 0, 0, 0.28);
    z-index: 100;
}

.novel-drawer.is-open {
    display: block;
}

.novel-drawer-inner {
    position: absolute;
    top: 0;
    right: 0;
    width: min(360px, 88vw);
    height: 100%;
    padding: 72px 20px 24px;
    background: #efe3c7;
    box-shadow: -8px 0 24px rgba(0, 0, 0, 0.18);
    overflow-y: auto;
}

.novel-drawer-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 999px;
    background: #9b773e;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
}

/* ナビ */
.novel-nav {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

/* ボタン共通 */
.novel-page-btn {
    display: flex;
    align-items: center;
    justify-content: center;

    min-height: 44px;
    /* 指で押せるサイズ */
    padding: 10px 12px;

    border-radius: 9999px;
    background: #7a5d32;
    color: #f3e7cf;
    text-decoration: none;
}

/* 最新話だけ横いっぱい */
.latest-btn {
    grid-column: 1 / -1;
}

.novel-current {
    display: inline-block;
    margin: 16px 0 24px;
    padding: 8px 16px;
    border-left: 4px solid #8b6732;
    background: rgba(139, 103, 50, 0.12);
    color: #4b3a22;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.novel-top {
    position: fixed;
    right: 40px;
    bottom: 110px;
    letter-spacing: 0.03em;
    display: inline-block;
    padding: 12px 18px;
    border-radius: 9999px;

    background: #8b6732;
    color: #f3e7cf;
    text-decoration: none;
    font-weight: 700;

}

/* log--------------------------------------------------- */
.divider {
    border: none;
    border-top: 1px solid #e5e7eb;
    margin: 16px 0;
}

.pb-card {
    margin: 12px 0 24px;
    padding: 16px 18px;
    border-radius: 16px;
    background: linear-gradient(135deg, #f8fbff 0%, #eef4ff 100%);
    border: 1px solid #dbe7ff;
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.08);
}

.pb-card .result__item {
    margin: 0;
}


.pb-card {
    position: relative;
    margin: 16px 0 24px;
    padding: 16px 18px 16px 18px;
    border-radius: 14px;
    background: linear-gradient(135deg, #eef4ff 0%, #f8fbff 100%);
    border: 1px solid #dbe7ff;
}

/* 左のアクセントライン */
.pb-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 10px;
    bottom: 10px;
    width: 4px;
    border-radius: 4px;
    background: linear-gradient(180deg, #2563eb, #60a5fa);
}

/* PBテキスト強調 */
.pb-card .result__item {
    font-weight: 700;
    font-size: 16px;
    letter-spacing: 0.5px;
}

/* 見出し強化 */
.pb-title {
    position: relative;
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    background: #2563eb;
    color: #fff;
    font-size: 14px;
    margin-bottom: 10px;
}

.stats-card {
    display: flex;
    align-items: center;
    gap: 20px;

    margin: 12px 0 24px;
    padding: 20px 24px;
    border-radius: 16px;
    background: linear-gradient(135deg, #eef4ff 0%, #f8fbff 100%);
    border: 1px solid #dbe7ff;
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.08);
}

.stats-card__text {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.stats-card__text .result__item {
    margin: 0;
}

.stats-card__text .result__item+.result__item {
    margin-top: 12px;
}

.stats-card {
    position: relative;
    overflow: hidden;
}

/* 画像を背景的に配置 */
.stats-card__image {
    position: absolute;
    right: 36px;
    bottom: 16px;
    opacity: 0.3;
    /* ←重要：薄くする */
}

.stats-card__image img {
    width: 160px;
    margin-bottom: -8px;
}

.record-actions {
    display: flex;
    flex-direction: column;
    /* ← これ追加 */
    align-items: flex-start;
    /* 左揃え */
    gap: 8px;
}

.action-form {
    margin: 0;
}

.action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 88px;
    height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}

.action-button:active {
    transform: translateY(1px);
}

.action-button--edit {
    color: #2563eb;
    background: #ffffff;
    border: 1px solid #bfdbfe;
}

.action-button--delete {
    background: #fff;
    color: #e53935;
    border: 1px solid #e53935;
}

/* 入力に戻る */
.back-fixed {
    position: fixed;
    right: 24px;
    bottom: 24px;
    display: inline-block;
    padding: 12px 18px;
    border-radius: 999px;
    background: #2563eb;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.back-fixed:hover {
    opacity: 0.9;
}

.meter {
    position: relative;
    height: 16px;
    border-radius: 999px;
    background: rgba(58, 123, 255, 0.08);
    margin-top: 16px;
    margin-bottom: 8px;
    overflow: hidden;
}

.pb-note {
    margin: 8px 0 12px;
    font-size: 14px;
    color: #666;
}

.pb-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pb-title {
    margin: 0;
}

.pb-note {
    font-size: 13px;
    color: #777;
}

/* バー */
.meter-bar {
    height: 100%;
    background: linear-gradient(90deg, #6fa8ff, #3a7bff);
}

/* 上のテキスト */
.meter-text {
    position: absolute;
    left: 50%;
    bottom: 40px;
    transform: translateX(-50%);
    font-size: 20px;
    font-weight: 700;
    color: rgba(42, 61, 95, 0.32);
    white-space: nowrap;
    pointer-events: none;
}

/* 目盛り（数字） */
.meter-scale {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    font-size: 10px;
    color: rgba(42, 61, 95, 0.45);
}

.pb-item {
    display: flex;
    justify-content: space-between;
}

.result_item {
    margin-top: 8px;
    font-weight: 500;
}

.color-0 {
    background: linear-gradient(90deg, #6fa8ff, #3a7bff);
}

/* 青 */
.color-1 {
    background: linear-gradient(90deg, #f6d365, #fda085);
}

/* 金 */
.color-2 {
    background: linear-gradient(90deg, #ff6a6a, #ff3b3b);
}

/* 赤 */
.color-3 {
    background: linear-gradient(90deg, #b388ff, #7c4dff);
}

/* 紫 */
.color-4 {
    background: linear-gradient(90deg, #66bb6a, #2e7d32);
}

/* 緑 */

.meter-normal {
    transition: 0.3s;
}

.meter-strong {
    box-shadow: 0 0 10px rgba(111, 168, 255, 0.35);
}

.meter-boss {
    box-shadow: 0 0 16px rgba(255, 80, 80, 0.45);
}

.meter-legend {
    box-shadow: 0 0 28px rgba(255, 215, 0, 0.9);
    animation: pulse 1s infinite;
}

.meter-strong .meter-bar {
    filter: brightness(1.05);
}

.meter-boss .meter-bar {
    filter: brightness(1.12) saturate(1.1);
}

.meter-legend .meter-bar {
    filter: brightness(1.2) saturate(1.15);
}

@keyframes pulse {
    0% {
        filter: brightness(1);
    }

    50% {
        filter: brightness(1.4);
    }

    100% {
        filter: brightness(1);
    }
}

.title-soldier {
    color: #5f6f8a;
}

.title-squad {
    color: #4f7aa3;
}

.title-100 {
    color: #3a7bff;
}

.title-200 {
    color: #2f9e8f;
}

.title-300 {
    color: #3c9a5f;
}

.title-500 {
    color: #c58a1c;
    font-weight: 600;
}

.title-1000 {
    color: #d96c2f;
    font-weight: 600;
}

.title-3000 {
    color: #c94a4a;
    font-weight: 700;
}

.title-5000 {
    color: #9b59b6;
    font-weight: 700;
}

.title-general {
    color: #3a7bff;
    font-weight: 700;
}

.title-great {
    color: #f0b90b;
    text-shadow: 0 0 6px rgba(240, 185, 11, 0.35);
    font-weight: 700;
}

.title-legend {
    color: #ff3b3b;
    text-shadow: 0 0 6px rgba(255, 59, 59, 0.45);
    font-weight: 700;
}

/* ----------------------------------------------------- */
.edit-page {
    width: calc(100% - 32px);
    margin: 8px auto 16px;
    max-width: 760px;
    padding: 32px;
    background: #fff;
    border: 1px solid #dbe3ec;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.form_group {
    display: grid;
    gap: 8px;
}

.form_input,
.form_select {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid #cfd8e3;
    border-radius: 8px;
    background: #fff;
    font-size: 16px;
}

.form_select,
.form__select {
    color: #222;
}

textarea.form_input {
    resize: vertical;
}

.back-link {
    display: flex;
    justify-content: center;
    margin-top: 24px;
}


.name-page {
    min-height: 100svh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: linear-gradient(180deg, #eef3ff 0%, #e6ecfb 100%);
}

.name-card {
    width: min(100%, 480px);
    padding: 40px 32px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 24px;
    box-shadow: 0 16px 40px rgba(42, 61, 95, 0.12);
}

.name-title {
    margin: 0;
    font-size: 32px;
    font-weight: 700;
    color: #2a3d5f;
    text-align: center;
}

.name-lead {
    margin: 12px 0 0;
    font-size: 15px;
    line-height: 1.7;
    color: #5f6f8a;
    text-align: center;
}

.name-form {
    margin-top: 28px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.name-input {
    width: 100%;
    height: 56px;
    padding: 0 16px;
    border: 1px solid rgba(42, 61, 95, 0.18);
    border-radius: 14px;
    background: #ffffff;
    font-size: 16px;
    color: #2a3d5f;
    outline: none;
    box-sizing: border-box;
}

.name-input:focus {
    border-color: rgba(58, 123, 255, 0.7);
    box-shadow: 0 0 0 4px rgba(58, 123, 255, 0.12);
}

.name-submit {
    width: 100%;
    height: 56px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, #6fa8ff, #3a7bff);
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.name-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(58, 123, 255, 0.24);
}

/* スマホ */
@media screen and (max-width: 767px) {

    .name-page {
        padding: 16px;
    }

    .name-card {
        padding: 32px 20px;
        border-radius: 20px;
    }

    .name-title {
        font-size: 28px;
    }


    /* intro画面---------------------------------- */
    .intro {
        position: relative;
    }

    .intro-character {
        position: absolute;
        bottom: 0;
        left: 0;
    }

    .intro-character img {
        height: 86vh;
        transform: translateX(20px);
    }

    .intro-bg img {
        position: absolute;
        top: 0;
        left: 50%;
        transform: translateX(-58%);
        display: block;
        width: auto;
        height: 100%;
        min-width: 100%;
        max-width: none;
    }

    .intro-text {
        position: absolute;
        left: 16px;
        right: 16px;
        bottom: 16px;
        height: 240px;
        padding: 0 16px 16px;
        margin: 0;
        z-index: 2;
        overflow: hidden;
        font-size: 20px;
        line-height: 1.6;
    }

    .intro-text::before {
        top: 8px;
        left: 8px;
        right: 8px;
        bottom: 8px;
    }

    .intro-name {
        padding-top: 16px;
        font-size: 24px;
    }



    .menu-btn {
        width: 150px;
        min-width: 150px;
        font-size: 16px;
        height: 48px;
        padding: 0 6px;
    }

    .race-title {
        font-size: 16px;
        opacity: 0.85;
        margin: 8px 16px;
    }

    .race-days {
        margin-left: 16px;
        font-size: 36px;
        font-weight: 700;
        color: #9fe4ff;
        text-shadow:
            0 0 20px rgba(80, 160, 255, 0.8),
            0 0 40px rgba(80, 160, 255, 0.6);
    }

    .race-info {
        position: fixed;
        top: 6px;
        left: 16px;
        right: auto;
        transform: scale(0.8);
        transform-origin: left;
        width: 400px;
        padding: 0px 12px;
        font-size: 12px;
        border-radius: 18px;
    }

    .race-info::before {
        top: 6px;
        left: 6px;
        bottom: 6px;
        right: 6px;
        border-radius: 14px;
    }

    .race-info::after {
        inset: -2px;
        border-radius: 18px;
    }

    /* 大会登録スマホ版 */

    .race-wrap {
        padding: 20px;
    }

    .race-panel {
        width: 100%;
        min-height: auto;
        padding: 28px 22px;
        flex-direction: column;
    }

    .race_title {
        font-size: 22px;
        text-align: center;
    }

    .race-form-area {
        width: 100%;
        order: 2;
    }

    .race-form input,
    .race-form button {
        width: 100%;
        height: 52px;
    }

    .race-character {
        width: 100%;
        order: 1;
    }

    .race-character img {
        width: 170px;
        opacity: .28;
    }

    /* 文章の改行 */
    #typing .line {
        white-space: pre-line;
    }

    /* スマホハンバーガーメニュー */
    .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        margin-left: auto;
    }

    #talkBtn,
    .user-btn,
    .race-btn {
        display: none;
    }

    .menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100svh;

        background: rgba(20, 40, 80, 0.65);

        opacity: 0;
        pointer-events: none;
        transition: 0.3s;

        z-index: 9999;
    }

    .menu-panel {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);

        display: flex;
        flex-direction: column;
        gap: 16px;
        width: 70%;
    }

    .menu-panel button,
    .menu-panel .menu-link {
        display: block;
        width: 100%;
        padding: 14px;
        border-radius: 12px;
        text-align: center;
        font-size: 16px;

        border: 1px solid rgba(173, 216, 255, 0.45);
        background: linear-gradient(180deg,
                rgba(112, 152, 255, 0.35) 0%,
                rgba(66, 110, 220, 0.25) 100%);
        color: #eaf6ff;

        text-decoration: none;

        box-shadow:
            0 0 0 1px rgba(255, 255, 255, 0.08) inset,
            0 6px 20px rgba(20, 40, 90, 0.2);
    }

    .intro-menu {
        display: flex;
        opacity: 0;
        transform: translateY(12px);
        pointer-events: none;
        transition: opacity 0.35s ease, transform 0.35s ease;
    }

    .intro-menu.is-show {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }

    .talk-overlay {

        position: fixed;
        inset: 0;
        background: rgba(18, 28, 60, 0.42);
        backdrop-filter: blur(4px);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.25s ease;
        z-index: 120;
    }

    .talk-overlay.is-show {
        opacity: 1;
        pointer-events: auto;
    }

    .talk-panel {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: min(78%, 320px);

        display: flex;
        flex-direction: column;
        gap: 16px;
    }

    .talk-topic-btn {
        width: 100%;
        padding: 14px 16px;
        border: 1px solid rgba(173, 216, 255, 0.45);
        border-radius: 14px;
        background: linear-gradient(180deg,
                rgba(112, 152, 255, 0.34) 0%,
                rgba(66, 110, 220, 0.24) 100%);
        color: #eef6ff;
        font-size: 16px;
        font-weight: 700;
        box-shadow:
            0 0 0 1px rgba(255, 255, 255, 0.08) inset,
            0 6px 20px rgba(20, 40, 90, 0.18);
    }

    #talkArea {
        position: fixed;
        inset: 0;
        z-index: 9999;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        background: rgba(18, 28, 60, 0.42);
        /* PC画面の選択肢の配置無効 */
        transform: none;
        width: 100%;
    }

    #talkSelect {
        width: min(78%, 280px);
        text-align: center;
    }



    #talkSelect .talk-question {
        margin-bottom: 16px;
        text-align: center;
        font-size: 20px;
        font-weight: 700;
        color: #f3f7ff;
        text-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
    }

    #talkSelect .topic {
        display: block;
        width: 100%;
        margin: 0 0 14px;
        padding: 12px 16px;
        border: 1px solid rgba(173, 216, 255, 0.42);
        border-radius: 14px;
        background: linear-gradient(180deg,
                rgba(112, 152, 255, 0.30) 0%,
                rgba(66, 110, 220, 0.22) 100%);
        color: #eef6ff;
        font-size: 15px;
        font-weight: 700;
        text-align: center;
        box-shadow:
            0 0 0 1px rgba(255, 255, 255, 0.08) inset,
            0 6px 18px rgba(20, 40, 90, 0.18);
    }


    .choice {
        width: 240px;
        padding: 12px 16px;
        margin: 8px 0;

        font-size: 14px;
        font-weight: 600;
        color: #ffffff;

        border: 1px solid rgba(255, 255, 255, 0.25);
        border-radius: 12px;

        background: rgba(255, 255, 255, 0.08);
        backdrop-filter: blur(6px);

        transition: all 0.25s ease;
    }

    .choice:hover {
        background: rgba(255, 255, 255, 0.18);
        border-color: rgba(255, 255, 255, 0.5);
    }

    .choice:active {
        transform: scale(0.95);
        background: rgba(255, 255, 255, 0.25);
    }

    .choice.active {
        background: linear-gradient(135deg, #6ea8ff, #4f7cff);
        box-shadow: 0 0 12px rgba(79, 124, 255, 0.6);
    }

    /* index画面--------------------------- */
    /* index画面--------------------------- */
    html,
    body {
        margin: 0;
        padding: 0;
        overflow-x: hidden;
    }

    .page {
        width: 100%;
        max-width: none;
        margin: 0;
        border: none;
        border-radius: 0;
        box-shadow: none;
    }

    .page.page--input {
        min-height: 100svh;
        padding: 28px 24px 170px;
        overflow: visible;
    }

    .page__title {
        margin: 0 0 24px;
        font-size: 36px;
        line-height: 1.2;
    }

    .form {
        display: grid;
        gap: 18px;
    }

    .form__group {
        display: grid;
        gap: 8px;
    }

    .form__label {
        font-size: 20px;
        margin: 0;
    }

    .form__input,
    .form__select,
    .form_select {
        width: 100%;
        height: 48px;
        font-size: 16px;
    }

    .time-wrap {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .time-box {
        width: 58px;
        height: 44px;
        font-size: 22px;
        font-weight: 600;
    }

    textarea.form_input {
        height: 110px;
        resize: none;
    }

    .button-group {
        position: fixed;
        left: 12px;
        right: 12px;
        bottom: 58px;
        z-index: 30;

        display: flex;
        gap: 10px;
    }

    .button-group .button {
        flex: 1;
        min-width: 0;
        height: 48px;
        font-size: 15px;
    }

    .back-intro {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 28px;
        z-index: 30;

        margin: 0;
        text-align: center;
        font-size: 12px;
    }

    /* log画面------------------------------------- */

    .stats-card__image {
        position: absolute;
        right: 12px;
        bottom: 0;
        opacity: 0.3;
        /* ←重要：薄くする */
    }

    .meter-text {
        margin-bottom: 145px;
        text-align: center;
        font-size: 14px;
        color: rgba(42, 61, 95, 0.32);
    }

    /* PBタイトル＋説明 縦並びに戻す */
    .pb-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    /* ボタン潰れ防止 */
    .pb-title {
        white-space: nowrap;
        font-size: 14px;
        padding: 6px 10px;
    }

    /* 説明文 改行させる */
    .pb-note {
        font-size: 12px;
        line-height: 1.5;
    }

    /* -------------------------------- */
    .novel-top,
    .novel-back {
        right: 16px;
        bottom: 16px;
    }

    .novel-top {
        position: fixed;
        top: 16px;
        right: 16px;
        bottom: auto;
        z-index: 30;
    }

    /* ----------------------------------- */
    .result-actions {
        position: fixed;
        left: 12px;
        right: 12px;
        bottom: 12px;
        z-index: 30;

        display: grid;
        gap: 10px;
    }

    .result-actions .button {
        width: 100%;
        min-width: 0;
        height: 46px;
        font-size: 15px;
    }

    /* 文章の最後がボタンに隠れないように逃がす */
    .result {
        padding-bottom: 120px;
    }

    /* 画面全体の一番下も少し余裕を持たせる */
    .page {
        padding-bottom: 24px;
    }
}