/* Preview styles adapted from the supplied theme demo; scoped to this section. */
.theme-demo .palette-picker {
  display:grid;
  grid-template-columns:repeat(6,minmax(0,1fr));
  gap:10px;
  margin:0 0 28px;
}

.theme-demo .palette-card {
  text-align:left;
  padding:10px 10px 11px;
  background:var(--studio-white);
  border:1px solid var(--studio-line);
  border-radius:13px;
  transition:border-color .18s,box-shadow .18s,transform .18s;
  position:relative;
  min-width:0;
}

.theme-demo .palette-card:hover {
  transform:translateY(-2px);
  border-color:#acb9a0;
}

.theme-demo .palette-card[aria-pressed="true"] {
  border:2px solid #536b46;
  padding:9px 9px 10px;
  box-shadow:0 0 0 3px #536b4611;
}

.theme-demo .swatch-ribbon {
  height:29px;
  display:flex;
  overflow:hidden;
  border-radius:6px;
  margin-bottom:10px;
  border:1px solid #00000006;
}

.theme-demo .swatch-ribbon span {
  flex:1;
}

.theme-demo .swatch-ribbon span:first-child {
  flex:1.5;
}

.theme-demo .card-name {
  font-size:11.5px;
  line-height:1.3;
  display:block;
  font-weight:700;
  letter-spacing:-.1px;
  white-space:nowrap;
}

.theme-demo .card-kicker {
  font-size:9px;
  margin-top:5px;
  color:var(--studio-muted);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:4px;
}

.theme-demo .selection-dot {
  width:13px;
  height:13px;
  display:flex;
  align-items:center;
  justify-content:center;
  border:1px solid #cdd5c4;
  border-radius:50%;
}

.theme-demo .selection-dot svg {
  width:9px;
  height:9px;
  opacity:0;
}

.theme-demo .palette-card[aria-pressed="true"] .selection-dot {
  background:#536b46;
  border-color:#536b46;
  color:white;
}

.theme-demo .palette-card[aria-pressed="true"] .selection-dot svg {
  opacity:1;
}

.theme-demo .selected-info {
  padding:25px 0 21px;
  border-top:1px solid var(--studio-line);
  display:grid;
  grid-template-columns:1fr auto;
  gap:15px;
  align-items:center;
}

.theme-demo .selected-title {
  display:flex;
  align-items:center;
  gap:12px;
}


.theme-demo .selected-title h2 {
  font-size:22px;
  letter-spacing:-.6px;
  margin:0;
  font-weight:670;
}


.theme-demo .mood-tag {
  font-size:10px;
  color:var(--studio-muted);
  padding:7px 10px;
  border:1px solid var(--studio-line);
  border-radius:20px;
  white-space:nowrap;
}

.theme-demo .screen-tabs {
  display:none;
  gap:4px;
  margin:0 0 15px;
  background:#e7eadf;
  border-radius:13px;
  padding:4px;
}

.theme-demo .screen-tabs button {
  flex:1;
  border:0;
  border-radius:10px;
  background:transparent;
  padding:9px 6px;
  font-weight:650;
  font-size:12px;
}

.theme-demo .screen-tabs button[aria-pressed="true"] {
  background:#fffef9;
  box-shadow:0 2px 5px #00000005;
}


.theme-demo .phone-layout {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:25px;
}

.theme-demo .screen-card {
  margin:0;
  min-width:0;
}

.theme-demo .screen-title {
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:0 5px;
  margin:0 0 12px;
  font-size:11px;
  font-weight:650;
}


.theme-demo .phone-shell {
  position:relative;
  isolation:isolate;
  width:100%;
  aspect-ratio:402/874;
  border-radius:32px;
  overflow:hidden;
  box-shadow:0 14px 32px -19px #25392b63,0 0 0 1px #2b3f291d;
  background:var(--background);
  contain:layout paint;
}

.theme-demo .phone-canvas {
  position:absolute;
  width:402px;
  height:874px;
  transform:scale(var(--scale,.9));
  transform-origin:0 0;
  background:var(--background);
  color:var(--ink);
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;
  overflow:hidden;
  -webkit-font-smoothing:antialiased;
  line-height:1.15;
}

.theme-demo .phone-canvas svg {
  stroke-width:1.8;
}

.theme-demo .statusbar {
  position:absolute;
  top:0;
  left:0;
  right:0;
  height:66px;
  padding:24px 36px 0 47px;
  z-index:20;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  pointer-events:none;
  color:var(--ink);
}

.theme-demo .status-time {
  font-size:18px;
  letter-spacing:-.35px;
  font-weight:700;
  display:flex;
  gap:5px;
  align-items:center;
}

.theme-demo .status-time svg {
  width:15px;
  height:15px;
  stroke-width:2;
}

.theme-demo .status-right {
  display:flex;
  gap:6px;
  align-items:center;
  height:20px;
}

.theme-demo .signal {
  width:21px;
  height:16px;
}

