:root {
  color-scheme: light;
  /* PANTONE 534 C · 536 C · 7534 C · 7519 C, with accessible tints. */
  --pantone-534: #1b365d;
  --pantone-536: #a2b2c8;
  --pantone-7534: #d1ccbd;
  --pantone-7519: #5e4b3c;
  --canvas: var(--pantone-7534);
  --paper: #f8f6ef;
  --paper-strong: #fffdf7;
  --ink: var(--pantone-534);
  --ink-soft: #405575;
  --muted: #65738a;
  --line: #bbc1c3;
  --line-strong: #8b99aa;
  --stage: var(--pantone-536);
  --accent: var(--pantone-7519);
  --accent-dark: #44362b;
  --success: var(--pantone-534);
  --error: #44362b;
  --radius-small: 7px;
  --radius-medium: 12px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  font-family: "Avenir Next", Avenir, "Helvetica Neue", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
}

body {
  min-width: 320px;
  overflow: hidden;
  color: var(--ink);
  background: var(--canvas);
}

button,
input,
textarea {
  color: inherit;
  font: inherit;
}

button,
label {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--pantone-534);
  outline-offset: 2px;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 200;
  padding: 10px 14px;
  color: white;
  background: var(--ink);
  transform: translateY(-150%);
  transition: transform 180ms var(--ease-out);
}

.skip-link:focus {
  transform: translateY(0);
}

.icon {
  display: block;
  flex: none;
}

.studio-shell {
  min-height: 100%;
}

.studio-topbar {
  position: relative;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(210px, 1fr) auto minmax(160px, 1fr) auto;
  align-items: center;
  height: 68px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.brand-lockup,
.project-switcher,
.save-state,
.topbar-actions {
  display: flex;
  align-items: center;
}

.brand-lockup {
  gap: 9px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  grid-template-columns: repeat(3, 4px);
  align-items: end;
  gap: 3px;
  width: 19px;
  height: 22px;
}

.brand-mark span {
  display: block;
  height: 100%;
  background: var(--accent);
}

.brand-mark span:nth-child(1) {
  height: 55%;
}

.brand-mark span:nth-child(2) {
  height: 100%;
}

.brand-mark span:nth-child(3) {
  height: 75%;
}

.brand-name {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.brand-product {
  padding-left: 9px;
  border-left: 1px solid var(--line-strong);
  color: var(--muted);
  font-size: 13px;
}

.project-switcher {
  gap: 10px;
  min-width: 225px;
  padding: 6px 10px;
  border: 0;
  border-radius: var(--radius-small);
  background: transparent;
  text-align: left;
}

.project-switcher:hover {
  background: color-mix(in srgb, var(--pantone-536) 28%, var(--paper));
}

.project-switcher > span:nth-child(2) {
  display: grid;
  gap: 2px;
  flex: 1;
}

.project-switcher strong {
  font-size: 13px;
}

.project-switcher small {
  color: var(--muted);
  font-size: 11px;
}

.project-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
}

.save-state {
  justify-self: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
}

.save-state > span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink-soft);
}

.topbar-actions {
  gap: 8px;
  justify-content: flex-end;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 14px;
  border-radius: var(--radius-small);
  font-size: 13px;
  font-weight: 700;
  transition: background-color 160ms ease, color 160ms ease, transform 160ms var(--ease-out);
}

.button:active {
  transform: translateY(1px);
}

.button-quiet {
  border: 1px solid var(--line);
  background: var(--paper-strong);
}

.button-quiet:hover {
  background: color-mix(in srgb, var(--pantone-536) 22%, var(--paper));
}

.button-primary {
  border: 1px solid var(--accent);
  color: #fff;
  background: var(--accent);
}

.button-primary:hover {
  border-color: var(--accent-dark);
  background: var(--accent-dark);
}

.studio-grid {
  display: grid;
  grid-template-columns: 260px minmax(470px, 1fr) 310px;
  height: calc(100vh - 68px);
  min-height: 0;
}

