@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;500;600;700&family=Crimson+Pro:ital,wght@0,300;0,400;0,600;1,300;1,400&display=swap');

/* ─── Variables ─────────────────────────────────────── */
:root {
  --bg:          #0d0914;
  --surface:     #130c1c;
  --card:        #1c1228;
  --card-hover:  #241832;
  --border:      #342248;
  --border-hi:   rgba(200, 146, 74, 0.18);

  --gold:        #c8924a;
  --gold-bright: #e8b870;
  --gold-dim:    #6a4c24;
  --gold-glow:   rgba(200, 146, 74, 0.12);

  --rose:        #c47488;
  --green:       #78bf8a;
  --red:         #bf7870;

  --text:        #e4d8c4;
  --text-muted:  #9a8870;
  --text-dim:    #534838;

  --radius:      6px;
  --radius-lg:   10px;
}

/* ─── Reset & Base ──────────────────────────────────── */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Crimson Pro', Georgia, serif;
  font-size: 1.05rem;
  font-weight: 300;
  background: var(--bg);
  color: var(--text);
  padding: 1.1rem 1rem 2.5rem;
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
  color-scheme: dark;
}

/* Atmospheric depth */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 45% at 15% 10%,  rgba(130, 55, 160, 0.09) 0%, transparent 70%),
    radial-gradient(ellipse 50% 60% at 85% 80%,  rgba(180, 70,  70, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse 80% 30% at 50% 50%,  rgba(200,146, 74, 0.03) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* Grain overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='250' height='250'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='250' height='250' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  opacity: 0.028;
  pointer-events: none;
  z-index: 1;
}

body > * { position: relative; z-index: 2; }

/* ─── Typography ────────────────────────────────────── */
h1 {
  font-family: 'Cinzel', serif;
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  color: var(--gold);
  margin-bottom: 0.4rem;
  text-shadow: 0 0 30px rgba(200, 146, 74, 0.3);
}

h2 {
  font-family: 'Cinzel', serif;
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.9rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid transparent;
  border-image: linear-gradient(90deg, transparent 0%, var(--gold-dim) 30%, var(--gold-dim) 70%, transparent 100%) 1;
}

/* ─── Animations ────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position:  200% center; }
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 8px  rgba(200, 146, 74, 0.2); }
  50%       { box-shadow: 0 0 20px rgba(200, 146, 74, 0.4); }
}

/* ─── Login ─────────────────────────────────────────── */
.login-box {
  margin-top: 4.5rem;
  text-align: center;
  animation: fadeUp 0.6s ease both;
}

.login-box h1 {
  font-size: 2.6rem;
  letter-spacing: 0.14em;
  margin-bottom: 0.3rem;
}

.login-box .subtitle {
  font-style: italic;
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  letter-spacing: 0.03em;
}

.login-box form {
  text-align: left;
  max-width: 300px;
  margin: 0 auto;
}

.subtitle {
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
}

.error {
  color: var(--red);
  margin: 0.5rem 0 1rem;
  font-size: 0.9rem;
  text-align: center;
}

/* ─── Forms ─────────────────────────────────────────── */
form { display: flex; flex-direction: column; gap: 1rem; }

label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-family: 'Cinzel', serif;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

input, textarea, select {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: 'Crimson Pro', serif;
  font-size: 1rem;
  font-weight: 300;
  padding: 0.62rem 0.85rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus, textarea:focus, select:focus {
  border-color: var(--gold-dim);
  box-shadow: 0 0 0 2px var(--gold-glow);
}

input::placeholder { color: var(--text-dim); font-style: italic; }

input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(0.5); }

button {
  background: linear-gradient(135deg, #a07030 0%, var(--gold) 50%, #a07030 100%);
  background-size: 200% 100%;
  border: none;
  border-radius: var(--radius);
  color: #130a04;
  cursor: pointer;
  font-family: 'Cinzel', serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  min-height: 42px;
  padding: 0.55rem 1.4rem;
  transition: background-position 0.3s, box-shadow 0.2s, transform 0.1s;
  box-shadow: 0 2px 10px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.1);
}

button:hover {
  background-position: 100% 0;
  box-shadow: 0 3px 16px rgba(200, 146, 74, 0.3);
}

button:active { transform: translateY(1px); box-shadow: none; }

/* ─── Page Header ───────────────────────────────────── */
.page-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid transparent;
  border-image: linear-gradient(90deg, var(--border) 0%, var(--gold-dim) 50%, var(--border) 100%) 1;
  animation: fadeUp 0.35s ease both;
}

