.explore-panel {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: #f8f8fa;
}

.explore-container {
  width: 100%;
  height: 100dvh;
  max-width: 960px;
  background: #f8f8fa;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.explore-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  flex-shrink: 0;
}

.explore-header h2 {
  margin: 0;
  font-size: 18px;
  color: #111;
  font-weight: 700;
  letter-spacing: 1px;
}

.explore-close-btn {
  background: #f0f0f0 !important;
  color: #555 !important;
  border: 1px solid #ddd !important;
  padding: 7px 14px !important;
  font-size: 13px !important;
  border-radius: 8px !important;
}

.explore-close-btn:hover {
  background: #e8e8e8 !important;
  color: #333 !important;
}

/* ====== Story List ====== */
.explore-story-list {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.explore-story-card {
  background: #fff;
  border-radius: 14px;
  padding: 16px 14px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.explore-story-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.07);
}

.explore-story-card.locked {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(0.3);
}

.explore-card-avatars {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  padding-left: 8px;
}

.explore-card-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #f0f0f3;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.explore-card-body {
  flex: 1;
  min-width: 0;
}

.explore-card-title {
  font-size: 16px;
  font-weight: 700;
  color: #111;
  margin-bottom: 3px;
}

.explore-card-type {
  font-size: 12px;
  color: #999;
  margin-bottom: 4px;
  letter-spacing: 0.5px;
}

.explore-card-status {
  font-size: 12px;
  color: #3b5998;
  font-weight: 500;
  margin-bottom: 8px;
}

