.demo-status {
  grid-column: 1 / -1;
  margin-top: 8px;
  color: #334155;
  font-size: 13px;
  text-align: center;
}

header .brand a {
  display: inline-flex;
  pointer-events: auto;
}

.demo-preview {
  border: 1px dashed #b9cfe4;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
  padding: 10px;
  margin-top: 8px;
}

/* Body card should match app card treatment, not generic demo preview box */
#bodyCard .demo-preview {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  margin-top: 4px;
  overflow: visible;
}

.demo-task-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.demo-task-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px;
  border: 1px solid #d8e3ef;
  border-radius: 10px;
  background: #ffffff;
}

.demo-task-row span {
  font-size: 14px;
  color: #1f2f44;
}

.demo-interest-main{
  display:flex;
  align-items:flex-start;
  gap:10px;
  min-width:0;
}

.demo-interest-thumb{
  width:64px;
  height:64px;
  border-radius:8px;
  object-fit:cover;
  flex:0 0 64px;
  border:1px solid #d7e2ef;
  background:#eef4fa;
}

.demo-interest-copy{
  display:flex;
  flex-direction:column;
  gap:3px;
  min-width:0;
}

.demo-interest-link{
  color:#1f2f44;
  text-decoration:none;
}

.demo-interest-link:hover{
  text-decoration:underline;
}

.demo-task-btn {
  min-width: 116px;
  text-align: center;
}

.demo-task-btn.done {
  background: #daf7e4;
  border-color: #8fd4aa;
  color: #14532d;
  font-weight: 700;
}

.demo-sub-pills {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.demo-sub-pill {
  border: 1px solid #c7d5e4;
  background: #ffffff;
  border-radius: 999px;
  color: #475569;
  font-size: 11px;
  padding: 2px 8px;
  line-height: 1.3;
}

.demo-sub-pill.is-disabled {
  opacity: 0.65;
  filter: grayscale(100%);
  cursor: not-allowed;
}

.demo-body-note {
  margin-top: 6px;
}

/* Keep meal/workout accordions inside demo Body card bounds */
#bodyCard #mealList .meal .directions {
  margin-right: 0 !important;
  margin-left: 38px;
  width: calc(100% - 38px);
  max-width: calc(100% - 38px);
}

#bodyCard #wktList .wkt-acc {
  width: 100%;
  margin-left: 0;
  max-width: 100%;
  box-sizing: border-box;
}

#bodyCard #wktRow{
  display:flex;
  align-items:flex-start;
  gap:8px;
  margin-top:6px;
}

#bodyCard #wktRow .wkt-toggle{
  margin-top:2px;
  margin-left:1px;
}

#bodyCard #wktRow .meal-text{
  flex:1 1 auto;
  min-width:0;
}

#bodyCard #wktRow .meal-text .top{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}

#bodyCard #wktRow .meal-text .top .k{
  font-size:.98rem;
  line-height:1.2;
  font-weight:700;
  transform:translateY(2px);
}

#bodyCard #wktRow .demo-wkt-hint{
  font-size:12px;
  font-weight:600;
  color:#64748b;
  line-height:1.2;
  transform:translateY(2px);
}

#bodyCard #mealList .meal .meal-toggle {
  margin-left: 0;
}

@media (max-width: 420px) {
  #bodyCard #mealList .meal .directions {
    margin-left: 36px;
    width: calc(100% - 36px);
    max-width: calc(100% - 36px);
  }
}

.demo-line {
  margin: 4px 0 0 0;
  color: #334155;
  font-size: 13px;
}

.demo-list-block {
  margin-top: 8px;
  padding: 8px;
  border: 1px solid #d8e3ef;
  border-radius: 10px;
  background: #ffffff;
}

.demo-list-block ul {
  margin: 6px 0 0 16px;
}

.demo-list-title {
  font-weight: 700;
  color: #1f2f44;
}

#demoMindAcc .panel-acc {
  overflow: visible;
  min-width: 0;
  max-width: 100%;
}

#demoMindAcc {
  min-width: 0;
}

#demoMindAcc > * {
  min-width: 0;
}

