:root {
  font-family:
    -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
    "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Locked Warm Stone Mist Palette (Planex Reference Aesthetic) */
  --bg-canvas:
    radial-gradient(
      ellipse 72% 44% at 50% -4%,
      rgba(255, 255, 255, 0.58),
      transparent 72%
    ),
    linear-gradient(158deg, #efede9 0%, #e8e5e0 52%, #e3dfd9 100%);
  --bg-solid: #e8e5e0;
  --card-bg: rgba(252, 251, 249, 0.88);
  --card-solid: #fbfaf8;
  --card-border: rgba(255, 255, 255, 0.82);
  --card-shadow:
    0 4px 24px rgba(32, 26, 20, 0.036),
    0 1px 2px rgba(32, 26, 20, 0.024);
  --tile-bg: rgba(236, 233, 228, 0.56);
  --tile-hover: #ffffff;
  --tile-hover-shadow: 0 10px 26px rgba(32, 26, 20, 0.068);
  --track-bg: rgba(227, 223, 217, 0.72);
  --ink: #161618;
  --muted: #6e6a64;
  --subtle: #96918a;
  --line: rgba(22, 22, 24, 0.075);
  --line-soft: rgba(22, 22, 24, 0.05);
  --pill-dark: #161618;
  --pill-dark-hover: #2c2c30;
  --green: #1f7a3d;
  --green-soft: #e3f4e8;
  --green-border: rgba(31, 122, 61, 0.22);
  --amber: #946200;
  --amber-soft: #fbf0d9;
  --radius-card: 24px;
  --radius-tile: 18px;
  --side: 248px;
}

* {
  box-sizing: border-box;
}
html {
  min-height: 100%;
  background: var(--bg-solid);
}
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg-canvas);
  background-attachment: fixed;
  color: var(--ink);
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  border: 0;
  background: none;
  color: inherit;
  transition:
    background 0.18s cubic-bezier(0.2, 0.8, 0.2, 1),
    border-color 0.18s cubic-bezier(0.2, 0.8, 0.2, 1),
    color 0.18s cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 0.18s cubic-bezier(0.2, 0.8, 0.2, 1),
    transform 0.12s ease-out;
}
button:active {
  transform: scale(0.97);
}
:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}
a {
  color: inherit;
}
i[data-icon],
i.glyph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
i[data-icon] svg,
i.glyph svg {
  display: block;
  width: 14.5px;
  height: 14.5px;
}

/* Outer workspace shell */
.app-shell {
  max-width: 1460px;
  margin: 0 auto;
  padding: 18px 26px 36px;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Floating borderless top bar */
.top {
  display: grid;
  grid-template-columns: var(--side) minmax(240px, 440px) minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  padding: 2px 2px;
}
.top-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.brand {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  text-decoration: none;
  white-space: nowrap;
}
.brand img {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  flex: none;
}
.brand strong {
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--ink);
  white-space: nowrap;
}
.brand span {
  font-size: 12px;
  color: var(--subtle);
  font-weight: 500;
  padding-left: 10px;
  border-left: 1px solid var(--line);
  white-space: nowrap;
}

/* Floating capsule search bar */
.search {
  height: 42px;
  display: flex;
  align-items: center;
  gap: 9px;
  background: var(--card-bg);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  padding: 0 14px;
  border: 1px solid var(--card-border);
  border-radius: 999px;
  color: var(--subtle);
  box-shadow: var(--card-shadow);
  transition:
    background 0.18s,
    box-shadow 0.18s,
    border-color 0.18s;
}
.search:focus-within {
  background: #ffffff;
  border-color: rgba(22, 22, 24, 0.16);
  box-shadow:
    0 6px 22px rgba(32, 26, 20, 0.06),
    0 0 0 3px rgba(22, 22, 24, 0.055);
}
.search input {
  width: 100%;
  min-width: 0;
  outline: 0;
  border: 0;
  background: transparent;
  font-size: 13px;
  color: var(--ink);
}
.search input::placeholder {
  color: var(--subtle);
}
.search kbd {
  font:
    500 10.5px -apple-system,
    sans-serif;
  color: var(--muted);
  background: var(--tile-bg);
  white-space: nowrap;
  border-radius: 999px;
  padding: 3px 7px;
}
.top-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