.page-title {
  font-family: 'Cinzel', serif;
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--gold);
  flex: 1;
  text-shadow: 0 0 20px rgba(200, 146, 74, 0.2);
}

.level-badge {
  background: linear-gradient(135deg, #7a4a14, var(--gold) 50%, #7a4a14);
  color: #0d0914;
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  padding: 0.22rem 0.7rem;
  border-radius: 20px;
  animation: pulse-glow 3s ease-in-out infinite;
}

.btn-link {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: 'Crimson Pro', serif;
  font-size: 0.9rem;
  font-weight: 300;
  letter-spacing: normal;
  text-transform: none;
  min-height: unset;
  padding: 0.28rem 0.65rem;
  box-shadow: none;
  transition: background 0.2s, color 0.2s;
}

.btn-link:hover { background: rgba(255,255,255,0.04); color: var(--text); box-shadow: none; }

.btn-link-a {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: 'Crimson Pro', serif;
  font-size: 0.9rem;
  padding: 0.28rem 0.65rem;
  border-radius: var(--radius);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s, background 0.2s;
}

.btn-link-a:hover { background: rgba(255,255,255,0.04); color: var(--text); }

/* ─── Cards ─────────────────────────────────────────── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.1rem 1.2rem;
  margin-bottom: 1rem;
  box-shadow: inset 0 1px 0 var(--border-hi), 0 4px 24px rgba(0,0,0,0.35);
  animation: fadeUp 0.4s ease both;
}

.card:nth-child(2) { animation-delay: 0.05s; }
.card:nth-child(3) { animation-delay: 0.10s; }
.card:nth-child(4) { animation-delay: 0.15s; }
.card:nth-child(5) { animation-delay: 0.20s; }

/* ─── XP Bar ────────────────────────────────────────── */
.xp-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 0.55rem;
  font-style: italic;
}

.xp-bar-track {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  height: 9px;
  overflow: hidden;
  box-shadow: inset 0 2px 5px rgba(0,0,0,0.5);
}

.xp-bar-fill {
  background: linear-gradient(90deg,
    var(--gold-dim)  0%,
    var(--gold)      40%,
    var(--gold-bright) 52%,
    var(--gold)      62%,
    var(--gold-dim)  100%
  );
  background-size: 200% 100%;
  height: 100%;
  border-radius: 20px;
  transition: width 0.7s ease;
  animation: shimmer 3.5s linear infinite;
  box-shadow: 0 0 8px rgba(200, 146, 74, 0.5);
  min-width: 4px;
}

.xp-hint {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-top: 0.55rem;
  font-style: italic;
}

/* ─── Stats Grid ────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1rem;
  animation: fadeUp 0.4s 0.05s ease both;
}

.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem 0.75rem;
  text-align: center;
  box-shadow: inset 0 1px 0 var(--border-hi);
}

.stat-icon { font-size: 1.5rem; margin-bottom: 0.3rem; }

.stat-value {
  font-family: 'Cinzel', serif;
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--gold);
  line-height: 1.1;
}

.stat-label {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
  font-style: italic;
}

/* ─── Coin ──────────────────────────────────────────── */
.coin-balance {
  font-family: 'Cinzel', serif;
  font-size: 1.45rem;
  font-weight: 500;
  color: var(--gold);
  margin-bottom: 1rem;
}

.coin-unit {
  font-family: 'Crimson Pro', serif;
  font-size: 0.9rem;
  font-weight: 300;
  color: var(--text-muted);
}

.field-hint {
  font-size: 0.72rem;
  color: var(--text-dim);
  font-weight: 300;
  letter-spacing: normal;
  text-transform: none;
}

.coin-badge {
  background: rgba(200, 146, 74, 0.1);
  border: 1px solid var(--gold-dim);
  color: var(--gold);
  font-family: 'Cinzel', serif;
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  padding: 0.22rem 0.65rem;
  border-radius: 20px;
}

/* ─── Transactions ──────────────────────────────────── */
.tx-list { display: flex; flex-direction: column; gap: 0.35rem; }

.tx-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.38rem 0;
  border-bottom: 1px solid var(--surface);
}

.tx-row:last-child { border-bottom: none; }

.tx-amount {
  font-family: 'Cinzel', serif;
  font-size: 0.9rem;
  font-weight: 600;
  min-width: 3.2rem;
  text-align: right;
}

