/* NiceUI Blob & Wave Generator — app layout. Shares .gm-* control styles from styles.css. */
.bw [hidden] { display: none !important; }
.bw { display: grid; grid-template-columns: minmax(0, 1fr) 360px; height: calc(100vh - var(--ap-bar, 52px)); height: calc(100dvh - var(--ap-bar, 52px)); }
.bw-main { min-width: 0; min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 12px; padding: 14px; }
.bw-stage { position: relative; min-height: 0; border-radius: 20px; overflow: hidden; border: 1px solid var(--line-2); background: radial-gradient(circle at 50% 35%, #15161b, #08090b); display: grid; place-items: center; padding: 48px 28px 72px; }
.bw-art { display: grid; place-items: center; border-radius: 10px; overflow: hidden; box-shadow: 0 30px 80px -40px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.06); }
.bw-art:empty { display: none; }
.bw-art.bw-checker { background: conic-gradient(#202126 25%, #17181c 0 50%, #202126 0 75%, #17181c 0) 0 0 / 22px 22px; }
.bw-svg { display: block; width: 100%; height: 100%; }
/* waves inside a section preview */
.bw-section { position: absolute; inset: 48px 28px 72px; border-radius: 16px; overflow: hidden; padding: clamp(20px, 5vw, 56px); color: #0b0c0e; display: grid; align-content: start; gap: 10px; box-shadow: 0 30px 80px -40px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.06); }
.bw-section.bw-light { color: #0b0c0e; }
.bw-section:not(.bw-light) { color: #f8fafc; }
.bw-section-tag { font: 500 10.5px var(--mono); letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.6; }
.bw-section-h { font-size: clamp(20px, 2.6vw, 32px); font-weight: 600; letter-spacing: -0.03em; line-height: 1.1; max-width: 520px; }
.bw-section-p { font-size: 14px; opacity: 0.65; max-width: 440px; }
.bw-in-section .bw-section:has(.bw-top) { align-content: end; }
.bw-divider { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: auto; display: block; }
.bw-divider.bw-top { top: 0; bottom: auto; }
.bw-stage-bar { position: absolute; left: 12px; right: 12px; bottom: 12px; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; align-items: center; z-index: 2; }
.bw-stage-bar .bw-seg { width: min(300px, 100%); margin: 0; background: rgba(0, 0, 0, 0.6); border-color: rgba(255, 255, 255, 0.14); backdrop-filter: blur(12px); }
.bw-stage-bar .bw-seg button { color: rgba(255, 255, 255, 0.75); }
.bw-stage-bar .bw-seg button[aria-pressed="true"] { background: #fff; color: #000; }
.bw-chip { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 12px; border-radius: 10px; background: #fff; color: #000; font-size: 13px; font-weight: 500; }
.bw-chip:active { transform: scale(0.97); }
.bw-chip kbd { font: 500 10px var(--mono); padding: 1px 5px; border-radius: 5px; background: #eceef1; color: #555; }
.bw-toggle { position: absolute; top: 12px; right: 14px; display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 10px; border-radius: 9px; background: rgba(0, 0, 0, 0.55); border: 1px solid rgba(255, 255, 255, 0.12); backdrop-filter: blur(12px); font-size: 12px; color: rgba(255, 255, 255, 0.85); cursor: pointer; z-index: 2; }
.bw-toggle input { accent-color: var(--sky); }
.bw-seed { position: absolute; top: 14px; left: 16px; font: 500 11px var(--mono); letter-spacing: 0.06em; color: var(--mute); text-transform: uppercase; z-index: 2; }
.bw-seed b { color: var(--text); font-weight: 500; }
.bw-presets-wrap { display: flex; align-items: center; gap: 10px; min-width: 0; }
.bw-presets-label { flex: none; font: 500 10.5px var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--mute); writing-mode: vertical-rl; transform: rotate(180deg); }
.bw-presets { display: grid; grid-auto-flow: column; grid-auto-columns: 112px; gap: 8px; overflow-x: auto; padding-bottom: 2px; min-width: 0; flex: 1; scrollbar-width: thin; }
.bw-preset { position: relative; height: 72px; border-radius: 12px; border: 1px solid var(--line); overflow: hidden; display: block; background: #16171b; transition: border-color 0.2s, transform 0.2s; }
.bw-preset:hover { border-color: var(--line-3); transform: translateY(-1px); }
.bw-preset svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.bw-preset-blob svg { inset: 8px 8px 20px; width: calc(100% - 16px); height: calc(100% - 28px); }
.bw-preset-waves svg { top: auto; height: 62%; }
.bw-preset b { position: absolute; left: 6px; bottom: 5px; font-size: 10.5px; font-weight: 500; padding: 1px 6px; border-radius: 6px; background: rgba(0, 0, 0, 0.55); color: #fff; backdrop-filter: blur(6px); }
.bw-side { display: flex; flex-direction: column; min-height: 0; border-left: 1px solid var(--line); background: var(--s1); }
.bw-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 12px; display: grid; gap: 10px; align-content: start; }
.bw-scroll .gm-card { background: var(--s2); }
.bw-seg { margin: 8px 0 4px; }
.bw-seg button { font-size: 12px; }
.bw-check { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 13px; color: var(--mute); cursor: pointer; }
.bw-check input { accent-color: var(--sky); width: 16px; height: 16px; }
.bw-kinds { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; margin: 4px 0 6px; }
.bw-kind { height: 32px; border-radius: 9px; border: 1px solid var(--line-2); font-size: 12px; color: var(--mute); }
.bw-kind[aria-pressed="true"] { border-color: var(--sky); color: var(--text); box-shadow: 0 0 0 1px var(--sky); background: var(--s3); }
.bw-palettes { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-bottom: 10px; }
.bw-pal { display: grid; grid-template-columns: repeat(4, 1fr); height: 26px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line-2); padding: 0; }
.bw-pal i { display: block; height: 100%; }
.bw-pal[aria-pressed="true"] { border-color: var(--sky); box-shadow: 0 0 0 1px var(--sky); }
.bw-colors { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.bw-color { display: grid; justify-items: center; gap: 4px; font: 500 10.5px var(--mono); color: var(--mute); cursor: pointer; }
.bw-color input { width: 100%; height: 34px; padding: 0; border: 1px solid var(--line-2); border-radius: 9px; background: none; cursor: pointer; }
.bw-sizes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.bw-sizes button { height: 30px; border-radius: 8px; border: 1px solid var(--line-2); font-size: 12px; color: var(--mute); }
.bw-sizes button[aria-pressed="true"] { background: var(--sky); border-color: var(--sky); color: var(--sky-ink); }
.bw-custom { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 8px; }
.bw-custom label { display: flex; align-items: center; gap: 6px; font: 500 11px var(--mono); color: var(--mute); }
.bw-custom input { width: 100%; min-width: 0; height: 32px; padding: 0 8px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--s1); color: var(--text); font-size: 13px; }
.bw-export { display: grid; gap: 8px; padding: 12px; border-top: 1px solid var(--line); background: var(--s1); }
.bw-tabs { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 1fr; }
.bw-tabs button { font-size: 12px; padding: 0 2px; }
.bw-export .gm-code { max-height: 130px; }
.bw-export .gm-actions .btn-cmd { padding: 0 11px; }
.bw-export-opts { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--mute); }
.bw-export-opts .bw-seg { margin: 0; flex: 1; max-width: 140px; }
@media (max-width: 1000px) {
  .bw { height: auto; grid-template-columns: 1fr; }
  .bw-main { grid-template-rows: auto auto; }
  .bw-stage { height: 60vh; min-height: 340px; }
  .bw-side { border-left: 0; border-top: 1px solid var(--line); }
  .bw-scroll { overflow: visible; }
  .bw-export { position: sticky; bottom: 0; z-index: 5; }
}
@media (max-width: 480px) {
  .bw-stage { padding: 44px 12px 112px; }
  .bw-section { inset: 44px 12px 112px; }
  .bw-chip kbd { display: none; }
  .bw-presets-label { display: none; }
  .bw-tabs button { font-size: 11px; }
}
