@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Inter:wght@300;400;500;600&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  background: #0e0414;
  /* Never let anything push the page sideways on mobile */
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  /* The blooms live on body::before so they can drift (quiet design: gentle ambient life) */
  --bloom: radial-gradient(ellipse 80% 50% at 70% 0%, #3a0e3c 0%, transparent 65%),
           radial-gradient(ellipse 60% 40% at 10% 90%, #1e0832 0%, transparent 60%),
           #130518;
  background: transparent;
  color: #f0e8e0;
  line-height: 1.5;
  max-width: 640px;
  margin: 0 auto;
  /* Bottom padding clears the floating nav so content never hides behind it */
  /* Top padding clears the iOS status bar (and its blur) when installed to the home screen */
  padding: calc(48px + env(safe-area-inset-top)) 24px calc(120px + env(safe-area-inset-bottom));
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  opacity: 0;
  transition: opacity 0.15s ease;
}

body.loaded {
  opacity: 1;
}

body::before {
  content: '';
  position: fixed;
  inset: -12%;
  z-index: -1;
  pointer-events: none;
  background: var(--bloom);
  animation: bloomDrift 50s ease-in-out infinite alternate;
}

/* Visible if you look, never pulling the eye: one slow wander every ~50s */
@keyframes bloomDrift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(-5%, 4%, 0) scale(1.06); }
}

/* Fresh starts: one wordless mood per habit-day (applyDawn() in app.js).
   Same palette, blooms drift and shift between plum and indigo. Text sits on
   glass cards, so contrast floors are unaffected (bloom peaks stay ≤ #3a0e3c-ish). */