.tx-amount.pos { color: var(--green); }
.tx-amount.neg { color: var(--red); }
.tx-comment { font-size: 0.92rem; color: var(--text-muted); font-style: italic; }

.tx-date {
  font-size: 0.72rem;
  color: var(--text-dim);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ─── Nav Cards ─────────────────────────────────────── */
.nav-card {
  display: block;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem 0.75rem;
  margin-bottom: 0.75rem;
  color: var(--gold);
  text-decoration: none;
  font-family: 'Cinzel', serif;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s, transform 0.15s;
  box-shadow: inset 0 1px 0 var(--border-hi);
  text-align: center;
}

.nav-card:hover {
  background: var(--card-hover);
  border-color: var(--gold-dim);
  box-shadow: inset 0 1px 0 var(--border-hi), 0 4px 18px var(--gold-glow);
  transform: translateY(-2px);
}

.nav-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  animation: fadeUp 0.4s ease both;
}

.nav-row .nav-card { margin-bottom: 0; }
.nav-row + .nav-row { margin-top: 0.75rem; }

/* ─── Utility ───────────────────────────────────────── */
.link { color: var(--gold); }

.placeholder {
  color: var(--text-dim);
  margin: 1rem 0 1.5rem;
  font-style: italic;
}

.empty-hint {
  color: var(--text-dim);
  font-style: italic;
  text-align: center;
  padding: 1.5rem 0;
  font-size: 0.95rem;
}

/* ─── Inline form ───────────────────────────────────── */
.inline-form { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.inline-form input[type="text"] { flex: 1; min-width: 0; }
.inline-form button { min-height: unset; padding: 0.5rem 1rem; font-size: 1rem; }

/* ─── Activity list ─────────────────────────────────── */
.activity-list { display: flex; flex-direction: column; gap: 0.5rem; }

.activity-row { display: flex; align-items: center; gap: 0.5rem; }

.activity-edit-form { display: flex; gap: 0.4rem; flex: 1; align-items: center; }

.act-name-input { flex: 1; min-width: 0; padding: 0.42rem 0.65rem; font-size: 0.95rem; }
.act-xp-input   { width: 64px; padding: 0.42rem 0.65rem; font-size: 0.95rem; }

.btn-save {
  background: linear-gradient(135deg, #2a6a38, var(--green) 50%, #2a6a38);
  background-size: 200% 100%;
  border: none;
  color: #050e07;
  min-height: unset;
  padding: 0.42rem 0.7rem;
  font-size: 0.68rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.btn-save:hover { background-position: 100% 0; box-shadow: 0 2px 12px rgba(120, 191, 138, 0.25); }

.btn-del {
  background: linear-gradient(135deg, #6a2a2a, var(--red) 50%, #6a2a2a);
  background-size: 200% 100%;
  border: none;
  color: #1a0808;
  min-height: unset;
  padding: 0.42rem 0.7rem;
  font-size: 0.68rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.btn-del:hover { background-position: 100% 0; box-shadow: 0 2px 12px rgba(191, 120, 112, 0.25); }

/* ─── Encounter form ────────────────────────────────── */
.encounter-form textarea {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: 'Crimson Pro', serif;
  font-size: 1rem;
  font-weight: 300;
  padding: 0.62rem 0.85rem;
  resize: vertical;
}

.encounter-form textarea:focus {
  border-color: var(--gold-dim);
  box-shadow: 0 0 0 2px var(--gold-glow);
  outline: none;
}

.activity-check-group { display: flex; flex-direction: column; gap: 0.35rem; }

.act-check-label {
  font-family: 'Cinzel', serif;
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

.act-check-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.48rem 0.65rem;
  background: var(--surface);
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  flex-direction: row;
  transition: border-color 0.15s, background 0.15s;
}

.act-check-row:has(input:checked) {
  border-color: var(--gold-dim);
  background: rgba(200, 146, 74, 0.06);
}

.act-check-row input[type="checkbox"] {
  width: 16px; height: 16px;
  cursor: pointer;
  accent-color: var(--gold);
}

.act-xp-tag {
  margin-left: auto;
  font-family: 'Cinzel', serif;
  font-size: 0.68rem;
  color: var(--gold);
  font-weight: 500;
  letter-spacing: 0.06em;
}

/* ─── Encounter feed ────────────────────────────────── */
.feed { display: flex; flex-direction: column; gap: 0.75rem; margin-bottom: 1rem; }

.enc-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0.9rem 1.1rem;
  box-shadow: inset 0 1px 0 var(--border-hi);
  animation: fadeUp 0.35s ease both;
}

.enc-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.4rem; }

.enc-date { font-size: 0.82rem; color: var(--text-muted); font-style: italic; }

.enc-xp {
  font-family: 'Cinzel', serif;
  font-weight: 600;
  color: var(--gold);
  font-size: 0.76rem;
  letter-spacing: 0.06em;
}

.enc-acts { font-size: 0.95rem; color: var(--text); margin-bottom: 0.3rem; }
.enc-note { font-size: 0.88rem; color: var(--text-muted); font-style: italic; }

/* ─── Category list ─────────────────────────────────── */
.cat-list { display: flex; flex-direction: column; gap: 0.3rem; margin-bottom: 0.25rem; }

.cat-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.32rem 0;
  border-bottom: 1px solid var(--surface);
}

.cat-row:last-child { border-bottom: none; }
.cat-name { font-size: 0.95rem; color: var(--text-muted); }

/* ─── Achievement form ──────────────────────────────── */
.ach-form { display: flex; flex-direction: column; gap: 0.75rem; }
.form-row { display: flex; gap: 1rem; }

.check-label {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Crimson Pro', serif;
  font-size: 0.9rem;
  font-weight: 300;
  color: var(--text-muted);
  cursor: pointer;
  text-transform: none;
  letter-spacing: normal;
}

.check-label input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--gold); }

