:root {
  color-scheme: light;
  --ink: #2f2116;
  --paper: #fff0d7;
  --paper-edge: #d8b885;
  --wood: #8a5a2b;
  --wood-dark: #3f2410;
  --wood-light: #c9934f;
  --green: #6ac436;
  --aqua: #45d7ef;
  --poster-max: 947px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  background: #102318;
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", Arial, sans-serif;
}

img,
button {
  user-select: none;
}

button {
  font: inherit;
}

.site-shell {
  position: relative;
  isolation: isolate;
  width: min(100%, var(--poster-max));
  min-height: 100vh;
  margin: 0 auto;
  overflow: hidden;
  background: #0c9fea;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.18),
    0 24px 90px rgba(0, 0, 0, 0.44);
}

.site-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(180deg, #061626, #0a2c43 50%, #1f3219);
}

.site-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background:
    radial-gradient(circle at 48% 18%, rgba(255, 255, 255, 0.12), transparent 20%),
    linear-gradient(180deg, transparent 0 35%, rgba(255, 255, 255, 0.22) 44%, transparent 58%),
    linear-gradient(180deg, transparent 72%, rgba(21, 65, 30, 0.18));
  animation: atmosphere-pulse 7s ease-in-out infinite alternate;
}

.page-background {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  pointer-events: none;
  transform-origin: center top;
  filter: saturate(1.08) contrast(1.04);
  animation: bg-drift 16s ease-in-out infinite alternate;
}

.sky-motion {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
}

