/* =====================================================
   REPSUM 共通CSS
   -----------------------------------------------------
   Theme:
   BLACK × GOLD
===================================================== */


/* =====================================================
   ① カラーテーマ
===================================================== */

:root {
    --repsum-bg: #101010;
    --repsum-bg-soft: #171717;

    --repsum-card: #1b1b1b;
    --repsum-card-soft: #242424;

    --repsum-gold: #d6b44c;
    --repsum-gold-light: #f2dc88;
    --repsum-gold-dark: #9f7e21;

    --repsum-text: #f8f8f8;
    --repsum-text-soft: #b9b9b9;

    --repsum-border:
        rgba(214, 180, 76, 0.34);

    --repsum-shadow:
        rgba(0, 0, 0, 0.38);

    --repsum-danger: #ff7373;
}


/* =====================================================
   ② 基本
===================================================== */

* {
    box-sizing: border-box;
}

html {
    background: var(--repsum-bg);
}

body {
    margin: 0;

    font-family:
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    background:
        radial-gradient(
            circle at top,
            #181407 0,
            #151515 600px,
            #2b1d08 900px
        );

    color: var(--repsum-text);

    min-height: 100vh;
}


/* =====================================================
   ③ Dashboard全体
===================================================== */

.repsum-dashboard {
    width: min(100%, 620px);
    margin: 0 auto;
    padding: 24px 16px 48px;
}


/* =====================================================
   ④ ヘッダー
===================================================== */

.repsum-header {
    text-align: center;
    margin-bottom: 22px;
}

.repsum-header h1 {
    margin: 0;

    font-size: 30px;
    font-weight: 900;
    letter-spacing: 0.08em;

    color: var(--repsum-gold-light);

    text-shadow:
        0 0 18px
        rgba(214, 180, 76, 0.18);
}

.repsum-user {
    margin-top: 6px;

    color: var(--repsum-text-soft);

    font-size: 14px;
}


/* =====================================================
   ⑤ トップステータスカード
===================================================== */

.repsum-total-card {
    position: relative;
    overflow: hidden;

    background:
        linear-gradient(
            145deg,
            #191919 0%,
            #242424 55%,
            #171717 100%
        );

    color: #fff;

    border:
        2px solid
        rgba(214, 180, 76, 0.65);

    border-radius: 20px;

    padding: 26px 20px;

    text-align: center;

    margin-bottom: 18px;

    box-shadow:
        0 10px 28px
        rgba(0, 0, 0, 0.38),
        inset 0 1px 0
        rgba(255, 255, 255, 0.04);
}


/* 上部に細い金ライン */

.repsum-total-card::before {
    content: "";

    position: absolute;
    top: 0;
    left: 12%;
    right: 12%;

    height: 1px;

    background:
        linear-gradient(
            90deg,
            transparent,
            var(--repsum-gold-light),
            transparent
        );
}


/* =====================================================
   ⑥ 今日 / 月間目標
===================================================== */

.repsum-total-grid {
    display: grid;

    grid-template-columns:
        1fr 1fr;

    gap: 16px;

    align-items: center;
}

.repsum-total-box {
    min-width: 0;

    display: flex;
    flex-direction: column;

    align-items: center;
    justify-content: center;
}

.repsum-total-label {
    margin-bottom: 7px;

    font-size: 13px;
    line-height: 1;

    color: var(--repsum-text-soft);
}

.repsum-total-number,
.repsum-goal-number {
    display: inline-block;

    margin-top: 0;

    font-size: 42px;
    line-height: 1;

    font-weight: 900;

    vertical-align: baseline;

    color: var(--repsum-gold-light);

    text-shadow:
        0 0 16px
        rgba(214, 180, 76, 0.12);
}

.repsum-total-unit {
    display: inline-block;

    margin-left: 6px;

    font-size: 13px;
    line-height: 1;

    font-weight: 800;

    vertical-align: baseline;

    color: #fff;
}

.repsum-goal-unset {
    min-height: 42px;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 20px;
    font-weight: 700;

    color: var(--repsum-text-soft);
}


