/* ReyaMon Showdown – Trophäen (Medaillons, Schrank, Karten). Nutzt die Variablen aus style.css (hell + dunkel). */
.tier-gold    { --tr-hi: #fff4b8; --tr-mid: #f2c230; --tr-lo: #a8740a; --tr-tint: #f2c23026; --tr-ink: #8a5f00; }
.tier-silver  { --tr-hi: #ffffff; --tr-mid: #c3cad3; --tr-lo: #6f7884; --tr-tint: #a9b2bd2e; --tr-ink: #5b6470; }
.tier-bronze  { --tr-hi: #ffd9b3; --tr-mid: #cd7f32; --tr-lo: #6e3d12; --tr-tint: #cd7f3226; --tr-ink: #8b4d17; }
.tier-special { --tr-hi: #f1e6ff; --tr-mid: #9b6cff; --tr-lo: #4a1fb0; --tr-tint: #9b6cff26; --tr-ink: #6a3cf0; }
@media (prefers-color-scheme: dark) {
  .tier-gold { --tr-ink: #f5cf55; } .tier-silver { --tr-ink: #ccd3dc; } .tier-bronze { --tr-ink: #e9a066; } .tier-special { --tr-ink: #b79bff; }
}

/* ---------- Medaillon (Bild oder Motiv) ---------- */
.tr-medallion {
  --tr-size: 64px;
  position: relative; display: inline-grid; place-items: center; flex: none; overflow: hidden;
  width: var(--tr-size); height: var(--tr-size); border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--panel) 0%, var(--tr-tint) 70%), var(--panel);
  box-shadow: inset 0 0 0 2px var(--tr-mid), inset 0 0 0 4px var(--panel), inset 0 0 0 5px color-mix(in srgb, var(--tr-mid) 45%, transparent), 0 2px 8px rgba(0,0,0,.08);
}
.tr-medallion.xs { --tr-size: 26px; box-shadow: inset 0 0 0 1.5px var(--tr-mid); }
.tr-medallion.sm { --tr-size: 40px; }
.tr-medallion.md { --tr-size: 64px; }
.tr-medallion.lg { --tr-size: 96px; }
.tr-art {
  display: block; width: 66%; height: 66%;
  background: linear-gradient(160deg, var(--tr-hi) 0%, var(--tr-mid) 42%, var(--tr-lo) 100%);
  -webkit-mask: var(--tr-mask, url(/app/img/trophies/cup.svg)) center / contain no-repeat;
  mask: var(--tr-mask, url(/app/img/trophies/cup.svg)) center / contain no-repeat;
  filter: drop-shadow(0 1px 0 rgba(0,0,0,.15));
}
.tr-art[data-art="cup"]     { --tr-mask: url(/app/img/trophies/cup.svg); }
.tr-art[data-art="medal"]   { --tr-mask: url(/app/img/trophies/medal.svg); }
.tr-art[data-art="star"]    { --tr-mask: url(/app/img/trophies/star.svg); }
.tr-art[data-art="crown"]   { --tr-mask: url(/app/img/trophies/crown.svg); }
.tr-art[data-art="shield"]  { --tr-mask: url(/app/img/trophies/shield.svg); }
.tr-art[data-art="rosette"] { --tr-mask: url(/app/img/trophies/rosette.svg); }
.tr-art[data-art="laurel"]  { --tr-mask: url(/app/img/trophies/laurel.svg); }
.tr-art[data-art="gem"]     { --tr-mask: url(/app/img/trophies/gem.svg); }
.tr-art[data-art="bolt"]    { --tr-mask: url(/app/img/trophies/bolt.svg); }
.tr-medallion.has-img { background: var(--panel); }
.tr-img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; padding: 5px; }
.tr-medallion.xs .tr-img { padding: 2px; }
.tr-medallion.has-img::after { content: ""; position: absolute; inset: 0; border-radius: 50%; box-shadow: inset 0 0 0 3px var(--tr-mid); pointer-events: none; }
/* Glanz (läuft beim Überfahren der Karte einmal durch) */
.tr-shine { position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,.65) 48%, transparent 60%); background-size: 250% 100%; background-position: 150% 0; }
.tr-card:hover .tr-shine, .tr-plaque:hover .tr-shine { animation: tr-shine 1s ease; }
@keyframes tr-shine { from { background-position: 150% 0; } to { background-position: -60% 0; } }
@media (prefers-reduced-motion: reduce) { .tr-card:hover .tr-shine, .tr-plaque:hover .tr-shine { animation: none; } }