.sky-motion span {
  position: absolute;
  width: var(--spark-size, 22px);
  height: var(--spark-size, 22px);
  background: var(--spark-color, #fff04f);
  clip-path: polygon(50% 0, 62% 35%, 100% 50%, 62% 65%, 50% 100%, 38% 65%, 0 50%, 38% 35%);
  filter:
    drop-shadow(0 0 7px rgba(255, 255, 255, 0.95))
    drop-shadow(0 0 18px var(--spark-glow, rgba(255, 224, 73, 0.95)));
  opacity: 0;
  animation: sparkle var(--spark-dur, 5.4s) linear infinite;
}

.sky-motion span:nth-child(1) { left: 8%; top: 8%; --spark-size: 24px; --spark-dur: 4.8s; animation-delay: -1s; }
.sky-motion span:nth-child(2) { left: 76%; top: 12%; --spark-size: 30px; --spark-color: #fff7a8; animation-delay: -2.3s; }
.sky-motion span:nth-child(3) { left: 34%; top: 31%; --spark-size: 20px; --spark-color: #72f4ff; --spark-glow: rgba(64, 220, 255, 0.95); animation-delay: -3.1s; }
.sky-motion span:nth-child(4) { left: 88%; top: 45%; --spark-size: 28px; animation-delay: -0.6s; }
.sky-motion span:nth-child(5) { left: 14%; top: 73%; --spark-size: 26px; --spark-color: #b7ff67; --spark-glow: rgba(132, 255, 84, 0.9); animation-delay: -4s; }
.sky-motion span:nth-child(6) { left: 50%; top: 17%; --spark-size: 18px; --spark-color: #ffffff; animation-delay: -1.9s; }
.sky-motion span:nth-child(7) { left: 64%; top: 39%; --spark-size: 32px; --spark-dur: 6.1s; animation-delay: -4.7s; }
.sky-motion span:nth-child(8) { left: 22%; top: 46%; --spark-size: 22px; --spark-color: #7df8ff; --spark-glow: rgba(55, 217, 255, 0.95); animation-delay: -0.8s; }
.sky-motion span:nth-child(9) { left: 91%; top: 70%; --spark-size: 24px; animation-delay: -3.8s; }
.sky-motion span:nth-child(10) { left: 43%; top: 69%; --spark-size: 34px; --spark-color: #fff47a; animation-delay: -5.2s; }
.sky-motion span:nth-child(11) { left: 6%; top: 36%; --spark-size: 22px; --spark-color: #b9ff6e; --spark-glow: rgba(135, 255, 83, 0.9); animation-delay: -2.6s; }
.sky-motion span:nth-child(12) { left: 81%; top: 28%; --spark-size: 18px; --spark-color: #ffffff; animation-delay: -3.4s; }
.sky-motion span:nth-child(13) { left: 59%; top: 82%; --spark-size: 26px; --spark-color: #6af4ff; --spark-glow: rgba(41, 212, 255, 0.94); animation-delay: -1.4s; }
.sky-motion span:nth-child(14) { left: 29%; top: 88%; --spark-size: 20px; animation-delay: -4.4s; }

.hero {
  position: relative;
  z-index: 3;
  min-height: clamp(640px, 76vw, 720px);
  padding: clamp(40px, 6vw, 62px) clamp(22px, 7vw, 86px) 0 clamp(22px, 4vw, 44px);
}

.hero-copy {
  width: min(304px, 35.2vw);
  animation: hero-drop 750ms cubic-bezier(0.2, 0.82, 0.22, 1) both;
}

.hero-title-asset {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(12px 14px 0 rgba(0, 39, 68, 0.24));
  animation:
    plaque-glow 3.2s ease-in-out infinite,
    plaque-float 4.8s ease-in-out 900ms infinite;
}

.stats-row {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(230px, 1fr) minmax(330px, 1.25fr) minmax(220px, 0.9fr);
  gap: 12px;
  padding: 0 clamp(18px, 6vw, 70px);
  margin-top: -22px;
}

.paper-card,
.paper-panel,
.world-panel,
.photo-card,
.inventory-panel {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.52), transparent 46%),
    linear-gradient(180deg, var(--paper), var(--paper-edge));
  border: 5px solid #7a5733;
  box-shadow:
    0 0 0 4px rgba(255, 246, 226, 0.58),
    8px 10px 0 rgba(52, 34, 18, 0.34);
}

.paper-card {
  min-height: 104px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  min-width: 0;
}

.mini-profile img {
  width: 68px;
  height: 68px;
  object-fit: cover;
  border: 4px solid #634424;
  box-shadow: inset 0 0 0 3px #fff;
}

.paper-card strong {
  display: block;
  font-size: clamp(18px, 2vw, 21px);
  line-height: 1.25;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.paper-card span {
  display: block;
  margin-top: 5px;
  color: #6e5b48;
  font-size: clamp(14px, 1.8vw, 18px);
  font-weight: 700;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.stat-card {
  display: grid;
  grid-template-columns: 50px 1fr 1px 50px 1fr;
  column-gap: 10px;
}

.stat-card > div:not(.divider),
.level-card > div,
.mini-profile > div {
  min-width: 0;
}

.divider {
  width: 1px;
  height: 64px;
  background: rgba(110, 86, 59, 0.26);
}

.ui-icon {
  width: 50px;
  height: 50px;
  place-self: center;
  object-fit: contain;
  filter: drop-shadow(4px 5px 0 rgba(0, 0, 0, 0.26));
  animation: icon-breathe 2.7s ease-in-out infinite;
}

.level-card .ui-icon {
  width: 58px;
  height: 58px;
}

.level-bar {
  width: min(132px, 100%);
  max-width: 100%;
  height: 11px;
  margin-top: 8px;
  background: #3b2019;
  border-radius: 8px;
  overflow: hidden;
}

.level-bar i {
  display: block;
  width: 68%;
  height: 100%;
  background: linear-gradient(90deg, #53bc43, #a8df57);
  animation: level-pulse 2.4s ease-in-out infinite;
}

.main-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.78fr);
  grid-template-areas:
    "about world"
    "hobbies inventory"
    "games inventory";
  gap: 34px 28px;
  padding: 58px clamp(18px, 6vw, 64px) 110px;
}

.section-group {
  min-width: 0;
}

.about-group { grid-area: about; }
.hobbies-group { grid-area: hobbies; }
.games-group { grid-area: games; }

.wood-title {
  position: relative;
  overflow: visible;
  width: fit-content;
  min-height: 60px;
  margin: 0 0 16px 8px;
  display: flex;
  align-items: center;
  padding: 0 28px 0 64px;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.08) 0 6px, transparent 6px 18px),
    linear-gradient(180deg, var(--wood-light), var(--wood), var(--wood-dark));
  border: 5px solid #4a2b14;
  color: #fff8e5;
  font-size: clamp(24px, 3.3vw, 32px);
  font-weight: 900;
  text-shadow: 3px 4px 0 rgba(45, 24, 8, 0.72);
  box-shadow: inset 0 0 0 3px rgba(255, 229, 158, 0.24), 6px 8px 0 rgba(35, 23, 13, 0.32);
  animation: wood-title-pulse 3.6s ease-in-out infinite;
}

.wood-title::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 0 36%, rgba(255, 239, 171, 0.56) 48%, transparent 60%);
  transform: translateX(-120%) skewX(-17deg);
  pointer-events: none;
  animation: title-shine 3.1s ease-in-out infinite;
}

.title-icon {
  position: absolute;
  left: -30px;
  top: -22px;
  z-index: 2;
  width: 72px;
  height: 72px;
  object-fit: contain;
  filter: drop-shadow(5px 6px 0 rgba(0, 0, 0, 0.28));
  animation: icon-bob 2.8s ease-in-out infinite;
}

.about-panel {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 28px;
  align-items: center;
  padding: 30px 26px;
}

.about-photo {
  width: 166px;
  aspect-ratio: 1 / 1.18;
  object-fit: cover;
  border: 8px solid #fffaf0;
  outline: 4px solid #c6b08d;
  box-shadow: 9px 9px 0 rgba(70, 49, 31, 0.24);
}

.about-panel ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 18px;
  color: #5b4b3c;
  font-weight: 800;
}

.about-panel li {
  display: flex;
  align-items: center;
  gap: 12px;
}

.list-icon {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  object-fit: contain;
  filter: drop-shadow(2px 3px 0 rgba(0, 0, 0, 0.22));
  animation: list-icon-pop 3s ease-in-out infinite;
}

.about-panel li:nth-child(2) .list-icon { animation-delay: -0.45s; }
.about-panel li:nth-child(3) .list-icon { animation-delay: -0.9s; }
.about-panel li:nth-child(4) .list-icon { animation-delay: -1.35s; }

.world-panel {
  grid-area: world;
  position: relative;
  align-self: end;
  min-height: 280px;
  overflow: hidden;
  border: 6px solid #fff8e9;
  outline: 4px solid #608db8;
}

.world-panel > img,
.photo-card > img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.world-panel > img {
  transform-origin: center;
  animation: image-kenburns 9s ease-in-out infinite alternate;
}

.caption {
  position: absolute;
  left: 18px;
  bottom: 18px;
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 22px 0 62px;
  background: linear-gradient(180deg, #fff8ec, #e8d1ad);
  border: 4px solid #7b5936;
  box-shadow: 5px 6px 0 rgba(37, 27, 16, 0.26);
  font-size: clamp(17px, 2.2vw, 22px);
  font-weight: 900;
  animation: caption-pop 3s ease-in-out infinite;
}

.caption-icon {
  position: absolute;
  left: 12px;
  width: 46px;
  height: 46px;
  object-fit: contain;
  filter: drop-shadow(3px 4px 0 rgba(0, 0, 0, 0.26));
  animation: sword-flash 2.6s ease-in-out infinite;
}

.photo-row,
.game-row {
  display: grid;
  gap: 22px;
}

.photo-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.game-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.photo-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 196px;
  border: 7px solid #f8ead2;
  outline: 5px solid #755333;
  transition: transform 180ms ease, filter 180ms ease, box-shadow 180ms ease;
}

.photo-card::before {
  content: "";
  position: absolute;
  inset: -20% -70%;
  z-index: 2;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.62) 48%, transparent 61%);
  transform: translateX(-82%) skewX(-16deg);
  pointer-events: none;
  transition: transform 520ms ease;
}

.photo-card:hover {
  transform: translateY(-8px) rotate(-0.5deg);
  filter: saturate(1.1);
  box-shadow: 0 0 0 4px rgba(255, 240, 160, 0.45), 10px 13px 0 rgba(42, 28, 17, 0.36);
}

.photo-card:hover::before {
  transform: translateX(82%) skewX(-16deg);
}

.photo-card:hover > img {
  transform: scale(1.07);
}

.photo-card footer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  min-height: 54px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px;
  align-items: center;
  gap: 8px;
  padding: 0 20px;
  background: linear-gradient(180deg, rgba(255, 248, 235, 0.96), rgba(231, 207, 176, 0.97));
  border-top: 4px solid rgba(105, 72, 38, 0.38);
}

.photo-card strong {
  min-width: 0;
  font-size: clamp(17px, 2.2vw, 21px);
  overflow: visible;
  text-overflow: unset;
  white-space: nowrap;
}

.photo-card > img {
  transition: transform 520ms ease;
}

.tiny-heart-icon {
  width: 28px;
  height: 28px;
  justify-self: end;
  object-fit: contain;
  filter: drop-shadow(2px 3px 0 rgba(0, 0, 0, 0.24));
  animation: heart-beat 1.9s ease-in-out infinite;
}

.game-card {
  min-height: 154px;
}

.game-card footer {
  min-height: 52px;
  grid-template-columns: minmax(0, 1fr) 22px;
  padding: 0 6px 0 9px;
  gap: 4px;
}

.game-card strong {
  font-size: 15px;
  white-space: nowrap;
}

.game-card .tiny-heart-icon {
  width: 22px;
  height: 22px;
}

.inventory-panel {
  grid-area: inventory;
  align-self: start;
  position: sticky;
  top: 18px;
  z-index: 80;
  padding: 20px 17px 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), transparent 16%),
    repeating-linear-gradient(0deg, rgba(55, 31, 12, 0.2) 0 10px, transparent 10px 26px),
    linear-gradient(180deg, #9d6b34, #5a351a 42%, #372010);
  border: 7px solid #4b2d15;
  box-shadow: inset 0 0 0 5px rgba(255, 220, 132, 0.18), 12px 12px 0 rgba(24, 17, 10, 0.38);
  animation: inventory-glow 3.4s ease-in-out infinite;
}

