
    :root {
      --ink: #15243b;
      --muted: #66758a;
      --soft: #8c99aa;
      --line: #dce3ec;
      --line-strong: #cbd5e1;
      --paper: #f4f7fb;
      --card: #ffffff;
      --blue: #155eef;
      --blue-dark: #0b49c8;
      --blue-soft: #e8f0ff;
      --navy: #0d1b2f;
      --green: #16835f;
      --shadow: 0 18px 50px rgba(29, 52, 84, 0.09);
      --radius: 20px;
    }

    * { box-sizing: border-box; }

    html { scroll-behavior: smooth; }

    body {
      margin: 0;
      color: var(--ink);
      background:
        radial-gradient(circle at 8% 0%, rgba(21, 94, 239, 0.08), transparent 28rem),
        var(--paper);
      font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
      font-size: 15px;
      line-height: 1.5;
    }

    button, input, select { font: inherit; }
    button { color: inherit; }
    a { color: inherit; }

    .sr-only {
      position: absolute;
      width: 1px;
      height: 1px;
      padding: 0;
      overflow: hidden;
      clip: rect(0, 0, 0, 0);
      white-space: nowrap;
      border: 0;
    }

    .skip-link {
      position: fixed;
      z-index: 100;
      top: 10px;
      left: 10px;
      transform: translateY(-150%);
      padding: 10px 14px;
      border-radius: 10px;
      color: white;
      background: var(--navy);
    }

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

    .topbar {
      position: sticky;
      z-index: 40;
      top: 0;
      display: flex;
      align-items: center;
      gap: 18px;
      min-height: 72px;
      padding: 12px clamp(18px, 3vw, 42px);
      border-bottom: 1px solid rgba(203, 213, 225, 0.8);
      background: rgba(255, 255, 255, 0.9);
      backdrop-filter: blur(18px);
    }

    .brand {
      display: flex;
      align-items: center;
      gap: 11px;
      flex: 0 0 auto;
      min-width: 222px;
    }

    .brand-mark {
      display: grid;
      place-items: center;
      width: 38px;
      height: 38px;
      border-radius: 12px;
      color: white;
      background: linear-gradient(145deg, #2474ff, #0d3fa8);
      box-shadow: 0 8px 22px rgba(21, 94, 239, 0.25);
      font-size: 13px;
      font-weight: 800;
      letter-spacing: -0.04em;
    }

    .brand-copy strong { display: block; font-size: 15px; line-height: 1.2; }
    .brand-copy span { color: var(--muted); font-size: 12px; }

    .search-wrap {
      position: relative;
      flex: 1;
      max-width: 760px;
      margin-inline: auto;
    }

    .search-wrap svg {
      position: absolute;
      top: 50%;
      left: 15px;
      transform: translateY(-50%);
      color: var(--soft);
      pointer-events: none;
    }

    .search {
      width: 100%;
      height: 46px;
      padding: 0 88px 0 44px;
      border: 1px solid var(--line-strong);
      border-radius: 14px;
      outline: none;
      background: #fff;
      box-shadow: 0 3px 14px rgba(29, 52, 84, 0.05);
    }

    .search:focus {
      border-color: var(--blue);
      box-shadow: 0 0 0 4px rgba(21, 94, 239, 0.12);
    }

    .shortcut {
      position: absolute;
      top: 50%;
      right: 10px;
      transform: translateY(-50%);
      padding: 4px 7px;
      border: 1px solid var(--line);
      border-radius: 7px;
      color: var(--soft);
      background: var(--paper);
      font-size: 11px;
    }

    .count-pill {
      flex: 0 0 auto;
      padding: 8px 11px;
      border-radius: 999px;
      color: var(--blue-dark);
      background: var(--blue-soft);
      font-size: 12px;
      font-weight: 750;
    }

    .mobile-filter-button {
      display: none;
      flex: 0 0 auto;
      align-items: center;
      gap: 7px;
      padding: 10px 12px;
      border: 1px solid var(--line-strong);
      border-radius: 12px;
      background: white;
      cursor: pointer;
    }

    .layout {
      display: grid;
      grid-template-columns: 270px minmax(0, 1fr);
      min-height: calc(100vh - 72px);
    }

    .sidebar {
      position: sticky;
      top: 72px;
      align-self: start;
      height: calc(100vh - 72px);
      overflow-y: auto;
      padding: 28px 18px 40px clamp(18px, 3vw, 42px);
      border-right: 1px solid var(--line);
      background: rgba(250, 252, 255, 0.82);
    }

    .sidebar-heading {
      margin: 0 10px 10px;
      color: var(--soft);
      font-size: 11px;
      font-weight: 800;
      letter-spacing: 0.13em;
      text-transform: uppercase;
    }

    .category-list {
      display: grid;
      gap: 3px;
    }

    .category-button {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      align-items: center;
      gap: 8px;
      width: 100%;
      padding: 9px 10px;
      border: 0;
      border-radius: 10px;
      color: #526176;
      background: transparent;
      text-align: left;
      cursor: pointer;
    }

    .category-button:hover { background: #edf2f8; }
    .category-button.active { color: var(--blue-dark); background: var(--blue-soft); font-weight: 700; }
    .category-button span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .category-button span:last-child { color: var(--soft); font-size: 11px; }

    .sidebar-note {
      margin: 24px 6px 0;
      padding: 14px;
      border: 1px solid #d6e4ff;
      border-radius: 14px;
      color: #496078;
      background: #f0f5ff;
      font-size: 12px;
    }

    .sidebar-backdrop {
      display: none;
      position: fixed;
      z-index: 44;
      inset: 0;
      border: 0;
      background: rgba(13, 27, 47, 0.46);
    }

    main {
      min-width: 0;
      padding: 42px clamp(18px, 3.2vw, 52px) 80px;
    }

    .intro {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 28px;
      align-items: end;
      margin-bottom: 30px;
    }

    .eyebrow {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      margin-bottom: 12px;
      color: var(--blue-dark);
      font-size: 12px;
      font-weight: 800;
      letter-spacing: 0.12em;
      text-transform: uppercase;
    }

    .eyebrow::before {
      content: '';
      width: 20px;
      height: 2px;
      background: var(--blue);
    }

    h1 {
      max-width: 820px;
      margin: 0;
      font-size: clamp(34px, 4.5vw, 62px);
      line-height: 1.02;
      letter-spacing: -0.045em;
    }

    .intro p {
      max-width: 720px;
      margin: 18px 0 0;
      color: var(--muted);
      font-size: 16px;
    }

    .intro-stat {
      min-width: 170px;
      padding: 18px 20px;
      border: 1px solid var(--line);
      border-radius: 18px;
      background: white;
      box-shadow: var(--shadow);
    }

    .intro-stat strong { display: block; font-size: 28px; letter-spacing: -0.04em; }
    .intro-stat span { color: var(--muted); font-size: 12px; }

    .feature-strip {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 12px;
      margin-bottom: 28px;
    }

    .feature-item {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 14px 15px;
      border: 1px solid var(--line);
      border-radius: 15px;
      background: rgba(255, 255, 255, 0.72);
    }

    .feature-icon {
      display: grid;
      place-items: center;
      width: 34px;
      height: 34px;
      flex: 0 0 auto;
      border-radius: 10px;
      color: var(--blue-dark);
      background: var(--blue-soft);
      font-size: 16px;
      font-weight: 800;
    }

    .feature-item strong { display: block; font-size: 13px; }
    .feature-item span { color: var(--muted); font-size: 11px; }

    .toolbar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      margin: 22px 0 18px;
    }

    .result-heading { margin: 0; font-size: 18px; letter-spacing: -0.02em; }
    .result-heading span { color: var(--muted); font-weight: 500; }

    .effect-select {
      height: 40px;
      max-width: 220px;
      padding: 0 34px 0 12px;
      border: 1px solid var(--line-strong);
      border-radius: 11px;
      color: #43536a;
      background: white;
      outline: none;
    }

    .effect-select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(21, 94, 239, 0.1); }

    .prompt-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr));
      gap: 18px;
    }

    .prompt-card {
      display: flex;
      min-width: 0;
      flex-direction: column;
      overflow: hidden;
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: var(--card);
      box-shadow: 0 7px 24px rgba(29, 52, 84, 0.055);
      transition: transform 170ms ease, border-color 170ms ease, box-shadow 170ms ease;
    }

    .prompt-card:hover {
      transform: translateY(-3px);
      border-color: #bdcbe0;
      box-shadow: var(--shadow);
    }

    .prompt-card.featured { border-color: #a9c5fb; }

    .card-visual {
      min-height: 198px;
      padding: 13px;
      border-bottom: 1px solid var(--line);
      background: #eef3f9;
    }

    .preview-caption {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      min-width: 0;
      margin: 8px 3px 0;
      color: #62728a;
      font-size: 10px;
    }

    .preview-caption strong {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      color: #35506f;
      font-weight: 800;
    }

    .preview-caption strong::before {
      content: '';
      width: 7px;
      height: 7px;
      flex: 0 0 auto;
      border-radius: 50%;
      background: #20a477;
      box-shadow: 0 0 0 3px rgba(32, 164, 119, 0.12);
    }

    .preview-caption.technical strong::before { background: #e59b32; box-shadow: 0 0 0 3px rgba(229, 155, 50, 0.14); }
    .preview-caption span { overflow: hidden; color: var(--soft); text-overflow: ellipsis; white-space: nowrap; }

    .card-body {
      display: flex;
      flex: 1;
      flex-direction: column;
      padding: 17px;
    }

    .meta-row {
      display: flex;
      align-items: center;
      gap: 8px;
      margin-bottom: 10px;
    }

    .prompt-id {
      flex: 0 0 auto;
      padding: 4px 7px;
      border-radius: 7px;
      color: var(--blue-dark);
      background: var(--blue-soft);
      font-size: 10px;
      font-weight: 800;
    }

    .category-name {
      overflow: hidden;
      color: var(--soft);
      font-size: 10px;
      font-weight: 750;
      letter-spacing: 0.08em;
      text-overflow: ellipsis;
      text-transform: uppercase;
      white-space: nowrap;
    }

    .prompt-card h2 {
      margin: 0 0 10px;
      font-size: 18px;
      line-height: 1.25;
      letter-spacing: -0.02em;
    }

    .prompt-preview {
      display: -webkit-box;
      min-height: 88px;
      overflow: hidden;
      color: var(--muted);
      font-size: 13px;
      white-space: pre-line;
      -webkit-box-orient: vertical;
      -webkit-line-clamp: 4;
    }

    .card-actions {
      display: grid;
      grid-template-columns: 1fr auto;
      gap: 8px;
      margin-top: 16px;
    }

    .button {
      display: inline-flex;
      min-height: 40px;
      align-items: center;
      justify-content: center;
      gap: 7px;
      padding: 8px 12px;
      border: 1px solid var(--line-strong);
      border-radius: 11px;
      background: white;
      font-weight: 700;
      cursor: pointer;
    }

    .button:hover { background: #f7f9fc; }
    .button.primary { border-color: var(--blue); color: white; background: var(--blue); }
    .button.primary:hover { background: var(--blue-dark); }
    .button.copied { border-color: var(--green); color: white; background: var(--green); }

    .playground {
      margin: 30px 0 34px;
      overflow: hidden;
      border: 1px solid #b9cdf4;
      border-radius: 24px;
      background: #fff;
      box-shadow: var(--shadow);
    }

    .playground-head {
      display: flex;
      align-items: flex-end;
      justify-content: space-between;
      gap: 24px;
      padding: 24px 26px;
      color: white;
      background: linear-gradient(135deg, #0d1b2f, #123e83);
    }

    .playground-head h2 { margin: 4px 0 0; font-size: clamp(23px, 3vw, 34px); letter-spacing: -0.035em; }
    .playground-head p { max-width: 690px; margin: 8px 0 0; color: #c7d7ee; font-size: 13px; }
    .playground-badge { flex: 0 0 auto; padding: 7px 10px; border: 1px solid rgba(255,255,255,.24); border-radius: 999px; color: #dce8fb; font-size: 11px; font-weight: 800; }

    .playground-grid {
      display: grid;
      grid-template-columns: minmax(260px, 330px) minmax(0, 1fr);
      min-height: 560px;
    }

    .playground-controls { padding: 22px; border-right: 1px solid var(--line); background: #f8faff; }
    .control-group { display: grid; gap: 8px; margin-bottom: 15px; }
    .control-group > label, .control-label { color: #40516a; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
    .control-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
    .control-field, .control-range {
      width: 100%;
      min-height: 40px;
      border: 1px solid var(--line-strong);
      border-radius: 10px;
      color: #33445c;
      background: white;
    }
    .control-field { padding: 0 10px; }
    .control-range { min-height: 0; accent-color: var(--blue); }
    .range-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #43536a; font-size: 12px; }
    .range-value { color: var(--blue-dark); font-weight: 800; }
    .preset-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
    .preset-button { min-height: 38px; border: 1px solid var(--line-strong); border-radius: 10px; background: white; cursor: pointer; font-size: 12px; font-weight: 750; }
    .preset-button:hover, .preset-button.active { border-color: var(--blue); color: var(--blue-dark); background: var(--blue-soft); }

    .playground-output { display: grid; grid-template-rows: minmax(300px, 1fr) auto; min-width: 0; }
    .playground-preview-wrap { display: grid; place-items: center; min-height: 360px; padding: 28px; background: linear-gradient(45deg, #eef3fa 25%, transparent 25%), linear-gradient(-45deg, #eef3fa 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #eef3fa 75%), linear-gradient(-45deg, transparent 75%, #eef3fa 75%), #f8faff; background-position: 0 0, 0 8px, 8px -8px, -8px 0; background-size: 16px 16px; }
    .playground-device { position: relative; width: min(100%, 700px); height: 360px; overflow: hidden; border: 8px solid #172b47; border-radius: 18px; background: #dfe8f4; box-shadow: 0 20px 40px rgba(16,36,63,.18); transition: width 180ms ease, height 180ms ease; isolation: isolate; }
    .playground-device.mobile { width: 230px; height: 400px; border-radius: 28px; }
    .playground-device::before { content: ''; position: absolute; z-index: 0; inset: 0; background: linear-gradient(135deg, rgba(6,21,42,.2), rgba(8,29,59,.64)); pointer-events: none; }
    .playground-image { position: absolute; max-width: none; transition: width 160ms ease, height 160ms ease, inset 160ms ease, object-position 160ms ease, clip-path 160ms ease, border-radius 160ms ease; }
    .playground-copy-card { position: absolute; z-index: 4; top: 18%; left: 8%; width: min(58%, 330px); padding: 20px; border: 1px solid rgba(255,255,255,.4); border-radius: 15px; color: white; background: rgba(11,31,58,.78); box-shadow: 0 14px 28px rgba(7,20,39,.28); backdrop-filter: blur(7px); pointer-events: none; }
    .playground-copy-card span { display: block; width: 38%; height: 7px; margin-bottom: 12px; border-radius: 99px; background: #75a7ff; }
    .playground-copy-card strong { display: block; font-size: clamp(17px, 2.6vw, 30px); line-height: 1.05; }
    .playground-copy-card i { display: block; width: 74%; height: 7px; margin-top: 15px; border-radius: 99px; background: rgba(255,255,255,.58); }
    .focus-marker { position: absolute; z-index: 8; width: 34px; height: 34px; transform: translate(-50%, -50%); border: 2px solid #fff; border-radius: 50%; box-shadow: 0 0 0 2px var(--blue), 0 3px 12px rgba(0,0,0,.3); pointer-events: none; }
    .focus-marker::before, .focus-marker::after { content: ''; position: absolute; background: #fff; }
    .focus-marker::before { top: 50%; left: -7px; width: 46px; height: 1px; }
    .focus-marker::after { top: -7px; left: 50%; width: 1px; height: 46px; }
    .focus-marker.face::after { content: '\1F642'; display: grid; place-items: center; top: -26px; left: 50%; width: 24px; height: 20px; transform: translateX(-50%); border-radius: 6px; color: #0d1b2f; background: white; font-size: 12px; }

    .generated-panel { padding: 20px 22px 22px; border-top: 1px solid var(--line); background: white; }
    .generated-tabs { display: flex; gap: 7px; margin-bottom: 10px; }
    .generated-tab { padding: 7px 10px; border: 0; border-radius: 8px; color: var(--muted); background: transparent; cursor: pointer; font-size: 12px; font-weight: 750; }
    .generated-tab.active { color: var(--blue-dark); background: var(--blue-soft); }
    .generated-text { min-height: 104px; max-height: 180px; margin: 0; overflow: auto; padding: 14px; border: 1px solid var(--line); border-radius: 12px; color: #34445b; background: #f8faff; font: 12px/1.55 ui-monospace, SFMono-Regular, Consolas, monospace; white-space: pre-wrap; }
    .generated-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 11px; }

    .icon-button {
      width: 40px;
      padding: 0;
      font-size: 17px;
    }

    .empty-state {
      display: none;
      padding: 56px 24px;
      border: 1px dashed var(--line-strong);
      border-radius: var(--radius);
      color: var(--muted);
      background: rgba(255, 255, 255, 0.62);
      text-align: center;
    }

    .empty-state.show { display: block; }

    /* Reusable before/after diagrams */
    .demo {
      height: 148px;
      overflow: hidden;
      border: 1px solid #cfdae7;
      border-radius: 14px;
      background: white;
    }

    .demo-head {
      display: grid;
      grid-template-columns: 1fr 1fr;
      color: #8390a3;
      background: #f8fafc;
      font-size: 9px;
      font-weight: 800;
      letter-spacing: 0.11em;
      text-align: center;
      text-transform: uppercase;
    }

    .demo-head span { padding: 6px; }
    .demo-head span + span { border-left: 1px solid #dfe6ef; color: var(--blue-dark); }

    .demo-pair {
      display: grid;
      grid-template-columns: 1fr 1fr;
      height: 121px;
    }

    .live-scene,
    .live-layer-bg,
    .live-background-photo {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      object-fit: cover;
    }

    .live-scene { filter: brightness(0.72) saturate(0.88); }

    .live-subject {
      position: absolute;
      z-index: 2;
      bottom: 0;
      left: 50%;
      width: 54%;
      height: auto;
      max-height: 98%;
      transform: translateX(-50%);
      object-fit: contain;
      object-position: bottom;
      filter: drop-shadow(0 6px 8px rgba(6, 19, 38, 0.28));
    }

    .demo-placement.pos-top-left .after .live-subject { top: 3px; bottom: auto; left: 3px; width: 48%; transform: none; }
    .demo-placement.pos-top-right .after .live-subject { top: 3px; right: 3px; bottom: auto; left: auto; width: 48%; transform: none; }
    .demo-placement.pos-bottom-left .after .live-subject { right: auto; bottom: 0; left: 2px; width: 54%; transform: none; }
    .demo-placement.pos-bottom-right .after .live-subject { right: 1px; bottom: 0; left: auto; width: 54%; transform: none; }
    .demo-placement.pos-center .after .live-subject { top: 50%; bottom: auto; left: 50%; transform: translate(-50%, -50%); }
    .demo-placement.pos-offset .after .live-subject { right: 7px; bottom: -8px; left: auto; width: 61%; transform: none; }

    .demo-size .before .live-subject { width: 44%; }
    .demo-size .after .live-subject { width: 66%; }
    .demo-size.size-large .after .live-subject { width: 80%; }
    .demo-size.size-small .after .live-subject { width: 31%; }

    .live-crop-frame {
      position: absolute;
      inset: 16px 12px;
      overflow: hidden;
      border: 3px solid rgba(255, 255, 255, 0.94);
      border-radius: 8px;
      background: #f5f7fa;
      box-shadow: 0 6px 13px rgba(13, 27, 47, 0.2);
    }

    .live-crop-photo {
      width: 100%;
      height: 100%;
      object-fit: contain;
      object-position: center;
    }

    .demo-crop .after .live-crop-photo { object-fit: cover; }
    .demo-crop.anchor-right .after .live-crop-photo { object-position: 78% center; }
    .demo-crop.anchor-left .after .live-crop-photo { object-position: 22% center; }
    .demo-crop.anchor-bottom .after .live-crop-photo { object-position: center bottom; }

    .live-overlay {
      position: absolute;
      z-index: 1;
      inset: 0;
      background: linear-gradient(90deg, rgba(7, 20, 38, 0.72), rgba(7, 20, 38, 0.04));
    }

    .live-layer-subject {
      position: absolute;
      z-index: 2;
      right: -2px;
      bottom: 0;
      width: 67%;
      max-height: 96%;
      object-fit: contain;
      object-position: bottom right;
      filter: drop-shadow(0 5px 7px rgba(6, 19, 38, 0.28));
    }

    .live-content-card {
      position: absolute;
      z-index: 3;
      bottom: 11px;
      left: 9px;
      width: 56%;
      padding: 8px;
      border: 1px solid rgba(255, 255, 255, 0.62);
      border-radius: 7px;
      color: #13243d;
      background: rgba(255, 255, 255, 0.9);
      box-shadow: 0 6px 14px rgba(13, 27, 47, 0.2);
    }

    .live-content-card::before,
    .live-content-card::after {
      content: '';
      display: block;
      height: 4px;
      border-radius: 99px;
      background: #728198;
    }

    .live-content-card::after { width: 63%; margin-top: 5px; background: #155eef; }
    .demo-layer .before .live-layer-subject { z-index: 4; right: 7px; width: 74%; }

    .live-boundary {
      position: absolute;
      inset: 14px;
      border: 2px dashed rgba(255, 255, 255, 0.92);
      border-radius: 8px;
    }

    .live-boundary .live-subject { right: -21px; bottom: -2px; left: auto; width: 79%; transform: none; }
    .demo-boundary .before .live-boundary { overflow: visible; }
    .demo-boundary .after .live-boundary { overflow: hidden; }

    .live-clip-photo {
      position: absolute;
      inset: 14px 22px;
      width: calc(100% - 44px);
      height: calc(100% - 28px);
      border: 3px solid white;
      border-radius: 7px;
      object-fit: cover;
      object-position: center 34%;
      box-shadow: 0 7px 15px rgba(13, 27, 47, 0.22);
    }

    .demo-clip.shape-circle .after .live-clip-photo { inset: 13px 28px; width: calc(100% - 56px); height: calc(100% - 26px); border-radius: 50%; }
    .demo-clip.shape-arch .after .live-clip-photo { border-radius: 50px 50px 7px 7px; }
    .demo-clip.shape-polygon .after .live-clip-photo { border: 0; clip-path: polygon(12% 0, 100% 0, 86% 100%, 0 86%); }
    .demo-clip.shape-pill .after .live-clip-photo { inset: 30px 11px; width: calc(100% - 22px); height: calc(100% - 60px); border-radius: 999px; }
    .demo-clip.shape-rounded .after .live-clip-photo { border-radius: 22px; }

    .live-mask-subject {
      position: absolute;
      right: 8px;
      bottom: 0;
      width: 78%;
      max-height: 100%;
      object-fit: contain;
      object-position: bottom right;
    }

    .demo-mask .after .live-mask-subject { mask-image: linear-gradient(to bottom, black 55%, transparent 100%); }
    .demo-mask.mask-side .after .live-mask-subject { mask-image: linear-gradient(to right, transparent 0, black 46%); }

    .live-background-wrap {
      position: absolute;
      inset: 22px 14px;
      overflow: hidden;
      border: 3px solid white;
      border-radius: 8px;
      box-shadow: 0 6px 13px rgba(13, 27, 47, 0.2);
    }

    .demo-background .after .live-background-wrap { inset: 5px; border-radius: 5px; }
    .live-background-overlay { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(7, 20, 38, 0.78), rgba(7, 20, 38, 0.02)); opacity: 0; }
    .demo-background.has-overlay .after .live-background-overlay { opacity: 1; }
    .live-background-copy { position: absolute; z-index: 2; top: 16px; left: 11px; width: 45%; height: 5px; border-radius: 99px; background: white; opacity: 0; box-shadow: 0 9px 0 rgba(255,255,255,.72); }
    .demo-background.has-overlay .after .live-background-copy { opacity: 1; }

    .live-device-photo {
      width: 100%;
      height: 100%;
      object-fit: cover;
      filter: brightness(0.72);
    }

    .live-device-subject {
      position: absolute;
      right: 0;
      bottom: 0;
      width: 55%;
      max-height: 94%;
      object-fit: contain;
      object-position: bottom right;
    }

    .device.mobile .live-device-subject { right: -4px; width: 88%; }
    .demo-responsive .after .device.mobile .live-device-subject { right: 50%; width: 94%; transform: translateX(50%); }

    .live-grid {
      position: absolute;
      inset: 10px;
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 5px;
    }

    .live-grid img {
      width: 100%;
      height: 100%;
      min-height: 0;
      border: 2px solid white;
      border-radius: 6px;
      object-fit: cover;
      box-shadow: 0 4px 8px rgba(13, 27, 47, 0.16);
    }

    .demo-grid .before .live-grid img:nth-child(2) { height: 33px; }
    .demo-grid .before .live-grid img:nth-child(3) { height: 48px; }
    .demo-grid .after .live-grid { grid-auto-rows: 47px; }

    .demo-motion .before .live-subject { left: 28%; width: 49%; }
    .demo-motion .after .live-subject { left: 72%; width: 49%; }

    .stage {
      position: relative;
      min-width: 0;
      overflow: hidden;
      background: linear-gradient(155deg, #d9e8fa 0 48%, #8da4bd 49% 63%, #52697f 64%);
    }

    .stage + .stage { border-left: 1px solid #dfe6ef; }

    .sun {
      position: absolute;
      top: 16px;
      right: 18px;
      width: 18px;
      height: 18px;
      border-radius: 50%;
      background: #ffcb69;
      box-shadow: 0 0 18px rgba(255, 203, 105, 0.45);
    }

    .image-object {
      position: absolute;
      top: 50%;
      left: 50%;
      width: 45px;
      height: 54px;
      transform: translate(-50%, -42%);
      border: 3px solid rgba(255, 255, 255, 0.9);
      border-radius: 10px 10px 4px 4px;
      background: linear-gradient(145deg, #2474ff, #0c397e);
      box-shadow: 0 7px 16px rgba(13, 27, 47, 0.25);
    }

    .image-object::before {
      content: '';
      position: absolute;
      top: 9px;
      left: 50%;
      width: 15px;
      height: 15px;
      transform: translateX(-50%);
      border-radius: 50%;
      background: #ffd1ad;
    }

    .image-object::after {
      content: '';
      position: absolute;
      right: 7px;
      bottom: 7px;
      left: 7px;
      height: 15px;
      border-radius: 9px 9px 3px 3px;
      background: #102a54;
    }

    .stage.after::after {
      content: '';
      position: absolute;
      inset: 6px;
      border: 1px dashed rgba(21, 94, 239, 0.45);
      border-radius: 7px;
      pointer-events: none;
    }

    .demo-placement.pos-top-left .after .image-object { top: 24%; left: 25%; }
    .demo-placement.pos-top-right .after .image-object { top: 24%; left: 75%; }
    .demo-placement.pos-bottom-left .after .image-object { top: 74%; left: 25%; }
    .demo-placement.pos-bottom-right .after .image-object { top: 74%; left: 75%; }
    .demo-placement.pos-center .after .image-object { top: 50%; left: 50%; }
    .demo-placement.pos-offset .after .image-object { top: 38%; left: 68%; }

    .demo-size.size-large .after .image-object { width: 70px; height: 84px; }
    .demo-size.size-small .after .image-object { width: 28px; height: 34px; }
    .demo-size .after .image-object { width: 61px; height: 74px; }

    .crop-frame {
      position: absolute;
      inset: 21px 16px;
      overflow: hidden;
      border: 3px solid white;
      border-radius: 8px;
      background: linear-gradient(155deg, #cfe2fb 0 48%, #7693ae 49% 63%, #3d556d 64%);
      box-shadow: 0 6px 13px rgba(13, 27, 47, 0.2);
    }

    .crop-subject {
      position: absolute;
      top: 20px;
      left: 38px;
      width: 32px;
      height: 53px;
      border-radius: 16px 16px 8px 8px;
      background: #155eef;
    }

    .crop-subject::before {
      content: '';
      position: absolute;
      top: -8px;
      left: 7px;
      width: 18px;
      height: 18px;
      border-radius: 50%;
      background: #ffd1ad;
    }

    .demo-crop .before .crop-frame { inset: 13px 11px; background-size: contain; }
    .demo-crop .after .crop-frame { inset: 28px 10px; }
    .demo-crop.anchor-right .after .crop-subject { left: auto; right: 10px; }
    .demo-crop.anchor-left .after .crop-subject { left: 10px; }
    .demo-crop.anchor-bottom .after .crop-subject { top: 30px; }

    .layer-stack {
      position: absolute;
      inset: 16px;
      perspective: 150px;
    }

    .layer {
      position: absolute;
      width: 74px;
      height: 47px;
      border: 2px solid white;
      border-radius: 7px;
      box-shadow: 0 6px 12px rgba(13, 27, 47, 0.18);
      color: white;
      font-size: 8px;
      font-weight: 800;
      text-align: center;
      line-height: 43px;
    }

    .layer-bg { top: 34px; left: 5px; background: #617890; }
    .layer-subject { top: 23px; left: 17px; background: #155eef; }
    .layer-card { top: 12px; left: 29px; color: var(--ink); background: white; }
    .layer-bg { z-index: 1; }
    .layer-subject { z-index: 2; }
    .layer-card { z-index: 3; }
    .demo-layer .before .layer-subject { z-index: 4; top: 7px; left: 33px; }

    .background-image-demo {
      position: absolute;
      inset: 17px;
      overflow: hidden;
      border: 3px solid white;
      border-radius: 8px;
      background: linear-gradient(155deg, #cfe2fb 0 48%, #7894af 49% 63%, #425b72 64%);
      box-shadow: 0 6px 13px rgba(13, 27, 47, 0.2);
    }

    .background-image-demo::before {
      content: '';
      position: absolute;
      right: 8px;
      bottom: 0;
      width: 34px;
      height: 63px;
      border-radius: 20px 20px 0 0;
      background: #155eef;
    }

    .background-overlay {
      position: absolute;
      inset: 0;
      background: linear-gradient(90deg, rgba(13, 27, 47, 0.78), rgba(13, 27, 47, 0.05));
      opacity: 0;
    }

    .demo-background .before .background-image-demo { inset: 25px 17px; }
    .demo-background .after .background-image-demo { inset: 6px; border-radius: 5px; }
    .demo-background.has-overlay .after .background-overlay { opacity: 1; }

    .boundary-box {
      position: absolute;
      inset: 17px;
      border: 2px dashed white;
      border-radius: 8px;
    }

    .boundary-box .image-object { top: 72%; left: 88%; }
    .demo-boundary .before { overflow: visible; }
    .demo-boundary .before .boundary-box .image-object { left: 97%; }
    .demo-boundary .after .boundary-box { overflow: hidden; }

    .clip-object {
      position: absolute;
      inset: 17px 23px;
      background: linear-gradient(145deg, #76a7ff, #0b377a);
      box-shadow: 0 7px 15px rgba(13, 27, 47, 0.2);
    }

    .demo-clip .before .clip-object { border-radius: 7px; }
    .demo-clip.shape-circle .after .clip-object { inset: 15px 29px; border-radius: 50%; }
    .demo-clip.shape-arch .after .clip-object { border-radius: 50px 50px 7px 7px; }
    .demo-clip.shape-polygon .after .clip-object { clip-path: polygon(12% 0, 100% 0, 86% 100%, 0 86%); }
    .demo-clip.shape-pill .after .clip-object { inset: 31px 12px; border-radius: 999px; }
    .demo-clip.shape-rounded .after .clip-object { border-radius: 22px; }

    .mask-object {
      position: absolute;
      inset: 12px 18px 0;
      border-radius: 42px 42px 0 0;
      background: linear-gradient(145deg, #2474ff, #0a2855);
    }

    .mask-object::before {
      content: '';
      position: absolute;
      top: 15px;
      left: 50%;
      width: 24px;
      height: 24px;
      transform: translateX(-50%);
      border-radius: 50%;
      background: #ffd1ad;
    }

    .demo-mask .after .mask-object { mask-image: linear-gradient(to bottom, black 55%, transparent 100%); }
    .demo-mask.mask-side .after .mask-object { mask-image: linear-gradient(to right, transparent 0, black 42%); }

    .responsive-devices {
      position: absolute;
      inset: 16px 10px;
      display: flex;
      align-items: end;
      justify-content: center;
      gap: 7px;
    }

    .device {
      position: relative;
      overflow: hidden;
      border: 3px solid white;
      border-radius: 6px;
      background: linear-gradient(150deg, #cce0fa 0 50%, #526a82 51%);
      box-shadow: 0 5px 12px rgba(13, 27, 47, 0.2);
    }

    .device.desktop { width: 72px; height: 48px; }
    .device.mobile { width: 27px; height: 55px; border-radius: 8px; }
    .device::after { content: ''; position: absolute; right: 4px; bottom: 0; width: 22px; height: 31px; border-radius: 14px 14px 0 0; background: #155eef; }
    .device.real-device::after { display: none; }
    .demo-responsive .after .device.mobile::after { right: 50%; transform: translateX(50%); width: 24px; }

    .grid-demo {
      position: absolute;
      inset: 14px;
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 6px;
    }

    .grid-demo span { border: 2px solid white; border-radius: 6px; background: linear-gradient(145deg, #9ac0ff, #315f9f); box-shadow: 0 4px 8px rgba(13, 27, 47, 0.15); }
    .demo-grid .before .grid-demo span:nth-child(2) { height: 38px; }
    .demo-grid .before .grid-demo span:nth-child(3) { height: 58px; }
    .demo-grid .after .grid-demo { grid-auto-rows: 42px; }

    .a11y-card, .perf-card, .debug-card {
      position: absolute;
      inset: 17px 13px;
      padding: 9px;
      border: 2px solid white;
      border-radius: 9px;
      background: rgba(255, 255, 255, 0.94);
      box-shadow: 0 6px 12px rgba(13, 27, 47, 0.18);
      font-size: 8px;
      font-weight: 700;
    }

    .a11y-image { height: 36px; margin-bottom: 6px; border-radius: 5px; background: linear-gradient(145deg, #87b2ff, #164587); }
    .a11y-line { height: 5px; margin-top: 4px; border-radius: 99px; background: #aeb9c7; }
    .a11y-line.short { width: 65%; }
    .demo-accessibility .after .a11y-card { outline: 3px solid #57d4aa; }
    .demo-accessibility .after .a11y-line { background: #506178; }

    .perf-image { position: relative; height: 50px; overflow: hidden; border-radius: 6px; background: #dbe3ec; }
    .perf-image::after { content: ''; position: absolute; inset: 0; transform: translateX(-48%); background: linear-gradient(90deg, transparent, #69a0ff, transparent); }
    .demo-performance .after .perf-image { background: linear-gradient(145deg, #86b3ff, #164587); }
    .demo-performance .after .perf-image::after { display: none; }
    .perf-label { margin-top: 6px; color: #66758a; }

    .debug-symbol { display: grid; place-items: center; height: 53px; border-radius: 7px; color: #b44141; background: #ffe8e8; font-size: 23px; }
    .demo-debug .after .debug-symbol { color: #14775a; background: #ddf7ed; }
    .debug-label { margin-top: 6px; color: #66758a; text-align: center; }

    .motion-arrow {
      position: absolute;
      top: 50%;
      left: 50%;
      width: 66px;
      height: 2px;
      transform: translate(-50%, -50%);
      background: white;
    }

    .motion-arrow::after { content: ''; position: absolute; top: -4px; right: 0; width: 8px; height: 8px; transform: rotate(45deg); border-top: 2px solid white; border-right: 2px solid white; }
    .demo-motion .after .image-object { left: 72%; }

    dialog {
      width: min(920px, calc(100vw - 28px));
      max-height: min(860px, calc(100vh - 28px));
      padding: 0;
      overflow: hidden;
      border: 1px solid var(--line);
      border-radius: 24px;
      color: var(--ink);
      background: white;
      box-shadow: 0 28px 100px rgba(13, 27, 47, 0.3);
    }

    dialog::backdrop { background: rgba(13, 27, 47, 0.6); backdrop-filter: blur(3px); }

    .dialog-shell { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; max-height: inherit; }
    .dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 22px 24px 16px; border-bottom: 1px solid var(--line); }
    .dialog-head h2 { margin: 6px 0 0; font-size: 24px; line-height: 1.2; letter-spacing: -0.03em; }
    .dialog-content { overflow-y: auto; padding: 22px 24px 26px; }
    .dialog-grid { display: grid; grid-template-columns: minmax(260px, 0.85fr) minmax(0, 1.15fr); gap: 22px; align-items: start; }
    .dialog-visual .demo { height: 238px; }
    .dialog-visual .demo-pair { height: 211px; }
    .dialog-prompt-label { margin-bottom: 8px; color: var(--soft); font-size: 11px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
    .dialog-prompt { margin: 0; padding: 17px; overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; color: #35465c; background: #f7f9fc; font: 13px/1.65 ui-monospace, SFMono-Regular, Consolas, monospace; white-space: pre-wrap; }
    .dialog-actions { display: flex; justify-content: flex-end; gap: 9px; padding: 15px 24px; border-top: 1px solid var(--line); background: #fbfcfe; }

    .toast {
      position: fixed;
      z-index: 80;
      right: 22px;
      bottom: 22px;
      max-width: min(360px, calc(100vw - 44px));
      padding: 12px 15px;
      transform: translateY(20px);
      border-radius: 12px;
      color: white;
      background: var(--navy);
      box-shadow: 0 12px 30px rgba(13, 27, 47, 0.25);
      opacity: 0;
      pointer-events: none;
      transition: opacity 160ms ease, transform 160ms ease;
    }

    .toast.show { transform: translateY(0); opacity: 1; }

    @media (max-width: 980px) {
      .brand { min-width: auto; }
      .brand-copy { display: none; }
      .layout { grid-template-columns: 1fr; }
      .sidebar {
        position: fixed;
        z-index: 45;
        top: 0;
        left: 0;
        width: min(330px, calc(100vw - 42px));
        height: 100vh;
        padding: 24px 18px 40px;
        transform: translateX(-105%);
        border-right: 1px solid var(--line);
        background: white;
        box-shadow: 16px 0 50px rgba(13, 27, 47, 0.18);
        transition: transform 180ms ease;
      }
      .sidebar.open { transform: translateX(0); }
      .sidebar-backdrop.show { display: block; }
      .mobile-filter-button { display: inline-flex; }
      .count-pill { display: none; }
      .playground-grid { grid-template-columns: 1fr; }
      .playground-controls { border-right: 0; border-bottom: 1px solid var(--line); }
    }

    @media (max-width: 720px) {
      .topbar { flex-wrap: wrap; gap: 10px; padding: 10px 14px; }
      .search-wrap { order: 3; flex-basis: 100%; max-width: none; }
      .shortcut { display: none; }
      .search { padding-right: 15px; }
      main { padding-top: 28px; }
      .intro { grid-template-columns: 1fr; align-items: start; }
      .intro-stat { display: inline-flex; min-width: 0; align-items: baseline; gap: 8px; width: fit-content; }
      .feature-strip { grid-template-columns: 1fr; }
      .feature-item:nth-child(3) { display: none; }
      .toolbar { align-items: flex-start; flex-direction: column; }
      .effect-select { width: 100%; max-width: none; }
      .dialog-grid { grid-template-columns: 1fr; }
      .dialog-visual .demo { height: 185px; }
      .dialog-visual .demo-pair { height: 158px; }
      .dialog-actions { flex-wrap: wrap; }
      .dialog-actions .button { flex: 1 1 auto; }
      .playground-head { align-items: flex-start; flex-direction: column; padding: 20px; }
      .playground-grid { min-height: 0; }
      .playground-controls { padding: 18px; }
      .playground-preview-wrap { min-height: 310px; padding: 16px; }
      .playground-device { height: 280px; }
      .playground-device.mobile { height: 360px; }
      .playground-copy-card { width: 68%; padding: 15px; }
      .generated-actions { display: grid; grid-template-columns: 1fr 1fr; }
    }

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