/* ---------- Stufen-Kennzeichnung ---------- */
.tr-tier { display: inline-block; font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; white-space: nowrap;
  color: var(--tr-ink); background: var(--tr-tint); border: 1px solid color-mix(in srgb, var(--tr-mid) 55%, transparent); }

/* ---------- Karten (Definitionen) ---------- */
h2.section.tr-h { margin-top: 18px; }
.tr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; margin-top: 10px; }
.tr-card { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: start; background: var(--panel); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 14px 16px; border-top: 4px solid var(--tr-mid); }
.panel .tr-card { box-shadow: none; border: 1px solid var(--line); border-top: 4px solid var(--tr-mid); }
.tr-card.virtual { opacity: .72; border-style: dashed; border-top-style: solid; }
.tr-card.virtual .tr-medallion { filter: grayscale(.35); }
.tr-card .row-between { flex-wrap: nowrap; align-items: flex-start; }
.tr-card .tr-tier { flex: none; }
.tr-card h3 { margin: 0; font-size: 1.02rem; overflow-wrap: anywhere; }
.tr-card-body { min-width: 0; display: grid; gap: 6px; }
.tr-desc { margin: 0; color: var(--muted); font-size: .88rem; white-space: pre-wrap; }
.tr-holders { display: flex; flex-direction: column; gap: 4px; }
.tr-holder { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tr-who { color: var(--ink); }
.tr-who:hover b { text-decoration: underline; }
.tr-who .avatar.sm { width: 26px; height: 26px; }
.tr-mvp-mon { display: inline-flex; align-items: center; gap: 2px; }
.tr-sprite-xs { width: 34px; height: 34px; object-fit: contain; image-rendering: pixelated; vertical-align: middle; margin: -6px 0; }
.tr-actions { margin-top: 4px; }
.btn.small-btn { padding: 4px 10px; font-size: .85rem; }

/* ---------- Admin-Bereich ---------- */
.tr-admin-bottom { margin-top: 18px; }
.tr-tour-group { padding: 8px 0; border-bottom: 1px solid var(--line); }
.tr-tour-group:last-child { border-bottom: 0; }
.tr-mini-list { display: grid; gap: 4px; margin-top: 6px; }
.tr-mini-item { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; font-size: .88rem; }
.tr-mini-item > span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
table.data.tr-awards td { vertical-align: middle; }

/* ---------- Abzeichen neben Namen ---------- */
.tr-badge { display: inline-flex; align-items: center; gap: 2px; font-size: .72rem; font-weight: 700; color: var(--tr-ink); background: var(--tr-tint);
  border-radius: 999px; padding: 1px 6px 1px 3px; vertical-align: middle; margin-left: 4px; line-height: 1.4; }
.tr-badge:hover { text-decoration: none; filter: brightness(1.1); }
.tr-badge .tr-art, .tr-count .tr-art { width: 13px; height: 13px; }

/* ---------- Profil & Trophäenschrank ---------- */
.tr-profile-hero { position: relative; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 22px; color: #fff; overflow: hidden;
  background: linear-gradient(100deg, rgba(20,24,32,.88) 0%, rgba(20,24,32,.55) 55%, rgba(20,24,32,.15) 100%), var(--hero-bg, none) center / cover, #2a2f3a; }
.tr-profile-hero .avatar.lg { width: 96px; height: 96px; border: 3px solid rgba(255,255,255,.8); }
.tr-profile-id { min-width: 0; flex: 1; }
.tr-profile-id h1 { margin: 0; font-size: 1.8rem; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tr-profile-team { font-size: 1.05rem; opacity: .9; margin-top: 2px; }
.tr-profile-stats { display: flex; gap: 16px; margin-top: 8px; font-size: .9rem; opacity: .9; }
.tr-hero-btn { background: rgba(255,255,255,.9); color: #1d2330; }
.tr-tours { margin-top: 16px; }
.tr-tours .chip:hover { text-decoration: none; border-color: var(--accent); }
.tr-cabinet { margin-top: 16px; }
.tr-counts { display: flex; gap: 6px; flex-wrap: wrap; }
.tr-count { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; font-size: .88rem; padding: 3px 10px 3px 7px; border-radius: 999px;
  color: var(--tr-ink); background: var(--tr-tint); }
.tr-count .tr-art { width: 16px; height: 16px; }
/* Regal: Plaketten mit farbigem Sockel */
.tr-shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 22px 14px; margin-top: 14px; padding: 6px 4px 4px; }
.tr-plaque { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 14px 10px 12px;
  border-radius: 12px; background: linear-gradient(180deg, var(--tr-tint), transparent 70%), var(--panel); border: 1px solid var(--line);
  box-shadow: 0 6px 0 -3px color-mix(in srgb, var(--tr-mid) 55%, var(--line)), var(--shadow); transition: transform .15s ease; }
.tr-plaque:hover { transform: translateY(-3px); }
.tr-plaque .tr-medallion { margin-bottom: 4px; }
.tr-plaque-name { font-size: .98rem; overflow-wrap: anywhere; }
.tr-plaque-desc { font-size: .82rem; color: var(--muted); }
.tr-plaque-meta { font-size: .78rem; color: var(--muted); margin-top: auto; padding-top: 4px; }
.tr-note { font-size: .82rem; font-style: italic; color: var(--ink); }
.tr-mvp { display: inline-flex; align-items: center; gap: 4px; text-align: left; font-size: .85rem; background: var(--bg); border-radius: 8px; padding: 2px 10px 2px 2px; }
.tr-sprite { width: 48px; height: 48px; object-fit: contain; image-rendering: pixelated; }
.tr-empty { margin: 14px 0 4px; }

/* ---------- Formulare ---------- */
.tr-label { font-size: .85rem; color: var(--muted); margin-bottom: 6px; }
.tr-choices { display: flex; gap: 8px; flex-wrap: wrap; }
.tr-choice input, .tr-artopt input { position: absolute; opacity: 0; pointer-events: none; }
.tr-choice .tr-tier { font-size: .85rem; padding: 5px 14px; cursor: pointer; }
.tr-choice input:checked + .tr-tier { background: var(--tr-mid); color: #fff; text-shadow: 0 1px 1px rgba(0,0,0,.3); }
.tr-choice input:checked + .tr-tier.tier-gold, .tr-choice input:checked + .tr-tier.tier-silver { color: #1d2330; text-shadow: none; }
.tr-choice input:focus-visible + .tr-tier, .tr-artopt input:focus-visible + .tr-medallion { outline: 2px solid var(--link); outline-offset: 2px; }
.tr-artpick { display: flex; gap: 8px; flex-wrap: wrap; }
.tr-artopt { position: relative; cursor: pointer; border-radius: 50%; }
.tr-artopt .tr-medallion { opacity: .55; transition: opacity .1s, transform .1s; }
.tr-artopt:hover .tr-medallion { opacity: .85; }
.tr-artopt input:checked + .tr-medallion { opacity: 1; transform: scale(1.08); outline: 2px solid var(--tr-mid); outline-offset: 2px; }
.tr-upload-row { margin-top: 10px; }
.tr-upload-preview:empty { display: none; }
.tr-form textarea, .tr-form input { color: var(--ink); }
.tr-standings { display: flex; gap: 6px 14px; flex-wrap: wrap; padding: 8px 10px; background: var(--bg); border-radius: 8px; margin-bottom: 8px; }

@media (max-width: 640px) {
  .tr-grid { grid-template-columns: 1fr; }
  .tr-shelf { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .tr-medallion.lg { --tr-size: 76px; }
  .tr-profile-id h1 { font-size: 1.4rem; }
  .tr-awards .hide-sm { display: none; }
}
