/* Mind ritual — guided flow */

.ritual-body {
  min-height: 100svh;
  background: #141414;
  color: #F4F4F4;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-x: hidden;
}

.ritual-home {
  position: fixed;
  top: calc(12px + env(safe-area-inset-top, 0px));
  left: calc(16px + env(safe-area-inset-left, 0px));
  z-index: 10;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: rgba(244, 244, 244, .5);
  text-decoration: none;
  border-radius: 10px;
  transition: color .2s, background .2s;
}

.ritual-home:hover {
  color: #F4F4F4;
  background: rgba(255, 255, 255, .06);
}

.ritual-progress {
  position: fixed;
  top: calc(20px + env(safe-area-inset-top, 0px));
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.ritual-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(244, 244, 244, .2);
  transition: background .3s, transform .3s;
}

.ritual-dot.is-active {
  background: #C41E3A;
  transform: scale(1.3);
}

.ritual-dot.is-done {
  background: rgba(196, 30, 58, .5);
}

.ritual {
  width: min(100%, 440px);
  min-height: 100svh;
  padding:
    calc(64px + env(safe-area-inset-top, 0px))
    calc(24px + env(safe-area-inset-right, 0px))
    calc(32px + env(safe-area-inset-bottom, 0px))
    calc(24px + env(safe-area-inset-left, 0px));
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.flow-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  animation: flow-in .45s cubic-bezier(.22, .61, .36, 1) both;
}

.flow-screen[hidden] { display: none; }

@keyframes flow-in {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}

.flow-eyebrow {
  font-family: ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: #C41E3A;
  margin-bottom: 16px;
}

.flow-title {
  font-family: "Montserrat var", system-ui, sans-serif;
  font-weight: 200;
  font-size: clamp(32px, 8vw, 44px);
  letter-spacing: .08em;
  text-transform: uppercase;
  line-height: 1.1;
  margin-bottom: 16px;
}

.flow-heading {
  font-family: "Montserrat var", system-ui, sans-serif;
  font-weight: 300;
  font-size: clamp(24px, 6vw, 32px);
  letter-spacing: .06em;
  margin-bottom: 8px;
}

.flow-lead {
  font-size: 16px;
  line-height: 1.55;
  color: rgba(244, 244, 244, .65);
  max-width: 320px;
  margin-bottom: 32px;
}

.flow-hint {
  font-size: 14px;
  color: rgba(244, 244, 244, .45);
  margin-bottom: 20px;
}

.flow-hint strong { color: rgba(244, 244, 244, .7); font-weight: 500; }

.flow-streak {
  font-size: 13px;
  color: #C41E3A;
  margin-bottom: 24px;
  letter-spacing: .04em;
}

.flow-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 280px;
  padding: 16px 28px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: transform .15s, opacity .15s, background .2s;
}

.flow-btn:active { transform: scale(.97); }

.flow-btn:disabled {
  opacity: .35;
  cursor: not-allowed;
  transform: none;
}

.flow-btn-primary {
  background: #C41E3A;
  color: #FFF;
}