.inventory-panel header {
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 16px;
  color: #fff5de;
  text-shadow: 3px 4px 0 rgba(40, 22, 8, 0.72);
}

.inventory-panel h2 {
  margin: 0;
  font-size: clamp(23px, 3vw, 28px);
  font-weight: 900;
}

.header-icon {
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  object-fit: contain;
  filter: drop-shadow(4px 5px 0 rgba(0, 0, 0, 0.3));
  animation: icon-bob 2.6s ease-in-out infinite;
}

.inventory-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(48px, 1fr));
  gap: 7px;
  padding: 10px;
  background: linear-gradient(180deg, #585858, #343434);
  border: 5px solid #252525;
  box-shadow: inset 0 0 0 4px #8f8f8f, inset 0 0 0 8px #5f5f5f;
}

.slot {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1;
  min-width: 0;
  padding: 0;
  border: 3px solid;
  border-color: #d7d7d7 #4b4b4b #343434 #bcbcbc;
  background: linear-gradient(135deg, #bcbcbc, #737373);
  box-shadow: inset 3px 3px 0 rgba(255, 255, 255, 0.35), inset -3px -3px 0 rgba(0, 0, 0, 0.25);
  cursor: default;
  transition: filter 160ms ease, transform 160ms ease;
}

.slot.filled {
  cursor: help;
}

.slot.filled::after {
  content: "";
  position: absolute;
  inset: -45%;
  background: linear-gradient(115deg, transparent 36%, rgba(255, 255, 255, 0.54) 49%, transparent 62%);
  transform: translateX(-80%) rotate(8deg);
  pointer-events: none;
  animation: slot-sweep 4s ease-in-out infinite;
}

.slot.filled:nth-child(2)::after { animation-delay: -0.35s; }
.slot.filled:nth-child(3)::after { animation-delay: -0.7s; }
.slot.filled:nth-child(4)::after { animation-delay: -1.05s; }
.slot.filled:nth-child(5)::after { animation-delay: -1.4s; }
.slot.filled:nth-child(6)::after { animation-delay: -1.75s; }
.slot.filled:nth-child(7)::after { animation-delay: -2.1s; }
.slot.filled:nth-child(8)::after { animation-delay: -2.45s; }
.slot.filled:nth-child(9)::after { animation-delay: -2.8s; }
.slot.filled:nth-child(10)::after { animation-delay: -3.15s; }

.slot img {
  width: 92%;
  height: 92%;
  display: block;
  object-fit: contain;
  margin: 0 auto;
  filter: drop-shadow(3px 5px 0 rgba(0, 0, 0, 0.32));
  transition: transform 140ms ease;
}

.slot:hover,
.slot:focus-visible {
  outline: 4px solid #fff36b;
  outline-offset: 2px;
  z-index: 3;
  filter: brightness(1.18);
  transform: translateY(-2px);
}

.slot:hover img,
.slot:focus-visible img {
  transform: translateY(-6px) scale(1.14) rotate(-2deg);
}

.slot.empty {
  display: block;
  opacity: 0.78;
}

.hearts {
  display: flex;
  justify-content: center;
  gap: 3px;
  margin-top: 15px;
  line-height: 1;
}

.hearts img {
  width: clamp(20px, 3vw, 28px);
  height: clamp(20px, 3vw, 28px);
  object-fit: contain;
  filter: drop-shadow(2px 3px 0 rgba(0, 0, 0, 0.26));
  animation: heart-beat 1.9s ease-in-out infinite;
}

.hearts img:nth-child(2n) {
  animation-delay: -0.28s;
}

.block-tooltip {
  position: fixed;
  left: 12px;
  top: 98px;
  width: min(292px, 72vw);
  min-height: 176px;
  padding: 15px 17px 16px;
  opacity: 0;
  transform: translateY(10px) scale(0.96);
  pointer-events: none;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.54), transparent 45%),
    linear-gradient(180deg, #fff8e9, #e7cda8);
  border: 5px solid #6b4a2b;
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.65), 7px 9px 0 rgba(42, 26, 12, 0.33);
  z-index: 9999;
  transition: opacity 150ms ease, transform 150ms ease;
}

