/* ─── Tutorial Overlay — Architectural / Brutalist design ─────────────────── */

/* Custom scrollbar — tut-body */
.tut-body::-webkit-scrollbar {
  width: 3px;
}
.tut-body::-webkit-scrollbar-track {
  background: transparent;
}
.tut-body::-webkit-scrollbar-thumb {
  background: var(--accent-color, rgba(0,0,0,0.18));
  border-radius: 2px;
  opacity: 0.6;
}
.tut-body::-webkit-scrollbar-thumb:active {
  background: var(--accent-color, rgba(0,0,0,0.35));
}

.tut-overlay {
  position: fixed;
  inset: 0;
  background: #ffffff;
  z-index: 9999;
  display: flex;
  align-items: stretch;
  justify-content: center;
  font-family: 'Outfit', system-ui, sans-serif;
  color: #0a0a0a;
  overflow: hidden;
  animation: tutOverlayIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes tutOverlayIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Fade-out when dismissed */
.tut-out {
  animation: tutFadeOut 0.4s ease forwards;
}

@keyframes tutFadeOut {
  to { opacity: 0; transform: scale(0.97); }
}

/* ── Grid Background ───────────────────────────────────────────────────────── */

.tut-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  color: rgba(0, 0, 0, 0.055);
  overflow: hidden;
  z-index: 0;
  animation: tutGridIn 1s ease both;
}

@keyframes tutGridIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.tut-grid-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.tut-corner {
  position: absolute;
  color: rgba(0, 0, 0, 0.16);
}
.tut-corner-tl { top: 24px; left: 24px; }
.tut-corner-tr { top: 24px; right: 24px; }
.tut-corner-bl { bottom: 24px; left: 24px; }
.tut-corner-br { bottom: 24px; right: 24px; }

.tut-corner path {
  stroke-dasharray: 125;
  stroke-dashoffset: 125;
  animation: tutPathDraw 0.7s 0.15s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes tutPathDraw {
  to { stroke-dashoffset: 0; }
}

/* ── Shell (full-height flex column) ──────────────────────────────────────── */

.tut-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  height: 100%;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  overflow: hidden;
}

