body.steam-life-page {
  --steam-ink: var(--color-text, #403844);
  --steam-muted: var(--color-muted, #7f7184);
  --steam-soft: var(--color-bg-soft, #fff7fb);
  --steam-paper: var(--color-card, rgba(255, 255, 255, 0.78));
  --steam-paper-strong: var(--color-card-strong, rgba(255, 255, 255, 0.92));
  --steam-line: var(--color-border, rgba(143, 117, 139, 0.16));
  --steam-rose: var(--color-primary, #e884a8);
  --steam-violet: #a78bfa;
  --steam-blue: #73a7ea;
  --steam-cyan: #63c7d8;
  --steam-green: #82c99a;
  --steam-amber: #edba67;
  --steam-coral: #ee897e;
  --steam-shadow: var(--shadow-card, 0 22px 70px rgba(125, 91, 119, 0.13));
  --steam-card-shadow: var(--shadow-soft, 0 16px 42px rgba(101, 78, 108, 0.1));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body.steam-life-page {
  margin: 0;
  min-height: 100vh;
  color: var(--steam-ink);
  background:
    linear-gradient(135deg, rgba(255, 247, 251, 0.96), rgba(245, 250, 255, 0.94) 45%, rgba(255, 250, 240, 0.88)),
    radial-gradient(circle at 12% 10%, rgba(232, 132, 168, 0.18), transparent 30%),
    radial-gradient(circle at 82% 20%, rgba(115, 167, 234, 0.16), transparent 28%),
    radial-gradient(circle at 58% 92%, rgba(130, 201, 154, 0.14), transparent 32%);
  background-attachment: fixed;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

.steam-life-page a {
  color: inherit;
  text-decoration: none;
}

.steam-life-page button,
.steam-life-page input {
  font: inherit;
}

.steam-section-nav {
  justify-content: center;
  flex-wrap: wrap;
  margin: -6px 0 18px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.54);
  box-shadow: 0 10px 26px rgba(223, 127, 170, 0.08);
  backdrop-filter: blur(12px);
}

.steam-header {
  position: sticky;
  top: 14px;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.64);
  box-shadow: 0 16px 46px rgba(125, 91, 119, 0.1);
  backdrop-filter: blur(16px);
}

.back-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  color: #d36f9a;
  background: #fff;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px rgba(232, 132, 168, 0.11);
}

.top-links {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #6f6173;
  font-size: 14px;
  font-weight: 800;
}

.top-links a {
  padding: 10px 12px;
  border-radius: 999px;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.top-links a:hover,
.top-links a:focus-visible,
.top-links a.is-active {
  color: #d36f9a;
  background: rgba(255, 255, 255, 0.82);
  transform: translateY(-1px);
}

.top-links a.is-active {
  box-shadow: inset 0 0 0 1px rgba(211, 111, 154, 0.12);
}

.steam-section {
  scroll-margin-top: 116px;
  padding: 34px 0;
}

.overview-section {
  padding-top: 8px;
}

.overview-hero,
.library-panel {
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 30px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.58)),
    linear-gradient(120deg, rgba(255, 232, 243, 0.62), rgba(232, 244, 255, 0.58) 52%, rgba(250, 245, 229, 0.5));
  box-shadow: var(--steam-shadow);
  backdrop-filter: blur(18px);
}

.overview-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(420px, 1fr);
  gap: clamp(24px, 4vw, 48px);
  align-items: center;
  min-height: 520px;
  padding: clamp(28px, 5vw, 56px);
}

.eyebrow {
  margin: 0 0 10px;
  color: #d36f9a;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p,
span,
strong {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 620px;
  margin: 0;
  color: #d36f9a;
  font-size: clamp(46px, 7vw, 82px);
  line-height: 1.02;
  letter-spacing: 0;
}

.hero-subtitle {
  max-width: 640px;
  margin: 18px 0 0;
  color: #6f6173;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.85;
}

.profile-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 34px;
}

.avatar-placeholder {
  display: grid;
  flex: 0 0 auto;
  width: 76px;
  height: 76px;
  place-items: center;
  border-radius: 26px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(232, 132, 168, 0.96), rgba(115, 167, 234, 0.86)),
    #d36f9a;
  font-size: 24px;
  font-weight: 950;
  box-shadow: 0 14px 35px rgba(164, 97, 143, 0.2);
}

