ai {
  display: block;
  --pink: #ff69b4;
  --pink-light: #ffb6d9;
  --pink-dark: #ff1493;
  --purple: #9370db;
  --purple-dark: #4b0082;
  --blue: #4db8ff;
  --green: #4dff88;
  --bg: #1a1a2e;
  --bg-light: #2a2a3e;
  --text: #f0f0f0;
  --text-dim: #c0c0c0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  background: linear-gradient(135deg, var(--bg) 0%, var(--purple-dark) 100%);
  padding: 12px;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
}

ai::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent 30%, rgba(255,105,180,0.1) 50%, transparent 70%);
  animation: scan 8s linear infinite;
  pointer-events: none;
}

@keyframes scan {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}

hd {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 8px;
  align-items: center;
  padding: 16px 12px;
  background: linear-gradient(135deg, rgba(255,105,180,0.25), rgba(147,112,219,0.25));
  border-radius: 8px;
  margin-bottom: 16px;
  border: 1px solid rgba(255,105,180,0.4);
  position: relative;
  overflow: hidden;
}

hd::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='20' height='20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0h20v20H0z' fill='none'/%3E%3Ccircle cx='2' cy='2' r='1' fill='%23ff69b4' opacity='0.3'/%3E%3C/svg%3E");
  opacity: 0.2;
  pointer-events: none;
}

loc {
  display: block;
  font-size: 13px;
  color: #ffcce6;
  text-align: left;
  font-weight: 500;
}

loc::before {
  content: '📍 ';
}

time {
  display: block;
  font-size: 22px;
  font-weight: 700;
  text-align: center;
  background: linear-gradient(135deg, var(--pink), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 1px;
  filter: drop-shadow(0 0 8px rgba(255,105,180,0.6));
}

wt {
  display: block;
  font-size: 12px;
  color: #66d9ff;
  margin-top: 4px;
  font-weight: 500;
}

sce {
  display: block;
  font-size: 13px;
  color: #d0d0d0;
  text-align: right;
  font-style: italic;
  font-weight: 500;
}

article {
  background: rgba(42,42,62,0.7);
  padding: 12px;
  border-radius: 6px;
  margin-bottom: 12px;
  backdrop-filter: blur(10px);
}

article p {
  margin: 8px 0;
  text-indent: 2em;
  color: #f5f5f5;
}

q {
  display: block;
  margin: 12px 0;
  padding: 12px 14px 12px 14px;
  border-radius: 16px;
  position: relative;
  max-width: 75%;
  word-wrap: break-word;
  transition: transform 0.2s;
  font-style: normal;
  color: #f5f5f5;
  font-size: 14px;
  line-height: 1.7;
}

q:hover {
  transform: scale(1.02);
}

q::before,
q::after {
  display: none;
}

q[p] {
  background: linear-gradient(135deg, rgba(77,184,255,0.35), rgba(77,184,255,0.2));
  border: 1px solid rgba(77,184,255,0.6);
  margin-left: 0;
  margin-right: auto;
  padding-top: 24px;
}

q[p]::before {
  content: '';
  display: block;
  position: absolute;
  left: -8px;
  top: 16px;
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-right: 8px solid rgba(77,184,255,0.6);
}

q[c] {
  background: linear-gradient(135deg, rgba(255,105,180,0.4), rgba(255,20,147,0.25));
  border: 1px solid rgba(255,105,180,0.7);
  margin-left: auto;
  margin-right: 0;
  padding-top: 24px;
}

q[c]::before {
  content: '';
  display: block;
  position: absolute;
  right: -8px;
  top: 16px;
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 8px solid rgba(255,105,180,0.7);
}

q[o] {
  background: linear-gradient(135deg, rgba(77,255,136,0.35), rgba(77,255,136,0.2));
  border: 1px solid rgba(77,255,136,0.6);
  margin-left: auto;
  margin-right: 0;
  padding-top: 24px;
}

q[o]::before {
  content: '';
  display: block;
  position: absolute;
  right: -8px;
  top: 16px;
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 8px solid rgba(77,255,136,0.6);
}

q[t] {
  font-style: italic;
  opacity: 0.95;
}

q[t]::after {
  content: '💭';
  position: absolute;
  right: 8px;
  top: 2px;
  font-size: 16px;
}

q[p] nm {
  position: absolute;
  left: 12px;
  top: 4px;
  font-size: 11px;
  font-weight: 600;
  color: #66d9ff;
  background: rgba(77,184,255,0.25);
  backdrop-filter: blur(8px);
  padding: 2px 8px;
  border-radius: 8px;
  border: 1px solid rgba(77,184,255,0.4);
}

q[c] nm,
q[o] nm {
  position: absolute;
  right: 12px;
  top: 4px;
  font-size: 11px;
  font-weight: 600;
  backdrop-filter: blur(8px);
  padding: 2px 8px;
  border-radius: 8px;
}

q[c] nm {
  color: #ffb6d9;
  background: rgba(255,105,180,0.25);
  border: 1px solid rgba(255,105,180,0.4);
}

q[o] nm {
  color: #66ffaa;
  background: rgba(77,255,136,0.25);
  border: 1px solid rgba(77,255,136,0.4);
}

details {
  margin: 12px 0;
  background: var(--bg-light);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255,105,180,0.3);
}

