/* NiceUI ASCII Art Generator — app layout. Shares .gm-* control styles from styles.css. */
.aa [hidden] { display: none !important; }
.aa { display: grid; grid-template-columns: minmax(0, 1fr) 340px; height: calc(100vh - var(--ap-bar, 52px)); height: calc(100dvh - var(--ap-bar, 52px)); }
.aa-main { min-width: 0; min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 12px; padding: 14px; }
.aa-stage { position: relative; min-height: 0; border-radius: 20px; overflow: hidden; border: 1px solid var(--line-2); background: #050506; display: grid; place-items: center; padding-bottom: 48px; }
.aa-canvas { display: block; image-rendering: auto; border-radius: 4px; box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.9); }
.aa-stage video { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.aa-drop { position: absolute; inset: 10px; border: 2px dashed var(--sky); border-radius: 16px; display: grid; place-items: center; background: rgba(2, 6, 23, 0.75); color: #fff; z-index: 3; }
.aa-stage-bar { position: absolute; left: 12px; right: 12px; bottom: 10px; display: flex; gap: 10px; align-items: center; justify-content: center; }
.aa-chip { height: 30px; padding: 0 12px; border-radius: 9px; font-size: 12.5px; color: rgba(255, 255, 255, 0.85); background: rgba(0, 0, 0, 0.6); border: 1px solid rgba(255, 255, 255, 0.14); }
.aa-chip[aria-pressed="true"] { background: #fff; color: #000; }
.aa-meta { font: 500 11px var(--mono); color: rgba(255, 255, 255, 0.5); letter-spacing: 0.04em; }
.aa-src { display: flex; align-items: center; gap: 10px; overflow-x: auto; padding-bottom: 2px; }
.aa-samples { display: flex; gap: 8px; flex: none; }
.aa-sample { width: 64px; height: 44px; border-radius: 9px; overflow: hidden; border: 1px solid var(--line); flex: none; }
.aa-sample img { width: 100%; height: 100%; object-fit: cover; }
.aa-sample[aria-pressed="true"] { border-color: var(--sky); box-shadow: 0 0 0 1px var(--sky); }
.aa-btn { position: relative; flex: none; display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px; border-radius: 11px; background: #fff; color: #000; font-size: 13px; font-weight: 500; cursor: pointer; white-space: nowrap; }
.aa-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.aa-btn svg { transform: rotate(-90deg); }
.aa-btn-ghost { background: var(--s2); color: var(--text); border: 1px solid var(--line-2); }
.aa-btn-ghost.rec { background: #dc2626; border-color: #dc2626; color: #fff; }
.aa-hint { font-size: 12px; color: var(--mute); white-space: nowrap; }
.aa-side { display: flex; flex-direction: column; min-height: 0; border-left: 1px solid var(--line); background: var(--s1); }
.aa-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 12px; display: grid; gap: 10px; align-content: start; }
.aa-scroll .gm-card { background: var(--s2); }
.aa-presets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.aa-preset { display: grid; gap: 4px; padding: 4px 4px 6px; border-radius: 10px; border: 1px solid var(--line-2); }
.aa-preset span { display: grid; place-items: center; height: 34px; border-radius: 7px; background: var(--pb); color: var(--pf); font: 600 13px ui-monospace, monospace; letter-spacing: 1px; }
.aa-preset b { font-size: 10.5px; font-weight: 500; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aa-preset[aria-pressed="true"] { border-color: var(--sky); box-shadow: 0 0 0 1px var(--sky); }
.aa-seg { margin: 6px 0 2px; }
.aa-seg button { font-size: 12px; }
.aa-field { display: grid; gap: 5px; margin-top: 8px; font-size: 12.5px; color: var(--mute); }
.aa-field input { height: 34px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 9px; background: var(--s1); color: var(--text); font: 13px var(--mono); }
.aa-check { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 13px; color: var(--mute); cursor: pointer; }
.aa-check input { accent-color: var(--sky); width: 16px; height: 16px; }
.aa-check-s { margin: 0; font-size: 12px; }
.aa-bgrow { display: inline-flex; align-items: center; gap: 8px; }
.aa-colors { display: grid; gap: 2px; margin: 4px 0; }
.aa-export { position: relative; display: grid; gap: 8px; padding: 12px; border-top: 1px solid var(--line); background: var(--s1); }
.aa-export-row .aa-seg { margin: 0; }
.aa-export .gm-actions .btn-sky { flex: 1; justify-content: center; }
.aa-export .gm-actions .btn-sky svg { transform: rotate(90deg); }
.aa-more { position: absolute; right: 12px; bottom: calc(100% - 4px); display: grid; min-width: 220px; padding: 6px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--s2); box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.7); z-index: 6; }
.aa-more button { text-align: left; padding: 8px 10px; border-radius: 8px; font-size: 13px; color: var(--text); }
.aa-more button:hover, .aa-more button:focus-visible { background: var(--s3); }
@media (max-width: 1000px) {
  .aa { height: auto; grid-template-columns: 1fr; }
  .aa-main { grid-template-rows: auto auto; }
  .aa-stage { height: 56vh; }
  .aa-side { border-left: 0; border-top: 1px solid var(--line); }
  .aa-scroll { overflow: visible; }
  .aa-export { position: sticky; bottom: 0; z-index: 5; }
}
@media (max-width: 480px) {
  .aa-hint { display: none; }
}