.panel {
  position: relative;
  z-index: 10;
  min-width: 0;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: #b3b2ac transparent;
  background: var(--paper);
}

.media-panel {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
}

.inspector-panel {
  border-left: 1px solid var(--line);
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 22px 18px 16px;
}

.panel-heading h1,
.panel-heading h2 {
  margin: 3px 0 0;
  font-size: 21px;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.section-kicker {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.icon-button {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: var(--paper-strong);
}

.mobile-panel-close {
  display: none;
}

.upload-zone {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0 14px 15px;
  padding: 13px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-medium);
  background: #f2f2ef;
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease;
}

.upload-zone:hover,
.upload-zone.is-over {
  border-color: var(--accent);
  background: #fff4f0;
}

.upload-zone input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.upload-icon {
  display: grid;
  width: 36px;
  height: 36px;
  flex: none;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--ink);
}

.upload-zone > span:last-child {
  display: grid;
  gap: 3px;
}

.upload-zone strong {
  font-size: 12px;
}

.upload-zone small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.media-tabs {
  display: flex;
  gap: 2px;
  padding: 0 14px 10px;
  border-bottom: 1px solid var(--line);
}

.media-tab {
  min-height: 32px;
  padding: 0 10px;
  border: 0;
  border-radius: var(--radius-small);
  color: var(--muted);
  background: transparent;
  font-size: 11px;
  font-weight: 700;
}

.media-tab:hover {
  color: var(--ink);
  background: #e9e9e5;
}

.media-tab.is-active {
  color: var(--ink);
  background: #deded9;
}

.media-list {
  display: grid;
  gap: 1px;
  padding: 8px 8px 80px;
}

.media-item {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) 30px;
  align-items: center;
  gap: 10px;
  min-height: 78px;
  padding: 7px 6px;
  border-radius: var(--radius-small);
  cursor: grab;
}

.media-item:hover {
  background: color-mix(in srgb, var(--pantone-536) 22%, var(--paper));
}

.media-item:active {
  cursor: grabbing;
}

.media-thumb,
.selected-thumb {
  position: relative;
  overflow: hidden;
  background: #d2d1cc;
}

.media-thumb {
  width: 50px;
  aspect-ratio: 3 / 4;
  border-radius: 5px;
}

.media-thumb img,
.media-thumb video,
.selected-thumb img,
.selected-thumb video,
.feed-tile img,
.feed-tile video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-thumb > .campaign-tile,
.selected-thumb > .campaign-tile,
.feed-tile > .campaign-tile {
  position: absolute;
  inset: 0;
}

.campaign-tile {
  display: block;
  background-image: url("../public/assets/synthetic-campaign-grid.png");
  background-position: var(--position, 0 0);
  background-size: auto 300%;
  background-repeat: no-repeat;
}

.media-kind {
  position: absolute;
  top: 4px;
  right: 4px;
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 5px;
  color: white;
  background: rgba(10, 10, 10, 0.7);
}

