/* ============================================================
   Lobby sandbox v4 shell
   Prepared-mode framing, tactile bezel, product dock.
   ============================================================ */
html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: #faf9f6;
}

.ls-section {
  --ls-surface: #faf9f6;
  --ls-ink: #1c1917;
  --ls-stone-700: #44403c;
  --ls-stone-600: #57534e;
  --ls-stone-500: #78716c;
  --ls-stone-400: #a8a29e;
  --ls-stone-300: #d6d3d1;
  --ls-stone-200: #e7e5e4;
  --ls-stone-100: #f5f5f4;
  --ls-stone-50: #fafaf9;
  --ls-teal: #0f766e;
  --ls-teal-deep: #115e59;
  --ls-teal-50: #f0fdfa;
  --ls-teal-100: #ccfbf1;
  --ls-teal-200: #99f6e4;
  --ls-font: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;

  position: relative;
  overflow: hidden;
  padding: 52px 20px 72px;
  background: var(--ls-surface);
  color: var(--ls-ink);
  font-family: var(--ls-font);
  -webkit-font-smoothing: antialiased;
}

.ls-section *,
.ls-section *::before,
.ls-section *::after {
  box-sizing: border-box;
}

.ls-section ::selection {
  background: var(--ls-teal-100);
  color: var(--ls-teal-deep);
}

.ls-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(56% 44% at 50% 24%, rgba(13, 148, 136, 0.12) 0%, rgba(13, 148, 136, 0) 72%),
    radial-gradient(36% 30% at 12% 62%, rgba(180, 83, 9, 0.05) 0%, rgba(180, 83, 9, 0) 70%),
    linear-gradient(180deg, rgba(245, 241, 233, 0.65) 0%, rgba(250, 249, 246, 0) 34%);
  pointer-events: none;
}

.ls-section::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.3;
  background-image: radial-gradient(rgba(28, 25, 23, 0.12) 0.6px, transparent 0.6px);
  background-size: 22px 22px;
  mask-image: linear-gradient(180deg, transparent 0%, #000 24%, #000 72%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 24%, #000 72%, transparent 100%);
  pointer-events: none;
}

.ls-wrap {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
}