/* Shared button styles */
.quiet,
.outline,
.primary,
.copy,
.copy-all,
.plain,
.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.quiet,
.outline,
.primary {
  font-size: 13px;
  border-radius: 999px;
  padding: 8px 16px;
  font-weight: 550;
}
.outline {
  background: var(--card-bg);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border: 1px solid var(--card-border);
  color: var(--ink);
  box-shadow: var(--card-shadow);
}
.outline:hover {
  background: #ffffff;
  box-shadow: 0 6px 18px rgba(32, 26, 20, 0.06);
}
.primary {
  background: var(--pill-dark);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(22, 22, 24, 0.15);
}
.primary:hover {
  background: var(--pill-dark-hover);
}
.plain {
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 500;
}
.plain:hover {
  background: var(--tile-bg);
  color: var(--ink);
}
.icon {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  box-shadow: var(--card-shadow);
}
.icon:hover {
  background: #ffffff;
}
.top .mobile-menu-btn {
  display: none;
}
.top .outline {
  white-space: nowrap;
}

/* Main floating Bento layout */
.layout {
  display: grid;
  grid-template-columns: var(--side) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  flex: 1;
}

/* Left Floating Directory Card — Light & Airy (no competing black slab) */
aside#side {
  background: var(--card-bg);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-card);
  box-shadow: var(--card-shadow);
  padding: 18px 12px 14px;
  position: sticky;
  top: 18px;
  max-height: calc(100dvh - 104px);
  display: flex;
  flex-direction: column;
  gap: 13px;
}
.side-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
}
.side-head h2 {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
  margin: 0;
}

/* Platform segmented pill with cohesive Android / iOS icons */
.segmented {
  display: flex;
  padding: 3px;
  background: var(--track-bg);
  border-radius: 999px;
  margin: 0 2px;
}
.segmented button {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 550;
  height: 32px;
}
.segmented button:hover:not(.sel) {
  color: var(--ink);
}
.segmented .sel {
  background: #ffffff;
  color: var(--ink);
  box-shadow:
    0 2px 6px rgba(32, 26, 20, 0.07),
    0 1px 1px rgba(32, 26, 20, 0.04);
  font-weight: 600;
}