.media-meta {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.media-meta strong {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-meta small {
  color: var(--muted);
  font-size: 10px;
}

.add-media {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid transparent;
  border-radius: var(--radius-small);
  color: var(--muted);
  background: transparent;
}

.add-media:hover {
  border-color: var(--line-strong);
  color: var(--ink);
  background: var(--paper-strong);
}

.synthetic-note {
  position: sticky;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: auto;
  padding: 11px 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: var(--paper);
  font-size: 10px;
}

.preview-stage {
  position: relative;
  display: grid;
  grid-template-rows: 48px minmax(0, 1fr) 31px;
  min-width: 0;
  overflow: hidden;
  background: var(--stage);
}

.stage-toolbar {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 7px 16px;
  border-bottom: 1px solid color-mix(in srgb, var(--pantone-534) 22%, var(--pantone-7534));
  background: color-mix(in srgb, var(--paper) 88%, var(--pantone-536));
}

.device-picker,
.theme-switch {
  display: flex;
  align-items: center;
  height: 31px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-small);
  background: var(--paper-strong);
}

.device-picker {
  gap: 6px;
  padding: 0 10px;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 700;
}

.theme-switch {
  padding: 2px;
}

.theme-switch button {
  display: grid;
  width: 27px;
  height: 25px;
  place-items: center;
  border: 0;
  border-radius: 5px;
  color: var(--muted);
  background: transparent;
}

.theme-switch button.is-active {
  color: var(--ink);
  background: color-mix(in srgb, var(--pantone-536) 36%, var(--paper));
}

.stage-hint {
  position: absolute;
  right: 18px;
  color: var(--muted);
  font-size: 10px;
}

.phone-wrap {
  --device-scale: 1;
  position: relative;
  display: grid;
  min-height: 0;
  place-items: center;
  padding: 14px 24px 7px;
}

.device-shadow {
  position: absolute;
  bottom: 4%;
  left: 50%;
  width: min(370px, 48vw);
  height: 58px;
  border-radius: 50%;
  background: rgba(23, 23, 22, 0.32);
  filter: blur(20px);
  transform: translateX(-50%) translateY(18px);
}

.phone-device {
  position: relative;
  z-index: 2;
  width: 424px;
  height: 874px;
  padding: 10px 14px;
  border: 1px solid #5f666e;
  border-radius: 61px;
  background: linear-gradient(105deg, #111418 0%, #545d66 5%, #161a1e 11%, #0b0d10 52%, #343d46 94%, #111418 100%);
  box-shadow: 0 28px 48px rgba(27, 54, 93, 0.24), 0 8px 15px rgba(16, 20, 24, 0.4), inset 1px 0 1px rgba(255, 255, 255, 0.4), inset -1px 0 1px rgba(0, 0, 0, 0.75);
  zoom: var(--device-scale);
}

.phone-device::before {
  position: absolute;
  inset: 4px;
  z-index: -1;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 56px;
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.55);
  content: "";
}

.device-hardware {
  position: absolute;
  top: 118px;
  z-index: 1;
}

.device-hardware-left {
  left: -5px;
}

.device-hardware-right {
  right: -5px;
  top: 176px;
}

.device-hardware i {
  display: block;
  width: 5px;
  margin-bottom: 13px;
  border: 1px solid #8d959d;
  border-right: 0;
  border-radius: 3px 0 0 3px;
  background: linear-gradient(90deg, #111519, #68717a);
}

.device-hardware-left i:first-child {
  height: 25px;
}

.device-hardware-left i:not(:first-child) {
  height: 44px;
}

.device-hardware-right i {
  height: 70px;
  border: 1px solid #8d959d;
  border-left: 0;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(90deg, #68717a, #111519);
}

.device-hardware-right i:last-child {
  width: 5px;
  height: 38px;
  margin-top: 295px;
  border-radius: 0 3px 3px 0;
}

.phone-screen {
  --phone-bg: #0a0f14;
  --phone-fg: #f6f7f8;
  --phone-muted: #a5afbb;
  --phone-button: #2b3037;
  position: relative;
  container-type: inline-size;
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  border-radius: 40px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  color: var(--phone-fg);
  background: var(--phone-bg);
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  scrollbar-width: none;
  overscroll-behavior: contain;
  transition: color 180ms ease, background-color 180ms ease;
}

.dynamic-island {
  position: absolute;
  top: 7px;
  left: 50%;
  z-index: 25;
  width: 128px;
  height: 32px;
  border: 1px solid #1d2329;
  border-radius: 999px;
  background: #000;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.025);
  transform: translateX(-50%);
  pointer-events: none;
}

.phone-screen::-webkit-scrollbar {
  display: none;
}

.phone-screen[data-theme="light"] {
  --phone-bg: #ffffff;
  --phone-fg: #080808;
  --phone-muted: #737373;
  --phone-button: #efefef;
}

.phone-chrome {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--phone-bg);
}

.phone-statusbar {
  position: relative;
  z-index: 26;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 41px;
  padding: 0 15px 0 17px;
  color: var(--phone-fg);
  background: var(--phone-bg);
  font-size: 13px;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.status-left {
  display: flex;
  align-items: center;
  gap: 4px;
}

.status-left .icon {
  width: 15px;
  height: 15px;
  stroke-width: 2.25;
}

.status-icons {
  display: flex;
  align-items: center;
  gap: 7px;
}

.signal {
  display: flex;
  align-items: end;
  gap: 2px;
  height: 11px;
}

.signal i {
  width: 2px;
  border-radius: 2px;
  background: currentColor;
}

.signal i:nth-child(1) { height: 4px; }
.signal i:nth-child(2) { height: 6px; }
.signal i:nth-child(3) { height: 8px; }
.signal i:nth-child(4) { height: 11px; }

.wifi {
  stroke-width: 2.1;
}

.battery {
  position: relative;
  min-width: 27px;
  padding: 2px 5px 2px 7px;
  border-radius: 6px;
  color: #101418;
  background: #a2a4a8;
  font-size: 10px;
  font-weight: 800;
  text-align: center;
}

.battery::before {
  position: absolute;
  top: 1px;
  bottom: 1px;
  left: 1px;
  width: 4px;
  border-radius: 5px 0 0 5px;
  background: #f2c900;
  content: "";
}

.profile-nav {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0 13px;
  background: var(--phone-bg);
}

.profile-nav-back {
  display: grid;
  width: 31px;
  height: 31px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--phone-fg);
}

.profile-nav-back .icon {
  stroke-width: 2.6;
}

.profile-nav > strong {
  overflow: hidden;
  margin-left: 9px;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.verified-badge {
  display: flex;
  width: 20px;
  height: 20px;
  margin-left: 5px;
  align-items: center;
  justify-content: center;
}

.verified-badge[hidden],
.highlights[hidden],
.profile-avatar span[hidden] {
  display: none !important;
}

.profile-nav-more {
  margin-left: auto;
}

.profile-nav-more .icon {
  stroke-width: 2.3;
}

.profile-nav-follow {
  display: none;
  width: 60px;
  height: 34px;
  margin-left: auto;
  place-items: center;
  border: 1px solid #2d3742;
  border-radius: 999px;
  color: var(--phone-fg);
  background: #10161b;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
  font: inherit;
  font-size: 12px;
  font-weight: 750;
}

.phone-screen.is-scrolled .profile-nav-back {
  width: 36px;
  height: 36px;
  border: 1px solid #26303a;
  border-radius: 50%;
  background: #10161b;
}

.phone-screen.is-scrolled .profile-nav-more {
  display: none;
}

.phone-screen.is-scrolled .profile-nav-follow {
  display: grid;
}

.phone-screen[data-theme="light"].is-scrolled .profile-nav-back,
.phone-screen[data-theme="light"].is-scrolled .profile-nav-follow {
  border-color: #222a33;
  color: #fff;
  background: #161b20;
}

.mobile-profile {
  padding: 15px 13px 12px;
}

.profile-summary {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
}

.profile-overview {
  display: grid;
  align-self: center;
  gap: 11px;
  min-width: 0;
}

.profile-display-name {
  overflow: hidden;
  font-size: 15px;
  font-weight: 750;
  letter-spacing: -0.022em;
  line-height: 1.08;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-avatar {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid #d1d1d1;
  border-radius: 50%;
}

.profile-avatar span {
  position: absolute;
  right: 0;
  bottom: 5px;
  z-index: 1;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 2px solid var(--phone-bg);
  border-radius: 50%;
  color: #fff;
  background: #171717;
  font-size: 8px;
  font-weight: 800;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  text-align: center;
}

.profile-stats > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.profile-stats strong {
  overflow: hidden;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-stats span {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
}

.profile-copy {
  display: grid;
  gap: 2px;
  margin-top: 15px;
  font-size: 12px;
  line-height: 1.32;
}

.profile-copy p {
  margin: 0;
}

.profile-category {
  color: var(--phone-muted);
}

.profile-copy a {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #1b4f7a;
  font-weight: 650;
  text-decoration: none;
}

.profile-link[hidden],
.meta-chips[hidden] {
  display: none;
}

.phone-screen[data-theme="dark"] .profile-copy a {
  color: #e0f1ff;
}

.meta-chips {
  display: flex;
  gap: 6px;
  max-width: 100%;
  margin-top: 9px;
  overflow-x: auto;
  scrollbar-width: none;
}

.meta-chips::-webkit-scrollbar {
  display: none;
}

.meta-chip {
  display: inline-flex;
  min-width: 0;
  flex: 0 0 auto;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  padding: 4px 8px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--phone-fg) 16%, transparent);
  border-radius: 999px;
  color: var(--phone-fg);
  font-size: 10px;
  font-weight: 650;
  white-space: nowrap;
}

.meta-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.meta-chip b {
  display: grid;
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  font-size: 11px;
  line-height: 1;
}

.meta-chip-threads b {
  border: 1px solid currentColor;
  font-size: 9px;
}

.meta-chip-facebook b {
  color: var(--phone-bg);
  background: var(--phone-fg);
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  font-size: 12px;
  font-weight: 800;
}

.profile-actions {
  display: grid;
  grid-template-columns: 1.1fr 1fr 32px;
  gap: 5px;
  margin-top: 15px;
}

.profile-actions[data-contact-action="email"],
.profile-actions[data-contact-action="call"] {
  grid-template-columns: 1.1fr 1fr 1fr 32px;
}

.profile-actions button {
  min-width: 0;
  min-height: 32px;
  overflow: hidden;
  border: 0;
  border-radius: 8px;
  color: var(--phone-fg);
  background: var(--phone-button);
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-actions .profile-follow-action {
  color: #fff;
  background: #4b5eff;
}

.profile-actions .profile-action-icon {
  display: grid;
  place-items: center;
  padding: 0;
}

.highlights {
  display: flex;
  gap: 19px;
  margin-top: 16px;
  padding-bottom: 4px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
}

.highlights::-webkit-scrollbar {
  display: none;
}

.highlights > div {
  display: grid;
  justify-items: center;
  gap: 5px;
  min-width: 64px;
  scroll-snap-align: start;
}

.highlight-ring {
  width: 64px;
  aspect-ratio: 1;
  border: 3px solid var(--phone-bg);
  border-radius: 50%;
  outline: 1px solid color-mix(in srgb, var(--phone-fg) 32%, transparent);
}

.highlights small {
  max-width: 70px;
  overflow: hidden;
  color: var(--phone-fg);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-tabs {
  position: sticky;
  top: 83px;
  z-index: 18;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: 41px;
  border-top: 0;
  background: var(--phone-bg);
}

.profile-tabs button {
  position: relative;
  display: grid;
  place-items: center;
  border: 0;
  color: var(--phone-muted);
  background: transparent;
}

.profile-tabs button.is-active {
  color: var(--phone-fg);
}

.profile-tabs button.is-active::after {
  position: absolute;
  right: 17px;
  bottom: 0;
  left: 17px;
  height: 2px;
  background: var(--phone-fg);
  content: "";
}

.feed-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  min-height: 122px;
  background: color-mix(in srgb, var(--phone-fg) 9%, var(--phone-bg));
}

.feed-tile {
  position: relative;
  display: block;
  min-width: 0;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: #d4d4d0;
  cursor: grab;
  isolation: isolate;
}

.feed-tile:active {
  cursor: grabbing;
}

.feed-tile::after {
  position: absolute;
  inset: 0;
  z-index: 5;
  border: 3px solid var(--accent);
  content: "";
  opacity: 0;
  pointer-events: none;
  transition: opacity 140ms ease;
}

.feed-tile.is-selected::after {
  opacity: 0;
}

.feed-tile:hover::after,
.feed-tile:focus-visible::after {
  opacity: 1;
}

.feed-tile.is-drop-target::after {
  border-width: 5px;
  opacity: 1;
}

.feed-tile.is-dragging {
  opacity: 0.42;
}

.tile-markers {
  position: absolute;
  top: 5px;
  right: 5px;
  z-index: 3;
  display: grid;
  justify-items: end;
  gap: 2px;
  color: #fff;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.55));
}

.drag-handle {
  position: absolute;
  right: 5px;
  bottom: 5px;
  z-index: 3;
  display: grid;
  width: 23px;
  height: 23px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: rgba(0, 0, 0, 0.62);
  opacity: 0;
  pointer-events: none;
  transform: scale(0.85);
  transition: opacity 140ms ease, transform 180ms var(--ease-out);
}

.feed-tile:hover .drag-handle,
.feed-tile:focus-visible .drag-handle {
  opacity: 1;
  transform: scale(1);
}

.feed-tile.is-touch-dragging {
  z-index: 6;
  opacity: 0.65;
  transform: scale(0.96);
}

.scroll-cue {
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 0;
  color: #73726d;
  font-size: 10px;
}

.scroll-cue span {
  width: 14px;
  height: 20px;
  border: 1px solid #898883;
  border-radius: 8px;
}

.scroll-cue span::after {
  display: block;
  width: 2px;
  height: 5px;
  margin: 3px auto;
  border-radius: 2px;
  background: #898883;
  content: "";
  animation: scroll-cue 1.9s var(--ease-out) infinite;
}

@keyframes scroll-cue {
  0%, 20% { transform: translateY(0); opacity: 0.35; }
  60% { transform: translateY(6px); opacity: 1; }
  100% { transform: translateY(6px); opacity: 0; }
}

.cover-upload input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.inspector-section {
  padding: 18px 16px;
  border-top: 1px solid var(--line);
}

.section-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 13px;
}

.section-title-row h3 {
  margin: 0;
  font-size: 12px;
}

.section-title-row span {
  color: var(--muted);
  font-size: 9px;
}

.profile-fields > label,
.metric-fields label {
  display: grid;
  gap: 5px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}

.profile-fields input,
.profile-fields textarea {
  width: 100%;
  min-height: 34px;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  color: var(--ink);
  background: var(--paper-strong);
  font-size: 11px;
  line-height: 1.35;
  resize: vertical;
}

.profile-fields input[type="file"] {
  padding: 5px 7px;
  color: var(--muted);
  cursor: pointer;
  font-size: 10px;
}

.profile-fields input[type="file"]::file-selector-button {
  margin-right: 7px;
  padding: 4px 7px;
  border: 0;
  border-radius: 4px;
  color: var(--ink);
  background: #e7e7e3;
  font: inherit;
  font-weight: 700;
}

.profile-fields input:hover,
.profile-fields textarea:hover {
  border-color: var(--line-strong);
}

.profile-fields input:focus,
.profile-fields textarea:focus {
  border-color: var(--pantone-534);
}

.metric-fields {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.profile-config {
  display: grid;
  gap: 8px;
  margin-top: 13px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.link-config {
  gap: 8px;
}

.link-config label:not(.toggle-option),
.meta-text-field {
  display: grid;
  gap: 5px;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 700;
}

.highlight-editor {
  display: grid;
  gap: 5px;
  max-height: 190px;
  overflow: auto;
  padding-right: 2px;
}

.highlight-editor-row {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) 27px 27px;
  align-items: center;
  gap: 5px;
}

.highlight-editor-preview {
  width: 26px;
  height: 26px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background-color: var(--pantone-536);
  background-position: center;
  background-size: cover;
}

.highlight-editor-row input[type="text"],
.meta-text-field input {
  min-height: 27px;
  padding: 5px 7px;
  font-size: 10px;
}

.highlight-image-input,
.remove-highlight-button,
.add-highlight-button {
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  background: var(--paper-strong);
}

.highlight-image-input,
.remove-highlight-button {
  width: 27px;
  height: 27px;
  border-radius: 5px;
  cursor: pointer;
}

.highlight-image-input input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.remove-highlight-button:hover,
.highlight-image-input:hover {
  border-color: var(--pantone-534);
  color: var(--pantone-534);
}

.add-highlight-button {
  min-height: 29px;
  justify-content: center;
  gap: 5px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
}

.add-highlight-button:hover {
  border-color: var(--pantone-7519);
  color: var(--accent);
}

.config-label {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}

.toggle-option,
.pin-option {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
}

.toggle-option input,
.pin-option input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--accent);
}

.contact-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 3px;
  border-radius: var(--radius-small);
  background: color-mix(in srgb, var(--pantone-536) 32%, var(--paper));
}

.contact-options button {
  min-height: 28px;
  border: 0;
  border-radius: 5px;
  color: var(--muted);
  background: transparent;
  font-size: 9px;
  font-weight: 700;
}

.contact-options button.is-active {
  color: var(--ink);
  background: var(--paper-strong);
}

.meta-profile-options {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  align-items: end;
  gap: 7px 8px;
}

.meta-profile-options .toggle-option {
  min-height: 27px;
}

.meta-text-field input:disabled {
  color: var(--muted);
  background: color-mix(in srgb, var(--pantone-7534) 36%, var(--paper));
}

.selected-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
}