.demo-cw-input,
.demo-sdk-input {
  width: 100%;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  text-align: center;
  font: 700 18px/1 system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  color: #0f172a;
  text-transform: uppercase;
}

.ws-grid td.sel {
  background: #dbeafe;
}

.ws-grid td.found {
  background: #bbf7d0;
}

#demoMindAcc #demo-panel-crossword .cw-cell.solved:not(.black){
  background:#e6ffed;
  border-color:#b7e3c0;
  color:#0f5132;
}

.demo-confetti {
  position: fixed;
  top: 86px;
  width: 8px;
  height: 12px;
  border-radius: 2px;
  z-index: 9999;
  pointer-events: none;
  animation: demo-confetti-drop 1.8s ease-out forwards;
}

.demo-sdk-help {
  width: min(94vw, 460px);
}

.demo-sdk-help .modal-hd {
  padding: 10px 12px 8px;
}

.demo-sdk-help .modal-bd {
  padding: 10px 14px 12px;
  line-height: 1.35;
}

.demo-sdk-help .modal-bd ol {
  margin: 10px 0 12px 22px;
  padding: 0;
}

.demo-sdk-help .modal-bd li {
  margin-bottom: 6px;
}

.demo-sdk-help .modal-bd .row {
  margin-top: 8px;
}

.demo-hdr-menu {
  min-width: 180px;
}

.demo-share-upsell,
.demo-info-modal {
  width: min(92vw, 440px);
}

.demo-share-upsell .modal-hd,
.demo-info-modal .modal-hd {
  padding: 12px 14px 10px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.10);
}

.demo-share-upsell .modal-bd,
.demo-info-modal .modal-bd {
  padding: 12px 14px;
  line-height: 1.4;
}

.demo-info-modal .modal-bd p {
  margin: 0;
}

.demo-info-modal .modal-bd p + p {
  margin-top: 10px;
}

.demo-share-upsell,
.demo-info-modal {
  background: linear-gradient(180deg, #fff9df 0%, #ffefb5 100%);
  border: 1px solid rgba(177, 122, 12, 0.32);
}

.demo-share-upsell .modal-hd,
.demo-info-modal .modal-hd {
  background: rgba(255, 244, 201, 0.86);
  border-bottom-color: rgba(177, 122, 12, 0.22);
}

.demo-share-upsell .modal-hd .k,
.demo-info-modal .modal-hd .k {
  font-size: 1.15rem;
  line-height: 1.2;
}

.demo-share-upsell .modal-ft,
.demo-info-modal .modal-ft {
  align-items: center;
}

.demo-share-upsell .modal-ft .demo-info-join,
.demo-share-upsell .modal-ft button,
.demo-info-modal .modal-ft .demo-info-join,
.demo-info-modal .modal-ft button {
  height: 44px;
  border-radius: 14px;
  padding: 0 18px;
  font: 800 15px/1 system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  font-weight: 800;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.demo-share-upsell .modal-ft .demo-info-join,
.demo-info-modal .modal-ft .demo-info-join {
  color: #2d2200;
  border: 1px solid #b9881f;
  background: linear-gradient(180deg, #ffe9a3 0%, #f2c44f 100%);
  box-shadow: 0 7px 18px rgba(196, 145, 32, 0.28);
}

.demo-share-upsell .modal-ft button,
.demo-info-modal .modal-ft button {
  color: #1f2f44;
  border: 1px solid #cbd5e1;
  background: rgba(255, 255, 255, 0.7);
}

.demo-share-upsell .modal-ft .demo-info-join:hover,
.demo-info-modal .modal-ft .demo-info-join:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(196, 145, 32, 0.34);
}

.demo-share-upsell .modal-ft,
.demo-info-modal .modal-ft {
  padding: 0 14px 12px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

body.demo-gauntlet-open {
  overflow: hidden;
}

#demoGauntletLocked .g-row {
  cursor: default;
}

#demoGauntletLocked .g-row:focus-visible {
  outline: none;
}

@keyframes demo-confetti-drop {
  0% {
    transform: translate(0, 0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translate(var(--dx), var(--dy)) rotate(var(--rot));
    opacity: 0;
  }
}

.demo-disabled {
  position: relative;
}

.demo-disabled::after {
  content: "Preview Only";
  position: absolute;
  top: 44px;
  transform: translateY(-50%);
  right: 14px;
  font: 700 11px/1 system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  color: #27496a;
  background: #dcecff;
  border: 1px solid #9fc2e2;
  border-radius: 999px;
  padding: 4px 8px;
}

#demoCta .link-btn {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

@media (max-width:420px){
  #demoMindAcc #demo-panel-wordsearch .ws-wrap{
    width:100%;
    min-width:0;
    flex-direction:column;
    gap:12px;
  }
  #demoMindAcc #demo-panel-wordsearch .ws-grid{
    table-layout:fixed;
    width:100%;
    max-width:100%;
    margin-inline:auto;
  }
  #demoMindAcc #demo-panel-wordsearch .ws-grid td{
    width:auto;
    height:clamp(20px, 8vw, 28px);
    font-size:clamp(13px, 4vw, 17px);
    padding:0;
  }
  #demoMindAcc #demo-panel-wordsearch .ws-words{
    width:100%;
    min-width:0;
  }
}