summary {
  padding: 12px 16px;
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  color: #f5f5f5;
  background: linear-gradient(135deg, rgba(255,105,180,0.35), rgba(147,112,219,0.35));
  transition: all 0.3s;
  position: relative;
  user-select: none;
}

summary:hover {
  background: linear-gradient(135deg, rgba(255,105,180,0.55), rgba(147,112,219,0.55));
  box-shadow: 0 0 15px rgba(255,105,180,0.5);
}

summary::marker {
  content: '';
}

summary::before {
  content: '▶';
  display: inline-block;
  margin-right: 8px;
  transition: transform 0.3s;
  color: var(--pink);
}

details[open] summary::before {
  transform: rotate(90deg);
}

details.sys summary {
  background: linear-gradient(135deg, rgba(255,105,180,0.4), rgba(147,112,219,0.4));
}

details.sys summary::after {
  content: '';
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ff69b4'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E");
  opacity: 0.9;
}

details.msg summary {
  background: linear-gradient(135deg, rgba(77,184,255,0.35), rgba(147,112,219,0.35));
}

details.msg summary::after {
  content: '';
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%234db8ff'%3E%3Cpath d='M20 2H4c-1.1 0-2 .9-2 2v18l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2z'/%3E%3C/svg%3E");
  opacity: 0.9;
}

details.chr summary,
details.npc summary {
  background: linear-gradient(135deg, rgba(255,20,147,0.4), rgba(138,43,226,0.4));
}

details.mem summary,
details.arc summary {
  background: linear-gradient(135deg, rgba(147,112,219,0.4), rgba(75,0,130,0.4));
}

sec {
  display: block;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,105,180,0.15);
}

sec:last-child {
  border-bottom: none;
}