.ls-head {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.ls-title-nowrap {
  white-space: nowrap;
}

.ls-title {
  margin: 0;
  color: #1c1917;
  font-family: "Figtree", sans-serif;
  font-size: clamp(34px, 3.7vw, 48px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.02;
  text-align: center;
  text-wrap: balance;
}

.ls-sub {
  max-width: 680px;
  margin: 16px auto 0;
  color: #57534e;
  font-family: "Figtree", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  text-align: center;
  text-wrap: pretty;
}

/* ---------- Campaign capsules ---------- */
.ls-chips-wrap {
  position: relative;
  margin-top: 26px;
}

.ls-chips-wrap .ls-tabs {
  margin-top: 0;
  margin-bottom: 0;
}

.ls-chips-hint {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin: 5px 0 0;
  color: #57534e;
  font-family: "Figtree", sans-serif;
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1;
  opacity: 0;
  transform: translateY(-2px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

.ls-chips-hint svg {
  width: 12px;
  height: 12px;
  flex: none;
  color: #0f766e;
}

.ls-chips-hint.is-visible {
  opacity: 1;
  transform: none;
}

.ls-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  max-width: 1024px;
  margin: 26px auto 0;
  padding-bottom: 0;
  overflow: visible;
}

.ls-tab {
  padding: 11px 18px;
  border: 1px solid #e7e5e4;
  border-radius: 9999px;
  background: #ffffff;
  color: #57534e;
  font-family: "Figtree", sans-serif;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.12s ease, box-shadow 0.16s ease;
}

.ls-tab-short {
  display: none;
}

.ls-tab:hover {
  border-color: #99f6e4;
  background: #ffffff;
  color: #0f766e;
}

.ls-tab:active {
  transform: scale(0.98);
}

.ls-tab[aria-selected="true"] {
  border-color: #0f766e;
  background: #0f766e;
  color: #ffffff;
  box-shadow: 0 8px 20px -10px rgba(15, 118, 110, 0.5);
  animation: ls-tab-select 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes ls-tab-select {
  from {
    transform: scale(0.97);
  }
  to {
    transform: scale(1);
  }
}

@media (hover: hover) and (pointer: fine) {
  .ls-tab:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px -10px rgba(15, 118, 110, 0.35);
  }

  .ls-tab[aria-selected="true"]:hover {
    transform: none;
  }
}

.ls-tab:focus-visible,
.ls-cta:focus-visible,
.ls-chrome-btn:focus-visible,
.ls-chrome-cta:focus-visible {
  outline: 2px solid #0f766e;
  outline-offset: 2px;
}

/* ---------- Stage / bezel ---------- */
.ls-stage {
  position: relative;
}

.ls-stage-bezel {
  margin-top: 22px;
  padding: 9px;
  border: 1px solid rgba(28, 25, 23, 0.07);
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(232, 227, 217, 0.65) 0%, rgba(241, 237, 229, 0.48) 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.85) inset,
    0 34px 76px -28px rgba(20, 18, 15, 0.16),
    0 12px 26px -12px rgba(20, 18, 15, 0.08);
  animation: ls-stage-in 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.ls-window {
  overflow: hidden;
  border: 1px solid rgba(28, 25, 23, 0.09);
  border-radius: 22px;
  background: #ffffff;
  box-shadow:
    0 1px 0 #ffffff inset,
    0 4px 14px -2px rgba(20, 18, 15, 0.06);
}

.ls-window-embed {
  position: relative;
  transition: opacity 0.2s ease;
}

.ls-window-embed.is-switching {
  opacity: 0.72;
}

.ls-chrome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  border-bottom: 1px solid #f0eeeb;
  background: linear-gradient(180deg, #ffffff 0%, #fafaf9 100%);
}

.ls-chrome-left,
.ls-chrome-right {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.ls-chrome-left {
  flex: 1;
}

.ls-chrome-right {
  flex: none;
}

.ls-mark {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex: none;
  border-radius: 8px;
  background: #0f766e;
  color: #ffffff;
  font-family: "Figtree", sans-serif;
  font-size: 13px;
  font-weight: 700;
}

.ls-crumb {
  min-width: 0;
  overflow: hidden;
  color: #57534e;
  font-size: 12px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ls-crumb > span[aria-hidden] {
  margin: 0 3px;
  color: #a8a29e;
}

.ls-crumb b {
  color: #1c1917;
  font-weight: 600;
}

.ls-byline {
  color: #78716c;
  font-weight: 500;
}

.mob-view {
  display: none;
}

.mob-view.is-switching {
  animation: mob-switch-in 0.22s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes mob-switch-in {
  from {
    opacity: 0.55;
    transform: translateY(3px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.ls-chrome-cta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 32px;
  padding: 0 13px;
  border: 1px solid #0f766e;
  border-radius: 9999px;
  background: #0f766e;
  color: #ffffff;
  font-family: "Figtree", sans-serif;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.16s ease, border-color 0.16s ease, transform 0.12s ease;
}

.ls-chrome-cta:hover {
  border-color: #115e59;
  background: #115e59;
}

.ls-chrome-cta:active {
  transform: scale(0.98);
}

.ls-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #57534e;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}

.ls-status-dot {
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 999px;
  background: #0f766e;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.ls-chrome-btn {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid #e7e5e4;
  border-radius: 9999px;
  background: #ffffff;
  color: #57534e;
  font-family: "Figtree", sans-serif;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.12s ease;
}

.ls-chrome-btn:hover {
  border-color: #d6d3d1;
  background: #fafaf9;
  color: #1c1917;
}

.ls-chrome-btn:active {
  transform: scale(0.98);
}

#campaignFrame {
  display: block;
  width: 100%;
  height: 760px;
  border: 0;
  background: #fcfcfb;
}

/* ---------- Product dock ---------- */
.ls-dock {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  border-top: 1px solid #f0eeeb;
  background: #fafaf9;
}

.ls-dock-copy {
  margin: 0;
  color: #78716c;
  font-family: "Figtree", sans-serif;
  font-size: 12.5px;
  line-height: 1.45;
}

.ls-dock-copy strong {
  color: #292524;
  font-weight: 600;
}

.ls-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 22px;
  border: 1px solid #0f766e;
  border-radius: 9999px;
  background: #0f766e;
  color: #ffffff;
  font-family: "Figtree", sans-serif;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 8px 20px -12px rgba(15, 118, 110, 0.65);
  transition: background-color 0.16s ease, border-color 0.16s ease, transform 0.12s ease;
}

.ls-cta:hover {
  border-color: #115e59;
  background: #115e59;
}

.ls-cta:active {
  transform: scale(0.98);
}

/* ---------- Expanded ---------- */
.ls-stage.is-expanded {
  position: fixed;
  inset: 12px;
  z-index: 120;
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 10px;
  border-radius: 26px;
  background: #faf9f6;
  box-shadow: 0 40px 120px -30px rgba(15, 23, 42, 0.55);
}

.ls-stage.is-expanded .ls-stage-bezel {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  margin: 0;
  padding: 8px;
}

.ls-stage.is-expanded .ls-window {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.ls-stage.is-expanded #campaignFrame {
  flex: 1;
  height: auto;
  min-height: 0;
}

body.ls-stage-expanded {
  overflow: hidden;
}

@keyframes ls-stage-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .ls-section {
    overflow: visible;
    padding: 28px 16px calc(40px + env(safe-area-inset-bottom, 0px));
  }

  .ls-head {
    max-width: none;
    text-align: left;
  }

  .ls-title {
    font-size: clamp(28px, 8vw, 33px);
    letter-spacing: -0.025em;
    line-height: 1.04;
    text-align: left;
  }

  .ls-title br {
    display: none;
  }

  .ls-sub {
    max-width: 56ch;
    margin: 11px 0 0;
    font-size: 13.5px;
    line-height: 1.5;
    text-align: left;
  }

  .ls-tabs {
    position: sticky;
    top: env(safe-area-inset-top, 0px);
    z-index: 40;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 8px;
    margin: 18px -16px 0;
    padding: 10px 16px;
    border-bottom: 1px solid rgba(28, 25, 23, 0.07);
    background: #faf9f6;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .ls-tabs::-webkit-scrollbar {
    display: none;
  }

  .ls-tab {
    flex: none;
    min-height: 44px;
    padding: 0 15px;
    font-size: 13px;
    scroll-snap-align: start;
  }

  .ls-tab-full {
    display: inline;
  }

  .ls-tab-short {
    display: none;
  }

  .ls-stage {
    display: none;
  }

  .ls-chips-hint {
    display: none;
  }

  .mob-view {
    display: block;
    margin-top: 20px;
    scroll-margin-top: calc(70px + env(safe-area-inset-top, 0px));
  }

  .mob-brief {
    padding: 0;
  }

  .mob-brief-title {
    margin: 0;
    color: #1c1917;
    font-family: "Figtree", sans-serif;
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.16;
    text-wrap: balance;
  }

  .mob-brief-copy {
    display: -webkit-box;
    margin: 8px 0 0;
    overflow: hidden;
    color: #44403c;
    font-family: "Figtree", sans-serif;
    font-size: 13.5px;
    font-weight: 400;
    line-height: 1.5;
    text-wrap: pretty;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }

  .mob-brief-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin: 10px 0 0;
    color: #57534e;
    font-family: "Figtree", sans-serif;
    font-size: 11.5px;
    font-weight: 500;
    line-height: 1.3;
  }

  .mob-brief-meta b {
    color: #1c1917;
    font-weight: 600;
  }

  .mob-brief-meta svg {
    flex: none;
    margin-right: 3px;
    color: #0f766e;
    vertical-align: -2px;
  }

  .mob-brief-live {
    display: inline-flex;
    min-height: 36px;
    align-items: center;
    margin-left: auto;
    color: #0f766e;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
  }

  .mob-brief-live:hover {
    color: #115e59;
  }

  .mob-brief-live:focus-visible {
    outline: 2px solid #0f766e;
    outline-offset: 2px;
    border-radius: 4px;
  }

  .mob-review-count {
    color: #92400e;
    font-weight: 600;
  }

  .mob-review-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin: 18px 0 8px;
    padding-top: 14px;
    border-top: 1px solid #e7e5e4;
    color: #92400e;
    font-family: "Figtree", sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }

  .mob-review-head span:last-child {
    color: #57534e;
    font-weight: 600;
    letter-spacing: 0;
  }

  .mob-review-list {
    border-color: #fde68a;
  }

  .mob-brief-sep {
    color: #a8a29e;
  }

  .mob-feed-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin: 22px 0 9px;
  }

  .mob-feed-head h3 {
    margin: 0;
    color: #1c1917;
    font-family: "Figtree", sans-serif;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -0.01em;
  }

  .mob-feed-head span {
    flex: none;
    color: #57534e;
    font-family: "Figtree", sans-serif;
    font-size: 11.5px;
    font-weight: 500;
  }

  .mob-list {
    overflow: hidden;
    border: 1px solid #e7e5e4;
    border-radius: 16px;
    background: #ffffff;
  }

  .mob-creator {
    padding: 14px;
    border-top: 1px solid #f0eeeb;
    background: #ffffff;
  }

  .mob-creator:first-child {
    border-top: 0;
  }

  .mob-creator-top {
    display: flex;
    align-items: flex-start;
    gap: 11px;
  }

  .mob-avatar {
    position: relative;
    display: grid;
    width: 44px;
    height: 44px;
    flex: none;
    place-items: center;
    overflow: hidden;
    border: 1px solid #e7e5e4;
    border-radius: 50%;
    background: #f5f5f4;
    color: #57534e;
    font-family: "Figtree", sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: -0.01em;
  }

  .mob-avatar img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .mob-creator-body {
    min-width: 0;
    flex: 1;
  }

  .mob-creator-line {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 7px;
  }

  .mob-creator-name {
    min-width: 0;
    margin: 0;
    overflow: hidden;
    color: #1c1917;
    font-family: "Figtree", sans-serif;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mob-fit {
    display: inline-flex;
    flex: none;
    align-items: center;
    gap: 3px;
    padding: 4px 7px;
    border: 1px solid #99f6e4;
    border-radius: 999px;
    background: #f0fdfa;
    color: #115e59;
    font-family: "Figtree", sans-serif;
    font-size: 10.5px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
  }

  .mob-fit svg {
    flex: none;
  }

  .mob-fit--mid {
    border-color: #fde68a;
    background: #fffbeb;
    color: #92400e;
  }

  .mob-fit--low {
    border-color: #e7e5e4;
    background: #f5f5f4;
    color: #57534e;
  }

  .mob-fit--warn {
    border-color: #fecaca;
    background: #fef2f2;
    color: #991b1b;
  }

  .mob-creator-meta {
    margin: 4px 0 0;
    overflow: hidden;
    color: #57534e;
    font-family: "Figtree", sans-serif;
    font-size: 11.5px;
    font-weight: 500;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mob-creator-summary {
    display: -webkit-box;
    margin: 6px 0 0;
    overflow: hidden;
    color: #44403c;
    font-family: "Figtree", sans-serif;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.42;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .mob-creator-warning {
    display: flex;
    align-items: flex-start;
    gap: 4px;
    margin: 5px 0 0;
    color: #92400e;
    font-family: "Figtree", sans-serif;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.35;
  }

  .mob-creator-warning svg {
    flex: none;
    margin-top: 1px;
  }

  .mob-more {
    display: flex;
    width: 100%;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 10px;
    border: 1px solid #e7e5e4;
    border-radius: 12px;
    background: #ffffff;
    color: #44403c;
    font-family: "Figtree", sans-serif;
    font-size: 12.5px;
    font-weight: 600;
    transition: background-color 0.16s ease, border-color 0.16s ease, transform 0.12s ease;
  }

  .mob-more:hover {
    border-color: #d6d3d1;
    background: #fafaf9;
  }

  .mob-more:active {
    transform: scale(0.99);
  }

  .mob-more:focus-visible {
    outline: 2px solid #0f766e;
    outline-offset: 2px;
  }

  .mob-more svg {
    color: #78716c;
    transition: transform 0.16s ease;
  }

  .mob-more.is-open svg {
    transform: rotate(180deg);
  }

  .mob-footer {
    margin-top: 18px;
  }

  .mob-footer .ls-cta {
    width: 100%;
    min-height: 48px;
    font-size: 13.5px;
  }

  .mob-footer p {
    margin: 10px 0 0;
    color: #57534e;
    font-family: "Figtree", sans-serif;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.4;
    text-align: center;
  }

  .ls-stage-bezel {
    margin-top: 20px;
    padding: 6px;
    border-radius: 24px;
  }

  .ls-window {
    border-radius: 20px;
  }

  .ls-chrome {
    flex-wrap: wrap;
    padding: 9px 12px;
  }

  .ls-crumb-context,
  .ls-byline {
    display: none;
  }

  .ls-status {
    display: none;
  }

  .ls-chrome-right {
    margin-left: auto;
  }

  .ls-chrome-right #resetBtn {
    display: none;
  }

  .ls-chrome-cta,
  .ls-chrome-btn {
    min-height: 36px;
    padding: 0 13px;
  }

  #campaignFrame {
    height: 640px;
  }

  .ls-dock {
    flex-direction: column;
    align-items: stretch;
    padding: 12px 14px;
  }

  .ls-cta {
    width: 100%;
  }

  .ls-stage.is-expanded {
    inset: 0;
    padding: 0;
    border-radius: 0;
  }

  .ls-stage.is-expanded .ls-stage-bezel {
    border-radius: 0;
    border: 0;
  }

  .ls-stage.is-expanded .ls-window {
    border-radius: 0;
    border: 0;
  }
}

@media (max-width: 360px) {
  .mob-creator {
    padding: 13px 12px;
  }

  .mob-avatar {
    width: 40px;
    height: 40px;
  }

  .mob-creator-name {
    font-size: 14px;
  }

  .mob-fit {
    padding: 3px 6px;
    font-size: 10px;
  }

}

@media (prefers-reduced-motion: reduce) {
  .ls-stage-bezel,
  .mob-view.is-switching,
  .ls-tab[aria-selected="true"] {
    animation: none;
  }

  .ls-tab:hover {
    transform: none;
  }

  .ls-section *,
  .ls-section *::before,
  .ls-section *::after {
    transition-duration: 0.01ms !important;
  }
}