/* ─── Achievement list (admin) ──────────────────────── */
.ach-list { display: flex; flex-direction: column; gap: 0.65rem; margin-bottom: 1rem; }

.ach-admin-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0.85rem 1rem;
  box-shadow: inset 0 1px 0 var(--border-hi);
  animation: fadeUp 0.35s ease both;
}

.ach-icon { font-size: 1.7rem; line-height: 1; flex-shrink: 0; }
.ach-info { flex: 1; min-width: 0; }

.ach-name {
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 0.2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

.ach-meta { font-size: 0.78rem; color: var(--text-muted); font-style: italic; }
.ach-desc { font-size: 0.88rem; color: var(--text-muted); margin-top: 0.2rem; }

.badge-hidden {
  background: rgba(255,255,255,0.05);
  color: var(--text-dim);
  font-size: 0.65rem;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-family: 'Cinzel', serif;
  letter-spacing: 0.06em;
}

.badge-awarded {
  background: rgba(120, 191, 138, 0.1);
  border: 1px solid rgba(120, 191, 138, 0.2);
  color: var(--green);
  font-size: 0.65rem;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-family: 'Cinzel', serif;
  letter-spacing: 0.06em;
}

.ach-actions { display: flex; flex-direction: column; gap: 0.4rem; flex-shrink: 0; }

.btn-award {
  background: linear-gradient(135deg, #7a4a14, var(--gold) 50%, #7a4a14);
  background-size: 200% 100%;
  border: none;
  color: #0d0914;
  min-height: unset;
  padding: 0.32rem 0.75rem;
  font-size: 0.65rem;
}

.btn-award:hover { background-position: 100% 0; box-shadow: 0 2px 12px rgba(200, 146, 74, 0.3); }

.btn-edit-a {
  display: block;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
  padding: 0.3rem 0.55rem;
  border-radius: var(--radius);
  text-decoration: none;
  text-align: center;
  transition: background 0.2s, color 0.2s;
}

.btn-edit-a:hover { background: rgba(255,255,255,0.08); color: var(--text); }

/* ─── Achievement list (player) ─────────────────────── */
.ach-player-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--surface);
}

.ach-player-row:last-child { border-bottom: none; }

.hidden-hint {
  text-align: center;
  color: var(--text-dim);
  font-size: 0.9rem;
  font-style: italic;
  padding: 1rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 1rem;
}

/* ─── Shop ──────────────────────────────────────────── */
.shop-list { display: flex; flex-direction: column; }

.shop-row {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--surface);
}

.shop-row:last-child { border-bottom: none; }

.shop-buy { display: flex; flex-direction: column; align-items: flex-end; gap: 0.35rem; flex-shrink: 0; }

.shop-price {
  font-family: 'Cinzel', serif;
  font-size: 0.76rem;
  color: var(--gold);
  font-weight: 500;
  white-space: nowrap;
  letter-spacing: 0.05em;
}

