* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, "Hiragino Kaku Gothic ProN", sans-serif;
  background: #1e2126;
  color: #e8e6e0;
}
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 28px;
  border-bottom: 1px solid #3a3d44;
  position: sticky;
  top: 0;
  background: #1e2126;
  z-index: 1;
}
header h1 { font-size: 20px; margin: 0; letter-spacing: 0.02em; }
.title-block { display: flex; align-items: baseline; gap: 16px; }
.member-count {
  font-size: 28px;
  font-weight: 700;
  color: #c9a24b;
  letter-spacing: 0.02em;
}
.member-count #memberCount { font-size: 34px; }
.member-count-note { font-size: 11px; font-weight: 500; color: #9a9da4; margin-left: 3px; white-space: nowrap; }
.header-actions { display: flex; align-items: center; gap: 14px; }
.edit-link { color: #c9a24b; text-decoration: none; font-size: 13px; }
.edit-link:hover { text-decoration: underline; }
.live-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #4caf6a;
  box-shadow: 0 0 0 0 rgba(76, 175, 106, 0.6);
  animation: pulse 2s infinite;
}
.live-dot.offline { background: #6a6d74; animation: none; box-shadow: none; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(76, 175, 106, 0.5); }
  70% { box-shadow: 0 0 0 6px rgba(76, 175, 106, 0); }
  100% { box-shadow: 0 0 0 0 rgba(76, 175, 106, 0); }
}

.list {
  max-width: 900px;
  margin: 0 auto;
  padding: 16px 20px 60px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.empty-msg { color: #8a8d94; text-align: center; padding: 40px; }

.row-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #262a31;
  border: 1px solid #3a3d44;
  border-radius: 8px;
  padding: 8px 14px 8px 8px;
}
.row-card.dragging { opacity: 0.4; }
.row-drag-handle {
  flex: none;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6a6d74;
  cursor: grab;
  user-select: none;
  touch-action: none;
}
.row-drag-handle:active { cursor: grabbing; }
.row-drag-handle[hidden] { display: none; }
body.reordering { cursor: grabbing; user-select: none; }
.thumb {
  width: 48px;
  height: 48px;
  flex: none;
  border-radius: 6px;
  overflow: hidden;
  background: #33373f;
  display: flex;
  align-items: center;
  justify-content: center;
}
.thumb-img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.thumb-placeholder { color: #5a5d64; font-size: 18px; }

.info {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) auto;
  column-gap: 12px;
  row-gap: 2px;
  align-items: baseline;
}
.name-line { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.row-name { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-yomi { font-family: 'Yomogi', sans-serif; font-size: 13px; color: #c9a24b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.meta-line { display: flex; gap: 10px; justify-self: end; white-space: nowrap; font-size: 13px; color: #b7b4ab; }
.row-rank { color: #c9a24b; }
.row-note {
  grid-column: 1 / -1;
  font-size: 12px;
  color: #9a9da4;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 4.8em;
  overflow-y: auto;
  padding-right: 6px;
  scrollbar-width: thin;
  scrollbar-color: #c9a24b #33373f;
}
.row-note:empty { display: none; }
.row-note::-webkit-scrollbar { width: 6px; }
.row-note::-webkit-scrollbar-track { background: #33373f; border-radius: 3px; }
.row-note::-webkit-scrollbar-thumb { background: #c9a24b; border-radius: 3px; }

.trial-section {
  margin: 40px 28px 20px;
  padding-top: 28px;
  border-top: 1px solid #3a3d44;
}
.trial-section h2 {
  font-size: 16px;
  font-weight: 600;
  color: #c9a24b;
  margin: 0 0 20px 0;
  letter-spacing: 0.02em;
}

@media (max-width: 600px) {
  .info { grid-template-columns: 1fr; }
  .meta-line { justify-self: start; }
}
