:root { --ok-bg: #e3efe3; --ok-fg: #1f5a2e; --warn-bg: #f6ead2; --warn-fg: #8a5a12; --bad-bg: #f5dcd8; --bad-fg: #8e2418; --me-bg: #f6e3de }
:root[data-theme="dark"] { --ok-bg: #16281c; --ok-fg: #7fcf96; --warn-bg: #2b2112; --warn-fg: #e0b25a; --bad-bg: #32171a; --bad-fg: #f0928a; --me-bg: #2d1b18 }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --ok-bg: #16281c; --ok-fg: #7fcf96; --warn-bg: #2b2112; --warn-fg: #e0b25a; --bad-bg: #32171a; --bad-fg: #f0928a; --me-bg: #2d1b18 } }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.6 -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif; -webkit-tap-highlight-color: transparent }
.fb { box-sizing: border-box; max-width: 680px; margin: 0 auto; padding: 14px 14px 36px }
.fb.wide { max-width: 1040px }
.fb-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 4px 0 14px }
.fb-top h1 { margin: 0; font-size: 20px; letter-spacing: .06em }
.fb-top .sub { margin: 2px 0 0; font-size: 13px; color: var(--sub) }
.fb-tools { display: flex; align-items: center; gap: 8px }
.fb-link { font-size: 13px; font-weight: 600; color: var(--red); text-decoration: none; white-space: nowrap }
.tbtn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: var(--card); border: 1px solid var(--line); color: var(--ink); cursor: pointer; padding: 0 }
.tbtn svg { width: 19px; height: 19px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round }
.tbtn .i-sun { display: none }
.tbtn[data-mode="dark"] .i-sun { display: block }
.tbtn[data-mode="dark"] .i-moon { display: none }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 16px; box-shadow: var(--shadow); margin-bottom: 14px }
.card h2 { margin: 0 0 12px; font-size: 16px; letter-spacing: .04em }
.flash { margin: 0 0 14px; padding: 10px 12px; border-radius: 12px; font-size: 14px; font-weight: 600; border: 1px solid }
.flash.success { background: var(--ok-bg); color: var(--ok-fg); border-color: color-mix(in srgb, var(--ok-fg) 35%, transparent) }
.flash.error { background: var(--bad-bg); color: var(--bad-fg); border-color: color-mix(in srgb, var(--bad-fg) 35%, transparent) }
.field { margin-bottom: 14px }
.field label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 600; color: var(--sub); letter-spacing: .04em }
.field select, .field textarea, .field input[type=text], .search input, .search select, .reply-form input[type=text], .reply-form textarea { box-sizing: border-box; width: 100%; font: inherit; font-size: 16px; color: var(--ink); background: var(--bg); border: 1.5px solid var(--line); border-radius: 12px; outline: none; transition: border-color .2s, box-shadow .2s; -webkit-appearance: none; appearance: none }
.field select, .search select { height: 46px; padding: 0 38px 0 14px; background-image: linear-gradient(45deg, transparent 50%, var(--sub) 50%), linear-gradient(135deg, var(--sub) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat }
.field textarea, .reply-form textarea { min-height: 120px; padding: 12px 14px; resize: vertical; line-height: 1.6 }
.field select:focus, .field textarea:focus, .search input:focus, .search select:focus, .reply-form input:focus, .reply-form textarea:focus { border-color: var(--red); background-color: var(--card); box-shadow: 0 0 0 3px color-mix(in srgb, var(--red) 18%, transparent) }
.tip { margin: 8px 0 0; padding: 9px 12px; border-radius: 12px; background: var(--warn-bg); color: var(--warn-fg); font-size: 13px; line-height: 1.6 }
.count { margin: 4px 2px 0; text-align: right; font-size: 12px; color: var(--sub) }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 22px; border: 0; border-radius: 999px; font: inherit; font-size: 15px; font-weight: 700; letter-spacing: .1em; color: #fff; cursor: pointer; text-decoration: none; background: linear-gradient(135deg, #c4493a, #a82f23); box-shadow: 0 8px 18px rgba(179, 54, 42, .3) }
.btn.block { display: flex; width: 100% }
.btn.ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); box-shadow: none; letter-spacing: .04em }
.btn.ok { background: #2f7d4f; box-shadow: none }
.btn.sm { min-height: 38px; padding: 0 16px; font-size: 14px; letter-spacing: .04em }
.btn:disabled { opacity: .55; cursor: not-allowed }
.btn:focus-visible, .fb-link:focus-visible, .chip:focus-visible, .tbtn:focus-visible, .toggle:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px }
.notice { padding: 14px; border-radius: 14px; background: var(--soft); color: var(--sub); font-size: 14px; text-align: center; line-height: 1.7 }
.notice b { color: var(--ink) }
.notice .btn { margin-top: 10px }
.list-h { margin: 18px 2px 10px; font-size: 14px; font-weight: 700; color: var(--sub); letter-spacing: .04em }
.ticket { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 14px 14px 12px; margin-bottom: 12px; box-shadow: var(--shadow) }
.t-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px }
.t-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; min-width: 0 }
.no { font-size: 12px; color: color-mix(in srgb, var(--sub) 60%, var(--ink)); background: var(--soft); padding: 1px 7px; border-radius: 999px }
.type { font-size: 14px; font-weight: 700 }
.time { font-size: 12px; color: var(--sub) }
.status { flex: 0 0 auto; font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 999px }
.status.s0 { background: var(--warn-bg); color: var(--warn-fg) }
.status.s1 { background: var(--bad-bg); color: var(--bad-fg) }
.status.s2 { background: var(--ok-bg); color: var(--ok-fg) }
.t-msg { margin: 0; font-size: 14px; line-height: 1.7; word-break: break-word; white-space: pre-wrap }
.thread { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line) }
.bub { max-width: 88%; padding: 8px 12px; border-radius: 14px; font-size: 14px; line-height: 1.6; word-break: break-word; white-space: pre-wrap }
.bub small { display: block; margin-bottom: 2px; font-size: 11px; font-weight: 600; opacity: .75 }
.bub.cs { align-self: flex-start; background: var(--soft); border-top-left-radius: 4px }
.bub.me { align-self: flex-end; background: var(--me-bg); border-top-right-radius: 4px }
.reply-form { display: flex; gap: 8px; margin-top: 12px; align-items: flex-end }
.reply-form input[type=text] { flex: 1; height: 42px; padding: 0 12px }
.reply-form textarea { flex: 1; min-height: 64px; padding: 10px 12px }
.locked { margin-top: 12px; padding: 8px 10px; border-radius: 12px; background: var(--soft); color: color-mix(in srgb, var(--sub) 60%, var(--ink)); font-size: 13px; text-align: center }
.pager { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 16px; font-size: 13px }
.pager a, .pager span { padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink); text-decoration: none }
.pager .cur { background: var(--red); border-color: var(--red); color: #fff }
.pager .off { color: var(--sub); opacity: .6 }
.empty { text-align: center; padding: 30px 10px; color: var(--sub) }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 10px }
.chip { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); font-size: 14px; font-weight: 600; text-decoration: none }
.chip.on { border-color: var(--red); background: var(--red); color: #fff }
.chip em { font-style: normal; font-size: 12px; opacity: .8 }
.search { display: flex; gap: 8px; margin-bottom: 14px }
.search input { height: 42px; padding: 0 14px }
.who { font-size: 14px; font-weight: 700 }
.who .contact { margin-left: 6px; font-weight: 400; color: var(--sub); font-size: 13px; word-break: break-all }
.env { margin-top: 6px; font-size: 12px; color: var(--sub) }
.admin-act { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line) }
.admin-act select { height: 38px; width: auto; padding: 0 30px 0 12px; font-size: 14px; border-radius: 10px }
.admin-act .del { background: none; border: 0; padding: 6px 4px; font: inherit; font-size: 13px; color: var(--bad-fg); text-decoration: underline; cursor: pointer }
.toggle { appearance: none; -webkit-appearance: none; border: 1.5px solid var(--line); background: var(--bg); color: var(--ink); border-radius: 999px; min-height: 36px; padding: 0 14px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer }
.fold { display: none; margin-top: 10px }
.fold.open { display: block }
.guest-note { margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--line); font-size: 13px; color: var(--sub) }
@media (min-width: 900px) { .fb { padding-top: 24px } }
.field input[type=text] { height: 46px; padding: 0 14px }
.newtag { font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: var(--red); color: #fff }
.bub.sys { align-self: center; max-width: 94%; background: transparent; border: 1px dashed var(--line); color: color-mix(in srgb, var(--sub) 60%, var(--ink)); font-size: 13px; text-align: center }
.faq { margin: -4px 0 14px; padding: 10px 12px; border-radius: 12px; background: var(--soft); font-size: 13px; line-height: 1.7 }
.faq[hidden], .field[hidden] { display: none }
.faq b { display: block; margin-bottom: 4px; color: var(--ink) }
.faq ul { margin: 0; padding-left: 18px; color: color-mix(in srgb, var(--sub) 60%, var(--ink)) }
.tpl { height: 38px; font-size: 14px; border-radius: 10px }
select.tpl { box-sizing: border-box; width: 100%; padding: 0 30px 0 12px; color: var(--ink); background-color: var(--bg); border: 1.5px solid var(--line); -webkit-appearance: none; appearance: none }
