/*
 * マイページ（/users/）と会員ページ（/members/user/）専用
 * 設計：docs/mypage_motivation_design_2026-11-04.md
 * user.css はイベント記事の先出しCSSの元ファイルなので、こちらに分けている（§8 の 7）
 */

/* ===== 一番上の3つ（Elements/mypagenow.ctp） ===== */
.mypagenow {
    display: flex;
    flex-wrap: wrap;
    margin: 10px 0 15px;
}
.mypagenow-item {
    flex: 1 1 220px;
    min-width: 0;
    margin: 5px;
    padding: 12px 15px;
    background: #fff;
    border: 1px solid #e3e3e3;
    border-radius: 3px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .06);
}
.mypagenow-new {
    border-color: #f0c36d;
    background: #fffaf0;
}
.mypagenow-label {
    font-size: 13px;
    font-weight: bold;
    color: #666;
    margin-bottom: 6px;
}
.mypagenow-new .mypagenow-label {
    color: #a86b00;
}
.mypagenow-value {
    font-size: 30px;
    font-weight: bold;
    color: #222;
    line-height: 1.2;
}
.mypagenow-value small {
    font-size: 14px;
    font-weight: normal;
    margin-left: 3px;
    color: #666;
}
.mypagenow-badges {
    list-style: none;
    margin: 0;
    padding: 0;
}
.mypagenow-badges li {
    padding: 4px 0;
    border-bottom: 1px dashed #f0dcb0;
}
.mypagenow-badges li:last-child {
    border-bottom: 0;
}
.mypagenow-badges b {
    display: block;
    font-size: 15px;
    color: #333;
}
.mypagenow-badges span {
    display: block;
    font-size: 12px;
    color: #777;
}
.mypagenow-goal {
    font-size: 15px;
    color: #333;
    line-height: 1.5;
}
.mypagenow-goal b {
    color: #222;
}
.mypagenow-remain {
    font-size: 26px;
    font-weight: bold;
    color: #c4161d;
    margin: 0 2px;
}
.mypagenow-bar {
    height: 8px;
    margin: 8px 0 4px;
    background: #eee;
    border-radius: 4px;
    overflow: hidden;
}
.mypagenow-bar span {
    display: block;
    height: 100%;
    background: #c4161d;
    border-radius: 4px;
}
.mypagenow-note {
    font-size: 12px;
    color: #888;
    margin-top: 4px;
}
.mypagenow-link {
    display: inline-block;
    margin-top: 6px;
    font-size: 13px;
}

/* ===== プロフィール枠のデザイン（Elements/mypageframe.ctp・D6・D7） =====
 * 見本：https://claude.ai/artifact/KJ1Hw4ZP7rnPVKoxHQ5z6c
 * .d-* は枠（.mypageframehead）と選ぶ画面の見本（.mypagedesignpicker-tile）の両方に付く
 * 枠の余白は user.css の .userwidget .userwidget-header（padding 20px）より強い指定で上書きする
 */
.mypageframehead {
    position: relative;
    overflow: hidden;
}
.mypageframehead .userwidget-image,
.mypageframehead .useruserwidgetname,
.mypageframehead .userwidget-desc {
    position: relative;
    z-index: 1;
}
.mypageframehead:not(.d-rank) .useruserwidgetname,
.mypageframehead:not(.d-rank) .userwidget-desc {
    color: inherit;
}
.frame-rankchip {
    display: inline-block;
    padding: 1px 9px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: bold;
    color: #333;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .12);
    text-shadow: none;
}
.frame-rankchip.bg-diamond {
    color: #fff;
}
.mypageframehead.d-rank .frame-rankchip,
.mypageframehead:not(.d-rank) .frame-ranktext {
    display: none;
}
.frame-deco {
    display: none;
    position: absolute;
    z-index: 1;
}

