/* Sub-pages: 紀錄 / 設定 / 個人檔案 / 創作指南 */
body { background: #0b0b0b; }
.pg { width: min(1220px, 100%); margin: 0 auto; padding: 88px 24px 80px; }
.pg-narrow { width: min(740px, 100%); }
.pg-head { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.pg-head h1 { margin: 0; font-size: 24px; font-weight: 800; }
.pg-head p { margin: 4px 0 0; color: #fffa; font-size: 14px; }
.pg-head .grow { flex: 1; }
.pg-back { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; color: #fff; }
.pg-back:hover { background: rgba(255,255,255,.06); }
.pg svg, .pk svg, .fb svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pg-sel { height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid rgba(255,255,255,.1); background: #1a1a1a; color: #fff; font: inherit; font-weight: 800; font-size: 13px; }

/* 紀錄 */
.hist-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 20px 18px; margin: 0; padding: 0; list-style: none; }
.hist-grid a { color: inherit; text-decoration: none; display: block; }
.hist-grid .ph { aspect-ratio: 9 / 16; border-radius: 10px; overflow: hidden; background: #151515; }
.hist-grid img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; display: block; transition: transform .25s; }
.hist-grid a:hover img { transform: scale(1.03); }
.hist-grid b { display: block; margin-top: 8px; font-size: 15px; }
.hist-grid .rd { font-size: 13px; color: #fffb; }
.hist-grid small { display: flex; gap: 8px; font-size: 11px; color: #fff8; }
.hist-grid small i { font-style: normal; color: #e8487a; }
.pg-empty { padding: 60px 20px; text-align: center; color: #fff9; border-radius: 16px; background: #121212; }
.pg-empty a { display: inline-block; margin-top: 14px; padding: 10px 18px; border-radius: 999px; background: #e5243b; color: #fff; text-decoration: none; font-weight: 800; }

/* 設定 */
.st-sec { margin: 22px 0 8px 4px; font-size: 13px; font-weight: 800; letter-spacing: .12em; color: #fff8; }
.st-group { border-radius: 14px; background: #161616; border: 1px solid rgba(255,255,255,.05); overflow: hidden; }
.st-row { width: 100%; display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 10px 14px; border: 0; border-bottom: 1px solid rgba(255,255,255,.06); background: none; color: #fff; font: inherit; font-size: 15px; text-align: left; cursor: pointer; text-decoration: none; }
.st-row:last-child { border-bottom: 0; }
.st-row:hover { background: rgba(255,255,255,.03); }
.st-row .l { flex: 1; min-width: 0; }
.st-row .l small { display: block; font-size: 12px; color: #fff8; margin-top: 2px; }
.st-row .v { color: #fff9; font-size: 14px; }
.st-row .chev { width: 16px; height: 16px; color: #fff6; }
.st-row.danger { color: #ff5a5a; }
.st-row.static { cursor: default; }
.tg { position: relative; width: 48px; height: 28px; border-radius: 999px; background: #333; transition: background .2s; flex: none; }
.tg::after { content: ""; position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .2s; }
.tg.on { background: #e5243b; }
.tg.on::after { transform: translateX(20px); }

/* picker sheet */
.pk-scrim { position: fixed; inset: 0; z-index: 210; display: grid; place-items: center; padding: 16px; background: rgba(0,0,0,.66); animation: pkF .18s; }
.pk { width: min(560px, 100%); max-height: min(760px, calc(100dvh - 32px)); display: flex; flex-direction: column; padding: 22px 20px; border-radius: 22px; background: #151515; border: 1px solid rgba(255,255,255,.08); color: #fff; animation: pkU .22s cubic-bezier(.2,.8,.2,1); }
.pk-t { padding: 0 8px; font-size: 14px; font-weight: 800; letter-spacing: .14em; color: #fff9; }
.pk-s { padding: 6px 8px 0; font-size: 14px; color: #fffb; }
.pk-list { margin-top: 10px; overflow: auto; scrollbar-width: thin; }
.pk-list button { width: 100%; display: flex; align-items: center; gap: 16px; min-height: 64px; padding: 0 16px; border: 2px solid transparent; border-bottom: 1px solid rgba(255,255,255,.07); border-radius: 0; background: none; color: #fff; font: inherit; font-size: 17px; text-align: left; cursor: pointer; }
.pk-list button:hover { background: rgba(255,255,255,.04); }
.pk-list button.on.pk-multi, .pk-list button.on:has(.pk-ic) { border: 2px solid #e0336b; border-radius: 12px; }
.pk-list button span:nth-child(2), .pk-list button > span:only-child { flex: 1; }
.pk-ic { width: 22px; display: grid; place-items: center; }
.pk-ic svg { width: 20px; height: 20px; }
.pk-ck { margin-left: auto; }
@keyframes pkF { from { opacity: 0; } } @keyframes pkU { from { opacity: 0; transform: translateY(14px) scale(.98); } }

/* feedback */
.fb { position: relative; width: min(640px, 100%); padding: 28px 30px 24px; border-radius: 22px; background: #151515; border: 1px solid rgba(255,255,255,.08); color: #fff; animation: pkU .22s; }
.fb h2 { margin: 0; font-size: 22px; }
.fb > p { margin: 6px 0 18px; color: #fffb; }
.fb-x { position: absolute; right: 18px; top: 18px; width: 40px; height: 40px; border: 0; border-radius: 12px; background: none; color: #fff; cursor: pointer; display: grid; place-items: center; }
.fb-l { display: block; margin: 0 0 10px; font-size: 13px; }
.fb-k { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 18px; }
.fb-k button { height: 44px; border-radius: 999px; border: 1px solid rgba(255,255,255,.18); background: none; color: #fff; font: inherit; font-weight: 800; cursor: pointer; }
.fb-k button.on { background: #fff; color: #111; }
.fb textarea { width: 100%; height: 180px; margin-bottom: 18px; padding: 14px; box-sizing: border-box; border-radius: 14px; border: 2px solid rgba(255,255,255,.12); background: #1d1d1d; color: #fff; font: inherit; font-size: 15px; resize: vertical; outline: 0; }
.fb textarea:focus { border-color: #e0336b; }
.fb-shot { display: inline-flex; align-items: center; gap: 8px; height: 50px; padding: 0 18px; border-radius: 12px; border: 1px solid rgba(255,255,255,.18); font-weight: 800; cursor: pointer; }
.fb-foot { display: flex; align-items: center; gap: 12px; margin-top: 26px; }
.fb-foot small { flex: 1; font-size: 12px; color: #fffa; }
.fb-foot button { height: 50px; padding: 0 22px; border-radius: 12px; font: inherit; font-weight: 900; cursor: pointer; }
.fb-c { border: 1px solid rgba(255,255,255,.18); background: none; color: #fff; }
.fb-send { border: 0; background: #e5243b; color: #fff; }
.fb-send:disabled { background: #222; color: #fff6; cursor: default; }

/* 個人檔案 */
.pf-hero { position: relative; height: 230px; border-radius: 18px; overflow: hidden; background: #161616; }
.pf-hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; opacity: .55; }
.pf-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, #0b0b0b 5%, transparent 70%); }
.pf-id { position: absolute; z-index: 1; left: 24px; right: 24px; bottom: 20px; display: flex; align-items: center; gap: 18px; }
.pf-av { width: 88px; height: 88px; border-radius: 50%; display: grid; place-items: center; font-size: 46px; background: #232323; border: 2px solid rgba(255,255,255,.15); flex: none; }
.pf-id h1 { margin: 0; font-size: 28px; }
.pf-id small { color: #fffb; font-size: 13px; }
.pf-id .grow { flex: 1; }
.pf-btn { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px; border-radius: 12px; border: 0; background: rgba(30,30,30,.9); color: #fff; font: inherit; font-weight: 800; font-size: 13px; text-decoration: none; cursor: pointer; }
.pf-btn svg { width: 16px; height: 16px; }
.pf-stats { display: grid; grid-template-columns: 1fr 1fr 1fr 1.6fr; gap: 16px; margin: 28px 0; }
.pf-stat { padding: 24px 22px; border-radius: 16px; background: #141414; border: 1px solid rgba(255,255,255,.05); min-height: 200px; display: flex; flex-direction: column; justify-content: center; }
.pf-stat b { font-size: 38px; }
.pf-stat span { color: #fffb; }
.pf-bells { justify-content: space-between; padding: 22px 22px 8px; text-align: center; }
.pf-bells .big { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 22px; font-weight: 900; color: #ffcc4d; }
.pf-bells .big svg { width: 48px; height: 48px; stroke: none; }
.pf-bells .big span { color: #fffb; font-size: 14px; font-weight: 700; }
.pf-bells .two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.pf-bells .two button, .pf-bells .links button { height: 42px; border-radius: 10px; font: inherit; font-weight: 900; cursor: pointer; }
.pf-bells .buy { border: 0; background: #ffcc4d; color: #1a1200; }
.pf-bells .free { position: relative; border: 1px solid rgba(255,204,77,.55); background: rgba(255,204,77,.06); color: #ffcc4d; }
.pf-bells .links { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 4px; }
.pf-bells .links button { display: flex; justify-content: space-between; align-items: center; padding: 0 12px; border: 0; background: none; color: #fffd; font-weight: 700; }
.pf-bells .links button.gold { color: #ffcc4d; font-weight: 900; }
.pf-sec { display: flex; align-items: baseline; gap: 8px; margin: 26px 0 12px; }
.pf-sec h2 { margin: 0; font-size: 19px; }
.pf-sec small { color: #fff9; }
.pf-sec a { margin-left: auto; color: #fffd; font-size: 13px; font-weight: 800; text-decoration: none; }
.pf-cta { display: flex; align-items: center; gap: 12px; padding: 16px 16px 16px 18px; border-radius: 14px; background: #141414; border: 1px solid rgba(255,255,255,.05); }
.pf-cta div { flex: 1; } .pf-cta b { display: block; } .pf-cta span { font-size: 13px; color: #fffa; }
.pf-cta a { padding: 8px 12px; border-radius: 8px; background: #e5243b; color: #fff; font-weight: 900; font-size: 13px; text-decoration: none; }
.pf-bonds { display: grid; grid-template-columns: repeat(auto-fill, 116px); gap: 14px; }
.pf-bond { position: relative; aspect-ratio: 116 / 156; border-radius: 10px; overflow: hidden; background: #161616; color: #fff; text-decoration: none; }
.pf-bond img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; }
.pf-bond::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.85), transparent 55%); }
.pf-bond div { position: absolute; z-index: 1; left: 8px; right: 8px; bottom: 8px; }
.pf-bond b { display: block; font-size: 13px; } .pf-bond small { font-size: 11px; color: #fffb; }
.pf-bond i { display: block; height: 3px; margin-top: 5px; border-radius: 2px; background: rgba(255,255,255,.25); overflow: hidden; }
.pf-bond i::before { content: ""; display: block; height: 100%; width: var(--p); background: #e0336b; }
.pf-bond.add { display: grid; place-items: center; border: 1px dashed rgba(255,255,255,.15); background: #0f0f0f; text-align: center; font-size: 13px; font-weight: 800; }
.pf-bond.add::after { display: none; }
.pf-bond.add span { display: grid; place-items: center; width: 34px; height: 34px; margin: 0 auto 8px; border-radius: 50%; border: 1px solid rgba(255,255,255,.3); font-size: 20px; }

/* 編輯個人檔案 */
.ed { display: grid; grid-template-columns: 560px 1fr; gap: 28px; align-items: start; }
.ed-card { padding: 34px 34px 30px; border-radius: 22px; background: #161616; text-align: center; }
.ed-big { width: 140px; height: 140px; margin: 0 auto 14px; border-radius: 50%; border: 2px solid #fff; display: grid; place-items: center; font-size: 80px; background: #222; overflow: hidden; }
.ed-big img { width: 100%; height: 100%; object-fit: cover; }
.ed-up { display: inline-flex; align-items: center; gap: 6px; height: 46px; padding: 0 18px; border-radius: 12px; border: 1px solid rgba(255,255,255,.12); font-weight: 800; cursor: pointer; }
.ed-card h3 { margin: 22px 0 8px; text-align: left; font-size: 13px; color: #fffb; }
.ed-avs { display: flex; flex-wrap: wrap; gap: 12px; }
.ed-avs button { width: 54px; height: 54px; border-radius: 50%; border: 2px solid transparent; background: #262626; font-size: 30px; cursor: pointer; }
.ed-avs button.on { border-color: #fff; }
.ed-f { margin-bottom: 22px; }
.ed-f .lab { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 13px; font-weight: 800; color: #fffb; }
.ed-f input, .ed-f textarea { width: 100%; box-sizing: border-box; padding: 14px 18px; border-radius: 12px; border: 1px solid rgba(255,255,255,.08); background: #1d1d1d; color: #fff; font: inherit; font-size: 15px; outline: 0; resize: vertical; }
.ed-f input:focus, .ed-f textarea:focus { border-color: rgba(255,255,255,.4); }
.ed-seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ed-seg button { height: 50px; border-radius: 12px; border: 1px solid rgba(255,255,255,.06); background: #1a1a1a; color: #fff; font: inherit; font-weight: 800; cursor: pointer; }
.ed-seg button.on { background: #fff; color: #111; }
.ed-acct { padding-top: 18px; border-top: 1px solid rgba(255,255,255,.08); font-size: 14px; }
.ed-acct b { display: block; margin-bottom: 6px; font-size: 13px; color: #fffb; }
.ed-save { margin-top: 26px; width: 230px; height: 58px; border: 0; border-radius: 16px; background: #fff; color: #111; font: inherit; font-weight: 900; font-size: 16px; cursor: pointer; }

/* 創作指南 */
.gd-tabs { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 999px; background: #1a1a1a; margin-bottom: 26px; }
.gd-tabs button { height: 46px; border: 0; border-radius: 999px; background: none; color: #fffb; font: inherit; font-size: 15px; cursor: pointer; }
.gd-tabs button[aria-selected=true] { background: #fff; color: #111; box-shadow: 0 0 0 2px #e5243b; }
.gd h2 { margin: 0 0 6px; font-size: 17px; }
.gd > p { margin: 0 0 16px; font-size: 13px; color: #fffa; }
.gd details { border-top: 1px solid rgba(255,255,255,.08); }
.gd details:last-child { border-bottom: 1px solid rgba(255,255,255,.08); }
.gd summary { display: flex; justify-content: space-between; align-items: center; padding: 18px 0; font-size: 16px; cursor: pointer; list-style: none; }
.gd summary::-webkit-details-marker { display: none; }
.gd summary svg { width: 18px; height: 18px; transition: transform .2s; }
.gd details[open] summary svg { transform: rotate(180deg); }
.gd .bd { padding: 0 0 20px; font-size: 15px; line-height: 1.75; color: #fffd; }
.gd .bd p { margin: 0 0 12px; }
.gd .bd b { display: block; }

@media (max-width: 900px) {
  .pf-stats { grid-template-columns: 1fr 1fr 1fr; }
  .pf-bells { grid-column: 1 / -1; }
  .ed { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .pg { padding: 76px 16px 60px; }
  .hist-grid { grid-template-columns: repeat(2, 1fr); gap: 16px 12px; }
  .pf-stats { grid-template-columns: 1fr 1fr; }
  .pf-stat { min-height: 120px; }
  .pf-id { flex-wrap: wrap; }
  .pf-id .grow { flex-basis: 100%; height: 0; }
  .ed-card { padding: 24px 16px; }
  .fb { padding: 22px 18px; }
  .fb-foot { flex-wrap: wrap; } .fb-foot small { flex-basis: 100%; }
}

/* 遊玩模式 */
.md-list { display: grid; gap: 12px; }
.md { display: grid; gap: 6px; padding: 16px 18px; border-radius: 14px; border: 2px solid transparent; background: #171717; color: #fff; font: inherit; text-align: left; cursor: pointer; }
.md.on { border-color: #ff9fb4; }
.md-top { display: flex; align-items: center; gap: 10px; }
.md-top b { font-size: 20px; color: var(--c); }
.md-top em { padding: 2px 6px; border-radius: 4px; font-style: normal; font-size: 11px; font-weight: 800; color: var(--c); background: color-mix(in srgb, var(--c) 18%, transparent); }
.md-radio { margin-left: auto; width: 28px; height: 28px; border-radius: 50%; border: 2px solid #fff5; }
.md.on .md-radio { border: 0; background: #ff8fa6 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.5'%3E%3Cpath d='M6 12l4 4 8-8'/%3E%3C/svg%3E") center / 16px no-repeat; }
.md-h { font-size: 18px; }
.md-l { font-size: 12px; color: #fffb; padding-bottom: 6px; }
.md-row { display: flex; justify-content: space-between; align-items: center; padding-top: 8px; border-top: 1px solid rgba(255,255,255,.07); font-size: 13px; }
.md-row small { color: #fff8; margin-right: 6px; }
.md-row .sm { font-size: 13px; }
.md-bars { display: flex; gap: 4px; } .md-bars i { width: 22px; height: 5px; border-radius: 2px; background: #333; } .md-bars i.f { background: #ddd; }
.md-cost { display: flex; align-items: center; gap: 4px; font-size: 20px; font-weight: 900; }
.md.on .md-cost { color: #ffcc4d; }
.md-note { font-size: 12px; color: #fff9; }
.md-bar { position: sticky; bottom: 0; padding: 14px 0; background: #0b0b0b; border-top: 1px solid rgba(255,255,255,.06); margin-top: 30px; }
.md-bar button { width: 100%; height: 48px; border: 0; border-radius: 12px; background: linear-gradient(90deg, #ff9fb4, #ffad8f); color: #3a1220; font: inherit; font-weight: 900; cursor: pointer; }
a.me-avatar { display: grid; place-items: center; text-decoration: none; color: #fff; overflow: hidden; }

/* 紀錄 tabs + Path delete */
.hist-tabs { display: flex; gap: 6px; margin: -6px 0 18px; }
.hist-tabs button { height: 36px; padding: 0 16px; border-radius: 999px; border: 1px solid rgba(255,255,255,.1); background: #151515; color: #fffb; font: inherit; font-weight: 800; font-size: 13px; cursor: pointer; }
.hist-tabs button[aria-selected=true] { background: #fff; color: #111; }
.hist-grid li { position: relative; }
.hist-del { position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; border: 0; border-radius: 50%; background: rgba(0,0,0,.65); color: #fff; font-size: 16px; cursor: pointer; }
.pg-empty small { display: block; margin-top: 8px; font-size: 13px; }
/* 相簿 */
.pf-album { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.pf-album button { position: relative; padding: 0; border: 0; border-radius: 10px; overflow: hidden; aspect-ratio: 9 / 16; background: #151515; cursor: zoom-in; }
.pf-album img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pf-album span { position: absolute; left: 6px; right: 6px; bottom: 6px; font-size: 11px; font-weight: 800; color: #fff; text-align: left; text-shadow: 0 1px 4px #000; }
.lb { position: fixed; inset: 0; z-index: 220; display: grid; place-items: center; padding: 20px; background: rgba(0,0,0,.88); }
.lb img { max-width: min(92vw, 520px); max-height: 80vh; border-radius: 14px; }
.lb-bar { display: flex; gap: 10px; justify-content: center; margin-top: 14px; }
.lb-bar a, .lb-bar button { height: 40px; padding: 0 16px; border-radius: 10px; border: 1px solid rgba(255,255,255,.15); background: #1a1a1a; color: #fff; font: inherit; font-weight: 800; display: inline-flex; align-items: center; text-decoration: none; cursor: pointer; }
