:root {
  --ink: #263142;
  --muted: #766a5f;
  --paper: rgba(255, 249, 235, 0.94);
  --paper-deep: #f2e5ca;
  --line: #c9ae78;
  --gold: #b88a3d;
  --blue: #526f99;
  --shadow: rgba(33, 38, 54, 0.28);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: 'genshin';
  background:
    linear-gradient(rgba(10, 25, 48, 0.38), rgba(10, 25, 48, 0.28)),
    radial-gradient(circle at top, #233b63, transparent 38rem),
    linear-gradient(135deg, #b7d8ee, 50%, #9dc4dc);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle, rgba(255,255,255,.75) 1px, transparent 2px),
    radial-gradient(circle, rgba(255,210,226,.55) 2px, transparent 3px);
  background-size: 90px 90px, 140px 140px;
  opacity: .55;
}

a { color: #6b4a1e; text-decoration: none; }
a:hover { text-decoration: underline; }

.page-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0;
}

.hero {
  text-align: center;
  color: #fff3d7;
  text-shadow: 0 3px 12px rgba(0,0,0,.45);
  margin-bottom: 18px;
}

.compass { font-size: 3rem; line-height: 1; }
.hero h1 { margin: 0; font-size: clamp(2.6rem, 7vw, 5rem); }
.hero p { margin: 4px 0 0; font-size: 30pt; }

.card {
  position: relative;
  padding: 22px;
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 18px 45px var(--shadow), inset 0 0 0 1px rgba(255,255,255,.65);
  overflow: hidden;
}



h2 {
  margin: 0 0 18px;
  color: #76552d;
  font-size: 1.15rem;
  font-variant: small-caps;
  letter-spacing: .04em;
  text-align: center;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1.8fr 1.4fr;
  gap: 18px;
  align-items: start;
}

.wide-card { grid-column: span 2; }
.profile-card { grid-row: span 2; }

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.section-heading a {
  padding: 7px 14px;
  border: 1px solid #d1b98d;
  border-radius: 999px;
  background: #fff9ea;
  font-size: .85rem;
}

.profile-top {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}
.avatar {
  display: grid;
  place-items: center;
  width: 94px;
  aspect-ratio: 1;
  border: 4px double var(--line);
  border-radius: 50%;
  background: linear-gradient(135deg, #ffeec6, #91b6dd);
  font-size: 2rem;
}

.avatar img {
  width: 84px;
  border-radius: 50%;
}
.profile-top h3 { margin: 0 0 4px; font-size: 1.4rem; }
.profile-top p { margin: 0; color: var(--muted); font-style: italic; }

.rank-block {
  margin: 14px 0 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid #dfcfac;
}
.rank-block strong { float: right; font-size: 2.1rem; }
.meter {
  height: 8px;
  clear: both;
  margin: 10px 0 4px;
  background: #e8ddc4;
  border-radius: 999px;
  overflow: hidden;
}
.meter span { display: block; height: 100%; background: linear-gradient(90deg, #679c66, #b5c978); }
.rank-block small { color: var(--muted); }

.stat-list { margin: 0; }
.stat-list div {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #dfcfac;
}
.stat-list dt { color: #4d3924; }
.stat-list dd { margin: 0; font-weight: bold; }
blockquote {
  margin: 24px 0 0;
  padding: 18px;
  text-align: center;
  color: #6e5f52;
  border: 1px solid #dfcfac;
  background: rgba(255,255,255,.4);
  font-size: 10pt;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.character-card {
  padding: 8px;
  text-align: center;
  border: 1px solid #c4aa78;
  background: #fff7e5;
}
.character-card .portrait {
  display: grid;
  place-items: center;
  height: 170px;
  margin-bottom: 8px;
  color: rgba(255,255,255,.82);
  font-weight: bold;
  background: #ddd1ae;
  border: 3px solid #ddd1ae;
}

.portrait img {
  width: 164px;
}

.character-card h3 { margin: 4px 0; font-size: 1rem; }
.character-card p { margin: 0 0 4px; }
.tiny-note { margin: 16px 0 0; color: var(--muted);}

.favorites-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  text-align: center;
}
.favorites-row figure { margin: 0; }
.favorites-row div {
  display: grid;
  place-items: center;
  width: 86px;
  aspect-ratio: 1;
  margin: 0 auto 8px;
  border: 3px solid var(--line);
  background: #ddd1ae;
  color: white;
  font-size: 1.5rem;
}

figure img {
  height: 80px;
}

.exploration-list {
  display: grid;
  gap: 12px;
  padding: 0;
  margin: 0 0 22px;
  list-style: none;
}
.exploration-list li {
  display: grid;
  grid-template-columns: 95px 1fr 44px;
  align-items: center;
  gap: 10px;
}
meter { width: 100%; height: 10px; }
.button {
  display: inline-block;
  padding: 9px 18px;
  border: 1px solid #c4aa78;
  border-radius: 999px;
  background: #fff7e5;
}

.timeline {
  display: grid;
  gap: 15px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.timeline li {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid #dfcfac;
}
.timeline time { color: #8a602d; }

.journal-card { margin-top: 18px; }
.journal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.journal-preview {
  padding: 12px;
  border: 1px solid #c4aa78;
  background: #fff7e5;
}
.big-shot {
  height: 155px;
  border: 1px solid #b89960;
  background: #fff;
}

.journal-preview h3 { margin: 12px 0 4px; }
.journal-preview time { float: right; color: #8a602d; font-size: .82rem; }
.journal-preview p { color: var(--muted); line-height: 1.45; }
.thumb-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.thumb-row span {
  height: 48px;
  border: 1px solid #b89960;
  background: #fff;
}

.mini-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 18px;
}
.mini-card { text-align: center; }
.mini-card strong { display: block; font-size: 2.8rem; margin: 8px 0; color: #233b63; }
.mini-card p { color: var(--muted); }

@media (max-width: 900px) {
  .dashboard-grid,
  .journal-grid,
  .mini-grid { grid-template-columns: 1fr; }
  .wide-card,
  .profile-card { grid-column: auto; grid-row: auto; }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .favorites-row { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 560px) {
  .page-shell { width: min(100% - 20px, 1120px); padding: 24px 0; }
  .card { padding: 18px; }
  .team-grid,
  .favorites-row { grid-template-columns: 1fr 1fr; }
  .exploration-list li { grid-template-columns: 1fr; }
  .timeline li { grid-template-columns: 1fr; }
}