.flow-btn-primary:hover:not(:disabled) { background: #9E1830; }

.flow-btn-ghost {
  background: transparent;
  color: rgba(244, 244, 244, .5);
  border: 1px solid rgba(244, 244, 244, .15);
  margin-top: 12px;
}

.flow-btn-ghost:hover { color: #F4F4F4; border-color: rgba(244, 244, 244, .3); }

.flow-btn-focus {
  background: #F4F4F4;
  color: #141414;
  margin-top: 8px;
}

.flow-link {
  display: block;
  margin-top: 20px;
  font-size: 13px;
  color: rgba(244, 244, 244, .4);
  text-decoration: none;
}

.flow-link:hover { color: #C41E3A; }

/* Unload */

.thought-input-wrap {
  width: 100%;
  margin-bottom: 20px;
}

.thought-input {
  width: 100%;
  padding: 16px 18px;
  font-family: inherit;
  font-size: 17px;
  color: #F4F4F4;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 14px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}

.thought-input::placeholder { color: rgba(244, 244, 244, .3); }

.thought-input:focus {
  border-color: rgba(196, 30, 58, .5);
  box-shadow: 0 0 0 3px rgba(196, 30, 58, .15);
}

.thought-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  width: 100%;
  min-height: 60px;
  margin-bottom: 28px;
}

.thought-chip {
  padding: 10px 14px;
  font-size: 14px;
  line-height: 1.3;
  color: #F4F4F4;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 999px;
  animation: chip-pop .35s cubic-bezier(.16, 1.08, .32, 1.28) both;
  max-width: 100%;
  word-break: break-word;
}

@keyframes chip-pop {
  from { opacity: 0; transform: scale(.8); }
  to   { opacity: 1; transform: scale(1); }
}

.thought-chip.is-removing {
  animation: chip-out .3s ease forwards;
}

@keyframes chip-out {
  to { opacity: 0; transform: scale(.6); }
}

/* Sort */

.flow-sort-progress {
  font-family: ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: .15em;
  color: rgba(244, 244, 244, .4);
  margin-bottom: 24px;
}

.sort-card {
  width: 100%;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 24px;
  margin-bottom: 28px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 20px;
  animation: card-in .4s cubic-bezier(.16, 1.08, .32, 1.28) both;
}

@keyframes card-in {
  from { opacity: 0; transform: translateX(24px); }
  to   { opacity: 1; transform: none; }
}

.sort-card.is-exit {
  animation: card-out .25s ease forwards;
}

@keyframes card-out {
  to { opacity: 0; transform: translateX(-24px); }
}

.sort-card-text {
  font-size: 18px;
  line-height: 1.45;
  color: #F4F4F4;
}

.sort-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  width: 100%;
  margin-bottom: 16px;
}

.sort-btn {
  padding: 18px 8px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 14px;
  cursor: pointer;
  transition: transform .12s, background .2s, border-color .2s;
}

.sort-btn:active { transform: scale(.95); }

.sort-now {
  color: #C41E3A;
  background: rgba(196, 30, 58, .1);
  border-color: rgba(196, 30, 58, .3);
}

.sort-now:hover { background: rgba(196, 30, 58, .2); }

.sort-later {
  color: rgba(244, 244, 244, .8);
  background: rgba(255, 255, 255, .05);
}

.sort-later:hover { background: rgba(255, 255, 255, .1); }

.sort-letgo {
  color: rgba(244, 244, 244, .45);
  background: transparent;
}

.sort-letgo:hover {
  color: rgba(244, 244, 244, .7);
  background: rgba(255, 255, 255, .04);
}

.sort-hint { margin-top: 8px; }

/* Pick */

.pick-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  margin-bottom: 24px;
}

.pick-item {
  width: 100%;
  padding: 18px 20px;
  font-family: inherit;
  font-size: 16px;
  text-align: left;
  color: #F4F4F4;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 14px;
  cursor: pointer;
  transition: border-color .2s, background .2s, transform .12s;
}

.pick-item:hover {
  border-color: #C41E3A;
  background: rgba(196, 30, 58, .08);
}

.pick-item:active { transform: scale(.98); }

/* Focus */

.flow-screen-focus {
  justify-content: center;
  min-height: calc(100svh - 120px);
}

.focus-task {
  font-size: 15px;
  color: rgba(244, 244, 244, .55);
  margin-bottom: 32px;
  max-width: 280px;
  line-height: 1.4;
}

.focus-ring-wrap {
  position: relative;
  width: 200px;
  height: 200px;
  margin-bottom: 32px;
}

.focus-ring {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.focus-ring-bg {
  fill: none;
  stroke: rgba(255, 255, 255, .08);
  stroke-width: 4;
}

.focus-ring-fill {
  fill: none;
  stroke: #C41E3A;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 339.292;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1s linear;
}

.focus-time {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Montserrat var", system-ui, sans-serif;
  font-weight: 200;
  font-size: 42px;
  letter-spacing: .04em;
}

.focus-quit {
  margin-top: 20px;
  font-size: 12px;
}

/* Done */

.done-check {
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  font-size: 32px;
  color: #C41E3A;
  border: 2px solid #C41E3A;
  border-radius: 50%;
  animation: done-pop .5s cubic-bezier(.16, 1.08, .32, 1.28) both;
}

@keyframes done-pop {
  from { opacity: 0; transform: scale(.5); }
  to   { opacity: 1; transform: scale(1); }
}

.done-mood {
  margin-bottom: 28px;
}

.mood-btns {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 12px;
}

.mood-btn {
  width: 48px;
  height: 48px;
  font-size: 22px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 12px;
  cursor: pointer;
  transition: transform .12s, border-color .2s, background .2s;
}

.mood-btn:hover { background: rgba(255, 255, 255, .1); }

.mood-btn.is-picked {
  border-color: #C41E3A;
  background: rgba(196, 30, 58, .15);
  transform: scale(1.1);
}

@media (prefers-reduced-motion: reduce) {
  .flow-screen,
  .thought-chip,
  .sort-card,
  .done-check { animation: none; }
  .focus-ring-fill { transition: none; }
}