.profile-name {
  margin: 0 0 6px;
  color: #443949;
  font-size: 21px;
  font-weight: 900;
}

.profile-note {
  max-width: 520px;
  margin: 0;
  color: var(--steam-muted);
  line-height: 1.75;
}

.steam-sync-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-top: 22px;
}

.steam-sync-button {
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #d36f9a, #73a7ea);
  box-shadow: 0 14px 30px rgba(123, 98, 152, 0.18);
  font-weight: 950;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.steam-sync-button:hover,
.steam-sync-button:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(123, 98, 152, 0.24);
}

.steam-sync-button:disabled {
  cursor: wait;
  opacity: 0.68;
  transform: none;
}

.steam-sync-panel p {
  flex: 1 1 260px;
  margin: 0;
  color: var(--steam-muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.65;
}

.steam-data-status {
  margin: 12px 0 0;
  color: var(--steam-muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.65;
}

.steam-data-status.is-error {
  color: #c45d75;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.stat-item {
  min-height: 132px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.66);
  box-shadow: var(--steam-card-shadow);
}

.stat-item span,
.stat-item em {
  display: block;
  color: var(--steam-muted);
  font-size: 13px;
  font-style: normal;
  font-weight: 800;
}

.stat-item strong {
  display: block;
  margin: 8px 0 6px;
  color: #443949;
  font-size: clamp(27px, 4vw, 42px);
  line-height: 1;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 18px;
}

.section-heading h2 {
  margin: 0;
  color: #443949;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.15;
  letter-spacing: 0;
}

.section-heading p:last-child {
  margin: 10px 0 0;
  color: var(--steam-muted);
  font-size: 16px;
  line-height: 1.8;
}

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

.game-card,
.bucket-card,
.achievement-card,
.screenshot-card,
.rank-row {
  border: 1px solid rgba(255, 255, 255, 0.82);
  background: var(--steam-paper);
  box-shadow: var(--steam-card-shadow);
  backdrop-filter: blur(14px);
}

.game-card {
  overflow: hidden;
  border-radius: 24px;
}

.game-cover {
  position: relative;
  display: flex;
  min-height: 156px;
  align-items: end;
  padding: 18px;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(135deg, rgba(232, 132, 168, 0.88), rgba(115, 167, 234, 0.78));
}

.game-cover img,
.library-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.game-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 28%, rgba(32, 24, 39, 0.66));
}

.game-cover span {
  position: relative;
  z-index: 1;
  font-size: 24px;
  font-weight: 950;
  line-height: 1.05;
  text-shadow: 0 10px 28px rgba(48, 36, 58, 0.24);
}

