.tt-header {
  background: rgba(6, 11, 24, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(246, 240, 221, 0.08);
  position: sticky;
  top: 0;
  z-index: 20;
}

.tt-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
}

.tt-back {
  font-size: 0.85rem;
  color: var(--blue-300);
}

.tt-back:hover {
  color: var(--gold-400);
}

.brand-mark-sm {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  margin-right: 0.5rem;
}

.brand-name-sm {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
}

.tt-main {
  padding: 3rem 0 5rem;
}

.tt-intro {
  max-width: 60ch;
  margin-bottom: 2.6rem;
}

.tt-intro h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  margin: 0.7rem 0 1rem;
}

.tt-intro p {
  color: var(--cream-200);
}

.tt-layout {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 2rem;
  align-items: start;
}

.tt-panel {
  padding: 2rem;
}

.tt-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.8rem;
  margin: 0.8rem 0 2rem;
}

.tt-product-card {
  border: 1px solid rgba(246, 240, 221, 0.14);
  border-radius: var(--radius-sm);
  padding: 0.9rem;
  cursor: pointer;
  background: rgba(6, 11, 24, 0.4);
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.tt-product-card:hover {
  transform: translateY(-2px);
}

.tt-product-card.is-selected {
  border-color: var(--gold-400);
  box-shadow: 0 0 0 2px rgba(255, 202, 44, 0.2);
}

.tt-product-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 0.3rem;
}

.tt-product-price {
  font-family: var(--font-mono);
  color: var(--gold-400);
  font-size: 0.85rem;
}

.proposition-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin: 0.9rem 0 1.4rem;
  font-family: var(--font-mono);
}

.prop-chip {
  background: var(--navy-700);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.9rem;
  font-size: 1rem;
  min-width: 2.4rem;
  text-align: center;
}

.prop-op {
  color: var(--gold-400);
  font-weight: 600;
  letter-spacing: 0.04em;
}

.truth-table-full {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  text-align: center;
  margin-bottom: 1.6rem;
}

.truth-table-full th,
.truth-table-full td {
  border: 1px solid rgba(246, 240, 221, 0.1);
  padding: 0.55rem;
  font-size: 0.88rem;
}

.truth-table-full th {
  color: var(--gold-400);
}

.truth-table-full tr.is-target {
  background: rgba(255, 202, 44, 0.1);
}

.truth-table-full .missing-cell {
  color: var(--blue-300);
  font-weight: 700;
}

.predict-buttons {
  display: flex;
  gap: 0.9rem;
  margin: 0.8rem 0 1.6rem;
}

.predict-btn {
  flex: 1;
  padding: 0.95rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(246, 240, 221, 0.18);
  background: rgba(6, 11, 24, 0.4);
  color: var(--cream-100);
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: all 0.15s ease;
}

.predict-btn.is-selected {
  background: var(--grad-aurora);
  color: var(--navy-950);
  border-color: transparent;
}

.tt-result {
  margin-top: 1.6rem;
  min-height: 1px;
}

.result-banner {
  padding: 1.4rem;
  border-radius: var(--radius-md);
  text-align: center;
  animation: result-pop 0.3s ease;
}

@keyframes result-pop {
  from { transform: scale(0.94); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.result-banner.win {
  background: linear-gradient(120deg, rgba(255, 202, 44, 0.22), rgba(63, 182, 201, 0.18));
  border: 1px solid rgba(255, 202, 44, 0.5);
}

.result-banner.lose {
  background: rgba(226, 84, 58, 0.12);
  border: 1px solid rgba(226, 84, 58, 0.35);
}

.result-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.result-detail {
  font-size: 0.9rem;
  color: var(--cream-200);
}

.tt-history {
  padding: 1.8rem;
  position: sticky;
  top: 5.5rem;
}

.tt-history h3 {
  font-family: var(--font-display);
  margin: 0.4rem 0 1.2rem;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  max-height: 320px;
  overflow-y: auto;
  margin-bottom: 1.2rem;
}

.history-entry {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius-sm);
  background: rgba(6, 11, 24, 0.4);
  font-size: 0.8rem;
  font-family: var(--font-mono);
}

.history-entry.win {
  border-left: 3px solid var(--gold-400);
}

.history-entry.lose {
  border-left: 3px solid rgba(246, 240, 221, 0.2);
}

.empty-hint {
  color: var(--cream-200);
  font-size: 0.85rem;
}

.tt-stats {
  display: flex;
  gap: 0.8rem;
  border-top: 1px solid rgba(246, 240, 221, 0.1);
  padding-top: 1.2rem;
}

.tt-stat {
  flex: 1;
  text-align: center;
}

.tt-stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--gold-400);
}

.tt-stat span {
  font-size: 0.7rem;
  color: var(--cream-200);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

@media (max-width: 900px) {
  .tt-layout {
    grid-template-columns: 1fr;
  }
  .tt-history {
    position: static;
  }
}
