
/* 標題頁專用樣式（獨立檔案 css/title.css，由 index.html 在 style.css 之後載入；不要併回 style.css）
   ===== 標題頁 v3：選單全部按鈕化（繼續遊戲＝金屬色主按鈕；沒有存檔時「開始遊戲」變金屬主按鈕） ===== */
.title-menu { width: 560px; align-items: stretch; gap: 10px; margin-top: 40px; }
.t-continue, .t-start {
  position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  width: 100%; margin: 0; padding: 12px 20px; border-radius: 16px; cursor: pointer;
  font-family: var(--serif); font-size: 28px; font-weight: 600; letter-spacing: 12px; text-indent: 12px;
  transition: transform .2s, filter .2s, box-shadow .2s, background .25s, color .25s, border-color .25s;
}
.t-continue[hidden] { display: none; }
/* 金屬色：有存檔時的「繼續遊戲」，沒有存檔時的「開始遊戲」 */
.t-continue, .t-continue[hidden] + .t-start {
  border: 1px solid #f9e8c2; color: #3a2420;
  background: linear-gradient(118deg, #8f6a38 0%, #e9cd96 14%, #fff3d2 26%, #d4aa6a 42%, #a97c43 58%, #e6c88e 76%, #fff0c8 88%, #b58a4d 100%);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .4), inset 0 1px 0 rgba(255, 255, 255, .7), inset 0 -2px 0 rgba(90, 58, 24, .35);
  text-shadow: 0 1px 0 rgba(255, 244, 214, .55);
}
.t-continue::after, .t-continue[hidden] + .t-start::after {
  content: ''; position: absolute; top: 0; bottom: 0; left: -40%; width: 30%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .55), transparent); transform: skewX(-18deg);
  animation: metalSheen 4.5s ease-in-out infinite; pointer-events: none;
}
@keyframes metalSheen { 0%, 55% { left: -40%; } 100% { left: 140%; } }
.t-continue:hover, .t-continue[hidden] + .t-start:hover { filter: brightness(1.08); transform: translateY(-2px); background-color: transparent; color: #3a2420; }
.t-continue small { display: block; font-family: var(--sans); font-size: 17px; font-weight: 400; letter-spacing: 2px; text-indent: 0; color: rgba(58, 36, 32, .78); text-shadow: none; }
.t-continue small::before { content: none; }
/* 有存檔時，「開始遊戲」退成次要的金邊按鈕 */
.t-continue:not([hidden]) + .t-start {
  padding: 10px 20px; font-size: 22px; border: 1px solid rgba(240, 214, 166, .75); color: var(--gold);
  background: rgba(38, 26, 26, .5); box-shadow: inset 0 0 0 1px rgba(240, 214, 166, .1);
}
.t-continue:not([hidden]) + .t-start:hover { background: rgba(240, 214, 166, .16); border-color: var(--gold); transform: translateY(-1px); }
/* 讀取存檔・角色・收藏・設定・作者：三欄的小按鈕 */
.t-links { display: flex; gap: 8px; margin-top: 0; align-items: stretch; }
.t-links i { display: none; }
.t-links button, .t-links button:first-child {
  flex: 1 1 0; padding: 10px 2px; border-radius: 12px; border: 1px solid rgba(240, 214, 166, .32); background: rgba(38, 26, 26, .5);
  font-size: 0; line-height: 1.2; letter-spacing: 0; text-indent: 0; white-space: nowrap; color: rgba(246, 236, 236, .9); transition: color .2s, border-color .2s, background .2s, transform .2s;
}
.t-links button:hover { color: var(--gold); border-color: var(--gold); background: rgba(240, 214, 166, .12); transform: translateY(-1px); }
.t-links .t-donate { flex: 0 0 52px; width: 52px; height: auto; margin: 0; padding: 0; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; }
.t-links .t-donate[hidden] { display: none; }
.t-links .t-donate .ico-boba { width: 24px; height: 24px; }
/* 聊天導流：寬版粉金按鈕 */
.t-note {
  width: 100%; margin-top: 0; padding: 11px 22px; border-radius: 14px; cursor: pointer; justify-content: space-between;
  border: 1px solid rgba(240, 143, 151, .55); background: linear-gradient(110deg, rgba(240, 143, 151, .26), rgba(207, 168, 110, .16));
  font-size: 17px; letter-spacing: 2px; color: #ffdfe2; transition: background .2s, color .2s, transform .2s;
}
.t-note:hover { color: #fff; background: linear-gradient(110deg, rgba(240, 143, 151, .42), rgba(207, 168, 110, .28)); transform: translateY(-1px); }
.t-note span { font-size: 22px; color: var(--gold); }
/* 手機版 */
.is-phone .title-menu { width: 400px; gap: 7px; margin-top: 18px; }
.is-phone .t-continue, .is-phone .t-start { padding: 8px 14px; font-size: 21px; letter-spacing: 8px; text-indent: 8px; border-radius: 13px; }
.is-phone .t-continue small { font-size: 14px; }
.is-phone .t-continue:not([hidden]) + .t-start { padding: 7px 14px; font-size: 17px; }
.is-phone .t-links { gap: 6px; margin-top: 0; }
.is-phone .t-links button, .is-phone .t-links button:first-child { padding: 5px 0; font-size: 0; letter-spacing: 0; text-indent: 0; border-radius: 10px; }
.is-phone .t-links .t-donate { flex: 0 0 38px; width: 38px; margin: 0; padding: 0; }
.is-phone .t-links .t-donate .ico-boba { width: 19px; height: 19px; }
.is-phone .t-note { margin-top: 0; padding: 7px 16px; font-size: 13px; border-radius: 12px; }

/* emoji 按鈕 */
.t-links button::before { font-size: 26px; line-height: 1.2; }
.is-phone .t-links button::before { font-size: 20px; }
.t-links button[data-act="load"]::before { content: "💾"; }
.t-links button[data-modal="profile"]::before { content: "🏆"; }
.t-links button[data-modal="pn-album"]::before { content: "📸"; }
.t-links button[data-modal="pn-setting"]::before { content: "⚙️"; }
.t-links button[data-modal="pn-author"]::before { content: "💗"; }
.t-links .t-donate svg { display: none; }
.t-links .t-donate::before { content: "🧋"; }

/* ===== 角色資料卡 v2：橫版兩欄（左：頭像・資料；右：台詞・結局；下：四格收藏統計） ===== */
.profile {
  width: 1180px; display: grid; grid-template-columns: 1fr 1fr; gap: 26px 52px; align-items: start;
  padding: 44px 52px 40px;
}
.profile .pf-l, .profile .pf-r { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.profile .pf-quote { margin: 0; }
.profile .pf-sec { margin: 6px 0 0; }
.profile .pf-ends { flex-wrap: wrap; margin-top: 0; gap: 10px; }
.profile .pf-ends span { flex: 0 0 62px; padding: 10px 0; }
.profile .pf-stats { grid-column: 1 / -1; gap: 14px; margin-top: 2px; }
.profile .pf-stats button {
  flex: 1; display: flex; align-items: baseline; justify-content: center; gap: 10px; padding: 16px 0;
  border: 1px solid var(--line-soft); border-radius: 14px; background: rgba(38, 26, 26, .28);
  font-size: 20px; letter-spacing: 3px; color: var(--muted); cursor: pointer; transition: background .2s, border-color .2s, transform .2s;
}
.profile .pf-stats button b { margin: 0; font-family: var(--serif); font-size: 32px; letter-spacing: 0; color: var(--ivory); font-variant-numeric: tabular-nums; }
.profile .pf-stats button:hover { border-color: var(--gold); background: rgba(240, 214, 166, .14); transform: translateY(-1px); }
.profile .pf-stats button.static { cursor: default; }
.profile .pf-stats button.static:hover { border-color: var(--line-soft); background: rgba(38, 26, 26, .28); transform: none; }
.is-phone .profile { width: 1100px; gap: 16px 40px; padding: 30px 38px 28px; }
.is-phone .profile .pf-l, .is-phone .profile .pf-r { gap: 12px; }
.is-phone .profile .pf-ends span { flex: 0 0 52px; padding: 7px 0; font-size: 16px; }
.is-phone .profile .pf-stats button { padding: 10px 0; font-size: 17px; }
.is-phone .profile .pf-stats button b { font-size: 26px; }

/* 彈出框的關閉鈕：貼在卡片右上角（圓形 ✕），不再跑到舞台最右邊 */
.modal .sheet-holder .modal-x {
  position: absolute; z-index: 5; right: -16px; top: -16px; left: auto;
  width: 48px; height: 48px; padding: 0; border-radius: 50%;
  display: grid; place-items: center; font-size: 22px; line-height: 1;
  background: rgba(77, 51, 52, .95); border: 1px solid var(--gold); color: var(--gold); cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .4); transition: background .2s, color .2s, transform .2s;
}
.modal .sheet-holder .modal-x:hover { background: var(--gold); color: var(--plum); transform: scale(1.06); }
.is-phone .modal .sheet-holder .modal-x { width: 40px; height: 40px; right: -12px; top: -12px; font-size: 18px; }

/* 作者頁：小小一塊（沐桑 Musun ＋ Threads 連結 ＋ 珍奶） */
#pn-author { width: 460px; }
#author-box.author { gap: 12px; font-size: 20px; align-items: flex-start; }
#author-box .au-name { font-size: 40px; letter-spacing: 6px; }
#author-box .au-name small { margin-left: 14px; font-family: var(--sans); font-size: 18px; letter-spacing: 3px; color: var(--gold); }
#author-box .au-threads {
  display: inline-flex; align-items: center; gap: 12px; padding: 10px 20px; border-radius: 14px;
  border: 1px solid var(--line-soft); background: rgba(38, 26, 26, .3); color: var(--ivory); text-decoration: none; letter-spacing: 2px;
  transition: border-color .2s, background .2s;
}
#author-box .au-threads i { font-style: normal; color: var(--gold); }
#author-box .au-threads:hover { border-color: var(--gold); background: rgba(240, 214, 166, .12); }
#author-box .au-donate { margin-top: 4px; padding: 8px 16px; }
.is-phone #pn-author { width: 400px; }
.is-phone #author-box .au-name { font-size: 32px; }
