/* LWY's Dashboard：白色底、#7289da 與 #b088ff、毛玻璃卡片、原創的遊戲介面（HUD）元素。
   深色模式跟隨裝置設定。 */
:root {
  --brand1: #7289da;
  --brand2: #b088ff;
  --bg: #ffffff;
  --orbA: rgb(114 137 218 / 0.30);
  --orbB: rgb(176 136 255 / 0.28);
  --grid: rgb(114 137 218 / 0.10);
  --glass: rgb(255 255 255 / 0.68);
  --glass-strong: rgb(255 255 255 / 0.92);
  --inset: rgb(114 137 218 / 0.08);
  --stroke: rgb(86 100 170 / 0.18);
  --fg: #15172b;
  --muted: #585f82;
  --fill: rgb(114 137 218 / 0.13);
  --chip: rgb(114 137 218 / 0.17);
  --chip-fg: #33428d;
  --accent: #4a5fb0;
  --accent2: #7b4fd1;
  --btn: #5468b8;
  --btn-ink: #ffffff;
  --danger: #c62828;
  --shadow: 0 10px 30px rgb(86 100 170 / 0.14);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Inter", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Noto Sans Mono", monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0d1a;
    --orbA: rgb(114 137 218 / 0.34);
    --orbB: rgb(176 136 255 / 0.28);
    --grid: rgb(150 165 230 / 0.07);
    --glass: rgb(28 31 56 / 0.62);
    --glass-strong: rgb(30 34 62 / 0.9);
    --inset: rgb(255 255 255 / 0.06);
    --stroke: rgb(255 255 255 / 0.13);
    --fg: #f1f2fb;
    --muted: #a9aed0;
    --fill: rgb(255 255 255 / 0.09);
    --chip: rgb(114 137 218 / 0.28);
    --chip-fg: #d6ddff;
    --accent: #9bb0f5;
    --accent2: #c4a6ff;
    --btn: #7289da;
    --btn-ink: #0b0d1a;
    --danger: #ff8a82;
    --shadow: 0 12px 32px rgb(0 0 0 / 0.35);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 16px/1.65 var(--font);
  -webkit-font-smoothing: antialiased;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
h1, h2, h3 { margin: 0; line-height: 1.25; letter-spacing: -0.01em; text-wrap: balance; }
p { margin: 0; }
a { color: var(--accent); }
img { max-width: 100%; }
button { font-family: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 10px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.wrap { max-width: 1120px; margin: 0 auto; }
.narrow { max-width: 980px; margin-left: auto; margin-right: auto; width: 100%; }
.skip { position: absolute; left: -999px; }

/* 背景：柔光與細格線（原創的 HUD 氛圍） */
#bg {
  position: fixed; inset: 0; z-index: -2; background-color: var(--bg);
  background-image:
    radial-gradient(55% 45% at 12% 8%, var(--orbA), transparent 62%),
    radial-gradient(45% 40% at 90% 16%, var(--orbB), transparent 62%),
    radial-gradient(60% 50% at 72% 98%, var(--orbA), transparent 65%),
    radial-gradient(40% 40% at 6% 90%, var(--orbB), transparent 62%);
}
.hud-grid {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(80% 70% at 50% 30%, #000 20%, transparent 100%);
  mask-image: radial-gradient(80% 70% at 50% 30%, #000 20%, transparent 100%);
}

/* 毛玻璃 */
.glass {
  position: relative;
  background: var(--glass);
  border: 1px solid var(--stroke);
  border-radius: 24px;
  box-shadow: var(--shadow), inset 0 1px 0 rgb(255 255 255 / 0.12);
  -webkit-backdrop-filter: blur(26px) saturate(170%);
  backdrop-filter: blur(26px) saturate(170%);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass { background: var(--glass-strong); }
}
.card { padding: 20px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.card.center { text-align: center; align-items: center; }
.card h2 { font-size: 22px; font-weight: 700; }
.eyebrow { font: 600 11px/1.2 var(--font); letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); }

/* HUD 角標：左上與右下的小直角線 */
.profile::before, .status-window::before, .quest[open]::before,
.profile::after, .status-window::after, .quest[open]::after {
  content: ""; position: absolute; width: 16px; height: 16px; pointer-events: none; opacity: 0.8;
}
.profile::before, .status-window::before, .quest[open]::before { top: 10px; left: 10px; border-top: 2px solid var(--brand1); border-left: 2px solid var(--brand1); border-top-left-radius: 6px; }
.profile::after, .status-window::after, .quest[open]::after { right: 10px; bottom: 10px; border-bottom: 2px solid var(--brand2); border-right: 2px solid var(--brand2); border-bottom-right-radius: 6px; }

/* 導覽列 */
.top { position: sticky; top: 0; z-index: 20; padding-top: calc(10px + env(safe-area-inset-top, 0px)); padding-bottom: 4px; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 10px 8px 18px; border-radius: 22px; }
.brand { font: 700 17px/1 var(--font); letter-spacing: -0.01em; color: var(--fg); text-decoration: none; padding: 8px 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seg { display: flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--fill); }
.seg a { font: 600 14px/1 var(--font); padding: 9px 16px; border-radius: 999px; color: var(--muted); text-decoration: none; }
.seg a:hover { color: var(--fg); }
.seg a[aria-current="page"] { background: var(--glass-strong); color: var(--fg); box-shadow: 0 1px 4px rgb(0 0 0 / 0.18); }

.tabbar { display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; padding: 0 max(14px, env(safe-area-inset-left, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(14px, env(safe-area-inset-right, 0px)); }
.tabs { display: grid; grid-template-columns: repeat(5, 1fr); padding: 6px; border-radius: 26px; }
.tabs a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 0 6px; border-radius: 20px; color: var(--muted); text-decoration: none; font: 600 10px/1.1 var(--font); }
.tabs svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tabs a[aria-current="page"] { color: var(--accent); background: var(--fill); }

main { padding-block: 18px 24px; }
.page { display: flex; flex-direction: column; gap: 18px; }
.pagehead { display: flex; flex-direction: column; gap: 8px; padding: 14px 4px 6px; }
.pagehead h1 { font-size: clamp(34px, 6vw, 46px); font-weight: 700; letter-spacing: -0.02em; }
.pagehead p { color: var(--muted); font-size: 17px; }

/* 版面 */
.bento { display: grid; grid-template-columns: 280px minmax(0, 1fr) 290px; gap: 18px; align-items: start; }
.col { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.aboutgrid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.bloggrid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }

/* 個人卡 */
.av { width: var(--s, 96px); height: var(--s, 96px); flex: 0 0 auto; border-radius: 50%; padding: 3px; background: linear-gradient(135deg, var(--brand1), var(--brand2)); display: grid; place-items: center; overflow: hidden; }
.av img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; border: 3px solid var(--bg); }
.av span { font: 700 calc(var(--s, 96px) * 0.4) / 1 var(--font); color: #fff; }
.profile h1 { font-size: 34px; font-weight: 700; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.taglines { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.taglines span { font: 600 13px/1 var(--mono); padding: 7px 11px; border-radius: 10px; background: var(--fill); color: var(--fg); }
.quote { font-style: italic; color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font: 600 12px/1 var(--font); padding: 7px 12px; border-radius: 999px; background: var(--chip); color: var(--chip-fg); text-decoration: none; border: 0; }
a.chip:hover { filter: brightness(1.1); }
.icons { display: flex; flex-wrap: wrap; gap: 14px 12px; }
.appicon { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 58px; text-decoration: none; color: var(--fg); background: none; border: 0; padding: 0; cursor: pointer; }
.appicon .sq { width: 52px; height: 52px; border-radius: 24%; display: grid; place-items: center; font: 700 22px/1 var(--font); color: #fff; background: linear-gradient(145deg, var(--brand1), var(--brand2)); box-shadow: 0 4px 12px rgb(60 70 150 / 0.3); transition: transform 0.15s; }
.appicon .sq .ico { width: 24px; height: 24px; }
.appicon:hover .sq { transform: scale(1.06); }
.appicon .lb { font: 500 11px/1.2 var(--font); color: var(--muted); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 卡片裡的列表 */
.cardhead { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 6px 12px; }
.cardhead .cnt { font-size: 12px; color: var(--muted); }
.more { align-self: flex-start; font: 600 14px/1 var(--font); color: var(--accent); text-decoration: none; padding: 6px 0; }
.more:hover { text-decoration: underline; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.postcard { display: flex; flex-direction: column; border-radius: 18px; background: var(--inset); border: 1px solid var(--stroke); overflow: hidden; color: inherit; text-decoration: none; min-width: 0; transition: transform 0.15s, border-color 0.15s; }
.postcard:hover { transform: translateY(-2px); border-color: var(--brand1); }
.glass-wrap .postcard { background: var(--glass); -webkit-backdrop-filter: blur(26px) saturate(170%); backdrop-filter: blur(26px) saturate(170%); border-radius: 24px; box-shadow: var(--shadow); }
.pcover { width: 100%; aspect-ratio: 16 / 5; object-fit: cover; display: block; }
.pbody { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 7px; }
.pbody .meta, .meta { font-size: 12px; color: var(--muted); }
.pbody h3 { font-size: 18px; font-weight: 700; }
.pbody p { font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }
.pfoot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; font-size: 13px; color: var(--muted); }
.minis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.mini { display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: 18px; background: var(--inset); border: 1px solid var(--stroke); color: inherit; text-decoration: none; min-width: 0; transition: border-color 0.15s; }
.mini:hover { border-color: var(--brand2); }
.mini h3 { font-size: 16px; font-weight: 700; overflow-wrap: anywhere; }
.thoughts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.thoughts li { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 16px; background: var(--inset); border: 1px solid var(--stroke); }
.thoughts time { font: 500 12px/1.4 var(--mono); color: var(--muted); }
.thoughts p { overflow-wrap: anywhere; white-space: pre-wrap; }
.tile { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tile div { padding: 12px; border-radius: 16px; background: var(--inset); border: 1px solid var(--stroke); }
.tile small { display: block; font-size: 11px; color: var(--muted); }
.tile b { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.empty { padding: 16px; border-radius: 16px; border: 1px dashed var(--stroke); color: var(--muted); font-size: 14px; }

/* 狀態視窗 */
.lv { font: 700 13px/1 var(--mono); color: var(--accent2); }
.lv b { font-size: 24px; margin-left: 2px; }
.exp { height: 8px; border-radius: 999px; background: var(--fill); overflow: hidden; }
.exp i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--brand1), var(--brand2)); min-width: 6px; }
.uptime { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; text-align: center; }
.uptime div { padding: 10px 2px; border-radius: 14px; background: var(--inset); border: 1px solid var(--stroke); }
.uptime b { display: block; font: 700 18px/1.1 var(--mono); font-variant-numeric: tabular-nums; }
.uptime small { font-size: 11px; color: var(--muted); }

/* 專案：可展開的任務卡 */
.quest { padding: 0; overflow: hidden; }
.quest summary { list-style: none; display: flex; align-items: center; gap: 14px; padding: 18px 20px; cursor: pointer; }
.quest summary::-webkit-details-marker { display: none; }
.quest summary:focus-visible { outline-offset: -3px; }
.qmain { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.qtitle { font-size: 18px; font-weight: 700; overflow-wrap: anywhere; }
.chev { font-size: 26px; line-height: 1; color: var(--muted); transition: transform 0.2s; }
.quest[open] .chev { transform: rotate(90deg); }
.qbody { padding: 0 20px 20px; display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.qbody p { overflow-wrap: anywhere; }
.qcover { width: 100%; max-height: 260px; object-fit: cover; border-radius: 16px; }
.result { padding: 12px 14px; border-radius: 14px; background: var(--inset); border: 1px solid var(--stroke); width: 100%; }
.qstat { flex: 0 0 auto; font: 700 11px/1 var(--font); padding: 6px 10px; border-radius: 999px; letter-spacing: 0.04em; }
.qstat.done { background: var(--chip); color: var(--chip-fg); }
.qstat.ongoing { background: rgb(176 136 255 / 0.22); color: var(--accent2); }
.seglist { display: flex; gap: 4px; padding: 3px; border-radius: 999px; background: var(--fill); overflow-x: auto; max-width: 100%; align-self: flex-start; }
.seglist a { flex: 0 0 auto; font: 600 13px/1 var(--font); padding: 9px 14px; border-radius: 999px; color: var(--muted); text-decoration: none; white-space: nowrap; }
.seglist a[aria-current="true"] { background: var(--glass-strong); color: var(--fg); box-shadow: 0 1px 4px rgb(0 0 0 / 0.18); }

/* 關於 */
.hero-id { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; }
.prose { display: flex; flex-direction: column; gap: 14px; max-width: 65ch; }
.prose p { overflow-wrap: anywhere; }
.tl { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.tl li { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 12px; font-size: 15px; }
.tl .yr { font: 700 14px/1.7 var(--mono); color: var(--accent2); font-variant-numeric: tabular-nums; }
.likes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.likes li::before { content: "✦"; color: var(--brand2); margin-right: 8px; }
.prose-card { gap: 10px; }
.prose-card p { color: var(--muted); max-width: 70ch; }
.prose-card h2 { margin-top: 8px; font-size: 18px; }

/* 文章 */
.stat { display: flex; justify-content: space-between; font-size: 14px; padding: 2px 0; }
.stat b { font-variant-numeric: tabular-nums; }
.catlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.catlist li { display: flex; justify-content: space-between; font-size: 14px; }
.catlist a { text-decoration: none; }
.article { padding: clamp(18px, 4vw, 36px); display: flex; flex-direction: column; gap: 16px; }
.article h1 { font-size: clamp(28px, 5vw, 40px); font-weight: 700; letter-spacing: -0.02em; }
.article .pcover { aspect-ratio: 16 / 6; border-radius: 18px; }
.postbody { display: flex; flex-direction: column; gap: 16px; max-width: 65ch; font-size: 17px; line-height: 1.85; }
.postbody h2 { font-size: 24px; margin-top: 12px; }
.postbody h3 { font-size: 19px; margin-top: 6px; }
.postbody p, .postbody li { overflow-wrap: anywhere; }
.postbody ul, .postbody ol { margin: 0; padding-left: 1.3em; display: flex; flex-direction: column; gap: 6px; }
.postbody blockquote { margin: 0; padding: 4px 0 4px 16px; border-left: 3px solid var(--brand2); color: var(--muted); }
.postbody hr { border: 0; border-top: 1px solid var(--stroke); width: 100%; }
.postbody pre { margin: 0; padding: 14px 16px; background: var(--inset); border: 1px solid var(--stroke); border-radius: 14px; overflow-x: auto; font: 14px/1.6 var(--mono); }
.postbody code { font-family: var(--mono); font-size: 0.92em; background: var(--inset); padding: 1px 5px; border-radius: 6px; }
.postbody pre code { background: none; padding: 0; }
.postbody figure { margin: 0; }
.postbody img { border-radius: 16px; display: block; }
.postbody figcaption { margin-top: 6px; font-size: 13px; color: var(--muted); text-align: center; }
.callout { padding: 14px 16px; border-radius: 14px; background: var(--fill); border: 1px solid var(--stroke); }
.back { align-self: flex-start; }

/* 留言 */
.comments h2 { font-size: 22px; }
.clist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.clist li { padding: 12px 14px; border-radius: 16px; background: var(--inset); border: 1px solid var(--stroke); }
.cmeta { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; margin-bottom: 4px; }
.cmeta time { font: 500 12px/1.4 var(--mono); color: var(--muted); }
.clist p { white-space: pre-wrap; overflow-wrap: anywhere; }
.cform { display: flex; flex-direction: column; gap: 14px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.cmsg { font-size: 14px; color: var(--accent); }
.cmsg.err { color: var(--danger); }

/* 朋友 */
.fgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.friend { padding: 18px; display: flex; flex-direction: column; gap: 14px; color: inherit; text-decoration: none; transition: transform 0.15s; min-width: 0; }
.friend:hover { transform: translateY(-2px); }
.top2 { display: flex; gap: 14px; align-items: center; }
.friend h3 { font-size: 19px; font-weight: 700; overflow-wrap: anywhere; }
.friend p { font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }
.dom { display: flex; justify-content: space-between; gap: 8px; padding-top: 12px; border-top: 1px solid var(--stroke); font: 600 12px/1.3 var(--mono); color: var(--accent); overflow-wrap: anywhere; }

/* 按鈕與表單 */
.btn { font: 600 15px/1 var(--font); padding: 12px 20px; border-radius: 999px; border: 0; background: var(--btn); color: var(--btn-ink); cursor: pointer; text-decoration: none; display: inline-block; }
.btn:hover:not(:disabled) { filter: brightness(1.08); }
.btn:disabled { opacity: 0.55; cursor: default; }
.btn.ghost { background: var(--fill); color: var(--accent); }
.btn.sm { padding: 9px 14px; font-size: 13px; }
.linkbtn { font: inherit; color: var(--muted); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: none; }
.linkbtn:hover, .foot a:hover { color: var(--fg); }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label { font: 600 13px/1.3 var(--font); color: var(--muted); }
.field .hint { font-size: 12px; color: var(--muted); }
input[type="text"], textarea { width: 100%; font: 400 16px/1.5 var(--font); color: var(--fg); background: var(--inset); border: 1px solid var(--stroke); border-radius: 14px; padding: 11px 14px; }
textarea { resize: vertical; min-height: 96px; }
input[type="text"]:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; }
.formactions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }

/* 頁尾 */
.foot { padding-block: 8px 28px; font-size: 12px; color: var(--muted); padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); margin: 0 calc(-1 * max(16px, env(safe-area-inset-left, 0px))); }
.foot-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 18px; }
.foot a { color: var(--muted); text-decoration: none; }
.foot-links { display: flex; gap: 14px; align-items: center; }
.foot-stats b { font-variant-numeric: tabular-nums; color: var(--fg); }
.flag-trigger { opacity: 0.55; }

/* 成就通知與面板 */
#toasts { position: fixed; z-index: 60; top: calc(14px + env(safe-area-inset-top, 0px)); right: max(14px, env(safe-area-inset-right, 0px)); display: flex; flex-direction: column; gap: 10px; align-items: flex-end; pointer-events: none; max-width: calc(100vw - 28px); }
.toast { pointer-events: auto; display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-radius: 18px; background: var(--glass-strong); border: 1px solid var(--stroke); box-shadow: var(--shadow); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); animation: slidein 0.35s ease-out; max-width: 340px; }
.toast .ic { width: 38px; height: 38px; flex: 0 0 auto; border-radius: 12px; display: grid; place-items: center; font-size: 18px; color: #fff; background: linear-gradient(145deg, var(--brand1), var(--brand2)); }
.toast b { display: block; font-size: 14px; }
.toast span { font-size: 12px; color: var(--muted); }
@keyframes slidein { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
.modal-bg { position: fixed; inset: 0; z-index: 70; background: rgb(8 10 24 / 0.5); display: grid; place-items: center; padding: 16px; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.modal { width: min(480px, 100%); max-height: 86vh; overflow: auto; padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.modal h2 { font-size: 22px; }
.achlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.achlist li { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 14px; background: var(--inset); border: 1px solid var(--stroke); }
.achlist li.lock { opacity: 0.55; }
.achlist .ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--fill); }
.achlist li:not(.lock) .ic { color: #fff; background: linear-gradient(145deg, var(--brand1), var(--brand2)); }
.achlist b { display: block; font-size: 14px; }
.achlist span { font-size: 12px; color: var(--muted); }
.flagbox { font: 600 15px/1.5 var(--mono); padding: 14px; border-radius: 14px; background: var(--inset); border: 1px dashed var(--brand2); overflow-wrap: anywhere; user-select: all; }

/* 音樂（由訪客主動播放） */
#player { position: fixed; z-index: 40; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.pbtn { width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--stroke); display: grid; place-items: center; font-size: 20px; color: var(--accent); background: var(--glass-strong); box-shadow: var(--shadow); cursor: pointer; -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
.ppanel { width: 250px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.ppanel .tname { font-weight: 700; font-size: 14px; overflow-wrap: anywhere; }
.ppanel .ctrls { display: flex; gap: 8px; align-items: center; }
.ppanel .ctrls button { flex: 1; font-size: 16px; padding: 9px 0; border-radius: 12px; border: 0; background: var(--fill); color: var(--fg); cursor: pointer; }
.ppanel input[type="range"] { width: 100%; accent-color: var(--brand1); }

/* 響應式 */
@media (max-width: 1020px) {
  .bento { grid-template-columns: 260px minmax(0, 1fr); }
  .bento > .col.r { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); align-items: start; }
}
@media (max-width: 760px) {
  .seg { display: none; }
  .tabbar { display: block; }
  main { padding-bottom: calc(100px + env(safe-area-inset-bottom, 0px)); }
  .foot { padding-bottom: calc(100px + env(safe-area-inset-bottom, 0px)); }
  .bento, .aboutgrid, .bloggrid { grid-template-columns: minmax(0, 1fr); }
  .bento > .col.r { display: flex; }
  .quest summary { padding: 16px; }
  .qbody { padding: 0 16px 16px; }
  #player { bottom: calc(92px + env(safe-area-inset-bottom, 0px)); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .toast { animation: none; }
  .postcard, .friend, .appicon .sq, .chev { transition: none; }
}