.selected-thumb {
  width: 58px;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-small);
}

.selected-card > div:last-child {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.selected-card strong {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.selected-card small {
  color: var(--muted);
  font-size: 9px;
}

.media-type-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-top: 12px;
  padding: 3px;
  border-radius: var(--radius-small);
  background: #e7e7e3;
}

.media-type-toggle button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 30px;
  border: 0;
  border-radius: 5px;
  color: var(--muted);
  background: transparent;
  font-size: 10px;
  font-weight: 700;
}

.media-type-toggle button.is-active {
  color: var(--ink);
  background: var(--paper-strong);
}

.pin-option {
  margin-top: 12px;
}

.crop-controls {
  display: grid;
  gap: 9px;
  margin-top: 12px;
}

.crop-controls label {
  display: grid;
  gap: 4px;
}

.crop-controls label > span {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}

.crop-controls input {
  width: 100%;
  accent-color: var(--accent);
}

.reel-cover-tools {
  display: grid;
  gap: 8px;
  margin-top: 13px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.cover-upload,
.reel-cover-tools button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 33px;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: var(--paper-strong);
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
}

.reel-cover-tools video {
  width: 100%;
  max-height: 155px;
  background: #111;
  object-fit: contain;
}

.reel-cover-tools p {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.4;
}