/* =====================================================
   ⑦ 月間進捗
===================================================== */

.repsum-progress-area {
    margin-top: 22px;

    padding-top: 18px;

    border-top:
        2px solid
        rgba(214, 180, 76, 0.24);
}

.repsum-progress-info {
    display: flex;

    justify-content: space-between;

    gap: 12px;

    margin-bottom: 8px;

    font-size: 14px;
}

.repsum-progress-info strong {
    font-size: 16px;

    color: var(--repsum-gold-light);
}

.repsum-progress-track {
    width: 100%;

    height: 12px;

    overflow: hidden;

    border-radius: 999px;

    background:
        rgba(255, 255, 255, 0.11);

    box-shadow:
        inset 0 1px 3px
        rgba(0, 0, 0, 0.4);
}

.repsum-progress-bar {
    height: 100%;

    border-radius: inherit;

    background:
        linear-gradient(
            90deg,
            var(--repsum-gold-dark),
            var(--repsum-gold),
            var(--repsum-gold-light)
        );

    box-shadow:
        0 0 12px
        rgba(214, 180, 76, 0.45);

    transition:
        width 0.3s ease;
}


/* =====================================================
   ⑧ ゲーム状況
===================================================== */

.repsum-game-stats {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 8px;

    margin-top: 16px;
}

.repsum-game-stats > div {
    min-width: 0;

    padding: 10px 4px;

    text-align: center;
}

.repsum-game-stats span {
    display: block;

    margin-bottom: 6px;

    font-size: 13px;
    line-height: 1.3;

    color: var(--repsum-text-soft);
}

.repsum-game-stats strong {
    display: block;

    font-size: 17px;
    line-height: 1.25;

    font-weight: 800;

    color: #fff;
}


/* =====================================================
   ⑨ 通常カード
===================================================== */

.repsum-card {
    position: relative;

    background:
        linear-gradient(
            145deg,
            #1d1d1d,
            #181818
        );

    border:
        2px solid
        rgba(214, 180, 76, 0.65);

    border-radius: 16px;

    padding: 20px;

    margin-bottom: 18px;

    box-shadow:
        0 5px 18px
        rgba(0, 0, 0, 0.26);
}

.repsum-card h2 {
    margin: 0 0 16px;

    font-size: 18px;

    color: var(--repsum-gold-light);
}


/* =====================================================
   ⑩ 入力
===================================================== */

.repsum-add-row {
    display: flex;
    gap: 10px;
}

.repsum-add-row input {
    min-width: 0;
    flex: 1;

    padding: 14px;

    border:
        2px solid
        rgba(214, 180, 76, 0.65);

    border-radius: 10px;

    background: #111;

    color: #fff;

    font-size: 20px;

    text-align: center;

    outline: none;
}

.repsum-add-row input:focus {
    border-color:
        var(--repsum-gold);

    box-shadow:
        0 0 0 2px
        rgba(214, 180, 76, 0.12);
}


/* =====================================================
   ⑪ メインボタン
===================================================== */

.repsum-add-button {
    border: 0;

    border-radius: 10px;

    padding: 0 22px;

    min-height: 52px;

    background:
        linear-gradient(
            135deg,
            #9f7e21,
            #d6b44c 55%,
            #f2dc88
        );

    color: #111;

    font-size: 16px;

    font-weight: 900;

    cursor: pointer;

    box-shadow:
        0 5px 14px
        rgba(214, 180, 76, 0.20);
}

.repsum-add-button:hover {
    filter: brightness(1.08);
}


/* =====================================================
   ⑫ ランキングボタン
===================================================== */