@media (max-width:380px){
  #demoMindAcc #demo-panel-wordsearch .ws-grid{
    width:100%;
    max-width:100%;
  }
}

.demo-pill {
  min-width: 56px;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  position: relative;
  display: inline-grid;
  place-items: center;
  font: 800 12px/1 system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial;
  letter-spacing: .4px;
  color: #ffffff;
  background: linear-gradient(180deg, #ff6b35 0%, #e63a14 100%);
  border: 1px solid #b52a0e;
  box-shadow: 0 2px 6px rgba(230, 58, 20, 0.35);
  text-decoration: none;
  overflow: hidden;
  animation: demo-pill-pulse 2.2s ease-in-out infinite;
}

.demo-pill-word {
  grid-area: 1 / 1;
  display: block;
  width: 100%;
  text-align: center;
  line-height: 1;
  transition: opacity .22s ease;
}

.demo-pill-word--demo {
  animation: demo-pill-word-demo 6s ease-in-out infinite;
}

.demo-pill-word--join {
  animation: demo-pill-word-join 6s ease-in-out infinite;
  opacity: 0;
}

.demo-pill:hover {
  text-decoration: none;
}

.demo-pill:focus-visible {
  outline: 2px solid rgba(255, 208, 130, 0.95);
  outline-offset: 2px;
}

@keyframes demo-pill-pulse {
  0%, 100% {
    box-shadow: 0 2px 6px rgba(230, 58, 20, 0.35);
  }
  50% {
    box-shadow: 0 4px 10px rgba(230, 58, 20, 0.5);
  }
}

@keyframes demo-pill-word-demo {
  0%, 47% {
    opacity: 1;
  }
  50%, 97% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

@keyframes demo-pill-word-join {
  0%, 47% {
    opacity: 0;
  }
  50%, 97% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

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

  .demo-pill-word--demo,
  .demo-pill-word--join {
    animation: none;
  }

  .demo-pill-word--demo {
    opacity: 0;
  }

  .demo-pill-word--join {
    opacity: 1;
  }
}

/* Demo-only visual tune: match app gauntlet icon proportion/placement */
#mindCard .mind-gauntlet-btn{
  width: 58px;
  height: 58px;
  top: calc(50% - 13px);
}

/* Soul demo behavior tweaks */
#soulCard .soul-tile--locked{
  opacity:.58;
  filter:grayscale(20%);
  cursor:default;
}
#soulCard .demo-soul-audio-note{
  margin-top:8px;
  font-size:12px;
}

.demo-week-plan{
  margin-top:4px;
}
.demo-week-day{
  margin: 4px 0;
}
.demo-week-line{
  font-size: 13px;
  line-height: 1.35;
  color:#334155;
  font-weight: 400;
}
.demo-week-day-label{
  font-weight:600;
}
.demo-week-meals{
  font-weight:400;
  color:#334155;
}
.demo-plan-dots{
  text-align:center;
  color:#5c8dd8;
  letter-spacing:.18em;
  font-weight:700;
  margin:6px 0;
  user-select:none;
}