.btn-buy {
  background: linear-gradient(135deg, #7a4a14, var(--gold) 50%, #7a4a14);
  background-size: 200% 100%;
  border: none;
  color: #0d0914;
  min-height: unset;
  padding: 0.32rem 0.9rem;
  font-size: 0.65rem;
}

.btn-buy:hover:not(:disabled) {
  background-position: 100% 0;
  box-shadow: 0 2px 12px rgba(200, 146, 74, 0.28);
}

.btn-buy:disabled {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  color: var(--text-dim);
  cursor: not-allowed;
  box-shadow: none;
}

.btn-toggle {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  color: var(--text-muted);
  min-height: unset;
  padding: 0.32rem 0.6rem;
  font-size: 0.65rem;
  box-shadow: none;
}

.btn-toggle:hover { background: rgba(255,255,255,0.08); color: var(--text); }

.badge-cat {
  background: rgba(100, 140, 200, 0.08);
  border: 1px solid rgba(100, 140, 200, 0.18);
  color: #8ab0d8;
  font-size: 0.65rem;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-family: 'Cinzel', serif;
  letter-spacing: 0.05em;
}

/* ─── Skills ────────────────────────────────────────── */
.skill-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.55rem;
}

.skill-card {
  border-radius: var(--radius);
  padding: 0.75rem 0.4rem;
  text-align: center;
  min-height: 78px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  transition: transform 0.2s, box-shadow 0.2s;
}

.skill-card.locked {
  background: var(--surface);
  border: 1px solid var(--border);
  opacity: 0.45;
}

.skill-card.unlocked {
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: inset 0 1px 0 var(--border-hi);
}

.skill-card.unlocked:hover {
  transform: translateY(-2px);
  box-shadow: inset 0 1px 0 var(--border-hi), 0 4px 16px var(--gold-glow);
}

.skill-icon { font-size: 1.5rem; line-height: 1; }
.locked .skill-icon { font-size: 1.3rem; filter: grayscale(1) brightness(0.4); }

.skill-name {
  font-family: 'Cinzel', serif;
  font-size: 0.64rem;
  font-weight: 400;
  color: var(--text);
  line-height: 1.25;
  letter-spacing: 0.04em;
}

.skill-desc { font-size: 0.64rem; color: var(--text-muted); line-height: 1.2; font-style: italic; }

.skill-admin-list { display: flex; flex-direction: column; gap: 0.4rem; }

.skill-admin-row {
  display: flex; align-items: flex-start; gap: 0.75rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--surface);
}

.skill-admin-row:last-child { border-bottom: none; }

/* ─── Quests ────────────────────────────────────────── */
.quest-form { display: flex; flex-direction: column; gap: 0.6rem; }
.quest-form .form-row { display: flex; gap: 0.75rem; }
.quest-form .form-row label { flex: 1; }

.quest-list { display: flex; flex-direction: column; }

.quest-item {
  display: flex; align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--surface);
}

.quest-item:last-child { border-bottom: none; }
.quest-done .quest-name { opacity: 0.3; text-decoration: line-through; }

.quest-info { flex: 1; }
.quest-name { font-size: 1rem; color: var(--text); margin-bottom: 0.2rem; line-height: 1.3; }
.quest-desc { font-size: 0.85rem; color: var(--text-muted); font-style: italic; margin-bottom: 0.2rem; }
.quest-rewards { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-top: 0.2rem; }

.reward-xp {
  font-family: 'Cinzel', serif;
  font-size: 0.64rem;
  background: rgba(120, 191, 138, 0.08);
  border: 1px solid rgba(120, 191, 138, 0.2);
  color: var(--green);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  letter-spacing: 0.04em;
}

.reward-coin {
  font-family: 'Cinzel', serif;
  font-size: 0.64rem;
  background: rgba(200, 146, 74, 0.08);
  border: 1px solid rgba(200, 146, 74, 0.2);
  color: var(--gold);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  letter-spacing: 0.04em;
}

.quest-actions { display: flex; gap: 0.4rem; align-items: center; }

.btn-complete {
  background: rgba(120, 191, 138, 0.08);
  border: 1px solid rgba(120, 191, 138, 0.28);
  color: var(--green);
  padding: 0.3rem 0.55rem;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.9rem;
  transition: background 0.2s;
  min-height: unset;
  box-shadow: none;
}

.btn-complete:hover { background: rgba(120, 191, 138, 0.18); box-shadow: none; }

