/* ===== v2 editor: modes, blocks, sequence, tutorial, PK steal ===== */

/* mode tabs + expert sub tabs */
.tabs.modetabs .btn.tab { font-size: 19px; }
.tabs.modetabs .btn.tab.on { opacity: 1; filter: drop-shadow(0 2px 0 rgba(179, 38, 30, 0.6)); }
.tabs.subtabs { gap: 5px; }
.tabs.subtabs .btn.tab {
  background-image: none; background-color: rgba(250, 245, 234, 0.6); color: #15130f; text-shadow: none;
  border: 2px solid rgba(21, 19, 15, 0.45); border-radius: 3px 8px 4px 7px; font-size: 16px; opacity: 0.75;
}
.tabs.subtabs .btn.tab.on { background-color: #15130f; color: #f3ead8; border-color: #15130f; opacity: 1; }

/* the sequence area under the preview */
#ui .seqarea { position: absolute; pointer-events: none; }
.btn.bcard {
  background-image: none; background-color: rgba(250, 245, 234, 0.95);
  border: 2px solid rgba(21, 19, 15, 0.7); border-radius: 4px 9px 5px 8px;
  color: #15130f; text-shadow: none; padding: 8px 2px 2px; min-width: 0; min-height: 0;
  flex-direction: column; gap: 1px; white-space: normal; overflow: hidden;
  box-shadow: 2px 3px 0 rgba(21, 19, 15, 0.2); touch-action: none;
}
.btn.bcard::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 7px; background: var(--dot, #5a544b); }
.btn.bcard .bn { font-size: 14px; font-weight: 900; line-height: 1.08; text-align: center; word-break: break-word; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.btn.bcard .bt { font-size: 11px; font-weight: 800; color: #b3261e; line-height: 1; white-space: nowrap; }
.btn.bcard.sel { background-color: #15130f; color: #f3ead8; border-color: #15130f; transform: translateY(-3px); }
.btn.bcard.sel .bt { color: #ff9f8f; }
.btn.bcard.play { box-shadow: 0 0 0 3px #b3261e, 0 0 14px rgba(179, 38, 30, 0.75); }
.btn.bcard.lifted { opacity: 0.3; }
.bslot {
  box-sizing: border-box; display: flex; align-items: center; justify-content: center;
  border: 2px dashed rgba(21, 19, 15, 0.4); border-radius: 4px 9px 5px 8px; color: rgba(21, 19, 15, 0.45);
  font-size: 30px; font-weight: 900; background: rgba(250, 245, 234, 0.35); pointer-events: none;
}

/* the selected block's steppers */
.mstep { box-sizing: border-box; display: flex; align-items: center; gap: 6px; padding-left: 8px; background: rgba(250, 245, 234, 0.8); border: 2px solid rgba(21, 19, 15, 0.35); border-radius: 4px 9px 5px 8px; }
.mstep .mslabel { flex: none; width: 52px; font-size: 16px; font-weight: 900; color: #5a544b; text-align: center; white-space: nowrap; }
.mstep .btn.sq { height: 52px; min-height: 52px; }
.mstep .evalue.msval { height: 44px; font-size: 19px; }
.seqnote { box-sizing: border-box; display: flex; align-items: center; padding: 0 12px; font-size: 15px; font-weight: 700; line-height: 1.3; color: #3a352e; background: rgba(250, 245, 234, 0.75); border: 2px dashed rgba(21, 19, 15, 0.35); border-radius: 4px 9px 5px 8px; }

/* the block palette */
.chips.cats { gap: 5px; }
.btn.chip.cat { flex: 1 1 28%; font-size: 15px; padding: 0 4px 0 18px; overflow: hidden; }
.btn.chip.cat::after { left: 6px; width: 9px; height: 9px; margin-top: -4px; }
.chips.blks { gap: 6px; }
.btn.blk {
  flex: 1 1 40%; min-width: 0; background-image: none; background-color: rgba(250, 245, 234, 0.92);
  border: 2px solid rgba(21, 19, 15, 0.6); border-radius: 3px 8px 4px 9px; color: #15130f; text-shadow: none;
  font-size: 17px; font-weight: 900; padding: 0 6px 0 16px; white-space: normal; line-height: 1.1;
  box-shadow: inset 7px 0 0 var(--dot, #5a544b), 2px 3px 0 rgba(21, 19, 15, 0.16); cursor: grab;
}
.btn.blk::before { content: "+"; position: absolute; right: 5px; top: 2px; font-size: 13px; color: rgba(21, 19, 15, 0.4); }
.tplchips .btn.chip { font-size: 16px; }

/* dragging */
.dragghost {
  position: absolute; z-index: 60; pointer-events: none; box-sizing: border-box; min-width: 80px; height: 56px; padding: 6px 12px 0 16px;
  display: flex; align-items: center; justify-content: center; font-size: 17px; font-weight: 900; color: #15130f; white-space: nowrap;
  background: #fbf6ea; border: 2px solid #15130f; border-radius: 4px 9px 5px 8px;
  box-shadow: inset 7px 0 0 var(--dot, #5a544b), 4px 6px 0 rgba(21, 19, 15, 0.25); transform: rotate(-4deg) scale(1.06);
}
.dragghost.del { background: #f6d3cc; border-color: #b3261e; color: #b3261e; text-decoration: line-through; opacity: 0.85; }
.dropmark { position: absolute; z-index: 59; pointer-events: none; width: 6px; height: 70px; border-radius: 3px; background: #b3261e; box-shadow: 0 0 8px rgba(179, 38, 30, 0.8); }

/* first-time tutorial */
.tutbub {
  position: absolute; z-index: 20; box-sizing: border-box; padding: 12px 16px 12px; pointer-events: none;
  background: #fbf6ea; border: 3px solid #15130f; border-radius: 6px 14px 8px 12px; color: #15130f;
  box-shadow: 4px 6px 0 rgba(21, 19, 15, 0.25); animation: pop 0.28s cubic-bezier(0.3, 1.5, 0.5, 1);
}
.tutbub::after { content: ""; position: absolute; width: 18px; height: 18px; background: #fbf6ea; border: 3px solid #15130f; border-width: 0 0 3px 3px; }
.tutbub.left::after { left: -12px; top: 40px; transform: rotate(45deg); }
.tutbub.down::after { left: var(--ax, 60px); bottom: -12px; margin-left: -9px; transform: rotate(-45deg); }
.tutbub .tuthead { display: flex; align-items: center; gap: 8px; font-size: 20px; font-weight: 900; }
.tutbub .tutn { color: #b3261e; font-size: 26px; line-height: 1; }
.tutbub p { margin: 6px 0 10px; font-size: 16px; font-weight: 700; line-height: 1.45; color: #2a2620; }
.tutbub .tutbtns { display: flex; gap: 10px; justify-content: flex-end; }
.tutbub .tutbtns .btn { min-width: 120px; }
.tutring { position: absolute; z-index: 19; pointer-events: none; box-sizing: border-box; border: 3px solid #b3261e; border-radius: 9px; animation: tutPulse 1.1s ease-in-out infinite; }
@keyframes tutPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(179, 38, 30, 0.55); } 50% { box-shadow: 0 0 0 7px rgba(179, 38, 30, 0); } }

/* small editor buttons */
.btn.advbtn { background-image: none; background-color: rgba(250, 245, 234, 0.55); color: #15130f; text-shadow: none; border: 2px dashed rgba(21, 19, 15, 0.5); border-radius: 3px 8px 4px 7px; font-size: 17px; }
.btn.advbtn.on { border-style: solid; background-color: rgba(250, 245, 234, 0.9); }
.btn.tplbtn { font-size: 15px; white-space: normal; line-height: 1.05; padding: 0 6px; }
.btn.name { font-size: 16px; }

/* template picker */
.modal .tgrid .thead { grid-column: 1 / -1; font-size: 16px; font-weight: 900; color: #b3261e; border-bottom: 2px solid rgba(21, 19, 15, 0.4); padding: 6px 2px 2px; }
.modal .tgrid .btn.tpl { background-image: none; background-color: rgba(250, 245, 234, 0.9); color: #15130f; text-shadow: none; border: 2px solid rgba(21, 19, 15, 0.6); border-radius: 3px 8px 4px 9px; white-space: normal; line-height: 1.1; font-size: 17px; }
.modal .tgrid .btn.tpl.blank { border-style: dashed; }

/* PK steal list */
.result .steal { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; max-height: 132px; overflow-y: auto; touch-action: pan-y; padding: 2px; box-sizing: border-box; }
.result .steal .btn { background-image: none; background-color: rgba(250, 245, 234, 0.92); color: #15130f; text-shadow: none; border: 2px solid rgba(21, 19, 15, 0.65); border-radius: 3px 8px 4px 9px; font-size: 17px; justify-content: flex-start; padding: 0 10px; gap: 8px; overflow: hidden; }
.result .steal .btn .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; text-align: left; }
.result .steal .btn .tag { font-size: 13px; color: #b3261e; font-weight: 800; }
.result .steal .btn.got { background-color: #15130f; color: #f3ead8; opacity: 1; filter: none; }
.result .note { font-size: 15px; font-weight: 800; color: #b3261e; }
