.status-top {
  background: linear-gradient(135deg, #0d1b2a 0%, #1b263b 50%, #0d1b2a 100%);
  border: 1px solid #415a77;
  border-radius: 14px;
  padding: 14px 18px;
  margin-bottom: 14px;
  position: relative;
  overflow: hidden;
}

.status-top::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 200%;
  height: 1px;
  background: linear-gradient(90deg, transparent, #778da9, transparent);
  animation: scanline 3s linear infinite;
}

@keyframes scanline {
  0% { left: -100%; }
  100% { left: 100%; }
}

.time-bar {
  color: #e0e1dd;
  font-size: 14px;
  font-weight: bold;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.presence {
  color: #a8dadc;
  font-size: 13px;
  margin-bottom: 8px;
  padding: 4px 0;
  border-top: 1px solid #415a7744;
  border-bottom: 1px solid #415a7744;
}

.risk-bar {
  color: #fca311;
  font-size: 13px;
  font-weight: bold;
}

text {
  display: block;
  background: linear-gradient(180deg, #0a0a0f 0%, #111118 100%);
  border-left: 3px solid #e94560;
  border-radius: 0 12px 12px 0;
  padding: 20px 22px;
  margin: 14px 0;
  color: #e8e8e8;
  font-size: 15px;
  line-height: 1.9;
  letter-spacing: 0.3px;
}

text p {
  margin: 0 0 14px 0;
  text-indent: 2em;
}

text p:last-child {
  margin-bottom: 0;
}

.chara-panel,
.npc-panel,
.map-panel,
.memory-panel {
  border: 1px solid #333;
  border-radius: 12px;
  margin-bottom: 10px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.chara-panel {
  background: linear-gradient(135deg, #2d1b3d 0%, #1a1128 100%);
  border-color: #9b59b6;
}

.npc-panel {
  background: linear-gradient(135deg, #1b2838 0%, #111a28 100%);
  border-color: #3498db;
}

.map-panel {
  background: linear-gradient(135deg, #1b3828 0%, #112818 100%);
  border-color: #2ecc71;
}

.memory-panel {
  background: linear-gradient(135deg, #38351b 0%, #282511 100%);
  border-color: #f1c40f;
}

.chara-panel summary,
.npc-panel summary,
.map-panel summary,
.memory-panel summary {
  padding: 12px 16px;
  font-weight: bold;
  font-size: 14px;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}

.chara-panel summary::-webkit-details-marker,
.npc-panel summary::-webkit-details-marker,
.map-panel summary::-webkit-details-marker,
.memory-panel summary::-webkit-details-marker {
  display: none;
}

.chara-panel summary {
  color: #d4a0e8;
  background: #2d1b3d88;
}

.npc-panel summary {
  color: #7ec8e3;
  background: #1b283888;
}

.map-panel summary {
  color: #7ee3a0;
  background: #1b382888;
}

.memory-panel summary {
  color: #e3d77e;
  background: #38351b88;
}

.chara-panel summary:hover { background: #3d2b4d; }
.npc-panel summary:hover { background: #2b3848; }
.map-panel summary:hover { background: #2b4838; }
.memory-panel summary:hover { background: #48451b; }

.chara-panel summary::after,
.npc-panel summary::after,
.map-panel summary::after,
.memory-panel summary::after {
  content: "▸";
  margin-left: auto;
  transition: transform 0.3s ease;
  font-size: 12px;
}

.chara-panel[open] summary::after,
.npc-panel[open] summary::after,
.map-panel[open] summary::after,
.memory-panel[open] summary::after {
  transform: rotate(90deg);
}

.chara-panel p,
.npc-panel p,
.map-panel p,
.memory-panel p {
  padding: 2px 18px;
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
  color: #ccc;
  border-bottom: 1px solid #ffffff08;
}

.npc-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
  font-size: 12px;
}

.npc-table th {
  background: #ffffff12;
  color: #7ec8e3;
  padding: 8px 8px;
  text-align: left;
  font-weight: bold;
  border-bottom: 2px solid #3498db44;
  font-size: 11px;
  white-space: nowrap;
}

.npc-table td {
  padding: 7px 8px;
  color: #ccc;
  border-bottom: 1px solid #ffffff08;
  vertical-align: middle;
  line-height: 1.5;
  font-size: 12px;
}

.npc-table tr:hover td {
  background: #ffffff06;
}

.npc-table td:first-child {
  white-space: nowrap;
  font-weight: bold;
  color: #e0e0e0;
}

.npc-body {
  margin: 0;
  border-top: 1px solid #e9456033;
  border-bottom: 1px solid #e9456033;
  background: #1a0a1888;
}

.npc-body summary {
  padding: 8px 18px;
  color: #e94560;
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
  list-style: none;
}

.npc-body summary::-webkit-details-marker {
  display: none;
}

.npc-body summary::after {
  content: "▸";
  margin-left: 8px;
  transition: transform 0.3s ease;
  font-size: 11px;
}

.npc-body[open] summary::after {
  transform: rotate(90deg);
}

.npc-body p {
  padding: 2px 18px;
  margin: 0;
  font-size: 12px;
  line-height: 1.7;
  color: #e8a0a0;
  border-bottom: 1px solid #ffffff06;
}

.mem-table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0;
  font-size: 12px;
}

.mem-table th {
  background: #ffffff15;
  color: #f1c40f;
  padding: 8px 10px;
  text-align: left;
  font-weight: bold;
  border-bottom: 2px solid #f1c40f44;
  font-size: 12px;
  white-space: nowrap;
}

.mem-table td {
  padding: 8px 10px;
  color: #ccc;
  border-bottom: 1px solid #ffffff10;
  vertical-align: top;
  line-height: 1.6;
}

.mem-table tr:hover td {
  background: #ffffff08;
}

.mem-table td:first-child,
.mem-table th:first-child {
  width: 36px;
  text-align: center;
  color: #f1c40f99;
}

.mem-table td:nth-child(2),
.mem-table th:nth-child(2) {
  width: 25%;
  white-space: nowrap;
  font-size: 11px;
  color: #aaa;
}

.mem-table td:nth-child(3),
.mem-table th:nth-child(3) {
  width: 18%;
  color: #7ee3a0;
  font-size: 12px;
}

.action-panel {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border: 1px solid #e94560;
  border-radius: 14px;
  padding: 16px 18px;
  margin-top: 10px;
  position: relative;
  overflow: hidden;
}

.action-panel::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, #e9456010 0%, transparent 70%);
  pointer-events: none;
}

.action-title {
  color: #e94560;
  font-weight: bold;
  font-size: 15px;
  margin: 0 0 12px 0;
  padding-bottom: 8px;
  border-bottom: 1px solid #e9456033;
  letter-spacing: 1px;
}

.act-safe {
  color: #2ecc71;
  font-size: 13px;
  margin: 0;
  padding: 6px 0;
  border-bottom: 1px solid #ffffff08;
}

.act-caution {
  color: #f39c12;
  font-size: 13px;
  margin: 0;
  padding: 6px 0;
  border-bottom: 1px solid #ffffff08;
}

.act-danger {
  color: #e74c3c;
  font-size: 13px;
  margin: 0;
  padding: 6px 0;
  border-bottom: 1px solid #ffffff08;
}

.act-special {
  color: #9b59b6;
  font-size: 13px;
  margin: 0;
  padding: 6px 0;
  border-bottom: 1px solid #ffffff08;
}

.act-hint {
  color: #ffffff55;
  font-size: 12px;
  margin: 0;
  padding: 8px 0 0 0;
  font-style: italic;
}

@media screen and (max-width: 768px) {
  .status-top {
    padding: 10px 12px;
    border-radius: 10px;
  }

  .time-bar { font-size: 12px; }
  .presence { font-size: 11px; }
  .risk-bar { font-size: 11px; }

  text {
    padding: 14px 16px;
    font-size: 14px;
    line-height: 1.85;
  }

  .chara-panel summary,
  .npc-panel summary,
  .map-panel summary,
  .memory-panel summary {
    padding: 10px 12px;
    font-size: 13px;
  }

  .chara-panel p,
  .npc-panel p,
  .map-panel p,
  .memory-panel p {
    padding: 2px 12px;
    font-size: 12px;
  }

  .npc-table { font-size: 11px; }
  .npc-table th, .npc-table td { padding: 6px 6px; }

  .npc-body p { font-size: 11px; padding: 2px 12px; }

  .mem-table { font-size: 11px; }
  .mem-table th, .mem-table td { padding: 6px 6px; }
  .mem-table td:nth-child(2) { font-size: 10px; }

  .action-panel { padding: 12px 14px; }
  .action-title { font-size: 14px; }
  .act-safe, .act-caution, .act-danger, .act-special { font-size: 12px; }
}