.explore-card-actions {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

.explore-btn-detail,
.explore-btn-start {
  padding: 7px 14px !important;
  font-size: 13px !important;
  border-radius: 8px !important;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
  border: none !important;
}

.explore-btn-detail {
  background: #f0f0f3 !important;
  color: #555 !important;
  border: 1px solid #e0e0e0 !important;
}

.explore-btn-detail:hover {
  background: #e6e6ea !important;
  color: #333 !important;
}

.explore-btn-start {
  background: #3b5998 !important;
  color: #fff !important;
}

.explore-btn-start:hover {
  background: #2d4373 !important;
}

/* ====== Story Detail ====== */
.explore-detail {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.detail-card {
  background: #fff;
  border-radius: 16px;
  padding: 24px 20px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.detail-back-btn {
  background: none !important;
  border: none !important;
  color: #3b5998 !important;
  font-size: 14px !important;
  padding: 0 0 12px !important;
  cursor: pointer;
  font-weight: 500;
}

.detail-back-btn:hover {
  color: #2d4373 !important;
}

.detail-icon {
  font-size: 42px;
  text-align: center;
  margin-bottom: 10px;
}

.detail-title {
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  color: #111;
  margin: 0 0 6px;
}

.detail-meta {
  text-align: center;
  font-size: 13px;
  color: #999;
  margin-bottom: 20px;
  letter-spacing: 0.5px;
}

.detail-section {
  margin-bottom: 16px;
}

.detail-label {
  font-size: 13px;
  font-weight: 600;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.detail-text {
  font-size: 15px;
  color: #333;
  line-height: 1.7;
  margin: 0;
}

.detail-acts {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.detail-act-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: #444;
  padding: 6px 0;
}

.detail-act-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #f0f0f3;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: #666;
  flex-shrink: 0;
}

.detail-explore-btn {
  display: block;
  width: 100%;
  margin-top: 20px;
  padding: 14px !important;
  background: #3b5998 !important;
  color: #fff !important;
  border: none !important;
  border-radius: 12px !important;
  font-size: 16px !important;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}

.detail-explore-btn:hover {
  background: #2d4373 !important;
}

/* ====== Adventure UI ====== */
.explore-adventure {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
}

.explore-adv-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  flex-shrink: 0;
  gap: 8px;
}

.explore-adv-header-info {
  flex: 1;
  min-width: 0;
}

.explore-adv-title {
  font-size: 16px;
  font-weight: 700;
  color: #111;
  margin: 0;
}

.explore-adv-act {
  font-size: 12px;
  color: #999;
  margin: 2px 0 0;
}

.explore-adv-nav {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.explore-adv-back {
  background: #f0f0f0 !important;
  color: #555 !important;
  padding: 6px 12px !important;
  font-size: 12px !important;
  border-radius: 6px !important;
  border: 1px solid #ddd !important;
  cursor: pointer;
}

.explore-adv-back:hover {
  background: #e5e5e5 !important;
  color: #333 !important;
}

/* Status Bar */
.explore-adv-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 16px;
  background: #f8f9fc;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  flex-shrink: 0;
  font-size: 12px;
  color: #888;
}

.status-progress {
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-dot {
  font-size: 10px;
  color: #ccc;
}

.status-dot.done {
  color: #50a060;
}

.status-dot.current {
  color: #3b5998;
  font-size: 12px;
}

.status-info {
  font-size: 11px;
  color: #aaa;
}

/* Adventure Log */
.explore-adv-log {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  -webkit-overflow-scrolling: touch;
  background: #fafafa;
}

.explore-msg {
  font-size: 15px;
  line-height: 1.8;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.explore-narrator {
  color: #333;
  padding: 14px 16px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.explore-user {
  color: #1f3d8f;
  font-weight: 500;
  padding: 10px 14px;
  background: #eef2ff;
  border-radius: 10px;
  align-self: flex-end;
  max-width: 85%;
}

.explore-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  padding: 2px 8px;
  border-radius: 4px;
  margin-right: 6px;
  vertical-align: middle;
}

.scene-tag {
  background: #eef0ff;
  color: #5060a0;
}

.clue-tag {
  background: #fff8e8;
  color: #b08830;
}

.dialog-tag {
  background: #e8f8f0;
  color: #308060;
}

/* Choices */
.explore-adv-choices {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px 16px;
  flex-shrink: 0;
}

.explore-choice-btn {
  width: 100%;
  text-align: left;
  padding: 12px 16px !important;
  background: #fff !important;
  color: #333 !important;
  border: 1px solid #e0e0e0 !important;
  border-radius: 10px !important;
  font-size: 14px !important;
  line-height: 1.5 !important;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.explore-choice-btn:hover {
  background: #f0f4ff !important;
  border-color: #b0c0e8 !important;
  color: #1a3080 !important;
  transform: translateX(4px) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
}

/* Input Form */
.explore-adv-form {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  flex-shrink: 0;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  background: #fff;
}

.explore-adv-form input {
  flex: 1;
  background: #f5f5f7;
  border: 1px solid #e0e0e0;
  color: #333;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 15px;
}

.explore-adv-form input::placeholder {
  color: #aaa;
}

.explore-adv-form button {
  background: #3b5998 !important;
  color: #fff !important;
  border: none !important;
  padding: 10px 16px !important;
  font-size: 14px !important;
  border-radius: 8px !important;
  cursor: pointer;
}

.explore-adv-form button:hover {
  background: #2d4373 !important;
}

.explore-adv-status {
  text-align: center;
  color: #999;
  font-size: 13px;
  padding: 8px;
  flex-shrink: 0;
}

/* ====== Hidden override (explore.css loads after styles.css) ====== */
.explore-panel.hidden,
.explore-story-list.hidden,
.explore-detail.hidden,
.explore-adventure.hidden,
.explore-adv-status.hidden {
  display: none !important;
}

/* ====== Mobile ====== */
@media (max-width: 768px) {
  .explore-story-list {
    padding: 12px;
    gap: 10px;
  }

  .explore-story-card {
    padding: 14px 12px;
  }

  .explore-card-icon {
    font-size: 24px;
    width: 40px;
    height: 40px;
  }

  .explore-card-title {
    font-size: 15px;
  }

  .explore-card-actions {
    flex-wrap: wrap;
  }

  .explore-btn-detail,
  .explore-btn-start {
    padding: 8px 12px !important;
    font-size: 13px !important;
  }

  .detail-card {
    padding: 18px 14px;
  }

  .detail-title {
    font-size: 20px;
  }

  .explore-adv-log {
    padding: 12px;
    gap: 12px;
  }

  .explore-msg {
    font-size: 15px;
    line-height: 1.75;
  }

  .explore-narrator {
    padding: 12px;
  }

  .explore-choice-btn {
    font-size: 14px !important;
    padding: 11px 14px !important;
  }

  .explore-adv-nav {
    flex-direction: column;
    gap: 4px;
  }

  .explore-adv-back {
    font-size: 11px !important;
    padding: 5px 10px !important;
  }
}
