.trophy-hall {
  --hall-gold: #f0ce91;
  --hall-matte: #bc9d67;
  --hall-ink: #ece8dd;
  --hall-muted: #abb1ba;
  --hall-edge: #433b33;
  --hall-glass: #131922;
  margin-top: 42px;
  padding-top: 24px;
  border-top: 1px solid var(--hall-edge);
  scroll-margin-top: 19px;
}

.trophy-header, .trophy-controls {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px 22px;
}

.trophy-header h2 {
  margin: 3px 0 0;
  color: var(--hall-ink);
  font: 750 clamp(2rem, 3.75vw, 3.32rem)/1.18 var(--serif);
  letter-spacing: .085em;
}

.trophy-period, .trophy-count {
  margin: 0;
  color: var(--hall-matte);
  font-size: .85rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: .08em;
}

.trophy-count { margin-bottom: 3px; white-space: nowrap; }

.trophy-controls { align-items: center; margin: 19px 0 12px; }
.trophy-categories { display: flex; flex-wrap: wrap; gap: 5px; }

.trophy-categories button, .trophy-year-control select {
  min-height: 37px;
  padding: 5px 12px;
  border: 1px solid var(--hall-edge);
  border-radius: 4px;
  background: #11161e;
  color: var(--hall-muted);
  font-size: .86rem;
  white-space: nowrap;
}

.trophy-categories button:hover, .trophy-year-control select:hover { border-color: var(--hall-matte); color: var(--hall-ink); }

.trophy-categories [aria-pressed="true"] {
  border-color: #8e7043;
  background: #332817;
  color: var(--hall-gold);
}

.trophy-year-control { display: flex; align-items: center; gap: 8px; max-width: 100%; color: var(--hall-muted); font-size: .86rem; }
.trophy-year-control label { white-space: nowrap; }
.trophy-year-control select { min-width: 0; padding-right: 22px; }

.trophy-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.trophy-grid--three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.trophy-card { display: flex; min-width: 0; }
.trophy-card--featured { grid-column: span 2; }