/* Slide-in transitions */
.tut-enter-right {
  animation: tutEnterRight 0.38s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.tut-enter-left {
  animation: tutEnterLeft 0.38s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.tut-exit-left {
  animation: tutExitLeft 0.19s cubic-bezier(0.55, 0, 1, 0.45) forwards;
  pointer-events: none;
}
.tut-exit-right {
  animation: tutExitRight 0.19s cubic-bezier(0.55, 0, 1, 0.45) forwards;
  pointer-events: none;
}

@keyframes tutEnterRight {
  from { opacity: 0; transform: translateX(38px) scale(0.98); }
  to   { opacity: 1; transform: translateX(0)    scale(1); }
}
@keyframes tutEnterLeft {
  from { opacity: 0; transform: translateX(-38px) scale(0.98); }
  to   { opacity: 1; transform: translateX(0)     scale(1); }
}
@keyframes tutExitLeft {
  from { opacity: 1; transform: translateX(0)     scale(1); }
  to   { opacity: 0; transform: translateX(-30px) scale(0.97); }
}
@keyframes tutExitRight {
  from { opacity: 1; transform: translateX(0)    scale(1); }
  to   { opacity: 0; transform: translateX(30px) scale(0.97); }
}

/* ── Top bar ──────────────────────────────────────────────────────────────── */

.tut-top {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
  padding: 24px 24px 32px;
  animation: tutTopIn 0.5s 0.05s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes tutTopIn {
  from { opacity: 0; transform: translateY(-18px); }
  to   { opacity: 1; transform: translateY(0); }
}

.tut-logo-box {
  position: relative;
  width: 40px;
  height: 40px;
  border: 1px solid #0a0a0a;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tut-logo-box span {
  font-size: 0.6rem;
  font-weight: 900;
  letter-spacing: 0.05em;
}

.tut-logo-dot {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 6px;
  height: 6px;
  border: 1px solid #0a0a0a;
  background: #ffffff;
  animation: tutDotBlink 0.7s ease infinite alternate;
}

@keyframes tutDotBlink {
  from { background: #ffffff; }
  to   { background: #0a0a0a; }
}

.tut-progress {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
}

.tut-prog-item {
  height: 2px;
  flex: 1;
  background: rgba(0, 0, 0, 0.1);
  transition: background 0.3s;
  transform-origin: left center;
  animation: tutProgIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.tut-prog-item:nth-child(1) { animation-delay: 0.12s; }
.tut-prog-item:nth-child(2) { animation-delay: 0.18s; }
.tut-prog-item:nth-child(3) { animation-delay: 0.24s; }
.tut-prog-item:nth-child(4) { animation-delay: 0.30s; }
.tut-prog-item:nth-child(5) { animation-delay: 0.36s; }
.tut-prog-item:nth-child(6) { animation-delay: 0.42s; }

@keyframes tutProgIn {
  from { opacity: 0; transform: scaleX(0); }
  to   { opacity: 1; transform: scaleX(1); }
}

.tut-prog-item.tut-prog-active {
  background: #0a0a0a;
}

.tut-prog-item.tut-prog-done {
  background: rgba(0, 0, 0, 0.35);
}

.tut-step-label {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: rgba(0, 0, 0, 0.3);
  flex-shrink: 0;
}

/* ── Slide body (scrollable middle zone) ──────────────────────────────────── */

.tut-body {
  flex: 1;
  overflow-y: auto;
  padding: 0 24px 24px;
  -webkit-overflow-scrolling: touch;
}

.tut-slide {
  display: flex;
  flex-direction: column;
}

/* Staggered entrance for slide content */
.tut-slide > * {
  animation: tutFadeUp 0.42s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.tut-slide > *:nth-child(1) { animation-delay: 0.13s; }
.tut-slide > *:nth-child(2) { animation-delay: 0.20s; }
.tut-slide > *:nth-child(3) { animation-delay: 0.27s; }
.tut-slide > *:nth-child(4) { animation-delay: 0.34s; }
.tut-slide > *:nth-child(5) { animation-delay: 0.41s; }
.tut-slide > *:nth-child(6) { animation-delay: 0.48s; }
.tut-slide > *:nth-child(7) { animation-delay: 0.55s; }
.tut-slide > *:nth-child(8) { animation-delay: 0.62s; }

@keyframes tutFadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* centered variant for last slide */
.tut-slide-center {
  align-items: center;
  text-align: center;
}

/* ── Badge ────────────────────────────────────────────────────────────────── */

.tut-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.35);
  margin-bottom: 20px;
}

.tut-badge-dot {
  width: 6px;
  height: 6px;
  background: #0a0a0a;
  border-radius: 50%;
  animation:
    tutBadgeIn 0.45s 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) both,
    tutBadgePulse 1.6s 0.65s ease infinite;
}

@keyframes tutBadgeIn {
  from { opacity: 0; transform: scale(0); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes tutBadgePulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}

/* ── Title ────────────────────────────────────────────────────────────────── */

.tut-title {
  font-size: clamp(2rem, 8vw, 2.8rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0 0 24px;
  color: #0a0a0a;
}

.tut-title-center {
  text-align: center;
}

.tut-name-accent {
  color: rgba(0, 0, 0, 0.4);
}

/* ── Description ─────────────────────────────────────────────────────────── */

.tut-desc {
  font-size: 0.95rem;
  line-height: 1.6;
  color: rgba(0, 0, 0, 0.5);
  margin: 0 0 32px;
}

.tut-desc-center {
  text-align: center;
}

.tut-desc strong {
  color: #0a0a0a;
  font-weight: 700;
}

/* ── Actions — always anchored at the bottom ──────────────────────────────── */

.tut-actions {
  flex-shrink: 0;
  display: flex;
  flex-direction: row;
  gap: 12px;
  padding: 20px 24px max(32px, env(safe-area-inset-bottom));
  background: #ffffff;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  animation: tutActionsIn 0.5s 0.08s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes tutActionsIn {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */

.tut-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 64px;
  padding: 0 24px;
  border: 1px solid #0a0a0a;
  background: transparent;
  color: #0a0a0a;
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  flex: 1;
}

.tut-btn:active {
  background: rgba(0, 0, 0, 0.04);
}

.tut-btn-primary {
  background: #0a0a0a;
  color: #ffffff;
}

.tut-btn-primary:active {
  background: #333333;
}

.tut-btn-outline {
  background: transparent;
  color: #0a0a0a;
}

.tut-btn-disabled {
  opacity: 0.35;
  pointer-events: none;
}

.tut-arrow {
  font-size: 1rem;
  line-height: 1;
}

/* ── Identity box (slide 1) ──────────────────────────────────────────────── */

.tut-identity-box {
  position: relative;
  border: 1px solid rgba(0, 0, 0, 0.12);
  padding: 24px 20px 20px;
  margin-bottom: 20px;
}

.tut-identity-label {
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  color: rgba(0, 0, 0, 0.3);
  margin-bottom: 8px;
  display: block;
}

.tut-identity-name {
  font-size: 1.6rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  word-break: break-all;
}

/* corner dots on identity box */
.tut-identity-dot {
  position: absolute;
  width: 5px;
  height: 5px;
  border: 1px solid rgba(0, 0, 0, 0.3);
  background: #ffffff;
}
.tut-identity-dot-tl { top: -3px;    left: -3px; }
.tut-identity-dot-tr { top: -3px;    right: -3px; }
.tut-identity-dot-bl { bottom: -3px; left: -3px; }
.tut-identity-dot-br { bottom: -3px; right: -3px; }

.tut-name-edit {
  margin-bottom: 8px;
}

.tut-input {
  width: 100%;
  box-sizing: border-box;
  height: 48px;
  border: 1px solid #0a0a0a;
  background: transparent;
  padding: 0 16px;
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: #0a0a0a;
  outline: none;
}

.tut-input:focus {
  background: rgba(0, 0, 0, 0.02);
}

/* ── Chain cards (slide 2) ───────────────────────────────────────────────── */

.tut-chains {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 8px;
  width: 100%;
  max-width: 420px;
}

.tut-chain {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 36px 24px 28px;
  min-width: 150px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: transparent;
  cursor: pointer;
  font-family: 'Outfit', system-ui, sans-serif;
  transition: border-color 0.2s, background 0.2s;
}

.tut-chain:active {
  background: rgba(0, 0, 0, 0.03);
}

.tut-chain-active {
  border-color: #0a0a0a;
  background: rgba(0, 0, 0, 0.02);
}

/* corner dots on chain card */
.tut-chain-dot {
  position: absolute;
  width: 5px;
  height: 5px;
  border: 1px solid rgba(0, 0, 0, 0.3);
  background: #ffffff;
  transition: border-color 0.2s;
}
.tut-chain-active .tut-chain-dot {
  border-color: #0a0a0a;
  background: #0a0a0a;
}
.tut-chain-dot-tl { top: -3px;    left: -3px; }
.tut-chain-dot-tr { top: -3px;    right: -3px; }
.tut-chain-dot-bl { bottom: -3px; left: -3px; }
.tut-chain-dot-br { bottom: -3px; right: -3px; }

.tut-chain-icon {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tut-chain-logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 50%;
  display: block;
}

.tut-chain-name {
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.15em;
  color: #0a0a0a;
}

.tut-chain-sub {
  font-size: 0.72rem;
  color: rgba(0, 0, 0, 0.4);
  letter-spacing: 0.04em;
}

.tut-chain-voters {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: rgba(0, 0, 0, 0.35);
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 999px;
  padding: 2px 8px 2px 5px;
  margin-top: 2px;
}

.tut-chain-voters svg {
  opacity: 0.5;
  flex-shrink: 0;
}

/* ── Rules list (slide 3) ────────────────────────────────────────────────── */

.tut-rules {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 8px;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.tut-rule {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.tut-rule:last-child {
  border-bottom: none;
}

.tut-rule-icon {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #0a0a0a;
}

.tut-rule-icon svg,
.tut-rule-icon i {
  width: 14px;
  height: 14px;
  stroke-width: 2;
}

.tut-rule-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tut-rule-title {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  color: #0a0a0a;
}

.tut-rule-desc {
  font-size: 0.82rem;
  line-height: 1.5;
  color: rgba(0, 0, 0, 0.5);
}

/* ── Color wheel entrance ────────────────────────────────────────────────── */

#tut-color-wheel {
  animation: tutWheelIn 0.65s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes tutWheelIn {
  from { opacity: 0; transform: rotate(-18deg) scale(0.82); }
  to   { opacity: 1; transform: rotate(0deg)  scale(1); }
}

/* ── Launch slide (slide 4) ──────────────────────────────────────────────── */

.tut-launch-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 32px;
  margin-top: 8px;
}

.tut-launch-box {
  position: relative;
  width: 72px;
  height: 72px;
  border: 1px solid #0a0a0a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  animation: tutLaunchBoxIn 0.6s 0.1s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes tutLaunchBoxIn {
  from { opacity: 0; transform: scale(0.7) rotate(-6deg); }
  to   { opacity: 1; transform: scale(1)   rotate(0deg); }
}

.tut-launch-ring {
  position: absolute;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 50%;
  animation: tutRingExpand 2s ease-out infinite;
}

.tut-launch-ring-1 {
  width: 110px;
  height: 110px;
  animation-delay: 0s;
}

.tut-launch-ring-2 {
  width: 150px;
  height: 150px;
  animation-delay: 0.5s;
}

.tut-launch-ring-3 {
  width: 195px;
  height: 195px;
  animation-delay: 1s;
}

@keyframes tutRingExpand {
  0%   { opacity: 0.5; transform: scale(0.85); }
  100% { opacity: 0;   transform: scale(1.1); }
}

/* ── Chain detail panel (slide 2) ────────────────────────────────────────── */

.tut-chain-detail-wrap {
  min-height: 110px;
  margin-top: 12px;
  margin-bottom: 8px;
}

.tut-chain-info {
  border: 1px solid rgba(0, 0, 0, 0.1);
  padding: 16px;
  animation: tutChainInfoIn 0.25s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

@keyframes tutChainInfoIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.tut-chain-info-label {
  display: block;
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  color: rgba(0, 0, 0, 0.3);
  margin-bottom: 12px;
}

.tut-chain-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.tut-chain-info-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 12px;
  border-right: 1px solid rgba(0, 0, 0, 0.06);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.tut-chain-info-item:nth-child(even) {
  border-right: none;
}

.tut-chain-info-item:nth-last-child(-n+2) {
  border-bottom: none;
}

.tut-chain-info-key {
  font-size: 0.52rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: rgba(0, 0, 0, 0.3);
  text-transform: uppercase;
}

.tut-chain-info-val {
  font-size: 0.82rem;
  font-weight: 800;
  color: #0a0a0a;
  letter-spacing: -0.01em;
}

/* ── Avatar slide (slide 2) ─────────────────────────────────────────────── */

.tut-avatar-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding: 8px 0 24px;
}

.tut-avatar-frame {
  position: relative;
  width: 120px;
  height: 120px;
  flex-shrink: 0;
}

.tut-avatar-img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  border: 2px solid rgba(0, 0, 0, 0.1);
}

.tut-avatar-overlay {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  opacity: 0;
  cursor: pointer;
  transition: opacity 0.2s;
  color: #ffffff;
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-family: 'Outfit', system-ui, sans-serif;
}

.tut-avatar-frame:hover .tut-avatar-overlay,
.tut-avatar-frame:active .tut-avatar-overlay {
  opacity: 1;
}

.tut-avatar-hint {
  font-size: 0.8rem;
  line-height: 1.55;
  color: rgba(0, 0, 0, 0.4);
  text-align: center;
  margin: 0;
  max-width: 220px;
}

.tut-avatar-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: #0a0a0a;
  color: #ffffff;
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  border: none;
  outline: none;
  transition: opacity 0.15s;
  user-select: none;
}

.tut-avatar-btn:hover,
.tut-avatar-btn:active {
  opacity: 0.75;
}

/* Cropper UI */
.tut-cropper-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.tut-cropper-modal {
  background: #ffffff;
  border-radius: 0;
  width: 100%;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  border: 1px solid #0a0a0a;
  box-shadow: 8px 8px 0px rgba(10, 10, 10, 0.1);
}

.tut-cropper-header {
  height: 50px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 16px;
  border-bottom: 1px solid #0a0a0a;
  background: #f9f9f9;
}

.tut-cropper-title {
  color: #0a0a0a;
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 0;
}

.tut-cropper-close {
  background: none;
  border: none;
  color: #0a0a0a;
  font-size: 1.4rem;
  cursor: pointer;
  padding: 4px;
  font-weight: 300;
}
.tut-cropper-close:hover {
  opacity: 0.6;
}

.tut-cropper-body {
  width: 100%;
  height: 280px;
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.tut-cropper-footer {
  padding: 16px;
  display: flex;
  justify-content: stretch;
  gap: 12px;
  border-top: 1px solid #0a0a0a;
  background: #ffffff;
}

.tut-cropper-btn {
  flex: 1;
  padding: 14px 16px;
  border-radius: 0;
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.tut-cropper-cancel {
  background: #ffffff;
  color: #0a0a0a;
  border: 1px solid #0a0a0a;
}
.tut-cropper-cancel:hover {
  background: #f0f0f0;
}

.tut-cropper-apply {
  background: #0a0a0a;
  color: #ffffff;
  border: 1px solid #0a0a0a;
}
.tut-cropper-apply:hover {
  background: #2a2a2a;
}

/* Override cropper variables if needed */
.cropper-view-box,
.cropper-face {
  border-radius: 50%;
}

/* ─── Dark Mode overrides ───────────────────────────────────────────────── */

body.theme-dark .tut-overlay {
  background: #0a0a0a;
  color: #f0f0f0;
}

body.theme-dark .tut-grid {
  color: rgba(255, 255, 255, 0.04);
}

body.theme-dark .tut-corner {
  color: rgba(255, 255, 255, 0.12);
}

body.theme-dark .tut-logo-box {
  border-color: rgba(255, 255, 255, 0.25);
}

body.theme-dark .tut-logo-dot {
  border-color: rgba(255, 255, 255, 0.25);
  background: #0a0a0a;
}

@keyframes tutDotBlinkDark {
  from { background: #0a0a0a; }
  to   { background: #f0f0f0; }
}
body.theme-dark .tut-logo-dot {
  animation-name: tutDotBlinkDark;
}

body.theme-dark .tut-prog-item {
  background: rgba(255, 255, 255, 0.1);
}

body.theme-dark .tut-prog-item.tut-prog-active {
  background: #f0f0f0;
}

body.theme-dark .tut-prog-item.tut-prog-done {
  background: rgba(255, 255, 255, 0.3);
}

body.theme-dark .tut-step-label {
  color: rgba(255, 255, 255, 0.3);
}

body.theme-dark .tut-badge {
  color: rgba(255, 255, 255, 0.35);
}

body.theme-dark .tut-badge-dot {
  background: #f0f0f0;
}

body.theme-dark .tut-title {
  color: #f0f0f0;
}

body.theme-dark .tut-name-accent {
  color: rgba(255, 255, 255, 0.4);
}

body.theme-dark .tut-desc {
  color: rgba(255, 255, 255, 0.5);
}

body.theme-dark .tut-desc strong {
  color: #f0f0f0;
}

body.theme-dark .tut-actions {
  background: #0a0a0a;
  border-top-color: rgba(255, 255, 255, 0.06);
}

body.theme-dark .tut-btn {
  border-color: rgba(255, 255, 255, 0.25);
  color: #f0f0f0;
}

body.theme-dark .tut-btn:active {
  background: rgba(255, 255, 255, 0.06);
}

body.theme-dark .tut-btn-primary {
  background: #f0f0f0;
  color: #0a0a0a;
  border-color: #f0f0f0;
}

body.theme-dark .tut-btn-primary:active {
  background: #cccccc;
}

body.theme-dark .tut-btn-outline {
  color: #f0f0f0;
}

/* Identity box */
body.theme-dark .tut-identity-box {
  border-color: rgba(255, 255, 255, 0.12);
}

body.theme-dark .tut-identity-label {
  color: rgba(255, 255, 255, 0.3);
}

body.theme-dark .tut-identity-dot {
  border-color: rgba(255, 255, 255, 0.3);
  background: #0a0a0a;
}

body.theme-dark .tut-input {
  border-color: rgba(255, 255, 255, 0.25);
  color: #f0f0f0;
}

body.theme-dark .tut-input:focus {
  background: rgba(255, 255, 255, 0.04);
}

/* Chain cards */
body.theme-dark .tut-chain {
  border-color: rgba(255, 255, 255, 0.12);
}

body.theme-dark .tut-chain:active {
  background: rgba(255, 255, 255, 0.04);
}

body.theme-dark .tut-chain-active {
  border-color: #f0f0f0;
  background: rgba(255, 255, 255, 0.04);
}

body.theme-dark .tut-chain-dot {
  border-color: rgba(255, 255, 255, 0.3);
  background: #0a0a0a;
}

body.theme-dark .tut-chain-active .tut-chain-dot {
  border-color: #f0f0f0;
  background: #f0f0f0;
}

body.theme-dark .tut-chain-name {
  color: #f0f0f0;
}

body.theme-dark .tut-chain-sub {
  color: rgba(255, 255, 255, 0.4);
}

/* Chain detail */
body.theme-dark .tut-chain-info {
  border-color: rgba(255, 255, 255, 0.1);
}

body.theme-dark .tut-chain-info-label {
  color: rgba(255, 255, 255, 0.3);
}

body.theme-dark .tut-chain-info-grid {
  border-color: rgba(255, 255, 255, 0.06);
}

body.theme-dark .tut-chain-info-item {
  border-right-color: rgba(255, 255, 255, 0.06);
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

body.theme-dark .tut-chain-info-key {
  color: rgba(255, 255, 255, 0.3);
}

body.theme-dark .tut-chain-info-val {
  color: #f0f0f0;
}

/* Rules */
body.theme-dark .tut-rules {
  border-color: rgba(255, 255, 255, 0.08);
}

body.theme-dark .tut-rule {
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

body.theme-dark .tut-rule-icon {
  border-color: rgba(255, 255, 255, 0.12);
  color: #f0f0f0;
}

body.theme-dark .tut-rule-title {
  color: #f0f0f0;
}

body.theme-dark .tut-rule-desc {
  color: rgba(255, 255, 255, 0.5);
}

/* Launch box */
body.theme-dark .tut-launch-box {
  border-color: rgba(255, 255, 255, 0.25);
  color: #f0f0f0;
}

body.theme-dark .tut-launch-ring {
  border-color: rgba(255, 255, 255, 0.12);
}

/* Avatar */
body.theme-dark .tut-avatar-img {
  border-color: rgba(255, 255, 255, 0.15);
}

body.theme-dark .tut-avatar-hint {
  color: rgba(255, 255, 255, 0.4);
}

body.theme-dark .tut-avatar-btn {
  background: #f0f0f0;
  color: #0a0a0a;
}

/* Cropper */
body.theme-dark .tut-cropper-overlay {
  background: rgba(0, 0, 0, 0.92);
}

body.theme-dark .tut-cropper-modal {
  background: #141414;
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 8px 8px 0px rgba(255, 255, 255, 0.04);
}

body.theme-dark .tut-cropper-header {
  border-bottom-color: rgba(255, 255, 255, 0.1);
  background: #1a1a1a;
}

body.theme-dark .tut-cropper-title {
  color: #f0f0f0;
}

body.theme-dark .tut-cropper-close {
  color: #f0f0f0;
}

body.theme-dark .tut-cropper-body {
  background: #1a1a1a;
}

body.theme-dark .tut-cropper-footer {
  border-top-color: rgba(255, 255, 255, 0.1);
  background: #141414;
}

body.theme-dark .tut-cropper-cancel {
  background: #141414;
  color: #f0f0f0;
  border-color: rgba(255, 255, 255, 0.2);
}

body.theme-dark .tut-cropper-cancel:hover {
  background: #1a1a1a;
}

body.theme-dark .tut-cropper-apply {
  background: #f0f0f0;
  color: #0a0a0a;
  border-color: #f0f0f0;
}

body.theme-dark .tut-cropper-apply:hover {
  background: #cccccc;
}

/* ── Language selector (slide 0) ─────────────────────────────────────────── */

.tut-lang-selector {
  display: flex;
  gap: 8px;
  font-size: 0.7rem;
  font-weight: 600;
  align-items: center;
}

.tut-lang-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  color: rgba(0, 0, 0, 0.4);
  transition: color 0.15s;
}

.tut-lang-btn.tut-lang-active {
  color: #0a0a0a;
}

.tut-lang-sep {
  opacity: 0.3;
  color: #0a0a0a;
}

/* ── Legal group (slide 0) ───────────────────────────────────────────────── */

.tut-legal-group {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
  padding: 15px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: #f5f5f5;
}

.tut-legal-label {
  display: flex;
  gap: 10px;
  cursor: pointer;
  font-size: 0.8rem;
  align-items: flex-start;
}

.tut-legal-label input[type="checkbox"] {
  accent-color: #0a0a0a;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 2px;
}

/* Dark mode — language selector */

body.theme-dark .tut-lang-btn {
  color: rgba(255, 255, 255, 0.35);
}

body.theme-dark .tut-lang-btn.tut-lang-active {
  color: #f0f0f0;
}

body.theme-dark .tut-lang-sep {
  color: #f0f0f0;
}

/* Dark mode — legal group */

body.theme-dark .tut-legal-group {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

body.theme-dark .tut-legal-label {
  color: rgba(255, 255, 255, 0.75);
}

body.theme-dark .tut-legal-label input[type="checkbox"] {
  accent-color: #f0f0f0;
}

/* ── Win11 OOBE fullscreen layout ────────────────────────────────────────── */

.tut-shell-win {
  max-width: 100%;
  width: 100%;
  border-radius: 0;
}

.tut-win-body {
  flex: 1;
  display: flex;
  flex-direction: row;
  overflow: hidden;
  min-height: 0;
}

.tut-win-left {
  flex: 0 0 44%;
  max-width: 520px;
  padding: 40px 48px 40px 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-right: 1px solid rgba(0, 0, 0, 0.06);
  overflow-y: auto;
}

.tut-win-right {
  flex: 1;
  padding: 40px 60px 40px 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow-y: auto;
}

.tut-win-actions {
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  padding: 20px 40px max(32px, env(safe-area-inset-bottom));
  background: #ffffff;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.tut-win-actions .tut-btn {
  flex: none;
  padding: 0 32px;
  min-width: 140px;
}

.tut-win-launch {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px;
}

body.theme-dark .tut-win-actions {
  background: #0a0a0a;
  border-color: rgba(255, 255, 255, 0.06);
}

body.theme-dark .tut-win-left {
  border-color: rgba(255, 255, 255, 0.06);
}

@media (max-width: 640px) {
  .tut-win-body { flex-direction: column; overflow-y: auto; }
  .tut-win-left { flex: none; padding: 32px 24px 20px; border-right: none; border-bottom: 1px solid rgba(0, 0, 0, 0.06); justify-content: flex-start; }
  .tut-win-right { flex: none; padding: 24px 24px 16px; justify-content: flex-start; }
  body.theme-dark .tut-win-left { border-color: rgba(255, 255, 255, 0.06); }
}

/* ── Slide 5 controls (moved out of inline <style>) ──────────────────────── */

/* uniform width container for all pref rows */
.tut-prefs-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  max-width: 360px;
}

.tut-prefs-stack .tut-switch-wrap,
.tut-prefs-stack .tut-case-row {
  margin-top: 0;
  width: 100%;
  box-sizing: border-box;
}

.tut-switch-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  padding: 15px 20px;
  background: rgba(0, 0, 0, 0.03);
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.tut-switch-wrap.tut-first-switch {
  margin-top: 0;
}

.tut-switch-label {
  font-weight: 700;
  font-size: 0.95rem;
  color: #000;
}

.tut-switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 26px;
}

.tut-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.tut-switch-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(0, 0, 0, 0.2);
  transition: .3s;
  border-radius: 34px;
}

.tut-switch-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.tut-switch input:checked + .tut-switch-slider {
  background-color: var(--accent-color, #000);
}

.tut-switch input:checked + .tut-switch-slider:before {
  transform: translateX(20px);
}

.tut-haptic-ctrl {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  min-width: 130px;
}

.tut-haptic-val {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #000;
}

.tut-slider {
  -webkit-appearance: none;
  width: 130px;
  height: 6px;
  background: rgba(0, 0, 0, 0.12);
  border-radius: 3px;
  outline: none;
  margin: 4px 0;
}

.tut-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-color, #000);
  cursor: pointer;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.2);
  transition: transform 0.1s;
}

.tut-slider::-webkit-slider-thumb:active {
  transform: scale(1.15);
}

.tut-slider-labels {
  display: flex;
  justify-content: space-between;
  width: 130px;
  font-size: 0.62rem;
  color: rgba(0, 0, 0, 0.35);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.04em;
}

body.theme-dark .tut-haptic-val { color: #f0f0f0; }
body.theme-dark .tut-slider { background: rgba(255, 255, 255, 0.12); }
body.theme-dark .tut-slider::-webkit-slider-thumb { background: var(--accent-color, #f0f0f0); box-shadow: 0 0 6px rgba(255, 255, 255, 0.15); }
body.theme-dark .tut-slider-labels { color: rgba(255, 255, 255, 0.35); }
body.theme-dark .tut-switch-wrap { background: rgba(255, 255, 255, 0.05); border-color: rgba(255, 255, 255, 0.08); }
body.theme-dark .tut-switch-label { color: #f0f0f0; }
body.theme-dark .tut-switch-slider { background-color: rgba(255, 255, 255, 0.2); }
body.theme-dark .tut-switch-slider:before { background-color: #0a0a0a; }
body.theme-dark .tut-switch input:checked + .tut-switch-slider { background-color: var(--accent-color, #f0f0f0); }

/* ── Case color wheel (slide 5) ──────────────────────────────────────────── */

.tut-case-row {
  margin-top: 10px;
  padding: 15px 20px;
  background: rgba(0, 0, 0, 0.03);
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-sizing: border-box;
}

.tut-case-inner {
  display: flex;
  gap: 16px;
  align-items: center;
}

.tut-case-canvas {
  border-radius: 50%;
  cursor: crosshair;
  touch-action: none;
  flex-shrink: 0;
  display: block;
}

.tut-case-controls {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tut-case-preview {
  width: 100%;
  height: 34px;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  transition: background 0.15s;
}

.tut-case-lightness-wrap { display: flex; flex-direction: column; gap: 4px; }

.tut-case-lightness-label {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.35);
}

.tut-case-lightness {
  -webkit-appearance: none;
  width: 100%;
  height: 5px;
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}

.tut-case-lightness::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid rgba(0, 0, 0, 0.25);
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

body.theme-dark .tut-case-row { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.08); }
body.theme-dark .tut-case-preview { border-color: rgba(255,255,255,0.1); }
body.theme-dark .tut-case-lightness-label { color: rgba(255,255,255,0.35); }
body.theme-dark .tut-case-lightness::-webkit-slider-thumb { background: #2a2a2a; border-color: rgba(255,255,255,0.25); }

/* ── Larger text in wide/PC layout ───────────────────────────────────────── */

.tut-win-left .tut-badge { margin-bottom: 18px; }

.tut-win-left .tut-title {
  font-size: 4.5rem;
  line-height: 1.0;
}

.tut-win-left .tut-desc {
  font-size: 1rem;
  line-height: 1.7;
  margin-top: 18px;
  max-width: 420px;
}

/* ── Build version chip ──────────────────────────────────────────────────── */

.tut-version-chip {
  position: absolute;
  bottom: 14px;
  left: 20px;
  font-size: 0.52rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.22);
  pointer-events: none;
  user-select: none;
}

body.theme-dark .tut-version-chip { color: rgba(255, 255, 255, 0.18); }

/* ── ID Card (slides 1 & 2) — brutalist site style ───────────────────────── */

.tut-id-card {
  position: relative;
  background: #ffffff;
  border: 1.5px solid #0a0a0a;
  max-width: 480px;
  width: 100%;
  overflow: hidden;
  box-shadow: 6px 6px 0 #0a0a0a;
}

.tut-id-card-top {
  background: #0a0a0a;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
}

.tut-id-card-brand {
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.22em;
  color: rgba(255,255,255,0.5);
}

.tut-id-verified {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: #10b981;
}

.tut-id-body {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 20px 16px;
}

.tut-id-avatar {
  width: 108px;
  height: 108px;
  border-radius: 4px;
  object-fit: cover;
  border: 1px solid rgba(0,0,0,0.1);
  flex-shrink: 0;
  background: #f0f0f0;
}

/* slide 2: avatar-frame inside the card */
.tut-id-avatar-frame-wrap {
  width: 108px;
  height: 108px;
  flex-shrink: 0;
  position: relative;
}

.tut-id-avatar-frame-wrap .tut-avatar-frame {
  width: 108px;
  height: 108px;
  border-radius: 4px;
  border: 1px solid rgba(0,0,0,0.1);
}

.tut-id-avatar-frame-wrap .tut-avatar-img {
  width: 108px;
  height: 108px;
  border-radius: 3px;
}

.tut-id-avatar-frame-wrap .tut-avatar-overlay {
  border-radius: 4px;
}

.tut-id-info { flex: 1; min-width: 0; }

.tut-id-field { margin-bottom: 10px; }
.tut-id-field:last-child { margin-bottom: 0; }

.tut-id-field-label {
  display: block;
  font-size: 0.5rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: rgba(0,0,0,0.3);
  margin-bottom: 3px;
}

.tut-id-name {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #0a0a0a;
}

.tut-id-status {
  font-size: 0.68rem;
  font-weight: 700;
  color: #10b981;
  letter-spacing: 0.08em;
}

.tut-id-card-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 10px 16px;
  border-top: 1px solid rgba(0,0,0,0.07);
  background: rgba(0,0,0,0.025);
}

.tut-id-barcode {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 24px;
}

.tut-id-bar {
  background: rgba(0,0,0,0.3);
  border-radius: 1px;
  width: 2px;
}

.tut-id-uid {
  font-size: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: rgba(0,0,0,0.2);
  text-align: right;
}

.tut-id-edit-wrap { margin-top: 16px; max-width: 480px; width: 100%; }

/* Dark mode ID card */
body.theme-dark .tut-id-card {
  background: #111111;
  border-color: rgba(255,255,255,0.15);
  box-shadow: 4px 4px 0 rgba(255,255,255,0.1);
}
body.theme-dark .tut-id-card-top { background: rgba(255,255,255,0.06); }
body.theme-dark .tut-id-card-brand { color: rgba(255,255,255,0.35); }
body.theme-dark .tut-id-avatar { border-color: rgba(255,255,255,0.1); background: #222; }
body.theme-dark .tut-id-avatar-frame-wrap .tut-avatar-frame { border-color: rgba(255,255,255,0.1); }
body.theme-dark .tut-id-field-label { color: rgba(255,255,255,0.3); }
body.theme-dark .tut-id-name { color: #f0f0f0; }
body.theme-dark .tut-id-card-bottom { background: rgba(255,255,255,0.02); border-color: rgba(255,255,255,0.07); }
body.theme-dark .tut-id-bar { background: rgba(255,255,255,0.22); }
body.theme-dark .tut-id-uid { color: rgba(255,255,255,0.18); }