sec h {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #ffb6d9;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

it {
  display: block;
  padding: 8px 0;
  border-left: 3px solid var(--pink);
  padding-left: 10px;
  margin: 6px 0;
}

it n {
  display: block;
  font-weight: 600;
  color: #ffcce6;
  margin-bottom: 4px;
}

it t {
  display: block;
  font-size: 13px;
  color: #d0d0d0;
  margin-bottom: 4px;
}

it r {
  display: inline-block;
  font-size: 12px;
  color: #66d9ff;
  background: rgba(77,184,255,0.2);
  padding: 2px 8px;
  border-radius: 10px;
  margin-right: 6px;
  font-weight: 500;
}

it m {
  display: inline-block;
  font-size: 12px;
  color: #b19cd9;
  background: rgba(147,112,219,0.2);
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 500;
}

it pg {
  display: inline-block;
  font-size: 12px;
  color: #66ffaa;
  font-weight: 600;
  margin-left: 6px;
}

rec {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  padding: 6px 0;
  align-items: center;
}

rec tg {
  font-weight: 600;
  color: #ffb6d9;
}

rec way {
  font-size: 13px;
  color: #d0d0d0;
}

rec exp {
  font-weight: 600;
  color: #66ffaa;
}

msg {
  display: block;
  padding: 8px;
  margin: 6px 0;
  background: rgba(255,105,180,0.08);
  border-radius: 6px;
  border-left: 3px solid #4db8ff;
}

msg from {
  display: block;
  font-weight: 600;
  color: #66d9ff;
  font-size: 13px;
  margin-bottom: 4px;
}

msg txt {
  display: block;
  font-size: 13px;
  color: #f0f0f0;
}

post {
  display: block;
  padding: 10px;
  margin: 8px 0;
  background: rgba(255,105,180,0.1);
  border-radius: 6px;
}

post ti {
  display: block;
  font-weight: 600;
  color: #ffb6d9;
  margin-bottom: 6px;
}

post op {
  display: block;
  font-size: 13px;
  color: #f0f0f0;
  margin-bottom: 6px;
  padding-bottom: 6px;
  border-bottom: 1px dashed rgba(255,105,180,0.3);
}

post rp {
  display: block;
  font-size: 12px;
  color: #d0d0d0;
  padding: 4px 0 4px 12px;
  border-left: 2px solid rgba(255,105,180,0.4);
  margin: 4px 0;
}

post rp::before {
  content: '💬 ';
}

news {
  display: block;
  padding: 8px;
  margin: 6px 0;
  background: rgba(147,112,219,0.15);
  border-radius: 6px;
}

news ti {
  display: block;
  font-weight: 600;
  color: #b19cd9;
  margin-bottom: 4px;
}

news txt {
  display: block;
  font-size: 13px;
  color: #d0d0d0;
}

p[t] {
  border-left: 3px solid var(--pink);
  padding: 8px 0 8px 12px;
  margin: 10px 0;
  position: relative;
}

p[t]::before {
  content: attr(t);
  position: absolute;
  left: -3px;
  top: -10px;
  font-size: 11px;
  font-weight: 600;
  color: #ffb6d9;
  background: var(--bg-light);
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

f {
  display: inline-block;
  font-weight: 700;
  font-size: 15px;
  color: #ffb6d9;
  background: linear-gradient(135deg, rgba(255,105,180,0.25), rgba(255,20,147,0.25));
  padding: 2px 10px;
  border-radius: 6px;
  margin-right: 8px;
}

d {
  display: block;
  padding: 4px 0;
  font-size: 13px;
  line-height: 1.8;
  color: #f0f0f0;
}

mc {
  display: block;
  padding: 10px 16px;
  font-size: 12px;
  color: #b19cd9;
  text-align: center;
  background: rgba(147,112,219,0.15);
  border-radius: 6px;
  margin: 8px 16px;
  font-weight: 500;
}

ml,
al {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 8px;
  padding: 8px 16px;
  border-bottom: 1px solid rgba(255,105,180,0.15);
  align-items: baseline;
}

ml:last-child,
al:last-child {
  border-bottom: none;
}

ml idx,
al idx {
  font-weight: 700;
  color: #ffb6d9;
  font-size: 12px;
}

ml ts,
al ts {
  font-size: 12px;
  color: #c0c0c0;
  white-space: nowrap;
}

ml txt,
al txt {
  font-size: 13px;
  color: #f0f0f0;
}

opts {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  padding: 12px;
  background: rgba(42,42,62,0.7);
  border-radius: 8px;
}

op {
  padding: 12px 16px;
  background: linear-gradient(135deg, rgba(147,112,219,0.35), rgba(75,0,130,0.25));
  border: 1px solid rgba(147,112,219,0.6);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 14px;
  color: #f0f0f0;
}

op:hover {
  background: linear-gradient(135deg, rgba(147,112,219,0.55), rgba(75,0,130,0.45));
  transform: translateX(4px);
  box-shadow: 0 0 15px rgba(147,112,219,0.6);
}

op[x] {
  background: linear-gradient(135deg, rgba(255,105,180,0.35), rgba(255,20,147,0.25));
  border: 1px solid rgba(255,105,180,0.6);
  position: relative;
}

op[x]:hover {
  background: linear-gradient(135deg, rgba(255,105,180,0.55), rgba(255,20,147,0.45));
  box-shadow: 0 0 20px rgba(255,105,180,0.7);
}

op[x]::after {
  content: '✨';
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  animation: sparkle 1.5s ease-in-out infinite;
}

@keyframes sparkle {
  0%, 100% { opacity: 1; transform: translateY(-50%) scale(1); }
  50% { opacity: 0.6; transform: translateY(-50%) scale(1.2); }
}