* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; background: #eef1f6; color: #1a1a1a; }
.hidden { display: none !important; }
.view { max-width: 720px; margin: 0 auto; }
button { cursor: pointer; font-size: 15px; }
header { position: -webkit-sticky; position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; padding: calc(12px + env(safe-area-inset-top)) 16px 12px; background: #fff; color: #1a1a1a; border-bottom: 1px solid #e3e6eb; }
.head-inner { display: flex; flex-direction: column; }
header h1 { font-size: 20px; margin: 0; font-weight: 700; color: #1a1a1a; }
.head-ops { display: flex; align-items: center; gap: 6px; }
#refresh-btn { font-size: 18px; line-height: 1; }
header .page-subtitle { font-size: 13px; color: #9aa3b2; margin: 2px 0 0; letter-spacing: 1px; }
button.plain { border: none; background: none; color: #555; padding: 4px 8px; }
button.strong { color: #2D6CDF; font-weight: 600; }
#login-view { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 100vh; padding: 24px; }
#login-view h1 { color: #2D6CDF; margin: 0 0 2px; font-size: 26px; }
#login-view .subtitle { color: #9aa3b2; margin: 0 0 28px; font-size: 14px; letter-spacing: 1px; }
#login-view input { width: 100%; max-width: 320px; padding: 14px; border: 1px solid #d0d6e0; border-radius: 10px; font-size: 16px; outline: none; margin-bottom: 14px; }
button.primary { width: 100%; max-width: 320px; padding: 14px; border: none; border-radius: 10px; background: #2D6CDF; color: #fff; font-size: 16px; font-weight: 600; }
.err { color: #e5484d; margin-top: 12px; font-size: 14px; }
.cat-bar { display: flex; gap: 8px; padding: 10px 12px; overflow-x: auto; background: #fff; }
.cat-item { padding: 6px 14px; border: 1px solid #d5dae2; border-radius: 999px; font-size: 14px; color: #555; white-space: nowrap; cursor: pointer; }
.cat-item.active { border-color: #2D6CDF; color: #2D6CDF; background: rgba(45,108,223,.06); font-weight: 600; }
.cat-pick { display: flex; gap: 8px; padding: 10px 16px 4px; }
.cat-opt { padding: 6px 12px; border: 1px solid #d5dae2; border-radius: 999px; font-size: 13px; color: #555; cursor: pointer; }
.cat-opt.active { border-color: #2D6CDF; color: #2D6CDF; background: rgba(45,108,223,.06); }
#feed { padding-bottom: 90px; }
.card { background: #fff; border-radius: 14px; margin: 12px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.photo-box { position: relative; background: #f0f0f0; }
.photo-scroll { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; align-items: stretch; background: #f0f0f0; }
.photo-scroll .photo { flex: 0 0 100%; width: 100%; object-fit: contain; scroll-snap-align: center; display: block; cursor: pointer; }
.pnav { position: absolute; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border: none; border-radius: 50%; background: rgba(0,0,0,.35); color: #fff; font-size: 20px; line-height: 1; z-index: 5; }
.pnav.prev { left: 8px; }
.pnav.next { right: 8px; }
.photo-count { position: absolute; right: 8px; bottom: 8px; background: rgba(0,0,0,.55); color: #fff; font-size: 12px; padding: 3px 8px; border-radius: 999px; z-index: 5; }
.lightbox { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: #000; z-index: 200; }
.lightbox-top { position: absolute; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; padding: calc(12px + env(safe-area-inset-top)) 16px 12px; color: #fff; z-index: 3; }
.lightbox-top .op { color: #fff; font-size: 16px; }
.nav-btn { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border: none; border-radius: 50%; background: rgba(255,255,255,.18); color: #fff; font-size: 26px; line-height: 1; z-index: 5; }
#lb-prev { left: 10px; }
#lb-next { right: 10px; }
.lightbox-scroll { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; height: 100%; align-items: center; -webkit-overflow-scrolling: touch; }
.lightbox-scroll img { flex: 0 0 100%; width: 100%; height: 100%; object-fit: contain; scroll-snap-align: center; }
.content { padding: 12px 14px 4px; margin: 0; white-space: pre-wrap; word-break: break-word; font-size: 16px; line-height: 1.65; }
.quote-card { margin: 10px 14px 0; padding: 10px 12px; background: #f4f6fa; border-left: 3px solid #2D6CDF; border-radius: 8px; }
.quote-head { font-size: 12px; color: #8a93a2; margin-bottom: 6px; }
.quote-content { font-size: 14px; color: #555; white-space: pre-wrap; word-break: break-word; margin: 0 0 6px; }
.quote-img { width: 100%; border-radius: 6px; max-height: 220px; object-fit: cover; }
.meta { display: flex; justify-content: space-between; align-items: center; padding: 8px 14px 12px; color: #98a0ad; font-size: 13px; }
.meta .ed { margin-left: 6px; color: #b8bfcc; }
.op { border: none; background: none; color: #2D6CDF; padding: 4px 8px; font-size: 13px; }
.op.pin { color: #d97706; }
.op.unpin { color: #d97706; }
.op.del { color: #e5484d; }
#fab { position: fixed; right: 22px; bottom: calc(28px + env(safe-area-inset-bottom)); width: 58px; height: 58px; border-radius: 50%; border: none; background: #2D6CDF; color: #fff; font-size: 30px; line-height: 1; box-shadow: 0 6px 16px rgba(45,108,223,.45); }
.empty { text-align: center; color: #98a0ad; margin-top: 48px; font-size: 15px; }
#editor-view { display: flex; flex-direction: column; min-height: 100vh; background: #fff; }
#editor-content { flex: 1; border: none; outline: none; padding: 16px; font-size: 16px; line-height: 1.7; resize: none; min-height: 200px; font-family: inherit; }
.quote-bar { display: flex; justify-content: space-between; align-items: center; margin: 8px 16px 0; padding: 8px 12px; background: #f4f6fa; border-radius: 8px; font-size: 13px; color: #555; }
.quote-btn { display: inline-block; margin: 0 0 12px 16px; padding: 9px 14px; border: 1px solid #c3c9d4; border-radius: 10px; background: #fff; color: #555; font-size: 14px; }
.upload-btn { display: inline-block; padding: 11px 16px; border: 1px dashed #c3c9d4; border-radius: 10px; color: #555; font-size: 14px; margin: 0 0 12px 0; }
#editor-preview { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 16px 0; }
.preview { width: 76px; height: 76px; object-fit: cover; border-radius: 8px; }
.preview-item { position: relative; }
.preview-del { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%; border: none; background: rgba(0,0,0,.6); color: #fff; font-size: 12px; line-height: 1; }
.tip { color: #98a0ad; font-size: 12px; margin-top: 10px; padding: 0 16px; }
#picker-list { padding-bottom: 60px; }
.pick-item { display: flex; align-items: center; gap: 10px; background: #fff; margin: 10px 12px; padding: 12px; border-radius: 12px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.pick-img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; flex: 0 0 56px; background: #eee; }
.pick-text { flex: 1; min-width: 0; }
.pick-time { font-size: 12px; color: #98a0ad; margin-bottom: 4px; }
.pick-content { font-size: 14px; color: #333; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }