/* ══════════════════════════════════════════════════════════
   tower.is
   ══════════════════════════════════════════════════════════ */

:root {
  --bg: #0b1020;
  --panel: #121a2b;
  --border: rgba(255,255,255,0.07);
  --text: #f3f4f6;
  --muted: #94a3b8;
  --dim: #4b5563;
  --accent: #d4a64a;
  --radius: 14px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0 }

body {
  min-height: 100vh;
  background: var(--bg);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ── Stars ── */
.star-layer { position: fixed; inset: 0; pointer-events: none; will-change: transform }
.star { position: absolute; background: #fff; border-radius: 50% }

/* ── Animations ── */
@keyframes fade-in { from { opacity: 0; transform: translateY(8px) } to { opacity: 1; transform: translateY(0) }}
@keyframes pop { from { transform: scale(.92); opacity: 0 } to { transform: scale(1); opacity: 1 }}
@keyframes float { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-6px) }}
@keyframes win-burst { 0% { transform: scale(.8); opacity: 0 } 50% { transform: scale(1.05) } 100% { transform: scale(1); opacity: 1 }}
@keyframes selected-bounce { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-8px) }}
@keyframes shake { 0%,100% { transform: translateX(0) } 25% { transform: translateX(-6px) } 75% { transform: translateX(6px) }}
@keyframes line-fade { 0%,100% { opacity:.15 } 50% { opacity:.35 }}

/* ══════════════════════════════════════════════════════════
   LAYOUT
   ══════════════════════════════════════════════════════════ */
.site {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* ══════════════════════════════════════════════════════════
   HEADER (sticky)
   ══════════════════════════════════════════════════════════ */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  background: rgba(11,16,32,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.logo-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo-icon { width: 32px; height: 32px; flex-shrink: 0 }
.logo-text {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  font-weight: 900;
  color: var(--text);
  line-height: 1;
}
.header-nav {
  display: flex;
  gap: 4px;
}
.nav-link {
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 14px;
  border-radius: 6px;
  transition: color .2s, background .2s;
}
.nav-link:hover { color: var(--text) }
.nav-link.active {
  color: var(--accent);
  background: rgba(212,166,74,0.08);
}
.back-btn {
  font-family: inherit;
  font-size: 13px;
  color: var(--muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 14px;
  border-radius: 6px;
  transition: color .2s;
}
.back-btn:hover { color: var(--text) }

@media (max-width: 600px) {
  .header { flex-wrap: wrap; gap: 8px }
  .header-nav { width: 100%; justify-content: flex-start; gap: 2px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none }
  .header-nav::-webkit-scrollbar { display: none }
  .nav-link { font-size: 12px; padding: 5px 10px; white-space: nowrap; flex-shrink: 0 }
  .logo-text { font-size: 18px }
  .logo-icon { width: 26px; height: 26px }
  .site { padding: 0 16px }
}

/* ══════════════════════════════════════════════════════════
   LANDING
   ══════════════════════════════════════════════════════════ */
.landing { padding-top: 28px }

/* ══════════════════════════════════════════════════════════
   TOWER TOOLBAR (search + sort)
   ══════════════════════════════════════════════════════════ */
/* ── Toolbar (collapsible) ── */
.tower-toolbar { margin-bottom: 20px }
.toolbar-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 16px;
  cursor: pointer;
  transition: all .2s;
  width: 100%;
}
.toolbar-toggle:hover { border-color: rgba(42,157,143,.3); color: var(--text) }
.toolbar-toggle-icon { flex-shrink: 0 }
.toolbar-badge {
  font-size: 11px;
  color: #2A9D8F;
  margin-left: auto;
}
.toolbar-panel {
  display: none;
  flex-direction: column;
  gap: 0;
  padding: 16px;
  margin-top: 8px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  animation: fade-in .2s ease-out;
}
.toolbar-panel.open { display: flex }
.toolbar-section { padding: 12px 0 }
.toolbar-section:first-of-type { padding-top: 14px }
.toolbar-section:last-of-type { padding-bottom: 4px }
.toolbar-section-head {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--dim);
  margin-bottom: 10px;
}
.toolbar-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--dim);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}
.toolbar-divider {
  height: 1px;
  background: var(--border);
}
.tower-search {
  width: 100%;
  font-family: inherit;
  font-size: 14px;
  padding: 9px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.03);
  color: var(--text);
  outline: none;
  transition: border-color .2s;
}
.tower-search::placeholder { color: var(--dim) }
.tower-search:focus { border-color: rgba(42,157,143,.4) }

/* Include toggles */
.include-tags { display: flex; gap: 6px; flex-wrap: wrap }
.include-btn {
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  color: var(--dim);
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 5px 10px;
  cursor: pointer;
  transition: all .2s;
  position: relative;
}
.include-btn:hover { color: var(--muted); border-color: rgba(255,255,255,.12) }
.include-btn.on {
  color: var(--muted);
  border-color: rgba(42,157,143,.25);
  background: rgba(42,157,143,.06);
}
.include-btn.on::before {
  content: '\2713';
  color: #2A9D8F;
  font-size: 11px;
  margin-right: 0.3em;
}
.include-btn:not(.on) {
  opacity: .5;
  text-decoration: line-through;
}
.include-meta-btn {
  font-family: inherit;
  font-size: 11px;
  color: var(--dim);
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px 6px;
  transition: color .2s;
}
.include-meta-btn:hover { color: var(--muted) }

/* Sort buttons */
.tower-sort-wrap { display: flex; gap: 4px; flex-wrap: wrap }
.sort-btn {
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  color: var(--dim);
  background: none;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 5px 10px;
  cursor: pointer;
  transition: all .2s;
}
.sort-btn:hover { color: var(--muted) }
.sort-btn.active {
  color: var(--accent);
  border-color: rgba(212,166,74,.3);
  background: rgba(212,166,74,.08);
}
.sort-btn.active::after { content: ' \25B4'; font-size: 14px; vertical-align: -1px }
.sort-btn.active.reversed::after { content: ' \25BE'; font-size: 14px; vertical-align: -1px }
.tower-count {
  text-align: center;
  font-size: 12px;
  color: var(--dim);
  padding: 4px 0 0;
}

/* ══════════════════════════════════════════════════════════
   TOWER GRID
   ══════════════════════════════════════════════════════════ */
.tower-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 64px;
}
@media (max-width: 700px) { .tower-grid { grid-template-columns: repeat(2, 1fr); gap: 16px }}
@media (max-width: 400px) { .tower-grid { grid-template-columns: 1fr }}

/* Pagination */
.tower-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 24px 0 8px;
}
.pager-btn {
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 16px;
  cursor: pointer;
  transition: all .2s;
}
.pager-btn:hover { border-color: rgba(42,157,143,.4); color: var(--text) }
.pager-btn:disabled { opacity: .3; cursor: default; filter: none }
.pager-dot {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--dim);
  background: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all .2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pager-dot:hover { color: var(--text) }
@media (max-width: 480px) {
  .tower-pager { gap: 4px; flex-wrap: wrap }
  .pager-btn { font-size: 12px; padding: 6px 12px }
  .pager-dot { width: 28px; height: 28px; font-size: 12px }
}
.pager-dot.active {
  color: #2A9D8F;
  border-color: rgba(42,157,143,.3);
  background: rgba(42,157,143,.08);
}

.tower-card {
  text-decoration: none;
  color: inherit;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--border);
  transition: transform .2s ease, border-color .2s ease;
}
.tower-card:hover {
  transform: translateY(-3px);
  border-color: rgba(212,166,74,0.3);
}
.tower-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}
@media (max-width: 480px) { .tower-card img { height: 160px }}
.tower-info { padding: 16px 18px }
.tower-name {
  display: block;
  font-family: 'Playfair Display', serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.tower-loc {
  display: block;
  font-size: 13px;
  color: var(--dim);
}

/* ══════════════════════════════════════════════════════════
   CONTENT SECTIONS (Explore & Play)
   ══════════════════════════════════════════════════════════ */
.content-section {
  padding-bottom: 48px;
}
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 20px;
  padding-top: 8px;
}
.activity-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
@media (max-width: 700px) { .activity-grid { grid-template-columns: repeat(2, 1fr) }}
@media (max-width: 400px) { .activity-grid { grid-template-columns: 1fr }}

.activity-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 20px 18px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform .2s, border-color .2s;
  text-align: left;
  font-family: inherit;
  color: inherit;
}
.activity-card:hover {
  transform: translateY(-2px);
  border-color: rgba(212,166,74,0.3);
}
.activity-icon {
  font-size: 22px;
  color: var(--accent);
  line-height: 1;
}
.activity-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.activity-desc {
  font-size: 12px;
  color: var(--dim);
  line-height: 1.4;
}

/* ══════════════════════════════════════════════════════════
   ABOUT
   ══════════════════════════════════════════════════════════ */
.about-section { display: flex; justify-content: center }
.about-card {
  text-align: center;
  max-width: 440px;
  padding: 40px 32px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.about-logo { width: 56px; height: 56px; margin-bottom: 16px }
.about-title {
  font-family: 'Playfair Display', serif;
  font-size: 28px;
  font-weight: 900;
  color: var(--text);
  margin-bottom: 6px;
}
.about-tagline {
  font-size: 14px;
  color: #2A9D8F;
  margin-bottom: 18px;
}
.about-text {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 24px;
}
.about-stats {
  display: flex;
  justify-content: center;
  gap: 32px;
}
.about-stat { text-align: center }
.about-stat-num {
  display: block;
  font-family: 'Playfair Display', serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--accent);
}
.about-stat-label {
  font-size: 10px;
  color: var(--dim);
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 600;
}
@media (max-width: 480px) {
  .about-card { padding: 28px 20px }
  .about-title { font-size: 24px }
  .about-stats { gap: 20px }
  .about-stat-num { font-size: 24px }
}