.position-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 12px;
}

.position-actions button,
.remove-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 33px;
  border-radius: var(--radius-small);
  font-size: 10px;
  font-weight: 700;
}

.position-actions button {
  border: 1px solid var(--line);
  background: var(--paper-strong);
}

.position-actions button:hover:not(:disabled) {
  border-color: var(--line-strong);
  background: #eeeeeb;
}

.position-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.remove-button {
  width: 100%;
  margin-top: 8px;
  border: 0;
  color: var(--error);
  background: transparent;
}

.remove-button:hover {
  background: #f8e9e6;
}

.empty-selection {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}

.empty-selection p {
  margin: 0;
  font-size: 10px;
  line-height: 1.45;
}

.exit-presentation {
  display: none;
}

.toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  z-index: 120;
  max-width: min(380px, calc(100vw - 32px));
  padding: 11px 15px;
  border-radius: var(--radius-small);
  color: #fff;
  background: #181817;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
  font-size: 12px;
  opacity: 0;
  transform: translate(-50%, 18px);
  transition: opacity 180ms ease, transform 260ms var(--ease-out);
  pointer-events: none;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast.is-error {
  background: var(--error);
}

.is-presenting .studio-topbar,
.is-presenting .panel,
.is-presenting .stage-toolbar,
.is-presenting .scroll-cue {
  display: none;
}