.repsum-header-nav {
    margin: 12px 0 18px;
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.repsum-header-nav a {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    padding: 9px 16px;

    border:
        2px solid
        rgba(214, 180, 76, 0.65);

    border-radius: 10px;

    background:
        linear-gradient(
            145deg,
            #282314,
            #171717
        );

    color: var(--repsum-gold-light);

    text-decoration: none;

    font-size: 14px;

    font-weight: 800;

    box-shadow:
        0 4px 14px
        rgba(0, 0, 0, 0.25);
}


/* =====================================================
   ⑬ メッセージ
===================================================== */

.repsum-message {
    padding: 12px 14px;

    margin-bottom: 18px;

    border-radius: 10px;
}

.repsum-success {
    background: #18241a;

    border:
        2px solid
        rgba(114, 194, 121, 0.65);

    color: #a9e4ae;
}

.repsum-error {
    background: #2c1818;

    border:
        1px solid
        rgba(255, 115, 115, 0.25);

    color: #ff9999;
}


/* =====================================================
   ⑭ 日別REPグラフ
===================================================== */

.repsum-bar-chart {
    display: flex;

    align-items: flex-end;

    gap: 3px;

    width: 100%;

    min-height: 190px;

    padding: 8px 2px 4px;
}

.repsum-bar-item {
    flex: 1 1 0;

    min-width: 0;

    display: flex;

    flex-direction: column;

    align-items: center;
}

.repsum-bar-value {
    min-height: 18px;

    margin-bottom: 4px;

    font-size: 9px;

    font-weight: 800;

    color: var(--repsum-gold-light);
}

.repsum-bar-area {
    width: 70%;

    max-width: 16px;
    min-width: 5px;

    height: 130px;

    display: flex;

    align-items: flex-end;

    overflow: hidden;

    border-radius: 5px;

    background:
        rgba(255, 255, 255, 0.07);
}

.repsum-bar {
    width: 100%;

    min-height: 0;

    border-radius: 5px 5px 0 0;

    background:
        linear-gradient(
            180deg,
            var(--repsum-gold-light),
            var(--repsum-gold-dark)
        );

    box-shadow:
        0 0 8px
        rgba(214, 180, 76, 0.32);
}

.repsum-bar-day {
    margin-top: 5px;

    font-size: 9px;

    color: #888;
}


/* =====================================================
   ⑮ 今日の記録
===================================================== */

.repsum-empty {
    color: var(--repsum-text-soft);

    text-align: center;

    padding: 16px 0;
}

.repsum-record {
    padding: 14px 0;

    border-top:
        1px solid
        rgba(214, 180, 76, 0.13);
}

.repsum-record:first-of-type {
    border-top: 0;
}

.repsum-record-main {
    display: flex;

    justify-content: space-between;

    align-items: center;

    gap: 12px;

    margin-bottom: 10px;
}

.repsum-record-time {
    color: var(--repsum-text-soft);

    font-size: 14px;
}

.repsum-record-count {
    font-size: 22px;

    font-weight: 900;

    color: var(--repsum-gold-light);
}


/* =====================================================
   ⑯ 記録編集
===================================================== */

.repsum-record-actions {
    display: grid;

    grid-template-columns:
        1fr auto auto;

    gap: 8px;
}

.repsum-record-actions input {
    min-width: 0;

    width: 100%;

    padding: 10px;

    border:
        2px solid
        rgba(214, 180, 76, 0.65);

    border-radius: 8px;

    background: #111;

    color: #fff;

    font-size: 16px;
}

.repsum-small-button {
    border: 0;

    border-radius: 8px;

    padding: 10px 14px;

    font-weight: 800;

    cursor: pointer;
}

.repsum-edit-button {
    background:
        linear-gradient(
            135deg,
            #9f7e21,
            #d6b44c
        );

    color: #111;
}

.repsum-delete-button {
    background: #351b1b;

    color: var(--repsum-danger);

    border:
        2px solid
        rgba(255, 115, 115, 0.65);
}


/* =====================================================
   ⑰ スマホ
===================================================== */

@media (max-width: 420px) {

    .repsum-dashboard {
        padding:
            20px 14px
            40px;
    }

    .repsum-total-grid {
        gap: 8px;
    }

    .repsum-total-number,
    .repsum-goal-number {
        font-size: 34px;
    }

    .repsum-total-unit {
        font-size: 12px;
    }

    .repsum-game-stats {
        grid-template-columns:
            1fr 1fr;
    }

    .repsum-record-actions {
        grid-template-columns:
            1fr 1fr;
    }

    .repsum-record-actions input {
        grid-column:
            1 / -1;
    }
}

.repsum-dashboard,
.repsum-ranking,
.repsum-history {
    width: min(100%, 1200px);
    margin: 0 auto;
    padding: 24px 24px 48px;
}
/* =====================================================
   ⑱ ユーザー登録画面
===================================================== */

.repsum-register {
    width: min(100%, 520px);
    margin: 0 auto;
    padding: 32px 16px 48px;
}

.repsum-register h1 {
    margin: 0 0 8px;
    text-align: center;

    font-size: 30px;
    font-weight: 900;
    letter-spacing: 0.08em;

    color: var(--repsum-gold-light);

    text-shadow:
        0 0 18px
        rgba(214, 180, 76, 0.18);
}

.repsum-description {
    margin: 0 0 24px;

    text-align: center;

    color: var(--repsum-text-soft);

    font-size: 14px;
}

.repsum-field {
    margin-bottom: 18px;
}

.repsum-field label {
    display: block;

    margin-bottom: 7px;

    font-size: 14px;
    font-weight: 800;

    color: var(--repsum-gold-light);
}

.repsum-field input {
    width: 100%;

    padding: 13px 14px;

    border:
        2px solid
        rgba(214, 180, 76, 0.28);

    border-radius: 10px;

    background: #111;

    color: #fff;

    font-size: 16px;

    outline: none;
}

.repsum-field input:focus {
    border-color:
        var(--repsum-gold);

    box-shadow:
        0 0 0 2px
        rgba(214, 180, 76, 0.12);
}

.repsum-help {
    margin-top: 7px;

    font-size: 12px;

    color: var(--repsum-text-soft);
}

.repsum-button {
    width: 100%;

    border: 0;

    border-radius: 10px;

    padding: 14px;

    background:
        linear-gradient(
            135deg,
            var(--repsum-gold-dark),
            var(--repsum-gold) 55%,
            var(--repsum-gold-light)
        );

    color: #111;

    font-size: 16px;

    font-weight: 900;

    cursor: pointer;

    box-shadow:
        0 5px 14px
        rgba(214, 180, 76, 0.20);
}

.repsum-button:hover {
    filter: brightness(1.08);
}

/* =====================================================
   ⑲ ログイン画面
===================================================== */

.repsum-login {
    width: min(100%, 520px);
    margin: 0 auto;
    padding: 32px 16px 48px;
}

.repsum-login h1 {
    margin: 0 0 8px;
    text-align: center;

    font-size: 30px;
    font-weight: 900;
    letter-spacing: 0.08em;

    color: var(--repsum-gold-light);

    text-shadow:
        0 0 18px
        rgba(214, 180, 76, 0.18);
}

.repsum-login-description {
    margin: 0 0 24px;

    text-align: center;

    color: var(--repsum-text-soft);

    font-size: 14px;
}

.repsum-login .repsum-card {
    padding: 24px;
}

.repsum-login-field {
    margin-bottom: 18px;
}

.repsum-login-field label {
    display: block;

    margin-bottom: 7px;

    font-size: 14px;
    font-weight: 800;

    color: var(--repsum-gold-light);
}

.repsum-login-field input {
    width: 100%;

    padding: 13px 14px;

    border:
        2px solid
        rgba(214, 180, 76, 0.28);

    border-radius: 10px;

    background: #111;

    color: #fff;

    font-size: 16px;

    outline: none;
}

.repsum-login-field input:focus {
    border-color:
        var(--repsum-gold);

    box-shadow:
        0 0 0 2px
        rgba(214, 180, 76, 0.12);
}

.repsum-login-button {
    width: 100%;

    border: 0;

    border-radius: 10px;

    padding: 14px;

    background:
        linear-gradient(
            135deg,
            var(--repsum-gold-dark),
            var(--repsum-gold) 55%,
            var(--repsum-gold-light)
        );

    color: #111;

    font-size: 16px;

    font-weight: 900;

    cursor: pointer;

    box-shadow:
        0 5px 14px
        rgba(214, 180, 76, 0.20);
}

.repsum-login-button:hover {
    filter: brightness(1.08);
}

.repsum-login-links {
    margin-top: 18px;

    text-align: center;

    font-size: 14px;
}

.repsum-login-links a {
    color: var(--repsum-gold-light);
    text-decoration: none;
    font-weight: 700;
}

.repsum-login-links a:hover {
    text-decoration: underline;
}

/* =====================================================
   ⑳ マイページ
===================================================== */

.repsum-profile-grid {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 14px;

    margin-top: 10px;
}

.repsum-profile-item {
    min-width: 0;

    padding: 20px 14px;

    border:
        2px solid
        rgba(214, 180, 76, 0.22);

    border-radius: 14px;

    background:
        linear-gradient(
            145deg,
            #161616,
            #22201a
        );

    text-align: center;
}

.repsum-profile-item span {
    display: block;

    margin-bottom: 8px;

    color: var(--repsum-text-soft);

    font-size: 13px;
}

.repsum-profile-item strong {
    display: block;

    color: var(--repsum-gold-light);

    font-size: 22px;
    line-height: 1.3;

    font-weight: 900;
}

@media (max-width: 700px) {

    .repsum-profile-grid {
        grid-template-columns:
            1fr 1fr;
    }
}

@media (max-width: 420px) {

    .repsum-profile-item {
        padding: 16px 8px;
    }

    .repsum-profile-item strong {
        font-size: 18px;
    }
}

/* =====================================================
   ㉑ ログアウト
===================================================== */

.repsum-logout-form {
    text-align: center;
}

.repsum-logout-button {
    min-width: 180px;

    padding: 12px 20px;

    border:
        2px solid
        rgba(255, 115, 115, 0.30);

    border-radius: 10px;

    background: #2b1717;

    color: #ff8d8d;

    font-size: 14px;
    font-weight: 800;

    cursor: pointer;
}

.repsum-logout-button:hover {
    background: #351b1b;
}
/* ======================================================
   ランキング等 共通ナビ
====================================================== */
.repsum-nav a,
.repsum-nav a:visited {
    color: #f2dc88;
    text-decoration: none;
    font-weight: 700;
}

.repsum-nav a:hover {
    color: #fff3b0;
    text-decoration: underline;
}

/* ======================================================
   REP入力モーダル
====================================================== */

.repsum-add-card {
    text-align: center;
}

/* ======================================================
   REP登録ボタン
====================================================== */

.repsum-open-rep-modal {
    width: 100%;
    min-height: 68px;

    border: 2px solid #f2dc88;
    border-radius: 14px;

    background: linear-gradient(
        180deg,
        #f7e79c 0%,
        #d6b44c 100%
    );

    color: #151515;

    font-size: 1.35rem;
    font-weight: 900;
    letter-spacing: 0.03em;

    cursor: pointer;

    box-shadow:
        0 4px 14px rgba(214, 180, 76, 0.28);
}

.repsum-open-rep-modal:hover {
    background: linear-gradient(
        180deg,
        #fff3b0 0%,
        #e3c45e 100%
    );

    color: #000000;

    transform: translateY(-1px);
}

.repsum-open-rep-modal:active {
    transform: translateY(1px);
}




/* ======================================================
   モーダル本体
====================================================== */

.repsum-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.repsum-modal.is-open {
    display: flex;
}

.repsum-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.78);
}

