.pw {
  --pw-bg: #171020;
  --pw-panel: #2a1d38;
  --pw-line: #674a7c;
  --pw-muted: #ccb9df;
  --pw-accent: #bd89f1;
  max-width: 1680px;
  margin: 0 auto;
  color: #fcf3ff;
}
.pw *, .pw *::before, .pw *::after { box-sizing: border-box; }
.pw [hidden] { display: none !important; }
.pw h1, .pw h2, .pw h3, .pw p { margin-top: 0; }
.pw h2 { font-size: 1.16rem; margin-bottom: 10px; }
.pw h3 { font-size: 1rem; }
.pw button, .pw input, .pw textarea, .pw select { font: inherit; }
.pw button, .pw-file {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  padding: 10px 14px;
  border: 1px solid #8866a0;
  border-radius: 10px;
  background: #382649;
  color: #fbf3ff;
  cursor: pointer;
  line-height: 1.3;
  text-decoration: none;
}
.pw button:hover, .pw-file:hover { background: #503465; border-color: #c79af0; }
.pw button:disabled { opacity: .45; cursor: not-allowed; }
.pw button.pw-primary { background: #8851c6; border-color: #cb9bff; font-weight: 700; }
.pw button.pw-danger { color: #ffb4c7; }
.pw :focus-visible { outline: 3px solid #d3b4ff; outline-offset: 3px; }
.pw input, .pw select, .pw textarea {
  display: block;
  width: 100%;
  min-width: 0;
  margin-top: 7px;
  padding: 11px 12px;
  border: 1px solid #7a5b8c;
  border-radius: 10px;
  background: #180f24;
  color: #faf1ff;
  line-height: 1.45;
}
.pw input[type="checkbox"] { display: inline-block; width: 18px; height: 18px; margin: 0 7px 0 0; accent-color: #b986ec; }
.pw input[type="color"] { height: 43px; padding: 5px; }
.pw textarea { resize: vertical; }
.pw label { display: block; font-size: .84rem; color: #e0cdef; }
.pw input::placeholder, .pw textarea::placeholder { color: #ad98bd; }
.pw-file { overflow: hidden; position: relative; }
.pw-file input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.pw-file:focus-within { outline: 3px solid #d3b4ff; }
.pw-hero {
  display: grid;
  grid-template-columns: minmax(0,1fr) 230px;
  align-items: center;
  gap: 30px;
  padding: 34px;
  margin-bottom: 24px;
  border: 1px solid #8b68a5;
  border-radius: 24px;
  background: radial-gradient(ellipse at top right, #77408c55, transparent 65%), linear-gradient(130deg, #30203f, #1a1225);
}
.pw-hero h1 { font-size: clamp(1.75rem,3.3vw,2.8rem); line-height: 1.15; margin: 18px 0; }
.pw-hero p { max-width: 850px; line-height: 1.75; margin-bottom: 17px; }
.pw-eyebrow { color: #d8b5ff; font-weight: 800; font-size: .7rem; letter-spacing: .12em; }
.pw-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.pw-tags span, .pw-pill { padding: 5px 11px; border: 1px solid #8b629f; border-radius: 30px; background: #3a2648; font-size: .73rem; }
.pw-art { padding: 25px; border: 1px solid #ad80c8; border-radius: 20px; background: #261832; transform: rotate(3deg); box-shadow: 8px 10px 0 #a164cf1a; text-align: center; }
.pw-art b { display: block; font-size: 2.6rem; margin: 15px 0; color: #e3bcff; }
.pw-art span, .pw-art small { font-size: .72rem; color: #ddc6ee; }
.pw-app { border: 1px solid var(--pw-line); border-radius: 20px; background: var(--pw-bg); overflow: hidden; }
.pw-toolbar, .pw-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.pw-toolbar { padding: 14px; background: #30213f; border-bottom: 1px solid var(--pw-line); }
.pw-end { margin-left: auto; }
.pw-status { margin: 0 !important; padding: 13px 18px; background: #25192e; border-bottom: 1px solid #553c64; font-size: .85rem; overflow-wrap: anywhere; }
.pw-status[data-error="true"] { color: #ffafc5; }
.pw-tabs { display: flex; background: #251a31; border-bottom: 1px solid var(--pw-line); }
.pw-tabs button { flex: 1; border: 0; border-radius: 0; border-bottom: 3px solid transparent; background: none; padding: 16px 10px; font-size: .84rem; font-weight: 700; }
.pw-tabs button[aria-selected="true"] { background: #47315a; border-bottom-color: #d09cff; }
.pw-panel { padding: 24px; min-width: 0; }
.pw-split { display: grid; grid-template-columns: minmax(270px,.85fr) minmax(0,1.7fr); gap: 22px; align-items: start; }
.pw-sidebar, .pw-box { padding: 20px; border: 1px solid var(--pw-line); border-radius: 15px; background: var(--pw-panel); min-width: 0; }
.pw-sidebar { position: sticky; top: 95px; }
.pw-form { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; margin-bottom: 18px; }
.pw-form .pw-span { grid-column: 1/-1; }
.pw-label { margin: 15px 0; }
.pw-actions { margin-top: 14px; }
.pw-actions:first-child { margin-top: 0; }
.pw-actions > label { flex: 1 1 140px; }
.pw-note { color: var(--pw-muted); font-size: .81rem; line-height: 1.7; margin: 12px 0; }
.pw-check { display: flex !important; align-items: center; margin: 12px 0; line-height: 1.5; }
.pw-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; margin-bottom: 18px; }
.pw-head h2 { margin-bottom: 0; }
.pw-stats { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; margin-bottom: 20px; }
.pw-stats > div { border: 1px solid #77548d; background: #352244; border-radius: 12px; padding: 15px; }
.pw-stats b { display: block; font-size: 1.45rem; color: #dfb7ff; overflow-wrap: anywhere; }
.pw-stats span { color: #e0cdee; font-size: .72rem; }
.pw-list { display: grid; gap: 12px; }
.pw-card { padding: 17px; border: 1px solid #6c4d81; border-radius: 13px; background: #2a1b38; overflow-wrap: anywhere; }
.pw-card h3 { margin: 0 0 8px; }
.pw-card p { margin: 6px 0; }
.pw-card small { color: #ccb6de; }
.pw-card .pw-actions { gap: 7px; }
.pw-card .pw-actions button { min-height: 34px; padding: 7px 10px; font-size: .78rem; }
.pw-callout { padding: 15px; border: 1px solid #8d68a4; border-left: 3px solid #c18df1; border-radius: 10px; background: #392447; font-size: .85rem; line-height: 1.75; margin: 15px 0; }
.pw-callout[data-warning="true"] { border-left-color: #f0c16b; }
.pw-empty { padding: 40px 22px; text-align: center; border: 1px dashed #85659b; border-radius: 15px; background: #261831; color: #dfc8ef; line-height: 1.8; }
.pw-table-wrap { overflow: auto; max-height: 600px; border: 1px solid var(--pw-line); border-radius: 12px; }
.pw table { width: 100%; border-collapse: collapse; font-size: .83rem; }
.pw th, .pw td { padding: 12px; text-align: left; border-bottom: 1px solid #5c416f; vertical-align: top; overflow-wrap: anywhere; }
.pw th { background: #443052; position: sticky; top: 0; z-index: 1; }
.pw td { background: #21162d; }
.pw-pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 15px; font-size: .8rem; }
.pw-details { border-top: 1px solid var(--pw-line); margin-top: 20px; padding-top: 17px; }
.pw-details summary { color: #deb5ff; font-weight: 600; cursor: pointer; }
.pw-bottom { padding: 25px; margin-top: 24px; border: 1px solid var(--pw-line); border-radius: 17px; background: #25192f; line-height: 1.8; }
.pw-bottom p { color: #d4c0e4; font-size: .9rem; }
.pw a { color: #d9b9ff; }
.pw-preview { background: #110c19; padding: 20px; border: 1px solid var(--pw-line); border-radius: 14px; display: grid; place-items: center; min-width: 0; }
.pw canvas { max-width: 100%; height: auto; display: block; }
.pw-app:fullscreen { display: flex; flex-direction: column; border: 0; border-radius: 0; width: 100vw; height: 100dvh; }
.pw-app:fullscreen > .pw-panel { flex: 1; min-height: 0; overflow: auto; }
.pw-app:fullscreen .pw-toolbar, .pw-app:fullscreen .pw-status, .pw-app:fullscreen .pw-tabs { flex-shrink: 0; }
.pw-app:fullscreen .pw-sidebar { top: 0; }
@media(max-width:1050px) {
  .pw-split { grid-template-columns: minmax(260px,1fr) minmax(0,1.5fr); gap: 15px; }
  .pw-panel { padding: 18px; }
  .pw-stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .pw-hero { grid-template-columns: minmax(0,1fr) 180px; padding: 25px; }
}
@media(max-width:760px) {
  .pw-split, .pw-hero { grid-template-columns: minmax(0,1fr); }
  .pw-art { display: none; }
  .pw-sidebar { position: static; }
  .pw-form { gap: 12px; }
  .pw-hero { padding: 22px; border-radius: 18px; }
  .pw-preview { padding: 10px; }
}
@media(max-width:440px) {
  .pw-panel, .pw-sidebar, .pw-box, .pw-bottom { padding: 15px; }
  .pw-form { grid-template-columns: minmax(0,1fr); }
  .pw-toolbar { padding: 10px; gap: 8px; }
  .pw-toolbar button, .pw-toolbar .pw-file { font-size: .76rem; padding: 9px 10px; }
  .pw-tabs button { font-size: .75rem; padding: 13px 6px; }
  .pw-actions button { flex-grow: 1; }
  .pw-stats > div { padding: 12px; }
  .pw-pager button { font-size: .75rem; padding: 8px; }
}
