/* LateFind 會員與收藏: header buttons, ♡ buttons, login dialog, 收藏 page. Theme tokens from latefind-theme.css. */
:root{--lf-rose:#e0577f;--lf-rose-soft:#ff8fb0}

/* Header: ♡ 收藏 (count) + 登入 / account name */
.lf-member-nav{display:flex;align-items:center;gap:8px;margin-right:4px}
.lf-shelf-link{position:relative;display:inline-flex;align-items:center;gap:6px;padding:7px 11px;border:1px solid #3e3b47;border-radius:10px;color:#e4dcef;font-size:14px;text-decoration:none;white-space:nowrap}
.lf-shelf-link svg{color:var(--lf-rose)}
.lf-shelf-link:hover{border-color:#6a5a80}
.lf-shelf-link b{min-width:18px;padding:0 5px;border-radius:999px;background:var(--lf-rose);color:#fff;font-size:11px;line-height:18px;text-align:center}
.lf-login-btn{padding:7px 14px;border:1px solid #8f73b5;border-radius:10px;background:linear-gradient(110deg,#7754a6,#885cb4);color:#fff;font:inherit;font-size:14px;font-weight:700;cursor:pointer;white-space:nowrap}
.lf-login-btn.is-member{max-width:140px;overflow:hidden;text-overflow:ellipsis;background:#2a2433;border-color:#5a4f6d}
.detail-page header .lf-member-nav{margin-left:auto;margin-right:12px}
@media(max-width:740px){
  .lf-member-nav{gap:6px;margin:0}
  .lf-shelf-link{padding:7px 8px}.lf-shelf-link span{display:none}
  .lf-login-btn{padding:7px 10px;font-size:13px}.lf-login-btn.is-member{max-width:84px}
}

/* ♡ buttons */
.lf-fav{display:inline-flex;align-items:center;justify-content:center;gap:6px;border:1px solid #5a4f6d;border-radius:10px;background:#221f29;color:#e4dcef;font:inherit;font-size:14px;font-weight:700;cursor:pointer;transition:background .2s,border-color .2s,color .2s,transform .15s}
.lf-fav svg{color:#8f86a0;transition:color .2s}
.lf-fav:hover{border-color:#a688cf}
.lf-fav[aria-pressed="true"]{border-color:#a8506f;background:#3a1a2b;color:#ffd5e2}
.lf-fav[aria-pressed="true"] svg{color:var(--lf-rose-soft)}
.lf-fav.is-pop{transform:scale(1.12)}
.lf-fav-text{padding:9px 14px}
/* game cards: 「♡ 收藏遊戲」 under the info, above the card's own full-size 查看詳情 button */
.lf-fav-card{position:relative;z-index:3;align-self:flex-start;margin-top:12px;padding:7px 14px;border-color:#6a5a86;border-radius:10px;background:#1c1824;color:#e4dcef;font-size:14px}
.lf-fav-card svg{width:16px;height:16px;color:#cdb8ef}
.lf-fav-card[aria-pressed="false"] svg path{fill:none;stroke:currentColor;stroke-width:2}
.lf-fav-card:hover{background:#262033}
.lf-fav-icon{position:absolute;top:8px;right:8px;z-index:3;width:36px;height:36px;padding:0;border-radius:999px;border-color:#ffffff30;background:#141218b3;backdrop-filter:blur(4px)}
.lf-fav-icon svg{color:#fff;opacity:.85}
.lf-fav-icon[aria-pressed="true"]{background:#3a1a2be6}
.lf-fav-icon[aria-pressed="true"] svg{opacity:1}
article.game.card .game-cover{position:relative}
.drawer-actions .lf-fav{margin-top:8px;width:100%}
.lf-fx-game .lf-fav{margin-top:10px;width:100%}
@media(prefers-reduced-motion:reduce){.lf-fav.is-pop{transform:none}}

/* Login dialog */
.lf-login{width:min(440px,calc(100vw - 24px));padding:30px 28px 22px;border:1px solid #4a3d5c;border-radius:20px;background:radial-gradient(ellipse at 50% -10%,#8a5cc433,transparent 55%),#18171c;color:var(--ink);box-shadow:0 30px 80px #000b}
.lf-login::backdrop{background:#07070acc;backdrop-filter:blur(3px)}
.lf-login-close{position:absolute;top:12px;right:12px;width:34px;height:34px;border:1px solid #4a4058;border-radius:10px;background:#221f29;color:#eee;font-size:18px;cursor:pointer}
.lf-login h2{margin:4px 0 8px;color:#f6f0fb;font-size:24px;line-height:1.4}
.lf-login-lede{margin:0 0 18px;color:#c3bccd;font-size:15px}
.lf-providers{display:grid;gap:10px}
.lf-provider{display:grid;grid-template-columns:34px 1fr;align-items:center;gap:10px;padding:12px 14px;border:1px solid #4a4357;border-radius:12px;background:#221f29;color:#f1ebf8;font-size:15px;font-weight:700;text-decoration:none}
.lf-provider span{display:grid;place-items:center;width:34px;height:34px;border-radius:9px;background:#fff;color:#1d1a24;font-weight:900}
.lf-provider.steam span{background:#1b2838;color:#c7d5e0}
.lf-provider:hover:not(.is-off){border-color:#a688cf;background:#2a2433}
.lf-provider.is-off{opacity:.5;cursor:not-allowed}
.lf-login-note{margin:12px 0 0;color:#b9b0c6;font-size:13px}
.lf-login-note.is-warn{padding:9px 12px;border-radius:10px;background:#3a2a1a;color:#f3d9b0}
.lf-login-points{margin:16px 0 0;padding-left:18px;color:#a79fb3;font-size:13px;line-height:1.8}
.lf-login-later{display:block;margin:16px auto 0;border:0;background:none;color:#cfc6da;font:inherit;font-size:14px;cursor:pointer}
.lf-login-later:hover{color:#fff}

/* 收藏 page */
.lf-shelf{padding:34px 0 10px}
.lf-shelf-head{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin-bottom:20px;padding-bottom:18px;border-bottom:1px solid var(--line)}
.lf-shelf-head h1{margin:0 0 6px;color:#f6f0fb;font-size:34px;line-height:1.3}
.lf-shelf-head p{margin:0;color:var(--muted)}
.lf-shelf-head .primary,.lf-shelf-empty .primary{display:inline-flex;padding:11px 18px;border-radius:12px;font-weight:700;text-decoration:none;white-space:nowrap}
.lf-shelf-account{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;margin-bottom:18px;padding:16px 18px;border:1px solid #43364f;border-radius:16px;background:radial-gradient(ellipse at 0 0,#8a5cc41f,transparent 50%),#1b1a20}
.lf-shelf-account b{color:var(--ink);font-size:16px}
.lf-shelf-account p{margin:4px 0 0;color:var(--muted);font-size:14px}
.lf-shelf-provider{margin-left:8px;padding:2px 8px;border:1px solid #4a4357;border-radius:999px;color:#b9afc6;font-size:11px}
.lf-shelf-actions{display:flex;flex-wrap:wrap;gap:8px}
.lf-shelf-account button{padding:9px 14px;border:1px solid #5a4f6d;border-radius:10px;background:#221f29;color:#ece3f8;font:inherit;font-size:14px;cursor:pointer}
.lf-shelf-account button.primary{border-color:#b39bd6}
.lf-shelf-toolbar{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;margin-bottom:18px}
.lf-shelf-toolbar label{display:flex;align-items:center;gap:8px;color:var(--muted);font-size:14px}
.lf-shelf-toolbar input,.lf-shelf-toolbar select{padding:9px 12px;border:1px solid var(--line);border-radius:10px;background:#1a1b1f;color:var(--ink);font:inherit}
.lf-shelf-toolbar input{width:min(320px,60vw)}
#lf-shelf-count{color:var(--muted);font-size:14px}
.lf-shelf-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:22px}
.lf-shelf-card{display:grid;gap:10px;align-content:start}
.lf-shelf-card a{display:grid;gap:8px;color:inherit;text-decoration:none}
.lf-shelf-card strong{color:var(--ink);font-size:16px;line-height:1.4}
.lf-shelf-card a:hover strong{color:#e6d6f8}
.lf-shelf-card .lf-fav{justify-self:start}
.lf-shelf-empty{display:grid;justify-items:center;gap:8px;grid-column:1/-1;padding:44px 20px;border:1px dashed #44404e;border-radius:18px;text-align:center;color:var(--muted)}
.lf-shelf-empty>span{color:var(--lf-rose)}.lf-shelf-empty>span svg{width:34px;height:34px}
.lf-shelf-empty h2{margin:4px 0 0;color:var(--ink);font-size:20px}.lf-shelf-empty p{margin:0 0 8px}
@media(max-width:740px){.lf-shelf-head{flex-direction:column;align-items:flex-start}.lf-shelf-head h1{font-size:28px}.lf-shelf-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.lf-shelf-card .lf-fav{width:100%}}

/* Phones (like CobyPlay): one row — logo, ♡ 收藏, 登入, ☰. The nav, the language picker and the 18+
   note live in the ☰ drawer (latefind-member.js mobileMenu). */
.lf-menu-toggle{display:none}
.lf-login-avatar{display:none;font-weight:800;font-size:15px;line-height:1}
/* Signed in: a round initial + the name (long names end in …); phones show the initial only. */
.lf-login-btn.is-member{display:inline-flex;align-items:center;gap:8px;max-width:none;padding:4px 12px 4px 4px;border-radius:999px}
.lf-login-btn.is-member .lf-login-avatar{order:-1}
.lf-login-btn.is-member .lf-login-avatar{display:grid;place-items:center;flex:none;width:28px;height:28px;border-radius:50%;background:linear-gradient(135deg,#7754a6,#c4566f);color:#fff;font-size:13px}
.lf-login-name{max-width:140px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media(min-width:741px) and (max-width:1240px){.lf-login-name{max-width:96px}}
.lf-mm-shelf{display:flex;align-items:center;gap:10px;margin:0 0 12px;padding:12px 14px;border:1px solid #6a3a5a;border-radius:12px;background:#2a1a28;color:#ffd5e2;font-size:16px;font-weight:800;text-decoration:none}
.lf-mm-shelf svg{color:var(--lf-rose-soft,#ff8fb0)}
.lf-mm-shelf b{margin-left:auto;padding:1px 9px;border-radius:999px;background:#e0577f;color:#fff;font-size:12px}
.lf-mm-shelf b[hidden]{display:none}
@media(max-width:740px){
  body:not(.lf-no-menu) .header .header-inner{flex-wrap:nowrap!important;align-items:center;gap:8px}
  .header .header-inner>.brand{order:1}.header .header-inner>.header-status{order:2}.header .header-inner>.lf-menu-toggle{order:3}
  .header .header-inner nav{display:none!important}
  .header .header-status{display:flex!important;align-items:center;gap:8px;margin-left:auto}
  .header .header-status .language-switch,.header .header-status .audience-badge{display:none!important}
  .header .lf-member-nav{order:0;padding:0;gap:8px}
  .header .lf-shelf-link span{display:inline}
  .header .lf-shelf-link{padding:7px 11px;gap:5px}
  .header .lf-login-btn{max-width:104px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:7px 11px}
  .header .lf-login-btn.is-member{padding:3px;gap:0;border-radius:50%}
  .header .lf-login-btn.is-member .lf-login-name{display:none}
  .header .lf-login-btn.is-member .lf-login-avatar{width:32px;height:32px;font-size:14px}
  .header .brand img.nightplay-logo{width:128px;height:auto}
  .lf-menu-toggle{display:flex;flex:none;flex-direction:column;align-items:center;justify-content:center;gap:4px;width:40px;height:38px;padding:0;border:1px solid #4a3d5c;border-radius:10px;background:#1c1824;color:#e4dcef;cursor:pointer}
  .lf-menu-toggle span{display:block;width:18px;height:2px;border-radius:2px;background:currentColor}
}
/* 375px phones, signed in with favourites (en ♡ Saved 12): logo + ♡ + avatar + ☰ ran 14px past the edge,
   ja's お気に入り further (debug 2026-11-21). Nothing hidden: the logo cobyplay-parity already uses from
   360px down, tighter gaps and padding, a smaller ♡ label — which, only if it still cannot fit, ends in …
   rather than pushing ☰ off the screen. */
@media(max-width:380px){
  :root{--brand-logo-width:120px;--brand-logo-height:40px}
  body:not(.lf-no-menu) .header .header-inner{gap:5px}
  .header .header-status{gap:4px;min-width:0}
  .header .lf-member-nav{gap:4px;min-width:0}
  .header .lf-shelf-link{min-width:0;padding:7px 7px;gap:4px;font-size:12px}
  .header .lf-shelf-link span{min-width:0;overflow:hidden;text-overflow:ellipsis}
  .header .lf-shelf-link svg,.header .lf-shelf-link b,.header .lf-login-btn{flex:none}
}
.lf-mobile-menu{position:fixed;inset:0 0 0 auto;width:min(340px,calc(100vw - 24px));max-width:none;height:100dvh;max-height:100dvh;margin:0;padding:20px;border:0;border-left:1px solid #4a3d5c;border-radius:0;background:linear-gradient(160deg,#1c1726,#120f18);color:#f3ecf8;box-shadow:-24px 0 80px #000a;overflow:auto;overscroll-behavior:contain}
.lf-mobile-menu:not([open]){display:none}
.lf-mobile-menu::backdrop{background:#07050cb3;backdrop-filter:blur(4px)}
.lf-mm-head{display:flex;align-items:center;justify-content:space-between;gap:16px;padding-bottom:16px;margin-bottom:12px;border-bottom:1px solid #ffffff14}
.lf-mm-head h2{margin:0;font-size:18px}
.lf-mm-close{display:grid;place-items:center;width:38px;height:38px;padding:0;border:1px solid #4a3d5c;border-radius:10px;background:#221f29;color:#e4dcef;font:26px/1 sans-serif;cursor:pointer}
.lf-mobile-menu nav{display:grid!important;gap:4px!important;margin:0!important;padding:0!important}
.lf-mobile-menu nav a{display:flex!important;align-items:center;gap:8px;min-height:46px;padding:10px 13px!important;border-radius:10px;color:#cfc4dc!important;font-size:16px!important;text-decoration:none}
.lf-mobile-menu nav a:after{display:none!important}
.lf-mobile-menu nav a.active,.lf-mobile-menu nav a[aria-current=page]{background:#2a2238;color:#fff!important;font-weight:700}
.lf-mobile-menu nav .lfx-dot{position:static;margin-left:2px}
.lf-mm-settings{margin-top:20px;padding-top:18px;border-top:1px solid #ffffff14}
.lf-mm-label{margin:0 0 8px;color:#a99fb8;font-size:13px}
.lf-mobile-menu .language-switch{display:flex!important;align-items:center;gap:8px;width:100%}
.lf-mobile-menu .language-switch select{flex:1;min-height:42px}
.lf-mm-note{display:flex;align-items:center;gap:10px;margin:22px 0 0;padding-top:18px;border-top:1px solid #ffffff14;color:#a99fb8;font-size:13px}
.lf-mm-note b{padding:3px 8px;border:1px solid #6a5a86;border-radius:8px;color:#e4dcef;font-size:14px}

/* Mid widths (tablets, small laptops, longer English labels): keep the header on one line —
   ♡ shows the heart + count only, the nav packs tighter. */
@media(min-width:741px) and (max-width:1240px){
  .lf-shelf-link span{display:none}
  .lf-shelf-link{padding:7px 9px}
  .header nav{gap:16px}
  .header .header-inner{gap:14px}
  .lf-login-btn{padding:7px 11px}
}
@media(min-width:741px) and (max-width:1060px){
  .header nav{gap:12px}
  .header nav a{font-size:14px}
  .audience-badge span{display:none}
}

/* Header that does not fit one line (set by fitHeader() in latefind-member.js): logo + buttons on the
   first row, the nav on its own row underneath. */
@media(min-width:741px){
  .header .header-inner.lf-tight{flex-wrap:wrap;row-gap:0}
  .header .header-inner.lf-tight .brand{order:1}
  .header .header-inner.lf-tight .header-status{order:2;margin-left:auto}
  .header .header-inner.lf-tight:after{content:'';order:9;flex:0 0 100%;height:0}
  .header .header-inner.lf-tight nav{order:10;flex:1 0 100%;overflow-x:auto;scrollbar-width:none}
  .header .header-inner.lf-tight nav a{padding-top:10px;padding-bottom:10px}
}

/* ☰ drawer: 我的帳號 on top */
.lf-mm-account{display:flex;align-items:center;gap:12px;width:100%;margin:0 0 10px;padding:12px 14px;border:1px solid #4a3d5c;border-radius:12px;background:#221f29;color:#f3ecf8;font:inherit;text-align:left;cursor:pointer}
.lf-mm-account b{display:block;font-size:15px}.lf-mm-account small{color:#a99fb8;font-size:12px}
.lf-mm-av,.lf-acc-av{display:grid;place-items:center;flex:none;width:38px;height:38px;border-radius:50%;background:linear-gradient(135deg,#7754a6,#c4566f);color:#fff;font-weight:800}
/* 我的帳號 (account.html) */
.lf-account{max-width:820px;padding-top:30px;padding-bottom:20px}
.lf-acc-head{display:flex;align-items:center;gap:16px;margin-bottom:20px}
.lf-acc-av{width:64px;height:64px;font-size:26px}
.lf-acc-head h1{margin:2px 0 4px;color:#f6f0fb;font-size:28px}.lf-acc-head p{margin:0;color:var(--muted)}
.lf-acc-note{margin:0 0 16px;padding:10px 14px;border:1px solid #3f8f5a;border-radius:12px;background:#16261c;color:#cdeed8;font-size:14px}
.lf-acc-card{margin:0 0 16px;padding:18px 20px;border:1px solid var(--line,#33303a);border-radius:16px;background:#1a1820}
.lf-acc-card h2{margin:0 0 6px;color:#f3ecf8;font-size:17px}.lf-acc-card>p{margin:0 0 12px;color:var(--muted);font-size:14px}
.lf-acc-quick{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:10px}
.lf-acc-quick a{display:flex;align-items:center;gap:10px;padding:12px;border:1px solid #33303a;border-radius:12px;background:#211d2a;color:inherit;text-decoration:none}
.lf-acc-quick a:hover{border-color:#a688cf}.lf-acc-quick svg{color:var(--lf-rose-soft,#ff8fb0)}
.lf-acc-quick b{display:block;font-size:14px}.lf-acc-quick small{color:#a99fb8;font-size:12px}
.lf-acc-ico{display:grid;place-items:center;width:22px;color:#f0cf86;font-size:18px}
.lf-acc-links{display:grid;gap:10px;margin:0;padding:0;list-style:none}
.lf-acc-link{display:grid;grid-template-columns:40px minmax(0,1fr) auto;align-items:center;gap:12px;padding:10px 12px;border:1px solid #33303a;border-radius:12px;background:#211d2a}
.lf-acc-link b{display:block;font-size:15px}.lf-acc-link small{color:#a99fb8;font-size:12px}
.lf-acc-mark{display:grid;place-items:center;width:40px;height:40px;border-radius:10px;background:#fff;color:#4285f4;font-weight:900;font-size:18px}
.lf-acc-link.steam .lf-acc-mark{background:#171a21;color:#c7d5e0;border:1px solid #2a475e}
.lf-acc-only{color:#a99fb8;font-size:12px}
.lf-acc-btn{display:inline-flex;align-items:center;justify-content:center;padding:8px 16px;border:1px solid #5a4f6d;border-radius:10px;background:#221f29;color:#e4dcef;font:inherit;font-size:14px;font-weight:700;text-decoration:none;cursor:pointer}
.lf-acc-btn:hover{border-color:#a688cf}
.lf-acc-btn.is-primary{border-color:#b39bd6;background:linear-gradient(110deg,#7754a6,#885cb4);color:#fff}
.lf-acc-btn.is-danger{border-color:#a8506f;background:#3a1a2b;color:#ffd5e2}
.lf-acc-btn:disabled{opacity:.5;cursor:not-allowed}
.lf-acc-card.is-danger{border-color:#5a2840;background:#1d1419}
.lf-acc-confirm{max-width:440px;padding:24px}
.lf-acc-confirm h2{margin:0 0 8px;font-size:20px}.lf-acc-confirm p{color:#d4c8dc;font-size:14px}
.lf-acc-confirm label{display:grid;gap:6px;margin:14px 0;color:#c9bdd8;font-size:13px}
.lf-acc-confirm input{min-height:40px;padding:0 12px;border:1px solid #4a3d5c;border-radius:10px;background:#16151a;color:#f3ecf8;font:inherit}
.lf-acc-confirm-actions{display:flex;justify-content:flex-end;gap:10px}
.lf-shelf-manage{color:#d9b8f6;font-size:14px;font-weight:700;text-decoration:none;align-self:center}
@media(max-width:740px){.lf-acc-quick{grid-template-columns:1fr}.lf-acc-link{grid-template-columns:36px minmax(0,1fr)}.lf-acc-link>.lf-acc-btn,.lf-acc-link>.lf-acc-only{grid-column:1/-1;justify-self:start}}
.lf-login-avatar,.lf-mm-av,.lf-acc-av{overflow:hidden}
.lf-av-img{display:block;width:100%;height:100%;border-radius:50%;object-fit:cover}
/* Before the session is known (latefind-member.js header()): the button keeps its place, empty, in the
   member button's dark colours, and takes no tap (UX review 2026-11-21 #12). */
.lf-login-btn[data-lf-pending]{background:#2a2433;border-color:#5a4f6d;cursor:default}
.lf-login-btn[data-lf-pending]>span{visibility:hidden}