.repsum-modal-panel {
    position: relative;
    z-index: 1;
    width: min(100%, 420px);
    padding: 28px 24px 24px;
    border: 2px solid #d6b44c;
    border-radius: 20px;
    background: #151515;
    box-shadow:
        0 0 24px rgba(214, 180, 76, 0.28);
    text-align: center;
}

.repsum-modal-panel h2 {
    margin: 0 0 22px;
    color: #f2dc88;
}

.repsum-modal-close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 44px;
    height: 44px;
    border: 0;
    background: transparent;
    color: #f2dc88;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
}


/* ======================================================
   大型REP表示
====================================================== */

.repsum-big-rep-wrap {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 10px;
    margin-bottom: 22px;
}

.repsum-big-rep-input {
    width: 220px;
    max-width: 70%;
    border: 0;
    border-bottom: 2px solid #d6b44c;
    background: transparent;
    color: #ffffff;
    font-size: clamp(3rem, 12vw, 5rem);
    font-weight: 900;
    line-height: 1;
    text-align: center;
    outline: none;
}

.repsum-big-rep-input:focus {
    border-bottom-color: #f2dc88;
}

.repsum-big-rep-unit {
    color: #f2dc88;
    font-size: 1.1rem;
    font-weight: 800;
}


/* ======================================================
   数字テンキー
====================================================== */