.block-tooltip.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.block-tooltip strong {
  display: block;
  margin-bottom: 4px;
  font-size: 23px;
  color: #2e1d0f;
}

.block-tooltip em {
  display: inline-block;
  margin-bottom: 9px;
  padding: 2px 8px;
  font-style: normal;
  font-size: 13px;
  font-weight: 800;
  color: #fff8e8;
  background: #5c7d30;
  border: 2px solid #314717;
}

.block-tooltip p,
.block-tooltip small,
.block-tooltip b {
  display: block;
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: #4b3828;
}

.block-tooltip small,
.block-tooltip b {
  margin-top: 8px;
}

.block-tooltip b {
  color: #1e5e8f;
}

.bottom-bar {
  position: relative;
  overflow: hidden;
  z-index: 3;
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(22px, 11vw, 116px);
  padding: 14px 20px;
  color: #ffe9b7;
  font-size: clamp(18px, 2.6vw, 24px);
  font-weight: 900;
  text-shadow: 3px 4px 0 rgba(34, 19, 6, 0.8);
  background:
    linear-gradient(180deg, #5aa33b 0 18px, #513318 18px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.08) 0 10px, transparent 10px 30px);
  border-top: 8px solid #233d15;
  box-shadow: 0 -7px 0 rgba(255, 255, 255, 0.18);
  animation: bottom-bar-glow 4.2s ease-in-out infinite;
}

.bottom-bar::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 0 35%, rgba(255, 244, 153, 0.28) 48%, transparent 62%);
  transform: translateX(-110%);
  animation: bottom-sweep 3.8s ease-in-out infinite;
  pointer-events: none;
}

