.preset-card { position: relative; display: flex; min-width: 0; min-height: 163px; flex-direction: column; align-items: stretch; padding: 10px; overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: linear-gradient(145deg, rgba(22,31,42,.96), rgba(16,22,31,.94)); text-align: left; transition: border-color .18s ease, transform .18s ease, background .18s ease, box-shadow .18s ease; }
.preset-card::after { content: ""; position: absolute; right: -22px; top: -22px; width: 66px; height: 66px; border-radius: 50%; background: rgba(124,224,211,.025); transition: background .18s ease; }
.preset-card:hover { border-color: rgba(124,224,211,.34); background: linear-gradient(145deg,rgba(26,39,50,.98),rgba(17,26,36,.98)); transform: translateY(-2px); box-shadow: 0 12px 25px rgba(0,0,0,.17); }
.preset-card:hover::after { background: rgba(124,224,211,.075); }
.preset-card:active { transform: translateY(0); }
.preset-card-head { position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: center; gap: 5px; min-height: 14px; }
.preset-group-label { color: #91a0ae; font-size: 7px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.preset-badge { padding: 3px 5px; border: 1px solid rgba(216,189,134,.16); border-radius: 4px; background: rgba(216,189,134,.06); color: #d5b987; font-size: 7px; font-weight: 700; }
.preset-mini-zone { position: relative; display: flex; height: 69px; align-items: center; justify-content: center; margin: 7px 0 5px; border: 1px solid rgba(190,207,219,.055); border-radius: 7px; background: radial-gradient(ellipse at center,rgba(105,137,149,.055),transparent 75%); }
.preset-mini-canvas { position: relative; width: var(--mini-width, 38px); max-width: 88%; aspect-ratio: var(--mini-ratio, .71); max-height: 61px; border: 1px solid rgba(226,235,240,.45); border-radius: 1px; background: linear-gradient(148deg,#d8dedb,#7d9392 46%,#364b4e 47%,#1d3037 100%); box-shadow: 0 3px 7px rgba(0,0,0,.24); overflow: hidden; }
.preset-mini-canvas::before { content: ""; position: absolute; left: 13%; right: 13%; top: 12%; height: 5%; border-radius: 2px; background: rgba(232,236,228,.6); }
.preset-mini-canvas::after { content: ""; position: absolute; left: 12%; right: 12%; bottom: 10%; height: 18%; border-radius: 1px; background: rgba(17,32,36,.4); }
.preset-mini-canvas[data-kind="paper"] { background: linear-gradient(150deg,#e9e4d9,#d2c8b8); border-color: rgba(242,236,224,.5); }
.preset-mini-canvas[data-kind="paper"]::before { top: auto; left: 13%; right: 35%; bottom: 24%; height: 2px; background: #82918a; }
.preset-mini-canvas[data-kind="paper"]::after { left: 13%; right: 13%; bottom: 16%; height: 2px; background: rgba(92,110,104,.36); }
.preset-mini-canvas[data-kind="digital"] { background: linear-gradient(145deg,#769a96,#2d4c50 54%,#18282f); }
.preset-mini-canvas[data-kind="digital"]::before { left: 18%; top: 18%; width: 24%; height: 20%; border-radius: 50%; background: #dec38d; }
.preset-mini-canvas[data-kind="digital"]::after { left: 0; right: 0; bottom: 0; height: 41%; border-radius: 0; background: #243b3c; clip-path: polygon(0 100%,0 55%,32% 15%,54% 62%,76% 7%,100% 39%,100% 100%); }
.preset-mini-canvas[data-kind="classic"] { background: #25323b; border-color: rgba(216,189,134,.55); }
.preset-mini-canvas[data-kind="classic"]::before { top: 20%; height: 2px; background: #94a5ae; }
.preset-mini-canvas[data-kind="classic"]::after { height: 14%; background: #617b7a; }
.preset-card-main { position: relative; z-index: 1; display: flex; align-items: baseline; justify-content: space-between; gap: 5px; }
.preset-card-main strong { overflow: hidden; color: var(--text); font-size: 10px; font-weight: 670; letter-spacing: -.015em; text-overflow: ellipsis; white-space: nowrap; }
.preset-card-arrow { flex-shrink: 0; color: #73848f; font-size: 13px; line-height: 1; transition: transform .16s ease, color .16s ease; }
.preset-card:hover .preset-card-arrow { color: var(--accent); transform: translate(2px,-2px); }
.preset-card-meta { position: relative; z-index: 1; display: block; margin-top: 3px; overflow: hidden; color: var(--muted); font-family: var(--mono); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.preset-card.selected { border-color: rgba(124,224,211,.42); box-shadow: 0 0 0 1px rgba(124,224,211,.08) inset; }
.preset-card.selected::before { content: "✓"; position: absolute; z-index: 2; top: 7px; right: 7px; display: grid; width: 17px; height: 17px; place-items: center; border-radius: 5px; background: var(--accent); color: var(--accent-ink); font-size: 10px; font-weight: 800; }
.field-error { margin: 8px 0 0; color: var(--danger); font-size: 10px; }
.export-resource-note.is-error { color: var(--danger); }

/* Compact, keyboard-operable dropdowns; the source <select> remains synchronized for app state. */
.custom-select-shell { position: relative; display: block; width: 100%; min-width: 0; }
select.custom-select-native { position: absolute !important; z-index: -1; width: 1px !important; height: 1px !important; min-width: 1px !important; margin: -1px !important; padding: 0 !important; overflow: hidden !important; border: 0 !important; clip: rect(0, 0, 0, 0) !important; clip-path: inset(50%) !important; white-space: nowrap !important; pointer-events: none !important; }
.custom-select-trigger { display: flex; align-items: center; justify-content: space-between; gap: 9px; width: 100%; min-width: 0; height: 37px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 7px; background: #0f151d; color: var(--text); font-size: 11px; font-weight: 550; text-align: left; transition: border-color .15s ease, background .15s ease, box-shadow .15s ease; }
.custom-select-trigger:hover:not(:disabled), .custom-select-shell.is-open .custom-select-trigger { border-color: rgba(124,224,211,.45); background: #111b24; }
.custom-select-trigger:focus-visible { outline: none; box-shadow: var(--focus); }
.custom-select-value { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.custom-select-caret { display: inline-grid; flex: 0 0 auto; width: 17px; height: 17px; place-items: center; color: #91a4b1; font-size: 16px; line-height: 1; transition: transform .15s ease, color .15s ease; }
.custom-select-shell.is-open .custom-select-caret { color: var(--accent); transform: rotate(180deg); }
.custom-select-popup { position: absolute; z-index: 130; top: calc(100% + 5px); left: 0; right: 0; max-height: 226px; overflow-y: auto; overscroll-behavior: contain; padding: 4px; border: 1px solid rgba(130,154,171,.31); border-radius: 8px; background: #121a24; box-shadow: 0 15px 32px rgba(0,0,0,.44), 0 1px 0 rgba(255,255,255,.035) inset; }
.custom-select-popup:focus { outline: none; box-shadow: var(--focus), 0 15px 32px rgba(0,0,0,.44); }
.custom-select-option { display: flex; align-items: center; width: 100%; min-height: 31px; padding: 6px 9px; border: 1px solid transparent; border-radius: 5px; background: transparent; color: #c4d0d9; font-size: 10px; font-weight: 520; line-height: 1.4; text-align: left; cursor: pointer; }
.custom-select-option::after { content: ""; width: 13px; height: 13px; flex: 0 0 auto; margin-left: auto; border-radius: 4px; }
.custom-select-option.is-selected { background: rgba(124,224,211,.075); color: #a7eee5; }
.custom-select-option.is-selected::after { content: "✓"; display: grid; place-items: center; border: 1px solid rgba(124,224,211,.28); background: rgba(124,224,211,.12); color: var(--accent); font-size: 9px; }
.custom-select-option.is-active { border-color: rgba(124,224,211,.22); background: rgba(124,224,211,.09); color: #e8faf7; }
.custom-select-option.is-disabled { color: #62717d; cursor: not-allowed; opacity: .5; }
@media (max-width: 480px) { .custom-select-popup { max-height: 200px; } .custom-select-trigger { height: 39px; } }

/* Explicit sample action for users who want to test the workspace without a personal file. */
.sample-photo-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; margin: 8px 1px 0; }
.sample-photo-row > span { color: var(--muted); font-size: 8px; font-weight: 750; letter-spacing: .09em; }
.sample-photo-button { display: inline-flex; align-items: center; gap: 7px; min-height: 28px; padding: 3px 0; border: 0; background: transparent; color: var(--accent); font-size: 10px; font-weight: 650; text-align: left; }
.sample-photo-button:hover { color: #b6fff4; text-decoration: underline; text-underline-offset: 3px; }
.sample-photo-button[hidden] { display: none !important; }

/* Status messages must not resize the artboard when they appear/disappear. */
.stage-panel > .status-message { position: absolute; z-index: 24; top: 54px; left: auto; right: 12px; width: min(440px, calc(100% - 24px)); max-width: calc(100% - 24px); margin: 0; box-shadow: 0 8px 24px rgba(0,0,0,.35); backdrop-filter: blur(10px); pointer-events: none; }
@media (max-width: 760px) { .stage-panel > .status-message { top: 49px; right: 8px; width: min(360px, calc(100% - 16px)); } }
.sample-photo-row[hidden] { display: none !important; }