.repsum-rep-keypad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.repsum-rep-keypad button {
    min-height: 58px;
    border: 1px solid rgba(214, 180, 76, 0.6);
    border-radius: 12px;
    background: #242016;
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: 800;
    cursor: pointer;
}

.repsum-rep-keypad button:hover {
    background: #332b18;
    border-color: #f2dc88;
}

.repsum-rep-key-sub {
    color: #f2dc88 !important;
}


/* ======================================================
   登録ボタン
====================================================== */

.repsum-modal-submit {
    width: 100%;
    min-height: 64px;
    margin-top: 16px;

    border: 0;
    border-radius: 14px;

    background: linear-gradient(
        180deg,
        #f2dc88 0%,
        #d6b44c 100%
    );

    color: #17130a;

    font-size: 1.3rem;
    font-weight: 900;

    cursor: pointer;
}


/* ======================================================
   モーダル表示中の背景スクロール停止
====================================================== */

body.repsum-modal-open {
    overflow: hidden;
}


/* ======================================================
   スマホ
====================================================== */

@media (max-width: 600px) {

    .repsum-modal {
        padding: 12px;
    }

    .repsum-modal-panel {
        width: 100%;
        padding:
            26px
            18px
            20px;
    }

    .repsum-big-rep-input {
        width: 190px;
        font-size: 4rem;
    }

    .repsum-rep-keypad button {
        min-height: 62px;
        font-size: 1.6rem;
    }

}
/* ======================================================
   ルール一覧
====================================================== */