body.dawn-0 { --bloom: radial-gradient(ellipse 80% 50% at 70% 0%, #3a0e3c 0%, transparent 65%),
                          radial-gradient(ellipse 60% 40% at 10% 90%, #1e0832 0%, transparent 60%), #130518; }
body.dawn-1 { --bloom: radial-gradient(ellipse 70% 45% at 25% 0%, #361040 0%, transparent 65%),
                          radial-gradient(ellipse 65% 45% at 90% 85%, #220a36 0%, transparent 60%), #130518; }
body.dawn-2 { --bloom: radial-gradient(ellipse 90% 55% at 50% 0%, #3a0e3c 0%, transparent 62%),
                          radial-gradient(ellipse 55% 35% at 85% 60%, #1c0830 0%, transparent 60%), #130518; }
body.dawn-3 { --bloom: radial-gradient(ellipse 75% 50% at 85% 10%, #2e0c3e 0%, transparent 65%),
                          radial-gradient(ellipse 70% 45% at 15% 70%, #2a0a34 0%, transparent 60%), #130518; }
body.dawn-4 { --bloom: radial-gradient(ellipse 80% 50% at 10% 5%, #3c0f38 0%, transparent 62%),
                          radial-gradient(ellipse 60% 40% at 70% 95%, #1e0832 0%, transparent 60%), #130518; }
body.dawn-5 { --bloom: radial-gradient(ellipse 85% 50% at 60% 0%, #34113c 0%, transparent 65%),
                          radial-gradient(ellipse 50% 35% at 5% 50%, #200934 0%, transparent 60%),
                          radial-gradient(ellipse 50% 30% at 95% 95%, #1a072c 0%, transparent 60%), #130518; }
body.dawn-6 { --bloom: radial-gradient(ellipse 70% 45% at 40% 0%, #2c0d40 0%, transparent 65%),
                          radial-gradient(ellipse 70% 45% at 60% 90%, #2a0c36 0%, transparent 60%), #130518; }
body.dawn-7 { --bloom: radial-gradient(ellipse 80% 50% at 95% 0%, #3a0e3c 0%, transparent 60%),
                          radial-gradient(ellipse 65% 40% at 30% 80%, #240a38 0%, transparent 60%), #130518; }

/* Header */
header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: 64px;
  gap: 0;
}

/* App header (Oedipa title, profile, Surprise me, lock) belongs to Home only.
   Secondary views use their own title as the page header. */
body.secondary-view #header {
  display: none;
}

.header-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  width: 100%;
}

h1 {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: clamp(2.8rem, 10vw, 6.5rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  color: #f0e8e0;
  line-height: 1;
  cursor: pointer;
}

.subtle {
  font-style: italic;
  color: rgba(240, 232, 224, 0.4);
  font-size: 0.45em;
  white-space: nowrap;
}

.header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  width: 100%;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 16px;
  padding-top: 12px;
}

/* Surprise button */
/* Tertiary nav (Treats / Hard Things links at bottom of main view) */
.tertiary-nav {
  margin-top: 48px;
  padding: 16px 0;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 0;
}

.tertiary-link {
  background: none;
  border: none;
  color: rgba(240, 232, 224, 0.58);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 6px 14px;
  transition: color 0.15s ease;
  white-space: nowrap;
}

.tertiary-link + .tertiary-link::before {
  content: '·';
  margin-right: 14px;
  color: rgba(240, 232, 224, 0.18);
  pointer-events: none;
}

.tertiary-link:hover {
  color: rgba(240, 232, 224, 0.85);
}

/* ============ Floating radial nav ============ */

/* Dock: a fixed, full-width, click-through strip that centres the core. Only the
   core (and the petals, while fanned out) catch taps. */
.floating-nav-dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(20px + env(safe-area-inset-bottom));
  display: flex;
  justify-content: center;
  pointer-events: none;
  z-index: 60;
}

/* The petals are positioned around the core's centre; app.js sets each petal's
   --petal-x / --petal-y once, from NAV_FAN (radius and arc). */
.floating-nav {
  position: relative;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  --nav-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --nav-soft: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Core: a Liquid Glass circle showing where you are. Open, it fills sage and its
   glyph turns a quarter-and-a-half into an ×. */
.floating-nav-core {
  position: relative;
  z-index: 2;
  pointer-events: auto;
  width: 64px;
  height: 64px;
  padding: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #e8c896;
  font-family: inherit;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.075);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 10px 34px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(22px) saturate(1.3);
  -webkit-backdrop-filter: blur(22px) saturate(1.3);
  transition: background 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease, color 0.28s ease;
}

.floating-nav-core-face,
.floating-nav-core-close {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.28s var(--nav-spring), opacity 0.2s var(--nav-soft);
}

.floating-nav-core-close {
  opacity: 0;
  transform: rotate(0deg) scale(0.6);
}

.floating-nav-core svg,
.floating-nav-icon svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: block;
}

.floating-nav-core-close svg {
  stroke-width: 1.8;
}

.floating-nav:not(.collapsed) .floating-nav-core {
  color: #130518; /* plum-black on sage: ~10:1 */
  background: #b5c99a;
  border-color: rgba(181, 201, 154, 0.9);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 0 0 1px rgba(181, 201, 154, 0.35), 0 8px 36px -6px rgba(181, 201, 154, 0.55);
}

.floating-nav:not(.collapsed) .floating-nav-core-face {
  opacity: 0;
  transform: rotate(135deg) scale(0.6);
}

.floating-nav:not(.collapsed) .floating-nav-core-close {
  opacity: 1;
  transform: rotate(135deg) scale(1);
}

/* Petals: small glass circles that sit hidden behind the core, then spring out
   along the arc, one after another (delays set in app.js). */
.floating-nav-item {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 1;
  width: 56px;
  height: 56px;
  margin: -28px 0 0 -28px;
  padding: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(240, 232, 224, 0.62); /* icon-only: well above the 3:1 floor */
  font-family: inherit;
  cursor: pointer;
  /* a plum-tinted glass, deeper than a card, so the icon reads over busy rows */
  background: linear-gradient(rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.08)), rgba(28, 10, 34, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 8px 26px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(22px) saturate(1.3);
  -webkit-backdrop-filter: blur(22px) saturate(1.3);
  opacity: 0;
  pointer-events: none;
  transform: translate(0, 0) scale(0.2);
  transition: transform 0.46s var(--nav-spring),
              opacity 0.28s var(--nav-soft),
              color 0.2s ease,
              border-color 0.2s ease;
}

.floating-nav:not(.collapsed) .floating-nav-item {
  opacity: 1;
  pointer-events: auto;
  transform: translate(var(--petal-x, 0px), var(--petal-y, 0px)) scale(1);
}

.floating-nav:not(.collapsed) .floating-nav-item:hover {
  color: rgba(240, 232, 224, 0.9);
  border-color: rgba(200, 168, 122, 0.5);
}

/* Current page: warm amber, a touch more glass */
.floating-nav-item.active {
  color: #e8c896;
  background: linear-gradient(rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.12)), rgba(28, 10, 34, 0.62);
  border-color: rgba(200, 168, 122, 0.45);
}

.floating-nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Label under each petal. Part of the button, so tapping the word works too.
   Ivory 0.78 over the dimmed page: ~9:1. */
.floating-nav-label {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  padding: 2px 4px;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.2;
  white-space: nowrap;
  color: rgba(240, 232, 224, 0.78);
  text-shadow: 0 1px 8px rgba(19, 5, 24, 0.9);
}

.floating-nav-item.active .floating-nav-label {
  color: #e8c896;
}

/* Scrim: while the fan is open the page sinks back (plum shade + soft blur) so
   the menu is the only thing in focus. A tap on it closes the menu without
   reaching anything underneath. */
.floating-nav-scrim {
  position: fixed;
  inset: 0;
  z-index: 59; /* just under the dock */
  background: rgba(19, 5, 24, 0.62);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.floating-nav-scrim.open {
  opacity: 1;
  pointer-events: auto;
}

.floating-nav-core:focus-visible,
.floating-nav-item:focus-visible {
  outline: 2px solid #c8a87a;
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .floating-nav-core,
  .floating-nav-core-face,
  .floating-nav-core-close,
  .floating-nav-item,
  .floating-nav-scrim {
    transition-duration: 0.001ms !important;
    transition-delay: 0s !important;
  }
}

/* Categories */
.category {
  margin-bottom: 56px;
}

.category + .category::before {
  content: none;
}

.category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.category-header h2 {
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: rgba(181, 201, 154, 0.8);
}

.add-btn {
  width: 24px;
  height: 24px;
  border-radius: 100px;
  border: 1px solid rgba(181, 201, 154, 0.25);
  background: rgba(181, 201, 154, 0.08);
  font-size: 1rem;
  color: rgba(181, 201, 154, 0.5);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.add-btn:hover {
  border-color: rgba(181, 201, 154, 0.5);
  color: #b5c99a;
  background: rgba(181, 201, 154, 0.14);
}

/* Task list */
.task-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.task-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.10), 0 4px 20px rgba(0, 0, 0, 0.2);
  animation: fadeIn 0.2s ease;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  user-select: none;
  -webkit-user-select: none;
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
}

.task-item:hover {
  background: rgba(255, 255, 255, 0.075);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.13), 0 6px 24px rgba(0, 0, 0, 0.25);
}

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

.task-checkbox {
  width: 20px;
  height: 20px;
  border-radius: 8px;
  border: 1.5px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s ease;
  position: relative;
}

.task-checkbox:hover {
  border-color: rgba(181, 201, 154, 0.6);
  background: rgba(181, 201, 154, 0.08);
}

.task-checkbox.checked {
  background: rgba(181, 201, 154, 0.85);
  border-color: #b5c99a;
  box-shadow: 0 0 12px rgba(181, 201, 154, 0.35);
}

.task-checkbox.checked::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 6px;
  width: 4px;
  height: 8px;
  border: solid #1a0820;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}

.task-text {
  flex: 1;
  min-width: 0;
  font-size: 0.85rem;
  font-weight: 400;
  color: rgba(240, 232, 224, 0.88);
  letter-spacing: 0.01em;
  user-select: none;
}

/* A URL — whether it's the whole field or just part of a longer pasted line — renders
   as a compact chip (favicon + page title + domain) instead of the raw, often huge,
   tracking-parameter-laden link. inline-flex so it sits correctly mid-sentence when
   there's surrounding text, not just when the link is the entire field. */
.task-link {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  gap: 8px;
  max-width: 100%;
  color: #b5c99a;
  text-decoration: none;
}

.task-link:hover .task-link-title {
  text-decoration: underline;
}

.task-link-favicon {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  flex-shrink: 0;
}

.task-link-text {
  display: inline-flex;
  flex-direction: column;
  min-width: 0;
  max-width: 220px;
}

.task-link-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-link-domain {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.7rem;
  letter-spacing: 0.02em;
  color: rgba(240, 232, 224, 0.58);
}

.task-text-input {
  flex: 1;
  font-size: 0.85rem;
  font-weight: 300;
  border: none;
  border-bottom: 1px solid rgba(181, 201, 154, 0.4);
  outline: none;
  padding: 2px 0;
  font-family: inherit;
  background: transparent;
  color: #f0e8e0;
}

textarea.task-text-input {
  resize: none;
  overflow: hidden;
  line-height: 1.4;
  min-height: 1.2em;
}

.task-item.editing {
  align-items: flex-start;
}

.task-item.editing .task-checkbox,
.task-item.editing .task-actions {
  margin-top: 2px;
}

.task-actions {
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.1s ease;
}

.task-item:hover .task-actions {
  opacity: 1;
}

.task-action-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.7rem;
  color: rgba(240, 232, 224, 0.58);
  padding: 4px 6px;
  transition: color 0.1s ease;
  letter-spacing: 0.05em;
}

.task-action-btn:hover {
  color: #f0e8e0;
}

.task-action-btn.delete:hover {
  color: #ff375f;
}

/* Project slider */
.project-item {
  display: block;
  padding: 16px;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.10), 0 4px 20px rgba(0, 0, 0, 0.2);
  margin-bottom: 8px;
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

.project-item:hover {
  background: rgba(255, 255, 255, 0.075);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.13), 0 6px 24px rgba(0, 0, 0, 0.25);
}

.project-item .project-top {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 8px;
}

.project-item .task-text {
  font-size: 0.85rem;
}

.project-item .task-actions {
  flex-shrink: 0;
}

/* Progress bar */
.progress-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* The slider: a bar with a circle you drag (setProgress() in app.js). --p (0–100) places the
   circle and fills the bar. Side padding of half the circle keeps it inside the row at 0 and 100%. */
.progress-slider {
  --thumb: 22px;
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  height: 44px; /* tap floor */
  padding: 0 calc(var(--thumb) / 2);
}

.progress-track {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 100px;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
}

.progress-fill {
  width: calc(var(--p, 0) * 1%);
  height: 100%;
  background: linear-gradient(90deg, #b5c99a, #d4e8b8);
  border-radius: 100px;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 8px rgba(181, 201, 154, 0.4);
}

/* The circle: ivory glass with a sage rim and glow; only shown when unlocked. Its boundary
   (sage rim on ivory, ivory on the plum card) is well over 3:1. */
.progress-thumb {
  display: none;
  position: absolute;
  top: 50%;
  left: calc(var(--thumb) / 2 + (100% - var(--thumb)) * var(--p, 0) / 100);
  width: var(--thumb);
  height: var(--thumb);
  margin: calc(var(--thumb) / -2) 0 0 calc(var(--thumb) / -2);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fffaf3, #e9e0d4 70%);
  border: 1px solid rgba(181, 201, 154, 0.9);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 0 10px rgba(181, 201, 154, 0.45), 0 2px 6px rgba(0, 0, 0, 0.35);
  cursor: grab;
  touch-action: none; /* a drag moves the circle, not the page */
  transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
}

/* Pressed: the circle swells under the finger with a little spring, before it even moves */
.progress-thumb:active {
  transform: scale(1.15);
}

body.admin-mode .progress-thumb { display: block; }

/* 44px square to grab, without making the circle look bigger */
.progress-thumb::after {
  content: '';
  position: absolute;
  inset: -11px;
}

.progress-thumb:focus-visible {
  outline: 2px solid rgba(181, 201, 154, 0.9);
  outline-offset: 3px;
}

/* While dragging: the circle follows the finger exactly (no transition, so no lag or steps) and
   lifts a little; on release it springs back to size and settles onto the whole percent */
.progress-slider.is-dragging .progress-fill,
.progress-slider.is-dragging .progress-thumb {
  transition: none;
}

.progress-slider.is-dragging .progress-thumb {
  cursor: grabbing;
  transform: scale(1.15);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 0 16px rgba(181, 201, 154, 0.7), 0 3px 8px rgba(0, 0, 0, 0.4);
}

.progress-label {
  font-size: 0.7rem;
  color: rgba(181, 201, 154, 0.72);
  letter-spacing: 0.05em;
  min-width: 28px;
  text-align: right;
  flex-shrink: 0;
}

/* Done — the rule (CLAUDE.md, "Done treatment"): finished things are greyed out and sit
   last. A done row drops the glass card (no fill, border, shadow or blur): only a hairline
   under it, so it reads as settled rather than as something to act on. All its text is
   ivory 0.58 — the 4.5:1 floor on every surface — with the name struck through. No container
   opacity: it would multiply into the text and push it under the floor. */
.done-section .task-item,
.task-item.done {
  background: none;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  padding-top: 10px;
  padding-bottom: 10px;
}

.done-section .task-text,
.task-item.done .task-text {
  text-decoration: line-through;
  color: rgba(240, 232, 224, 0.58);
}

.done-section .category-header h2 {
  color: rgba(240, 232, 224, 0.58); /* the heading greys with its rows: ivory at the floor, not sage */
}

/* A checked box keeps its fill (it says "done") but loses its glow; at 0.7 the sage still
   clears the 3:1 floor for a control */
.done-section .task-checkbox.checked,
.task-item.done .task-checkbox.checked {
  opacity: 0.7;
  box-shadow: none;
}

.done-date {
  font-size: 0.7rem;
  color: rgba(240, 232, 224, 0.58);
  white-space: nowrap;
  letter-spacing: 0.05em;
}

.done-section .restore {
  opacity: 0;
  transition: opacity 0.1s ease;
}

.done-section .task-item:hover .restore {
  opacity: 1;
}

.olympus-restore {
  margin-top: 12px;
  font-size: 0.7rem;
  color: rgba(240, 232, 224, 0.58);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Overlay */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(13, 4, 20, 0.72);
  backdrop-filter: blur(40px) saturate(140%);
  -webkit-backdrop-filter: blur(40px) saturate(140%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: overlayIn 0.25s ease;
}

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

.overlay.hidden {
  display: none;
}

.overlay-content {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 28px;
  padding: 56px 48px 44px;
  text-align: center;
  max-width: 420px;
  width: 90%;
  max-height: 90vh;
  max-height: 90dvh;
  overflow-y: auto;
  animation: popIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18),
              0 32px 80px rgba(0, 0, 0, 0.5),
              0 0 0 1px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
}

@keyframes popIn {
  from { opacity: 0; transform: translateY(24px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.overlay-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: rgba(181, 201, 154, 0.9);
  margin-bottom: 16px;
  font-weight: 500;
}

.overlay-task {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 2.2rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  margin-bottom: 40px;
  line-height: 1.2;
  color: #f0e8e0;
}

.overlay-task.spinning {
  animation: slotSpin 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slotSpin {
  0% { opacity: 0; transform: translateY(24px); }
  100% { opacity: 1; transform: translateY(0); }
}

.overlay-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.btn-primary, .btn-secondary {
  padding: 12px 28px;
  border-radius: 100px;
  font-size: 0.7rem;                 /* legibility floor (~11px), phones included */
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.btn-primary {
  background: rgba(181, 201, 154, 0.85);
  color: #1a0820;
  border: 1px solid rgba(181, 201, 154, 0.5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 4px 16px rgba(181, 201, 154, 0.25);
}

.btn-primary:hover {
  background: rgba(196, 216, 168, 0.95);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 6px 20px rgba(181, 201, 154, 0.35);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(240, 232, 224, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.13);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-primary:disabled,
.btn-secondary:disabled {
  opacity: 0.55;
  cursor: default;
}

/* Waiting: the button keeps its label and an amber light sweeps across it (no spinner, no words) */
.btn-primary.is-waiting:disabled,
.btn-secondary.is-waiting:disabled {
  opacity: 1;
  cursor: progress;
}

.is-waiting::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(100deg, transparent 30%, rgba(200, 168, 122, 0.45) 50%, transparent 70%);
  background-size: 250% 100%;
  animation: waitShimmer 1.8s linear infinite;
}

@keyframes waitShimmer {
  from { background-position: 100% 0; }
  to   { background-position: -150% 0; }
}

/* The light passes under the label, never over it, so the words stay crisp while it sweeps */
.is-waiting { isolation: isolate; }
.is-waiting::before { z-index: -1; }

/* On the sage primary a 0.45 amber sweep all but vanishes, so the primary waits brighter:
   a warm ivory-amber light crosses the pill and an amber halo breathes around it, the same
   inner light as the logo's fissure. The dark label on a lighter pass stays above 7:1. */
.btn-primary.is-waiting::before {
  background: linear-gradient(100deg, transparent 22%, rgba(255, 232, 196, 0.75) 50%, transparent 78%);
  background-size: 250% 100%;
}

.btn-primary.is-waiting {
  animation: waitHalo 1.8s ease-in-out infinite;
}

@keyframes waitHalo {
  0%, 100% { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 4px 16px rgba(181, 201, 154, 0.25); }
  50%      { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 0 26px rgba(200, 168, 122, 0.55); }
}

/* Pills are ~36px tall; an invisible extension makes each one a full 44px tap target
   without making it look bigger */
.btn-primary, .btn-secondary, .btn-tertiary {
  position: relative;
}

.btn-primary::after, .btn-secondary::after, .btn-tertiary::after {
  content: '';
  position: absolute;
  inset: -5px 0; /* 34px visible + 10px = 44px */
}

/* The small + circles (24px) and "— N more" keep their look but get the 44px tap floor:
   an invisible ::after reaches about 10px past each side of the circle, and the text link
   takes a 44px line. */
.add-btn, .wardrobe-add-btn {
  position: relative;
  z-index: 1; /* above the list that starts just below, so its tap area isn't covered */
}

.add-btn::after, .wardrobe-add-btn::after {
  content: '';
  position: absolute;
  inset: -11px; /* measured from inside the 1px border: 22px + 22px = 44px square */
}

.show-more-btn {
  min-height: 44px;
}

/* Text action: the third action in a group. A group shows at most two buttons;
   anything beyond them is plain text on its own line, never a third pill. */
.btn-text {
  background: none;
  border: none;
  padding: 12px 4px;
  min-height: 44px; /* comfortable tap target without a visible container */
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;                /* ~11px: the legibility floor for anything you tap */
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(240, 232, 224, 0.62);  /* ~6:1 on the glass card; 0.45 was 3.9:1, below AA */
  text-decoration: underline;
  text-decoration-color: rgba(240, 232, 224, 0.28);
  text-underline-offset: 5px;
  cursor: pointer;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

.btn-text:hover {
  color: rgba(240, 232, 224, 0.85);
  text-decoration-color: rgba(240, 232, 224, 0.5);
}

.btn-text:disabled {
  opacity: 0.4;
  cursor: default;
}

/* A text action's own line, sharing the buttons' edge: overlay buttons are end-aligned,
   so the text action is too (one alignment per group). Start-aligned variant below sits
   under the thing it acts on (e.g. Remove photo under the photo). */
.action-text-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 4px;
}

/* Line its right edge up with the buttons' edge: drop the side padding that would inset it */
.action-text-row .btn-text {
  padding-left: 0;
  padding-right: 0;
}

.action-text-row-start {
  justify-content: flex-start;
  margin: -8px 0 8px;
}

.wardrobe-photo-controls .btn-text {
  order: 3;
  flex-basis: 100%;
  text-align: left;
}

/* Start-aligned text actions sit flush with the content edge above them */
.action-text-row-start .btn-text,
.wardrobe-photo-controls .btn-text {
  padding-left: 0;
  padding-right: 0;
}

/* Tertiary: maintenance actions (add, manage). Ghost pill — no fill, no glow. */
.btn-tertiary {
  padding: 12px 28px;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  background: transparent;
  color: rgba(240, 232, 224, 0.62);  /* 6.1–6.5:1 on card and page; 0.45 was 3.9:1 */
  border: 1px solid rgba(255, 255, 255, 0.09);
}

.btn-tertiary:hover {
  color: rgba(240, 232, 224, 0.75);
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.03);
}

/* Treat overlay label */
.overlay-label.treat-label {
  color: rgba(255, 55, 95, 0.9);
}

/* Hard thing overlay label */
.overlay-label.hardthing-label {
  color: rgba(200, 168, 122, 0.9);
}

/* Empty state */
.empty-state {
  color: rgba(240, 232, 224, 0.58);
  font-size: 0.8rem;
  padding: 12px 0;
  font-style: italic;
  font-family: 'Instrument Serif', Georgia, serif;
}

.list-hidden {
  display: none;
}

.show-more-btn {
  background: none;
  border: none;
  color: rgba(240, 232, 224, 0.58);
  font-family: 'Instrument Serif', Georgia, serif;
  font-style: italic;
  font-size: 0.85rem;
  cursor: pointer;
  padding: 8px 0;
  display: block;
  transition: color 0.15s ease;
}

.show-more-btn:hover {
  color: rgba(240, 232, 224, 0.78);
}

/* Hidden */
.hidden {
  display: none;
}

/* Back button — Apple chevron style */
.back-btn {
  background: none;
  border: none;
  color: rgba(240, 232, 224, 0.55);
  cursor: pointer;
  padding: 4px 0;
  display: flex;
  align-items: center;
  transition: color 0.15s ease;
  flex-shrink: 0;
  font-family: inherit;
}

.back-btn::before {
  content: '‹';
  font-size: 1.3rem;
  font-weight: 300;
  line-height: 1;
  margin-top: -1px;
  color: inherit;
}

.back-btn:hover {
  color: rgba(240, 232, 224, 0.85);
}

/* ============ Olympus View ============ */
.olympus-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 8px;
}

.olympus-title {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 2rem;
  font-weight: 400;
  color: #f0e8e0;
}

.olympus-subtitle {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 0.95rem;
  color: rgba(181, 201, 154, 0.72);
  margin-bottom: 56px;
  font-style: italic;
}

.olympus-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.olympus-card {
  position: relative;
  padding: 28px 24px;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 20px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.10), 0 4px 24px rgba(0, 0, 0, 0.22);
  animation: fadeIn 0.2s ease;
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
}

/* Quiet design: a faint amber light breathes behind each ascended project's title.
   Kept to the top of the card and ≤ 0.10 so the reflection text below keeps its contrast. */
.olympus-card::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(ellipse 70% 45% at 50% 0%, rgba(200, 168, 122, 0.10) 0%, transparent 70%);
  animation: olympusBreath 7s ease-in-out infinite alternate;
}

@keyframes olympusBreath {
  from { opacity: 0.35; }
  to   { opacity: 1; }
}

.olympus-card-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 16px;
}

.olympus-card-title {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 400;
  color: #f0e8e0;
}

.olympus-card-date {
  font-size: 0.7rem;
  color: rgba(181, 201, 154, 0.72);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.olympus-card-reflection {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 0.95rem;
  color: rgba(240, 232, 224, 0.58);
  font-style: italic;
  line-height: 1.7;
}

.olympus-empty {
  text-align: center;
  padding: 80px 0;
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 1rem;
  color: rgba(240, 232, 224, 0.58);
}

/* Edit/delete dropdown (mobile) */
.action-dropdown {
  position: fixed;
  background: rgba(30, 10, 40, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 16px;
  z-index: 1000;
  min-width: 90px;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 16px 40px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(30px) saturate(160%);
  -webkit-backdrop-filter: blur(30px) saturate(160%);
}

.action-dropdown button {
  display: block;
  width: 100%;
  background: none;
  border: none;
  padding: 11px 16px;
  min-height: 44px; /* tap target floor */
  text-align: left;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  color: rgba(240, 232, 224, 0.75);
  cursor: pointer;
  font-family: inherit;
  transition: background 0.1s ease, color 0.1s ease;
}

.action-dropdown button:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #f0e8e0;
}

.action-dropdown .dropdown-delete {
  color: #ff375f;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.action-dropdown .dropdown-delete:hover {
  color: #ff6080;
}

/* Mobile */
@media (max-width: 480px) {
  body {
    padding: calc(32px + env(safe-area-inset-top)) 20px calc(112px + env(safe-area-inset-bottom));
  }

  header {
    margin-bottom: 48px;
  }

  .header-actions {
    gap: 6px;
  }


  .task-actions {
    opacity: 1;
  }

  .overlay-content {
    padding: 40px 24px 32px;
  }

  .overlay-task {
    font-size: 1.8rem;
    margin-bottom: 28px;
  }

  /* Phones keep the tighter padding but never a smaller label */
  .btn-primary, .btn-secondary, .btn-tertiary {
    padding: 10px 20px;
  }

  .done-section .restore {
    opacity: 1;
  }

  #wardrobe-view .category-header {
    padding: 6px 0 14px;
  }
}

/* Lock button */
.lock-btn {
  background: none;
  border: none;
  color: rgba(240, 232, 224, 0.45);
  padding: 0 4px;
  font-size: 1rem;
  cursor: pointer;
  transition: color 0.15s ease;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-left: auto;
}
.lock-btn:hover { color: rgba(240, 232, 224, 0.65); }
body.admin-mode .lock-btn { color: rgba(181, 201, 154, 0.8); }
body.admin-mode .lock-btn:hover { color: #b5c99a; }

/* Hide all write elements when locked */
.add-btn { display: none; }
.task-checkbox { pointer-events: none; cursor: default; }
.task-action-btn.edit,
.task-action-btn.delete,
.task-action-btn.restore,
.task-action-btn.move { display: none; }

/* Restore in admin mode */
body.admin-mode .add-btn { display: flex; }
body.admin-mode .task-checkbox { pointer-events: auto; cursor: pointer; }
body.admin-mode .task-action-btn.edit,
body.admin-mode .task-action-btn.delete,
body.admin-mode .task-action-btn.restore,
body.admin-mode .task-action-btn.move { display: inline-block; }

@media (max-width: 480px) {
  /* On phones these live in the edit button's dropdown instead */
  body.admin-mode .task-action-btn.delete,
  body.admin-mode .task-action-btn.move { display: none; }
}

/* ============ Drag to reorder ============ */

.sortable-ghost {
  opacity: 0.2;
  background: rgba(181, 201, 154, 0.06);
}

.sortable-chosen {
  transform: scale(1.02);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 16px 40px rgba(0, 0, 0, 0.45);
  opacity: 0.95;
  z-index: 100;
}

/* ============ Project Steps ============ */

.step-toggle {
  background: none;
  border: none;
  color: rgba(240, 232, 224, 0.58);
  cursor: pointer;
  font-size: 0.85rem;
  padding: 8px 10px 8px 0;
  transition: color 0.1s ease;
  flex-shrink: 0;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
}

.step-toggle:hover {
  color: rgba(240, 232, 224, 0.78);
}

.steps-section {
  margin-top: 10px;
  padding-left: 16px;
  border-left: 1px solid rgba(181, 201, 154, 0.15);
}

.step-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.step-checkbox {
  width: 14px;
  height: 14px;
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.05);
  cursor: default;
  pointer-events: none;
  flex-shrink: 0;
  transition: all 0.1s ease;
  position: relative;
}

body.admin-mode .step-checkbox {
  cursor: pointer;
  pointer-events: auto;
}

body.admin-mode .step-checkbox:hover {
  border-color: rgba(181, 201, 154, 0.5);
}

.step-checkbox.checked {
  background: rgba(181, 201, 154, 0.8);
  border-color: #b5c99a;
}

.step-checkbox.checked::after {
  content: '';
  position: absolute;
  top: 1px;
  left: 3px;
  width: 3px;
  height: 6px;
  border: solid #1a0820;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}

.step-text {
  flex: 1;
  font-size: 0.78rem;
  color: rgba(240, 232, 224, 0.6);
  letter-spacing: 0.01em;
}

.step-text.done {
  text-decoration: line-through;
  color: rgba(240, 232, 224, 0.58);
}

body.admin-mode .step-text {
  cursor: text;
}

.step-delete {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.7rem;
  color: rgba(240, 232, 224, 0.42);
  padding: 2px 4px;
  opacity: 0;
  transition: all 0.1s ease;
  display: none;
}

body.admin-mode .step-delete {
  display: inline-block;
}

.step-item:hover .step-delete {
  opacity: 1;
}

/* ============ Oracle ============ */

.oracle-block {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 24px 20px 24px;
  margin-bottom: 32px;
  cursor: pointer;
  transition: background 0.2s ease, box-shadow 0.2s ease;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 2px 16px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
}

.oracle-block:hover {
  background: rgba(255, 255, 255, 0.065);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 4px 24px rgba(0, 0, 0, 0.22);
}

.oracle-source {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: rgba(181, 201, 154, 0.75);
  margin-bottom: 10px;
}

.oracle-preview {
  font-family: 'Instrument Serif', serif;
  font-size: 1.15rem;
  color: rgba(240, 232, 224, 0.88);
  line-height: 1.6;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.oracle-more-hint {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  color: rgba(240, 232, 224, 0.58);
  margin: 0;
}

.oracle-overlay-content {
  max-width: 560px;
  text-align: left;
  position: relative;
}

.oracle-x-btn {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  color: rgba(240, 232, 224, 0.45);
  font-size: 1.2rem;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
  transition: color 0.15s ease;
}

.oracle-x-btn:hover {
  color: rgba(240, 232, 224, 0.75);
}

.oracle-modal-title {
  font-family: 'Instrument Serif', serif;
  font-size: 1.1rem;
  color: #f0e8e0;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 12px 0;
}

.oracle-text-link {
  background: none;
  border: none;
  color: rgba(240, 232, 224, 0.58);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  cursor: pointer;
  padding: 0;
  transition: color 0.15s ease;
}

.oracle-text-link:hover {
  color: rgba(240, 232, 224, 0.78);
}

.oracle-para {
  margin-bottom: 1em;
}

.oracle-para:last-child {
  margin-bottom: 0;
}

.oracle-select-hint {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: rgba(240, 232, 224, 0.58);
  margin-bottom: 20px;
}

.oracle-full-text {
  font-family: 'Instrument Serif', serif;
  font-size: 1.15rem;
  line-height: 1.75;
  color: #f0e8e0;
  margin-bottom: 36px;
  max-height: 60vh;
  overflow-y: auto;
}

.oracle-sentence {
  display: inline;
  transition: color 0.12s ease;
}

body.admin-mode .oracle-sentence {
  cursor: pointer;
}

body.admin-mode .oracle-sentence:hover {
  color: rgba(181, 201, 154, 0.85);
}

.oracle-sentence.selected {
  color: #b5c99a;
}

.oracle-source-input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  color: #f0e8e0;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 8px 0;
  margin-bottom: 20px;
  outline: none;
  box-sizing: border-box;
}

.oracle-source-input::placeholder {
  color: rgba(240, 232, 224, 0.58);
  text-transform: uppercase;
}

.oracle-text-input {
  width: 100%;
  min-height: 200px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 12px;
  color: #f0e8e0;
  font-family: 'Instrument Serif', serif;
  font-size: 1rem;
  line-height: 1.7;
  padding: 16px;
  outline: none;
  resize: vertical;
  margin-bottom: 28px;
  box-sizing: border-box;
}

.oracle-text-input::placeholder {
  color: rgba(240, 232, 224, 0.58);
}

.oracle-edit-sentences {
  margin-bottom: 20px;
}

.oracle-edit-sentence-list {
  max-height: 160px;
  margin-bottom: 0;
}

.step-delete:hover {
  color: #ff375f;
}

.step-add-row {
  padding: 8px 0 4px;
}

.step-add-btn {
  background: none;
  border: none;
  color: rgba(181, 201, 154, 0.72);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
  transition: color 0.1s ease;
  display: none;
}

body.admin-mode .step-add-btn {
  display: inline-block;
}

.step-add-btn:hover {
  color: rgba(181, 201, 154, 0.92);
}

.step-text-input {
  font-size: 0.78rem;
  border: none;
  border-bottom: 1px solid rgba(181, 201, 154, 0.35);
  outline: none;
  padding: 2px 0;
  font-family: inherit;
  background: transparent;
  color: #f0e8e0;
  width: 100%;
  display: block;
  margin-bottom: 6px;
}


/* ============ Profile Selector ============ */
#profile-selector {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  gap: 40px;
  padding: 48px 24px;
}

#profile-selector.hidden {
  display: none;
}

.profile-logo {
  width: 200px;
  height: 200px;
  display: block;
  mix-blend-mode: screen;
  mask-image: radial-gradient(ellipse 75% 75% at center, black 35%, transparent 72%);
  -webkit-mask-image: radial-gradient(ellipse 75% 75% at center, black 35%, transparent 72%);
  filter: drop-shadow(0 0 32px rgba(200, 150, 60, 0.22));
  opacity: 0.92;
}

.profile-selector-title {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: clamp(2.8rem, 10vw, 6.5rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  color: #f0e8e0;
  line-height: 1;
  text-align: center;
  cursor: default;
}

.profile-selector-label {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(240, 232, 224, 0.58);
}

.profile-selector-btns {
  display: flex;
  gap: 16px;
}

.profile-btn {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 28px;
  color: #f0e8e0;
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 3rem;
  font-weight: 400;
  width: 140px;
  height: 140px;
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 8px 32px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
}

.profile-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(181, 201, 154, 0.35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 12px 40px rgba(0, 0, 0, 0.4);
  transform: translateY(-2px);
}

.profile-btn:active {
  transform: translateY(0);
  background: rgba(255, 255, 255, 0.09);
}

/* Profile switcher in header */
.profile-switcher-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(240, 232, 224, 0.58);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 6px 14px;
  cursor: pointer;
  transition: all 0.15s ease;
  border-radius: 100px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.profile-switcher-btn:hover {
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(255, 255, 255, 0.2);
  color: rgba(240, 232, 224, 0.8);
}

.app-footer {
  text-align: center;
  padding: 32px 24px;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: rgba(240, 232, 224, 0.58);
  font-family: Inter, sans-serif;
}

/* One-off celebration overlay */
.celebration-content {
  max-width: 460px;
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

/* Principle 3: big finishes. An amber inner light behind the quote, grander the longer the
   work was carried (tier set by playCeremony), like the fissure glow in logo.jpg */
.celebration-content {
  position: relative;
}

.celebration-content::before {
  content: '';
  position: absolute;
  inset: 10% 5%;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(212, 144, 42, 0.5) 0%, transparent 70%);
  filter: blur(30px);
  opacity: 0.18;
  pointer-events: none;
  z-index: -1;
}

.celebration-content.ceremony-long::before {
  opacity: 0.3;
}

.celebration-content.ceremony-epic::before {
  opacity: 0.42;
  animation: ceremonyGlow 4s ease-in-out infinite alternate;
}

@keyframes ceremonyGlow {
  from { transform: scale(0.94); }
  to { transform: scale(1.06); }
}

/* While the quote is being written (a few seconds), the panel isn't left empty: amber motes
   gather into a light where the words will appear (drawn by startQuoteWait() in app.js), which
   blooms open as the words arrive. The panel keeps the ceremony's height so it doesn't jump. */
.celebration-content {
  min-height: 260px; /* the same height waiting and blooming, so the light doesn't stretch */
}

.celebration-content.is-waiting-quote {
  justify-content: flex-end;
}

.celebration-content.is-waiting-quote .celebration-text {
  display: none;
}

.celebration-wait {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  pointer-events: none;
}

.celebration-wait.hidden {
  display: none;
}

.celebration-dismiss {
  position: relative;
  z-index: 1; /* above the gathering light */
}

.celebration-text {
  font-family: 'Instrument Serif', Georgia, serif;
  font-style: italic;
  font-size: 1.25rem;
  line-height: 1.85;
  color: #f0e8e0;
  min-height: 140px;
  padding: 0 24px;
  text-wrap: balance;
}

/* The quote surfaces out of the bloom (playCeremony): each word arrives as warm amber, out of
   focus, and settles into sharp ivory, starting at the centre of the light and spreading out
   (--d, set per word by its distance from the centre; --dur slows for work carried longer). */
.ceremony-word {
  animation: wordBloom var(--dur, 1.3s) ease-out var(--d, 0s) both;
}

/* Settled: the animation is gone and the word is plain, sharp ivory */
.ceremony-word.is-settled {
  animation: none;
  color: #f0e8e0;
  text-shadow: none;
}

/* Soft focus without a blur filter (iOS Safari can leave a filtered inline word stuck blurred):
   the letters start see-through with an amber glow standing in for them, then come into focus. */
@keyframes wordBloom {
  0%   { color: rgba(232, 196, 140, 0); text-shadow: 0 0 12px rgba(232, 196, 140, 0); }
  30%  { color: rgba(232, 196, 140, 0); text-shadow: 0 0 10px rgba(232, 196, 140, 0.9); }
  60%  { color: rgba(224, 189, 136, 0.75); text-shadow: 0 0 4px rgba(212, 144, 42, 0.6); }
  100% { color: #f0e8e0; text-shadow: 0 0 0 rgba(212, 144, 42, 0); }
}

/* Principle 3: small finishes settle with a calm amber beat; undoing gets a quieter sage one */
.finish-beat {
  animation: finishBeat 0.9s ease-out;
}

.undo-beat {
  animation: undoBeat 0.7s ease-out;
}

@keyframes finishBeat {
  0% { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 0 0 0 rgba(200, 168, 122, 0); }
  35% { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 0 0 1px rgba(200, 168, 122, 0.55), 0 0 26px rgba(200, 168, 122, 0.28); }
  100% { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 0 0 0 rgba(200, 168, 122, 0); }
}

@keyframes undoBeat {
  0% { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 0 0 0 rgba(181, 201, 154, 0); }
  40% { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 0 0 1px rgba(181, 201, 154, 0.4); }
  100% { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 0 0 0 rgba(181, 201, 154, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .finish-beat, .undo-beat, .celebration-content.ceremony-epic::before { animation: none; }
  body::before, .olympus-card::before { animation: none; }
  .is-waiting::before { animation: none; background: rgba(200, 168, 122, 0.18); }
  .btn-primary.is-waiting { animation: none; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 0 22px rgba(200, 168, 122, 0.45); }
  .btn-primary.is-waiting::before { background: rgba(255, 232, 196, 0.35); }
  .ceremony-word { animation: none; color: #f0e8e0; }
}

.celebration-dismiss {
  background: none;
  border: none;
  color: rgba(240, 232, 224, 0.58);
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  cursor: pointer;
  padding: 0;
  transition: color 0.15s ease;
}

.celebration-dismiss:hover {
  color: rgba(240, 232, 224, 0.78);
}

/* ============ Wardrobe ============ */

.wardrobe-add-btn {
  width: 24px;
  height: 24px;
  border-radius: 100px;
  border: 1px solid rgba(181, 201, 154, 0.25);
  background: rgba(181, 201, 154, 0.08);
  font-size: 1rem;
  color: rgba(181, 201, 154, 0.5);
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.wardrobe-add-btn:hover {
  border-color: rgba(181, 201, 154, 0.5);
  color: #b5c99a;
  background: rgba(181, 201, 154, 0.14);
}

body.admin-mode .wardrobe-add-btn { display: flex; }

.wardrobe-global-add-btn {
  display: none;
}

body.admin-mode .wardrobe-global-add-btn { display: inline-block; align-self: flex-end; }

.wardrobe-suggest-row {
  margin-bottom: 64px;
}

/* Outfit photo (a flier, an outfit to echo): "Add photo" and "Remove photo" are text actions
   under the prompt, so "What should I wear?" stays the screen's only pill. The preview reuses
   the dream photo look; its display:block would otherwise beat .hidden. */
.outfit-photo-preview.hidden {
  display: none;
}

/* "My closet" subheader, with Add garment on its own line beneath, aligned right */
.wardrobe-closet-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
}

.wardrobe-closet-line {
  font-family: 'Instrument Serif', Georgia, serif;
  font-style: italic;
  font-size: 0.9rem;
  color: rgba(240, 232, 224, 0.58);
  margin-top: 4px;
}

.wardrobe-closet-line:empty {
  display: none;
}

.wardrobe-checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-size: 0.8rem;
  color: rgba(240, 232, 224, 0.72);
  cursor: pointer;
}

.wardrobe-checkbox-row input[type="checkbox"] {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  accent-color: #b5c99a;
}

.wf-section-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: rgba(181, 201, 154, 0.72);
  padding: 20px 0 4px;
}

/* Garment card overlay */
.garment-overlay-content {
  text-align: left;
}

.garment-title {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 1.7rem;
  font-weight: 400;
  line-height: 1.15;
  color: #f0e8e0;
  margin-bottom: 6px;
}

.garment-meta {
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  color: rgba(240, 232, 224, 0.58);
  margin-bottom: 20px;
}

.garment-meta:empty {
  display: none;
}

.garment-section {
  padding: 12px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.garment-section-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: rgba(181, 201, 154, 0.72);
  margin-bottom: 6px;
}

.garment-section-text {
  font-size: 0.8rem;
  color: rgba(240, 232, 224, 0.75);
  line-height: 1.5;
}

.garment-count {
  color: rgba(240, 232, 224, 0.58);
  font-size: 0.7rem;
  margin-left: 4px;
}

.garment-story-row {
  display: flex;
  gap: 12px;
  font-size: 0.8rem;
  line-height: 1.5;
  padding: 2px 0;
}

.garment-story-date {
  flex-shrink: 0;
  min-width: 44px;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(240, 232, 224, 0.58);
  padding-top: 3px;
}

.garment-story-text {
  font-family: 'Instrument Serif', Georgia, serif;
  font-style: italic;
  font-size: 0.95rem;
  color: rgba(240, 232, 224, 0.75);
}

.garment-story-weather {
  font-family: 'Inter', sans-serif;
  font-style: normal;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  color: rgba(181, 201, 154, 0.72);
  margin-left: 4px;
}

.garment-memory {
  font-family: 'Instrument Serif', Georgia, serif;
  font-style: italic;
  font-size: 0.95rem;
  color: rgba(240, 232, 224, 0.6);
  margin-top: 4px;
}

.garment-overlay-content .overlay-actions {
  margin-top: 20px;
}

.wardrobe-closet-title {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 400;
  color: #f0e8e0;
  line-height: 1.2;
}

.wardrobe-prompt-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 14px;
  color: #f0e8e0;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  padding: 14px 16px;
  outline: none;
  margin-bottom: 12px;
  transition: border-color 0.15s ease, background 0.15s ease;
  box-sizing: border-box;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.wardrobe-prompt-input::placeholder {
  color: rgba(240, 232, 224, 0.58);
}

.wardrobe-prompt-input:focus {
  border-color: rgba(181, 201, 154, 0.35);
  background: rgba(255, 255, 255, 0.07);
}

/* Wardrobe: flat, minimal list rows (no glass-card treatment) */
#wardrobe-view .category {
  margin-bottom: 32px;
}

#wardrobe-view .task-list {
  gap: 0;
}

.wardrobe-cat-header {
  cursor: pointer;
}

.wardrobe-cat-label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.wardrobe-cat-chevron {
  font-size: 0.6rem;
  color: rgba(181, 201, 154, 0.5);
}

.wardrobe-cat-count {
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  color: rgba(240, 232, 224, 0.58);
}

.wardrobe-row {
  background: none;
  border: none;
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  padding: 10px 2px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.wardrobe-row:last-child {
  border-bottom: none;
}

.wardrobe-row:hover {
  background: rgba(255, 255, 255, 0.03);
  box-shadow: none;
}

.wardrobe-row-meta {
  font-size: 0.7rem;
  color: rgba(240, 232, 224, 0.58);
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wardrobe-row {
  cursor: pointer;
}

.wardrobe-subcat-label {
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(240, 232, 224, 0.58);
  padding: 14px 2px 4px;
}

.wardrobe-subcat-label:first-child {
  padding-top: 2px;
}

/* Wardrobe add modal */
.wardrobe-add-content {
  text-align: left;
  max-width: 380px;
}

.wardrobe-photo-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.wardrobe-photo-count {
  font-size: 0.7rem;
  color: rgba(181, 201, 154, 0.72);
  letter-spacing: 0.08em;
}

.dream-photo-preview {
  display: block;
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: 14px;
  margin-bottom: 16px;
  border: 1px solid rgba(255, 255, 255, 0.09);
}

.wardrobe-form-fields {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 28px;
}

.wardrobe-field-input {
  width: 100%;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: block;
}

.wf-row {
  display: flex;
  gap: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.wardrobe-cat-select {
  background: transparent;
  border: none;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(240, 232, 224, 0.65);
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  padding: 12px 4px 12px 0;
  outline: none;
  cursor: pointer;
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
}

.wardrobe-cat-select:last-child {
  border-right: none;
}

.wf-row + .wardrobe-cat-select {
  border-bottom: none;
  border-top: none;
  padding: 12px 0;
}

.wardrobe-cat-select option {
  background: #1a0820;
  color: #f0e8e0;
}

/* Standalone category select (outside wf-row) */
.wardrobe-form-fields > .wardrobe-cat-select {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  border-right: none;
  padding: 12px 0;
}

/* Outfit overlay */
.outfit-overlay-content {
  text-align: left;
  max-width: 420px;
}

.outfit-prompt-echo {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  color: rgba(240, 232, 224, 0.58);
  font-size: 0.88rem;
  margin-bottom: 6px;
}

.outfit-weather {
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  color: rgba(181, 201, 154, 0.72);
  margin-bottom: 20px;
}

.outfit-items {
  margin: 8px 0 32px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.outfit-item-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.outfit-cat-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: rgba(181, 201, 154, 0.72);
  min-width: 68px;
  flex-shrink: 0;
  padding-top: 4px;
}

.outfit-item-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.outfit-item-text {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 1rem;
  color: #f0e8e0;
  line-height: 1.3;
}

.outfit-item-meta {
  font-size: 0.7rem;
  color: rgba(240, 232, 224, 0.58);
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Principle 2: the plain nudge after a few re-spins in a row */
.spin-nudge {
  font-family: 'Instrument Serif', Georgia, serif;
  font-style: italic;
  font-size: 1rem;
  line-height: 1.4;
  color: rgba(240, 232, 224, 0.72); /* ~7:1 on the glass card */
  margin: -12px 0 24px;
}

/* The stylist's one-line reason, under the pieces */
.outfit-why {
  font-family: 'Instrument Serif', Georgia, serif;
  font-style: italic;
  font-size: 0.95rem;
  line-height: 1.4;
  color: rgba(200, 168, 122, 0.85);
  margin: -16px 0 28px;
}

.outfit-empty {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  color: rgba(240, 232, 224, 0.58);
  font-size: 0.88rem;
  text-align: center;
  padding: 20px 0;
}

@media (max-width: 480px) {
  .wf-row {
    flex-direction: column;
    border-bottom: none;
  }

  .wardrobe-cat-select {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }
}

/* ============ Dreams (Journal-style dated feed) ============ */

.dream-feed {
  padding-bottom: 72px; /* keep the last card clear of the floating add button */
}

.dream-month-header {
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: rgba(181, 201, 154, 0.8);
  margin-top: 24px;
}

.dream-month-header:first-child {
  margin-top: 0;
}

.dream-card {
  display: block;
  padding: 18px 18px 14px;
}

.dream-card-image {
  display: block;
  width: 100%;
  max-height: 240px;
  object-fit: cover;
  border-radius: 14px;
  margin-bottom: 14px;
}

.dream-card-title {
  display: block;
  font-size: 0.9rem;
  line-height: 1.5;
  color: rgba(240, 232, 224, 0.9);
  margin-bottom: 14px;
  white-space: pre-wrap;
}

.dream-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.dream-card-date {
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  color: rgba(240, 232, 224, 0.58);
}

.dream-menu-btn {
  font-size: 1rem;
  line-height: 1;
  padding: 2px 8px;
  letter-spacing: 0;
}

/* A one-list page (Dreams) has no section header, so its + ends the subtitle line, pushed
   right: the same small + as every list heading, never beside the page title, never floating.
   The row takes over the subtitle's bottom margin so the page keeps its rhythm. */
.subtitle-add-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 56px;
}

.subtitle-add-row .olympus-subtitle {
  margin-bottom: 0;
}

/* ============ Shopping: wishlist + acquired ============ */

.wishlist-section {
  margin-top: 24px;
}

.wish-row {
  cursor: pointer;
}

.wish-row-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* A wish's product photo, in place of the shop's icon: big enough to recognize the thing */
.task-link-thumb {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.09);
}

/* Wish names get two lines before they truncate: the name is the point of the row */
.wish-row .task-link-text,
.acquired-row .task-link-text {
  max-width: none;
}

.wish-row .task-link-title,
.acquired-row .task-link-title {
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.3;
}

.wish-row-note {
  font-family: 'Instrument Serif', Georgia, serif;
  font-style: italic;
  font-size: 0.9rem;
  color: rgba(240, 232, 224, 0.58);
  line-height: 1.35;
}

.acquired-header {
  cursor: pointer;
}

.acquired-section .task-item {
  opacity: 0.85; /* settled, not illegible */
}

.acquired-row-meta {
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  color: rgba(200, 168, 122, 1.0);
  white-space: nowrap;
  margin-left: auto;
  padding-left: 12px;
}

.wish-overlay-content {
  text-align: left;
}

.wish-link:empty {
  display: none;
}

.wish-link {
  margin-top: 4px;
  font-size: 0.8rem;
}

.wish-since {
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  color: rgba(240, 232, 224, 0.58);
  margin: 12px 0 28px;
}

.wish-edit-actions {
  justify-content: space-between;
  margin-top: 24px;
}

/* ============ Quiet design ============ */

/* One-time hints: shown on a first visit, then never again */
.hint-line {
  font-family: 'Instrument Serif', Georgia, serif;
  font-style: italic;
  font-size: 0.85rem;
  color: rgba(240, 232, 224, 0.62); /* above the 0.58 floor on every surface */
  margin: 8px 4px 4px;
  list-style: none;
}

/* Saving is silent; only a failure speaks, in one plain line above the nav */
.save-status {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(92px + env(safe-area-inset-bottom));
  z-index: 70;
  padding: 10px 18px;
  border-radius: 100px;
  background: rgba(30, 10, 36, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 8px 24px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  font-size: 0.75rem;
  color: rgba(240, 232, 224, 0.9);
  white-space: nowrap;
  pointer-events: none;
}

.save-status.hidden {
  display: none;
}

/* Asking before what can't be undone */
.confirm-overlay-content {
  max-width: 340px;
  padding: 40px 32px 32px;
}

.confirm-text {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 1.25rem;
  line-height: 1.4;
  color: #f0e8e0;
  margin-bottom: 28px;
}

/* Invisible native switch used only to trigger iOS's haptic tick */
.haptic-switch {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

/* ============ Photo → Errands ============ */

/* Review card: one row per line to buy, the whole row toggles its checkbox (44px tall) */
.shop-photo-items {
  list-style: none;
  margin: 0 0 8px;
  padding: 0;
}

.shop-photo-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 44px;
  padding: 6px 0;
  background: none;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: #f0e8e0;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  text-align: left;
  cursor: pointer;
}

/* The checkbox here is a picture of state, not its own control: the row is the button */
.shop-photo-item .task-checkbox {
  pointer-events: none;
  flex-shrink: 0;
}

.shop-photo-item:not(.chosen) .shop-photo-item-text {
  color: rgba(240, 232, 224, 0.58); /* unticked stays at the 4.5:1 floor, only quieter */
}

.shop-photo-pantry-label {
  margin: 20px 0 4px;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(240, 232, 224, 0.62);
}

.shop-photo-error {
  font-family: 'Instrument Serif', Georgia, serif;
  font-style: italic;
  font-size: 0.95rem;
  color: rgba(240, 232, 224, 0.72);
  margin: 8px 0 20px;
}

.shop-photo-overlay-content .overlay-actions {
  margin-top: 24px;
}

/* Errand with a swap: the text and its swap line stack in one column */
.errand-main {
  flex: 1;
  min-width: 0;
}

.errand-main .task-text {
  display: block;
}

/* The swap, revealed by "swap?": amber, small, a hint rather than a second item.
   Amber at 0.85 clears the 0.82 floor for 4.5:1. */
.errand-swap {
  margin: 4px 0 0;
  font-family: 'Instrument Serif', Georgia, serif;
  font-style: italic;
  font-size: 0.95rem;
  line-height: 1.35;
  color: rgba(200, 168, 122, 0.85);
}

.errand-swap .task-action-btn {
  padding-left: 8px;
  font-family: 'Inter', sans-serif;
  font-style: normal;
}

/* "swap?" reads whether or not the app is unlocked; "use this" changes the list, so admin only */
.task-action-btn.swap { display: inline-block; }
.task-action-btn.use-swap { display: none; }
body.admin-mode .task-action-btn.use-swap { display: inline-block; }

/* ============ Bottom sheet (outfit) ============ */

/* A sheet rises from the bottom edge rather than floating mid-screen: with the keyboard up,
   a centered card would be squeezed into the top third. --keyboard-inset (set from
   visualViewport in app.js) lifts it to sit on the keyboard. */
.sheet-overlay {
  align-items: flex-end;
}

.sheet-content {
  width: 100%;
  max-width: 520px;
  text-align: left;
  border-radius: 28px 28px 0 0;
  border-bottom: none;
  padding: 44px 24px calc(24px + env(safe-area-inset-bottom));
  margin-bottom: var(--keyboard-inset, 0px);
  max-height: calc(92dvh - var(--keyboard-inset, 0px));
  animation: sheetUp 0.3s cubic-bezier(0.16, 1, 0.3, 1); /* eases in, no overshoot */
}

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

@media (prefers-reduced-motion: reduce) {
  .sheet-content { animation: none; }
}

/* The question is the sheet's title: serif, large, ivory */
.sheet-question {
  display: block;
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 1.7rem;
  line-height: 1.15;
  color: #f0e8e0;
  margin: 0 0 18px;
}

/* The box grows with the text (growOutfitBox), up to about six lines */
.outfit-prompt-textarea {
  display: block;
  resize: none;
  overflow-y: auto;
  min-height: 52px;
  max-height: 168px;
  line-height: 1.45;
  margin-bottom: 4px;
}

.outfit-overlay-content .outfit-photo-preview {
  margin: 8px 0 0;
}

/* What you asked, on one line, with "edit" to go back and change it */
.outfit-echo-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.outfit-echo-row .outfit-prompt-echo {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* The edit link reads here even though the app may be locked: it only changes the question */
.outfit-edit-btn {
  display: inline-block;
  flex-shrink: 0;
  min-height: 44px;
}

/* "Say more?": a quiet one-line field above Re-spin, steering the next spin */
.outfit-refine-input {
  margin: 4px 0 24px; /* clear air before Re-spin / Love it, so the field doesn't read as part of the buttons */
}