#sidebody {
  min-height: 0;
  overflow: auto;
  scrollbar-width: thin;
  padding: 0 2px;
}
.caption {
  margin: 2px 8px 10px;
  font-size: 11px;
  font-weight: 600;
  color: var(--subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}
/* 3-Column Package Number Tile Grid (Planex Calendar Tile Aesthetic) */
.pack-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 2px 2px 4px;
}
.pack-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 13px 6px 11px;
  border-radius: 15px;
  background: var(--tile-bg);
  border: 1px solid rgba(22, 22, 24, 0.032);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.tile-num {
  font-size: 17.5px;
  font-weight: 650;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--ink);
}
.tile-sub {
  font-size: 10.5px;
  font-weight: 500;
  color: var(--subtle);
  line-height: 1;
}
.pack-tile:hover:not(.active) {
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(22, 22, 24, 0.06);
  box-shadow: 0 3px 10px rgba(32, 26, 20, 0.05);
}
.pack-tile.active {
  background: #ffffff;
  border-color: rgba(22, 22, 24, 0.1);
  box-shadow:
    0 6px 18px rgba(32, 26, 20, 0.095),
    0 1px 2px rgba(32, 26, 20, 0.04);
}
.pack-tile.active::after {
  content: "";
  position: absolute;
  top: 7px;
  right: 7px;
  width: 5.5px;
  height: 5.5px;
  border-radius: 50%;
  background: var(--pill-dark);
}
.pack-tile.active .tile-num {
  color: var(--ink);
}
.pack-tile.active .tile-sub {
  color: var(--muted);
  font-weight: 600;
}
.pack {
  width: 100%;
  display: flex;
  align-items: center;
  text-align: left;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 14px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--muted);
  margin: 2px 0;
  min-height: 42px;
  border: 1px solid transparent;
  font-variant-numeric: tabular-nums;
}
.pack-num {
  width: 26px;
  height: 26px;
  border-radius: 9px;
  background: var(--tile-bg);
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 650;
  display: inline-grid;
  place-items: center;
  flex: none;
  font-variant-numeric: tabular-nums;
  transition:
    background 0.16s,
    color 0.16s;
}
.pack:hover:not(.active) {
  background: rgba(255, 255, 255, 0.56);
  color: var(--ink);
}
.pack:hover:not(.active) .pack-num {
  background: rgba(22, 22, 24, 0.09);
  color: var(--ink);
}
/* Active pack: elevated white card + crisp obsidian number pill */
.pack.active {
  background: #ffffff;
  color: var(--ink);
  font-weight: 600;
  border-color: rgba(22, 22, 24, 0.055);
  box-shadow: 0 4px 14px rgba(32, 26, 20, 0.065);
}
.pack.active .pack-num {
  background: var(--pill-dark);
  color: #ffffff;
}
.pack .trail {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--subtle);
}
.pack-count {
  font-size: 11px;
  font-weight: 500;
  color: var(--subtle);
}
.pack.active .pack-count {
  color: var(--muted);
}
.pack .trail svg {
  width: 13px;
  height: 13px;
  color: var(--ink);
}
.pack small {
  display: block;
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 400;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
.pack .result {
  min-width: 0;
  flex: 1;
  display: grid;
  gap: 3px;
}
.pack .result span {
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 450;
}

/* Main Area: 2-Card Floating Bento Grid */
#main {
  min-width: 0;
}
.bento-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 336px;
  gap: 18px;
  align-items: start;
  animation: arrive 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes arrive {
  from {
    opacity: 0.45;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* Center Luminous Bento Card — Hero Stage */
.workspace-card {
  background: var(--card-bg);
  -webkit-backdrop-filter: blur(22px);
  backdrop-filter: blur(22px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-card);
  box-shadow: var(--card-shadow);
  padding: 28px 30px 30px;
  min-width: 0;
}
.head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.head h1 {
  font-size: clamp(26px, 2.4vw, 33px);
  line-height: 1.15;
  letter-spacing: -0.025em;
  margin: 0;
  font-weight: 650;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.headline {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  padding: 4px 11px;
  font-size: 11.5px;
  font-weight: 600;
  background: var(--green-soft);
  color: var(--green);
}
.status:before {
  content: "";
  width: 5.5px;
  height: 5.5px;
  background: currentColor;
  border-radius: 50%;
}
.status.pending {
  background: var(--amber-soft);
  color: var(--amber);
}
.meta {
  font-size: 13px;
  color: var(--muted);
  margin: 7px 0 0;
  font-variant-numeric: tabular-nums;
}

/* Category Pill Switcher with cohesive micro-icons */
.tabs-wrap {
  position: relative;
  margin-bottom: 24px;
}
.tabs {
  display: inline-flex;
  max-width: 100%;
  gap: 3px;
  padding: 4px;
  border-radius: 999px;
  background: var(--track-bg);
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar {
  display: none;
}
.tabs button {
  font-size: 13px;
  color: var(--muted);
  font-weight: 550;
  white-space: nowrap;
  padding: 7px 14px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.tabs button i.glyph {
  opacity: 0.72;
}
.tabs button:hover:not(.on) {
  color: var(--ink);
}
.tabs button:hover:not(.on) i.glyph {
  opacity: 1;
}
.tabs button.on {
  background: #ffffff;
  color: var(--ink);
  font-weight: 600;
  box-shadow:
    0 2px 8px rgba(32, 26, 20, 0.07),
    0 1px 1px rgba(32, 26, 20, 0.03);
}
.tabs button.on i.glyph {
  opacity: 1;
}

/* Unified Slot Badge */
.slot-badge {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(22, 22, 24, 0.075);
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  flex: none;
  transition:
    background 0.18s,
    color 0.18s,
    transform 0.18s;
}

/* Copy Cards Section Header */
.sectiontitle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  padding: 0 2px;
}
.sectiontitle-left {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.sectiontitle h2 {
  margin: 0;
  font-size: 12.5px;
  font-weight: 650;
  color: var(--ink);
}
.section-ctx {
  font-size: 12px;
  color: var(--subtle);
}
.sectiontitle-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.kbd-hint {
  font-size: 11.5px;
  color: var(--subtle);
}
.copy-all {
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 550;
  color: var(--muted);
  background: var(--tile-bg);
  border: 1px solid rgba(22, 22, 24, 0.05);
}
.copy-all i svg {
  width: 13px;
  height: 13px;
}
.copy-all:hover {
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 2px 8px rgba(32, 26, 20, 0.06);
}
.copy-all.done {
  background: var(--green-soft);
  color: var(--green);
  border-color: var(--green-border);
}

/* Designer-Native Click-Anywhere Copy Cards */
.copy-list {
  display: grid;
  gap: 10px;
}
.entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 20px;
  align-items: center;
  padding: 18px 20px;
  border-radius: var(--radius-tile);
  background: var(--tile-bg);
  border: 1px solid rgba(22, 22, 24, 0.032);
  cursor: pointer;
  transition:
    background 0.18s cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 0.18s cubic-bezier(0.2, 0.8, 0.2, 1),
    border-color 0.18s cubic-bezier(0.2, 0.8, 0.2, 1),
    transform 0.16s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.entry:hover,
.entry.is-linked {
  background: var(--tile-hover);
  border-color: rgba(22, 22, 24, 0.065);
  box-shadow: var(--tile-hover-shadow);
}
.entry:hover .slot-badge,
.entry.is-linked .slot-badge {
  background: var(--pill-dark);
  color: #ffffff;
}
.entry.copied {
  border-color: var(--green-border);
  box-shadow: 0 6px 20px rgba(31, 122, 61, 0.08);
}
.entry-top {
  grid-column: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.entry label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
}
.entry-meta {
  font-size: 11px;
  font-weight: 500;
  color: var(--subtle);
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(22, 22, 24, 0.04);
  font-variant-numeric: tabular-nums;
}
.value {
  grid-column: 1;
  white-space: pre-line;
  font-size: clamp(18px, 1.55vw, 21.5px);
  line-height: 1.44;
  letter-spacing: -0.018em;
  font-weight: 500;
  color: var(--ink);
  overflow-wrap: anywhere;
}
/* Visual newline indicator (never copied to clipboard) */
.nl-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 5px;
  padding: 0 5px;
  height: 17px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 500;
  color: var(--subtle);
  background: rgba(22, 22, 24, 0.055);
  vertical-align: 1px;
  user-select: none;
  -webkit-user-select: none;
}
.copy {
  grid-column: 2;
  grid-row: 1 / span 2;
  font-size: 12.5px;
  font-weight: 550;
  border-radius: 999px;
  padding: 9px 15px;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid rgba(22, 22, 24, 0.075);
  box-shadow: 0 2px 6px rgba(32, 26, 20, 0.045);
  min-width: 78px;
}
.entry:hover .copy,
.entry.is-linked .copy,
.copy:hover {
  background: var(--pill-dark);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(22, 22, 24, 0.16);
}
.copy i svg {
  width: 13.5px;
  height: 13.5px;
}
.copy.done,
.entry:hover .copy.done,
.copy.done:hover {
  background: var(--green-soft) !important;
  color: var(--green) !important;
  border-color: var(--green-border) !important;
  box-shadow: none !important;
}
.matching {
  background: #ffffff;
  border-color: rgba(22, 22, 24, 0.14);
  box-shadow:
    inset 3px 0 0 var(--pill-dark),
    var(--tile-hover-shadow);
}
.matching .slot-badge {
  background: var(--pill-dark);
  color: #ffffff;
}

/* Right Bento Card — Natural-Proportion UI Frame + Keynote Spotlight */
.reference {
  position: sticky;
  top: 18px;
}
.reference-toggle {
  display: none;
}
.guide {
  background: var(--card-bg);
  -webkit-backdrop-filter: blur(22px);
  backdrop-filter: blur(22px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-card);
  box-shadow: var(--card-shadow);
  padding: 20px;
  display: grid;
  gap: 15px;
}
.guide-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.kicker {
  margin: 0;
  font-size: 14px;
  font-weight: 650;
  color: var(--ink);
  letter-spacing: -0.015em;
}
.guide-sub {
  margin: 3px 0 0;
  font-size: 11.5px;
  color: var(--subtle);
}
.guide-tools {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.zoom-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  background: var(--tile-bg);
  padding: 4px 9px;
  border-radius: 999px;
  white-space: nowrap;
}
.zoom-btn i svg {
  width: 12px;
  height: 12px;
}
.zoom-btn:hover {
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 2px 6px rgba(32, 26, 20, 0.08);
}
.device-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  background: var(--tile-bg);
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.device-pill i.glyph svg {
  width: 12.5px;
  height: 12.5px;
}

/* Real UI Screenshot Stage + Keynote Spotlight Cutout */
.pv-stage-real {
  padding: 16px 14px;
  min-height: 180px;
}
.real-ui-wrap {
  position: relative;
  display: inline-block;
  max-width: 100%;
  line-height: 0;
}
.real-ui-wrap.is-wide {
  width: 100%;
}
.real-ui-wrap.is-portrait .real-ui-img {
  max-height: 310px;
  width: auto;
}
.real-ui-wrap.is-tall .real-ui-img {
  max-height: 365px;
  width: auto;
}
.real-ui-wrap.is-square .real-ui-img {
  max-height: 270px;
  width: auto;
}
.real-ui-clip {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  box-shadow:
    0 12px 30px rgba(28, 24, 20, 0.16),
    0 1px 3px rgba(28, 24, 20, 0.08);
  background: #1a1a1d;
}
.real-ui-wrap.is-tall .real-ui-clip {
  border-radius: 18px;
}
.real-ui-img {
  display: block;
  max-width: 100%;
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
}
.pv-stage.pv-stage-real .wf-slot.ui-hotspot {
  position: absolute;
  margin: 0;
  padding: 0;
  background: transparent;
  border: 1.5px solid transparent;
  cursor: pointer;
  z-index: 2;
  opacity: 1 !important;
  transition:
    border-color 0.2s ease,
    box-shadow 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.pv-stage.pv-stage-real .wf-slot.ui-hotspot:hover,
.pv-stage.pv-stage-real .wf-slot.ui-hotspot.is-linked {
  background: transparent;
  border-color: #ffffff;
  box-shadow:
    0 0 0 9999px rgba(14, 14, 18, 0.56),
    0 0 0 3px rgba(255, 255, 255, 0.24);
  z-index: 4;
}
.ui-label-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: visible;
  z-index: 6;
}
.ui-spot-callout {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px 4px 5px;
  border-radius: 999px;
  background: #161618;
  color: #ffffff;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  box-shadow:
    0 6px 18px rgba(0, 0, 0, 0.28),
    0 0 0 1.5px rgba(255, 255, 255, 0.9);
  opacity: 0;
  transition:
    opacity 0.18s ease,
    transform 0.18s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.ui-spot-callout.pos-top {
  transform: translate(-50%, calc(-100% - 4px));
}
.ui-spot-callout.pos-bottom {
  transform: translate(-50%, 4px);
}
.ui-spot-callout.is-linked {
  opacity: 1;
}
.ui-spot-callout.pos-top.is-linked {
  transform: translate(-50%, calc(-100% - 8px));
}
.ui-spot-callout.pos-bottom.is-linked {
  transform: translate(-50%, 8px);
}
.ui-spot-num {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffffff;
  color: #161618;
  font-size: 10px;
  font-weight: 700;
}
.zoom-stage {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 16px;
  border-radius: 16px;
  background: var(--tile-bg);
}
.zoom-stage img {
  display: block;
  max-width: 100%;
  max-height: 62dvh;
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(28, 24, 20, 0.18);
}
.figure {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}
.figure img {
  width: 100%;
  max-height: 250px;
  object-fit: contain;
  border-radius: 16px;
  background: var(--tile-bg);
}

/* Warm-Matte Architectural Showcase Stage (replaces squat fake black phone) */
.pv-stage {
  width: 100%;
  border-radius: 18px;
  padding: 20px 16px;
  background:
    radial-gradient(
      ellipse 80% 60% at 50% 0%,
      rgba(255, 255, 255, 0.52),
      transparent 70%
    ),
    linear-gradient(155deg, #eae6e0 0%, #e1dcd4 100%);
  border: 1px solid rgba(22, 22, 24, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 248px;
  overflow: visible;
}
.pv-surface {
  width: 100%;
  display: grid;
  gap: 10px;
}

/* Spotlight Hover Behavior — Pure UI at rest, Keynote callout on hover/focus */
.pv-stage .wf-slot {
  position: relative;
  border-radius: 9px;
  padding: 5px 7px;
  margin: -2px -4px;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    opacity 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}
.pv-stage.has-spotlight .wf-slot:not(.is-linked) {
  opacity: 0.42;
}
.pv-stage .wf-slot:hover,
.pv-stage .wf-slot.is-linked {
  opacity: 1;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.72);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.14);
  z-index: 3;
}
.pv-stage .wf-slot.is-empty {
  opacity: 0.28;
  pointer-events: none;
}
.pv-spot-tag {
  position: absolute;
  top: -11px;
  right: 6px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #ffffff;
  color: #161618;
  font-size: 9.5px;
  font-weight: 650;
  line-height: 1.3;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.22);
  opacity: 0;
  transform: translateY(3px);
  pointer-events: none;
  transition:
    opacity 0.18s ease,
    transform 0.18s cubic-bezier(0.2, 0.8, 0.2, 1);
  z-index: 4;
}
.pv-stage .wf-slot:hover .pv-spot-tag,
.pv-stage .wf-slot.is-linked .pv-spot-tag {
  opacity: 1;
  transform: translateY(0);
}

/* Scene 1: Credits Promo Banner (true horizontal banner card) */
.pv-promo-banner {
  border-radius: 16px;
  padding: 16px 16px 15px;
  background:
    radial-gradient(
      circle at 92% 12%,
      rgba(255, 206, 152, 0.26),
      transparent 56%
    ),
    linear-gradient(155deg, #2d2b30 0%, #1f1e22 100%);
  color: #ffffff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 12px 26px rgba(28, 24, 20, 0.16);
  display: grid;
  gap: 8px;
}
.pv-promo-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.pv-credits .wf-slot[data-kind="badge"] {
  display: inline-flex;
  padding: 3px 8px;
  margin: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
}
.pv-badge-pill {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #ffffff;
}
.pv-chip-muted {
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.42);
}
.pv-h1 {
  display: block;
  font-size: 14.5px;
  font-weight: 650;
  line-height: 1.32;
  letter-spacing: -0.015em;
  color: #ffffff;
}
.pv-sub {
  display: block;
  font-size: 11px;
  line-height: 1.44;
  color: rgba(255, 255, 255, 0.72);
}
.pv-multiline {
  white-space: pre-line;
}
.pv-context-caption {
  display: flex;
  justify-content: space-between;
  font-size: 10.5px;
  color: var(--muted);
  padding: 0 4px;
}

/* Scene 2: Annual Pro Offer Card (true vertical card proportion) */
.pv-offer-card {
  border-radius: 18px;
  padding: 20px 18px 16px;
  background:
    radial-gradient(
      ellipse 78% 55% at 50% 0%,
      rgba(255, 214, 168, 0.24),
      transparent 65%
    ),
    linear-gradient(160deg, #2b292e 0%, #1d1c20 100%);
  color: #ffffff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 14px 30px rgba(28, 24, 20, 0.16);
  display: grid;
  gap: 11px;
}
.pv-pro-chip {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: rgba(255, 224, 188, 0.85);
}
.pv-display {
  display: block;
  font-size: 16px;
  font-weight: 650;
  line-height: 1.28;
  letter-spacing: -0.02em;
  color: #ffffff;
}
.pv-annual .wf-slot[data-kind="offer"] {
  background: rgba(255, 255, 255, 0.08);
  padding: 8px 10px;
  margin: 0;
  border-radius: 11px;
}
.pv-offer-pill {
  display: block;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.92);
}
.pv-cta-fake {
  margin-top: 4px;
  height: 32px;
  border-radius: 999px;
  background: #ffffff;
  color: #161618;
  font-size: 11px;
  font-weight: 650;
  display: grid;
  place-items: center;
  opacity: 0.92;
}

/* Scene 3: Welcome + AI Video Templates */
.pv-welcome-sheet {
  border-radius: 18px;
  padding: 18px 16px 16px;
  background: linear-gradient(160deg, #2a292e 0%, #1d1c20 100%);
  color: #ffffff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 14px 30px rgba(28, 24, 20, 0.15);
  display: grid;
  gap: 8px;
}
.pv-templates {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 6px;
}
.pv-tpl {
  height: 86px;
  border-radius: 13px;
  padding: 9px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.pv-tpl-a {
  background: linear-gradient(145deg, #4b394e 0%, #755059 55%, #9f6f5e 100%);
}
.pv-tpl-b {
  background: linear-gradient(145deg, #2c3d52 0%, #3d5d77 55%, #557e92 100%);
}
.pv-tpl-play {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.24);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  color: #ffffff;
}
.wf-play {
  width: 10px;
  height: 10px;
}
.pv-tpl-cap {
  font-size: 10px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.88);
}

/* Scene 4: Video Retention Floating Alert Dialog */
.pv-alert-card {
  border-radius: 18px;
  padding: 18px 16px 14px;
  background: linear-gradient(160deg, #2f2e34 0%, #232227 100%);
  color: #ffffff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 16px 34px rgba(28, 24, 20, 0.18);
  display: grid;
  gap: 11px;
  text-align: center;
}
.pv-alert-ico {
  width: 34px;
  height: 34px;
  margin: 0 auto;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.11);
  color: #ffffff;
  display: grid;
  place-items: center;
}
.pv-alert-text {
  display: block;
  font-size: 11.5px;
  line-height: 1.48;
  color: rgba(255, 255, 255, 0.88);
}
.pv-alert-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 2px;
}
.pv-expiry .wf-slot[data-kind="btn-primary"] {
  background: #ffffff;
  color: #161618;
  padding: 8px 8px;
  margin: 0;
  border-radius: 10px;
}
.pv-expiry .wf-slot[data-kind="btn-primary"]:hover,
.pv-expiry .wf-slot[data-kind="btn-primary"].is-linked {
  background: #ffffff;
  border-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}
.pv-expiry .wf-slot[data-kind="btn-secondary"] {
  background: rgba(255, 255, 255, 0.11);
  color: rgba(255, 255, 255, 0.92);
  padding: 8px 8px;
  margin: 0;
  border-radius: 10px;
}
.pv-btn-txt {
  display: block;
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Scene 5: Membership Benefits Sheet */
.pv-benefits-card {
  border-radius: 18px;
  padding: 16px 14px 14px;
  background: linear-gradient(160deg, #2b292e 0%, #1e1d21 100%);
  color: #ffffff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.11),
    0 14px 30px rgba(28, 24, 20, 0.15);
  display: grid;
  gap: 10px;
}
.pv-checklist {
  display: grid;
  gap: 4px;
}
.pv-benefits .wf-slot[data-kind="row"] {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  margin: 0;
}
.pv-chk {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(166, 235, 185, 0.16);
  color: #a6ebb9;
  display: inline-grid;
  place-items: center;
  flex: none;
}
.wf-check-svg {
  width: 9.5px;
  height: 9.5px;
}
.pv-row-txt {
  flex: 1;
  min-width: 0;
  font-size: 11px;
  line-height: 1.38;
  color: rgba(255, 255, 255, 0.88);
}

/* Interactive Slot Legend */
.legend {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px 5px 6px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 550;
  color: var(--muted);
  background: var(--tile-bg);
  border: 1px solid transparent;
}
.legend-item:hover,
.legend-item.is-linked {
  background: var(--pill-dark);
  color: #ffffff;
}
.legend-item:hover .slot-badge,
.legend-item.is-linked .slot-badge {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}
.legend-item.is-empty {
  opacity: 0.4;
  pointer-events: none;
}

/* Misc & Admin controls */
.empty {
  padding: 36px 8px;
  color: var(--muted);
  font-size: 14px;
}
.managebar,
.actions,
#identity,
.row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.mobile,
.shade {
  display: none;
}
.statefilter {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 0 2px 10px;
}
.statefilter select {
  width: 100%;
  border-radius: 12px;
  padding: 8px 10px;
  background: var(--tile-bg);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 500;
}
.admin-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.login-help,
.help {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  margin: 8px 0;
}
.modal-error {
  color: #c9342b;
  font-size: 13px;
}
dialog {
  width: min(580px, calc(100% - 28px));
  border: 1px solid var(--card-border);
  border-radius: 24px;
  padding: 0;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.18);
  max-height: 87dvh;
  color: var(--ink);
  background: var(--card-solid);
}
dialog::backdrop {
  background: rgba(22, 22, 24, 0.36);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
dialog[open] {
  animation: arrive 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}
#form {
  padding: 26px;
}
.dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.dialog-head h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -0.02em;
}
.field {
  display: grid;
  gap: 6px;
  margin: 12px 0;
  font-size: 12.5px;
  font-weight: 550;
  color: var(--muted);
}
.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #ffffff;
  border-radius: 12px;
  padding: 10px 12px;
  color: var(--ink);
  font-size: 14px;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(22, 22, 24, 0.08);
}
.field textarea {
  min-height: 60px;
  resize: vertical;
}
.actions {
  justify-content: flex-end;
  margin-top: 18px;
}
.edit-type {
  border: 1px solid var(--line);
  border-radius: 16px;
  margin: 10px 0;
  padding: 12px 14px;
  background: var(--tile-bg);
}
.edit-type summary {
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}
.review-line {
  margin: 8px 0;
  font-size: 13.5px;
  line-height: 1.5;
  white-space: pre-line;
}
.review-line small {
  color: var(--muted);
}
.danger {
  color: #c9342b;
}
#toast {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translate(-50%, 8px);
  padding: 10px 18px;
  max-width: calc(100vw - 32px);
  white-space: nowrap;
  background: var(--pill-dark);
  color: #ffffff;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 550;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.2s,
    transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  z-index: 25;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
}
#toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
.adminhint {
  font-size: 12px;
  color: var(--muted);
}

/* Responsive Breakpoints */
@media (max-width: 1200px) {
  :root {
    --side: 224px;
  }
  .bento-main {
    grid-template-columns: minmax(0, 1fr) 304px;
  }
  .workspace-card {
    padding: 24px 24px 26px;
  }
  .kbd-hint {
    display: none;
  }
}
@media (max-width: 960px) {
  .bento-main {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }
  .reference {
    position: static;
  }
  .reference-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    border-radius: 999px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    box-shadow: var(--card-shadow);
    color: var(--ink);
    font-size: 13px;
    font-weight: 550;
  }
  .reference-toggle i:last-child svg {
    width: 12px;
    transform: rotate(90deg);
    transition: transform 0.18s ease;
  }
  .reference-toggle[aria-expanded="true"] i:last-child svg {
    transform: rotate(-90deg);
  }
  .reference-toggle[aria-expanded="false"] + .guide {
    display: none;
  }
  .reference .guide {
    max-width: 400px;
    margin-top: 10px;
  }
}
@media (max-width: 760px) {
  .app-shell {
    padding: 12px 14px 28px;
    gap: 12px;
  }
  .top {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas:
      "left right"
      "search search";
    gap: 10px;
    padding: 0;
  }
  .top-left {
    grid-area: left;
    gap: 8px;
  }
  .top-right {
    grid-area: right;
    gap: 6px;
  }
  .search {
    grid-area: search;
    height: 40px;
  }
  .search kbd,
  .brand span,
  .top .adminhint,
  .section-ctx,
  .kbd-hint {
    display: none;
  }
  .brand {
    gap: 8px;
  }
  .brand strong {
    font-size: 15px;
  }
  .brand img {
    width: 30px;
    height: 30px;
    border-radius: 9px;
  }
  .top .outline {
    padding: 7px 12px;
    font-size: 12px;
  }
  .top .mobile-menu-btn {
    display: inline-flex;
    width: 34px;
    height: 34px;
  }
  .layout {
    display: block;
  }
  aside#side {
    position: fixed;
    top: 12px;
    left: 12px;
    bottom: 12px;
    max-height: none;
    width: min(300px, calc(100vw - 24px));
    z-index: 20;
    transform: translateX(calc(-100% - 24px));
    transition: transform 0.24s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
  }
  .nav-open aside#side {
    transform: translateX(0);
  }
  .shade {
    position: fixed;
    inset: 0;
    z-index: 19;
    background: rgba(22, 22, 24, 0.34);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
  }
  .nav-open .shade {
    display: block;
  }
  .mobile {
    display: inline-flex;
  }
  .workspace-card {
    padding: 20px 16px 20px;
    border-radius: 22px;
  }
  .head h1 {
    font-size: 26px;
  }
  .tabs-wrap {
    margin-bottom: 18px;
  }
  .tabs-wrap::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 32px;
    border-radius: 0 999px 999px 0;
    pointer-events: none;
    background: linear-gradient(90deg, transparent, var(--card-solid) 88%);
  }
  .tabs {
    display: flex;
    width: 100%;
    padding-right: 28px;
  }
  .tabs button {
    font-size: 12.5px;
    padding: 7px 12px;
  }
  .entry {
    padding: 15px 14px;
    gap: 8px 12px;
    border-radius: 16px;
  }
  .value {
    font-size: 16.5px;
  }
  .copy {
    padding: 7px 12px;
    min-width: 68px;
  }
}
@media (hover: none) {
  .kbd-hint {
    display: none;
  }
}
@media (prefers-reduced-transparency: reduce) {
  aside#side,
  .workspace-card,
  .guide,
  .search,
  .outline {
    background: var(--card-solid);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