.bottom-bar div {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 14px;
}

.bar-icon {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  object-fit: contain;
  filter: drop-shadow(3px 4px 0 rgba(0, 0, 0, 0.24));
  animation: icon-breathe 2.5s ease-in-out infinite;
}

.reveal {
  opacity: 0;
  transform: translateY(34px);
  transition:
    opacity 620ms ease,
    transform 620ms cubic-bezier(0.2, 0.78, 0.22, 1);
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

@keyframes hero-drop {
  from { opacity: 0; transform: translateY(-28px) scale(0.94); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes sparkle {
  0% { transform: translate3d(-18px, 28px, 0) scale(0.42) rotate(0); opacity: 0; }
  12% { opacity: 1; }
  42% { transform: translate3d(18px, -28px, 0) scale(1.55) rotate(180deg); opacity: 1; }
  72% { opacity: 0.84; }
  100% { transform: translate3d(66px, -96px, 0) scale(0.58) rotate(360deg); opacity: 0; }
}

@keyframes level-pulse {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.35); }
}

@keyframes bg-drift {
  from { transform: scale(1) translateY(0); }
  to { transform: scale(1.035) translateY(-16px); }
}

@keyframes title-glow {
  0%, 100% { filter: drop-shadow(0 0 0 rgba(255, 255, 255, 0)); }
  50% { filter: drop-shadow(0 0 10px rgba(255, 255, 210, 0.48)); }
}

@keyframes atmosphere-pulse {
  from { opacity: 0.78; }
  to { opacity: 1; }
}

@keyframes plaque-glow {
  0%, 100% { filter: drop-shadow(0 0 0 rgba(255, 240, 130, 0)); }
  50% { filter: drop-shadow(0 0 18px rgba(255, 239, 127, 0.42)); }
}

@keyframes plaque-float {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-9px) rotate(-0.45deg); }
}

@keyframes icon-bob {
  0%, 100% { transform: translateY(0) rotate(-1deg) scale(1); }
  50% { transform: translateY(-6px) rotate(2deg) scale(1.06); }
}

