*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --accent: #7eb8ff;
  --done-text: #6ab86a;
  --text: #e8ecff;
  --text-sub: #7080a0;
  --panel-bg: rgba(8, 10, 20, 0.82);
  --panel-border: rgba(80, 100, 160, 0.35);
  --header-bg: rgba(20, 30, 60, 0.9);
  --sep: rgba(60, 80, 130, 0.3);
}

html, body {
  background: transparent;
  width: 100%;
  height: 100%;
}

body {
  font-family: 'Segoe UI', 'Hiragino Sans', sans-serif;
  padding: 8px;
}

.panel {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  overflow: hidden;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  width: 210px;
}

.panel-header {
  background: var(--header-bg);
  padding: 7px 10px 6px;
  border-bottom: 1px solid var(--sep);
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.panel-title {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 5px;
}

.panel-title::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 5px var(--accent);
  flex-shrink: 0;
}

.timer {
  font-size: 0.65rem;
  font-variant-numeric: tabular-nums;
  color: var(--text-sub);
}

.progress-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 5px;
}

.progress-nums {
  font-size: 0.62rem;
  color: var(--text-sub);
  white-space: nowrap;
  flex-shrink: 0;
}

.progress-nums strong { color: var(--text); }

.progress-bar-track {
  flex: 1;
  height: 3px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #4a80ff, #a0c8ff);
  border-radius: 2px;
  transition: width 0.4s ease;
  width: 0%;
}

.remain {
  font-size: 0.62rem;
  color: #ff9060;
  white-space: nowrap;
  flex-shrink: 0;
}

.ghost-list {
  padding: 3px 0;
}

.ghost-row {
  display: flex;
  align-items: center;
  padding: 2px 8px;
  gap: 5px;
  transition: opacity 0.3s;
}

.ghost-row.done .ghost-num,
.ghost-row.done .ghost-status,
.ghost-row.done .ghost-info { opacity: 0.65; }

.ghost-count-wrap {
  flex-shrink: 0;
  width: 20px;
  text-align: right;
}

.ghost-num {
  font-size: 0.58rem;
  color: rgba(255,255,255,0.18);
  width: 14px;
  text-align: right;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.ghost-status {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.2);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.done .ghost-status {
  background: #1a4a1a;
  border-color: #3a7a3a;
}

.ghost-status svg { display: none; }
.done .ghost-status svg { display: block; }

.ghost-info {
  flex: 1;
  min-width: 0;
  line-height: 1.15;
}

.ghost-name-ja {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}

.ghost-count {
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
}

.ghost-name-en {
  font-size: 0.58rem;
  color: var(--text-sub);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.done .ghost-name-ja {
  text-decoration: line-through;
  color: var(--done-text);
}

.done .ghost-name-en { color: var(--done-text); }
