:root {
    --bg: #090909;
    --panel: rgba(8, 17, 18, 0.9);
    --line: rgba(112, 255, 233, 0.18);
    --text: #d8fff7;
    --muted: #8eb5b0;
    --accent: #78ffd4;
    --danger: #ff8a8a;
    --success: #b8ff9b;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Courier New", monospace;
    color: var(--text);
    background:
        radial-gradient(circle at top, rgba(50, 110, 115, 0.35), transparent 45%),
        linear-gradient(180deg, #050505 0%, #0a1011 100%);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: repeating-linear-gradient(
        180deg,
        transparent 0,
        transparent 3px,
        rgba(120, 255, 212, 0.03) 4px
    );
    pointer-events: none;
}

.shell {
    width: min(900px, calc(100vw - 2rem));
    margin: 0 auto;
    padding: 2rem 0 3rem;
}

.panel {
    margin-bottom: 1rem;
    padding: 1.25rem;
    background: var(--panel);
    border: 1px solid var(--line);
    box-shadow: 0 0 0 1px rgba(120, 255, 212, 0.05) inset;
}

.hero {
    padding-top: 1.75rem;
}

.eyebrow {
    margin: 0 0 0.5rem;
    color: var(--accent);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-size: 0.72rem;
}

h1, h2, p {
    margin-top: 0;
}

.lede,
.hint {
    color: var(--muted);
}

.stack {
    display: grid;
    gap: 1rem;
}

.compact {
    max-width: 340px;
}

label span {
    display: block;
    margin-bottom: 0.45rem;
}

input,
textarea,
button {
    width: 100%;
    border: 1px solid rgba(120, 255, 212, 0.25);
    background: rgba(0, 0, 0, 0.35);
    color: var(--text);
    padding: 0.85rem 0.9rem;
    font: inherit;
}

textarea {
    resize: vertical;
}

