:root {
  --bg: #f5f0ff;
  --bg2: #fef7ed;
  --ink: #1f2937;
  --muted: #6b7280;
  --line: #e2e8f0;
  --card: rgba(255, 255, 255, 0.88);
  --primary: #3b82f6;
  --accent: #f97316;
  --ok: #16a34a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Trebuchet MS", "Noto Sans SC", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 20% 20%, #e9d5ff 0%, transparent 30%),
    radial-gradient(circle at 80% 0%, #fed7aa 0%, transparent 25%),
    linear-gradient(140deg, var(--bg), var(--bg2));
  min-height: 100vh;
}

.app {
  max-width: 980px;
  margin: 0 auto;
  padding: 20px 14px 40px;
  display: grid;
  gap: 12px;
}

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
  animation: rise 240ms ease;
}

.hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.tag {
  margin: 0 0 6px;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.04em;
}

h1,
h2 {
  margin: 0 0 8px;
}

h1 {
  font-size: clamp(1.6rem, 2.8vw, 2.4rem);
}

.subtitle {
  margin: 0;
  color: var(--muted);
}

.player-meta {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 10px;
}

.small {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 0.86rem;
}

input[type="text"],
input[type="number"] {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 10px;
  font-size: 0.95rem;
}

.level-box {
  text-align: center;
  min-width: 90px;
}

.level {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
}

.xp-line {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
}

.progress {
  height: 12px;
  margin-top: 8px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), #22d3ee);
  transition: width 280ms ease;
}

.btn {
  border: 1px solid transparent;
  background: var(--primary);
  color: #fff;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 120ms ease, filter 120ms ease, background 120ms ease;
}

.btn.subtle {
  background: #fff;
  color: var(--ink);
  border-color: var(--line);
}

.btn:hover {
  filter: brightness(1.03);
}

.btn:active {
  transform: translateY(1px);
}

.action-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.action {
  background: linear-gradient(90deg, #2563eb, #06b6d4);
}

.quest-list,
.achievement-list {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}

.quest-item,
.achievement-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.quest-item.done {
  border-color: #86efac;
  background: #f0fdf4;
}

.achievement-item.locked {
  opacity: 0.6;
}

.badge {
  font-size: 0.82rem;
  border-radius: 999px;
  padding: 4px 8px;
  background: #eff6ff;
  color: #1d4ed8;
}

.log-list {
  margin: 0;
  padding-left: 18px;
}

.log-list li {
  margin-bottom: 6px;
  color: #374151;
}

@media (max-width: 780px) {
  .player-meta {
    grid-template-columns: 1fr 1fr;
  }

  .action-grid {
    grid-template-columns: 1fr 1fr;
  }

  .hero {
    flex-direction: column;
    gap: 10px;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
