


body { padding-left: 0 !important; display: flex !important; flex-direction: column; min-height: 100vh; }

.tp-wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: var(--sp-6) var(--sp-5) var(--sp-8); flex: 1; }
.tp-crumb { font-size: var(--fs-sm); color: var(--text-3); margin-bottom: var(--sp-5); }
.tp-crumb a { color: var(--blue-bright); text-decoration: none; }
.tp-crumb a:hover { text-decoration: underline; text-underline-offset: 2px; }
.tp-title { font-size: 34px; line-height: 1.12; font-weight: 700; color: var(--text-1); margin-bottom: var(--sp-3);
  letter-spacing: -0.5px; text-wrap: balance; }
.tp-text { font-size: var(--fs-lg); line-height: var(--lh-prose); color: var(--text-2); }
.tp-text + .tp-text { margin-top: var(--sp-2); }
.tp-lead { color: var(--text-1); }


.tp-head { display: flex; align-items: flex-start; gap: var(--sp-6); }
.tp-intro { flex: 1 1 0; min-width: 0; }
.tp-action { flex: none; width: 200px; text-align: center; }
.tp-action .btn { display: block; }
.tp-online { margin-top: var(--sp-2); font-size: var(--fs-sm); line-height: var(--lh-prose); color: var(--text-3); text-wrap: balance; }


.tp-example { margin-top: var(--sp-5); }
.tp-views { display: flex; gap: var(--sp-3); max-width: calc(var(--ar-sum, 3) * 560px + 2 * var(--sp-3)); }
.tp-view { flex: var(--ar, 1) 1 0; min-width: 0; }
.tp-view figcaption { margin-top: var(--sp-2); font-size: var(--fs-xs); color: var(--text-3); text-align: center; }
.tp-frame { position: relative; overflow: hidden; border-radius: 12px; background: var(--bg-stage);
  touch-action: pan-y pinch-zoom; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; }
.tp-frame img { display: block; width: 100%; height: auto; }
.tp-frame canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none;
  opacity: 0; transition: opacity var(--dur-2) var(--ease-out); }
.tp-example.is-lit .tp-frame canvas { opacity: 1; }
.tp-example.is-live .tp-frame { cursor: crosshair; }


.tp-views.is-empty .tp-frame { aspect-ratio: 1; background: var(--bg); }

.tp-found { margin-top: var(--sp-7); }
.tp-found-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); margin-bottom: var(--sp-3); }
.tp-found h2 { font-size: var(--fs-lg); font-weight: 600; color: var(--text-1); }
.tp-codes { flex: none; }
.tp-codes[hidden] { display: none; }
.tp-code { display: none; }
.tp-found.show-codes .tp-code { display: inline; }

.tp-list { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 2px var(--sp-3);
  margin-inline: calc(var(--sp-2) * -1); }
.tp-item { display: flex; align-items: center; gap: var(--sp-2); min-height: 32px; padding: 5px var(--sp-2);
  border-radius: var(--radius-sm); font-size: var(--fs-md); line-height: var(--lh-tight); color: var(--text-1);
  transition: background var(--dur-2) var(--ease-out); }
.tp-item.is-active { background: var(--card-hover); }
.tp-item:focus-visible { outline: 2px solid var(--blue-bright); outline-offset: 1px; }
.tp-item.is-elsewhere { color: var(--text-3); }
.tp-item.is-elsewhere .tp-swatch { opacity: .35; }
.tp-swatch { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.tp-name { min-width: 0; overflow-wrap: anywhere; }
.tp-also { margin-top: var(--sp-4); font-size: var(--fs-sm); line-height: var(--lh-prose); color: var(--text-3); }
.tp-credit { margin-top: var(--sp-4); font-size: var(--fs-xs); line-height: var(--lh-prose); color: var(--text-3); }
.tp-credit a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.tp-credit a:hover { color: var(--text-2); }
.tp-credit a:focus-visible, .tp-crumb a:focus-visible { outline: 2px solid var(--blue-bright); outline-offset: 2px; border-radius: 3px; }


.tp-tip { display: none; position: absolute; z-index: 1100; pointer-events: none;
  align-items: center; gap: 7px; white-space: nowrap;
  padding: 4px 11px 4px 8px; border-radius: 99px;
  font-size: 11px; font-weight: 600;
  background: rgba(6,12,24,.88); border: 1px solid transparent;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); color: var(--text-2);
  box-shadow: 0 2px 12px rgba(0,0,0,.55);
  max-width: 260px; }
.tp-tip.is-visible { display: flex; }
.tp-tip-swatch { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0;
  border: 1px solid rgba(255,255,255,.25); background: var(--c); }
.tp-tip-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; }

@media (max-width: 720px) {
  .tp-wrap { padding: var(--sp-5) var(--sp-4); }
  .tp-title { font-size: 26px; }
  .tp-head { flex-direction: column; gap: var(--sp-4); }
  .tp-action { width: auto; text-align: left; }
  .tp-action .btn { display: inline-flex; }
  
  .tp-views:not(.is-empty) { flex-direction: column; align-items: center; gap: var(--sp-5); }
  .tp-views:not(.is-empty) .tp-view { flex: none; width: min(100%, calc(var(--ar) * 72vh)); }
  .tp-list { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .tp-item { min-height: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  .tp-frame canvas, .tp-item { transition: none; }
}
