* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink);
  font: 13px/1.6 Verdana, "PingFang TC", "Microsoft JhengHei", "新細明體", sans-serif; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
.wrap { max-width: 980px; margin: 0 auto; padding: 0 12px; }
header.top { background: var(--page); border-bottom: 3px solid var(--brand); }
header.top .wrap { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; min-height: 64px; }
header.top .logo img { height: 64px; width: auto; display: block; margin: 6px 0; }
header.top nav { margin-left: auto; display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
header.top nav a, header.top nav button { padding: 3px 9px; border-radius: 3px; font-size: 12px; }
header.top nav a.hl { background: var(--accent); color: #fff; }
.subnav { background: var(--brand); color: var(--brand-ink); font-size: 12px; }
.subnav .wrap { display: flex; gap: 14px; padding: 4px 12px; flex-wrap: wrap; }
.subnav a { color: var(--brand-ink); }
main { padding: 12px 0 30px; }
.cols { display: grid; grid-template-columns: 220px 1fr; gap: 12px; }
.cols.right { grid-template-columns: 1fr 240px; }
@media (max-width: 760px) { .cols, .cols.right { grid-template-columns: 1fr; } }
.box { background: var(--page); border: 1px solid var(--line); margin-bottom: 12px; }
.box > h2, .box > .h { margin: 0; padding: 4px 10px; font-size: 13px; background: var(--box-head);
  border-bottom: 1px solid var(--line); color: var(--brand); display: flex; justify-content: space-between; align-items: center; }
.box > h2 a.more, .box > .h a.more { font-weight: normal; font-size: 11px; }
.box .bd { padding: 10px; }
.muted { color: var(--muted); font-size: 11px; }
.pop { color: var(--accent); font-weight: bold; }
.tabs { display: flex; gap: 2px; border-bottom: 2px solid var(--brand); margin-bottom: 10px; flex-wrap: wrap; }
.tabs a { padding: 5px 14px; background: var(--tab); border: 1px solid var(--line); border-bottom: 0;
  border-radius: 4px 4px 0 0; color: var(--ink); }
.tabs a.on { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); font-weight: bold; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.alb { text-align: center; font-size: 12px; }
.alb .cv { display: block; aspect-ratio: 1; background: var(--tab); border: 1px solid var(--line); padding: 4px;
  box-shadow: 3px 3px 0 var(--line); overflow: hidden; }
.alb .cv img { width: 100%; height: 100%; object-fit: cover; display: block; }
.alb .cv .lock { display: flex; height: 100%; align-items: center; justify-content: center; font-size: 34px; color: var(--muted); }
.alb .t { display: block; margin-top: 6px; font-weight: bold; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge { display: inline-block; font-size: 10px; padding: 0 4px; border-radius: 2px; border: 1px solid var(--line);
  color: var(--muted); vertical-align: 1px; }
.badge.pw { border-color: var(--accent); color: var(--accent); }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.thumbs a { display: block; aspect-ratio: 1; border: 1px solid var(--line); padding: 3px; background: var(--page); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumbs .hid { opacity: .4; }
.photo-main { text-align: center; }
.photo-main img { border: 1px solid var(--line); padding: 4px; background: var(--page); max-height: 80vh; }
.pager { display: flex; gap: 6px; justify-content: center; margin: 10px 0; flex-wrap: wrap; }
.pager a, .pager span { padding: 1px 7px; border: 1px solid var(--line); background: var(--page); }
.pager span.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.avatar { width: 96px; height: 96px; object-fit: cover; border: 1px solid var(--line); padding: 3px; background: var(--page); }
.avatar.sm { width: 32px; height: 32px; padding: 1px; }
.avatar.ph { display: inline-flex; align-items: center; justify-content: center; background: var(--brand-soft);
  color: var(--brand); font-weight: bold; font-size: 36px; }
.avatar.sm.ph { font-size: 14px; }
.msg { border-bottom: 1px dashed var(--line); padding: 8px 0; display: flex; gap: 8px; }
.msg:last-child { border-bottom: 0; }
.msg .who { font-weight: bold; }
.msg .reply { background: var(--brand-soft); border-left: 3px solid var(--brand); padding: 4px 8px; margin-top: 4px; }
.msg .secret { color: var(--muted); font-style: italic; }
.msg .acts { font-size: 11px; display: flex; gap: 8px; margin-top: 2px; flex-wrap: wrap; }
ul.list { list-style: none; margin: 0; padding: 0; }
ul.list li { padding: 3px 0; border-bottom: 1px dotted var(--line); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
ul.list li:last-child { border-bottom: 0; }
ol.rank { margin: 0; padding-left: 22px; }
ol.rank li { padding: 2px 0; }
form.inline { display: inline; }
label { display: block; margin: 8px 0 3px; font-weight: bold; }
input[type=text], input[type=password], textarea, select { width: 100%; padding: 5px 6px; font: inherit;
  border: 1px solid var(--line); background: var(--page); color: var(--ink); border-radius: 2px; }
textarea { min-height: 80px; resize: vertical; }
textarea.big { min-height: 320px; }
button, .btn { font: inherit; font-size: 12px; padding: 4px 12px; border: 1px solid var(--brand); background: var(--brand);
  color: #fff; border-radius: 3px; cursor: pointer; display: inline-block; }
button.ghost, .btn.ghost { background: var(--page); color: var(--brand); }
button.link { background: none; border: 0; color: var(--link); padding: 0; font-size: inherit; }
button.danger { background: var(--page); border-color: #c33; color: #c33; }
.social { display: flex; flex-direction: column; gap: 8px; max-width: 320px; }
.social a { display: block; padding: 8px 12px; border-radius: 4px; color: #fff; font-weight: bold; text-align: center; }
.social .google { background: #fff; color: #333; border: 1px solid #ccc; }
.social .facebook { background: #1877f2; }
.social .line { background: #06c755; }
.social a.off { opacity: .4; pointer-events: none; }
.note { background: var(--warn-bg); border: 1px solid var(--warn-line); padding: 6px 10px; margin-bottom: 10px; }
.err { background: var(--accent-soft); border: 1px solid var(--accent); padding: 6px 10px; margin-bottom: 10px; }
.post h1 { font-size: 18px; margin: 0 0 4px; color: var(--brand); }
.post .body { font-size: 14px; line-height: 1.9; margin-top: 12px; overflow-wrap: anywhere; }
table.t { width: 100%; border-collapse: collapse; font-size: 12px; }
table.t th, table.t td { border: 1px solid var(--line); padding: 4px 6px; text-align: left; vertical-align: top; }
table.t th { background: var(--tab); }
.scroll { overflow-x: auto; }
footer { text-align: center; color: var(--muted); font-size: 11px; padding: 16px 0 30px; border-top: 1px solid var(--line); }
.counter { font-family: "Courier New", monospace; background: #222; color: #7fff7f; padding: 1px 6px;
  letter-spacing: 2px; border-radius: 2px; }
.cols > *, .cols.right > * { min-width: 0; }
.music iframe { width: 100%; border: 0; border-radius: 8px; background: var(--tab); display: block; }
.tracks { margin: 6px 0 0; padding-left: 20px; font-size: 12px; }
.tracks a.on { font-weight: bold; color: var(--accent); }
.foot { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 4px; text-align: center; font-size: 11px; }
.foot a { display: flex; flex-direction: column; align-items: center; gap: 1px; color: var(--ink); overflow: hidden; }
.foot a span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.foot .avatar.sm { width: 40px; height: 40px; }
