/* DamnedX — public league tools (relic planner, pact planner, compare).
   Builds on ../styles.css tokens. */

.tl-hero { padding: clamp(110px, 14vw, 150px) 0 clamp(20px, 4vw, 36px); text-align: center; position: relative; }
.tl-main { padding-bottom: clamp(60px, 9vw, 110px); }

.tl-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.tl-tile { display: flex; flex-direction: column; gap: 10px; padding: 24px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .2s var(--ease), transform .2s var(--ease); }
.tl-tile:hover { border-color: rgba(65, 212, 226, .45); transform: translateY(-2px); }
.tl-tile h2 { font-size: 1.25rem; color: var(--gold); }
.tl-tile p { margin: 0; color: var(--ink-soft); font-size: .95rem; }
.tl-tile .link-arrow { margin-top: auto; }

.tl-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 0 20px; }
.tl-bar .spacer { flex: 1; }
.tl-chip { font: 600 .85rem var(--font-body); padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--panel); color: var(--ink-soft); cursor: pointer; }
.tl-chip.on, .tl-chip[aria-pressed="true"] { border-color: var(--teal); color: var(--teal-bright); background: rgba(65, 212, 226, .1); }
.tl-input { font: 500 .95rem var(--font-body); padding: 9px 14px; border-radius: var(--radius-sm); border: 1px solid var(--line-2); background: var(--bg-alt); color: var(--ink); min-width: 0; flex: 1 1 180px; }
.tl-count { font-family: var(--font-display); color: var(--gold); font-size: 1.1rem; }
.tl-toast { font-size: .85rem; color: var(--teal-bright); min-height: 1.2em; }

.tl-badge { display: inline-block; vertical-align: middle; margin-left: 8px; font: 700 .68rem var(--font-body); letter-spacing: 1px; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; border: 1px solid rgba(230, 196, 119, .6); color: var(--gold); background: rgba(230, 196, 119, .1); white-space: nowrap; }
.tl-badge--same { border-color: var(--line-2); color: var(--muted); background: transparent; }

/* ----- Relic planner ----- */
.tl-tier { margin: 0 0 28px; }
.tl-tier-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin-bottom: 6px; }
.tl-tier-head h2 { font-size: 1.2rem; }
.tl-tier-head span { color: var(--muted); font-size: .85rem; }
.tl-passive { color: var(--ink-soft); font-size: .92rem; margin: 0 0 12px; }
.tl-relics { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.tl-relic { text-align: left; font: inherit; color: inherit; cursor: pointer; display: grid; grid-template-columns: 48px 1fr; gap: 4px 12px; padding: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-sm); transition: border-color .2s, box-shadow .2s; }
.tl-relic:hover { border-color: var(--line-2); }
.tl-relic[aria-pressed="true"] { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset, 0 8px 24px rgba(205, 161, 77, .18); }
.tl-relic img { width: 48px; height: 48px; object-fit: contain; image-rendering: pixelated; grid-row: span 2; }
.tl-relic h3 { font-size: 1rem; color: var(--ink); }
.tl-relic p { margin: 0; font-size: .88rem; color: var(--ink-soft); grid-column: 2; }
.tl-relic .tl-was { color: var(--muted); font-size: .8rem; }

