#panel-texture.panel[hidden] { display: none !important; }
#panel-texture.panel:not([hidden]),
#panel-texture.panel.active {
  display: flex !important;
  flex-direction: column;
  height: calc(100dvh - 4.75rem);
  min-height: 36rem;
  overflow: hidden;
  padding: 0;
  margin: 0;
  background: #0b1014;
  color: #e8efe8;
}
body.tx-tab-active .site-footer { display: none; }

.tx-shell {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.tx-hud {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.75rem;
  align-items: center;
  padding: 0.4rem 0.7rem;
  background: #12181e;
  border-bottom: 1px solid #c9a227;
  font-family: Bahnschrift, "Trebuchet MS", sans-serif;
  font-size: 0.82rem;
}
.tx-title {
  color: #c9a227;
  letter-spacing: 0.16em;
  font-weight: 800;
}
.tx-hint {
  margin: 0;
  color: #b8c4bc;
  font-size: 0.78rem;
  max-width: 28rem;
}
.tx-status {
  margin-left: auto;
  color: #e8d5a3;
  font-size: 0.78rem;
}
.tx-slots { display: flex; gap: 0.35rem; }
.tx-slot {
  width: 4.4rem;
  height: 4.4rem;
  padding: 0;
  border: 2px solid #4a5560;
  background: #0e141a;
  color: #e8d5a3;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.tx-slot.active { border-color: #c9a227; }
.tx-slot img {
  display: none;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.tx-slot img[src] { display: block; }
.tx-slot-key {
  position: absolute;
  left: 0.15rem;
  top: 0.05rem;
  font-size: 0.72rem;
  font-weight: 800;
  text-shadow: 0 1px 2px #000;
}
.tx-slot-num {
  position: absolute;
  right: 0.15rem;
  bottom: 0.05rem;
  font-size: 0.58rem;
  color: #f3e6c4;
  text-shadow: 0 1px 2px #000;
}
.tx-hud label {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  color: #b8c4bc;
  font-size: 0.76rem;
}
.tx-hud input[type="range"] { width: 7rem; }
.tx-body {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18rem;
}
.tx-stage { min-height: 0; position: relative; background: #12161c; }
#tx-canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
}
#tx-canvas:active { cursor: grabbing; }
.tx-side {
  border-left: 1px solid #2a333c;
  background: #10161c;
  overflow: auto;
  padding: 0.55rem 0.6rem 0.9rem;
}
.tx-side h3 {
  margin: 0.45rem 0 0.3rem;
  color: #c9a227;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.tx-side h3:first-child { margin-top: 0; }
#tx-seam {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  background: #0a0e12;
  border: 1px solid #2a333c;
  image-rendering: pixelated;
}
.tx-seam-cap {
  margin: 0.25rem 0 0.55rem;
  font-size: 0.68rem;
  color: #8a9690;
}
.tx-equip,
.tx-tray {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.28rem;
}
.tx-equip { grid-template-columns: repeat(3, 1fr); margin-bottom: 0.5rem; }
.tx-spell {
  aspect-ratio: 1;
  padding: 0;
  border: 1px solid #3a4550;
  background: #0c1218;
  cursor: pointer;
  overflow: hidden;
  color: #889;
  font-size: 0.62rem;
}
.tx-spell.selected { border-color: #e8d5a3; outline: 1px solid #e8d5a3; }
.tx-spell img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.tx-pager {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0.35rem 0;
  font-size: 0.74rem;
  color: #b8c4bc;
}
.tx-help {
  margin: 0.6rem 0 0;
  font-size: 0.72rem;
  line-height: 1.4;
  color: #9aa8a0;
}
