/* Artwork Assembly — admin canvas */
.aa-page {
    max-width: 1600px;
}
.aa-lead {
    max-width: 42rem;
}
.aa-workspace {
    display: grid;
    grid-template-columns: minmax(220px, 280px) 1fr;
    gap: 1rem;
    align-items: start;
}
@media (max-width: 900px) {
    .aa-workspace {
        grid-template-columns: 1fr;
    }
}
.aa-palette {
    max-height: calc(100vh - 220px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.aa-palette-body,
.aa-lockups-body,
.aa-wordmark-body {
    overflow-y: auto;
    max-height: 36vh;
}
.aa-wordmark-body {
    max-height: none;
}
.aa-palette-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
    gap: 0.45rem;
}
.aa-piece-thumb {
    border: 1px solid var(--border-color, #dee2e6);
    border-radius: 8px;
    background: #111;
    padding: 0.35rem;
    cursor: grab;
    text-align: center;
    user-select: none;
}
.aa-piece-thumb:active {
    cursor: grabbing;
}
.aa-piece-thumb img,
.aa-piece-thumb .aa-thumb-svg {
    width: 100%;
    height: 48px;
    object-fit: contain;
    display: block;
    pointer-events: none;
}
.aa-piece-thumb .aa-thumb-label {
    display: block;
    font-size: 0.62rem;
    color: var(--muted-text, #888);
    margin-top: 0.2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.aa-lockup-thumb {
    border: 1px solid var(--border-color, #dee2e6);
    border-radius: 8px;
    background: #222;
    padding: 0.4rem;
    margin-bottom: 0.45rem;
    cursor: grab;
}
.aa-lockup-thumb img {
    width: 100%;
    height: auto;
    max-height: 56px;
    object-fit: contain;
    display: block;
    pointer-events: none;
}
.aa-stage-wrap .aa-stage-body {
    padding: 0.75rem;
}
#aaStageScroll {
    overflow: auto;
    max-height: calc(100vh - 240px);
    background: var(--background, #f0f0f0);
    border-radius: 8px;
}
.aa-stage {
    position: relative;
    margin: 1rem auto;
    background: #0a0e14;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    touch-action: none;
}
.aa-stage.aa-bg-light { background: #f4f6f8; }
.aa-stage.aa-bg-dark { background: #0a0e14; }
.aa-stage.aa-bg-ssplus { background: #1B7DB6; }
.aa-stage.aa-bg-ssl { background: #AE1989; }
.aa-stage.aa-bg-sslp { background: #FEA212; }
.aa-stage.aa-bg-transparent {
    background-color: #ccc;
    background-image:
        linear-gradient(45deg, #999 25%, transparent 25%),
        linear-gradient(-45deg, #999 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #999 75%),
        linear-gradient(-45deg, transparent 75%, #999 75%);
    background-size: 24px 24px;
    background-position: 0 0, 0 12px, 12px -12px, -12px 0;
}
.aa-item {
    position: absolute;
    cursor: move;
    user-select: none;
    transform-origin: center center;
    will-change: transform;
}
.aa-item.aa-selected {
    outline: 2px solid #7eb8ff;
    outline-offset: 2px;
}
.aa-rot-handle {
    position: absolute;
    left: 50%;
    top: -22px;
    width: 16px;
    height: 16px;
    margin-left: -8px;
    border-radius: 50%;
    background: #7eb8ff;
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
    cursor: grab;
    z-index: 5;
    pointer-events: auto;
}
.aa-rot-handle::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 14px;
    width: 2px;
    height: 10px;
    margin-left: -1px;
    background: #7eb8ff;
}
.aa-rot-handle:active {
    cursor: grabbing;
}
.aa-item img,
.aa-item svg {
    display: block;
    width: 100%;
    height: 100%;
    pointer-events: none;
}
.aa-item img {
    object-fit: contain;
    object-position: center;
}
.aa-item svg path {
    fill: currentColor;
    stroke: currentColor;
}
/* Pocket wordmarks are stroke-based — keep fill none so letters stay line glyphs */
.aa-item.aa-stroke-glyph svg path {
    fill: none !important;
    stroke: currentColor;
}
[data-theme="dark"] .aa-piece-thumb {
    background: #1a1d24;
}
[data-theme="dark"] #aaStageScroll {
    background: #12151a;
}