.tl-summary { position: sticky; bottom: 0; z-index: 5; margin-top: 10px; padding: 14px 16px; background: rgba(13, 17, 25, .95); backdrop-filter: blur(8px); border: 1px solid var(--line-2); border-radius: var(--radius-sm); display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.tl-summary ol { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; flex: 1 1 100%; }
.tl-summary li img { width: 30px; height: 30px; image-rendering: pixelated; }
.tl-summary li { display: flex; align-items: center; gap: 4px; padding: 2px 8px 2px 2px; border: 1px solid var(--line); border-radius: 8px; font-size: .78rem; color: var(--ink-soft); }

/* ----- Pact planner ----- */
.tl-plan { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr) 320px; }
.tl-stage { position: relative; height: min(70vh, 640px); min-height: 360px; background: radial-gradient(circle at 50% 50%, #151b28, var(--bg-alt)); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; touch-action: none; }
.tl-stage canvas { width: 100%; height: 100%; display: block; cursor: pointer; }
.tl-zoom { position: absolute; right: 10px; top: 10px; display: flex; flex-direction: column; gap: 6px; }
.tl-zoom button { width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--panel); color: var(--ink); font-size: 1.1rem; cursor: pointer; }
.tl-side { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.tl-panel { padding: 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.tl-panel h3 { font-size: 1rem; margin-bottom: 6px; }
.tl-panel p { margin: 0 0 6px; font-size: .9rem; color: var(--ink-soft); }
.tl-owned { max-height: 300px; overflow: auto; font-size: .85rem; color: var(--ink-soft); }
.tl-owned li { padding: 6px 0; border-top: 1px solid var(--line); }
.tl-owned strong { color: var(--ink); }
.tl-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .8rem; color: var(--muted); }
.tl-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; vertical-align: middle; }

/* ----- Compare ----- */
.tl-cmp { display: grid; gap: 12px; }
.tl-cmp-row { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; }
.tl-cmp-row.is-changed { border-left: 3px solid var(--gold); }
.tl-cmp-title { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.tl-cmp-title img { width: 36px; height: 36px; image-rendering: pixelated; object-fit: contain; }
.tl-cmp-title h3 { font-size: 1rem; }
.tl-cmp-cols { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.tl-cmp-cols > div { padding: 10px 12px; border-radius: 8px; background: var(--bg-alt); border: 1px solid var(--line); }
.tl-cmp-cols h4 { font: 700 .7rem var(--font-body); letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.tl-cmp-cols .ours h4 { color: var(--teal); }
.tl-cmp-cols p { margin: 0; font-size: .9rem; color: var(--ink-soft); }
.tl-group { font-family: var(--font-display); color: var(--gold); font-size: 1.1rem; margin: 18px 0 4px; }
.tl-empty { color: var(--muted); text-align: center; padding: 30px 0; }

@media (max-width: 860px) {
  .tl-plan { grid-template-columns: 1fr; }
  .tl-stage { height: 62vh; }
}
@media (max-width: 560px) {
  .tl-cmp-cols { grid-template-columns: 1fr; }
  .container.tl-main { padding-inline: 16px; }
}

.tl-was { color: var(--muted); font-size: .8rem; }

.tl-summary { position: sticky; bottom: 0; z-index: 5; margin-top: 10px; padding: 14px 16px; background: rgba(13, 17, 25, .95); backdrop-filter: blur(8px); border: 1px solid var(--line-2); border-radius: var(--radius-sm); display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.tl-summary ol { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; flex: 1 1 100%; }
.tl-summary li img { width: 30px; height: 30px; image-rendering: pixelated; }
.tl-summary li { display: flex; align-items: center; gap: 4px; padding: 2px 8px 2px 2px; border: 1px solid var(--line); border-radius: 8px; font-size: .78rem; color: var(--ink-soft); }

/* ----- Pact planner ----- */
.tl-plan { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr) 320px; }
.tl-stage { position: relative; height: min(70vh, 640px); min-height: 360px; background: radial-gradient(circle at 50% 50%, #151b28, var(--bg-alt)); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; touch-action: none; }
.tl-stage canvas { width: 100%; height: 100%; display: block; cursor: pointer; }
.tl-zoom { position: absolute; right: 10px; top: 10px; display: flex; flex-direction: column; gap: 6px; }
.tl-zoom button { width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--panel); color: var(--ink); font-size: 1.1rem; cursor: pointer; }
.tl-side { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.tl-panel { padding: 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.tl-panel h3 { font-size: 1rem; margin-bottom: 6px; }
.tl-panel p { margin: 0 0 6px; font-size: .9rem; color: var(--ink-soft); }
.tl-owned { max-height: 300px; overflow: auto; font-size: .85rem; color: var(--ink-soft); }
.tl-owned li { padding: 6px 0; border-top: 1px solid var(--line); }
.tl-owned strong { color: var(--ink); }
.tl-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .8rem; color: var(--muted); }
.tl-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; vertical-align: middle; }

/* ----- Compare ----- */
.tl-cmp { display: grid; gap: 12px; }
.tl-cmp-row { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; }
.tl-cmp-row.is-changed { border-left: 3px solid var(--gold); }
.tl-cmp-title { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.tl-cmp-title img { width: 36px; height: 36px; image-rendering: pixelated; object-fit: contain; }
.tl-cmp-title h3 { font-size: 1rem; }
.tl-cmp-cols { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.tl-cmp-cols > div { padding: 10px 12px; border-radius: 8px; background: var(--bg-alt); border: 1px solid var(--line); }
.tl-cmp-cols h4 { font: 700 .7rem var(--font-body); letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.tl-cmp-cols .ours h4 { color: var(--teal); }
.tl-cmp-cols p { margin: 0; font-size: .9rem; color: var(--ink-soft); }
.tl-group { font-family: var(--font-display); color: var(--gold); font-size: 1.1rem; margin: 18px 0 4px; }
.tl-empty { color: var(--muted); text-align: center; padding: 30px 0; }

@media (max-width: 860px) {
  .tl-plan { grid-template-columns: 1fr; }
  .tl-stage { height: 62vh; }
}
@media (max-width: 560px) {
  .tl-cmp-cols { grid-template-columns: 1fr; }
  .container.tl-main { padding-inline: 16px; }
}

.tl-was { color: var(--muted); font-size: .82rem; margin: 4px 0 8px; }

/* Sealed tier 3 relics (reveal schedule). Filler text only; nothing real to unblur. */
.tl-sealed { cursor: default; border-style: dashed; }
.tl-sealed-icon { width: 48px; height: 48px; grid-row: span 2; display: grid; place-items: center; font-size: 1.6rem; font-weight: 700; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--radius-sm); }
.tl-sealed-blur { filter: blur(5px); user-select: none; pointer-events: none; }