.is-presenting .studio-grid {
  display: block;
  height: 100vh;
}

.is-presenting .preview-stage {
  display: grid;
  height: 100%;
  grid-template-rows: 1fr;
  background: #151514;
}

.is-presenting .phone-wrap {
  padding: 7px 26px;
}

.is-presenting .phone-device {
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.52), 0 6px 16px rgba(0, 0, 0, 0.42), inset 0 0 0 1px #73736d;
}

.is-presenting .device-shadow {
  background: rgba(0, 0, 0, 0.72);
}

.is-presenting .feed-tile.is-selected::after,
.is-presenting .drag-handle {
  display: none;
}

.is-presenting .exit-presentation {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid #555550;
  border-radius: var(--radius-small);
  color: #fff;
  background: #262624;
  font-size: 11px;
}

@media (max-width: 1120px) {
  .studio-grid {
    grid-template-columns: 225px minmax(430px, 1fr) 280px;
  }

  .stage-hint,
  .save-state {
    display: none;
  }

  .studio-topbar {
    grid-template-columns: 1fr auto auto;
  }

  .project-switcher {
    min-width: 210px;
  }
}

@media (max-width: 920px) {
  .studio-grid {
    grid-template-columns: 210px minmax(430px, 1fr);
  }

  .inspector-panel {
    position: fixed;
    top: 68px;
    right: 0;
    bottom: 0;
    z-index: 50;
    display: block;
    width: min(340px, calc(100vw - 40px));
    border-left: 1px solid var(--line);
    box-shadow: -14px 0 38px rgba(25, 25, 24, 0.18);
    transform: translateX(105%);
    transition: transform 280ms var(--ease-out);
  }

  .inspector-open .inspector-panel {
    transform: translateX(0);
  }

  .mobile-panel-close {
    display: grid;
  }

}

