ai {
  display: block;
  font-family: 'Noto Serif SC', 'Georgia', serif;
  --c1: #c9a0a0;
  --c2: #8a7070;
  --c3: #f5f0ee;
  --c4: #2d2020;
  --c5: #e8ddd8;
  --ca: #b07878;
  --cb: #f9f5f3;
  --line: #e0d4cf;
  color: var(--c4);
  background: var(--cb);
  padding: 12px 10px 20px;
  max-width: 680px;
  margin: 0 auto;
}

/* ── Time Card ── */
tc {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: end;
  gap: 8px;
  background: linear-gradient(135deg, #3a2828 0%, #5c3d3d 60%, #7a5050 100%);
  border-radius: 14px;
  padding: 14px 16px 12px;
  margin-bottom: 14px;
  color: #f0e8e4;
  position: relative;
  overflow: hidden;
}
tc::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='30' cy='30' r='28' fill='none' stroke='rgba(255,255,255,0.04)' stroke-width='1'/%3E%3Ccircle cx='30' cy='30' r='18' fill='none' stroke='rgba(255,255,255,0.03)' stroke-width='1'/%3E%3C/svg%3E") center/80px repeat;
  pointer-events: none;
}
tl {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}
ts {
  font-size: 2.2em;
  font-weight: 700;
  letter-spacing: 2px;
  line-height: 1;
  color: #fff;
  font-family: 'Georgia', serif;
}
td {
  font-size: .75em;
  color: rgba(255, 255, 255, .7);
  letter-spacing: 1px;
}
tw {
  font-size: .7em;
  color: rgba(255, 255, 255, .5);
  margin-top: 1px;
}
tm {
  text-align: center;
}
lo {
  display: block;
  font-size: .85em;
  color: rgba(255, 255, 255, .85);
  letter-spacing: .5px;
  line-height: 1.5;
}
tr {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
}
wt {
  font-size: .9em;
  color: #fff;
  font-weight: 600;
}
wf {
  font-size: .7em;
  color: rgba(255, 255, 255, .55);
}

/* ── 正文 ── */
article {
  display: block;
  font-size: .95em;
  line-height: 2;
  color: var(--c4);
  padding: 4px 2px 12px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 12px;
}
article p {
  margin: 0 0 .6em;
  text-indent: 2em;
}
article p:first-of-type::first-letter {
  font-size: 1.4em;
  font-weight: 700;
  color: var(--ca);
  float: left;
  line-height: 1;
  margin-right: 2px;
}

/* 对话「」独立段：纯 CSS 无法按文本内容选择，请给对话段加上 class="dialogue" */
ai article p.dialogue {
  text-indent: 0;
}

/* ── details 通用 ── */
ai details {
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 8px;
  background: var(--c3);
  overflow: hidden;
}
ai details summary {
  padding: 9px 14px;
  font-size: .85em;
  font-weight: 700;
  color: var(--c2);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--c5);
  border-bottom: 1px solid transparent;
  transition: background .2s;
  font-family: 'Noto Sans SC', system-ui, sans-serif;
}
ai details summary::-webkit-details-marker {
  display: none;
}
ai details summary::after {
  content: '›';
  margin-left: auto;
  font-size: 1.1em;
  color: var(--c1);
  transition: transform .2s;
}
ai details[open] summary {
  background: var(--c5);
  border-bottom: 1px solid var(--line);
}
ai details[open] summary::after {
  transform: rotate(90deg);
}

/* ── sec 分区 ── */
sec {
  display: block;
  padding: 6px 12px 8px;
  border-bottom: 1px solid var(--line);
  font-family: 'Noto Sans SC', system-ui, sans-serif;
}
sec:last-child {
  border-bottom: none;
}
sec::before {
  content: attr(t);
  display: block;
  font-size: .7em;
  color: var(--c1);
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 4px;
  padding-bottom: 3px;
  border-bottom: 1px dashed var(--line);
}
r {
  display: flex;
  gap: 6px;
  padding: 2px 0;
  font-size: .8em;
  line-height: 1.6;
  align-items: baseline;
}
lb {
  color: var(--c2);
  min-width: 72px;
  flex-shrink: 0;
  font-size: .9em;
}
lb::after {
  content: '：';
}
vl {
  color: var(--c4);
  flex: 1;
}
mem {
  display: block;
  font-size: .78em;
  color: var(--c2);
  padding: 2px 0;
  line-height: 1.7;
  font-family: 'Noto Sans SC', system-ui, sans-serif;
}

/* ── 女友档案内嵌 ── */
details.gf-file {
  margin: 8px 12px 6px;
  border: 1px dashed var(--c1);
  border-radius: 8px;
  background: rgba(201, 160, 160, .06);
}
details.gf-file > summary {
  background: transparent;
  color: var(--ca);
  font-size: .82em;
  border-bottom: none;
  padding: 7px 12px;
}
details.gf-file[open] > summary {
  border-bottom: 1px dashed var(--line);
  background: transparent;
}
hint {
  font-size: .72em;
  color: #aaa;
  font-weight: 400;
  background: rgba(0, 0, 0, .05);
  border-radius: 20px;
  padding: 1px 7px;
  margin-left: 4px;
  font-style: italic;
}

