.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: #111827;
}

.header {
  margin-bottom: 16px;
}

.muted {
  color: #6b7280;
  font-size: 14px;
}

.panel {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 16px;
  background: #ffffff;
}

.grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 16px;
  margin-top: 16px;
  align-items: start;
}

.grid > .panel:first-child {
  position: sticky;
  top: 24px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
}

@media (max-width: 900px) {
  .grid {
    grid-template-columns: 1fr;
  }
}

.form-row {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
}

.form-row.inline {
  grid-template-columns: 1fr;
  display: flex;
  gap: 16px;
  margin-top: 12px;
}

input[type="date"],
select {
  padding: 8px 10px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
}

.checkbox {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  font-size: 14px;
  color: #111827;
}

.actions {
  margin-top: 12px;
  display: flex;
  gap: 12px;
  align-items: center;
}

button {
  appearance: none;
  border: 1px solid #111827;
  background: #111827;
  color: white;
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.status {
  font-size: 14px;
  color: #374151;
}

.dates {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: grid;
  gap: 4px;
}

.date-item {
  margin: 0;
}

.date-btn {
  width: 100%;
  text-align: left;
  background: #ffffff;
  color: #111827;
  border: 1px solid #e5e7eb;
  font-size: 14px;
  padding: 8px 10px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.date-btn.active {
  border-color: #111827;
  background: #f9fafb;
  font-weight: 600;
}

.date-arrow {
  font-size: 12px;
  width: 14px;
  flex-shrink: 0;
  color: #6b7280;
}

.article-list {
  list-style: none;
  padding: 0;
  margin: 2px 0 0 18px;
  display: grid;
  gap: 3px;
}

.article-list li {
  display: flex;
  align-items: center;
  gap: 4px;
}

.article-btn {
  flex: 1;
  min-width: 0;
  text-align: left;
  background: #ffffff;
  color: #374151;
  border: 1px solid #f3f4f6;
  font-size: 13px;
  padding: 6px 10px;
  border-radius: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.article-btn:hover {
  background: #f3f4f6;
  border-color: #d1d5db;
}

.play-btn {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  color: #374151;
  border-radius: 6px;
  cursor: pointer;
  font-size: 11px;
  line-height: 1;
  transition: all 0.15s;
}

.play-btn:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
}

.play-btn.playing {
  background: #111827;
  color: #fff;
  border-color: #111827;
}

.play-btn.loading {
  opacity: 0.6;
  cursor: wait;
}

.play-btn.cached {
  background: #d1fae5;
  border-color: #6ee7b7;
  color: #065f46;
}

.play-btn.cached:hover {
  background: #a7f3d0;
  border-color: #34d399;
}

.play-btn.cached.playing {
  background: #111827;
  color: #fff;
  border-color: #111827;
}

.viewer {
  word-break: break-word;
  border: 1px solid #f3f4f6;
  background: #f9fafb;
  border-radius: 10px;
  padding: 12px;
  min-height: 320px;
  overflow: auto;
  margin-top: 12px;
}

.viewer article {
  margin: 14px 0;
  padding: 12px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #ffffff;
}

.viewer article h2,
.viewer article h3 {
  margin-top: 0;
}

.viewer h1,
.viewer h2,
.viewer h3 {
  margin: 12px 0 8px;
}

.viewer p {
  margin: 8px 0;
  line-height: 1.55;
}

.viewer hr {
  border: 0;
  border-top: 1px solid #e5e7eb;
  margin: 14px 0;
}

.viewer code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
  font-size: 13px;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 1px 6px;
}

.viewer pre {
  margin: 10px 0;
  padding: 12px;
  background: #111827;
  color: #f9fafb;
  border-radius: 10px;
  overflow: auto;
}

.viewer pre code {
  background: transparent;
  border: 0;
  padding: 0;
  color: inherit;
  font-size: 13px;
}

.viewer a {
  color: #1f2937;
  text-decoration: underline;
}

.viewer ul,
.viewer ol {
  margin: 8px 0 8px 20px;
  padding: 0;
}

.hidden {
  display: none;
}

.floating-player {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.12);
  max-width: min(540px, calc(100vw - 24px));
}

.floating-player-btn {
  width: 34px;
  height: 34px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  flex-shrink: 0;
}

.floating-player-title {
  min-width: 160px;
  max-width: 280px;
  font-size: 13px;
  color: #1f2937;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.floating-player-volume-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #4b5563;
}

.floating-player-volume-wrap input[type="range"] {
  width: 90px;
}

@media (max-width: 720px) {
  .floating-player {
    left: 12px;
    right: 12px;
    bottom: 12px;
    max-width: none;
  }

  .floating-player-title {
    min-width: 90px;
    max-width: 1px;
    flex: 1;
  }
}