/* ══════════════════════════════════════════════════════════
   GAME AREA
   ══════════════════════════════════════════════════════════ */
.game-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 8px 0 20px;
  animation: fade-in .3s ease-out;
}
.game-section { display: none; width: 100%; flex-direction: column; align-items: center; overflow-x: hidden }
.game-section.active { display: flex }

/* ── Shared ── */
.btn { font-family: inherit; font-weight: 600; cursor: pointer; transition: all .2s ease; border: none; outline: none }
.btn:hover { filter: brightness(1.3) }

/* ══ HANOI ══ */
.controls { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; justify-content: center }
.disk-btns { display: flex; align-items: center; gap: 5px; background: var(--panel); border-radius: 8px; padding: 5px 10px; border: 1px solid var(--border) }
.btn-disk { width: 28px; height: 28px; border-radius: 6px; font-size: 13px; border: 1px solid var(--border); background: transparent; color: var(--muted); font-family: inherit }
.btn-disk.active { border-color: var(--accent); background: rgba(212,166,74,.1); color: var(--accent) }
.btn-action { padding: 5px 14px; border-radius: 8px; font-size: 10px; letter-spacing: 1px }
.btn-reset { border: 1px solid rgba(230,57,70,.35); background: rgba(230,57,70,.08); color: #E63946 }
.btn-undo { border: 1px solid var(--border); background: transparent; color: var(--muted) }
.btn-undo:disabled { color: #333; cursor: default; filter: none }
.btn-help { width: 28px; height: 28px; border-radius: 8px; font-size: 11px; border: 1px solid rgba(212,166,74,.25); background: rgba(212,166,74,.08); color: var(--accent); display: flex; align-items: center; justify-content: center }
.info { background: var(--panel); border: 1px solid rgba(212,166,74,.2); border-radius: 12px; padding: 14px 22px; margin-bottom: 18px; max-width: 460px; font-size: 13px; line-height: 1.8; color: var(--muted) }
.info .min { display: block; margin-top: 6px; color: var(--accent); font-size: 12px }
.stats { display: flex; gap: 28px; margin-bottom: 22px }
.stat { text-align: center }
.stat-label { font-size: 10px; color: var(--dim); letter-spacing: 3px; margin-bottom: 3px; font-weight: 600 }
.stat-value { font-size: 24px; font-weight: 700; font-family: 'Playfair Display', serif }
.win { animation: win-burst .5s ease-out; background: rgba(212,166,74,.08); border: 1px solid rgba(212,166,74,.25); border-radius: 12px; padding: 12px 24px; margin-bottom: 18px; text-align: center }
.win-title { font-size: 16px; font-weight: 700; color: var(--accent); margin-bottom: 3px }
.win-sub { font-size: 13px; color: var(--muted) }
.board { display: flex; gap: clamp(20px,5vw,44px); justify-content: center; align-items: flex-end; width: 100% }
.peg { display: flex; flex-direction: column; align-items: center; cursor: pointer; flex: 1; max-width: 200px; min-width: 80px; padding: 8px 4px; transition: all .2s; border-radius: 8px; outline: none }
@media (max-width: 480px) { .peg { min-width: 90px; padding: 12px 6px }}
.peg-label { font-family: 'Playfair Display', serif; font-size: 15px; font-weight: 700; color: var(--dim); letter-spacing: 3px; margin-bottom: 10px; transition: color .2s }
.peg.selected .peg-label { color: var(--accent) }
.peg.can-drop .peg-label { color: rgba(212,166,74,.5) }
.peg-area { position: relative; width: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center }
.pole { position: absolute; bottom: 0; width: 4px; height: 100%; background: linear-gradient(to top, #333, rgba(51,51,51,.2)); border-radius: 2px 2px 0 0; transition: all .3s }
.peg.selected .pole { background: linear-gradient(to top, var(--accent), rgba(212,166,74,.2)) }
.peg.can-drop .pole { background: linear-gradient(to top, rgba(212,166,74,.4), rgba(212,166,74,.1)) }
.disks { display: flex; flex-direction: column-reverse; align-items: center; position: relative; z-index: 1; width: 100% }
.disk { height: 24px; border-radius: 6px; margin-bottom: 2px; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; color: rgba(255,255,255,.7); transition: all .15s ease }
.disk.bouncing { animation: selected-bounce .6s ease-in-out infinite; z-index: 10 }
.peg-base { width: 100%; height: 4px; background: linear-gradient(90deg, transparent, #333, transparent); border-radius: 2px; transition: all .3s }
.peg.selected .peg-base { background: linear-gradient(90deg, transparent, var(--accent), transparent) }
.peg.can-drop .peg-base { background: linear-gradient(90deg, transparent, rgba(212,166,74,.4), transparent) }
.drop-hint { margin-top: 8px; font-size: 10px; color: var(--accent); animation: float 2s ease-in-out infinite; opacity: .7 }

/* ══ QUIZ ══ */
.quiz-container { max-width: 520px; width: 100% }
.quiz-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px 24px; text-align: center; animation: pop .3s ease-out }
@media (max-width: 480px) { .quiz-card { padding: 20px 16px } }
.quiz-progress { font-size: 11px; color: var(--dim); letter-spacing: 2px; margin-bottom: 16px; font-weight: 600 }
.quiz-type-label { font-size: 10px; color: var(--dim); letter-spacing: 3px; margin-bottom: 12px; font-weight: 600 }
.quiz-clue { font-family: 'Playfair Display', serif; font-size: 22px; font-weight: 700; color: var(--accent); line-height: 1.5; margin-bottom: 8px }
.quiz-detail { font-size: 13px; color: var(--muted); margin-bottom: 24px; line-height: 1.6 }
.quiz-img-wrap { margin-bottom: 20px; border-radius: 10px; overflow: hidden; border: 1px solid var(--border) }
.quiz-img { width: 100%; height: 240px; object-fit: cover; display: block }
@media (max-width: 480px) { .quiz-img { height: 180px }}
.quiz-options { display: flex; flex-direction: column; gap: 8px }
.quiz-opt { font-family: inherit; font-size: 14px; font-weight: 500; padding: 14px 20px; border-radius: 10px; cursor: pointer; border: 1px solid var(--border); background: transparent; color: var(--muted); transition: all .2s; text-align: left }
.quiz-opt:hover:not(.answered) { border-color: rgba(212,166,74,.3); color: var(--text) }
.quiz-opt.correct { background: rgba(42,157,143,.12); border-color: rgba(42,157,143,.4); color: #2A9D8F }
.quiz-opt.wrong { background: rgba(230,57,70,.08); border-color: rgba(230,57,70,.3); color: #E63946; animation: shake .4s ease }
.quiz-opt.reveal { background: rgba(42,157,143,.06); border-color: rgba(42,157,143,.3); color: #2A9D8F }
.quiz-opt.answered { cursor: default }
.quiz-fact { margin-top: 16px; font-size: 13px; color: var(--muted); line-height: 1.7; padding: 14px 18px; background: var(--panel); border-radius: 8px; border: 1px solid var(--border); animation: fade-in .3s ease-out; text-align: left }
.quiz-next { margin-top: 20px; font-family: inherit; font-size: 13px; font-weight: 600; padding: 10px 28px; border-radius: 10px; cursor: pointer; border: 1px solid rgba(212,166,74,.3); background: rgba(212,166,74,.08); color: var(--accent); transition: all .2s }
.quiz-next:hover { background: rgba(212,166,74,.15) }
.quiz-end { text-align: center; animation: pop .4s ease-out }
.quiz-end-score { font-family: 'Playfair Display', serif; font-size: 52px; font-weight: 900; color: var(--accent); margin-bottom: 8px }
.quiz-end-label { font-size: 12px; color: var(--dim); letter-spacing: 2px; margin-bottom: 24px }
.quiz-end-msg { font-size: 15px; color: var(--muted); margin-bottom: 28px; line-height: 1.6 }

/* ══ SCALE ══ */
.scale-wrap { width: 100%; max-width: 620px }
.scale-toggles { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-bottom: 20px }
.scale-tog { font-family: inherit; font-size: 11px; padding: 6px 12px; border-radius: 6px; border: 1px solid var(--border); background: transparent; color: var(--dim); cursor: pointer; transition: all .2s; font-weight: 500 }
.scale-tog.on { border-color: rgba(212,166,74,.3); background: rgba(212,166,74,.08); color: var(--accent) }
.scale-tog:hover { color: var(--muted) }
.scale-display { display: flex; align-items: flex-end; justify-content: center; gap: 8px; min-height: 340px; padding: 20px 0 0; position: relative }
.scale-ground { position: absolute; bottom: 0; left: 0; right: 0; height: 1px; background: var(--border) }
.scale-tower { display: flex; flex-direction: column; align-items: center; transition: all .4s ease; animation: fade-in .4s ease-out }
.scale-bar { width: clamp(28px,6vw,48px); border-radius: 4px 4px 0 0; transition: all .4s ease; position: relative }
.scale-name { font-size: 9px; color: var(--dim); margin-top: 8px; text-align: center; max-width: 60px; line-height: 1.3 }
.scale-h { font-size: 9px; color: var(--dim); position: absolute; top: -16px; width: 100%; text-align: center }
.scale-human { width: 6px; background: var(--accent); border-radius: 2px 2px 0 0; position: relative; opacity: .7 }
.scale-human-label { font-size: 8px; color: var(--accent); margin-top: 6px; text-align: center }

/* ══ TIMELINE ══ */
.tl-wrap { width: 100%; overflow-x: auto; padding-bottom: 20px; -webkit-overflow-scrolling: touch }
.tl-scroll { display: flex; align-items: flex-end; min-height: 320px; padding: 20px 40px 0; position: relative }
.tl-line { position: absolute; bottom: 30px; left: 0; right: 0; height: 1px; background: var(--border) }
.tl-item { display: flex; flex-direction: column; align-items: center; min-width: 60px; padding: 0 8px; position: relative; cursor: default; transition: all .3s }
.tl-item:hover .tl-bar { filter: brightness(1.3) }
.tl-bar { width: 24px; border-radius: 3px 3px 0 0; transition: all .3s; margin-bottom: 4px }
.tl-dot { width: 8px; height: 8px; border-radius: 50%; margin-bottom: 18px; border: 2px solid; transition: all .3s }
.tl-year { font-size: 9px; color: var(--dim); position: absolute; bottom: 6px }
.tl-name { font-size: 9px; color: var(--muted); text-align: center; max-width: 70px; line-height: 1.3; margin-top: 4px; opacity: 0; transition: opacity .3s; position: absolute; top: -20px; white-space: nowrap }
.tl-item:hover .tl-name { opacity: 1 }
.tl-hint { text-align: center; font-size: 11px; color: var(--dim); margin-bottom: 12px; letter-spacing: 2px }

/* ══ BUILDER ══ */
.builder-wrap { display: flex; flex-direction: column; align-items: center; width: 100% }
#builder-canvas { border-radius: var(--radius); border: 1px solid var(--border); cursor: pointer; max-width: 100% }
.builder-msg { font-size: 14px; color: var(--accent); margin-top: 16px; text-align: center; font-weight: 600; animation: pop .3s ease-out }

/* ══ DAILY ══ */
.daily-wrap { max-width: 560px; width: 100%; animation: pop .4s ease-out }
.daily-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden }
.daily-img { width: 100%; height: 320px; object-fit: cover; display: block }
@media (max-width: 480px) { .daily-img { height: 220px }}
.daily-body { padding: 28px }
.daily-label { font-size: 11px; color: var(--accent); letter-spacing: 2px; font-weight: 600; margin-bottom: 12px; text-transform: uppercase }
.daily-name { font-family: 'Playfair Display', serif; font-size: 28px; font-weight: 700; color: var(--text); margin-bottom: 8px }
.daily-meta { font-size: 13px; color: var(--dim); margin-bottom: 18px }
.daily-clue { font-size: 15px; color: var(--muted); line-height: 1.8; margin-bottom: 14px }
.daily-fact { font-size: 13px; color: var(--dim); line-height: 1.7; padding: 14px 18px; background: rgba(255,255,255,.02); border-radius: 10px; border: 1px solid var(--border) }

/* ══ GUESS ══ */
.guess-slider-wrap { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 20px 0 }
.guess-slider { width: 100%; max-width: 400px; -webkit-appearance: none; appearance: none; height: 6px; border-radius: 3px; background: rgba(255,255,255,.08); outline: none }
.guess-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); cursor: pointer; border: 2px solid rgba(255,255,255,.15) }
.guess-slider::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--accent); cursor: pointer; border: 2px solid rgba(255,255,255,.15) }
.guess-slider-val { font-size: 28px; font-weight: 700; color: var(--accent); font-family: 'Playfair Display', serif }
.guess-result { padding: 14px 22px; border-radius: 10px; text-align: center; margin-top: 12px; animation: pop .3s ease-out }
.guess-result-num { font-family: 'Playfair Display', serif; font-size: 30px; font-weight: 900; margin-bottom: 4px }
.guess-result-detail { font-size: 12px; color: var(--muted) }
.guess-great { background: rgba(42,157,143,.1); border: 1px solid rgba(42,157,143,.25) } .guess-great .guess-result-num { color: #2A9D8F }
.guess-ok { background: rgba(212,166,74,.08); border: 1px solid rgba(212,166,74,.2) } .guess-ok .guess-result-num { color: var(--accent) }
.guess-miss { background: rgba(230,57,70,.06); border: 1px solid rgba(230,57,70,.2) } .guess-miss .guess-result-num { color: #E63946 }
.guess-bars { display: flex; align-items: flex-end; justify-content: center; gap: 20px; margin-top: 12px }
.guess-bar-item { display: flex; flex-direction: column; align-items: center }
.guess-bar { width: 40px; border-radius: 4px 4px 0 0; transition: all .4s }
.guess-bar-label { font-size: 10px; color: var(--dim); margin-top: 6px }
.guess-score { font-size: 12px; color: var(--dim); margin-top: 16px; text-align: center }

/* ══ MEMORY ══ */
.mem-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; max-width: 480px; width: 100%; margin: 0 auto }
@media (max-width: 480px) { .mem-grid { grid-template-columns: repeat(3, 1fr); gap: 6px }}
.mem-card { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 14px 10px; min-height: 90px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all .25s; text-align: center }
.mem-card:hover:not(.mem-show) { border-color: rgba(255,255,255,.12) }
.mem-show { background: rgba(255,255,255,.03) }
.mem-matched { opacity: .4; cursor: default }
.mem-card-back { font-size: 24px; color: var(--dim); font-weight: 700 }
.mem-card-name { font-size: 12px; font-weight: 600; line-height: 1.4 }
.mem-card-clue { font-size: 10px; color: var(--muted); line-height: 1.5 }

/* ══ SORT ══ */
.sort-modes { display: flex; gap: 8px; justify-content: center; margin-bottom: 12px }
.sort-hint { font-size: 11px; color: var(--dim); letter-spacing: 2px; text-align: center; margin-bottom: 16px }
.sort-list { display: flex; flex-direction: column; gap: 6px }
.sort-item { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; background: var(--panel); border-radius: 8px; border: 1px solid var(--border); transition: all .2s }
.sort-item-name { font-size: 13px; font-weight: 500; color: var(--text); flex: 1 }
.sort-item-val { font-size: 12px; color: var(--muted); margin-left: 12px }
.sort-arrows { display: flex; flex-direction: column; gap: 2px; margin-left: 12px }
.sort-arrow { font-family: inherit; font-size: 10px; width: 24px; height: 20px; border: 1px solid var(--border); background: transparent; color: var(--dim); border-radius: 4px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all .15s }
.sort-arrow:hover { border-color: rgba(212,166,74,.3); color: var(--accent) }
.sort-correct { border-color: rgba(42,157,143,.35); background: rgba(42,157,143,.06) }
.sort-wrong { border-color: rgba(230,57,70,.25); background: rgba(230,57,70,.04) }

/* ══ DEFENSE ══ */
#df-canvas { border-radius: var(--radius); border: 1px solid var(--border); cursor: crosshair; max-width: 100%; display: block; margin: 0 auto }
.df-towers-bar { display: flex; gap: 6px; justify-content: center; margin-bottom: 12px; flex-wrap: wrap }
.df-tower-btn { font-family: inherit; font-size: 11px; padding: 8px 14px; border-radius: 8px; cursor: pointer; border: 1px solid var(--border); background: transparent; color: var(--muted); transition: all .2s; display: flex; flex-direction: column; align-items: center; gap: 2px }
.df-tower-btn:hover { border-color: rgba(255,255,255,.12) }
.df-sel { background: rgba(212,166,74,.08)!important; border-color: rgba(212,166,74,.3)!important }
.df-cost { font-size: 9px; color: var(--accent) }
.df-wave-btn { border-color: rgba(212,166,74,.25); color: var(--accent) }

/* ══ CLIMB ══ */
#cl-canvas { border-radius: var(--radius); border: 1px solid var(--border); cursor: pointer; max-width: 100%; display: block; margin: 0 auto; background: linear-gradient(to top, #0b1020, #121a2b) }

/* ══ DETAIL PAGE ══ */
.detail-page { display: flex; flex-direction: column; align-items: center; width: 100%; max-width: 720px; min-height: 100vh; padding: 40px 24px; position: relative; z-index: 1; margin: 0 auto }
.detail-back { font-family: inherit; font-size: 14px; color: var(--muted); text-decoration: none; align-self: flex-start; margin-bottom: 24px; transition: color .2s }
.detail-back:hover { color: var(--text) }
.detail-hero { width: 100%; border-radius: var(--radius); overflow: hidden; margin-bottom: 32px; border: 1px solid var(--border) }
.detail-hero img { width: 100%; height: 400px; object-fit: cover; display: block }
@media (max-width: 480px) { .detail-hero img { height: 240px }}
.detail-name { font-family: 'Playfair Display', serif; font-size: 38px; font-weight: 900; margin-bottom: 8px; color: var(--text); word-break: break-word }
@media (max-width: 480px) {
  .detail-page { padding: 24px 16px }
  .detail-name { font-size: 28px }
  .detail-stat-value { font-size: 22px }
  .detail-text { font-size: 14px }
}
.detail-location { font-size: 14px; color: var(--accent); margin-bottom: 28px }
.detail-stats { display: flex; gap: 36px; margin-bottom: 32px; flex-wrap: wrap }
.detail-stat-value { font-size: 28px; font-weight: 700; color: var(--accent); font-family: 'Playfair Display', serif }
.detail-stat-label { font-size: 10px; color: var(--dim); letter-spacing: 2px; font-weight: 600; margin-top: 2px }
.detail-text { font-size: 15px; color: var(--muted); line-height: 1.9; max-width: 560px }
.detail-text p { margin-bottom: 16px }
.detail-tags { display: flex; gap: 8px; margin-top: 24px; flex-wrap: wrap }
.detail-tag { font-size: 11px; padding: 5px 12px; border-radius: 6px; border: 1px solid var(--border); color: var(--dim) }

/* ══ BATTLE ══ */
.bt-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 20px }
@media (max-width: 480px) { .bt-pair { grid-template-columns: 1fr; gap: 10px }}
.bt-card { font-family: inherit; display: flex; flex-direction: column; align-items: center; padding: 0; border-radius: 10px; border: 1px solid var(--border); background: var(--panel); cursor: pointer; transition: all .2s; overflow: hidden; color: inherit; text-align: center }
.bt-card:hover:not(:disabled) { border-color: rgba(212,166,74,.3); transform: translateY(-2px) }
.bt-card:disabled { cursor: default }
.bt-img { width: 100%; height: 140px; object-fit: cover; display: block }
@media (max-width: 480px) { .bt-img { height: 120px }}
.bt-name { font-family: 'Playfair Display', serif; font-size: 14px; font-weight: 700; color: var(--text); padding: 12px 12px 4px }
.bt-loc { font-size: 11px; color: var(--dim); padding: 0 12px 10px }
.bt-val { font-size: 13px; font-weight: 600; color: var(--accent); padding: 0 12px 12px; animation: fade-in .3s }
.bt-correct { border-color: rgba(42,157,143,.5)!important; background: rgba(42,157,143,.08) }
.bt-wrong { border-color: rgba(230,57,70,.4)!important; background: rgba(230,57,70,.05) }
.bt-result { font-size: 15px; font-weight: 600; margin-bottom: 4px; animation: pop .3s }
.bt-win { color: #2A9D8F }
.bt-lose { color: #E63946 }

/* ══ TOWER WORDLE ══ */
.twd-grid { margin-bottom: 20px }
.twd-header { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr; gap: 6px; padding: 6px 0; font-size: 10px; color: var(--dim); letter-spacing: 1px; font-weight: 600; text-transform: uppercase }
.twd-row { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr; gap: 6px; padding: 8px 0; border-bottom: 1px solid var(--border); animation: fade-in .3s }
.twd-row-correct { background: rgba(42,157,143,.06); border-radius: 6px }
.twd-cell-name { font-size: 13px; font-weight: 500; color: var(--text); display: flex; align-items: center }
.twd-cell { font-size: 16px; font-weight: 600; display: flex; align-items: center; justify-content: center; border-radius: 6px; padding: 4px; min-height: 32px }
.twd-match { background: rgba(42,157,143,.15); color: #2A9D8F }
.twd-higher { background: rgba(212,166,74,.1); color: var(--accent) }
.twd-lower { background: rgba(69,123,157,.15); color: #457B9D }
.twd-miss { background: rgba(230,57,70,.08); color: #E63946 }
.twd-input-wrap { display: flex; flex-direction: column; align-items: center; gap: 0 }
.twd-shake { animation: shake .4s ease }
@media (max-width: 480px) {
  .twd-header, .twd-row { grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr; gap: 3px }
  .twd-cell-name { font-size: 10px }
  .twd-cell { font-size: 13px; min-height: 28px; padding: 2px }
  .twd-header { font-size: 8px }
}
@media (max-width: 360px) {
  .twd-header, .twd-row { grid-template-columns: 1.2fr 1fr 1fr 1fr 1fr }
  .twd-cell-name { font-size: 9px }
}

/* ══ COLLECTIONS ══ */
.col-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; max-width: 600px; width: 100% }
@media (max-width: 480px) { .col-grid { grid-template-columns: 1fr }}
.col-card { font-family: inherit; display: flex; flex-direction: column; align-items: flex-start; padding: 22px 20px; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer; transition: all .2s; text-align: left; color: inherit }
.col-card:hover { transform: translateY(-2px); border-color: rgba(212,166,74,.3) }
.col-count { font-family: 'Playfair Display', serif; font-size: 24px; font-weight: 700; color: var(--accent); margin-bottom: 4px }
.col-title { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 4px }
.col-desc { font-size: 12px; color: var(--dim); line-height: 1.5 }
.col-detail { max-width: 600px; width: 100% }
.col-back-btn { font-family: inherit; font-size: 13px; color: var(--muted); background: none; border: none; cursor: pointer; padding: 0; margin-bottom: 20px; transition: color .2s }
.col-back-btn:hover { color: var(--text) }
.col-detail-title { font-family: 'Playfair Display', serif; font-size: 24px; font-weight: 700; color: var(--text); margin-bottom: 6px }
.col-detail-desc { font-size: 13px; color: var(--muted); margin-bottom: 24px }
.col-list { display: flex; flex-direction: column; gap: 8px }
.col-item { display: flex; align-items: center; gap: 14px; padding: 12px 16px; background: var(--panel); border: 1px solid var(--border); border-left: 3px solid; border-radius: 10px; text-decoration: none; color: inherit; transition: all .2s }
.col-item:hover { border-color: rgba(212,166,74,.3); border-left-color: inherit; transform: translateX(3px) }
.col-item-img { width: 56px; height: 42px; object-fit: cover; border-radius: 6px; flex-shrink: 0 }
.col-item-name { font-size: 14px; font-weight: 600; color: var(--text) }
.col-item-meta { font-size: 11px; color: var(--dim); margin-top: 2px }
@media (max-width: 480px) {
  .col-item { padding: 10px 12px; gap: 10px }
  .col-item-img { width: 44px; height: 34px }
  .col-item-name { font-size: 13px }
  .col-detail-title { font-size: 20px }
}

/* ══ BLOG ══ */
.blog-page {
  padding: 40px 0;
  max-width: 720px;
  margin: 0 auto;
  min-height: 80vh;
}
@media (max-width: 480px) { .blog-page { padding: 24px 0 } }
.blog-heading {
  font-family: 'Playfair Display', serif;
  font-size: 36px;
  font-weight: 900;
  color: var(--text);
  margin-bottom: 8px;
}
@media (max-width: 480px) { .blog-heading { font-size: 28px } }
.blog-intro {
  font-size: 15px;
  color: var(--muted);
  margin-bottom: 40px;
  line-height: 1.6;
}
.blog-list { display: flex; flex-direction: column; gap: 24px }
.blog-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .2s, border-color .2s;
}
.blog-card:hover { transform: translateY(-3px); border-color: rgba(212,166,74,.3) }
.blog-card-img { width: 100%; height: 280px; object-fit: cover; display: block }
@media (max-width: 480px) { .blog-card-img { height: 200px } }
.blog-card-body { padding: 24px 28px; display: flex; flex-direction: column; gap: 8px }
.blog-card-title { font-family: 'Playfair Display', serif; font-size: 22px; font-weight: 700; color: var(--text); line-height: 1.3 }
.blog-card-desc { font-size: 14px; color: var(--muted); line-height: 1.7 }
.blog-card-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px }

/* Blog post */
.blog-post {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 24px;
  min-height: 80vh;
}
@media (max-width: 480px) {
  .blog-post { padding: 24px 16px }
  .blog-card-body { padding: 18px 20px }
}
.blog-post-hero {
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 28px;
  border: 1px solid var(--border);
}
.blog-post-hero img { width: 100%; height: 360px; object-fit: cover; display: block }
@media (max-width: 480px) { .blog-post-hero img { height: 220px }}
.blog-post-date {
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 1px;
  font-weight: 600;
  margin-bottom: 10px;
}
.blog-post-title {
  font-family: 'Playfair Display', serif;
  font-size: 34px;
  font-weight: 900;
  color: var(--text);
  line-height: 1.2;
  margin-bottom: 16px;
}
@media (max-width: 480px) { .blog-post-title { font-size: 26px }}
.blog-post-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 32px }
.blog-post-content {
  font-size: 16px;
  color: var(--muted);
  line-height: 1.9;
}
.blog-post-content h2 {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin: 36px 0 14px;
}
.blog-post-content h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin: 28px 0 10px;
}
.blog-post-content p { margin-bottom: 18px }
.blog-post-content a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px }
.blog-post-content a:hover { color: var(--text) }
.blog-post-content blockquote {
  border-left: 3px solid var(--accent);
  padding: 12px 20px;
  margin: 20px 0;
  background: rgba(212,166,74,.04);
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: var(--muted);
}
.blog-post-content ul, .blog-post-content ol {
  padding-left: 24px;
  margin-bottom: 18px;
}
.blog-post-content li { margin-bottom: 6px }
.blog-post-content img {
  max-width: 100%;
  border-radius: 10px;
  margin: 20px 0;
}
.blog-post-content hr {
  border: none;
  height: 1px;
  background: var(--border);
  margin: 32px 0;
}

/* ── Footer ── */
.footer { padding: 40px 0; text-align: center }
.footer a { font-size: 12px; color: var(--dim); text-decoration: none; transition: color .2s }
.footer a:hover { color: var(--muted) }
