ai {
  display: block;
  max-width: 680px;
  margin: 0 auto;
  padding: 8px;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: #1a1a1a;
  background: linear-gradient(135deg, #fff8e1 0%, #e3f2fd 100%);
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  position: relative;
}
ai::before {
  content: '';
  position: absolute;
  inset: 0;
  background: 
    url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0h60v60H0z' fill='none'/%3E%3Cpath d='M30 15l5 10h10l-8 7 3 10-10-6-10 6 3-10-8-7h10z' fill='%23ffd54f' opacity='0.06'/%3E%3C/svg%3E"),
    repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(255,213,79,0.03) 2px, rgba(255,213,79,0.03) 4px);
  border-radius: 8px;
  pointer-events: none;
}
hd {
  display: block;
  padding: 10px 12px;
  margin: 0 0 10px;
  background: linear-gradient(135deg, #ffeb3b 0%, #42a5f5 100%);
  border-radius: 6px;
  font-weight: 600;
  font-size: 13px;
  color: #1565c0;
  text-shadow: 0 1px 2px rgba(255,255,255,0.6);
  box-shadow: 0 2px 6px rgba(66,165,245,0.25), inset 0 1px 0 rgba(255,255,255,0.4);
  position: relative;
  overflow: hidden;
}
hd::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(255,255,255,0.1) 10px, rgba(255,255,255,0.1) 20px);
  animation: shimmer 20s linear infinite;
}
@keyframes shimmer {
  0% { transform: translate(0, 0); }
  100% { transform: translate(50%, 50%); }
}
article {
  display: block;
  padding: 12px;
  margin: 0 0 10px;
  background: rgba(255,255,255,0.85);
  border-radius: 6px;
  border: 1px solid rgba(255,235,59,0.3);
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.03);
}
article p {
  margin: 0 0 8px;
}
article p:last-child {
  margin-bottom: 0;
}
details {
  margin: 0 0 10px;
  background: rgba(255,255,255,0.7);
  border-radius: 6px;
  border: 1px solid rgba(255,235,59,0.4);
  overflow: hidden;
  transition: all 0.3s ease;
}
details:hover {
  box-shadow: 0 4px 12px rgba(255,235,59,0.3), 0 0 20px rgba(66,165,245,0.15);
  border-color: #ffeb3b;
}
details[open] {
  background: rgba(255,255,255,0.9);
}
summary {
  display: block;
  padding: 10px 12px;
  background: linear-gradient(135deg, #fff9c4 0%, #bbdefb 100%);
  font-weight: 600;
  font-size: 14px;
  color: #1565c0;
  cursor: pointer;
  user-select: none;
  transition: background 0.2s;
  position: relative;
}
summary::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(to bottom, #ffeb3b, #42a5f5);
}
summary:hover {
  background: linear-gradient(135deg, #fff59d 0%, #90caf9 100%);
}
details[open] summary {
  border-bottom: 1px solid rgba(255,235,59,0.3);
}
sec {
  display: block;
  padding: 10px 12px;
  border-bottom: 1px dashed rgba(255,235,59,0.25);
  position: relative;
}
sec:last-child {
  border-bottom: none;
}
sec::before {
  content: attr(t);
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #1976d2;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 1px rgba(255,255,255,0.8);
}
d {
  display: block;
  margin: 0 0 4px;
  font-size: 13px;
  color: #424242;
  line-height: 1.6;
}
d:last-child {
  margin-bottom: 0;
}
f {
  display: inline-block;
  font-weight: 600;
  color: #1565c0;
  min-width: 80px;
}
grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: 8px;
  margin-top: 6px;
}
attr {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 6px;
  background: linear-gradient(135deg, rgba(255,249,196,0.6), rgba(187,222,251,0.6));
  border-radius: 6px;
  border: 1px solid rgba(255,235,59,0.4);
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}
attr::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(255,235,59,0.3), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s;
}
attr:hover::before {
  opacity: 1;
}
attr[lv="S"] {
  border-color: #ffd600;
  box-shadow: 0 0 12px rgba(255,214,0,0.5), inset 0 1px 2px rgba(255,255,255,0.5);
}
attr[lv="A"] {
  border-color: #ffeb3b;
  box-shadow: 0 0 8px rgba(255,235,59,0.4);
}
attr[lv="B"] {
  border-color: #42a5f5;
  box-shadow: 0 0 6px rgba(66,165,245,0.3);
}
attr[lv="C"] {
  border-color: #90caf9;
}
attr[lv="D"] {
  border-color: #bbdefb;
  opacity: 0.8;
}
attr i {
  font-style: normal;
  font-size: 11px;
  color: #616161;
  margin-bottom: 4px;
}
attr val {
  font-size: 18px;
  font-weight: 700;
  color: #1565c0;
  text-shadow: 0 1px 2px rgba(255,255,255,0.8);
}
bar {
  display: block;
  margin: 8px 0;
}
bar label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  color: #1565c0;
  margin-bottom: 4px;
}
bar label span {
  font-size: 11px;
  color: #757575;
  font-weight: 400;
}
track {
  display: block;
  height: 16px;
  background: linear-gradient(to right, rgba(255,249,196,0.5), rgba(187,222,251,0.5));
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255,235,59,0.4);
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
  position: relative;
}
track::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(90deg, transparent, transparent 10px, rgba(255,255,255,0.1) 10px, rgba(255,255,255,0.1) 20px);
}
fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #ffeb3b 0%, #42a5f5 100%);
  transition: width 0.4s ease;
  box-shadow: inset 0 1px 2px rgba(255,255,255,0.4), 0 0 8px rgba(255,235,59,0.5);
  position: relative;
}
fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
  animation: progress-shine 2s ease infinite;
}
@keyframes progress-shine {
  0% { left: -100%; }
  100% { left: 200%; }
}
track.c fill {
  background: linear-gradient(90deg, #ff6b6b 0%, #ffd93d 50%, #42a5f5 100%);
}
bar num {
  display: block;
  text-align: right;
  font-size: 11px;
  color: #616161;
  margin-top: 2px;
}
fluid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 6px;
}
fluid d {
  padding: 6px;
  background: rgba(187,222,251,0.3);
  border-radius: 4px;
  font-size: 12px;
  text-align: center;
  border: 1px solid rgba(66,165,245,0.3);
}
sgrid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-top: 6px;
}
sgrid d {
  padding: 6px;
  background: rgba(255,249,196,0.4);
  border-radius: 4px;
  font-size: 12px;
  text-align: center;
  border: 1px solid rgba(255,235,59,0.3);
  font-weight: 500;
  color: #1565c0;
}
exp {
  display: block;
  margin: 8px 0;
  padding: 8px;
  background: rgba(255,255,255,0.5);
  border-radius: 4px;
  border-left: 3px solid #ffeb3b;
}
exp dt {
  font-weight: 600;
  color: #1976d2;
  font-size: 12px;
  margin-bottom: 3px;
}
exp dd {
  margin: 0 0 6px 0;
  font-size: 12px;
  color: #616161;
  line-height: 1.5;
}
exp dd:last-child {
  margin-bottom: 0;
}
think {
  display: block;
  padding: 10px;
  background: linear-gradient(135deg, rgba(255,249,196,0.6), rgba(187,222,251,0.6));
  border-radius: 6px;
  border-left: 4px solid #42a5f5;
  font-style: italic;
  color: #1565c0;
  font-size: 13px;
  box-shadow: 0 2px 6px rgba(66,165,245,0.15);
  position: relative;
}
think::before {
  content: '💭';
  position: absolute;
  left: -20px;
  top: 8px;
  font-size: 16px;
}
skill {
  display: block;
  margin-top: 6px;
}
skill dt {
  font-weight: 600;
  color: #1976d2;
  font-size: 13px;
  margin: 6px 0 3px;
  padding-left: 12px;
  position: relative;
}
skill dt::before {
  content: '⚡';
  position: absolute;
  left: 0;
  top: 0;
}
skill dd {
  margin: 0 0 6px 12px;
  font-size: 12px;
  color: #616161;
  line-height: 1.5;
}
npc {
  display: block;
  padding: 10px;
  margin: 6px 0;
  background: rgba(255,249,196,0.4);
  border-radius: 6px;
  border: 1px solid rgba(255,235,59,0.4);
}
task d {
  padding-left: 16px;
  position: relative;
}
task d::before {
  content: '▹';
  position: absolute;
  left: 0;
  color: #42a5f5;
}
quest {
  display: block;
  margin: 6px 0;
  padding: 8px 10px;
  background: rgba(255,255,255,0.6);
  border-radius: 6px;
  border-left: 3px solid #ffeb3b;
  transition: all 0.2s;
}
quest:hover {
  background: rgba(255,249,196,0.6);
  box-shadow: 0 2px 8px rgba(255,235,59,0.3);
  transform: translateX(2px);
}
quest[type="主线"]::before {
  content: '⭐ 主线';
  display: inline-block;
  padding: 2px 6px;
  background: linear-gradient(135deg, #ffeb3b, #ffd600);
  border-radius: 3px;
  font-size: 10px;
  font-weight: 600;
  color: #1565c0;
  margin-right: 6px;
}
quest[type="支线"]::before {
  content: '✦ 支线';
  display: inline-block;
  padding: 2px 6px;
  background: linear-gradient(135deg, #90caf9, #42a5f5);
  border-radius: 3px;
  font-size: 10px;
  font-weight: 600;
  color: #fff;
  margin-right: 6px;
}
quest dt {
  font-weight: 600;
  color: #1565c0;
  font-size: 13px;
  margin-bottom: 3px;
}
quest dd {
  margin: 0;
  font-size: 12px;
  color: #616161;
  line-height: 1.5;
}
news {
  display: block;
  padding: 8px 10px;
  margin: 6px 0;
  background: rgba(187,222,251,0.3);
  border-radius: 4px;
  border-left: 3px solid #42a5f5;
  font-size: 12px;
  color: #424242;
  transition: all 0.2s;
}
news:hover {
  background: rgba(187,222,251,0.5);
  transform: translateX(2px);
}
news::before {
  content: '📰 ';
  margin-right: 4px;
}
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
  font-size: 12px;
}
thead {
  background: linear-gradient(135deg, #fff9c4, #bbdefb);
}
thead th {
  padding: 8px 6px;
  text-align: left;
  font-weight: 600;
  color: #1565c0;
  border-bottom: 2px solid #ffeb3b;
}
tbody tr {
  border-bottom: 1px solid rgba(255,235,59,0.2);
  transition: background 0.2s;
}
tbody tr:hover {
  background: rgba(255,249,196,0.3);
}
tbody td {
  padding: 8px 6px;
  color: #424242;
}
act {
  display: block;
  margin: 8px 0;
  padding: 10px 12px;
  border-radius: 6px;
  border: 2px solid;
  transition: all 0.3s;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
act::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  transition: left 0.5s;
}
act:hover::before {
  left: 100%;
}
act[type="A"] {
  background: linear-gradient(135deg, rgba(255,249,196,0.4), rgba(187,222,251,0.4));
  border-color: #42a5f5;
}
act[type="A"]:hover {
  background: linear-gradient(135deg, rgba(255,249,196,0.6), rgba(187,222,251,0.6));
  box-shadow: 0 4px 12px rgba(66,165,245,0.4);
  transform: translateY(-2px);
}
act[type="B"] {
  background: linear-gradient(135deg, rgba(255,214,0,0.2), rgba(255,249,196,0.4));
  border-color: #ffd600;
}
act[type="B"]:hover {
  background: linear-gradient(135deg, rgba(255,214,0,0.3), rgba(255,249,196,0.6));
  box-shadow: 0 4px 12px rgba(255,214,0,0.4);
  transform: translateY(-2px);
}
act[type="C"] {
  background: linear-gradient(135deg, rgba(255,107,107,0.2), rgba(255,217,61,0.3));
  border-color: #ff6b6b;
}
act[type="C"]:hover {
  background: linear-gradient(135deg, rgba(255,107,107,0.3), rgba(255,217,61,0.5));
  box-shadow: 0 4px 12px rgba(255,107,107,0.4);
  transform: translateY(-2px);
}
act[type="D"] {
  background: linear-gradient(135deg, rgba(187,222,251,0.3), rgba(255,249,196,0.3));
  border-color: #90caf9;
  border-style: dashed;
}
act[type="D"]:hover {
  background: linear-gradient(135deg, rgba(187,222,251,0.5), rgba(255,249,196,0.5));
  box-shadow: 0 4px 12px rgba(144,202,249,0.4);
  transform: translateY(-2px);
}
act label {
  display: block;
  font-weight: 700;
  font-size: 13px;
  color: #1565c0;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
act desc {
  display: block;
  font-size: 12px;
  color: #616161;
  line-height: 1.5;
}
@media (max-width: 480px) {
  ai { font-size: 13px; padding: 6px; }
  hd { font-size: 12px; padding: 8px 10px; }
  summary { font-size: 13px; }
  grid { grid-template-columns: repeat(auto-fit, minmax(70px, 1fr)); gap: 6px; }
  sgrid { grid-template-columns: repeat(2, 1fr); }
  fluid { grid-template-columns: 1fr; }
}