/* cobyplay-account.js: header avatar, phone 「♡ 收藏」, ☰ account card, 我的帳號 page, phone search bar.
   After LateFind's latefind-member.css / latefind-journal.css (2026-11-20), in CobyPlay's colours. */

/* ---- header: picture or first letter before the name; phones show the circle alone ---- */
.cp-app .cp-site-header .cp-header-login.cpa-member{display:inline-flex!important;align-items:center;gap:8px;padding:0 13px 0 4px;border-radius:999px}
.cpa-avatar,.cp-site-header .cpa-member .cp-member-avatar{display:grid;place-items:center;flex:none;width:28px;height:28px;border-radius:50%;background:linear-gradient(135deg,#6f5cff,#2fb7a6);color:#fff;font:800 13px/1 'Noto Sans TC',sans-serif;object-fit:cover}
.cpa-shelf{display:none}
.cp-app .cp-site-header .cpa-member{max-width:180px!important}
.cpa-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media(max-width:700px){
  .cp-app .cp-site-header .cp-header-login.cpa-member{width:36px;min-width:36px!important;max-width:36px!important;height:36px;padding:2px!important;gap:0;justify-content:center;font-size:0!important;border-radius:50%}
  .cp-app .cp-site-header .cpa-member .cpa-avatar,.cp-app .cp-site-header .cpa-member .cp-member-avatar{width:30px;height:30px;font-size:14px}
  .cpa-shelf{display:inline-flex;align-items:center;gap:5px;height:34px;padding:0 11px;border:1px solid #3d4275;border-radius:999px;background:#14182d;color:#f4f2ff;font:600 13px/1 'Noto Sans TC',sans-serif;text-decoration:none;white-space:nowrap}
  .cpa-shelf svg{color:#ff8fb0}
  .cpa-shelf b{min-width:18px;padding:2px 5px;border-radius:999px;background:#e0577f;color:#fff;font-size:11px;text-align:center}
  .cpa-shelf b[hidden]{display:none}
}
/* Phones: logo | ♡ 收藏 | account | ☰ on one row, as LateFind (the language picker is in the ☰ menu). */
@media(max-width:700px){
  body.cp-app .cp-site-header{grid-template-columns:minmax(0,1fr) auto auto auto auto!important;column-gap:8px!important}
  body.cp-app .cp-site-header .cp-site-tools{display:contents}
  body.cp-app .cp-site-header .cp-social-slot,body.cp-app .cp-site-header .cp-lang{display:none!important}
  body.cp-app .cp-site-header .cpa-shelf{grid-row:1!important;grid-column:2!important;align-self:center}
  /* the 徽章 folds to a gold ✦ just left of the account (its name is in the ☰ menu) */
  body.cp-app .cp-site-header .cpx-badge{grid-row:1!important;grid-column:3!important;align-self:center;display:grid!important;place-items:center;width:30px;height:30px;padding:0!important;margin:0!important;border-radius:50%;font-size:14px}
  body.cp-app .cp-site-header .cpx-badge .cpx-badge-name{display:none}
  body.cp-app .cp-site-header .cp-header-login{grid-row:1!important;grid-column:4!important;align-self:center}
  body.cp-app .cp-site-header .cp-mobile-menu-toggle{grid-row:1!important;grid-column:5!important}
  body.cp-app .cp-site-header .brand{min-width:0}
}

/* ---- ☰ menu: account card + 我的收藏 ---- */
.cpa-mm{display:grid;gap:10px;margin:0 0 14px}
.cpa-mm-account{display:flex;align-items:center;gap:12px;width:100%;padding:12px 14px;border:1px solid #3d4275;border-radius:12px;background:#171b33;color:#f4f2ff;font:inherit;text-align:left;cursor:pointer}
.cpa-mm-account b{display:block;font-size:15px}.cpa-mm-account small{color:#9aa1c3;font-size:12px}
.cpa-mm-av,.cpa-av{display:grid;place-items:center;flex:none;width:38px;height:38px;overflow:hidden;border-radius:50%;background:linear-gradient(135deg,#6f5cff,#2fb7a6);color:#fff;font-weight:800}
.cpa-mm-av img,.cpa-av img{width:100%;height:100%;object-fit:cover}
.cpa-mm-shelf{display:flex;align-items:center;gap:10px;padding:12px 14px;border:1px solid #6a3a5a;border-radius:12px;background:#2a1a2c;color:#ffd5e2;font-size:16px;font-weight:800;text-decoration:none}
.cpa-mm-shelf svg{color:#ff8fb0}
.cpa-mm-shelf b{margin-left:auto;padding:1px 9px;border-radius:999px;background:#e0577f;color:#fff;font-size:12px}
.cpa-mm-shelf b[hidden]{display:none}
.cp-mobile-menu .cp-nav-collection{display:none!important}   /* 我的收藏 is the card above */

/* ---- 我的帳號 ---- */
.cpa-account{width:min(820px,100%);margin:0 auto;padding:6px 0 30px}
.cpa-eyebrow{margin:0;color:#b9a7ff;font:700 11px/1.4 'Space Grotesk',sans-serif;letter-spacing:.16em}
.cpa-head{display:flex;align-items:center;gap:16px;margin-bottom:20px}
.cpa-av{width:64px;height:64px;font-size:26px}
.cpa-head h1{margin:2px 0 4px;color:#f4f2ff;font-size:28px}.cpa-head p{margin:0;color:#9aa1c3}
.cpa-card{margin:0 0 16px;padding:18px 20px;border:1px solid #262b45;border-radius:16px;background:#11152a}
.cpa-card h2{margin:0 0 6px;color:#f4f2ff;font-size:17px}.cpa-card>p{margin:0 0 12px;color:#9aa1c3;font-size:14px}
.cpa-quick{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:10px}
.cpa-quick a{display:flex;align-items:center;gap:10px;padding:12px;border:1px solid #262b45;border-radius:12px;background:#161b35;color:inherit;text-decoration:none}
.cpa-quick a:hover{border-color:#9b86ff}.cpa-quick svg{color:#ff8fb0}
.cpa-quick b{display:block;color:#f4f2ff;font-size:14px}.cpa-quick small{color:#9aa1c3;font-size:12px}
.cpa-ico{display:grid;place-items:center;width:22px;color:#f0cf86;font-size:18px}
.cpa-links{display:grid;gap:10px;margin:0;padding:0;list-style:none}
.cpa-link{display:grid;grid-template-columns:40px minmax(0,1fr) auto;align-items:center;gap:12px;padding:10px 12px;border:1px solid #262b45;border-radius:12px;background:#161b35}
.cpa-link b{display:block;color:#f4f2ff;font-size:15px}.cpa-link small{color:#9aa1c3;font-size:12px}
.cpa-mark{display:grid;place-items:center;width:40px;height:40px;border-radius:10px;background:#fff;color:#4285f4;font-weight:900;font-size:18px}
.cpa-link.steam .cpa-mark{background:#171a21;color:#c7d5e0;border:1px solid #2a475e}
.cpa-only{color:#9aa1c3;font-size:12px}
.cpa-btn{display:inline-flex;align-items:center;justify-content:center;padding:8px 16px;border:1px solid #3d4275;border-radius:10px;background:#1b1f3a;color:#e6e4fb;font:inherit;font-size:14px;font-weight:700;text-decoration:none;cursor:pointer}
.cpa-btn:hover{border-color:#9b86ff}
.cpa-btn.is-primary{border-color:#8f7cf0;background:linear-gradient(110deg,#6f5cff,#7f67e8);color:#fff}
.cpa-btn.is-danger{border-color:#a8506f;background:#3a1a2b;color:#ffd5e2}
.cpa-btn:disabled{opacity:.5;cursor:not-allowed}
.cpa-card.is-danger{border-color:#5a2840;background:#1a1220}
.cpa-confirm{max-width:440px}
.cpa-confirm h2{margin:0 0 8px;font-size:20px}.cpa-confirm p{color:#cfd3ea;font-size:14px}
.cpa-confirm label{display:grid;gap:6px;margin:14px 0;color:#c1c6df;font-size:13px}
.cpa-confirm input{min-height:40px;padding:0 12px;border:1px solid #3d4275;border-radius:10px;background:#0e1122;color:#f4f2ff;font:inherit}
.cpa-confirm-actions{display:flex;justify-content:flex-end;gap:10px}
@media(max-width:700px){.cpa-quick{grid-template-columns:1fr}.cpa-head h1{font-size:23px}.cpa-av{width:54px;height:54px;font-size:22px}.cpa-link{grid-template-columns:40px minmax(0,1fr)}.cpa-link>.cpa-btn,.cpa-link>.cpa-only{grid-column:1/-1}}

/* ---- 收藏 page: the account bar only when it has something to say (cobyplay-library.js) ---- */
.cp-library-account:empty{display:none}
.cp-library-account .cpa-manage{color:#b9a7ff;font-size:14px;font-weight:700;text-decoration:none;align-self:center;white-space:nowrap}
.cp-library-account .cpa-manage:hover{color:#d6ccff}

/* ---- phones: the search as one bar; tapping opens it as a page of its own ---- */
.cpa-search-fold,.cpa-search-close{display:none}
@media(max-width:700px){
  .cpa-search-fold{display:grid;gap:8px;margin:0 0 6px}
  html:not(.cpa-search-open) .cp-search-workspace .cp-search-panel{display:none}
  .cpa-search-bar{display:flex;align-items:center;gap:10px;width:100%;min-height:58px;padding:0 14px;border:1px solid transparent;border-radius:16px;
    background:linear-gradient(#141831,#141831) padding-box,linear-gradient(120deg,#8f7cf0,#2fb7a6) border-box;color:#f4f2ff;font:inherit;text-align:left;cursor:pointer;box-shadow:0 8px 28px #6f5cff22}
  .cpa-sparkle{color:#b9a7ff;font-size:17px}
  .cpa-sc-label{flex:none;padding:3px 8px;border-radius:8px;background:#2a2452;color:#e3dcff;font-size:12px;font-weight:800}
  .cpa-sc-text{flex:1;min-width:0;overflow:hidden;color:#8f96b8;font-size:15px;text-overflow:ellipsis;white-space:nowrap}
  .cpa-sc-text.is-filled{color:#f4f2ff}
  .cpa-sc-icon{color:#b9a7ff;font-size:20px}
  .cpa-se-ideas,.cpa-se-picked{display:flex;gap:6px;overflow-x:auto;scrollbar-width:none}
  .cpa-se-ideas::-webkit-scrollbar{display:none}
  .cpa-se-ideas button{flex:none;padding:6px 12px;border:1px solid #383d6a;border-radius:999px;background:#14182d;color:#d8dbf0;font:inherit;font-size:13px;cursor:pointer}
  .cpa-se-picked{flex-wrap:wrap;align-items:center;overflow:visible;padding:8px 10px;border:1px solid #4a4580;border-radius:12px;background:#171b33}
  .cpa-se-picked[hidden]{display:none}
  .cpa-se-picked>span{flex:none;color:#b9a7ff;font-size:12px;font-weight:800}
  .cpa-se-picked button{flex:none;padding:4px 10px;border:1px solid #8f7cf0;border-radius:999px;background:#262150;color:#f4f2ff;font:inherit;font-size:12px}
  .cpa-se-picked .cpa-se-edit{margin-left:auto;border-color:transparent;background:transparent;color:#b9a7ff}
  /* the opened search: the whole panel as a page */
  html.cpa-search-open,html.cpa-search-open body{overflow:hidden}
  html.cpa-search-open .cp-search-workspace .cp-search-panel{position:fixed;inset:0;z-index:1000;display:block;margin:0;padding:58px 16px 24px;overflow-y:auto;border:0;border-radius:0;background:#090b16}
  html.cpa-search-open .cpa-search-close{position:absolute;top:12px;right:14px;display:grid;place-items:center;width:38px;height:38px;padding:0;border:1px solid #3d4275;border-radius:50%;background:#14182d;color:#e6e4fb;font:24px/1 sans-serif;cursor:pointer}
  html.cpa-search-open .cpx-stage,html.cpa-search-open #cpx-phase{display:none}
  /* every option in view: rows wrap instead of scrolling sideways */
  html.cpa-search-open .cp-search-panel .preference-list{flex-wrap:wrap!important;overflow:visible!important;row-gap:8px}
  /* with everything open the list is long: 開始推薦 stays at the bottom of the sheet (the 清除 row then scrolls with the list) */
  html.cpa-search-open .cp-search-panel .cp-search-action{position:sticky;bottom:-24px;z-index:3;margin:0 -16px;padding:12px 16px 24px;background:linear-gradient(#090b1600,#090b16 22%)}
  html.cpa-search-open .cp-search-panel .preference-footer{position:static!important}
  /* above the sticky header: .hero (and its parents) may be their own stacking context (the 首頁主視覺 overlap) */
  html.cpa-search-open body.cp-app .shell>main>.hero,html.cpa-search-open body.cp-app .shell>main{position:relative;z-index:5000!important}
}
.cp-library-account .cp-library-provider{margin-left:6px;padding:1px 8px;border:1px solid #3d4275;border-radius:999px;color:#9aa1c3;font-size:12px;font-weight:600}
.cpa-mm-badge{display:inline-block;margin:3px 0 2px;padding:1px 8px;border:1px solid #b08a3e;border-radius:999px;background:#2a2213;color:#f0cf86;font-size:11px;font-weight:800}
.cpa-mm-account small{display:block}

/* ---- 喵籤所 wide screens (志文 2026-11-22: 「中間空了一段，左右的配置不太協調」) ----
   Keeps RD's rule (cobyplay-ui.css): the intro on the page's left edge, the shrine centred in the rest.
   What changes is the proportion: the intro gets 600px (the five moods fit one row, the 命盤 box spans it),
   the shrine grows to 680px — its picture is mostly air, so at 560px it read as a small island — and
   the two sit on the same middle line instead of both hanging from the top. */
@media (min-width: 1051px) {
  body.cp-app .cp-fortune-layout { grid-template-columns: minmax(0, 600px) minmax(0, 1fr); column-gap: 48px; align-items: center; }
  body.cp-app .cp-fortune-stage .cp-shrine-scene { max-width: 680px; }
  body.cp-app .cp-fortune-intro .cp-fortune-chart { max-width: none; }
  body.cp-app .cp-fortune-intro .cp-moods { max-width: none; flex-wrap: wrap; }
  body.cp-app .cp-fortune-intro .cp-moods button { white-space: nowrap; }
}
