/* ============================================================
   STRIKER Wizard — the light ritual layer
   Cream space, ink type, lime accents. A full-height 3D rolodex.
   ============================================================ */

.wizard {
  position: fixed; inset: 0; z-index: 200;
  background: #EEEDE2;
  color: #14231B;
  overflow: hidden;
  display: flex; flex-direction: column;
}
.wizard[hidden] { display: none; }

.wz-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.9rem 1.4rem 0.7rem;
  padding-top: max(0.9rem, env(safe-area-inset-top));
  flex: 0 0 auto;
}
.wz-count {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
  color: #6E7A70;
}
.wz-close {
  width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid rgba(20, 35, 27, 0.25);
  background: transparent; color: #14231B; cursor: pointer;
  display: grid; place-items: center; transition: border-color 0.2s, transform 0.25s;
  -webkit-tap-highlight-color: transparent;
}
.wz-close svg { width: 16px; height: 16px; }
.wz-close:hover { border-color: #14231B; transform: rotate(90deg); }
.wz-progress { height: 3px; background: rgba(20, 35, 27, 0.1); flex: 0 0 auto; }
.wz-progress i {
  display: block; height: 100%; background: #14231B;
  transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

/* --- track: one row of full-width steps --- */
.wz-track {
  flex: 1 1 auto; min-height: 0;
  display: flex;
  transition: transform 0.44s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
  touch-action: pan-y;
}
.wz-track.dragging { transition: none; }

.wz-step {
  flex: 0 0 100%; min-width: 100%; min-height: 0;
  padding: 0.9rem 1.6rem 1.6rem;
  padding-bottom: max(1.6rem, env(safe-area-inset-bottom));
  display: flex; flex-direction: column;
  overflow-y: auto;
}
/* a rolodex step never scrolls — the wheel takes every pixel that is left,
   and the whole step is a grab surface for spinning it */
.wz-step--fill { overflow: hidden; touch-action: none; cursor: grab; }
.wz-step--fill .wz-head { -webkit-user-select: none; user-select: none; }
.wz-step--fill:has(.wz-rolo.dragging) { cursor: grabbing; }
.wz-step-inner {
  max-width: 480px; width: 100%; margin-inline: auto;
  display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0;
}
.wz-head { flex: 0 0 auto; }
.wz-body { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
.wz-step:not(.wz-step--fill) .wz-body { flex: 0 0 auto; }

.wz-eyebrow {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
  color: #24663F; margin-bottom: 0.7rem;
}
.wz-title {
  font-family: var(--font-display); font-weight: var(--display-weight-heavy);
  font-size: clamp(1.6rem, 7vw, 2.4rem); line-height: 1.06; letter-spacing: -0.02em;
  text-transform: uppercase; color: #14231B; margin-bottom: 0.55rem;
}
.wz-sub { color: #5A675E; font-size: 0.93rem; line-height: 1.5; max-width: 26rem; margin-bottom: 0.9rem; }
.wz-title[hidden], .wz-sub[hidden] { display: none; }

/* ============================================================
   The rolodex
   driven entirely by transforms - no native scrolling anywhere
   ============================================================ */
.wz-rolo {
  position: relative; flex: 1 1 auto; min-height: 200px;
  margin: 0 -0.6rem;
  display: flex; align-items: stretch;
}
.wz-rolo-list {
  position: relative; width: 100%; overflow: hidden;
  perspective: 880px; perspective-origin: 50% 36%;
  touch-action: none;            /* the drum handles both axes itself */
  cursor: grab;
  -webkit-user-select: none; user-select: none;
  -webkit-tap-highlight-color: transparent;
  outline: none;
}
.wz-rolo.dragging .wz-rolo-list { cursor: grabbing; }
.wz-rolo.dragging .wz-card { transition: none; }

.wz-rolo-item {
  position: absolute; left: 0; right: 0; top: 0;
  padding: 6px 1.7rem;
  cursor: pointer;
  will-change: transform, opacity;
  backface-visibility: hidden;
  transform-origin: 50% 50%;
}
.wz-card {
  height: 100%; display: flex; align-items: center; gap: 0.9rem;
  padding: 0 1rem; text-align: left;
  background: #FFFFFF; border-radius: 18px;
  border: 1px solid rgba(20, 35, 27, 0.08);
  box-shadow: 0 10px 24px -14px rgba(20, 35, 27, 0.22);
  transition: border-color 0.22s, box-shadow 0.28s, transform 0.22s var(--ease-out), background 0.22s;
}
.wz-ic {
  width: 42px; height: 42px; border-radius: 14px; flex: 0 0 auto;
  background: #F3F2EA; border: 1px solid rgba(20, 35, 27, 0.08);
  display: grid; place-items: center;
  transition: background 0.22s, border-color 0.22s, box-shadow 0.22s;
}
.wz-ic svg { width: 22px; height: 22px; color: #14231B; }
.wz-item-text {
  flex: 1 1 auto; min-width: 0;
  display: flex; flex-direction: column; gap: 3px;
}
.wz-item-label {
  font-weight: 600; font-size: 1rem; color: #48554C; line-height: 1.2;
  overflow: hidden; text-overflow: ellipsis; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.wz-item-meta {
  font-size: 0.62rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: #9AA79C; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.wz-item-text--other .wz-item-label { font-style: italic; }

.wz-rolo-item.on .wz-card {
  border-color: rgba(20, 35, 27, 0.55);
  box-shadow: 0 22px 46px -16px rgba(36, 102, 63, 0.45), 0 0 0 2px #D8FF6B inset;
  transform: scale(1.025);
}
.wz-rolo-item.on .wz-item-label {
  font-family: var(--font-display); font-weight: 800; color: #14231B; font-size: 1.02rem;
  letter-spacing: -0.005em;
}
.wz-rolo-item.on .wz-ic { background: #D8FF6B; border-color: #D8FF6B; box-shadow: 0 6px 18px rgba(216, 255, 107, 0.55); }
.wz-rolo-item.on .wz-item-meta { color: #24663F; }
.wz-rolo-item.tapped .wz-card { transform: scale(0.965); transition-duration: 0.11s; }

/* the tap affordance sits under the wheel */
.wz-rolo-hint {
  flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center; gap: 0.45rem;
  padding: 0.45rem 0 0.1rem;
  font-size: 0.66rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
  color: #9AA79C; pointer-events: none; white-space: nowrap;
}
.wz-rolo-hint svg { width: 13px; height: 13px; animation: wz-nudge 1.9s ease-in-out infinite; }
@keyframes wz-nudge { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(5px); } }

/* --- minimal underline input (custom strike, name) --- */
.wz-input {
  width: 100%; border: none; border-bottom: 2px solid rgba(20, 35, 27, 0.3);
  background: transparent; font-family: var(--font-body); font-weight: 600;
  font-size: 1.2rem; color: #14231B; padding: 0.7rem 0.1rem;
}
.wz-input:focus { outline: none; border-bottom-color: #24663F; }
.wz-input::placeholder { color: #9AA79C; }
.wz-custom {
  flex: 0 0 auto; overflow: hidden; max-height: 0; opacity: 0;
  transition: max-height 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s, margin 0.3s;
}
.wz-custom.open { max-height: 150px; opacity: 1; margin-top: 0.4rem; }

/* --- signature on light --- */
.sig-pad--light { background: #F7F6EE; border: 2px dashed rgba(20, 35, 27, 0.35); }
.wz-hint-dark { font-size: 0.78rem; color: #6E7A70; margin-top: 0.5rem; }
.wz-hint-dark a { color: #24663F; }

/* --- wizard buttons --- */
.wz-actions { display: flex; gap: 0.8rem; margin-top: 1.4rem; }
.wz-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font-family: var(--font-body); font-weight: 700; font-size: 0.95rem;
  text-transform: uppercase; letter-spacing: 0.07em;
  padding: 1.05rem 1.9rem; border-radius: 999px; border: none; cursor: pointer;
  transition: transform 0.2s, box-shadow 0.25s, background 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.wz-btn:active { transform: scale(0.97); }
.wz-btn--lime { background: #D8FF6B; color: #14231B; box-shadow: 0 10px 30px rgba(36, 102, 63, 0.25); }
.wz-btn--lime:hover { box-shadow: 0 14px 36px rgba(36, 102, 63, 0.35); }
.wz-btn--ink { background: #14231B; color: #EEEDE2; }
.wz-btn--quiet { background: transparent; color: #5A675E; border: 1.5px solid rgba(20, 35, 27, 0.25); }
.wz-btn--block { display: flex; width: 100%; }
.wz-btn:disabled { opacity: 0.4; pointer-events: none; }

/* --- strike preview card (light) --- */
.wz-preview {
  background: #14231B; color: #EEEDE2; border-radius: 20px; padding: 1.3rem 1.4rem;
  margin-bottom: 1.2rem; position: relative; overflow: hidden;
}
.wz-preview::after {
  content: ""; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px;
  background: url('/assets/img/MW_Icon_Spielplan_Light.svg') no-repeat; background-size: contain;
  opacity: 0.15;
}
.wz-preview .pv-label { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: #8FB49F; margin-bottom: 0.5rem; }
.wz-preview .pv-habit { font-family: var(--font-display); font-weight: 800; font-size: 1.25rem; text-transform: uppercase; line-height: 1.15; margin-bottom: 0.7rem; }
.wz-preview .pv-meta { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.wz-preview .pv-chip { font-size: 0.75rem; font-weight: 600; border: 1px solid rgba(238, 237, 226, 0.35); border-radius: 999px; padding: 0.25rem 0.7rem; color: #C9D8CD; }
.wz-preview .pv-chip[hidden] { display: none; }

.wz-logo-ink { filter: brightness(0); }

/* --- abandon confirmation --- */
.wz-confirm {
  position: absolute; inset: 0; z-index: 20;
  display: grid; place-items: end center;
  background: rgba(20, 35, 27, 0.45);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  opacity: 0; transition: opacity 0.22s ease;
}
.wz-confirm.open { opacity: 1; }
.wz-confirm[hidden] { display: none; }
.wz-confirm-card {
  width: 100%; max-width: 480px;
  background: #F7F6EE; border-radius: 26px 26px 0 0;
  padding: 1.8rem 1.6rem;
  padding-bottom: max(1.8rem, env(safe-area-inset-bottom));
  display: grid; gap: 0.7rem;
  transform: translateY(100%); transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 -20px 60px rgba(20, 35, 27, 0.3);
}
.wz-confirm.open .wz-confirm-card { transform: translateY(0); }
.wz-confirm-card h3 {
  font-family: var(--font-display); font-weight: 900; font-size: 1.35rem;
  text-transform: uppercase; color: #14231B; letter-spacing: -0.01em;
}
.wz-confirm-card p { color: #5A675E; font-size: 0.93rem; line-height: 1.55; margin-bottom: 0.5rem; }

/* --- success --- */
.wz-success { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; flex: 1; padding: 2rem 1.6rem; }
.wz-success .ring {
  width: 110px; height: 110px; border-radius: 50%; background: #D8FF6B;
  display: grid; place-items: center; margin-bottom: 1.6rem;
  box-shadow: 0 20px 50px rgba(36, 102, 63, 0.3);
  animation: wz-pop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.wz-success .ring svg { width: 52px; height: 52px; }
.wz-success .ring path {
  stroke: #14231B; stroke-width: 3; fill: none; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 60; stroke-dashoffset: 60;
  animation: wz-draw 0.7s 0.25s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes wz-pop { from { transform: scale(0.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes wz-draw { to { stroke-dashoffset: 0; } }
.wz-success h2 { font-family: var(--font-display); font-weight: 900; font-size: 2rem; text-transform: uppercase; margin-bottom: 0.6rem; }
.wz-success p { color: #5A675E; max-width: 22rem; line-height: 1.6; margin-bottom: 2rem; }

/* short screens: give the rolodex everything */
@media (max-height: 640px) {
  .wz-title { font-size: clamp(1.4rem, 6vw, 1.9rem); }
  .wz-sub { display: none; }
  .wz-rolo { min-height: 180px; }
}