@keyframes icon-breathe {
  0%, 100% { transform: scale(1); filter: drop-shadow(4px 5px 0 rgba(0, 0, 0, 0.26)) brightness(1); }
  50% { transform: scale(1.12) rotate(-2deg); filter: drop-shadow(4px 5px 0 rgba(0, 0, 0, 0.26)) brightness(1.22); }
}

@keyframes list-icon-pop {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-3px) scale(1.15); }
}

@keyframes wood-title-pulse {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.18); }
}

@keyframes title-shine {
  0%, 42% { transform: translateX(-125%) skewX(-17deg); opacity: 0; }
  52% { opacity: 1; }
  78%, 100% { transform: translateX(160%) skewX(-17deg); opacity: 0; }
}

@keyframes image-kenburns {
  from { transform: scale(1) translate3d(0, 0, 0); }
  to { transform: scale(1.08) translate3d(-10px, -6px, 0); }
}

@keyframes caption-pop {
  0%, 100% { transform: translateY(0); box-shadow: 5px 6px 0 rgba(37, 27, 16, 0.26); }
  50% { transform: translateY(-5px); box-shadow: 5px 8px 0 rgba(37, 27, 16, 0.22), 0 0 20px rgba(255, 242, 128, 0.48); }
}

@keyframes sword-flash {
  0%, 100% { transform: rotate(-4deg) scale(1); filter: drop-shadow(3px 4px 0 rgba(0, 0, 0, 0.26)) brightness(1); }
  50% { transform: rotate(5deg) scale(1.12); filter: drop-shadow(3px 4px 0 rgba(0, 0, 0, 0.26)) brightness(1.35); }
}

@keyframes inventory-glow {
  0%, 100% { box-shadow: inset 0 0 0 5px rgba(255, 220, 132, 0.18), 12px 12px 0 rgba(24, 17, 10, 0.38); }
  50% { box-shadow: inset 0 0 0 5px rgba(255, 220, 132, 0.28), 12px 12px 0 rgba(24, 17, 10, 0.38), 0 0 28px rgba(255, 221, 94, 0.5); }
}

@keyframes slot-sweep {
  0%, 38% { transform: translateX(-86%) rotate(8deg); opacity: 0; }
  48% { opacity: 0.9; }
  68%, 100% { transform: translateX(86%) rotate(8deg); opacity: 0; }
}

@keyframes heart-beat {
  0%, 100% { transform: scale(1); filter: drop-shadow(2px 3px 0 rgba(0, 0, 0, 0.26)) brightness(1); }
  38% { transform: scale(1.2); filter: drop-shadow(2px 3px 0 rgba(0, 0, 0, 0.26)) brightness(1.18); }
  56% { transform: scale(0.96); }
}

@keyframes bottom-bar-glow {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.16); }
}

@keyframes bottom-sweep {
  0%, 40% { transform: translateX(-110%); opacity: 0; }
  52% { opacity: 1; }
  82%, 100% { transform: translateX(110%); opacity: 0; }
}

@media (max-width: 820px) {
  .site-shell {
    width: 100%;
  }

  .hero {
    min-height: 520px;
    padding: 78px 12px 0;
  }

  .hero-copy {
    width: min(224px, 36.8vw);
  }

  .stats-row {
    grid-template-columns: 1fr;
    margin-top: -36px;
  }

  .main-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "about"
      "world"
      "hobbies"
      "inventory"
      "games";
    padding-inline: 18px;
  }

  .inventory-panel {
    position: relative;
    top: auto;
  }

  .block-tooltip {
    position: fixed;
    left: 12px;
    right: 12px;
    top: auto !important;
    bottom: 18px;
    width: auto;
  }

  .photo-row,
  .game-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .about-panel {
    grid-template-columns: 1fr;
  }

  .about-photo {
    width: min(220px, 70vw);
    justify-self: center;
  }

  .stat-card {
    grid-template-columns: 56px 1fr;
    row-gap: 12px;
  }

  .level-card {
    align-items: center;
  }

  .divider {
    display: none;
  }

  .bottom-bar {
    flex-wrap: wrap;
  }

  .game-card footer {
    padding-inline: 14px;
    grid-template-columns: minmax(0, 1fr) 26px;
  }

  .game-card strong {
    font-size: 16px;
  }

  .game-card .tiny-heart-icon {
    width: 26px;
    height: 26px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    transition-duration: 1ms !important;
    scroll-behavior: auto !important;
  }
}