/* ── 手机 ── */
phone {
  display: block;
  background: #1a1a1a;
  border-radius: 28px;
  margin: 8px auto;
  max-width: 320px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, .25), inset 0 1px 0 rgba(255, 255, 255, .08);
  border: 6px solid #111;
}
pbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 16px 4px;
  background: #111;
  font-size: .65em;
  color: rgba(255, 255, 255, .7);
  font-family: system-ui, sans-serif;
}
sig, ptime, bat {
  display: inline-block;
}
ptime {
  font-weight: 700;
  color: #fff;
  font-size: 1.1em;
}
pscreen {
  display: block;
  background: #f2f2f7;
  min-height: 200px;
  padding: 10px 10px 14px;
}
app-row {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 12px;
  padding: 8px 0;
  border-bottom: 1px solid #ddd;
}
app {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: .6em;
  color: #333;
  gap: 3px;
  position: relative;
  font-family: system-ui, sans-serif;
}
app::before {
  content: attr(n);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--c1), var(--ca));
  color: #fff;
  font-size: 1.6em;
  font-weight: 700;
}
app[n="微信"]::before {
  content: '💬';
  background: #07c160;
}
app[n="支付宝"]::before {
  content: '💳';
  background: #1677ff;
}
app[n="抖音"]::before {
  content: '🎵';
  background: #000;
}
app[n="外卖"]::before {
  content: '🍜';
  background: #ff6900;
}
abadge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #f00;
  color: #fff;
  font-size: .9em;
  border-radius: 10px;
  padding: 0 4px;
  min-width: 16px;
  text-align: center;
  line-height: 16px;
  height: 16px;
  font-family: system-ui, sans-serif;
}
msg-list {
  display: block;
}
msg-item {
  display: block;
  background: #fff;
  border-radius: 10px;
  padding: 8px 10px;
  margin-bottom: 6px;
  font-family: system-ui, sans-serif;
}
mfrom {
  display: inline-block;
  font-size: .72em;
  font-weight: 700;
  color: #333;
}
mtime {
  display: inline-block;
  font-size: .65em;
  color: #999;
  margin-left: 6px;
}
mpreview {
  display: block;
  font-size: .72em;
  color: #666;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
msg-item details {
  border: none;
  border-radius: 0;
  background: transparent;
  margin: 0;
}
msg-item details summary {
  background: transparent;
  border: none;
  font-size: .68em;
  color: var(--ca);
  padding: 3px 0 0;
  font-weight: 400;
}
msg-item details[open] summary {
  border: none;
}
mfull {
  display: block;
  font-size: .72em;
  color: #333;
  padding: 4px 0 2px;
  line-height: 1.6;
  font-family: system-ui, sans-serif;
}
notify-list {
  display: block;
  margin-top: 6px;
}
notify {
  display: flex;
  gap: 6px;
  align-items: baseline;
  background: #fff;
  border-radius: 8px;
  padding: 5px 8px;
  margin-bottom: 4px;
  font-family: system-ui, sans-serif;
}
napp {
  font-size: .65em;
  font-weight: 700;
  color: var(--ca);
  flex-shrink: 0;
}
ntxt {
  font-size: .68em;
  color: #555;
}
friend-list {
  margin-top: 8px;
}
friend-list details {
  border: none;
  border-radius: 6px;
  background: #fff;
  margin-bottom: 4px;
}
friend-list details summary {
  background: #fff;
  font-size: .72em;
  padding: 6px 10px;
  border: none;
}
friend-list details[open] summary {
  border-bottom: 1px solid #eee;
}
friend {
  display: flex;
  gap: 6px;
  padding: 4px 10px;
  font-size: .68em;
  font-family: system-ui, sans-serif;
  border-bottom: 1px solid #f5f5f5;
  flex-wrap: wrap;
}
friend:last-child {
  border-bottom: none;
}
fn {
  font-weight: 700;
  color: #333;
  min-width: 40px;
}
fage, fid, frel {
  color: #888;
}
group {
  display: flex;
  gap: 8px;
  padding: 4px 10px;
  font-size: .68em;
  font-family: system-ui, sans-serif;
  border-bottom: 1px solid #f5f5f5;
  align-items: center;
}
group:last-child {
  border-bottom: none;
}
gn {
  font-weight: 700;
  color: #333;
}
gc, glast {
  color: #999;
  font-size: .9em;
}

/* ── 选项 ── */
opts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
op {
  display: block;
  background: var(--c5);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: .8em;
  color: var(--c2);
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .1s;
  font-family: 'Noto Sans SC', system-ui, sans-serif;
  line-height: 1.5;
}
op::before {
  content: attr(v) ". ";
  font-weight: 700;
  color: var(--ca);
}
op:hover {
  background: var(--c1);
  color: #fff;
  border-color: var(--ca);
  transform: translateY(-1px);
}
op:hover::before {
  color: #fff;
}

/* ── 星记忆回廊 ── */
/* 修复点：将 &gt; 替换为 > */
ai details[open] > details {
  margin: 0 8px 6px;
  border-radius: 8px;
}
mtable {
  display: block;
  margin: 6px 12px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  font-family: 'Noto Sans SC', system-ui, sans-serif;
}
mhd {
  display: block;
  background: linear-gradient(90deg, var(--c1), var(--ca));
  color: #fff;
  font-size: .75em;
  font-weight: 700;
  padding: 5px 10px;
  letter-spacing: 1px;
}
mrow {
  display: grid;
  grid-template-columns: 2em 5em 1fr 2fr;
  border-bottom: 1px solid var(--line);
  font-size: .72em;
}
mrow:last-child {
  border-bottom: none;
}
mrow.mth {
  background: var(--c5);
  font-weight: 700;
  color: var(--c2);
}
mc {
  padding: 4px 6px;
  border-right: 1px solid var(--line);
  line-height: 1.5;
  word-break: break-all;
  color: var(--c4);
}
mc:last-child {
  border-right: none;
}
mrow.mth mc {
  color: var(--c2);
}