.repsum-rule-list {
    margin: 0;
    padding-left: 1.4em;
    line-height: 1.9;
}

.repsum-rule-list li {
    margin-bottom: 10px;
}

.repsum-rule-list strong {
    color: #f2dc88;
}

.repsum-nav a {
    display: inline-block;
    padding: 10px 16px;
    border: 1px solid #d6b44c;
    border-radius: 10px;
    color: #f2dc88;
    text-decoration: none;
    font-weight: 700;
}

.repsum-nav a:hover {
    background: #2a2415;
    color: #fff3b0;
}
/* ======================================================
   今日の記録 カード表示
====================================================== */

.repsum-record-grid {
    display: grid;
    grid-template-columns:
        repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.repsum-record-card {
    padding: 18px;
    border: 1px solid rgba(214, 180, 76, 0.55);
    border-radius: 14px;
    background: #171717;
    text-align: center;
}

.repsum-record-card-time {
    margin-bottom: 8px;
    color: #aaa;
    font-size: 0.85rem;
}

.repsum-record-card-reps {
    margin-bottom: 16px;
    color: #f2dc88;
    font-size: 2rem;
    font-weight: 900;
}

.repsum-record-card-reps span {
    font-size: 0.75rem;
}

.repsum-record-card-actions {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.repsum-record-card-actions form {
    margin: 0;
}

.repsum-record-edit-toggle,
.repsum-record-delete-button,
.repsum-record-edit-form button {
    min-height: 38px;
    padding: 8px 14px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
}

.repsum-record-edit-toggle {
    border: 0;
    background: #d6b44c;
    color: #111;
}

.repsum-record-delete-button {
    border: 1px solid #a94444;
    background: #321919;
    color: #ff7979;
}


/* ======================================================
   編集フォーム
====================================================== */

.repsum-record-edit-form {
    display: none;
    gap: 8px;
    margin-top: 14px;
}

.repsum-record-edit-form.is-open {
    display: flex;
}

.repsum-record-edit-form input {
    min-width: 0;
    width: 100%;
    padding: 9px;
    border: 1px solid #d6b44c;
    border-radius: 8px;
    background: #111;
    color: #fff;
}

.repsum-record-edit-form button {
    border: 0;
    background: #d6b44c;
    color: #111;
}


/* ======================================================
   スマホ
====================================================== */

@media (max-width: 700px) {

    .repsum-record-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

}

@media (max-width: 420px) {

    .repsum-record-grid {
        grid-template-columns: 1fr;
    }

}
/* ======================================================
   数値入力の上下スピンボタンを非表示
====================================================== */

.repsum-big-rep-input::-webkit-outer-spin-button,
.repsum-big-rep-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.repsum-big-rep-input {
    appearance: textfield;
    -moz-appearance: textfield;
}
/* ======================================================
   ランキング表示
====================================================== */

.repsum-ranking-section h2 {
    margin-bottom: 18px;
}

.repsum-ranking-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.repsum-ranking-item {
    display: grid;
    grid-template-columns: 90px 1fr auto;
    align-items: center;
    gap: 16px;

    padding: 16px 18px;

    border: 1px solid rgba(214, 180, 76, 0.35);
    border-radius: 12px;

    background: #171717;
}

.repsum-ranking-position {
    display: flex;
    align-items: center;
    gap: 8px;
}

.repsum-ranking-medal {
    font-size: 1.7rem;
    font-weight: 900;
}

.repsum-ranking-rank-text {
    color: #f2dc88;
    font-weight: 800;
}

.repsum-ranking-account {
    min-width: 0;

    color: #ffffff;
    font-size: 1.15rem;
    font-weight: 800;
}

.repsum-ranking-name {
    font-size: 1.15rem;
    font-weight: 800;
}

.repsum-ranking-detail {
    margin-top: 4px;

    color: #aaa;
    font-size: 0.82rem;
    font-weight: 500;
}

.repsum-ranking-score {
    color: #f2dc88;

    font-size: 1.55rem;
    font-weight: 900;

    white-space: nowrap;
}

.repsum-ranking-score span {
    font-size: 0.8rem;
}
/* ======================================================
   ランキング スマホ
====================================================== */

@media (max-width: 650px) {

    .repsum-ranking-item {
        grid-template-columns:
            68px minmax(0, 1fr) auto;

        align-items: center;
        gap: 10px;

        padding: 14px 12px;
    }

    .repsum-ranking-position {
        display: flex;
        align-items: center;
        gap: 6px;

        min-width: 0;
    }

    .repsum-ranking-medal {
        font-size: 1.35rem;
    }

    .repsum-ranking-rank-text {
        font-size: 0.9rem;
        white-space: nowrap;
    }

    .repsum-ranking-account {
        min-width: 0;

        font-size: 1rem;
        overflow: hidden;
    }

    .repsum-ranking-name {
        font-size: 1rem;
    }

    .repsum-ranking-detail {
        margin-top: 3px;

        font-size: 0.72rem;
        line-height: 1.4;
    }

    .repsum-ranking-score {
        grid-column: auto;

        font-size: 1.25rem;
        white-space: nowrap;

        text-align: right;
    }

    .repsum-ranking-score span {
        font-size: 0.7rem;
    }

}

/* ======================================================
   TOP3
====================================================== */

.repsum-rank-top {
    padding-top: 20px;
    padding-bottom: 20px;

    border-width: 2px;
}

.repsum-rank-top-1 {
    border-color: #f2dc88;

    background: linear-gradient(
        90deg,
        rgba(214, 180, 76, 0.18),
        #171717 45%
    );
}

.repsum-rank-top-2 {
    border-color: rgba(210, 210, 210, 0.65);
}

.repsum-rank-top-3 {
    border-color: rgba(191, 124, 72, 0.75);
}


/* ======================================================
   自分のアカウント
====================================================== */

.repsum-ranking-item.repsum-me {
    box-shadow:
        inset 4px 0 0 #f2dc88;
}


/* ======================================================
   スマホ
====================================================== */

@media (max-width: 650px) {

    .repsum-ranking-item {
        grid-template-columns:
            64px 1fr;

        gap: 10px;
    }

    .repsum-ranking-score {
        grid-column: 2;

        font-size: 1.35rem;
    }

    .repsum-ranking-position {
        align-self: start;
    }

    .repsum-ranking-account {
        font-size: 1rem;
    }

}
/* ======================================================
   ランキング見出し + 期間
====================================================== */

.repsum-ranking-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.repsum-ranking-title-row h2 {
    margin: 0;
}

.repsum-ranking-period {
    color: #f2dc88;
    font-size: 0.9rem;
    font-weight: 700;
    white-space: nowrap;
}

/* ======================================================
   ランキング切替セレクト
====================================================== */

.repsum-ranking-selector {
    display: flex;
    align-items: center;
    gap: 12px;
}

.repsum-ranking-selector label {
    color: #f2dc88;
    font-weight: 800;
    white-space: nowrap;
}

.repsum-ranking-selector select {
    min-width: 220px;
    min-height: 44px;

    padding: 8px 42px 8px 14px;

    border: 1px solid #d6b44c;
    border-radius: 10px;

    background: #171717;
    color: #f2dc88;

    font-size: 1rem;
    font-weight: 700;

    cursor: pointer;
}

.repsum-ranking-selector select:focus {
    outline: none;
    border-color: #f2dc88;

    box-shadow:
        0 0 0 2px rgba(242, 220, 136, 0.18);
}

.repsum-ranking-selector select option {
    background: #171717;
    color: #ffffff;
}


/* ======================================================
   スマホ
====================================================== */

@media (max-width: 650px) {

    .repsum-ranking-selector {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .repsum-ranking-selector select {
        width: 100%;
        min-width: 0;
    }

}
/* ======================================================
   日次履歴 日付選択
====================================================== */

.repsum-history form {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.repsum-history select {
    min-height: 44px;
    padding: 8px 40px 8px 14px;

    border: 1px solid #d6b44c;
    border-radius: 10px;

    background: #171717;
    color: #f2dc88;

    font-size: 1rem;
    font-weight: 700;

    cursor: pointer;
}

.repsum-history select:focus {
    outline: none;
    border-color: #f2dc88;

    box-shadow:
        0 0 0 2px rgba(242, 220, 136, 0.18);
}

.repsum-history select option {
    background: #171717;
    color: #ffffff;
}

.repsum-history button[type="submit"] {
    min-height: 44px;
    padding: 8px 18px;

    border: 1px solid #d6b44c;
    border-radius: 10px;

    background: linear-gradient(
        180deg,
        #f2dc88 0%,
        #d6b44c 100%
    );

    color: #17130a;

    font-size: 1rem;
    font-weight: 800;

    cursor: pointer;
}

.repsum-history button[type="submit"]:hover {
    filter: brightness(1.08);
}


/* ======================================================
   スマホ
====================================================== */

@media (max-width: 650px) {

    .repsum-history form {
        align-items: stretch;
    }

    .repsum-history select {
        flex: 1;
        min-width: 0;
    }

}
/* ======================================================
   ログイン画面 アカウント作成リンク
====================================================== */

.repsum-register-link a,
.repsum-register-link a:visited {
    color: #f2dc88;
    font-weight: 700;
    text-decoration: none;
}

.repsum-register-link a:hover {
    color: #fff3b0;
    text-decoration: underline;
}