.tt {
  --tt-line: #24354b;
  --tt-line-soft: #1c2c40;
  --tt-panel: #0e1623;
  --tt-raise: #17263a;
  --tt-text: #edf4ff;
  --tt-muted: #9db0c6;
  --tt-dim: #7b8ea6;
  --tt-accent: #bbf65e;
  --tt-tile: 76px;
  position: relative;
  background: var(--tt-panel);
  border: 1px solid var(--tt-line);
  border-radius: 16px;
  padding: 12px;
  box-shadow: 0 18px 44px -26px rgba(0, 0, 0, 0.85);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--tt-text);
  min-width: 0;
}

.tt *,
.tt *::before,
.tt *::after { box-sizing: border-box; }

.tt button { font: inherit; cursor: pointer; }

.tt [hidden] { display: none !important; }

/* ---------- head ---------- */

.tt__head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 2px 2px 10px;
}

.tt__titlewrap {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 1 1 220px;
  min-width: 0;
}

.tt__pencil {
  color: var(--tt-accent);
  font-size: 13px;
  line-height: 1;
}

.tt__title {
  width: 100%;
  max-width: 340px;
  padding: 5px 7px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #f2f7ff;
  font-family: "Archivo", "Inter", system-ui, sans-serif;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.tt__title:hover { border-color: #2a3c53; }
.tt__title:focus {
  outline: none;
  border-color: var(--tt-accent);
  background: #0a1220;
}

.tt__tools {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  overflow-x: auto;
  max-width: 100%;
  scrollbar-width: none;
  padding-bottom: 2px;
}

.tt__tools::-webkit-scrollbar { display: none; }

.tt__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 11px;
  background: #16243a;
  border: 1px solid #26384f;
  border-radius: 9px;
  color: #cfe0f2;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

.tt__btn:hover { background: #1c2d45; border-color: #334a66; color: #fff; }
.tt__btn[aria-pressed="true"] { background: #24384f; border-color: var(--tt-accent); color: #f4ffe6; }
.tt__btn:disabled { opacity: 0.4; cursor: not-allowed; }

.tt__btn--icon { padding: 0; width: 34px; justify-content: center; font-size: 15px; }

.tt__btn--primary {
  background: var(--tt-accent);
  border-color: var(--tt-accent);
  color: #12200f;
  font-weight: 700;
}

.tt__btn--primary:hover { background: #cdfd7d; border-color: #cdfd7d; color: #12200f; }

.tt__btn--keep {
  background: transparent;
  border-color: #3a5170;
  color: #dce8f6;
}

.tt__sep {
  width: 1px;
  height: 20px;
  background: #2a3c53;
  margin: 0 2px;
}

.tt__grow { flex: 1 1 auto; }

/* ---------- move bar ---------- */

.tt__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 2px 10px;
  padding: 9px 11px;
  background: #12243a;
  border: 1px solid #2b4262;
  border-radius: 10px;
  font-size: 13px;
  color: #d9e7f6;
}

.tt__bar strong { color: #fff; }

.tt__chips { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }

.tt__chip {
  height: 28px;
  padding: 0 10px;
  border-radius: 7px;
  background: #0d1a2b;
  border: 1px solid #35507a;
  color: #dceaf8;
  font-size: 12.5px;
  font-weight: 600;
}

.tt__chip:hover { background: #17293f; }
.tt__chip--cancel { border-color: #43546b; color: #a8bacd; }

.tt__rename {
  height: 30px;
  padding: 0 9px;
  border-radius: 7px;
  border: 1px solid #35507a;
  background: #0a1524;
  color: #eaf3ff;
  font-size: 13px;
  min-width: 140px;
}

/* ---------- rows ---------- */

.tt__rows { display: grid; gap: 6px; }

.tt__row {
  position: relative;
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 8px;
  align-items: stretch;
  padding: 5px;
  background: #0b1727;
  border: 1px solid var(--tt-line-soft);
  border-radius: 12px;
  transition: border-color 0.12s ease, background 0.12s ease;
}

.tt__row--drop { border-color: var(--tt-accent); background: #10202f; }

.tt__label {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 58px;
  padding: 4px;
  border: 0;
  border-radius: 9px;
  background: var(--c, #324459);
  color: #10161f;
  font-family: "Archivo", "Inter", system-ui, sans-serif;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
  text-align: center;
  overflow: hidden;
}

.tt__label--sm { font-size: 16px; line-height: 1.1; }

.tt__labelinput {
  min-height: 58px;
  width: 100%;
  border: 0;
  border-radius: 9px;
  background: var(--c, #324459);
  color: #10161f;
  font-family: "Archivo", "Inter", system-ui, sans-serif;
  font-size: 15px;
  font-weight: 800;
  text-align: center;
  padding: 4px;
}

.tt__labelinput:focus { outline: 2px solid #fff; outline-offset: -2px; }

.tt__lane {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 6px;
  min-height: 58px;
  padding: 6px 50px 6px 6px;
  border: 1px dashed #223145;
  border-radius: 9px;
}

.tt__lane--drop { border-color: var(--tt-accent); border-style: solid; background: rgba(187, 246, 94, 0.04); }

.tt__empty {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding-left: 6px;
  font-size: 12.5px;
  color: #5d738c;
}

.tt__rowtools {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  grid-template-columns: repeat(2, 20px);
  gap: 2px;
  opacity: 0;
  transition: opacity 0.12s ease;
}

.tt__row:hover .tt__rowtools,
.tt__row:focus-within .tt__rowtools { opacity: 1; }

.tt__rowbtn {
  flex: none;
  width: 20px;
  height: 20px;
  border: 1px solid #26384f;
  border-radius: 6px;
  background: #101d2e;
  color: #93a8bf;
  font-size: 10px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tt__rowbtn:hover { color: #fff; border-color: #3b5675; }
.tt__rowbtn:disabled { opacity: 0.3; cursor: not-allowed; }

/* ---------- tiles ---------- */

.tt__tile {
  position: relative;
  width: var(--tt-tile);
  border-radius: 9px;
  cursor: grab;
  touch-action: manipulation;
  background: transparent;
  border: 0;
  padding: 0;
  text-align: left;
}

.tt__tile--photo { touch-action: none; }

.tt__tile:focus-visible { outline: 2px solid var(--tt-accent); outline-offset: 2px; }

.tt__art {
  display: block;
  border-radius: 9px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.tt__art svg { display: block; width: 100%; height: auto; }

.tt__art img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }

.tt__txt {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  padding: 4px;
  border-radius: 9px;
  background: linear-gradient(135deg, #263a54, #14202f);
  border: 1px solid #2c4058;
  color: #e9f2fd;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
  word-break: break-word;
}

.tt__tag {
  display: block;
  margin-top: 3px;
  font-size: 10.5px;
  line-height: 1.2;
  color: #9fb2c7;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tt__x {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 17px;
  height: 17px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid #40556e;
  background: #16273c;
  color: #cfdded;
  font-size: 11px;
  line-height: 1;
  opacity: 0;
  transition: opacity 0.12s ease;
}

.tt__tile:hover .tt__x,
.tt__tile:focus-within .tt__x { opacity: 1; }

.tt__tile--selected .tt__art,
.tt__tile--selected .tt__txt {
  outline: 2px solid var(--tt-accent);
  outline-offset: 1px;
}

.tt__tile--dragging { opacity: 0.35; }

/* ---------- pool ---------- */

.tt__pool {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
  margin-top: 8px;
  padding: 10px;
  background: #0a1522;
  border: 1px solid var(--tt-line-soft);
  border-radius: 12px;
}

.tt__pool--drop { border-color: var(--tt-accent); background: #101f2e; }

.tt__poollabel {
  padding-top: 6px;
  font-family: "Archivo", "Inter", system-ui, sans-serif;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #8fa3ba;
  text-transform: uppercase;
}

.tt__poollane {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 54px;
  padding: 5px;
  border: 1px dashed #1e2d40;
  border-radius: 9px;
}

.tt__poollane--drop { border-color: var(--tt-accent); border-style: solid; }

/* pool empty state reuses .tt__empty */
.tt__pooluse {
  padding: 16px 4px;
  font-size: 12.5px;
  color: #62788f;
}

.tt__addmore {
  align-self: center;
  height: 32px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px dashed #334b6a;
  background: transparent;
  color: #a9bdd4;
  font-size: 12.5px;
  white-space: nowrap;
}

.tt__addmore:hover { border-color: var(--tt-accent); color: #e7ffc9; }

/* ---------- share box ---------- */

.tt__share {
  margin: 0 2px 10px;
  padding: 12px;
  background: #0e2033;
  border: 1px solid #2b4262;
  border-radius: 10px;
  font-size: 12.5px;
  color: #cfe0f2;
}

.tt__share label { display: block; font-weight: 700; margin-bottom: 6px; color: #e7f1fd; }

.tt__share input {
  width: 100%;
  height: 32px;
  padding: 0 9px;
  border-radius: 7px;
  border: 1px solid #35507a;
  background: #08121f;
  color: #dceaf8;
  font-size: 12px;
}

.tt__share p { margin: 8px 0 0; color: #9fb4cb; line-height: 1.5; }

/* ---------- status + ghost ---------- */

.tt__status {
  margin: 8px 2px 0;
  min-height: 16px;
  font-size: 12px;
  color: #7e93aa;
}

.tt__status--flash { color: #d8ffa8; }

.tt__ghost {
  position: fixed;
  z-index: 50;
  width: var(--tt-tile, 76px);
  pointer-events: none;
  transform: translate(-38px, -38px);
  opacity: 0.92;
  filter: drop-shadow(0 12px 20px rgba(0, 0, 0, 0.55));
}

.tt__ghost svg,
.tt__ghost img { display: block; width: var(--tt-tile, 76px); height: var(--tt-tile, 76px); border-radius: 9px; }

/* ---------- mobile ---------- */

@media (max-width: 720px) {
  .tt { padding: 8px; border-radius: 12px; }

  .tt__head { gap: 6px; }
  .tt__title { font-size: 15px; max-width: 100%; }
  .tt__tools { gap: 4px; flex-wrap: wrap; overflow-x: visible; }
  .tt__btn { height: 32px; padding: 0 9px; font-size: 12.5px; }
  .tt__btn--primary { order: -2; }
  .tt__btn--keep { order: -1; }
  .tt__grow, .tt__sep { display: none; }

  .tt__row { grid-template-columns: 56px minmax(0, 1fr); gap: 5px; padding: 5px; }
  .tt__label { min-height: 60px; font-size: 19px; border-radius: 7px; }
  .tt__label--sm { font-size: 12px; }
  .tt__labelinput { min-height: 60px; font-size: 13px; }
  .tt__lane { min-height: 60px; padding: 5px 42px 5px 5px; gap: 5px; }
  .tt { --tt-tile: 62px; }
  .tt__tile { width: var(--tt-tile); }
  .tt__x { opacity: 0.6; width: 16px; height: 16px; font-size: 10px; }
  .tt__tag { font-size: 9.5px; }
  .tt__rowtools { opacity: 1; gap: 2px; right: 4px; grid-template-columns: repeat(2, 17px); }
  .tt__rowbtn { width: 17px; height: 17px; font-size: 8px; border-radius: 4px; }

  .tt__pool { grid-template-columns: 56px minmax(0, 1fr); row-gap: 8px; padding: 8px; }
  .tt__addmore { grid-column: 1 / -1; justify-self: stretch; }
  .tt__poollabel { font-size: 10px; padding-top: 4px; }

  .tt__bar { font-size: 12.5px; }
  .tt__chips { margin-left: 0; width: 100%; }
}


/* ---------- ways to start ---------- */

.tt__start {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0 2px 10px;
}

.tt__startcard {
  min-width: 0;
  padding: 9px 12px;
  border: 1px solid var(--tt-line);
  border-radius: 9px;
  background: #122033;
}

.tt__startcard strong { color: var(--tt-text); font-size: 14px; }
.tt__startcard p { margin: 3px 0 6px; color: var(--tt-muted); font-size: 13px; line-height: 1.45; }
.tt__startcard a {
  display: inline-block;
  padding-block: 5px;
  color: var(--tt-accent);
  font-size: 13px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.tt__upload { border-style: dashed; border-color: #5c764f; }
.tt__upload.is-dragover { background: #253923; border-color: var(--tt-accent); }
.tt__choose { min-height: 44px; color: var(--tt-accent); }
.tt__choose:focus-visible, .tt__startcard a:focus-visible {
  outline: 2px solid var(--tt-accent);
  outline-offset: 3px;
}
.tt__upload #tt-upload-privacy { margin-bottom: 0; font-size: 12px; }

@media (max-width: 580px) {
  .tt__start { grid-template-columns: 1fr; }
  .tt__choose { justify-content: center; width: 100%; }
}
