* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;
  color: #222; background: #f6f7f9; line-height: 1.7;
}
.wrap { max-width: 860px; margin: 0 auto; padding: 0 16px; }

/* header / footer */
.site-header { background: #2b2f38; color: #fff; }
.site-header .wrap { display: flex; align-items: center; gap: 20px; height: 56px; }
.site-header .logo { color: #fff; font-weight: 700; font-size: 18px; text-decoration: none; }
.site-header nav { display: flex; gap: 14px; flex-wrap: wrap; }
.site-header nav a { color: #cfd3da; text-decoration: none; font-size: 14px; }
.site-header nav a:hover { color: #fff; }
.site-footer { margin-top: 40px; padding: 20px 0; color: #888; font-size: 13px; text-align: center; }
.site-footer a { color: #666; }

main.wrap { background: #fff; margin-top: 20px; padding: 24px; border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06); }

.page-h1 { font-size: 22px; margin: 0 0 20px; }

/* list */
.post-list { list-style: none; margin: 0; padding: 0; }
.post-item { padding: 16px 0; border-bottom: 1px solid #eee; }
.post-title { font-size: 18px; font-weight: 600; color: #1a5fb4; text-decoration: none; }
.post-title:hover { text-decoration: underline; }
.post-meta { color: #999; font-size: 13px; margin: 4px 0; }
.post-excerpt { color: #555; margin: 6px 0 0; }
.empty { color: #999; padding: 30px 0; text-align: center; }

/* pager */
.pager { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 24px; }
.pager a { padding: 6px 11px; border: 1px solid #ddd; border-radius: 5px;
  color: #444; text-decoration: none; font-size: 14px; }
.pager a.active { background: #1a5fb4; color: #fff; border-color: #1a5fb4; }

/* single */
.single-title { font-size: 26px; margin: 0 0 6px; }
.single-body { margin-top: 20px; }
.single-body img { max-width: 100%; height: auto; }

/* admin */
.admin-body { background: #eef0f3; }
.admin-bar { background: #1a5fb4; color: #fff; }
.admin-bar .wrap { display: flex; align-items: center; gap: 16px; height: 52px; }
.admin-bar a { color: #dbe7f7; text-decoration: none; font-size: 14px; }
.admin-bar a:hover { color: #fff; }
.admin-bar .spacer { flex: 1; }
.btn { display: inline-block; background: #1a5fb4; color: #fff; border: 0;
  padding: 9px 16px; border-radius: 6px; cursor: pointer; font-size: 14px; text-decoration: none; }
.btn:hover { background: #164e97; }
.btn.gray { background: #6b7280; }
.btn.red { background: #c0392b; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; color: #555; margin-bottom: 4px; }
.field input[type=text], .field input[type=password], .field select, .field textarea {
  width: 100%; padding: 9px 10px; border: 1px solid #ccc; border-radius: 6px; font-size: 14px; }
table.list { width: 100%; border-collapse: collapse; font-size: 14px; }
table.list th, table.list td { text-align: left; padding: 10px 8px; border-bottom: 1px solid #eee; }
table.list th { color: #666; font-weight: 600; }
.msg { padding: 10px 14px; border-radius: 6px; margin-bottom: 16px; font-size: 14px; }
.msg.ok { background: #e7f6ec; color: #1e7e34; }
.msg.err { background: #fdecea; color: #c0392b; }

/* editor toolbar */
.toolbar { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px;
  padding: 8px; background: #f2f3f5; border: 1px solid #ccc; border-bottom: 0; border-radius: 6px 6px 0 0; }
.toolbar button, .toolbar select, .toolbar input[type=color] {
  font-size: 13px; padding: 4px 8px; border: 1px solid #ccc; background: #fff;
  border-radius: 4px; cursor: pointer; }
#editor { min-height: 340px; border: 1px solid #ccc; border-radius: 0 0 6px 6px;
  padding: 12px; background: #fff; overflow-y: auto; }
#editor img { max-width: 100%; }
.login-box { max-width: 360px; margin: 80px auto; background: #fff; padding: 30px;
  border-radius: 10px; box-shadow: 0 2px 10px rgba(0,0,0,.08); }
.login-box h1 { font-size: 20px; margin: 0 0 20px; text-align: center; }
