body.sites { min-height: 100vh; }
body.sites svg { max-width: 64px; max-height: 64px; }
body.sites .ws-pill svg, body.sites .ws-btn svg, body.sites .ws-seg svg { max-width: 20px; max-height: 20px; }
.ws-loading, .ws-empty { color: var(--muted); text-align: center; padding: 80px 16px; }
.ws-wrap { max-width: 1180px; margin: 0 auto; padding: 0 clamp(16px, 3vw, 28px); }
.ws-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 18px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--deck); color: var(--runway); font: 600 15px/1 var(--body); cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background-color .15s, border-color .15s, transform .1s, opacity .15s; }
.ws-btn:hover { background: var(--panel); border-color: color-mix(in srgb, var(--runway) 22%, var(--line)); }
.ws-btn:active { transform: translateY(1px); }
.ws-btn.pri { background: var(--amber); border-color: var(--amber); color: var(--amber-ink); }
.ws-btn.pri:hover { filter: brightness(1.07); background: var(--amber); }
.ws-btn.sm { height: 34px; padding: 0 12px; font-size: 14px; border-radius: 8px; }
.ws-btn.danger { color: var(--red); }
.ws-btn[disabled] { opacity: .5; cursor: not-allowed; }
.ws-btn svg { width: 17px; height: 17px; flex: none; }
.ws-pill { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px; border-radius: 999px; font: 600 13px/1 var(--body);
  background: color-mix(in srgb, var(--amber) 14%, transparent); color: var(--amber); border: 1px solid color-mix(in srgb, var(--amber) 35%, transparent); }
.ws-pill { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: none; }
.ws-pill svg { width: 14px; height: 14px; flex: none; }
a.ws-pill.live:hover { filter: brightness(1.15); }
.ws-lockpanel { align-self: center; margin: auto; max-width: 440px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 20px; }
.ws-lockpanel .ic { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 18px; color: var(--amber); background: color-mix(in srgb, var(--amber) 14%, transparent); }
.ws-lockpanel .ic svg { width: 30px; height: 30px; }
.ws-lockpanel p { color: var(--muted); margin: 0; }
.ws-dlg h3 svg { width: 20px; height: 20px; vertical-align: -3px; color: var(--amber); }
.ws-pill.live { background: color-mix(in srgb, var(--green) 14%, transparent); color: var(--green); border-color: color-mix(in srgb, var(--green) 35%, transparent); }
.ws-pill.dim { background: var(--panel); color: var(--muted); border-color: var(--line); }

.ws-hero { text-align: center; padding: clamp(40px, 7vw, 84px) 0 28px; }
.ws-kick { display: inline-flex; align-items: center; gap: 8px; font: 700 12px var(--body); letter-spacing: .1em; text-transform: uppercase; color: var(--amber); margin-bottom: 16px; }
.ws-hero h1 { font-size: clamp(36px, 6vw, 68px); line-height: 1.02; letter-spacing: -.03em; }
.ws-hero h1 em { font-style: normal; color: var(--amber); }
.ws-hero p.sub { color: var(--muted); font-size: clamp(16px, 2vw, 19px); max-width: 640px; margin: 16px auto 0; }
.ws-composer { max-width: 820px; margin: 30px auto 0; text-align: left; background: var(--deck); border: 1px solid var(--line); border-radius: 20px; padding: 14px;
  box-shadow: 0 24px 60px -30px rgba(0,0,0,.6); transition: border-color .15s, box-shadow .15s; }
.ws-composer:focus-within { border-color: var(--amber); box-shadow: 0 0 0 3px color-mix(in srgb, var(--amber) 22%, transparent), 0 24px 60px -30px rgba(0,0,0,.6); }
.ws-composer textarea { width: 100%; min-height: 108px; resize: vertical; border: 0; outline: 0; background: transparent; color: var(--runway); font: 400 17px/1.5 var(--body); padding: 6px 8px; }
.ws-composer textarea::placeholder { color: var(--muted); }
.ws-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; padding: 4px 4px 0; }
.ws-styles { display: flex; flex-wrap: wrap; gap: 6px; }
.ws-chip { height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--sky); color: var(--muted); font: 600 13px/1 var(--body); cursor: pointer; transition: all .15s; }
.ws-chip:hover { color: var(--runway); border-color: color-mix(in srgb, var(--runway) 25%, var(--line)); }
.ws-chip[aria-pressed="true"] { background: color-mix(in srgb, var(--amber) 16%, transparent); border-color: var(--amber); color: var(--amber); }
.ws-fine { max-width: 820px; margin: 12px auto 0; color: var(--muted); font-size: 13.5px; display: flex; flex-wrap: wrap; gap: 6px 16px; justify-content: center; }
.ws-fine b { color: var(--runway); }
.ws-sec { margin: 56px 0 0; }
.ws-sec h2 { font-size: 24px; margin-bottom: 6px; }
.ws-sec > p { color: var(--muted); margin: 0 0 18px; }
.ws-ideas { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 12px; }
.ws-idea { text-align: left; display: flex; flex-direction: column; gap: 6px; padding: 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--deck); color: var(--runway);
  cursor: pointer; font: inherit; transition: border-color .15s, transform .15s, background-color .15s; }
