/* Weapon TTK guide */
.ttk { font-size: 14px; }
.ttk h2 { font-size: 19px; margin: 30px 0 4px; }
.ttk h2:first-child { margin-top: 0; }
.ttk .sub { color: var(--dim); margin: 0 0 12px; font-size: 13.5px; }
.ttk [data-r="2"] { color: var(--r2); } .ttk [data-r="4"] { color: var(--r4); } .ttk [data-r="5"] { color: var(--r5); } .ttk [data-r="6"] { color: var(--r6); }

.tctl { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 16px 26px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; position: sticky; top: 64px; z-index: 20; box-shadow: 0 10px 30px #0008; }
.tctl label { display: block; color: var(--dim); font-size: 12px; font-weight: 600; margin-bottom: 6px; }
.tctl output { color: var(--accent); font-weight: 800; font-size: 17px; margin-left: 6px; }
.tctl input[type=range] { width: 100%; accent-color: var(--accent); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chips button { background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; cursor: pointer; color: var(--dim); font-weight: 600; font-size: 12.5px; }
.chips button.on { border-color: var(--accent); color: var(--accent); background: #3a2f12; }
#ttkArmor button { display: flex; flex-direction: column; align-items: center; gap: 1px; min-width: 66px; padding: 5px 6px; }
#ttkArmor img, #ttkArmor .noarm { width: 30px; height: 30px; object-fit: contain; }
#ttkArmor .noarm { border: 2px dashed var(--line); border-radius: 50%; display: block; }
#ttkArmor small { font-weight: 400; font-size: 10.5px; color: var(--dim); }

.thead2 { display: flex; align-items: center; gap: 12px; background: linear-gradient(90deg, #3a2f12, transparent); border: 1px solid var(--accent); border-radius: 12px; padding: 10px 14px; margin: 16px 0 12px; }
.thead2 img { width: 74px; height: 46px; object-fit: contain; }
.thead2 div { flex: 1; } .thead2 span { color: var(--dim); font-size: 12.5px; display: block; } .thead2 b { font-size: 19px; }
.thead2 strong { font-size: 26px; color: var(--accent); font-variant-numeric: tabular-nums; }

.racebar { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.racebar #ttkClock { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; min-width: 74px; }
.racebar small { color: var(--dim); margin-left: auto; }
.lane { display: grid; grid-template-columns: 26px 54px 132px minmax(0, 1fr) 92px; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 8px; cursor: pointer; }
.lane:hover { background: var(--panel); }
.lane.pinned { background: #1f2430; outline: 1px solid var(--line); }
.lane.extra { display: none; } .raceall .lane.extra { display: grid; }
.lane img { width: 54px; height: 32px; object-fit: contain; }
.lane > b { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track { position: relative; height: 20px; background: var(--panel2); border-radius: 5px; overflow: hidden; }
.track .bar { position: absolute; inset: 0 auto 0 0; background: #3b4254; border-radius: 5px; }
.track .bar.over { background: repeating-linear-gradient(90deg, #3b4254 0 14px, #2c3140 14px 20px); }
.track .bar em { position: absolute; inset: 0 auto 0 0; width: 100%; background: linear-gradient(90deg, #d99a12, var(--accent)); border-radius: 5px; }
.lane.done .bar em { background: linear-gradient(90deg, #2c9c56, var(--good)); }
.track .shot { position: absolute; top: 3px; bottom: 3px; width: 2px; margin-left: -1px; background: #0c0d11aa; border-radius: 1px; }
.track .rel { position: absolute; top: 0; bottom: 0; background: repeating-linear-gradient(45deg, #0007 0 4px, transparent 4px 8px); }
.lane .time { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.lane .time small { display: block; font-weight: 400; color: var(--dim); font-size: 11px; }
.lane.done .time { color: var(--good); }
.tierb { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; font-weight: 800; font-size: 12px; color: #12141a; }
.tS { background: #f87171; } .tA { background: #fbbf24; } .tB { background: #4ade80; } .tC { background: #60a5fa; } .tD { background: #6b7385; }
#ttkMore { margin-top: 8px; }

#ttkStrip { display: flex; height: 54px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
#ttkStrip div { min-width: 0; padding: 6px 8px; overflow: hidden; color: #0c0d11; border-right: 1px solid #0c0d1155; }
#ttkStrip b { display: block; font-size: 13px; white-space: nowrap; } #ttkStrip small { font-size: 11px; white-space: nowrap; opacity: .8; }
#ttkChart { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; margin-top: 10px; padding: 6px; }
#ttkChart svg { width: 100%; height: auto; display: block; }
#ttkChart text { fill: var(--dim); font-size: 11px; }
#ttkChart .g { stroke: var(--line); stroke-width: 1; }
#ttkChart .now { stroke: var(--text); stroke-width: 1; stroke-dasharray: 4 4; opacity: .6; }
#ttkChart path { fill: none; stroke-width: 2.5; stroke-linejoin: round; }
#ttkLegend { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; align-items: center; }
#ttkLegend button { background: var(--panel); border: 1px solid var(--line); border-radius: 99px; padding: 4px 10px; cursor: pointer; font-size: 12.5px; }
#ttkLegend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; }
.dim { color: var(--dim); font-size: 12.5px; }

.duelpick { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.duelpick select { flex: 1; min-width: 150px; }
#duelRing { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 12px; align-items: center; }
.fighter { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px; text-align: center; transition: border-color .2s; }
.fighter img { width: 120px; height: 62px; object-fit: contain; display: block; margin: 0 auto 2px; }
.fighter > b { font-size: 16px; }
.fighter.won { border-color: var(--good); box-shadow: 0 0 0 2px #4ade8033; }
.hpbar { display: flex; height: 14px; border-radius: 7px; overflow: hidden; background: #3a1616; margin: 8px 0; position: relative; }
.hpbar .hp { background: var(--good); order: 1; transition: width .06s linear; }
.hpbar .ap { position: absolute; inset: 0 auto 0 0; height: 5px; background: #60a5fa; z-index: 1; transition: width .06s linear; }
.fstats { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 8px; color: var(--dim); font-size: 12.5px; }
.vs { font-weight: 800; color: var(--dim); }
#duelOut { margin-top: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }

.cashrow { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
.cashrow input { width: 160px; font-size: 16px; font-weight: 700; }
#ttkPick { display: flex; align-items: center; gap: 12px; background: var(--panel); border: 1px solid var(--good); border-radius: 12px; padding: 10px 14px; }
#ttkPick img { width: 84px; height: 50px; object-fit: contain; }
#ttkPick div { flex: 1; } #ttkPick span, #ttkPick small { display: block; color: var(--dim); font-size: 12.5px; } #ttkPick b { font-size: 18px; }
#ttkPick strong { font-size: 24px; color: var(--good); }
#ttkLadder { display: grid; gap: 4px; margin-top: 10px; }
.rung { display: grid; grid-template-columns: 84px 50px minmax(0, 150px) 70px minmax(0, 1fr); gap: 8px; align-items: center; padding: 5px 8px; border-radius: 8px; opacity: .45; }
.rung.ok { opacity: 1; } .rung.pick { background: #15281c; outline: 1px solid var(--good); }
.rung img { width: 50px; height: 28px; object-fit: contain; }
.rung .price { font-weight: 700; text-align: right; } .rung .time { font-weight: 700; font-variant-numeric: tabular-nums; }
.rung small { color: var(--dim); }

.ttable { overflow-x: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.ttable table { border-collapse: collapse; width: 100%; font-size: 13px; }
.ttable th, .ttable td { padding: 6px 10px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.ttable th { color: var(--dim); font-size: 12px; cursor: pointer; user-select: none; }
.ttable th.on { color: var(--accent); }
.ttable .n { text-align: right; font-variant-numeric: tabular-nums; }
.ttable td a { color: var(--text); text-decoration: none; display: flex; align-items: center; gap: 8px; font-weight: 600; }
.ttable td img { width: 44px; height: 24px; object-fit: contain; }
.ttable .tierb { width: 18px; height: 18px; font-size: 10.5px; }
#ttkShare { margin-top: 14px; }

/* Weapon pages */
.wgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; margin: 16px 0; }
.wcard { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px; text-decoration: none; color: var(--text); text-align: center; }
.wcard:hover { border-color: var(--accent); }
.wcard img { width: 130px; height: 70px; object-fit: contain; }
.wcard b { display: block; font-size: 15px; } .wcard span { color: var(--dim); font-size: 12.5px; display: block; }
.whero { display: flex; gap: 20px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px 20px; margin: 14px 0 6px; flex-wrap: wrap; }
.whero img { width: 220px; height: 120px; object-fit: contain; }
.whero dl { display: grid; grid-template-columns: repeat(4, auto); gap: 4px 26px; margin: 0; }
.whero dt { color: var(--dim); font-size: 12px; } .whero dd { margin: 0; font-size: 19px; font-weight: 800; }
.fall { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 6px; max-width: 820px; }
.fall svg { width: 100%; height: auto; display: block; } .fall text { fill: var(--dim); font-size: 11px; } .fall .g { stroke: var(--line); } .fall path { fill: none; stroke-width: 2.5; }

@media (max-width: 760px) {
  .tctl { grid-template-columns: 1fr; position: static; }
  .lane { grid-template-columns: 22px 40px 86px minmax(0, 1fr) 70px; gap: 5px; }
  .lane img { width: 40px; } .lane > b { font-size: 12px; }
  #duelRing { grid-template-columns: 1fr; } .vs { text-align: center; }
  .rung { grid-template-columns: 70px 40px minmax(0, 1fr) 60px; } .rung small { display: none; }
  .whero dl { grid-template-columns: repeat(2, auto); }
}
