.wt-m-shell {
  min-height: 100dvh;
  padding-bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom, 0px) + 24px);
  box-sizing: border-box;
}

.wt-m-shell-fab {
  padding-bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom, 0px) + 96px);
}

.wt-m-appbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: 8px;
  padding: calc(env(safe-area-inset-top, 0px) + 8px) 12px 8px;
  background: linear-gradient(180deg, var(--wt-sogan), var(--wt-night));
  border-bottom: 1px solid var(--wt-gold);
}

.wt-m-appbar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -9px;
  height: 8px;
  background: conic-gradient(from -45deg at 50% 0, var(--wt-gold) 0 90deg, transparent 0) top left / 16px 8px repeat-x;
  opacity: 0.8;
  pointer-events: none;
}

.wt-m-title {
  margin: 0;
  text-align: center;
  font-family: var(--wt-font-head);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--wt-cream);
  text-shadow: 0 0 14px rgba(var(--wt-blencong-rgb), 0.45);
}

.wt-m-icon {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--wt-cream);
  font-size: 1.1rem;
  text-decoration: none;
}

.wt-m-main {
  padding: 24px 16px 16px;
}

.wt-m-steps {
  background: var(--wt-tumpal), var(--wt-surface);
  border: 1px solid var(--wt-line);
  border-top: 2px solid var(--wt-gold);
  border-radius: var(--wt-radius-lg);
  padding: 26px 18px 20px;
}

.wt-m-steps[hidden],
.wt-m-result[hidden] {
  display: none;
}

.wt-m-progress {
  margin-bottom: 22px;
}

.wt-m-progress-text {
  display: block;
  margin-bottom: 8px;
  font-size: 0.8rem;
  color: var(--wt-faint);
}

.wt-m-progress-bar {
  width: calc(var(--steps, 3) * 34px);
  height: 30px;
  background: rgba(var(--wt-cream-rgb), 0.14);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 26'%3E%3Cpath d='M10 0L12.4 2.6L14.6 6.8L16.8 12L18.4 17.2L19.2 21.8L18 26H2L0.8 21.8L1.6 17.2L3.2 12L5.4 6.8L7.6 2.6Z' fill='black'/%3E%3C/svg%3E") left center / calc(100% / var(--steps, 3)) 100% repeat-x;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 26'%3E%3Cpath d='M10 0L12.4 2.6L14.6 6.8L16.8 12L18.4 17.2L19.2 21.8L18 26H2L0.8 21.8L1.6 17.2L3.2 12L5.4 6.8L7.6 2.6Z' fill='black'/%3E%3C/svg%3E") left center / calc(100% / var(--steps, 3)) 100% repeat-x;
  overflow: hidden;
}

.wt-m-progress-bar span {
  display: block;
  height: 100%;
  width: 33%;
  background: linear-gradient(180deg, var(--wt-blencong), var(--wt-gold));
  transition: width 0.25s ease;
}

.wt-m-question {
  margin: 0 0 8px;
  font-family: var(--wt-font-head);
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.15;
  color: var(--wt-cream);
}

.wt-m-help {
  margin: 0 0 18px;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--wt-muted);
}

.wt-input-lg {
  min-height: 56px;
  font-size: 1.1rem;
}

.wt-m-actions {
  display: flex;
  gap: 10px;
  margin-top: 22px;
}

.wt-m-actions .wt-btn-ghost {
  flex: 0 0 auto;
}

.wt-m-actions .wt-btn-ghost[hidden] {
  display: none;
}

.wt-m-actions .wt-btn {
  min-width: 0;
  padding-left: 20px;
  padding-right: 20px;
}

.wt-m-actions .wt-btn-block {
  flex: 1 1 auto;
  min-height: 52px;
}

.wt-m-chip {
  position: sticky;
  top: calc(env(safe-area-inset-top, 0px) + 68px);
  z-index: 20;
  display: inline-flex;
  margin-bottom: 12px;
  padding: 10px 28px;
  background: var(--wt-sogan);
  clip-path: polygon(14px 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 14px 100%, 0 50%);
  color: var(--wt-kelir);
  font-family: var(--wt-font-head);
  font-weight: 700;
  font-size: 1.05rem;
  box-shadow: 0 8px 20px rgba(var(--wt-night-rgb), 0.5);
}

.wt-m-carousel {
  display: flex;
  align-items: flex-start;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  border-radius: var(--wt-radius-lg);
}

.wt-m-carousel::-webkit-scrollbar {
  display: none;
}

.wt-m-carousel > .wt-result-card {
  flex: 0 0 100%;
  box-sizing: border-box;
  scroll-snap-align: start;
  box-shadow: none;
}

.wt-note-inline {
  margin: 8px 0 12px;
}

.wt-m-carousel .wt-result-headline {
  font-size: 1.7rem;
}

.wt-m-carousel .wt-fact,
.wt-m-dina-list .wt-fact {
  grid-template-columns: 1fr;
  gap: 2px;
}

.wt-m-dots {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin: 12px 0 4px;
}

.wt-m-dot {
  width: 44px;
  height: 44px;
  border: none;
  background: transparent;
  position: relative;
  cursor: pointer;
}

.wt-m-dot::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: rgba(var(--wt-cream-rgb), 0.3);
  transition: width 0.2s ease, background 0.2s ease;
}

.wt-m-dot.is-active::before {
  width: 22px;
  border-radius: var(--wt-radius-sm);
  background: var(--wt-gold);
}

.wt-m-result-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 8px;
}

.wt-m-result-actions > :only-child {
  grid-column: 1 / -1;
}

.wt-m-lens {
  display: grid;
  gap: 10px;
}

.wt-m-lens-option {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 56px;
  padding: 12px 16px;
  border-radius: var(--wt-radius-md);
  border: 1px solid var(--wt-line-strong);
  background: rgba(var(--wt-night-rgb), 0.6);
  color: var(--wt-cream);
  font-family: var(--wt-font-head);
  font-size: 1.05rem;
  font-weight: 600;
  text-align: left;
}

.wt-m-lens-option i {
  width: 24px;
  color: var(--wt-gold);
}

.wt-m-lens-option.is-active {
  background: linear-gradient(135deg, var(--wt-gold), var(--wt-sogan));
  border-color: var(--wt-gold);
  color: var(--wt-ink);
}

.wt-m-lens-option.is-active i {
  color: var(--wt-ink);
}

.wt-m-more {
  margin-top: 4px;
}

.wt-m-more summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--wt-gold);
  font-weight: 600;
  cursor: pointer;
}

.wt-m-duo {
  margin-bottom: 14px;
}

.wt-m-duo .wt-duo-total {
  padding: 4px 0;
}

.wt-m-segment {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  padding: 6px;
  margin-bottom: 12px;
  border-radius: var(--wt-radius-md);
  background: rgba(var(--wt-night-rgb), 0.7);
  border: 1px solid var(--wt-line);
}

.wt-m-segment-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-height: 52px;
  padding: 8px;
  border: none;
  border-radius: var(--wt-radius-sm);
  background: transparent;
  color: var(--wt-muted);
  font-family: var(--wt-font-body);
}

.wt-m-segment-name {
  font-size: 0.75rem;
}

.wt-m-segment-result {
  font-family: var(--wt-font-head);
  font-size: 1rem;
  font-weight: 700;
}

.wt-m-segment-option.is-active {
  background: linear-gradient(135deg, var(--wt-gold), var(--wt-sogan));
  color: var(--wt-ink);
}

.wt-m-cal-month {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.wt-m-cal-heading {
  flex: 1 1 auto;
  text-align: center;
}

.wt-m-cal-title {
  margin: 0;
  font-family: var(--wt-font-head);
  font-size: 1.2rem;
  color: var(--wt-cream);
}

.wt-m-cal-heading .wt-result-sub {
  margin: 2px 0 0;
}

.wt-m-cal-month .wt-m-icon:disabled {
  opacity: 0.35;
}

.wt-m-strip {
  position: relative;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  padding: 4px 2px 10px;
  margin-bottom: 12px;
}

.wt-m-strip::-webkit-scrollbar {
  display: none;
}

.wt-m-day {
  flex: 0 0 calc((100% - 36px) / 7);
  min-width: 44px;
  min-height: 76px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 6px 2px;
  border-radius: var(--wt-radius-md);
  border: 1px solid var(--wt-line);
  background: var(--wt-surface);
  color: var(--wt-cream);
  font-family: var(--wt-font-body);
  scroll-snap-align: start;
}

.wt-m-day-week {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--wt-faint);
}

.wt-m-day-num {
  font-family: var(--wt-font-head);
  font-size: 1.1rem;
  font-weight: 700;
}

.wt-m-day-pasaran {
  font-size: 0.6rem;
  color: var(--wt-muted);
}

.wt-m-day.is-today .wt-m-day-num {
  color: var(--wt-gold);
}

.wt-m-day.is-selected {
  background: linear-gradient(135deg, var(--wt-gold), var(--wt-sogan));
  border-color: var(--wt-gold);
  color: var(--wt-ink);
}

.wt-m-day.is-selected .wt-m-day-week,
.wt-m-day.is-selected .wt-m-day-pasaran,
.wt-m-day.is-selected .wt-m-day-num {
  color: var(--wt-ink);
}

.wt-m-wetonan {
  margin: 16px 0;
  padding: 6px 18px;
}

.wt-m-wetonan[open] {
  padding-bottom: 18px;
}

.wt-m-wetonan summary {
  min-height: 48px;
  display: flex;
  align-items: center;
  color: var(--wt-gold);
  font-family: var(--wt-font-head);
  font-weight: 700;
  cursor: pointer;
}

.wt-m-wetonan .wt-btn[hidden],
.wt-m-wetonan[hidden] {
  display: none;
}