.btn-delete {
  background: rgba(191, 120, 112, 0.06);
  border: 1px solid rgba(191, 120, 112, 0.22);
  color: var(--red);
  padding: 0.3rem 0.55rem;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.9rem;
  transition: background 0.2s;
  min-height: unset;
  box-shadow: none;
}

.btn-delete:hover { background: rgba(191, 120, 112, 0.16); box-shadow: none; }

/* ─── Calendar ──────────────────────────────────────── */
.cal-nav {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 0.9rem;
}

.cal-month-label {
  font-family: 'Cinzel', serif;
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--gold);
}

.cal-nav-btn {
  color: var(--gold);
  text-decoration: none;
  font-size: 1.3rem;
  padding: 0 0.5rem;
  line-height: 1;
  opacity: 0.65;
  transition: opacity 0.2s;
}

.cal-nav-btn:hover { opacity: 1; }

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.cal-weekday {
  text-align: center;
  font-family: 'Cinzel', serif;
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  padding: 0.3rem 0;
}

.cal-cell {
  position: relative;
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  background: var(--surface);
  border: 1px solid transparent;
  gap: 2px;
  transition: background 0.15s;
}

.cal-empty { background: transparent; border: none; }
.cal-day { font-size: 0.78rem; line-height: 1; color: var(--text-muted); }

.cal-encounter {
  background: rgba(120, 191, 138, 0.09);
  border-color: rgba(120, 191, 138, 0.18);
}
.cal-encounter .cal-day { color: var(--text); }

.cal-cycle {
  background: rgba(196, 116, 136, 0.1);
  border-color: rgba(196, 116, 136, 0.22);
}

.cal-encounter.cal-cycle {
  background: rgba(158, 100, 154, 0.1);
  border-color: rgba(158, 100, 154, 0.22);
}

.cal-dot { display: block; width: 4px; height: 4px; border-radius: 50%; }
.cal-dot-enc { background: var(--green); box-shadow: 0 0 4px rgba(120, 191, 138, 0.6); }
.cal-dot-cyc { background: var(--rose);  box-shadow: 0 0 4px rgba(196, 116, 136, 0.5); }

.cal-legend {
  display: flex; gap: 1.2rem;
  margin-top: 0.9rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-style: italic;
}

.legend-item { display: flex; align-items: center; gap: 0.35rem; }
.legend-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; }
.legend-dot.enc { background: var(--green); box-shadow: 0 0 4px rgba(120, 191, 138, 0.5); }
.legend-dot.cyc { background: var(--rose);  box-shadow: 0 0 4px rgba(196, 116, 136, 0.5); }

.cycle-form { display: flex; flex-direction: column; gap: 0.6rem; }
.cycle-list { display: flex; flex-direction: column; }

.cycle-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.42rem 0;
  border-bottom: 1px solid var(--surface);
}

.cycle-row:last-child { border-bottom: none; }
.cycle-dates { font-size: 0.88rem; color: var(--text-muted); font-style: italic; }

/* ─── Wishes ────────────────────────────────────────── */
.wish-form { display: flex; flex-direction: column; gap: 0.6rem; }
.wish-list { display: flex; flex-direction: column; }

.wish-item {
  display: flex; align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.62rem 0;
  border-bottom: 1px solid var(--surface);
}

.wish-item:last-child { border-bottom: none; }
.wish-fulfilled .wish-text { opacity: 0.3; text-decoration: line-through; }

.wish-info { flex: 1; }
.wish-text { color: var(--text); line-height: 1.45; margin-bottom: 0.15rem; }
.wish-meta { font-size: 0.76rem; color: var(--text-muted); font-style: italic; }
.wish-actions { display: flex; gap: 0.4rem; align-items: center; }

/* ─── Stats big ─────────────────────────────────────── */
.stats-big-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
}

.stat-big {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.9rem 0.5rem;
  text-align: center;
  box-shadow: inset 0 1px 0 var(--border-hi);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.stat-big:hover {
  border-color: var(--gold-dim);
  box-shadow: inset 0 1px 0 var(--border-hi), 0 2px 14px var(--gold-glow);
}

.stat-big-icon { font-size: 1.3rem; margin-bottom: 0.25rem; }

.stat-big-value {
  font-family: 'Cinzel', serif;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--gold);
  line-height: 1;
}

.stat-big-label {
  font-family: 'Cinzel', serif;
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-top: 0.22rem;
}
