/* Machi Koro "cozy tabletop" palette — matches the game's design tokens. */
:root {
  --felt: #3c6849;
  --felt-dark: #2f5239;
  --cream: #fff8f2;
  --cream-dim: #fdf2e4;
  --amber: #f3bf45;
  --amber-deep: #795900;
  --ink: #1f1b13;
  --ink-soft: #4f4635;
  --outline: #d2c5af;
  --blue: #5dade2;
  --green: #7abf7e;
  --red: #e08470;
  --purple: #a98bc4;
  --shadow: 0 18px 40px rgba(31, 27, 19, 0.22);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: 'Nunito', system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 50% -10%, var(--felt) 0%, var(--felt-dark) 70%) fixed;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  padding: 24px;
  /* subtle felt texture */
  background-blend-mode: multiply;
}

/* Language switch */
.lang-switch {
  position: fixed;
  top: 16px;
  right: 16px;
  display: flex;
  gap: 4px;
  background: rgba(255, 248, 242, 0.85);
  border: 1px solid var(--outline);
  border-radius: 999px;
  padding: 4px;
  backdrop-filter: blur(6px);
}
.lang-switch button {
  border: 0;
  background: transparent;
  font: 700 13px 'Nunito', sans-serif;
  color: var(--ink-soft);
  padding: 5px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.lang-switch button.active {
  background: var(--amber);
  color: var(--amber-deep);
}

/* The "paper card" */
.card {
  width: 100%;
  max-width: 420px;
  background: linear-gradient(180deg, var(--cream) 0%, var(--cream-dim) 100%);
  border: 1px solid var(--outline);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 40px 32px 32px;
  text-align: center;
  position: relative;
  animation: rise 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

/* top accent ribbon in the four family colors */
.card::before {
  content: '';
  position: absolute;
  top: 0; left: 28px; right: 28px;
  height: 6px;
  border-radius: 0 0 6px 6px;
  background: linear-gradient(90deg, var(--blue), var(--green), var(--amber), var(--red), var(--purple));
}

.avatar {
  width: 104px;
  height: 104px;
  margin: 6px auto 18px;
  border-radius: 50%;
  border: 4px solid var(--amber);
  box-shadow: 0 6px 16px rgba(121, 89, 0, 0.25);
  overflow: hidden;
  position: relative;
  display: grid;
  place-items: center;
  background: var(--felt);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar__initials {
  display: none;
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: 44px;
  color: var(--cream);
}
.avatar--placeholder .avatar__initials { display: block; }

.name {
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: 32px;
  margin: 0 0 4px;
  color: var(--amber-deep);
}
.tagline {
  margin: 0 0 18px;
  font-weight: 700;
  color: var(--felt);
  font-size: 15px;
}
.bio {
  margin: 0 auto 24px;
  color: var(--ink-soft);
  line-height: 1.55;
  font-size: 15px;
  max-width: 34ch;
}

.cta {
  display: inline-block;
  text-decoration: none;
  font: 700 16px 'Fredoka', sans-serif;
  color: var(--amber-deep);
  background: var(--amber);
  padding: 14px 26px;
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(121, 89, 0, 0.3);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.cta:hover { transform: translateY(-2px); box-shadow: 0 12px 22px rgba(121, 89, 0, 0.36); }
.cta:active { transform: translateY(0); }

.skills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 26px 0 22px;
}
.chip {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  background: #fff;
  border: 1px solid var(--outline);
  border-radius: 999px;
  padding: 5px 12px;
}

.links {
  display: flex;
  gap: 20px;
  justify-content: center;
}
.links a {
  color: var(--felt);
  font-weight: 700;
  text-decoration: none;
  font-size: 14px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.15s;
}
.links a:hover { border-color: var(--amber); }

.foot {
  margin-top: 22px;
  color: rgba(255, 248, 242, 0.7);
  font-size: 13px;
  letter-spacing: 0.04em;
}

@media (max-width: 420px) {
  .card { padding: 34px 22px 26px; border-radius: 22px; }
  .name { font-size: 28px; }
}