button,
.nav-row a {
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

button {
    cursor: pointer;
    background: linear-gradient(180deg, rgba(120, 255, 212, 0.18), rgba(120, 255, 212, 0.08));
}

.ghost {
    background: transparent;
}

.actions,
.nav-row {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.nav-row a {
    color: var(--accent);
    text-decoration: none;
}

.status {
    margin: 0;
    padding: 0.9rem;
    border: 1px solid var(--line);
}

.error {
    color: var(--danger);
}

.success {
    color: var(--success);
}

.graphql-note {
    overflow-x: auto;
    padding: 1rem;
    border: 1px solid var(--line);
    color: var(--muted);
}

.list-item {
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding: 0.9rem 0;
    border-top: 1px solid rgba(120, 255, 212, 0.1);
}

.list-item a {
    color: var(--accent);
}

.preview-card {
    display: grid;
    grid-template-columns: minmax(220px, 280px) 1fr;
    gap: 1.25rem;
    align-items: center;
    margin-bottom: 1rem;
    padding: 1rem;
    border: 1px solid rgba(120, 255, 212, 0.12);
    background:
        radial-gradient(circle at top right, rgba(120, 255, 212, 0.08), transparent 35%),
        linear-gradient(180deg, rgba(6, 10, 10, 0.95), rgba(10, 18, 18, 0.9));
}

.review-mode {
    margin-bottom: 0;
}

.preview-copy h3 {
    margin: 0 0 0.5rem;
}

.portrait-shell {
    position: relative;
    aspect-ratio: 4 / 5;
    padding: 10px;
    border: 1px solid rgba(120, 255, 212, 0.18);
    background: linear-gradient(180deg, rgba(8, 16, 17, 0.95), rgba(2, 4, 5, 0.98));
    box-shadow:
        inset 0 0 0 1px rgba(120, 255, 212, 0.06),
        0 0 30px rgba(0, 0, 0, 0.25);
}

.portrait-screen {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    padding: 14px;
    background: #f6f6f6;
}

.avatar-card {
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-rows: 1fr auto;
    background: #ffffff;
    border: 1px solid #d7d7d7;
    box-shadow: 0 16px 28px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.avatar-stage {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at top, rgba(225, 225, 225, 0.8), transparent 28%),
        linear-gradient(180deg, #ffffff 0%, #efefef 100%);
}

.avatar-shadow {
    position: absolute;
    left: 50%;
    bottom: 13%;
    width: 42%;
    height: 8%;
    background: rgba(0, 0, 0, 0.09);
    border-radius: 50%;
    transform: translateX(-50%);
    filter: blur(6px);
}

.avatar-body {
    position: absolute;
    left: 50%;
    bottom: 12%;
    width: 48%;
    height: 74%;
    transform: translateX(-50%);
}

.skin-region,
.hair-region,
.eye-region,
.mouth-region,
.shirt-region,
.jacket-region,
.accent-region {
    position: absolute;
}

.avatar-head {
    left: 50%;
    top: 25%;
    width: 40%;
    height: 25%;
    background: #f3d2c2;
    border-radius: 44% 44% 48% 48%;
    transform: translateX(-50%);
    z-index: 4;
}

.avatar-hair {
    left: -6%;
    top: -7%;
    width: 112%;
    height: 56%;
    background: #2f2929;
    border-radius: 42% 42% 22% 22%;
}

.avatar-eye {
    top: 44%;
    width: 12%;
    height: 6%;
    background: #333333;
    border-radius: 999px;
    z-index: 5;
}

.eye-left {
    left: 26%;
}

.eye-right {
    right: 26%;
}

.avatar-mouth {
    left: 50%;
    bottom: 18%;
    width: 16%;
    height: 3%;
    background: #8b5f5f;
    border-radius: 999px;
    transform: translateX(-50%);
}

.avatar-neck {
    left: 50%;
    top: 46%;
    width: 12%;
    height: 9%;
    background: #f3d2c2;
    transform: translateX(-50%);
    z-index: 3;
}

.avatar-jacket {
    left: 50%;
    bottom: 0;
    width: 76%;
    height: 46%;
    background: #27314c;
    clip-path: polygon(16% 0, 36% 0, 50% 18%, 64% 0, 84% 0, 100% 100%, 0 100%);
    transform: translateX(-50%);
    z-index: 1;
}

.avatar-shirt {
    left: 50%;
    bottom: 0;
    width: 30%;
    height: 42%;
    background: #ffffff;
    clip-path: polygon(20% 0, 80% 0, 100% 100%, 0 100%);
    transform: translateX(-50%);
    z-index: 2;
}

.avatar-tie {
    left: 50%;
    top: 57%;
    width: 10%;
    height: 22%;
    background: #159685;
    clip-path: polygon(26% 0, 74% 0, 100% 18%, 50% 100%, 0 18%);
    transform: translateX(-50%);
    z-index: 4;
}

.card-caption {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.85rem 0.95rem;
    border-top: 1px solid #e2e2e2;
    background: #fafafa;
    color: #1d1d1d;
}

.caption-label {
    color: #7a7a7a;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.caption-name {
    font-size: 0.95rem;
    letter-spacing: 0.06em;
}

.signal-grid {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, transparent 49%, rgba(0, 0, 0, 0.04) 50%, transparent 51%),
        linear-gradient(transparent 49%, rgba(0, 0, 0, 0.03) 50%, transparent 51%);
    background-size: 28px 28px;
    opacity: 0.16;
    pointer-events: none;
}

.review-notes {
    margin: 1rem 0 0;
    padding-left: 1rem;
    color: #4e4e4e;
    display: grid;
    gap: 0.35rem;
}

.review-note {
    font-size: 0.82rem;
    list-style: none;
    position: relative;
    padding: 0.45rem 0.65rem;
    border: 1px solid rgba(21, 150, 133, 0.12);
    border-radius: 0.35rem;
    background: rgba(255, 255, 255, 0.03);
}

.proofing-state {
    border-color: rgba(120, 255, 212, 0.18);
    background: rgba(120, 255, 212, 0.05);
}

.palette-state {
    border-color: rgba(118, 179, 255, 0.18);
    background: rgba(118, 179, 255, 0.05);
}

.subject-state {
    border-color: rgba(255, 214, 102, 0.18);
    background: rgba(255, 214, 102, 0.05);
}

.crop-state {
    border-color: rgba(199, 153, 255, 0.18);
    background: rgba(199, 153, 255, 0.05);
}

.lighting-state {
    border-color: rgba(255, 182, 119, 0.18);
    background: rgba(255, 182, 119, 0.05);
}

.contrast-state {
    border-color: rgba(255, 133, 170, 0.18);
    background: rgba(255, 133, 170, 0.05);
}

.wardrobe-state {
    border-color: rgba(145, 214, 122, 0.18);
    background: rgba(145, 214, 122, 0.05);
}

.delivery-state {
    border-color: rgba(102, 205, 255, 0.18);
    background: rgba(102, 205, 255, 0.05);
}

.archive-state {
    border-color: rgba(190, 190, 190, 0.18);
    background: rgba(190, 190, 190, 0.05);
}

.release-state {
    border-color: rgba(255, 160, 122, 0.18);
    background: rgba(255, 160, 122, 0.05);
}

@media (max-width: 640px) {
    .shell {
        width: min(100vw - 1rem, 900px);
    }

    .preview-card {
        grid-template-columns: 1fr;
    }

    .list-item {
        flex-direction: column;
        gap: 0.35rem;
    }
}