.ws-idea:hover { border-color: var(--amber); transform: translateY(-2px); }
.ws-idea .e { font-size: 26px; line-height: 1; }
.ws-idea b { font: 700 16px var(--display); }
.ws-idea span { color: var(--muted); font-size: 13.5px; line-height: 1.45; }
.ws-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 14px; }
.ws-card { display: flex; flex-direction: column; background: var(--deck); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; transition: border-color .15s, transform .15s; }
.ws-card:hover { border-color: color-mix(in srgb, var(--amber) 60%, var(--line)); transform: translateY(-2px); }
.ws-thumb { position: relative; aspect-ratio: 16 / 10; background: var(--sky); overflow: hidden; border-bottom: 1px solid var(--line); }
.ws-thumb iframe { position: absolute; top: 0; left: 0; width: 1280px; height: 800px; border: 0; transform-origin: 0 0; pointer-events: none; background: #fff; }
.ws-thumb .none { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 14px; }
.ws-card .meta { padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.ws-card .meta b { font: 700 16px var(--display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-card .row { display: flex; align-items: center; gap: 8px; justify-content: space-between; color: var(--muted); font-size: 13px; }
.ws-card .open { position: absolute; inset: 0; z-index: 1; }
.ws-card { position: relative; }
.ws-card .del { position: relative; z-index: 2; }
.ws-login { max-width: 560px; margin: 24px auto 0; }

.ws-studio { display: grid; grid-template-columns: 380px minmax(0, 1fr); height: calc(100vh - 68px); min-height: 560px; }
.ws-side { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--line); background: var(--deck); }
.ws-sidehead { padding: 14px 16px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.ws-top { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.ws-back { background: none; border: 0; color: var(--muted); font: 600 14px var(--body); cursor: pointer; padding: 4px 0; display: inline-flex; gap: 6px; align-items: center; }
.ws-back:hover { color: var(--runway); }
.ws-name { width: 100%; border: 1px solid transparent; background: transparent; color: var(--runway); font: 700 19px var(--display); padding: 6px 8px; border-radius: 8px; margin-left: -8px; }
.ws-name:hover, .ws-name:focus { border-color: var(--line); background: var(--sky); outline: 0; }
.ws-log { flex: 1; min-height: 0; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 14px; scroll-behavior: smooth; }
.ws-msg { max-width: 92%; padding: 10px 14px; border-radius: 14px; font-size: 14.5px; line-height: 1.5; overflow-wrap: anywhere; }
.ws-msg.me { align-self: flex-end; background: var(--amber); color: var(--amber-ink); border-bottom-right-radius: 4px; font-weight: 500; }
.ws-msg.ai { align-self: flex-start; background: var(--sky); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.ws-msg .acts { display: flex; gap: 6px; margin-top: 8px; align-items: center; color: var(--muted); font-size: 12.5px; }
.ws-linkbtn { background: none; border: 0; color: var(--amber); font: 600 12.5px var(--body); cursor: pointer; padding: 0; }
.ws-linkbtn:hover { text-decoration: underline; }
.ws-compose { border-top: 1px solid var(--line); padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 10px; background: var(--deck); }
.ws-compose textarea { width: 100%; min-height: 76px; max-height: 190px; resize: vertical; border: 1px solid var(--line); border-radius: 12px; background: var(--sky); color: var(--runway);
  font: 400 15px/1.5 var(--body); padding: 10px 12px; outline: 0; }
.ws-compose textarea:focus { border-color: var(--amber); }
.ws-quick { display: flex; flex-wrap: wrap; gap: 6px; }
.ws-send { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 12.5px; }
.ws-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: color-mix(in srgb, var(--sky) 70%, #000); }
.ws-tools { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--deck); flex-wrap: wrap; }
.ws-seg { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--sky); border: 1px solid var(--line); gap: 2px; }
.ws-seg button { height: 30px; padding: 0 12px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font: 600 13.5px var(--body); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.ws-seg button svg { width: 16px; height: 16px; }
.ws-seg button[aria-pressed="true"] { background: var(--panel); color: var(--runway); }
.ws-spacer { flex: 1; }
.ws-stage { position: relative; flex: 1; min-height: 0; padding: 16px; display: flex; justify-content: center; overflow: auto; }
.ws-frame { position: relative; width: 100%; height: 100%; max-width: 100%; transition: max-width .25s ease; background: #fff; border-radius: 12px; overflow: hidden;
  box-shadow: 0 0 0 1px var(--line), 0 20px 50px -20px rgba(0,0,0,.6); }
.ws-frame.tablet { max-width: 820px; } .ws-frame.mobile { max-width: 390px; }
.ws-frame iframe { width: 100%; height: 100%; border: 0; display: block; background: #fff; }
.ws-stage.full { position: fixed; inset: 0; z-index: 200; padding: 0; background: var(--sky); }
.ws-stage.full .ws-frame { border-radius: 0; max-width: 100%; }
.ws-x { position: absolute; top: 12px; right: 12px; z-index: 5; }
.ws-code { width: 100%; height: 100%; border: 1px solid var(--line); border-radius: 12px; background: var(--sky); color: var(--runway); font: 500 13px/1.55 var(--mono); padding: 14px; resize: none; outline: 0; tab-size: 2; white-space: pre; overflow: auto; }
.ws-over { position: absolute; inset: 0; z-index: 4; display: grid; place-items: center; background: color-mix(in srgb, var(--sky) 88%, transparent); backdrop-filter: blur(6px); border-radius: 12px; text-align: center; padding: 20px; }
.ws-over .box { max-width: 420px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.ws-over h3 { font-size: 22px; }
.ws-over p { color: var(--muted); margin: 0; font-size: 14.5px; }
.ws-plane { width: 64px; height: 64px; color: var(--amber); animation: ws-fly 2.4s ease-in-out infinite; }
@keyframes ws-fly { 0%, 100% { transform: translate(-8px, 4px) rotate(-4deg); } 50% { transform: translate(8px, -6px) rotate(4deg); } }
.ws-bar-track { width: 100%; height: 8px; border-radius: 99px; background: var(--panel); overflow: hidden; }
.ws-bar-fill { height: 100%; width: 4%; border-radius: 99px; background: linear-gradient(90deg, var(--amber), color-mix(in srgb, var(--amber) 55%, #fff)); transition: width .5s ease; }
.ws-steps { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; color: var(--muted); font-size: 12.5px; }
.ws-steps span.on { color: var(--amber); font-weight: 700; }
.ws-tabsmall { display: none; }

.ws-dlg { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; background: rgba(0,0,0,.6); padding: 16px; }
.ws-dlg .card { width: min(480px, 100%); background: var(--deck); border: 1px solid var(--line); border-radius: 18px; padding: 22px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 30px 80px -20px rgba(0,0,0,.7); }
.ws-dlg h3 { font-size: 21px; }
.ws-dlg p { color: var(--muted); margin: 0; font-size: 14.5px; }
.ws-field { display: flex; align-items: stretch; border: 1px solid var(--line); border-radius: 10px; background: var(--sky); overflow: hidden; }
.ws-field:focus-within { border-color: var(--amber); }
.ws-field span { display: grid; place-items: center; padding: 0 10px; color: var(--muted); font: 500 13.5px var(--mono); background: var(--panel); white-space: nowrap; }
.ws-field input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--runway); font: 500 15px var(--mono); padding: 11px 12px; outline: 0; }
.ws-check { min-height: 20px; font-size: 14px; font-weight: 600; color: var(--muted); margin-top: -4px; }
.ws-check.ok { color: var(--green); } .ws-check.bad { color: var(--red); }
.ws-field span:last-child:not(:first-child) { border-left: 1px solid var(--line); }
.ws-acts { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.ws-note { font-size: 13px; color: var(--muted); }
.ws-err { color: var(--red); font-size: 14px; min-height: 18px; }
.ws-toasts { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 400; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.ws-toast { background: var(--runway); color: var(--sky); padding: 11px 16px; border-radius: 12px; font: 600 14px var(--body); box-shadow: 0 10px 30px rgba(0,0,0,.4); max-width: min(92vw, 520px); animation: ws-pop .2s ease; }
.ws-toast.bad { background: var(--red); color: #fff; }
@keyframes ws-pop { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

@media (max-width: 900px) {
  .ws-studio { grid-template-columns: 1fr; height: auto; min-height: calc(100vh - 68px); }
  .ws-side { border-right: 0; border-bottom: 1px solid var(--line); max-height: none; }
  .ws-log { max-height: 46vh; }
  .ws-main { min-height: 70vh; }
  .ws-studio[data-pane="chat"] .ws-main { display: none; }
  .ws-studio[data-pane="preview"] .ws-side { display: none; }
  .ws-tabsmall { display: flex; position: sticky; top: 68px; z-index: 20; padding: 8px 12px; background: var(--deck); border-bottom: 1px solid var(--line); }
  .ws-tabsmall .ws-seg { width: 100%; } .ws-tabsmall .ws-seg button { flex: 1; justify-content: center; }
  .ws-stage { padding: 8px; }
}
@media (prefers-reduced-motion: reduce) { .ws-plane { animation: none; } .ws-frame, .ws-bar-fill { transition: none; } }
