/* Master Your Day Studio (Release 134): 120fps Bento Command Bar, Audio Brief, Personal Action, Chapters, Wake-Up Call & Host Run-of-Show */

.myd-studio-command-bar {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 6px 2px 10px;
  margin: 12px 0 6px;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.myd-studio-command-bar::-webkit-scrollbar {
  display: none;
}

.myd-studio-pill {
  appearance: none;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 8px 13px;
  border-radius: 999px;
  border: 1px solid var(--clean-line-strong, #c8cbc1);
  background: var(--clean-surface, #fffefa);
  color: var(--clean-ink, #26352e);
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: transform var(--motion-duration-quick) var(--motion-spring-soft-easing),
    background-color var(--motion-duration-quick) var(--motion-ease-standard),
    border-color var(--motion-duration-quick) var(--motion-ease-standard),
    color var(--motion-duration-quick) var(--motion-ease-standard);
}

.myd-studio-pill:active {
  transform: scale(0.96);
}

.myd-studio-pill.is-active {
  background: var(--clean-forest, #1f3d2d);
  border-color: var(--clean-forest, #1f3d2d);
  color: #ffffff;
}

.myd-studio-pill.is-admin {
  border-color: var(--clean-accent-text, #31543f);
  background: var(--clean-accent-soft, #e7ede5);
  color: var(--clean-forest, #1f3d2d);
}

.myd-studio-pill.is-admin.is-active {
  background: var(--clean-forest, #1f3d2d);
  color: #ffffff;
}

.myd-studio-pill-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  background: rgba(31, 61, 45, 0.1);
  color: inherit;
}

.myd-studio-pill.is-active .myd-studio-pill-badge {
  background: rgba(255, 255, 255, 0.2);
}

/* Bento Drawer Collapsing for Existing Master Your Day Sections */
.myd-bento-collapsed {
  display: none !important;
}

.myd-studio-stack {
  display: grid;
  gap: 14px;
  margin: 10px 0 14px;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.myd-studio-card {
  padding: 18px;
  border-radius: 20px;
  background: var(--clean-surface, #fffefa);
  border: 1px solid var(--clean-line, #dedfd7);
  color: var(--clean-ink, #26352e);
  box-shadow: var(--clean-shadow, 0 8px 24px rgba(24, 36, 28, 0.05));
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  transition: opacity var(--motion-duration-standard) var(--motion-ease-standard),
    transform var(--motion-duration-standard) var(--motion-spring-soft-easing);
}

.myd-studio-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
  min-width: 0;
}

.myd-studio-card-head > div {
  min-width: 0;
  flex: 1 1 200px;
}

.myd-studio-eyebrow {
  margin: 0 0 3px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--clean-accent-text, #31543f);
}

.myd-studio-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1.25;
  color: var(--clean-forest, #1f3d2d);
}

.myd-studio-copy {
  margin: 6px 0 0;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--clean-ink, #26352e);
  overflow-wrap: anywhere;
}

.myd-studio-muted {
  margin: 6px 0 0;
  font-size: 0.84rem;
  line-height: 1.45;
  color: var(--clean-muted, #5d675f);
  overflow-wrap: anywhere;
}

/* Audio Brief Strip Inside Hero / Stage */
.myd-audio-brief-strip {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 16px;
  background: var(--clean-soft, #f0f1eb);
  border: 1px solid var(--clean-line, #dedfd7);
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.myd-audio-brief-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.myd-audio-brief-meta {
  min-width: 0;
  flex: 1 1 200px;
}

.myd-audio-brief-meta strong {
  display: block;
  font-size: 0.92rem;
  color: var(--clean-forest, #1f3d2d);
}

.myd-audio-brief-meta small {
  display: block;
  font-size: 0.8rem;
  color: var(--clean-muted, #5d675f);
}

.myd-audio-player {
  width: 100%;
  max-width: 100%;
  border-radius: 10px;
}

/* Personal Action Chips */
.myd-chip-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  min-width: 0;
}

.myd-commitment-chip {
  appearance: none;
  width: 100%;
  text-align: left;
  padding: 11px 14px;
  border-radius: 14px;
  border: 1px solid var(--clean-line-strong, #c8cbc1);
  background: var(--clean-soft, #f0f1eb);
  color: var(--clean-ink, #26352e);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.4;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  box-sizing: border-box;
  transition: transform var(--motion-duration-quick) var(--motion-spring-soft-easing),
    border-color var(--motion-duration-quick) var(--motion-ease-standard),
    background-color var(--motion-duration-quick) var(--motion-ease-standard);
}

.myd-commitment-chip:active {
  transform: scale(0.98);
}

.myd-commitment-chip span:last-child {
  flex: 0 0 auto;
  font-size: 0.76rem;
  font-weight: 800;
  color: var(--clean-accent-text, #31543f);
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--clean-surface, #fffefa);
  border: 1px solid var(--clean-line, #dedfd7);
}

/* Clickable Chapter Pills */
.myd-chapters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 8px;
  margin-top: 10px;
  min-width: 0;
}

.myd-chapter-btn {
  appearance: none;
  text-align: left;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--clean-line, #dedfd7);
  background: var(--clean-soft, #f0f1eb);
  color: var(--clean-ink, #26352e);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  transition: transform var(--motion-duration-quick) var(--motion-spring-soft-easing),
    border-color var(--motion-duration-quick) var(--motion-ease-standard);
}

.myd-chapter-btn:active {
  transform: scale(0.97);
}

.myd-chapter-time {
  display: inline-block;
  align-self: flex-start;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  background: var(--clean-forest, #1f3d2d);
  color: #ffffff;
}

.myd-chapter-btn strong {
  font-size: 0.88rem;
  color: var(--clean-forest, #1f3d2d);
  line-height: 1.3;
}

.myd-chapter-btn small {
  font-size: 0.78rem;
  color: var(--clean-muted, #5d675f);
  line-height: 1.35;
}

/* Inline Inputs & Forms (iOS 16px Auto-Zoom Guard) */
.myd-inline-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  align-items: stretch;
  min-width: 0;
}

.myd-input,
.myd-select {
  flex: 1 1 200px;
  min-width: 0;
  max-width: 100%;
  font-size: max(16px, 1rem);
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--clean-line-strong, #c8cbc1);
  background: var(--clean-surface, #fffefa);
  color: var(--clean-ink, #26352e);
  box-sizing: border-box;
}

.myd-answer-box {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--clean-accent-soft, #e7ede5);
  border: 1px solid var(--clean-line-strong, #c8cbc1);
  color: var(--clean-ink, #26352e);
  min-width: 0;
}

.myd-answer-box p {
  margin: 0 0 8px;
  font-size: 0.9rem;
  line-height: 1.48;
}

.myd-answer-refs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

/* Wake-Up Call Form */
.myd-wakeup-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-top: 12px;
  min-width: 0;
}

.myd-wakeup-days {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.myd-day-chip {
  appearance: none;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid var(--clean-line-strong, #c8cbc1);
  background: var(--clean-soft, #f0f1eb);
  color: var(--clean-ink, #26352e);
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform var(--motion-duration-quick) var(--motion-spring-soft-easing),
    background-color var(--motion-duration-quick) var(--motion-ease-standard);
}

.myd-day-chip.is-selected {
  background: var(--clean-forest, #1f3d2d);
  border-color: var(--clean-forest, #1f3d2d);
  color: #ffffff;
}

.myd-consent-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 12px;
  font-size: 0.84rem;
  line-height: 1.4;
  color: var(--clean-ink, #26352e);
}

.myd-consent-row input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  flex: 0 0 auto;
}

/* Host Run-of-Show Studio (Admin Only) */
.myd-host-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
  margin: 10px 0 12px;
}

.myd-host-stat {
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--clean-soft, #f0f1eb);
  border: 1px solid var(--clean-line, #dedfd7);
  min-width: 0;
}

.myd-host-stat small {
  display: block;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--clean-muted, #5d675f);
}

.myd-host-stat strong {
  display: block;
  margin-top: 2px;
  font-size: 1.05rem;
  color: var(--clean-forest, #1f3d2d);
}

.myd-host-list {
  margin: 8px 0 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
  font-size: 0.88rem;
  line-height: 1.45;
}

.myd-privacy-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.myd-privacy-tag.is-named {
  background: #dcfce7;
  color: #166534;
}

.myd-privacy-tag.is-anonymous {
  background: #fef9c3;
  color: #854d0e;
}

.myd-privacy-tag.is-private {
  background: #fee2e2;
  color: #991b1b;
}

.myd-reel-hook-card {
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--clean-soft, #f0f1eb);
  border: 1px solid var(--clean-line, #dedfd7);
  margin-top: 8px;
  min-width: 0;
}

.myd-inline-spotify-frame {
  width: 100%;
  height: 152px;
  border: 0;
  border-radius: 14px;
  margin-top: 10px;
}

.myd-replay-credit-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  background: #dcfce7;
  color: #14532d;
  border: 1px solid rgba(22, 163, 74, 0.35);
}

/* Dark Mode Parity */
html[data-theme="dark"] .myd-studio-card,
html[data-theme="dark"] .myd-studio-pill {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.14);
  color: #f3f7f4;
}

html[data-theme="dark"] .myd-studio-pill.is-active {
  background: #2f6b4b;
  border-color: #4ade80;
  color: #ffffff;
}

html[data-theme="dark"] .myd-studio-pill.is-admin {
  background: rgba(74, 222, 128, 0.14);
  border-color: rgba(74, 222, 128, 0.35);
  color: #dcfce7;
}

html[data-theme="dark"] .myd-studio-title,
html[data-theme="dark"] .myd-studio-eyebrow,
html[data-theme="dark"] .myd-audio-brief-meta strong,
html[data-theme="dark"] .myd-chapter-btn strong,
html[data-theme="dark"] .myd-host-stat strong {
  color: #ecfdf5;
}

html[data-theme="dark"] .myd-studio-copy,
html[data-theme="dark"] .myd-consent-row {
  color: #e2ebe5;
}

html[data-theme="dark"] .myd-studio-muted,
html[data-theme="dark"] .myd-audio-brief-meta small,
html[data-theme="dark"] .myd-chapter-btn small,
html[data-theme="dark"] .myd-host-stat small {
  color: #b4c2b8;
}

html[data-theme="dark"] .myd-audio-brief-strip,
html[data-theme="dark"] .myd-commitment-chip,
html[data-theme="dark"] .myd-chapter-btn,
html[data-theme="dark"] .myd-host-stat,
html[data-theme="dark"] .myd-reel-hook-card,
html[data-theme="dark"] .myd-day-chip,
html[data-theme="dark"] .myd-input,
html[data-theme="dark"] .myd-select {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.16);
  color: #f3f7f4;
}

html[data-theme="dark"] .myd-commitment-chip span:last-child {
  background: rgba(16, 36, 26, 0.85);
  border-color: rgba(74, 222, 128, 0.35);
  color: #86efac;
}

html[data-theme="dark"] .myd-answer-box {
  background: rgba(47, 107, 75, 0.24);
  border-color: rgba(74, 222, 128, 0.35);
  color: #f3f7f4;
}

html[data-theme="dark"] .myd-day-chip.is-selected,
html[data-theme="dark"] .myd-chapter-time {
  background: #2f6b4b;
  border-color: #4ade80;
  color: #ffffff;
}

@media (max-width: 768px) {
  .myd-input,
  .myd-select {
    font-size: max(16px, 1rem);
  }
  .myd-studio-card {
    padding: 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .myd-studio-pill,
  .myd-studio-card,
  .myd-commitment-chip,
  .myd-chapter-btn,
  .myd-day-chip {
    transition: none !important;
  }
}