.game-card.rose .game-cover { background: linear-gradient(135deg, #e884a8, #f4b6c8); }
.game-card.blue .game-cover { background: linear-gradient(135deg, #73a7ea, #9dd6f0); }
.game-card.green .game-cover { background: linear-gradient(135deg, #82c99a, #c7d990); }
.game-card.violet .game-cover { background: linear-gradient(135deg, #a78bfa, #d7b6f4); }
.game-card.amber .game-cover { background: linear-gradient(135deg, #edba67, #f0d28c); }
.game-card.cyan .game-cover { background: linear-gradient(135deg, #63c7d8, #9adad5); }

.game-card-body {
  padding: 18px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  color: #d36f9a;
  background: #fff;
  font-size: 12px;
  font-weight: 900;
}

.game-card h3,
.rank-row h3,
.bucket-card h3,
.achievement-card h3 {
  margin: 12px 0 10px;
  color: #443949;
  line-height: 1.2;
}

.game-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 14px;
}

.game-meta div {
  min-width: 0;
}

.game-meta dt {
  color: var(--steam-muted);
  font-size: 12px;
  font-weight: 800;
}

.game-meta dd {
  margin: 3px 0 0;
  color: #443949;
  font-weight: 900;
}

.progress-line,
.bucket-bar {
  overflow: hidden;
  height: 8px;
  border-radius: 999px;
  background: rgba(128, 113, 132, 0.12);
}

.progress-line span,
.bucket-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--steam-rose), var(--steam-blue));
}

.card-caption {
  margin: 8px 0 0;
  color: var(--steam-muted);
  font-size: 13px;
}

.rank-list {
  display: grid;
  gap: 10px;
}

.rank-row {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 120px 88px;
  gap: 16px;
  align-items: center;
  min-height: 78px;
  padding: 14px 18px;
  border-radius: 20px;
}

.rank-row.top-rank {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 244, 221, 0.82)),
    var(--steam-paper);
  border-color: rgba(237, 186, 103, 0.38);
}

.rank-number {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 15px;
  color: #fff;
  background: linear-gradient(135deg, var(--steam-rose), var(--steam-amber));
  font-weight: 950;
}

.rank-main h3 {
  margin: 0 0 4px;
  font-size: 18px;
}

.rank-main p {
  margin: 0;
  color: var(--steam-muted);
  font-size: 14px;
}

.rank-hours,
.rank-percent {
  color: #443949;
  font-weight: 950;
  text-align: right;
}

.rank-percent {
  color: var(--steam-muted);
}

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

.bucket-card {
  min-height: 178px;
  padding: 20px;
  border-radius: 22px;
}

.bucket-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.bucket-top h3 {
  margin: 0;
  font-size: 20px;
}

.bucket-top strong {
  color: #d36f9a;
  font-size: 20px;
}

.bucket-card p {
  min-height: 54px;
  margin: 12px 0 18px;
  color: var(--steam-muted);
  line-height: 1.7;
}

.empty-state {
  padding: 22px;
  border: 1px dashed rgba(143, 117, 139, 0.24);
  border-radius: 18px;
  color: var(--steam-muted);
  background: rgba(255, 255, 255, 0.54);
  font-weight: 800;
  line-height: 1.7;
}

.recent-grid .empty-state,
.rank-list .empty-state,
.bucket-grid .empty-state,
.achievement-grid .empty-state,
.game-wall .empty-state {
  grid-column: 1 / -1;
}

.achievement-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.achievement-summary div {
  min-height: 116px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.84);
  border-radius: 22px;
  background: var(--steam-paper);
  box-shadow: var(--steam-card-shadow);
}

.achievement-summary .perfect {
  border-color: rgba(237, 186, 103, 0.48);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.86), rgba(255, 244, 221, 0.78));
}

.achievement-summary span {
  display: block;
  color: var(--steam-muted);
  font-size: 14px;
  font-weight: 800;
}

.achievement-summary strong {
  display: block;
  margin-top: 10px;
  color: #443949;
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1;
}

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

.achievement-card {
  min-height: 154px;
  padding: 20px;
  border-radius: 22px;
}

.achievement-icon {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.55));
  box-shadow: inset 0 0 0 8px rgba(232, 132, 168, 0.2), 0 10px 24px rgba(88, 72, 106, 0.12);
}

.achievement-card.blue .achievement-icon { box-shadow: inset 0 0 0 8px rgba(115, 167, 234, 0.24), 0 10px 24px rgba(88, 72, 106, 0.12); }
.achievement-card.green .achievement-icon { box-shadow: inset 0 0 0 8px rgba(130, 201, 154, 0.24), 0 10px 24px rgba(88, 72, 106, 0.12); }
.achievement-card.violet .achievement-icon { box-shadow: inset 0 0 0 8px rgba(167, 139, 250, 0.24), 0 10px 24px rgba(88, 72, 106, 0.12); }
.achievement-card.amber .achievement-icon { box-shadow: inset 0 0 0 8px rgba(237, 186, 103, 0.28), 0 10px 24px rgba(88, 72, 106, 0.12); }
.achievement-card.cyan .achievement-icon { box-shadow: inset 0 0 0 8px rgba(99, 199, 216, 0.24), 0 10px 24px rgba(88, 72, 106, 0.12); }

.achievement-card.perfect-card {
  border-color: rgba(237, 186, 103, 0.48);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 245, 218, 0.72)),
    var(--steam-paper);
}

.achievement-card h3 {
  margin-bottom: 6px;
  font-size: 18px;
}

.achievement-card p {
  margin: 0;
  color: var(--steam-muted);
}

.screenshot-card {
  display: grid;
  min-height: 190px;
  place-items: end start;
  padding: 18px;
  border-radius: 24px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(68, 57, 73, 0.14), rgba(68, 57, 73, 0.02)),
    linear-gradient(135deg, #e884a8, #73a7ea);
}

