:root { --ink: #293a34; --leaf: #52745d; --gold: #d4ad67; --cream: #fffaf0; --line: #f0e3c2; --muted: #758078; --sky: #4f9be3; --sky-soft: #dcebfb; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; font-family: Arial, "Noto Sans TC", "Microsoft JhengHei", sans-serif; color: var(--ink); }
body { background: #9ec3f5 url('/assets/login-bg.webp?v=3') 50% 50% / cover fixed no-repeat; font-size: 15px; line-height: 1.55; }
body::before { content: ""; position: fixed; inset: 0; pointer-events: none; background: linear-gradient(180deg, #1c3a6a30, transparent 38%); }
a { color: #3f7fc0; text-underline-offset: 3px; word-break: break-all; }
button, input, select, textarea { font: inherit; color: inherit; }

.top { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; max-width: 860px; margin: 0 auto; padding: 16px 16px 4px; color: #fff; text-shadow: 0 2px 4px #2a4f8a, 0 2px 14px #2a4f8acc; }
.top h1 { margin: 0; font-size: 24px; flex: 1; }
.top h1 small { font-size: 13px; font-weight: 400; margin-left: 6px; }
.top .back { color: #fff3cf; text-decoration: none; font-weight: 700; }
.who { font-size: 13px; }

.wrap { position: relative; z-index: 1; max-width: 860px; margin: 0 auto; padding: 8px 16px 40px; display: grid; gap: 16px; }
.card, .post { padding: 18px clamp(14px, 3vw, 26px); border: 1px solid var(--line); border-radius: 18px; background: #fffaf0f2; box-shadow: 0 14px 40px #14251f33; backdrop-filter: blur(10px); }
.card h2 { margin: 0 0 8px; font-size: 18px; color: var(--leaf); }
.notice { margin: 0 0 8px; min-height: 0; color: #b0452f; font-weight: 600; }
.notice.ok { color: var(--leaf); }
.notice:empty { display: none; }

.cats { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.cats label { cursor: pointer; }
.cats input { position: absolute; opacity: 0; pointer-events: none; }
.cats span { display: inline-block; padding: 7px 16px; border: 2px solid var(--sky-soft); border-radius: 999px; background: #fff; font-weight: 700; color: #4d6b8c; }
.cats input:checked + span { background: var(--sky); border-color: var(--sky); color: #fff; }
.cats input:focus-visible + span { outline: 3px solid var(--gold); }

.field { display: grid; gap: 4px; margin-bottom: 10px; font-weight: 700; color: #4d5a52; }
.field input, .field textarea, .filters select { color: var(--ink); width: 100%; padding: 10px 12px; border: 1px solid #d9ddcf; border-radius: 10px; background: #fff; font-weight: 400; }
.field textarea { resize: vertical; }
.field input:focus, .field textarea:focus, select:focus { outline: 3px solid #4f9be355; border-color: var(--sky); }

.drop { margin-bottom: 10px; padding: 12px; border: 2px dashed #a9c9ee; border-radius: 14px; background: #f3f8ff; text-align: center; }
.drop.over { background: var(--sky-soft); border-color: var(--sky); }
.drop p { margin: 2px 0; }
.hint { font-size: 12px; color: var(--muted); }
.link { border: 0; background: none; color: #3f7fc0; text-decoration: underline; cursor: pointer; padding: 0; }
.thumbs { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 8px; }
.thumbs .t { position: relative; width: 96px; height: 96px; border-radius: 10px; overflow: hidden; border: 1px solid #d9ddcf; background: #fff; }
.thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumbs button { position: absolute; top: 3px; right: 3px; width: 24px; height: 24px; border: 0; border-radius: 50%; background: #000a; color: #fff; cursor: pointer; line-height: 1; }

.auto { margin-bottom: 12px; font-size: 13px; color: var(--muted); }
.auto summary { cursor: pointer; }
.auto dl { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; margin: 6px 0 0; }
.auto dt { font-weight: 700; }
.auto dd { margin: 0; word-break: break-all; }

.btn { display: inline-block; min-height: 44px; padding: 0 22px; border: 1px solid #3a7ec3; border-radius: 12px; background: linear-gradient(#6db3f2, #4f9be3); box-shadow: 0 5px 12px #2a5a9026; color: #fff; font-weight: 700; letter-spacing: .06em; text-decoration: none; line-height: 42px; cursor: pointer; }
.btn:hover { filter: brightness(1.06); }
.btn:disabled { opacity: .6; cursor: wait; }
.btn.ghost { width: 100%; background: #fffaf0; color: var(--leaf); border-color: var(--line); box-shadow: none; }
#send { width: 100%; }

.filters { display: flex; gap: 12px; margin-bottom: 12px; }
.filters label { flex: 1; display: grid; gap: 3px; font-weight: 700; color: #fff; text-shadow: 0 1px 4px #2a4f8a; font-size: 13px; }
#list { display: grid; gap: 14px; margin-bottom: 14px; }
.empty { text-align: center; color: #fff; text-shadow: 0 1px 6px #2a4f8a; }

.post-head { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 6px; }
.tag { padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--sky-soft); color: #3a6a9c; }
.st { padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.st.open { background: #fde9c8; color: #9a6410; }
.st.working { background: #dcebfb; color: #2f6aa5; }
.st.fixed { background: #dff1de; color: #3b7a3e; }
.post h3 { margin: 0 0 4px; font-size: 17px; }
.meta { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.text { white-space: pre-wrap; word-break: break-word; margin: 0 0 10px; }
.shots { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.shots img { width: 140px; height: 100px; object-fit: cover; border-radius: 10px; border: 1px solid #d9ddcf; cursor: zoom-in; background: #fff; }
.actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.actions button, .actions select { min-height: 36px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: #fff; cursor: pointer; font-weight: 700; color: var(--leaf); }
.actions button.on { background: #ffe9a8; border-color: var(--gold); }
.replies { margin-top: 10px; display: grid; gap: 6px; }
.reply { padding: 8px 12px; border-radius: 12px; background: #f3f8ff; font-size: 14px; }
.reply.admin { background: #fff1c9; }
.reply b { color: #3a6a9c; }
.reply small { color: var(--muted); margin-left: 6px; }
.reply-form { display: flex; gap: 8px; margin-top: 8px; }
.reply-form input { flex: 1; min-width: 0; padding: 8px 12px; border: 1px solid #d9ddcf; border-radius: 10px; }
.reply-form button { min-height: 38px; padding: 0 16px; border: 0; border-radius: 10px; background: var(--sky); color: #fff; font-weight: 700; cursor: pointer; }

#lightbox { position: fixed; inset: 0; z-index: 10; display: flex; align-items: center; justify-content: center; background: #000c; cursor: zoom-out; }
#lightbox img { max-width: 96vw; max-height: 94vh; border-radius: 8px; }

@media (max-width: 600px) {
  .top h1 { font-size: 20px; }
  .filters { flex-direction: column; gap: 6px; }
  .shots img { width: calc(33% - 6px); min-width: 90px; height: 80px; }
  .auto dl { grid-template-columns: 1fr; }
}