@media (max-width: 720px) {
  body {
    overflow: hidden;
  }

  .studio-topbar {
    grid-template-columns: 1fr auto;
    height: 58px;
    padding: 0 12px;
  }

  .brand-product,
  .project-switcher,
  .button-quiet {
    display: none;
  }

  .button-primary {
    min-height: 34px;
    padding: 0 11px;
    font-size: 11px;
  }

  .studio-grid {
    display: block;
    height: calc(100vh - 58px);
  }

  .preview-stage {
    height: 100%;
    grid-template-rows: 42px minmax(0, 1fr) 26px;
  }

  .stage-toolbar {
    padding: 5px 10px;
  }

  .phone-wrap {
    padding: 8px 10px;
  }

  .media-panel,
  .inspector-panel {
    position: fixed;
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 70;
    width: 100%;
    max-height: min(74vh, 640px);
    border: 0;
    border-top: 1px solid var(--line);
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -18px 40px rgba(25, 25, 24, 0.2);
    transform: translateY(105%);
    transition: transform 300ms var(--ease-out);
  }

  .media-open .media-panel,
  .inspector-open .inspector-panel {
    transform: translateY(0);
  }

  .media-list {
    grid-template-columns: 1fr 1fr;
    gap: 3px;
  }

  .scroll-cue {
    visibility: hidden;
  }

  .is-presenting .exit-presentation {
    top: 9px;
    right: 9px;
  }

}

@media (max-height: 680px) and (min-width: 721px) {
  .studio-grid {
    grid-template-columns: 220px minmax(390px, 1fr) 275px;
  }

  .panel-heading {
    padding-top: 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (hover: none), (pointer: coarse) {
  .feed-tile.is-selected .drag-handle {
    opacity: 1;
    pointer-events: auto;
    touch-action: none;
    transform: scale(1);
  }
}