.wt-m-dina-list {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.wt-m-fab {
  position: fixed;
  left: 16px;
  bottom: calc(var(--bottom-nav-height) + 16px + env(safe-area-inset-bottom, 0px));
  z-index: 35;
  min-height: 48px;
  padding: 10px 18px;
  box-shadow: 0 12px 28px rgba(var(--wt-night-rgb), 0.6);
}

.wt-m-toggle {
  margin-top: 12px;
}

.wt-m-duo-fields[hidden] {
  display: none;
}

.wt-m-story[hidden] {
  display: none;
}

.wt-m-story-bars {
  display: flex;
  gap: 4px;
  margin-bottom: 14px;
}

.wt-m-story-bar {
  flex: 1 1 0;
  height: 4px;
  border-radius: var(--wt-radius-sm);
  background: rgba(var(--wt-cream-rgb), 0.2);
  transition: background 0.2s ease;
}

.wt-m-story-bar.is-done {
  background: rgba(var(--wt-gold-rgb), 0.6);
}

.wt-m-story-bar.is-active {
  background: var(--wt-gold);
}

.wt-m-story-bar-duo.is-active {
  background: var(--wt-rose);
}

.wt-m-story-stage {
  position: relative;
  margin-bottom: 8px;
}

.wt-m-story-card {
  min-height: 52dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  padding: 28px 22px;
  box-sizing: border-box;
  background: linear-gradient(170deg, rgba(var(--wt-sogan-rgb), 0.35), var(--wt-surface));
}

.wt-m-story-card[data-group="duo"] {
  background: linear-gradient(170deg, rgba(var(--wt-rose-rgb), 0.22), var(--wt-surface));
}

.wt-m-story-text {
  margin: 0;
  font-family: var(--wt-font-head);
  font-size: 1.45rem;
  line-height: 1.45;
  color: var(--wt-cream);
}

.wt-m-story-count {
  margin: 0;
  font-size: 0.8rem;
  color: var(--wt-faint);
}

.wt-m-story-tap {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 35%;
  border: none;
  background: transparent;
  cursor: pointer;
}

.wt-m-story-tap:disabled {
  cursor: default;
}

.wt-m-story-tap:focus-visible {
  outline: 3px solid var(--wt-gold);
  outline-offset: -3px;
}

.wt-m-story-prev {
  left: 0;
}

.wt-m-story-next {
  right: 0;
}

.wt-m-story-hint {
  margin: 0 0 14px;
  text-align: center;
}

.wt-m-main .wt-today {
  gap: 4px;
  margin-bottom: 12px;
  padding: 16px;
}

.wt-m-main .wt-today-title {
  font-size: 1.5rem;
}

.wt-m-main .wt-today-list li {
  flex-direction: column;
  gap: 2px;
}

.wt-m-main .wt-today-when {
  text-align: left;
}

.wt-m-hub {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 20px;
  filter: drop-shadow(0 0 1px var(--wt-gold)) drop-shadow(0 8px 12px rgba(var(--wt-night-rgb), 0.7));
}

.wt-m-hub .wt-hub-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-height: 236px;
  padding: 64px 12px 16px;
  border: none;
  border-radius: 0;
  text-align: center;
  background:
    radial-gradient(ellipse 60% 40% at 50% 18%, rgba(var(--wt-blencong-rgb), 0.35), transparent 70%),
    linear-gradient(180deg, var(--wt-sogan), rgba(var(--wt-night-rgb), 0.96) 75%);
  clip-path: polygon(50% 0, 64% 9%, 80% 22%, 94% 38%, 100% 50%, 100% 100%, 0 100%, 0 50%, 6% 38%, 20% 22%, 36% 9%);
  box-shadow: none;
}

.wt-m-hub .wt-hub-card:last-child:nth-child(odd) {
  grid-column: 1 / -1;
  justify-self: center;
  width: calc(50% - 7px);
}

.wt-m-hub .wt-hub-title {
  font-size: 1.02rem;
  line-height: 1.2;
}

.wt-m-hub .wt-hub-text {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.8rem;
  line-height: 1.4;
}

.wt-m-tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  min-height: var(--bottom-nav-height);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: linear-gradient(180deg, var(--wt-night), var(--wt-sogan));
  border-top: 1px solid var(--wt-gold);
}

.wt-m-tabbar::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -9px;
  height: 8px;
  background: conic-gradient(from 135deg at 50% 100%, var(--wt-gold) 0 90deg, transparent 0) bottom left / 16px 8px repeat-x;
  opacity: 0.8;
  pointer-events: none;
}

.wt-m-tab {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 44px;
  text-align: center;
  white-space: nowrap;
  color: var(--wt-faint);
  text-decoration: none;
  font-size: 0.72rem;
  font-weight: 600;
}

.wt-m-tab i {
  font-size: 1.1rem;
}

.wt-m-tab.is-active {
  color: var(--wt-gold);
}

.wt-m-tab.is-active::before {
  content: "";
  position: absolute;
  top: 4px;
  width: 9px;
  height: 12px;
  background: var(--wt-blencong);
  clip-path: var(--wt-gunungan);
}

@media (prefers-reduced-motion: reduce) {
  .wt-m-carousel {
    scroll-behavior: auto;
  }

  .wt-m-progress-bar span,
  .wt-m-dot::before,
  .wt-m-story-bar {
    transition: none;
  }
}
