/* ================================================================
   2.9 独立界面 · 公告板补充样式 / 论坛（iOS 风格）/ 住宅区
================================================================ */

/* ---------------- 公告板（在 cyber.css 基础上补充） ---------------- */
.nb-top { align-items: center; }
.nb-sys { display: grid; grid-template-columns: auto auto 1fr; gap: 8px; padding: 8px 0; border-bottom: 1px dashed var(--cy-line); font-size: 12px; line-height: 1.6; }
.nb-sys:last-child { border-bottom: none; }
.nb-time { color: var(--cy-muted); white-space: nowrap; }
.nb-lv { color: var(--cy-cyan); letter-spacing: 1px; white-space: nowrap; }
.nb-sys.warn .nb-lv { color: var(--cy-yellow); }
.nb-sys.alert .nb-lv { color: var(--cy-red); }
.nb-text { color: var(--cy-text); font-family: var(--font-ui); }
.nb-rank { width: 100%; display: grid; grid-template-columns: 60px 1fr auto; gap: 10px; align-items: center; padding: 10px 8px; border: 1px solid transparent; border-bottom-color: var(--cy-line); background: transparent; color: var(--cy-text); text-align: left; font: inherit; }
.nb-no { font-size: 12px; color: var(--cy-dim); letter-spacing: 1px; }
.nb-who { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.nb-who b { font-family: var(--font-ui); font-size: 14px; }
.nb-who small { font-size: 10px; color: var(--cy-dim); }
.nb-who em { font-style: normal; font-size: 10px; color: var(--cy-red); }
.nb-score { font-size: 12px; color: var(--cy-yellow); text-align: right; }
.nb-one { border-color: var(--cy-magenta); background: rgba(255, 43, 214, .06); cursor: pointer; margin-bottom: 6px; }
.nb-one .nb-no { color: var(--cy-magenta); }
.nb-one .nb-score b { color: var(--cy-red); }
.nb-me { border-color: var(--cy-line-strong); margin-top: 8px; }
.nb-glitch { position: relative; color: var(--cy-magenta); }
.nb-glitch::after { content: attr(data-text); position: absolute; left: 1px; top: 0; color: var(--cy-cyan); opacity: .6; clip-path: inset(0 0 55% 0); animation: nb-shift 2.4s steps(2) infinite; }
@keyframes nb-shift { 0%, 90% { transform: none; } 92% { transform: translateX(-2px); } 96% { transform: translateX(2px); } }

/* ---------------- 论坛 · iOS 风格（不随主题，固定浅色系统风） ---------------- */
.ios {
  --i-bg: #f2f2f7;
  --i-card: #ffffff;
  --i-line: rgba(60, 60, 67, .18);
  --i-text: #1c1c1e;
  --i-sub: #6c6c70;
  --i-muted: #8e8e93;
  --i-blue: #007aff;
  --i-red: #ff3b30;
  --i-gold: #b8860b;
  background: var(--i-bg);
  color: var(--i-text);
  font-family: -apple-system, 'PingFang SC', var(--font-ui);
  z-index: 60;
  color-scheme: light;
}
[data-theme="night"] .ios {
  --i-bg: #000000;
  --i-card: #1c1c1e;
  --i-line: rgba(84, 84, 88, .55);
  --i-text: #f2f2f7;
  --i-sub: #aeaeb2;
  --i-muted: #8e8e93;
  --i-blue: #0a84ff;
  --i-red: #ff453a;
  --i-gold: #e6c06a;
  color-scheme: dark;
}
.ios button { font: inherit; cursor: pointer; }
.ios button:focus-visible, .ios textarea:focus-visible, .ios input:focus-visible, .ios select:focus-visible { outline: 2px solid var(--i-blue); outline-offset: 2px; }
.ios-nav { position: relative; display: flex; align-items: center; justify-content: space-between; height: 48px; padding: 0 8px; background: color-mix(in srgb, var(--i-bg) 85%, transparent); backdrop-filter: blur(18px); border-bottom: .5px solid var(--i-line); flex-shrink: 0; }
.ios-nav-title { position: absolute; left: 50%; transform: translateX(-50%); font-weight: 600; font-size: 16px; max-width: 55%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ios-nav-right { display: flex; gap: 2px; }
.ios-nav-btn { min-width: 44px; height: 44px; padding: 0 8px; border: none; background: transparent; color: var(--i-blue); font-size: 16px; }
.ios-nav-btn.strong { font-weight: 600; }
.ios-scroll { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }
#forumBody { max-width: 720px; margin: 0 auto; padding: 0 0 24px; }
.ios-large { max-width: 720px; margin: 8px auto 4px; padding: 0 16px; font-size: 32px; font-weight: 700; letter-spacing: .5px; }
.ios-seg { max-width: 688px; margin: 8px auto 12px; display: flex; gap: 2px; padding: 2px; border-radius: 9px; background: color-mix(in srgb, var(--i-muted) 22%, transparent); overflow-x: auto; }
.ios-seg button { flex: 1; min-width: 64px; height: 32px; border: none; border-radius: 7px; background: transparent; color: var(--i-text); font-size: 13px; white-space: nowrap; }
.ios-seg button.on { background: var(--i-card); font-weight: 600; box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
@media (min-width: 720px) { .ios-seg { margin-left: auto; margin-right: auto; } }
@media (max-width: 720px) { .ios-seg { margin-left: 16px; margin-right: 16px; } }

.ios-group { margin: 0 16px; background: var(--i-card); border-radius: 12px; overflow: hidden; }
.ios-group.flat { border-radius: 12px; }
.ios-cell { width: 100%; display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border: none; border-bottom: .5px solid var(--i-line); background: transparent; color: inherit; text-align: left; }
.ios-cell:last-child { border-bottom: none; }
.ios-cell:active { background: color-mix(in srgb, var(--i-muted) 18%, transparent); }
.ios-cell.pinned { background: color-mix(in srgb, var(--i-gold) 8%, transparent); }
.ios-cell.mine .ios-cell-title::after { content: '我的'; margin-left: 6px; font-size: 10px; color: var(--i-blue); border: 1px solid var(--i-blue); border-radius: 4px; padding: 0 4px; vertical-align: 2px; }
.ios-cell-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.ios-cell-title { font-size: 15px; font-weight: 600; line-height: 1.4; }
.ios-cell-sub { font-size: 13px; color: var(--i-sub); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ios-cell-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12px; color: var(--i-muted); }
.ios-heat { margin-left: auto; color: var(--i-red); }
.ios-chev { color: var(--i-muted); font-size: 20px; align-self: center; }
.ios-ava { flex-shrink: 0; width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: hsl(var(--h) 55% 55%); color: #fff; font-size: 15px; font-weight: 600; }
.ios-name { font-weight: 500; color: var(--i-text); }
.ios-name.z { color: var(--i-gold); }
.ios-badge { margin-left: 4px; font-size: 10px; padding: 0 5px; border-radius: 4px; background: var(--i-gold); color: #fff; }
.ios-pin { margin-right: 6px; font-size: 11px; padding: 1px 6px; border-radius: 4px; background: var(--i-red); color: #fff; font-weight: 500; vertical-align: 1px; }
.ios-tagb { margin-right: 6px; font-size: 11px; padding: 1px 6px; border-radius: 4px; background: color-mix(in srgb, var(--i-blue) 14%, transparent); color: var(--i-blue); font-weight: 500; vertical-align: 1px; }
.ios-plain { display: block; margin: 12px auto 0; min-height: 44px; padding: 0 16px; border: none; background: transparent; color: var(--i-blue); font-size: 15px; }
.ios-plain.strong { font-weight: 600; }
.ios-plain:disabled { opacity: .4; cursor: default; }
.ios-foot { text-align: center; font-size: 12px; color: var(--i-muted); margin: 8px 16px; }
.ios-empty { padding: 28px 16px; text-align: center; color: var(--i-muted); font-size: 14px; }
.ios-section { margin: 20px 32px 6px; font-size: 13px; color: var(--i-muted); }
.ios-loading { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 16px; color: var(--i-muted); font-size: 13px; }
.ios-spin { width: 16px; height: 16px; border: 2px solid var(--i-line); border-top-color: var(--i-muted); border-radius: 50%; animation: ios-spin .8s linear infinite; }
@keyframes ios-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ios-spin, .nb-glitch::after { animation: none; } }

.ios-post { margin: 12px 16px 0; padding: 16px; background: var(--i-card); border-radius: 12px; }
.ios-post-title { font-size: 20px; font-weight: 700; line-height: 1.4; margin: 6px 0 12px; }
.ios-post-author { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.ios-post-author > span { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.ios-post-author small { font-size: 12px; color: var(--i-muted); }
.ios-pill { height: 30px; padding: 0 14px; border-radius: 15px; border: none; background: color-mix(in srgb, var(--i-blue) 14%, transparent); color: var(--i-blue); font-size: 13px; }
.ios-post-body { font-size: 16px; line-height: 1.75; white-space: normal; word-break: break-word; }
.ios-post-body.big { font-size: 18px; }
.ios-note { margin-top: 12px; padding: 10px 12px; border-radius: 8px; background: color-mix(in srgb, var(--i-muted) 14%, transparent); font-size: 13px; color: var(--i-sub); }
.ios-reply { display: flex; gap: 10px; padding: 12px 14px; border-bottom: .5px solid var(--i-line); }
.ios-reply:last-child { border-bottom: none; }
.ios-reply.mine { background: color-mix(in srgb, var(--i-blue) 6%, transparent); }
.ios-reply.z { background: color-mix(in srgb, var(--i-gold) 8%, transparent); }
.ios-reply .ios-ava { width: 32px; height: 32px; font-size: 13px; }
.ios-reply-main { flex: 1; min-width: 0; }
.ios-reply-head { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.ios-floor { margin-left: auto; font-size: 12px; color: var(--i-muted); white-space: nowrap; }
.ios-quote { margin-top: 4px; font-size: 12px; color: var(--i-blue); }
.ios-reply-text { margin-top: 4px; font-size: 15px; line-height: 1.65; word-break: break-word; }
.ios-reply-acts { display: flex; gap: 14px; margin-top: 4px; }
.ios-reply-acts button { min-height: 32px; border: none; background: transparent; color: var(--i-muted); font-size: 13px; padding: 0; }

.ios-chat { display: flex; flex-direction: column; gap: 8px; padding: 12px 16px; }
.ios-bubble { max-width: 75%; padding: 9px 13px; border-radius: 18px; font-size: 15px; line-height: 1.5; word-break: break-word; }
.ios-bubble.them { align-self: flex-start; background: var(--i-card); border-bottom-left-radius: 6px; }
.ios-bubble.me { align-self: flex-end; background: var(--i-blue); color: #fff; border-bottom-right-radius: 6px; }

.ios-bar { flex-shrink: 0; padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--i-bg) 90%, transparent); backdrop-filter: blur(18px); border-top: .5px solid var(--i-line); }
.ios-bar-row { max-width: 720px; margin: 0 auto; display: flex; gap: 8px; align-items: flex-end; }
.ios-bar textarea { flex: 1; min-height: 36px; max-height: 120px; padding: 8px 14px; border-radius: 18px; border: .5px solid var(--i-line); background: var(--i-card); color: var(--i-text); font: inherit; font-size: 15px; resize: none; }
.ios-bar button[type="submit"] { height: 36px; padding: 0 16px; border-radius: 18px; border: none; background: var(--i-blue); color: #fff; font-weight: 600; }
.ios-bar button:disabled { opacity: .4; }
.ios-reply-tag { max-width: 720px; margin: 0 auto 6px; font-size: 12px; color: var(--i-blue); display: flex; align-items: center; gap: 6px; }
.ios-reply-tag button { width: 24px; height: 24px; border: none; border-radius: 50%; background: transparent; color: var(--i-muted); }

.ios-sheet { position: absolute; inset: 0; display: none; align-items: flex-end; justify-content: center; background: rgba(0, 0, 0, .35); z-index: 5; }
.ios-sheet.open { display: flex; }
.ios-sheet-inner { width: 100%; max-width: 720px; height: 88%; display: flex; flex-direction: column; gap: 10px; padding: 0 16px 16px; background: var(--i-bg); border-radius: 14px 14px 0 0; }
.ios-sheet-head { display: flex; align-items: center; justify-content: space-between; height: 52px; }
.ios-field { display: flex; align-items: center; gap: 10px; padding: 0 14px; background: var(--i-card); border-radius: 10px; }
.ios-field > span:not(.sr-only) { font-size: 15px; color: var(--i-sub); }
.ios-field select, .ios-field input, .ios-field textarea { flex: 1; min-height: 44px; border: none; background: transparent; color: var(--i-text); font: inherit; font-size: 16px; }
.ios-field.grow { flex: 1; align-items: stretch; padding: 10px 14px; }
.ios-field.grow textarea { resize: none; line-height: 1.6; }

/* ---------------- 住宅区（跟随主题） ---------------- */
.hm { background: var(--bg); color: var(--text); z-index: 60; }
.hm-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; height: 52px; padding: 0 12px; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.hm-head > b { font-family: var(--font-serif); font-size: 17px; letter-spacing: 3px; color: var(--accent); }
.hm-score { font-size: 12px; color: var(--text-dim); }
.hm-score b { font-family: var(--font-mono); color: var(--accent); }
.hm-wrap { flex: 1; overflow-y: auto; width: 100%; max-width: 640px; margin: 0 auto; padding: 14px 14px 32px; }
.hm-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; }
.hm-hero { border-color: var(--line-strong); background: linear-gradient(160deg, var(--surface-2), var(--surface)); }
.hm-hero h2 { font-family: var(--font-serif); font-size: 22px; margin: 4px 0 8px; color: var(--text); }
.hm-tier { font-size: 11px; letter-spacing: 2px; color: var(--accent); }
.hm-desc { font-size: 13px; line-height: 1.75; color: var(--text-dim); margin: 0; }
.hm-perks { margin: 10px 0 0; padding-left: 18px; font-size: 12px; line-height: 1.8; color: var(--text-dim); }
.hm-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0; }
.hm-stats div { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px; border-radius: var(--radius-sm); background: var(--bg); }
.hm-stats b { font-family: var(--font-mono); font-size: 18px; color: var(--c-san); }
.hm-stats span { font-size: 11px; color: var(--text-muted); }
.hm-rest { width: 100%; }
.hm-note { margin: 10px 0 0; font-size: 12px; line-height: 1.7; color: var(--text-muted); }
.hm-title { font-size: 13px; letter-spacing: 2px; color: var(--accent); margin-bottom: 10px; }
.hm-title.sub { margin-top: 14px; }
.hm-title small { color: var(--text-muted); letter-spacing: 0; margin-left: 6px; }
.hm-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.hm-acts .btn { flex: 1 1 140px; }
.hm-furn { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.hm-furn:last-child { border-bottom: none; }
.hm-furn span { color: var(--text-muted); font-size: 12px; }
.hm-furn.on b { color: var(--accent); }
.hm-furn.on span { color: var(--c-san); }
.hm-row { display: flex; gap: 12px; align-items: center; }
.hm-row.cur { border-color: var(--accent); }
.hm-row-main { flex: 1; min-width: 0; }
.hm-row h3 { font-family: var(--font-serif); font-size: 17px; margin: 2px 0 6px; }
.hm-row .btn { flex-shrink: 0; }
@media (max-width: 480px) { .hm-row { flex-direction: column; align-items: stretch; } }
