.tt-sub {
  opacity: 0.72;
  font-weight: 400;
  margin-left: 4px;
}

.tt-custom-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  margin-bottom: 12px;
  border-radius: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
}

.tt-inv {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.tt-inv-extra {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: 8px;
  margin-bottom: 0;
}

.tt-extra-wrap {
  margin-bottom: 12px;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
}

.tt-extra-sum {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
}

.tt-card {
  padding: 8px 6px;
  border-radius: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: border-color 0.14s ease, background 0.14s ease;
}

.tt-card.has-qty {
  border-color: var(--primary);
  background: rgba(232, 160, 74, 0.08);
}

.tt-card-name {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-align: center;
  line-height: 1.2;
}

.tt-card.has-qty .tt-card-name {
  color: var(--text);
}

.tt-mini {
  display: grid;
  gap: 2px;
  height: 30px;
  align-content: center;
  justify-content: center;
}

.tt-mini i {
  display: block;
  width: 9px;
  height: 9px;
  border-radius: 2px;
}

.tt-mini i.on {
  background: var(--piece-color, var(--primary));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.tt-mini i.off {
  background: transparent;
}

.tt-qty {
  display: flex;
  align-items: center;
  gap: 4px;
}

.tt-qty-btn {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
}

.tt-qty-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.tt-qty-val {
  min-width: 18px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.tt-board-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.tt-view-bar {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
}

.tt-grid {
  display: grid;
  gap: 0;
  padding: 4px;
  border-radius: 10px;
  background: #14120f;
}

.tt-coord-grid {
  display: inline-grid;
  align-items: center;
  justify-items: center;
}

.tt-coord {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  padding: 2px 4px;
  user-select: none;
}

.tt-cell {
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1.5px solid #2b2620;
  background: #201c18;
  color: #12110e;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  border-radius: 3px;
  transition: filter 0.12s ease;
}

.tt-cell.is-void {
  background: transparent;
  border-color: transparent;
  cursor: default;
}

.tt-cell.is-void.is-editable {
  border: 1px dashed rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.tt-cell.is-filled {
  border-color: #12110e;
  border-width: 2px;
  border-radius: 0;
}

.tt-cell.same-n { border-top-color: transparent; border-top-width: 0; }
.tt-cell.same-s { border-bottom-color: transparent; border-bottom-width: 0; }
.tt-cell.same-w { border-left-color: transparent; border-left-width: 0; }
.tt-cell.same-e { border-right-color: transparent; border-right-width: 0; }

.tt-cell.is-latest {
  filter: brightness(1.18);
  box-shadow: inset 0 0 0 2px #fff7e6;
  z-index: 2;
}

.tt-badge-num {
  font-size: 12px;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 4px;
  background: rgba(18, 17, 14, 0.55);
  color: #f9f6ee;
  line-height: 1.2;
}

@media (max-width: 960px) {
  .tt-inv {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .tt-inv {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .tt-cell {
    width: 34px;
    height: 34px;
  }
}