.theme-demo .wifi {
  width:20px;
  height:16px;
}

.theme-demo .battery {
  position:relative;
  font-size:10px;
  height:14px;
  line-height:14px;
  width:26px;
  text-align:center;
  font-weight:650;
  color:var(--background);
  background:var(--ink);
  border-radius:4px;
}

.theme-demo .battery:after {
  position:absolute;
  right:-2px;
  top:4px;
  height:6px;
  width:1.5px;
  content:"";
  background:var(--ink);
  opacity:.6;
}

.theme-demo .home-indicator {
  position:absolute;
  bottom:8px;
  width:144px;
  height:5px;
  border-radius:8px;
  background:var(--ink);
  opacity:.63;
  left:129px;
  z-index:55;
}

.theme-demo .glass {
  background:var(--glass);
  border:1px solid var(--glassBorder);
  box-shadow:inset 0 0 0 1px var(--glassInset),0 4px 13px #20322508;
  -webkit-backdrop-filter:blur(18px) saturate(120%);
  backdrop-filter:blur(18px) saturate(120%);
}

.theme-demo .toolbar-pill {
  position:absolute;
  right:24px;
  top:98px;
  border-radius:27px;
  display:flex;
  align-items:center;
  justify-content:space-evenly;
  width:81px;
  height:40px;
  color:var(--ink);
}

.theme-demo .toolbar-pill svg {
  width:23px;
  height:23px;
}

.theme-demo .tabbar {
  position:absolute;
  bottom:20px;
  left:64px;
  width:275px;
  height:64px;
  border-radius:35px;
  padding:4px;
  display:flex;
  align-items:stretch;
  z-index:50;
}

.theme-demo .nav-tab {
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  border-radius:28px;
  gap:3px;
  flex:1;
  font-size:10.5px;
  font-weight:550;
  letter-spacing:.08px;
  color:var(--ink);
}

.theme-demo .nav-tab svg {
  width:26px;
  height:26px;
  stroke-width:1.8;
}

.theme-demo .nav-tab.active {
  background:var(--navActive);
  color:var(--navInk);
  font-weight:650;
}

.theme-demo .nav-tab.active svg {
  stroke-width:2;
}

.theme-demo .nav-tab.active .fill-active {
  fill:currentColor;
}

.theme-demo .grocery-header {
  position:absolute;
  top:80px;
  left:24px;
  right:24px;
}

.theme-demo .grocery-kicker {
  font-size:12.5px;
  font-weight:600;
  color:var(--muted);
  margin-bottom:7px;
}

.theme-demo .grocery-heading {
  display:flex;
  align-items:center;
  gap:12px;
}

.theme-demo .grocery-heading h3 {
  font-size:33px;
  font-weight:740;
  letter-spacing:-.75px;
  margin:0;
  line-height:1.14;
}

.theme-demo .grocery-heading svg {
  width:18px;
  height:18px;
  stroke-width:2.6;
}

.theme-demo .grocery-content {
  position:absolute;
  top:174px;
  left:24px;
  right:24px;
}

.theme-demo .grocery-group {
  margin:0 0 15px;
}

.theme-demo .category-label {
  margin:0 0 12px;
  padding:0 0 7px;
  border-bottom:1px solid var(--border);
  text-transform:uppercase;
  letter-spacing:.1px;
  font-size:12.3px;
  line-height:1.05;
  color:var(--muted);
  font-weight:700;
}

.theme-demo .grocery-row {
  display:flex;
  gap:8px;
  margin-bottom:8px;
}

.theme-demo .grocery-item {
  height:45px;
  display:flex;
  align-items:center;
  justify-content:center;
  border:1px solid var(--border);
  background:var(--surface);
  border-radius:30px;
  color:var(--ink);
  font-size:17px;
  font-weight:680;
  letter-spacing:-.35px;
  white-space:nowrap;
  padding:0 14px;
  flex:1 1 auto;
  min-width:0;
}

.theme-demo .grocery-item.highlighted {
  background:var(--orangeSoft);
  border-color:var(--orange);
  color:var(--onPrimarySoft);
}

.theme-demo .grocery-input {
  position:absolute;
  z-index:40;
  bottom:94px;
  left:16px;
  right:16px;
  height:47px;
  border:1px solid var(--border);
  border-radius:30px;
  background:var(--surface);
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:4px 4px 4px 17px;
  box-shadow:0 5px 14px #342a171a;
  color:var(--muted);
  font-size:16px;
}

.theme-demo .submit-circle {
  display:grid;
  place-items:center;
  height:39px;
  width:39px;
  border-radius:50%;
  border:1px solid var(--border);
  color:var(--green);
}

.theme-demo .submit-circle svg {
  width:23px;
  height:23px;
}

.theme-demo .cookbook-title {
  position:absolute;
  left:24px;
  top:81px;
  font-size:33px;
  letter-spacing:-.8px;
  line-height:1.2;
  font-weight:740;
  margin:0;
}