/* 1. 夜の車両基地 */
.d-depot {
    color: #eef2f7;
    background-color: #17243b;
    background-image:
        radial-gradient(circle at 86% 18%, rgba(255, 212, 128, .38), transparent 26%),
        linear-gradient(#8f9db0, #8f9db0),
        linear-gradient(#8f9db0, #8f9db0),
        repeating-linear-gradient(90deg, #4f5e74 0 4px, transparent 4px 17px),
        linear-gradient(rgba(143, 157, 176, .35), rgba(143, 157, 176, .35)),
        linear-gradient(rgba(143, 157, 176, .35), rgba(143, 157, 176, .35));
    background-size: 100% 100%, 100% 2px, 100% 2px, 100% 14px, 100% 1px, 100% 1px;
    background-position: 0 0, 0 calc(100% - 16px), 0 calc(100% - 6px), 0 calc(100% - 3px), 0 calc(100% - 30px), 0 calc(100% - 24px);
    background-repeat: no-repeat;
}
.userwidget .mypageframehead.d-depot { padding-bottom: 34px; }

/* 2. 夕焼けの鉄橋 */
.d-sunset {
    color: #fff;
    background-image:
        linear-gradient(#3b1f3f, #3b1f3f),
        linear-gradient(#3b1f3f, #3b1f3f),
        repeating-linear-gradient(55deg, #3b1f3f 0 2px, transparent 2px 16px),
        repeating-linear-gradient(-55deg, #3b1f3f 0 2px, transparent 2px 16px),
        linear-gradient(180deg, #f4a14c 0%, #e2675e 52%, #7b3d79 100%);
    background-size: 100% 3px, 100% 3px, 100% 20px, 100% 20px, 100% 100%;
    background-position: 0 calc(100% - 22px), 0 calc(100% - 2px), 0 calc(100% - 3px), 0 calc(100% - 3px), 0 0;
    background-repeat: no-repeat;
}
.mypageframehead.d-sunset { text-shadow: 0 1px 2px rgba(60, 20, 50, .45); }
.userwidget .mypageframehead.d-sunset { padding-bottom: 40px; }

/* 3. 雪の線路 */
.d-snow {
    color: #22384b;
    background-color: #e6f0f7;
    background-image:
        radial-gradient(circle, rgba(115, 150, 185, .45) 1.4px, transparent 1.9px),
        radial-gradient(circle, rgba(115, 150, 185, .3) 1px, transparent 1.5px),
        linear-gradient(#6f8399, #6f8399),
        linear-gradient(#6f8399, #6f8399),
        linear-gradient(#fff, #fff),
        linear-gradient(180deg, #f8fbfe 0%, #d9e7f2 100%);
    background-size: 26px 26px, 17px 17px, 100% 2px, 100% 2px, 100% 22px, 100% 100%;
    background-position: 0 0, 9px 6px, 0 calc(100% - 15px), 0 calc(100% - 6px), 0 100%, 0 0;
    background-repeat: repeat, repeat, no-repeat, no-repeat, no-repeat, no-repeat;
}
.userwidget .mypageframehead.d-snow { padding-bottom: 32px; }

/* 11. 号外（初掲載） */
.d-gogai {
    color: #1c1c1c;
    border-top: 6px double #1c1c1c;
    background-color: #f5f2ea;
    background-image: repeating-linear-gradient(90deg, transparent 0 41px, rgba(0, 0, 0, .07) 41px 42px);
}
.userwidget .mypageframehead.d-gogai { padding-right: 64px; }
.mypageframehead.d-gogai .useruserwidgetname {
    font-family: "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", serif;
    font-weight: bold;
}
.mypageframehead.d-gogai .frame-gogai {
    display: block;
    right: 14px;
    top: 12px;
    writing-mode: vertical-rl;
    font-family: "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", serif;
    font-weight: 900;
    font-size: 22px;
    letter-spacing: .1em;
    line-height: 1;
    padding: 8px 4px;
    background: #c4161d;
    color: #fff;
}

/* 12. 駅の伝言板（初コメント） */
.d-board {
    color: #f2f1e9;
    border: 8px solid #7a5230;
    border-bottom-width: 14px;
    background-color: #26392f;
    background-image:
        radial-gradient(ellipse at 20% 30%, rgba(255, 255, 255, .07), transparent 45%),
        radial-gradient(ellipse at 78% 70%, rgba(255, 255, 255, .05), transparent 40%);
}
.mypageframehead.d-board {
    text-shadow: 0 0 1px rgba(255, 255, 255, .55);
    box-shadow: inset 0 0 18px rgba(0, 0, 0, .45), inset 0 -3px 0 #5d3d21;
    overflow: visible;
}
.mypageframehead.d-board .frame-chalk {
    display: block;
    right: 18px;
    bottom: -11px;
    width: 26px;
    height: 6px;
    border-radius: 3px;
    background: #f4f2e8;
}

/* 13. 硬い切符（アンケート ブロンズ） */
.d-ticket {
    color: #1d3a29;
    background-color: #cfe5d3;
    background-image:
        repeating-linear-gradient(60deg, rgba(36, 104, 66, .13) 0 1px, transparent 1px 6px),
        repeating-linear-gradient(-60deg, rgba(36, 104, 66, .13) 0 1px, transparent 1px 6px);
    outline: 2px solid #3c6a4a;
    outline-offset: -9px;
}
.mypageframehead.d-ticket .useruserwidgetname {
    font-family: "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", serif;
    font-weight: bold;
}
.mypageframehead.d-ticket .frame-punch {
    display: block;
    top: -1px;
    right: 46px;
    width: 14px;
    height: 12px;
    z-index: 2;
    background: #fff;
    clip-path: polygon(0 0, 100% 0, 50% 100%);
}
.mypageframehead.d-ticket .frame-issuer {
    display: block;
    right: 18px;
    bottom: 14px;
    font-family: "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", serif;
    font-size: 11px;
    letter-spacing: .08em;
}

/* 14. フィルム（TD ブロンズ） */
.d-film {
    color: #f1ede4;
    background-color: #191919;
    background-image:
        repeating-linear-gradient(90deg, #e9e2d3 0 9px, transparent 9px 21px),
        repeating-linear-gradient(90deg, #e9e2d3 0 9px, transparent 9px 21px);
    background-size: 100% 7px, 100% 7px;
    background-position: 6px 7px, 6px calc(100% - 7px);
    background-repeat: no-repeat;
}
.userwidget .mypageframehead.d-film { padding-top: 26px; padding-bottom: 26px; }
.mypageframehead.d-film .frame-edge {
    display: block;
    right: 16px;
    bottom: 15px;
    font-family: Menlo, Consolas, monospace;
    font-size: 9px;
    letter-spacing: .12em;
    color: #e3892d;
}

/* ===== デザインを選ぶ画面（Elements/mypagedesignpicker.ctp） ===== */
.mypagedesignpicker {
    margin: 10px 0 15px;
    padding: 12px 15px;
    background: #fff;
    border: 1px solid #e3e3e3;
    border-radius: 3px;
}
.mypagedesignpicker-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    margin-bottom: 8px;
}
.mypagedesignpicker-head b {
    font-size: 14px;
    color: #333;
    margin-right: 10px;
}
.mypagedesignpicker-result {
    font-size: 13px;
}
.mypagedesignpicker-result.is-ok { color: #2e7d32; }
.mypagedesignpicker-result.is-ng { color: #c4161d; }
.mypagedesignpicker-row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -4px;
}
.mypagedesignpicker-item {
    flex: 0 0 25%;
    min-width: 0;
    padding: 4px;
    margin: 0;
    background: none;
    border: 0;
    text-align: center;
    font-size: 12px;
    color: #333;
    line-height: 1.4;
    cursor: pointer;
}
.mypagedesignpicker-item:focus { outline: 2px solid #c4161d; outline-offset: 1px; }
.mypagedesignpicker-tile {
    display: block;
    height: 42px;
    border-radius: 4px;
    margin-bottom: 4px;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .12);
}
.mypagedesignpicker-tile.d-rank { background: linear-gradient(90deg, #FF8C00 0 20%, #00BFFF 20% 40%, #C0C0C0 40% 60%, #FFD700 60% 80%, #4B0082 80% 100%); }
.mypagedesignpicker-tile.d-gogai { border-top-width: 4px; }
.mypagedesignpicker-tile.d-board { border-width: 4px; border-bottom-width: 6px; }
.mypagedesignpicker-tile.d-ticket { outline-offset: -5px; outline-width: 1px; }
.mypagedesignpicker-item.is-on .mypagedesignpicker-tile { box-shadow: 0 0 0 3px #c4161d; }
.mypagedesignpicker-item.is-on .mypagedesignpicker-name { font-weight: bold; }
.mypagedesignpicker-item.is-locked { cursor: not-allowed; }
.mypagedesignpicker-item.is-locked .mypagedesignpicker-tile { filter: grayscale(.85); opacity: .45; }
.mypagedesignpicker-item.is-locked .mypagedesignpicker-name { color: #999; }
.mypagedesignpicker-hint {
    display: block;
    font-size: 11px;
    color: #888;
}
@media (max-width: 480px) {
    .mypagedesignpicker-item { flex-basis: 50%; }
}

/* ===== 会員ページ（Members/user.ctp）の枠とバッジ（D8） =====
 * 会員ページは user.css を読まない（読むとほかの部分が変わる）。枠の土台は user.css の
 * .userwidget まわりと .bg-*（ランク色）と同じ値を、.memberframe の中だけで効くように書く
 */
.memberframe {
    margin-bottom: 12px;
    border-radius: 3px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .18);
}
.memberframe .userwidget-header {
    padding: 20px;
    border-top-right-radius: 3px;
    border-top-left-radius: 3px;
}
.memberframe .userwidget-header:after {
    content: "";
    display: block;
    clear: both;
}
.memberframe .userwidget-image > img {
    width: 60px;
    height: 60px;
    float: left;
    border-radius: 50%;
    object-fit: cover;
}
.memberframe .useruserwidgetname,
.memberframe .userwidget-desc {
    margin-left: 80px;
}
.memberframe .useruserwidgetname {
    margin-top: 5px;
    margin-bottom: 5px;
    font-size: 25px;
    font-weight: 300;
}
.memberframe .mypageframehead.d-depot { padding-bottom: 34px; }
.memberframe .mypageframehead.d-sunset { padding-bottom: 40px; }
.memberframe .mypageframehead.d-snow { padding-bottom: 32px; }
.memberframe .mypageframehead.d-gogai { padding-right: 64px; }
.memberframe .mypageframehead.d-film { padding-top: 26px; padding-bottom: 26px; }
.memberframe .bg-gold { background-color: #FFD700; }
.memberframe .bg-diamond { background-color: #4B0082; color: #fff; }
.memberframe .bg-orange { background-color: #FF8C00; }
.memberframe .bg-skyblue { background-color: #00BFFF; }
.memberframe .bg-silver { background-color: #C0C0C0; }

.memberbadges {
    margin: 0 0 16px;
}
.memberbadges-head {
    font-size: 14px;
    color: #616161;
    margin-bottom: 6px;
}
.memberbadges-head b {
    margin-right: 6px;
}
.memberbadges-list {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    margin: 0 -3px;
    padding: 0;
}
.memberbadges-list li {
    display: flex;
    align-items: center;
    margin: 3px;
    padding: 4px 10px 4px 8px;
    background: #f4f5f7;
    border: 1px solid #e3e5e8;
    border-radius: 14px;
    font-size: 12px;
    color: #333;
    max-width: 100%;
}
.memberbadges-list li .fa {
    font-size: 15px;
    margin-right: 6px;
    text-shadow: 0 0 1px rgba(0, 0, 0, .55);
}
.memberbadges-list li span {
    min-width: 0;
    overflow-wrap: anywhere;
}
