/* tr187 Treasure Hunt chest tracker */
.tr{max-width:640px;margin:0 auto}.tr h1{font-size:clamp(28px,7vw,40px);margin:6px 0 12px}.tr-h1s{display:block;font-size:.5em;color:#f5c542;letter-spacing:.02em}
.tr-global{display:grid;grid-template-columns:1.6fr 1fr;gap:10px;margin:0 0 14px}.tr-global div{background:linear-gradient(135deg,#2a1d05,#141a2b);border:1px solid #5a4614;border-radius:16px;padding:12px 14px}
.tr-global b{display:block;font-size:clamp(24px,7vw,34px);color:#f5c542;line-height:1.1}.tr-global span{font-size:13px;color:#d3d9e6}
.tr-card{background:#141a2b;border:1px solid #2a3450;border-radius:18px;padding:16px;margin:0 0 14px}.tr-card h2{font-size:20px;margin:0 0 10px}
.tr-who{font-size:15px;color:#d3d9e6;margin:0 0 12px;min-height:22px}.tr-who a,.tr-small a,.tr-prof a{color:#8fb4ff}
.tr-pill{display:inline-block;background:#1f3a24;color:#8fe39b;border-radius:999px;padding:1px 9px;font-size:12px;font-weight:700}.tr-pill.bad{background:#3a1f1f;color:#ff9b9b}
.tr-plus{display:flex;flex-direction:column;align-items:center;justify-content:center;width:min(230px,62vw);height:min(230px,62vw);margin:4px auto 14px;border-radius:50%;border:0;cursor:pointer;
background:url(/img/treasure-chest.png) center/contain no-repeat,#1e1108;color:#1b1205;box-shadow:0 10px 30px rgba(245,165,36,.35),inset 0 -8px 0 rgba(0,0,0,.18);-webkit-tap-highlight-color:transparent;touch-action:manipulation;user-select:none}
.tr-plus span{font:900 clamp(56px,18vw,84px)/1 system-ui,sans-serif}.tr-plus small{font-weight:800;font-size:15px}.tr-plus:active{transform:scale(.96)}.tr-plus.pop{animation:trpop .25s}
@keyframes trpop{50%{transform:scale(1.06)}}
.tr-kinds{display:flex;gap:6px;justify-content:center;margin:0 0 12px;flex-wrap:wrap}.tr-k{flex:1;min-width:0;max-width:150px;padding:9px 6px;border-radius:12px;border:1px solid #2a3450;background:#0f1424;color:#d3d9e6;font-weight:700;font-size:14px;cursor:pointer}
.tr-k.on{background:#2b2210;border-color:#f5c542;color:#fff}
.tr-n{display:flex;gap:8px;align-items:center;margin:0 0 10px;flex-wrap:wrap}.tr-n label{font-size:14px;color:#b9c3d6;min-width:62px}.tr-n input{flex:1;min-width:80px;padding:11px 12px;border-radius:12px;border:1px solid #2a3450;background:#0d1220;color:#fff;font-size:16px}
.tr-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:11px 14px;border-radius:12px;border:0;background:#2b6cff;color:#fff;font-weight:800;font-size:15px;cursor:pointer;text-decoration:none;min-height:44px}
.tr-btn:disabled{opacity:.45}.tr-btn-g{background:#232b42}.tr-btn-y{background:#f5c542;color:#1b1205}.tr-btn-r{background:#c93a3a}
.tr-msg{min-height:20px;font-size:14px;color:#8fe39b;margin:2px 0 8px}.tr-msg.bad{color:#ff9b9b}
.tr-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:6px 0 10px}.tr-stats2{grid-template-columns:repeat(2,1fr)}.tr-stats div{background:#0f1424;border-radius:14px;padding:10px 6px;text-align:center}
.tr-stats b{display:block;font-size:clamp(22px,6.5vw,30px);line-height:1.1}.tr-stats span{font-size:12px;color:#8e99b0}
.tr-prog p{margin:6px 0 0;font-size:14px;color:#d3d9e6}.tr-bar{height:12px;background:#0f1424;border-radius:999px;overflow:hidden}.tr-bar i{display:block;height:100%;width:0;background:linear-gradient(90deg,#f5a524,#ffe08a);border-radius:999px;transition:width .3s}
.tr-break{font-size:13px;color:#8e99b0;margin:6px 0 10px}.tr-acts{display:flex;gap:8px;flex-wrap:wrap}.tr-acts .tr-btn{flex:1}
.tr-tabs{display:flex;gap:6px;overflow-x:auto;margin:0 0 8px;-webkit-overflow-scrolling:touch}.tr-tab{flex:0 0 auto;padding:8px 12px;border-radius:999px;border:1px solid #2a3450;background:#0f1424;color:#d3d9e6;font-weight:700;font-size:13px;cursor:pointer}.tr-tab.on{background:#2b6cff;border-color:#2b6cff;color:#fff}
.tr-lb{list-style:none;padding:0;margin:0 0 8px}.tr-lb li{display:flex;justify-content:space-between;gap:10px;padding:9px 10px;border-bottom:1px solid #1f2740;font-size:15px}.tr-lb li span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tr-lb li.me{background:#1b2440;border-radius:10px}
.tr-lb small{color:#8e99b0;font-weight:600}.tr-none{color:#8e99b0;justify-content:center!important}.tr-small{font-size:13px;color:#8e99b0;margin:6px 0}
.tr-sqhead{font-size:18px;margin:0 0 6px}.tr-code{font:800 15px ui-monospace,monospace;background:#0f1424;border:1px dashed #f5c542;color:#f5c542;border-radius:8px;padding:2px 8px;letter-spacing:.12em}
.tr-invite{background:#2a1d05;border:1px solid #f5c542;border-radius:14px;padding:12px;margin:0 0 14px;display:flex;flex-wrap:wrap;gap:10px;align-items:center;justify-content:space-between}
.tr-prof{display:grid;gap:8px;margin:0 0 6px}.tr-prof label{display:grid;gap:4px;font-size:14px;color:#b9c3d6}.tr-prof input{padding:11px 12px;border-radius:12px;border:1px solid #2a3450;background:#0d1220;color:#fff;font-size:16px}
.tr-ov{position:fixed;inset:0;background:rgba(5,7,12,.82);z-index:9999;display:flex;align-items:center;justify-content:center;padding:14px}.tr-ov[hidden]{display:none}
.tr-ovb{background:#141a2b;border:1px solid #2a3450;border-radius:18px;padding:16px;max-width:460px;width:100%;max-height:92vh;overflow:auto}.tr-ovb h2{margin:0 0 8px}.tr-x{width:100%;margin-top:10px}
.tr-shot{display:block;width:100%;height:auto;border-radius:14px;margin:0 0 10px}.tr-linkbox{display:block;word-break:break-all;background:#0d1220;border-radius:10px;padding:8px;font-size:13px;color:#d3d9e6}
.tr-list{padding-left:20px}.tr-list li{margin:0 0 8px}.tr-foot{text-align:center;margin:8px 0 20px}
.tr-hist{display:grid;gap:6px}.tr-hrow{display:grid;grid-template-columns:70px 1fr 34px;gap:8px;align-items:center;font-size:14px}.tr-hbar{height:12px;background:#0f1424;border-radius:999px;overflow:hidden}.tr-hbar i{display:block;height:100%;background:#f5c542}
.trh{max-width:1100px;margin:0 auto}.trh-box{background:linear-gradient(135deg,#2a1d05,#141a2b);border:1px solid #5a4614;border-radius:18px;padding:16px;display:grid;gap:10px}
.trh-top{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:10px}.trh-g b{font-size:clamp(26px,6vw,36px);color:#f5c542;display:block;line-height:1.1}.trh-g span{font-size:13px;color:#d3d9e6}
.trh ol{list-style:none;padding:0;margin:0;display:grid;gap:4px}.trh li{display:flex;justify-content:space-between;font-size:15px;padding:6px 8px;background:rgba(0,0,0,.2);border-radius:10px}
.tr-sr{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.tr-n3{flex-wrap:nowrap}.tr-n3 input{min-width:0}.tr-n3 .tr-btn{flex:0 0 auto;padding:11px 12px}
.tr-quest{flex-wrap:nowrap;margin:10px 0 4px}.tr-quest label{min-width:0;flex:0 0 auto;font-weight:700;color:#ffd36b}.tr-quest input{min-width:0;max-width:110px;text-align:center}.tr-quest .tr-qs{font-size:14px;color:#b9c3d6}.tr-quest .tr-btn{flex:0 0 auto;padding:11px 12px}.tr-qnote{margin:0 0 10px}
@media (max-width:380px){.tr-quest{flex-wrap:wrap}.tr-quest label{width:100%}.tr-quest input{max-width:none;flex:1}}

/* w78: community goal + last-chest weekend */
.tr-w78{margin:10px 0 12px;display:grid;gap:8px}
.tr-goal{background:rgba(245,165,36,.08);border:1px solid rgba(245,165,36,.35);border-radius:14px;padding:10px 12px}
.tr-goal p{margin:0 0 6px}
.tr-wknd{background:linear-gradient(90deg,#7a1010,#b8321a);color:#fff;border-radius:12px;padding:10px 12px;font-weight:700}
.tr-wknd-soon{background:rgba(255,255,255,.06);color:inherit;font-weight:600}



/* ts196: Treasure Status section */
#tr-status {
  margin: 24px auto 32px;
  max-width: 800px;
}

.ts-section {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.08), rgba(255, 165, 0, 0.06));
  border: 1px solid rgba(255, 215, 0, 0.2);
  border-radius: 12px;
  padding: 24px;
}

.ts-section h3 {
  color: #ffd700;
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ts-next {
  text-align: center;
  margin-bottom: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255, 215, 0, 0.15);
}

.ts-countdown {
  font-size: 48px;
  font-weight: 700;
  color: #ffd700;
  font-family: 'Courier New', monospace;
  margin: 16px 0 8px;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.ts-next-time {
  font-size: 16px;
  color: #aaa;
  margin-top: 8px;
}

.ts-tba {
  font-size: 18px;
  color: #888;
  font-style: italic;
  padding: 16px;
}

.ts-hours {
  margin-bottom: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255, 215, 0, 0.15);
}

.ts-hour-item {
  background: rgba(0, 0, 0, 0.3);
  border-left: 3px solid #ffd700;
  padding: 12px 16px;
  margin-bottom: 12px;
  border-radius: 4px;
}

.ts-hour-time {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 4px;
}

.ts-hour-mult {
  font-size: 14px;
  color: #ffa500;
}

.ts-odds {
  margin-bottom: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255, 215, 0, 0.15);
}

.ts-odds-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.ts-odd-item {
  background: rgba(0, 0, 0, 0.3);
  padding: 12px;
  border-radius: 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ts-odd-name {
  color: #fff;
  font-size: 14px;
}

.ts-odd-val {
  color: #ffa500;
  font-size: 14px;
  font-weight: 600;
}

.ts-note {
  font-size: 13px;
  color: #999;
  font-style: italic;
  margin-top: 12px;
}

.ts-source {
  font-size: 12px;
  color: #777;
  margin-top: 8px;
}

.ts-weeks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.ts-week {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 215, 0, 0.2);
  border-radius: 8px;
  padding: 16px;
}

.ts-week-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 215, 0, 0.1);
}

.ts-week-num {
  font-size: 14px;
  color: #ffa500;
  font-weight: 600;
}

.ts-week-theme {
  font-size: 16px;
  color: #ffd700;
  font-weight: 700;
}

.ts-prizes {
  margin-bottom: 12px;
}

.ts-prize {
  font-size: 14px;
  color: #ccc;
  padding: 4px 0;
}

.ts-week-cd {
  font-size: 13px;
  color: #999;
  margin-top: 12px;
  font-family: 'Courier New', monospace;
}

.ts-week-cd span {
  color: #ffd700;
  font-weight: 600;
}

@media (max-width: 600px) {
  .ts-countdown {
    font-size: 36px;
  }

  .ts-odds-grid {
    grid-template-columns: 1fr;
  }

  .ts-weeks {
    grid-template-columns: 1fr;
  }
}


/* ts197: Compact Treasure Status bar */
.ts-compact {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border-radius: 8px;
  margin: 16px 0;
  font-size: 14px;
  flex-wrap: wrap;
  max-width: 100%;
}

.ts-compact-icon {
  font-size: 18px;
}

.ts-compact-next {
  color: #ffd700;
  font-weight: 500;
}

.ts-compact-week {
  color: #fff;
  padding: 0 8px;
  border-left: 1px solid rgba(255,255,255,0.2);
}

.ts-compact-ends {
  color: #aaa;
  font-size: 13px;
}

.ts-compact-link {
  margin-left: auto;
  color: #4a9eff;
  text-decoration: none;
  font-weight: 500;
  white-space: nowrap;
}

.ts-compact-link:hover {
  text-decoration: underline;
}

@media (max-width: 500px) {
  .ts-compact {
    font-size: 13px;
    gap: 6px;
    padding: 10px 12px;
  }

  .ts-compact-week {
    flex-basis: 100%;
    border-left: none;
    padding: 4px 0 0 0;
  }
}


.tr-chname{background:transparent;border:0;cursor:pointer;font-size:14px;padding:2px 4px;margin-left:4px;opacity:0.6;transition:opacity 0.2s}
.tr-chname:hover{opacity:1}

/* ts198e: readable +1 over chest image */
.tr-plus,.tr-plus *{color:#fff!important;text-shadow:0 2px 0 #000,0 0 6px #000,0 0 12px rgba(0,0,0,.85)}
.tr-plus{background:url(/img/treasure-chest.png?v=3) center/contain no-repeat transparent}

/* chest transparent (Nov 9) */
.tr-plus{background-color:transparent!important;box-shadow:none!important;border-radius:0!important;filter:drop-shadow(0 8px 18px rgba(245,165,36,.35))}