.theme-demo .cookbook-grid {
  position:absolute;
  left:24px;
  right:24px;
  top:158px;
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:16px;
}

.theme-demo .recipe-card {
  overflow:hidden;
  background:var(--surfaceAlt);
  border-radius:16px;
  height:163px;
  min-width:0;
}

.theme-demo .recipe-photo {
  display:block;
  width:100%;
  height:109px;
  object-fit:cover;
  object-position:center;
  background:var(--placeholder);
}

.theme-demo .recipe-photo.partial {
  object-fit:cover;
}

.theme-demo .recipe-info {
  padding:9px 8px 7px;
}

.theme-demo .recipe-name {
  font-size:12.5px;
  font-weight:550;
  line-height:1.15;
  white-space:nowrap;
  text-overflow:ellipsis;
  overflow:hidden;
  letter-spacing:.02px;
}

.theme-demo .recipe-meta {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:3px;
  margin-top:7px;
  font-size:10.5px;
  font-weight:500;
  white-space:nowrap;
}

.theme-demo .recipe-meta span {
  display:flex;
  align-items:center;
  gap:4px;
}

.theme-demo .recipe-meta svg {
  width:12px;
  height:12px;
  stroke-width:1.9;
}

.theme-demo .recipe-meta .servings {
  margin-left:auto;
}

.theme-demo .cookbook .toolbar-pill {
  top:80px;
  right:24px;
  width:80px;
  height:40px;
  z-index:22;
}

.theme-demo .cookbook .toolbar-pill svg {
  width:21px;
  height:21px;
}

.theme-demo .cookbook-search {
  position:absolute;
  left:16px;
  right:72px;
  bottom:96px;
  height:47px;
  border-radius:28px;
  z-index:40;
  color:var(--muted);
  padding:0 16px;
  display:flex;
  align-items:center;
  gap:10px;
  font-size:17px;
}

.theme-demo .cookbook-search svg {
  width:23px;
  height:23px;
  color:var(--ink);
}

.theme-demo .add-recipe {
  position:absolute;
  right:16px;
  bottom:95px;
  z-index:41;
  border-radius:50%;
  width:50px;
  height:50px;
  display:grid;
  place-items:center;
  color:var(--ink);
  background:var(--addGlass);
}

.theme-demo .add-recipe svg {
  width:31px;
  height:31px;
  stroke-width:1.65;
}

.theme-demo {
  --studio-white: #fffef9;
  --studio-muted: #59665a;
  --studio-line: #d6dccf;
  padding-block: 30px 100px;
}
.theme-demo [hidden] { display: none !important; }
.theme-demo button { font: inherit; color: inherit; cursor: pointer; }
.theme-demo button:focus-visible { outline: 3px solid var(--orange); outline-offset: 4px; }
.theme-demo svg { display: block; flex: none; }
.theme-demo button svg { pointer-events: none; }
.theme-intro { max-width: 660px; margin-bottom: 35px; }
.theme-intro > p:last-child { color: var(--muted); }
.theme-demo .palette-picker { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.theme-demo .card-name { white-space: normal; font-size: 13px; }
.theme-demo .card-kicker { font-size: 11px; }
.theme-demo .swatch-ribbon span:nth-child(1) { background: var(--background); }
.theme-demo .swatch-ribbon span:nth-child(2) { background: var(--orange); }
.theme-demo .swatch-ribbon span:nth-child(3) { background: var(--green); }
.theme-demo .swatch-ribbon span:nth-child(4) { background: var(--ink); }
.theme-demo .palette-card { color: #213e32; }
.theme-demo .selected-title h3 { margin: 0; font-size: 23px; font-weight: 600; }
.theme-demo .phone-layout { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 740px; margin: auto; gap: 44px; }
.theme-demo .screen-title { font-size: 13px; }
.theme-demo .screen-tabs { max-width: 380px; margin-inline: auto; }
.theme-demo .screen-tabs button { font-size: 13px; }
.theme-demo .phone-shell { line-height: normal; }
.theme-demo .grocery-heading h3, .theme-demo .cookbook-title { font-family: var(--sans); }
.theme-demo .phone-canvas .recipe-photo { max-width: none; }
.theme-demo .theme-disclaimer { color: var(--muted); font-size: 12px; text-align: center; margin-top: 25px; }
.theme-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 700px) {
  .theme-demo { padding-block: 0 65px; }
  .theme-demo .palette-picker { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .theme-demo .card-name { font-size: 12px; }
  .theme-demo .card-kicker { font-size: 10px; }
  .theme-demo .selected-info { grid-template-columns: 1fr; gap: 10px; }
  .theme-demo .mood-tag { justify-self: start; }
  .theme-demo .phone-layout { display: block; max-width: 380px; }
  .theme-demo .screen-tabs { display: flex; }
  .theme-demo .screen-card:not(.is-mobile-active) { display: none; }
  .theme-demo .phone-shell { border-radius: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  .theme-demo .palette-card { transition: none; }
}