.screenshot-card:nth-child(2n) {
  background:
    linear-gradient(135deg, rgba(68, 57, 73, 0.12), rgba(68, 57, 73, 0.02)),
    linear-gradient(135deg, #82c99a, #63c7d8);
}

.screenshot-card:nth-child(3n) {
  background:
    linear-gradient(135deg, rgba(68, 57, 73, 0.12), rgba(68, 57, 73, 0.02)),
    linear-gradient(135deg, #edba67, #a78bfa);
}

.screenshot-card span {
  font-weight: 950;
  text-shadow: 0 8px 26px rgba(48, 36, 58, 0.24);
}

.library-panel {
  padding: 22px;
}

.library-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 0.58fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  margin-bottom: 18px;
}

.search-box span {
  display: block;
  margin-bottom: 8px;
  color: var(--steam-muted);
  font-size: 13px;
  font-weight: 900;
}

.search-box input {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid rgba(143, 117, 139, 0.15);
  border-radius: 16px;
  color: #443949;
  background: rgba(255, 255, 255, 0.8);
  outline: none;
}

.search-box input:focus {
  border-color: rgba(211, 111, 154, 0.45);
  box-shadow: 0 0 0 4px rgba(232, 132, 168, 0.12);
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.library-actions {
  display: grid;
  gap: 10px;
  justify-items: end;
}

.filter-pills button {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(143, 117, 139, 0.12);
  border-radius: 999px;
  color: #6f6173;
  background: rgba(255, 255, 255, 0.72);
  font-weight: 900;
  cursor: pointer;
}

.filter-pills .is-active {
  color: #fff;
  background: #d36f9a;
}

.mosaic-toggle {
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #d36f9a, #73a7ea);
  box-shadow: 0 14px 30px rgba(123, 98, 152, 0.18);
  font-weight: 950;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.mosaic-toggle:hover,
.mosaic-toggle:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(123, 98, 152, 0.24);
}

.library-mode-note {
  margin: 0 0 14px;
  color: var(--steam-muted);
  font-size: 13px;
  font-weight: 800;
}

.game-wall {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(184px, 1fr));
  grid-auto-flow: dense;
  gap: 14px;
  align-items: start;
  transition: gap 0.24s ease;
}

.library-game-card {
  position: relative;
  min-width: 0;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 14px 34px rgba(88, 72, 106, 0.1);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.library-game-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 42px rgba(88, 72, 106, 0.15);
}

.library-cover {
  position: relative;
  display: grid;
  align-items: end;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  padding: 10px;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(135deg, #e884a8, #73a7ea);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.library-cover.has-image {
  background: linear-gradient(135deg, #dbeafe, #fce7f3);
}

.game-cover img.is-hidden,
.library-cover img.is-hidden {
  display: none;
}

.library-cover::before,
.library-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.library-cover::before {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), transparent 34%),
    radial-gradient(circle at 26% 18%, rgba(255, 255, 255, 0.24), transparent 30%);
}

.library-cover::after {
  background: linear-gradient(180deg, transparent 34%, rgba(32, 24, 39, 0.68));
}

.library-cover span {
  position: relative;
  z-index: 1;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 13px;
  font-weight: 950;
  line-height: 1.12;
  text-shadow: 0 8px 24px rgba(28, 20, 34, 0.44);
}

.library-game-info {
  padding: 8px 2px 0;
  transition: opacity 0.2s ease, transform 0.2s ease, max-height 0.2s ease, padding 0.2s ease;
}

.library-game-info h3 {
  margin: 0 0 3px;
  color: #443949;
  font-size: 14px;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.library-game-info p {
  margin: 0;
  color: var(--steam-muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.library-game-card.is-perfect .library-cover {
  box-shadow:
    inset 0 0 0 2px rgba(255, 236, 171, 0.88),
    0 0 0 3px rgba(237, 186, 103, 0.18);
}

.library-game-card.is-perfect::after {
  content: "全成就";
  position: absolute;
  top: 7px;
  right: 7px;
  z-index: 3;
  padding: 4px 7px;
  border-radius: 999px;
  color: #8b6420;
  background: rgba(255, 246, 214, 0.9);
  box-shadow: 0 8px 18px rgba(116, 85, 31, 0.14);
  font-size: 11px;
  font-weight: 950;
}

.library-game-card.tone-rose .library-cover { background: linear-gradient(135deg, #e884a8, #f6bbc8); }
.library-game-card.tone-blue .library-cover { background: linear-gradient(135deg, #73a7ea, #9dd6f0); }
.library-game-card.tone-green .library-cover { background: linear-gradient(135deg, #82c99a, #bedb8f); }
.library-game-card.tone-violet .library-cover { background: linear-gradient(135deg, #a78bfa, #d8b6f4); }
.library-game-card.tone-amber .library-cover { background: linear-gradient(135deg, #edba67, #f2d884); }
.library-game-card.tone-cyan .library-cover { background: linear-gradient(135deg, #63c7d8, #9adad5); }
.library-game-card.tone-coral .library-cover { background: linear-gradient(135deg, #ee897e, #f4b18a); }
.library-game-card.tone-mint .library-cover { background: linear-gradient(135deg, #78cdb8, #b9dfc2); }
.library-game-card.tone-lilac .library-cover { background: linear-gradient(135deg, #b28ef5, #eea8ca); }
.library-game-card.tone-sun .library-cover { background: linear-gradient(135deg, #efc35e, #f09c79); }
.library-game-card.tone-slate .library-cover { background: linear-gradient(135deg, #7b8794, #b6c2d2); }
.library-game-card.tone-night .library-cover { background: linear-gradient(135deg, #5a5f9f, #8da0cb); }
.library-game-card.tone-olive .library-cover { background: linear-gradient(135deg, #8ca66f, #c2d68f); }
.library-game-card.tone-sea .library-cover { background: linear-gradient(135deg, #4fb5c6, #86d0af); }
.library-game-card.tone-pink .library-cover { background: linear-gradient(135deg, #ee91be, #f5c0d7); }
.library-game-card.tone-stone .library-cover { background: linear-gradient(135deg, #858c96, #c5b79e); }
.library-game-card.tone-orange .library-cover { background: linear-gradient(135deg, #ed9967, #f2cd84); }
.library-game-card.tone-dusk .library-cover { background: linear-gradient(135deg, #7764a8, #d48aa9); }

.library-panel.is-mosaic-mode .library-mode-note {
  color: #d36f9a;
}

.library-panel.is-mosaic-mode .game-wall {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-rows: 76px;
  grid-auto-flow: dense;
  gap: 8px;
  align-items: stretch;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.46);
  box-shadow:
    inset 0 0 0 1px rgba(143, 117, 139, 0.08),
    inset 0 18px 48px rgba(64, 56, 68, 0.07);
}

.library-panel.is-mosaic-mode .library-game-card {
  height: 100%;
  overflow: hidden;
  border-radius: 16px;
  box-shadow: none;
}

.library-panel.is-mosaic-mode .library-game-card:hover {
  transform: none;
}

.library-panel.is-mosaic-mode .library-game-card.is-perfect::after {
  display: none;
}

.library-panel.is-mosaic-mode .library-cover {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  border-radius: 16px;
}

.library-panel.is-mosaic-mode .library-cover span {
  font-size: clamp(9px, 0.78vw, 12px);
  line-height: 1.12;
  -webkit-line-clamp: 2;
}

.library-panel.is-mosaic-mode .library-game-info {
  max-height: 0;
  overflow: hidden;
  padding: 0;
  opacity: 0;
  transform: translateY(-6px);
}

.library-panel.is-mosaic-mode .size-xl { grid-column: span 4; grid-row: span 3; }
.library-panel.is-mosaic-mode .size-lg { grid-column: span 3; grid-row: span 2; }
.library-panel.is-mosaic-mode .size-md { grid-column: span 2; grid-row: span 2; }
.library-panel.is-mosaic-mode .size-sm { grid-column: span 2; grid-row: span 1; }
.library-panel.is-mosaic-mode .size-xs { grid-column: span 1; grid-row: span 1; }

.steam-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 4px 0;
  color: var(--steam-muted);
  font-size: 13px;
}

@media (max-width: 1120px) {
  .overview-hero {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .recent-grid,
  .bucket-grid,
  .achievement-grid,
  .screenshot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .library-toolbar {
    grid-template-columns: 1fr;
  }

  .library-actions {
    justify-items: start;
  }

  .game-wall {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }

  .library-panel.is-mosaic-mode .game-wall {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .steam-header {
    align-items: flex-start;
    gap: 8px;
    top: 8px;
    margin-bottom: 12px;
    padding: 8px;
    border-radius: 20px;
    flex-direction: column;
  }

  .steam-header .site-nav-wrap {
    display: grid;
    align-items: stretch;
    gap: 8px;
    overflow: visible;
  }

  .steam-header .site-nav {
    min-width: 0;
  }

  .steam-header .site-auth {
    justify-content: flex-start;
  }

  .back-link {
    min-height: 34px;
    padding: 0 12px;
    font-size: 13px;
  }

  .top-links {
    width: 100%;
    flex-wrap: nowrap;
    gap: 6px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 2px 2px;
    white-space: nowrap;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .top-links::-webkit-scrollbar {
    display: none;
  }

  .top-links a {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    min-height: 34px;
    padding: 7px 10px;
    font-size: 12px;
  }

  .steam-section {
    scroll-margin-top: 116px;
    padding: 26px 0;
  }

  .overview-hero,
  .library-panel {
    border-radius: 24px;
  }

  .overview-hero {
    min-height: 0;
    padding: 26px 20px;
  }

  h1 {
    font-size: 44px;
  }

  .profile-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .stats-grid,
  .recent-grid,
  .bucket-grid,
  .achievement-summary,
  .achievement-grid,
  .screenshot-grid {
    grid-template-columns: 1fr;
  }

  .stat-item {
    min-height: 112px;
  }

  .rank-row {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .rank-hours,
  .rank-percent {
    text-align: left;
  }

  .library-panel {
    padding: 16px;
  }

  .library-toolbar {
    gap: 10px;
    margin-bottom: 12px;
  }

  .search-box span {
    margin-bottom: 5px;
    font-size: 12px;
  }

  .search-box input {
    min-height: 40px;
    padding: 0 12px;
    border-radius: 13px;
    font-size: 13px;
  }

  .library-actions {
    width: 100%;
    gap: 8px;
    justify-items: stretch;
  }

  .filter-pills {
    flex-wrap: nowrap;
    gap: 6px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 2px;
    white-space: nowrap;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .filter-pills::-webkit-scrollbar {
    display: none;
  }

  .filter-pills button {
    flex: 0 0 auto;
    min-height: 34px;
    padding: 0 10px;
    font-size: 12px;
  }

  .mosaic-toggle {
    width: 100%;
    min-height: 40px;
    font-size: 13px;
  }

  .library-mode-note {
    margin-bottom: 10px;
    font-size: 12px;
    line-height: 1.55;
  }

  .game-wall {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .library-game-card {
    border-radius: 14px;
  }

  .library-cover {
    padding: 8px;
    border-radius: 13px;
  }

  .library-cover span {
    font-size: 11px;
  }

  .library-game-info h3 {
    font-size: 12px;
  }

  .library-game-info p {
    font-size: 11px;
  }

  .library-panel.is-mosaic-mode .game-wall {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: 58px;
    grid-auto-flow: dense;
    gap: 6px;
    padding: 6px;
    border-radius: 18px;
  }

  .library-panel.is-mosaic-mode .library-cover {
    border-radius: 12px;
    padding: 7px;
  }

  .library-panel.is-mosaic-mode .library-cover span {
    font-size: 10px;
    line-height: 1.1;
    -webkit-line-clamp: 2;
  }

  .library-panel.is-mosaic-mode .size-xl { grid-column: span 4; grid-row: span 2; }
  .library-panel.is-mosaic-mode .size-lg { grid-column: span 3; grid-row: span 2; }
  .library-panel.is-mosaic-mode .size-md { grid-column: span 2; grid-row: span 2; }
  .library-panel.is-mosaic-mode .size-sm { grid-column: span 2; grid-row: span 1; }
  .library-panel.is-mosaic-mode .size-xs { grid-column: span 1; grid-row: span 1; }

  .library-panel.is-mosaic-mode .size-xl .library-cover span,
  .library-panel.is-mosaic-mode .size-lg .library-cover span {
    font-size: 12px;
  }

  .library-panel.is-mosaic-mode .size-xs .library-cover span {
    display: none;
  }

  .steam-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .steam-life-page *,
  .steam-life-page *::before,
  .steam-life-page *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