.trophy-entry {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  align-content: center;
  align-items: start;
  gap: 13px;
  width: 100%;
  min-height: 165px;
  padding: 18px 15px;
  border: 1px solid var(--hall-edge);
  border-radius: 5px;
  background:
    radial-gradient(ellipse at 0% -9%, #9a6f3029, #9a6f3000 57%),
    linear-gradient(132deg, #1b2028, var(--hall-glass) 55%, #10161c);
  color: var(--hall-ink);
  text-align: start;
  transition: border-color .18s ease, background-color .18s ease, box-shadow .18s ease;
}

.trophy-entry:hover, .trophy-entry:focus-visible {
  border-color: var(--hall-matte);
  box-shadow: inset 0 0 25px #d6a76d13;
}

.trophy-card--featured .trophy-entry {
  grid-template-columns: clamp(126px, 13vw, 172px) minmax(0, 1fr);
  align-items: center;
  gap: clamp(16px, 2vw, 27px);
  min-height: 219px;
  padding: 20px clamp(15px, 2.6vw, 35px);
  border-color: #756043;
  background:
    radial-gradient(ellipse at 13% 22%, #bd894035, #bd894000 66%),
    linear-gradient(120deg, #25262c, #191e27 51%, #151b23);
}

.trophy-emblem {
  display: block;
  aspect-ratio: 1;
  width: 100%;
  background-image: url("assets/achievement-medals.jpg");
  background-repeat: no-repeat;
  background-size: 300% 200%;
  mask-image: radial-gradient(circle closest-side at 50% 48.5%, #000 88%, transparent 100%);
  mix-blend-mode: screen;
}

.trophy-emblem--study { background-position: 0 0; }
.trophy-emblem--make { background-position: 50% 0; }
.trophy-emblem--travel { background-position: 100% 0; }
.trophy-emblem--art { background-position: 0 100%; }
.trophy-emblem--life { background-position: 50% 100%; }

.trophy-card-copy { display: grid; gap: 6px; min-width: 0; }
.trophy-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 3px 8px; color: var(--hall-matte); font-size: .79rem; }
.trophy-rank { color: var(--hall-gold); white-space: nowrap; }
.trophy-category { padding-inline-start: 8px; border-inline-start: 1px solid var(--hall-edge); }
.trophy-title { display: block; color: var(--hall-ink); font: 700 clamp(1.11rem, 1.9vw, 1.37rem)/1.37 var(--serif); }
.trophy-card--featured .trophy-title { font-size: clamp(1.54rem, 2.85vw, 2.54rem); }
.trophy-summary { display: block; color: #c5c7cb; font-size: .91rem; line-height: 1.6; }
.trophy-card-stamp { display: flex; flex-wrap: wrap; gap: 4px 11px; margin-top: 4px; color: var(--hall-muted); font-size: .78rem; }
.trophy-date { font-variant-numeric: tabular-nums; }
.trophy-place { color: #a7c2cf; }
.trophy-empty { margin: 14px 0 0; padding: 18px; border: 1px solid var(--hall-edge); color: var(--hall-muted); }

.trophy-preview {
  position: fixed;
  z-index: 80;
  padding: 16px 18px;
  border: 1px solid #846e4b;
  border-radius: 5px;
  background: #151a20;
  box-shadow: 0 13px 50px #050508a6;
  color: var(--hall-ink);
  pointer-events: none;
}

.trophy-preview-label { margin: 0 0 6px; color: var(--hall-gold); font-size: .79rem; }
.trophy-preview strong { font: 700 1.09rem/1.4 var(--serif); }
.trophy-preview-text { margin: 7px 0 0; color: #ccd0d5; font-size: .9rem; line-height: 1.65; }

.trophy-dialog {
  width: min(720px, 100% - 30px);
  max-height: min(87vh, 820px);
  max-height: min(87dvh, 820px);
  padding: 0;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid #806b46;
  border-radius: 6px;
  background: radial-gradient(ellipse at 10% 1%, #33291d, #151a23 49%, #10151d);
  box-shadow: 0 18px 68px #050508a6;
  color: var(--hall-ink);
}

.trophy-dialog::backdrop { background: #070b13c9; backdrop-filter: blur(5px); }
.trophy-reader { position: relative; padding: clamp(17px, 4.2vw, 38px); }
.trophy-close, .trophy-locate {
  min-height: 37px;
  padding: 5px 11px;
  border: 1px solid #806b46;
  border-radius: 4px;
  background: #1e2025;
  color: var(--hall-gold);
  font-size: .86rem;
}
.trophy-close { position: absolute; top: 16px; right: 16px; }
.trophy-close:hover, .trophy-locate:hover { border-color: var(--hall-gold); background: #383022; }
.trophy-reader-head {
  display: grid;
  grid-template-columns: clamp(114px, 15vw, 184px) minmax(0, 1fr);
  align-items: center;
  gap: clamp(10px, 2.5vw, 20px);
  padding-inline-end: 55px;
}
.trophy-reader-title { margin: 4px 0 0; color: var(--hall-ink); font: 750 clamp(1.45rem, 3.8vw, 2.3rem)/1.35 var(--serif); }
.trophy-reader-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin: 15px 0;
  padding-block: 10px;
  border-block: 1px solid var(--hall-edge);
  color: var(--hall-muted);
  font-size: .87rem;
}
.trophy-prose { color: #d5d8dc; font-size: 1rem; line-height: 1.84; }
.trophy-prose p { margin: 0 0 12px; }
.trophy-prose .trophy-lead { color: var(--hall-ink); }
.trophy-reader-footer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 16px;
  padding-top: 13px;
  border-top: 1px solid var(--hall-edge);
}
.trophy-reader-footer small, .trophy-reader-trip { color: var(--hall-muted); font-size: .83rem; }
.trophy-reader-trip { margin-left: auto; }

@media (max-width: 1000px) {
  .trophy-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 670px) {
  .trophy-hall { margin-top: 28px; padding-top: 19px; }
  .trophy-header h2 { font-size: clamp(1.8rem, 7.9vw, 2.6rem); }
  .trophy-controls { display: grid; justify-content: start; gap: 8px; margin-top: 14px; }
  .trophy-year-control { grid-row: 1; }
  .trophy-categories button { min-height: 40px; padding-inline: 8px; }
  .trophy-grid { grid-template-columns: minmax(0, 1fr); gap: 7px; }
  .trophy-card--featured { grid-column: auto; }
  .trophy-card--featured .trophy-entry { grid-template-columns: clamp(95px, 31vw, 145px) minmax(0, 1fr); min-height: 176px; }
  .trophy-entry { min-height: 137px; }
}

@media (max-width: 490px) {
  .trophy-reader-head { grid-template-columns: clamp(103px, 34vw, 149px) minmax(0, 1fr); padding-top: 35px; padding-inline-end: 0; }
}

@media (max-width: 380px) {
  .trophy-header { gap: 7px; }
  .trophy-dialog { width: calc(100% - 24px); }
}

@media (prefers-reduced-motion: reduce) {
  .trophy-entry { transition: none; }
}
