* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    margin: 0 auto;
    padding: 1rem;
    position: relative;
    z-index: 1;
}

@media (min-width: 600px) {
    .container { padding: 2rem 4vw; }
}

/* Old header rules replaced by .site-header in the nav section below */

main {
    background-color: white;
    background-image: url('/static/noise.png');
    background-blend-mode: overlay;
    border-radius: 1rem;
    padding: 1.25rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

@media (min-width: 600px) {
    main { padding: 2rem; max-width: 860px; margin: 0 auto; }
}

.upload-area {
    border: 3px dashed #d6bcfa;
    border-radius: 1rem;
    padding: 2rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #faf5ff 0%, #f0e6ff 100%);
}

@media (min-width: 600px) {
    .upload-area { padding: 3rem; }
}

.upload-area:hover {
    border-color: #9f7aea;
    background: linear-gradient(135deg, #f0e6ff 0%, #e9d8fd 100%);
    transform: scale(1.01);
}

.upload-area.dragover {
    border-color: #805ad5;
    background: #e9d8fd;
}

.upload-egg-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    animation: egg-float 3s ease-in-out infinite;
}

@keyframes egg-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.upload-text {
    font-size: 1.3rem;
    font-weight: 700;
    color: #553c9a;
    margin-bottom: 0.25rem;
}

.upload-hint {
    color: #805ad5;
    font-size: 0.9rem;
}

/* Camera capture button (mobile) */
.btn-camera {
    display: none; /* hidden on desktop — shown via media query on touch devices */
    margin: 0.75rem auto 0;
    padding: 0.6rem 1.5rem;
    background: white;
    border: 2px solid #d6bcfa;
    border-radius: 2rem;
    font-size: 1rem;
    font-weight: 600;
    color: #553c9a;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-camera:hover {
    border-color: #9f7aea;
    background: #faf5ff;
}

@media (pointer: coarse) {
    .btn-camera { display: inline-block; }
}

/* Demo button — prominent and inviting */
.demo-btn-wrapper {
    text-align: center;
    margin-top: 1.25rem;
}

.btn-demo-big {
    display: inline-block;
    padding: 0.85rem 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-demo-big:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.btn-demo-big:active {
    transform: translateY(0);
}

.demo-hint {
    color: #a0aec0;
    font-size: 0.8rem;
    margin-top: 0.4rem;
}

.btn-back-spielwiese {
    margin: 0.75rem auto 0;
    padding: 0.5rem 1.5rem;
    background: none;
    border: none;
    color: #667eea;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.btn-back-spielwiese:hover { color: #764ba2; }

[hidden] {
    display: none !important;
}

/* .btn-demo — replaced by .btn-demo-big (landing page polish, 2026-03-31) */

/* Paint toolbar */
.paint-toolbar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    flex-wrap: wrap;
}

.white-print-note {
    text-align: center;
    background: #f0f4ff;
    color: #4a5568;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.6rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid #d6e0ff;
    margin: 0.5rem 0;
}

.paint-hint {
    text-align: center;
    color: #667eea;
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0.25rem 0;
    animation: paint-hint-pulse 1.5s ease-in-out infinite;
}

@keyframes paint-hint-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.paint-colors {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
}

.paint-color-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 3px solid rgba(0,0,0,0.12);
    cursor: pointer;
    padding: 0;
    transition: border-color 0.15s, transform 0.15s;
}

.paint-color-btn.active {
    border-color: #333;
    transform: scale(1.15);
}

.paint-color-btn:hover {
    transform: scale(1.1);
}

.paint-controls {
    display: flex;
    gap: 6px;
    align-items: center;
}

.paint-mode-btn,
.paint-control-btn {
    width: 40px;
    height: 40px;
    border-radius: 0.5rem;
    border: 2px solid #cbd5e0;
    background: white;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.paint-mode-btn.active {
    border-color: #667eea;
    background: #edf2f7;
}

.brush-size-btn {
    width: 40px;
    height: 40px;
    border-radius: 0.5rem;
    border: 2px solid #cbd5e0;
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.brush-size-btn.active {
    border-color: #667eea;
    background: #edf2f7;
}

.brush-dot {
    display: block;
    border-radius: 50%;
    background: #333;
}

.paint-mode-btn:hover,
.paint-control-btn:hover,
.brush-size-btn:hover {
    border-color: #667eea;
}

@media (min-width: 600px) {
    .paint-color-btn { width: 36px; height: 36px; }
}

/* Fullscreen painting mode */
/* Paint mode cursor — always visible crosshair */
.viewer-container.paint-active,
.viewer-container.paint-active canvas {
    cursor: crosshair !important;
}

body.fullscreen-paint {
    overflow: hidden;
}

body.fullscreen-paint .container {
    padding: 0;
}

body.fullscreen-paint header,
body.fullscreen-paint footer,
body.fullscreen-paint .info-section,
body.fullscreen-paint .white-print-note,
body.fullscreen-paint .actions,
body.fullscreen-paint .paint-hint,
body.fullscreen-paint .btn-back-spielwiese {
    display: none !important;
}

body.fullscreen-paint main {
    padding: 0;
    border-radius: 0;
    box-shadow: none;
}

body.fullscreen-paint .viewer-container {
    position: fixed;
    inset: 0;
    z-index: 9999;
    max-height: none;
    aspect-ratio: auto;
    border-radius: 0;
    margin: 0;
}

.paint-toolbar-fullscreen {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10001;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 0.5rem 0.75rem;
    padding-bottom: max(0.5rem, env(safe-area-inset-bottom));
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.1);
}

.fullscreen-paint-exit {
    position: fixed;
    top: max(0.75rem, env(safe-area-inset-top));
    right: 0.75rem;
    z-index: 10002;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    font-size: 1.3rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.preview-section {
    text-align: center;
}

.preview-section img {
    max-width: 100%;
    max-height: 400px;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.preview-info {
    margin-bottom: 1.5rem;
}

.preview-info p {
    color: #718096;
    font-size: 0.9rem;
}

.upload-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1rem;
}

.upload-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #e2e8f0;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: upload-spin 0.8s linear infinite;
}

@keyframes upload-spin {
    to { transform: rotate(360deg); }
}

.upload-loading-text {
    color: #4a5568;
    font-size: 0.95rem;
    margin: 0;
}

.btn-primary, .btn-secondary {
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #48bb78;
    color: white;
}

.btn-secondary:hover {
    background: #38a169;
}

/* === Transform preview (Play two-stage: drawing → AI transform → confirm → 3D) === */
.transform-preview {
    text-align: center;
    padding: 1rem;
}
.transform-title {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}
.transform-hint {
    color: #718096;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}
.transform-compare {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.transform-side {
    flex: 1;
    max-width: 260px;
}
.transform-side img {
    width: 100%;
    max-height: 280px;
    object-fit: contain;
    border-radius: 0.75rem;
    border: 2px solid #e2e8f0;
    background: #f7fafc;
}
.transform-label {
    font-size: 0.8rem;
    color: #718096;
    margin-bottom: 0.25rem;
    font-weight: 600;
}
.transform-arrow {
    font-size: 1.5rem;
    color: #a0aec0;
    flex-shrink: 0;
}
.transform-loading {
    padding: 2rem 0;
}
.transform-loading p {
    margin-top: 0.75rem;
    color: #4a5568;
}
.transform-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}
.transform-actions .btn-outline {
    background: transparent;
    border: 2px solid #667eea;
    color: #667eea;
    padding: 0.6rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
}

/* === My Orders screen === */
.my-orders-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}
.my-orders-header h2 {
    font-size: 1.25rem;
    color: #2d3748;
}
.my-orders-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.my-orders-loading {
    text-align: center;
    color: #718096;
    padding: 2rem 0;
}
.my-orders-empty {
    text-align: center;
    color: #718096;
    padding: 2rem 0;
}
.my-order-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background: #f7fafc;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
}
.my-order-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 0.5rem;
    background: #e2e8f0;
    flex-shrink: 0;
}
.my-order-info {
    flex: 1;
    min-width: 0;
}
.my-order-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: #2d3748;
}
.my-order-meta {
    font-size: 0.8rem;
    color: #718096;
    margin-top: 0.15rem;
}
.my-order-status {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 1rem;
    white-space: nowrap;
    flex-shrink: 0;
}
.my-order-status[data-status="new"] { background: #fed7d7; color: #c53030; }
.my-order-status[data-status="qa"] { background: #bee3f8; color: #2b6cb0; }
.my-order-status[data-status="rework"] { background: #feebc8; color: #c05621; }
.my-order-status[data-status="printing"] { background: #fefcbf; color: #975a16; }
.my-order-status[data-status="done"] { background: #c6f6d5; color: #276749; }
.my-order-status[data-status="rejected"] { background: #e2e8f0; color: #4a5568; }

.status-section {
    text-align: center;
    padding: 1.5rem;
}

/* === Egg hatching animation === */
.egg-scene {
    position: relative;
    width: 200px;
    height: 280px;
    margin: 0 auto 1rem;
}

.egg-drawing {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0.15;
    filter: blur(2px);
    z-index: 0;
}

.egg-container {
    position: relative;
    width: 200px;
    height: 260px;
    cursor: pointer;
    z-index: 1;
    animation: egg-idle 2.5s ease-in-out infinite;
    -webkit-tap-highlight-color: transparent;
}

.egg-svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 8px 20px rgba(0,0,0,0.12));
}

.egg-shell {
    transition: fill 0.5s ease;
}

/* Idle wobble — gentle rocking */
@keyframes egg-idle {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(1.5deg); }
    75% { transform: rotate(-1.5deg); }
}

/* Error section — friendly failure UI */
.error-section {
    text-align: center;
    padding: 2rem 1rem;
}

.error-icon {
    font-size: 3rem;
    margin-bottom: 0.75rem;
}

.error-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #553c9a;
    margin-bottom: 0.5rem;
}

.error-message {
    color: #718096;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    line-height: 1.4;
}

/* Tap wobble — vigorous shake */
.egg-container.egg-wobble {
    animation: egg-tap-wobble 0.4s ease-in-out;
}

@keyframes egg-tap-wobble {
    0% { transform: rotate(0deg) scale(1); }
    15% { transform: rotate(-8deg) scale(1.03); }
    30% { transform: rotate(6deg) scale(1.02); }
    45% { transform: rotate(-5deg) scale(1.01); }
    60% { transform: rotate(4deg) scale(1); }
    75% { transform: rotate(-2deg); }
    100% { transform: rotate(0deg); }
}

/* Stage 2+: more intense idle */
.egg-container.egg-stage-2 {
    animation: egg-active 1.8s ease-in-out infinite;
}

@keyframes egg-active {
    0%, 100% { transform: rotate(0deg); }
    20% { transform: rotate(3deg); }
    40% { transform: rotate(-2.5deg); }
    60% { transform: rotate(2deg); }
    80% { transform: rotate(-1.5deg); }
}

/* Stage 3: intense wobble + shell color shift */
.egg-container.egg-stage-3 {
    animation: egg-intense 1.2s ease-in-out infinite;
}

@keyframes egg-intense {
    0%, 100% { transform: rotate(0deg) scale(1); }
    15% { transform: rotate(4deg) scale(1.01); }
    35% { transform: rotate(-3.5deg) scale(1.02); }
    55% { transform: rotate(3deg) scale(1.01); }
    75% { transform: rotate(-2deg); }
}

.egg-container.egg-stage-3 .egg-shell {
    fill: #FFF0CC;
}

.egg-container.egg-stage-3 .egg-glow {
    stroke-width: 6px;
    opacity: 0.4;
    animation: egg-glow-pulse 1s ease-in-out infinite;
}

@keyframes egg-glow-pulse {
    0%, 100% { opacity: 0.2; stroke-width: 4px; }
    50% { opacity: 0.6; stroke-width: 8px; }
}

/* Crack line reveal animation */
.egg-cracks path {
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    animation: crack-draw 0.5s ease-out forwards;
}

@keyframes crack-draw {
    to { stroke-dashoffset: 0; }
}

/* Tap hint */
.egg-tap-hint {
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.9rem;
    color: #8B7355;
    animation: hint-bounce 1.5s ease-in-out infinite;
    white-space: nowrap;
}

@keyframes hint-bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-5px); }
}

/* Status text styling */
.egg-status-text {
    color: #8B7355;
    font-size: 1.15rem;
    font-weight: 500;
    margin-top: 0.5rem;
}

#progressText {
    color: #B8860B;
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 0.25rem;
}

/* Prompt input section */
.prompt-section {
    margin: 1rem 0;
    text-align: center;
}

.prompt-label {
    font-size: 1rem;
    font-weight: 600;
    color: #553c9a;
    margin-bottom: 0.5rem;
}

.flow-back-btn {
    display: block;
    margin: 0 0 0.75rem 0;
    padding: 0.4rem 0;
    background: transparent;
    border: none;
    color: #667eea;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
}

.flow-back-btn:hover { color: #4c51bf; }

.prompt-section.prompt-collapsed { display: none; }

.prompt-toggle {
    display: block;
    margin: 0.75rem auto;
    padding: 0.4rem 0.9rem;
    background: transparent;
    border: none;
    color: #718096;
    font-size: 0.85rem;
    cursor: pointer;
    text-decoration: underline;
}

.prompt-toggle:hover { color: #4a5568; }

.prompt-input-row {
    display: flex;
    gap: 0.5rem;
    max-width: 400px;
    margin: 0 auto;
}

.prompt-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid #d6bcfa;
    border-radius: 0.75rem;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.prompt-input:focus {
    outline: none;
    border-color: #9f7aea;
}

.btn-voice {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid #d6bcfa;
    background: white;
    font-size: 1.3rem;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-voice:hover {
    border-color: #9f7aea;
    background: #faf5ff;
}

.btn-voice.recording {
    border-color: #e53e3e;
    background: #fff5f5;
    animation: voice-pulse 1s ease-in-out infinite;
}

@keyframes voice-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(229, 62, 62, 0.3); }
    50% { box-shadow: 0 0 0 8px rgba(229, 62, 62, 0); }
}

.prompt-tts-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 0.5rem;
}

.btn-tts {
    padding: 0.4rem 0.8rem;
    border: 1px solid #d6bcfa;
    border-radius: 2rem;
    background: white;
    font-size: 0.9rem;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.btn-tts:hover {
    border-color: #9f7aea;
    background: #faf5ff;
}

.prompt-tts-text {
    font-size: 0.85rem;
    color: #553c9a;
    font-style: italic;
}

.prompt-hint {
    font-size: 0.8rem;
    color: #a0aec0;
    margin-top: 0.4rem;
}

.convert-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

.convert-controls select {
    padding: 0.75rem 1rem;
    border: 2px solid #cbd5e0;
    border-radius: 0.5rem;
    font-size: 1rem;
    background: white;
    cursor: pointer;
}

a.btn-primary {
    display: inline-block;
    text-decoration: none;
}

.result-section {
    text-align: center;
}

.result-section h2 {
    color: #48bb78;
    margin-bottom: 2rem;
}

.viewer-container {
    aspect-ratio: 1 / 1;
    max-height: 70vh;
    margin: 0 auto 1.5rem;
    background: #f0f0f0;
    border-radius: 0.5rem;
    position: relative;
    overflow: hidden;
}

@media (min-width: 600px) {
    .viewer-container { aspect-ratio: 4 / 3; max-height: 70vh; }
}

.viewer-container.enlarged {
    position: fixed;
    inset: 0;
    z-index: 9999;
    max-height: none;
    aspect-ratio: auto;
    border-radius: 0;
    margin: 0;
}

.viewer-drawing-inset {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    width: 140px;
    max-height: 180px;
    object-fit: contain;
    border-radius: 0.5rem;
    border: 2px solid rgba(255,255,255,0.8);
    box-shadow: 0 2px 12px rgba(0,0,0,0.3);
    pointer-events: none;
    z-index: 10000;
}

@media (max-width: 599px) {
    .viewer-drawing-inset { display: none; }
    .viewer-container.enlarged .viewer-drawing-inset { display: block; }
}

.color-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.color-label {
    font-size: 0.9rem;
    color: #718096;
    font-weight: 600;
}

.color-select {
    padding: 0.2rem 0.4rem;
    border: 2px solid #cbd5e0;
    border-radius: 0.35rem;
    font-size: 0.9rem;
    font-weight: 600;
    background: white;
    cursor: pointer;
    color: #2d3748;
}

.color-select:focus {
    outline: none;
    border-color: #667eea;
}

.color-swatches {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.color-swatch {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid rgba(0, 0, 0, 0.15);
    display: inline-block;
}

.viewer-inset {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    width: 140px;
    height: 140px;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    border: 2px solid rgba(255, 255, 255, 0.8);
    z-index: 2;
}

.viewer-inset canvas {
    display: block;
}

.viewer-inset-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    text-align: center;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.15rem 0;
}

.viewer-loading {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(240, 240, 240, 0.9);
    z-index: 1;
}

.viewer-loading p {
    color: #718096;
    margin-top: 1rem;
}

.viewer-reveal-drawing {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
    opacity: 1;
    transition: opacity 0.5s ease-out;
}

.viewer-reveal-drawing.fading {
    opacity: 0;
}

.viewer-reveal-drawing img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 0.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.viewer-reveal-text {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.viewer-reveal-text.visible {
    opacity: 1;
}

.viewer-reveal-text.fading {
    opacity: 0;
    transition: opacity 0.5s ease-out;
}

.viewer-reveal-text p {
    color: #667eea;
    font-size: 1.25rem;
    font-weight: 600;
    text-align: center;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 0.75rem;
    animation: reveal-pulse 1.5s ease-in-out infinite;
}

@keyframes reveal-pulse {
    0%, 100% { opacity: 0.7; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.03); }
}

.viewer-container canvas {
    opacity: 0;
    transition: opacity 0.5s ease-in;
}

.viewer-container.revealed canvas {
    opacity: 1;
}

.viewer-error {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f7fafc;
    padding: 2rem;
    text-align: center;
    gap: 0.5rem;
}

.viewer-error-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.viewer-error h3 {
    margin: 0;
    color: #4a5568;
    font-size: 1.2rem;
}

.viewer-error p {
    margin: 0;
    color: #718096;
    font-size: 0.95rem;
}

.viewer-error-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.actions .btn-primary,
.actions .btn-secondary {
    width: 100%;
    text-align: center;
}

@media (min-width: 600px) {
    .actions {
        flex-direction: row;
        justify-content: center;
    }
    .actions .btn-primary,
    .actions .btn-secondary {
        width: auto;
    }
}

.info-section {
    margin-top: 2rem;
    padding: 1.25rem;
    background: #f7fafc;
    border-radius: 1rem;
}

@media (min-width: 600px) {
    .info-section { margin-top: 3rem; padding: 2rem; }
}

.info-section h3 {
    margin-bottom: 1rem;
    color: #553c9a;
    text-align: center;
    font-size: 1.1rem;
}

.steps {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.35rem;
    padding: 0.5rem;
    min-width: 75px;
}

.step-icon {
    font-size: 1.8rem;
}

.step-text {
    font-size: 0.75rem;
    color: #4a5568;
    line-height: 1.2;
    max-width: 80px;
}

.step-arrow {
    color: #d6bcfa;
    font-size: 1.2rem;
    font-weight: bold;
    margin: 0 -0.25rem;
}

@media (max-width: 400px) {
    .step-arrow { display: none; }
    .steps { gap: 0.1rem; }
    .step { min-width: 65px; padding: 0.25rem; }
}

/* Order form */
.order-section {
    text-align: center;
}

.order-section h2 {
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.order-subtitle {
    color: #718096;
    margin-bottom: 1.5rem;
}

.order-form {
    max-width: 400px;
    margin: 0 auto;
    text-align: left;
}

.order-form label {
    display: block;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.order-form input[type="text"],
.order-form input[type="email"] {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #cbd5e0;
    border-radius: 0.5rem;
    font-size: 1rem;
    margin-bottom: 1.5rem;
    transition: border-color 0.2s;
}

.order-form input[type="text"]:focus,
.order-form input[type="email"]:focus {
    outline: none;
    border-color: #667eea;
}

.order-sizes {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.order-size-option {
    flex: 1;
    cursor: pointer;
}

.order-size-option input[type="radio"] {
    display: none;
}

.order-size-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    padding: 0.75rem 0.5rem;
    border: 2px solid #e2e8f0;
    border-radius: 0.75rem;
    transition: border-color 0.15s, background 0.15s;
    text-align: center;
}

.order-size-option input:checked + .order-size-card {
    border-color: #667eea;
    background: #ebf4ff;
}

.order-size-dim {
    font-size: 0.8rem;
    color: #718096;
}

.order-size-price {
    font-size: 0.85rem;
    font-weight: 600;
    color: #2d3748;
}

.order-size-price s {
    color: #a0aec0;
    font-weight: 400;
    margin-right: 0.25rem;
}

.order-color-hint {
    font-size: 0.8rem;
    color: #667eea;
    text-align: center;
    margin-bottom: 0.75rem;
    font-style: italic;
}

.order-form-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

.btn-outline {
    padding: 0.75rem 2rem;
    border: 2px solid #cbd5e0;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    background: white;
    color: #718096;
    transition: all 0.2s;
}

.btn-outline:hover {
    border-color: #667eea;
    color: #667eea;
}

/* Confirmation */
.confirmation-section {
    text-align: center;
    padding: 2rem 0;
}

.confirmation-section h2 {
    color: #48bb78;
    margin-bottom: 1rem;
}

.confirmation-text {
    font-size: 1.1rem;
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.confirmation-detail {
    color: #718096;
    margin-bottom: 2rem;
}

/* Magic link box on confirmation */
.magic-link-box {
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.magic-link-box p {
    color: #718096;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.magic-link-box a {
    color: #667eea;
    word-break: break-all;
    font-size: 0.9rem;
}

/* Status page */
.status-page {
    text-align: left;
}

.status-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.status-header h2 {
    color: #2d3748;
    margin: 0;
}

.status-badge {
    display: inline-block;
    padding: 0.35rem 1rem;
    border-radius: 999px;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
}

.status-details {
    margin-bottom: 1.5rem;
    color: #4a5568;
}

.status-details p {
    margin-bottom: 0.25rem;
}

.status-drawing {
    margin-bottom: 1.5rem;
    text-align: center;
}

.status-drawing h3,
.status-model h3 {
    color: #2d3748;
    margin-bottom: 0.75rem;
}

.status-drawing img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.status-loading,
.status-error {
    text-align: center;
    padding: 3rem 1rem;
}

.status-error h2 {
    color: #e53e3e;
    margin-bottom: 0.5rem;
}

.status-error p {
    color: #718096;
    margin-bottom: 1.5rem;
}

/* Crop step */
.crop-section {
    text-align: center;
}

.crop-section h2 {
    color: #2d3748;
    margin-bottom: 1rem;
}

.cropper-container {
    margin: 0 auto 1rem;
    max-width: 600px;
}

.cropper-wrap {
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
    text-align: center;
}

.cropper-stage {
    position: relative;
    display: inline-block;
    max-width: 100%;
}

.cropper-img {
    display: block;
    max-width: 100%;
    max-height: 60vh;
    border-radius: 0.5rem;
}

.cropper-canvas {
    position: absolute;
    top: 0;
    left: 0;
    border-radius: 0.5rem;
    cursor: crosshair;
}

.cropper-tip {
    background: #fffaf0;
    border: 1px solid #feebc8;
    color: #744210;
    font-size: 0.95rem;
    line-height: 1.4;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    margin-bottom: 0.75rem;
    text-align: left;
}
.cropper-tip b { color: #7b341e; }

.cropper-hint {
    color: #718096;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.cropper-prompt {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin: 0.25rem 0 0.25rem;
    text-align: left;
}

.cropper-prompt-label {
    font-size: 0.9rem;
    color: #4a5568;
    font-weight: 500;
}

.cropper-prompt-input {
    padding: 0.6rem 0.75rem;
    border: 1px solid #cbd5e0;
    border-radius: 0.4rem;
    font-size: 1rem;
    font-family: inherit;
    background: white;
    width: 100%;
}

.cropper-prompt-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.cropper-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    margin-top: 1rem;
}

.cropper-secondary-row {
    display: flex;
    justify-content: center;
    margin-top: 0.25rem;
}

/* Violet button that visually matches the crop frame stroke (#667eea). Signals
   "this button operates on the frame". Paired with a green btn-secondary for
   "skip crop, use whole image". See CLAUDE.md → UX audit gate. */
.btn-crop {
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transition: all 0.2s;
}
.btn-crop:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.cropped-preview {
    text-align: center;
}

.cropped-preview img {
    max-width: 100%;
    max-height: 400px;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

footer {
    text-align: center;
    color: white;
    margin-top: 1.5rem;
    opacity: 0.8;
    font-size: 0.85rem;
}

/* Site-wide footer with legal links */
.site-footer {
    margin-top: 1.5rem;
    padding: 1rem 0 0.75rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.75rem;
}

.site-footer-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.5rem 1.5rem;
}

.site-footer-copy {
    white-space: nowrap;
}

.site-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 0.75rem;
    justify-content: center;
}

.site-footer-links a {
    color: rgba(255, 255, 255, 0.55);
    text-decoration: none;
    transition: color 0.15s;
}

.site-footer-links a:hover {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: underline;
}

/* Header nav */
/* === Site header nav === */
.site-header {
    text-align: center;
    color: white;
    margin-bottom: 1.5rem;
}
@media (min-width: 600px) {
    .site-header { margin-bottom: 2rem; }
}
.site-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.site-logo {
    font-size: 1.75rem;
    font-weight: 700;
    color: white;
    text-decoration: none;
}
@media (min-width: 600px) {
    .site-logo { font-size: 2.5rem; }
}
.site-tagline {
    font-size: 1rem;
    opacity: 0.9;
    margin-top: 0.25rem;
}
@media (min-width: 600px) {
    .site-tagline { font-size: 1.1rem; }
}
.site-nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}
.site-nav-link {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-size: 0.85rem;
    padding: 0.3rem 0.6rem;
    border-radius: 0.35rem;
    transition: all 0.15s;
    white-space: nowrap;
}
.site-nav-link:hover {
    color: white;
    background: rgba(255,255,255,0.15);
}
.site-nav-login {
    border: 1px solid rgba(255,255,255,0.5);
}
.site-nav-login:hover {
    border-color: white;
}
.site-nav-logout {
    opacity: 0.7;
    font-size: 0.8rem;
}
.site-nav-logout:hover { opacity: 1; }
.site-nav-user {
    color: rgba(255,255,255,0.95);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.site-nav-divider {
    width: 1px;
    height: 1rem;
    background: rgba(255,255,255,0.3);
    margin: 0 0.25rem;
}
.site-hamburger {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem;
}
/* Mobile: hide nav links, show hamburger */
@media (max-width: 599px) {
    .site-nav {
        display: none;
        position: absolute;
        top: 100%;
        right: 0;
        background: rgba(50, 30, 80, 0.95);
        backdrop-filter: blur(12px);
        flex-direction: column;
        align-items: stretch;
        padding: 0.5rem;
        border-radius: 0 0 0.75rem 0.75rem;
        min-width: 180px;
        z-index: 100;
        box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    }
    .site-nav.open { display: flex; }
    .site-nav-link { padding: 0.6rem 0.75rem; font-size: 0.95rem; }
    .site-nav-divider { width: 100%; height: 1px; margin: 0.25rem 0; }
    .site-hamburger { display: block; }
    .site-header-row { position: relative; }
}

/* Spielwiese */
.spielwiese-title {
    text-align: center;
    color: #2d3748;
    margin-bottom: 0.25rem;
    font-size: 1.5rem;
}

.spielwiese-count {
    text-align: center;
    color: #718096;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* Wheel — 3D rotating ring of creatures */
.wheel-scene {
    perspective: 600px;
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
    overflow: hidden;
    cursor: grab;
}

.wheel-scene:active { cursor: grabbing; }

@media (min-width: 600px) {
    .wheel-scene { height: 260px; }
}

.wheel-ring {
    position: relative;
    width: 140px;
    height: 140px;
    transform-style: preserve-3d;
    transition: transform 0.4s ease-out;
}

@media (min-width: 600px) {
    .wheel-ring { width: 160px; height: 160px; }
}

.wheel-slot {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    backface-visibility: hidden;
    cursor: pointer;
    transition: opacity 0.3s;
}

.wheel-slot-card {
    width: 120px;
    height: 120px;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    background: #f0f0f0;
}

@media (min-width: 600px) {
    .wheel-slot-card { width: 140px; height: 140px; }
}

.wheel-slot-card canvas,
.wheel-slot-card img {
    display: block;
}

.wheel-slot-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: #2d3748;
    margin-top: 0.35rem;
    text-align: center;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wheel-slot-card.empty-slot {
    border: 3px dashed #cbd5e0;
    background: transparent;
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wheel-slot-card.empty-slot .nest-plus {
    font-size: 2.5rem;
    color: #cbd5e0;
    font-weight: 300;
}

/* Wheel Steckbrief (inline below creature) */
.wheel-steckbrief {
    text-align: center;
    margin-bottom: 0.5rem;
    padding: 0.5rem 0;
}

.wheel-name {
    font-size: 1.4rem;
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.wheel-fields {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.25rem 1rem;
    margin-bottom: 0.75rem;
}

.wheel-field {
    font-size: 0.85rem;
    color: #4a5568;
}

.wheel-field b {
    color: #667eea;
}

.wheel-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.wheel-actions .btn-primary,
.wheel-actions .btn-secondary {
    padding: 0.6rem 1.5rem;
    font-size: 0.9rem;
}

.btn-release {
    padding: 0.4rem 1rem;
    font-size: 0.75rem;
    color: #a0aec0;
    background: none;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    cursor: pointer;
    font-family: inherit;
}

.btn-release:hover {
    color: #e53e3e;
    border-color: #e53e3e;
}

.wheel-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: #718096;
}

.wheel-empty p:first-child {
    font-size: 1.2rem;
    font-weight: 600;
    color: #4a5568;
}

.wheel-empty-sub {
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

/* (dots removed — wheel shows all slots visually) */

.spielwiese-new-btn {
    display: block;
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
}

/* Naming modal */
.naming-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
}

.naming-overlay[hidden] {
    display: none;
}

.naming-modal {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    width: 90%;
    max-width: 360px;
    text-align: center;
}

.naming-modal h2 {
    color: #2d3748;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.naming-modal input {
    width: 100%;
    padding: 0.85rem 1rem;
    border: 3px solid #e2e8f0;
    border-radius: 0.75rem;
    font-size: 1.2rem;
    text-align: center;
    font-weight: 600;
    transition: border-color 0.2s;
}

.naming-modal input:focus {
    outline: none;
    border-color: #667eea;
}

/* Beta access overlay */
.beta-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.beta-overlay.active {
    display: flex;
}

.beta-box {
    background: white;
    padding: 2rem;
    border-radius: 0.75rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 360px;
    text-align: center;
}

.beta-box h2 {
    margin-bottom: 0.5rem;
    color: #2d3748;
}

.beta-box p {
    color: #718096;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.beta-box input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #cbd5e0;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.beta-box input:focus {
    outline: none;
    border-color: #667eea;
}

/* =====================================================
   Admin panel (inline, role-based)
   ===================================================== */

.admin-nav-link {
    margin-left: 0.5rem;
    background: rgba(255,255,255,0.15);
}

.admin-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.admin-title {
    color: #2d3748;
    font-size: 1.5rem;
}

.admin-stats {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.admin-stat-card {
    background: #f7fafc;
    padding: 1rem;
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
    flex: 1;
    min-width: 80px;
    text-align: center;
}

.admin-stat-card .number {
    font-size: 1.75rem;
    font-weight: 700;
    color: #667eea;
}

.admin-stat-card .label {
    font-size: 0.8rem;
    color: #718096;
}

.admin-orders-card h3 {
    margin-bottom: 0.75rem;
    color: #2d3748;
}

.admin-order-row {
    display: grid;
    grid-template-columns: 60px 1fr auto auto;
    gap: 0.75rem;
    padding: 0.75rem;
    border-bottom: 1px solid #f0f0f0;
    align-items: center;
    border-radius: 0.5rem;
    transition: background 0.15s;
}

.admin-order-row:hover {
    background: #f7fafc;
}

.admin-order-row:last-child {
    border-bottom: none;
}

@media (max-width: 500px) {
    .admin-order-row {
        grid-template-columns: 50px 1fr;
        gap: 0.5rem;
    }
    .admin-order-status,
    .admin-order-actions {
        grid-column: 2;
    }
}

.admin-order-thumb {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 0.35rem;
    background: #f0f0f0;
}

.admin-order-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.admin-order-meta {
    font-size: 0.8rem;
    color: #718096;
}

.admin-order-links {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-top: 0.25rem;
}

.admin-order-links a,
.admin-dl-btn {
    font-size: 0.75rem;
    color: #667eea;
    text-decoration: none;
    padding: 0.15rem 0.4rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.25rem;
    background: none;
    cursor: pointer;
    font-family: inherit;
}

.admin-order-links a:hover,
.admin-dl-btn:hover {
    border-color: #667eea;
}

.admin-dl-btn:disabled {
    opacity: 0.6;
    cursor: wait;
}

.admin-dl-btn.downloading {
    background: #edf2f7;
}

.admin-status-select {
    padding: 0.3rem 0.5rem;
    border-radius: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    border: 2px solid transparent;
    cursor: pointer;
    appearance: auto;
}

.admin-status-select[data-status="new"] { background: #fed7d7; color: #c53030; border-color: #feb2b2; }
.admin-status-select[data-status="qa"] { background: #bee3f8; color: #2b6cb0; border-color: #90cdf4; }
.admin-status-select[data-status="rework"] { background: #feebc8; color: #c05621; border-color: #fbd38d; }
.admin-status-select[data-status="printing"] { background: #fefcbf; color: #975a16; border-color: #faf089; }
.admin-status-select[data-status="done"] { background: #c6f6d5; color: #276749; border-color: #9ae6b4; }
.admin-status-select[data-status="rejected"] { background: #e2e8f0; color: #4a5568; border-color: #cbd5e0; }

.admin-order-row.clickable {
    cursor: pointer;
}

.admin-order-row.clickable:hover {
    background: #edf2f7;
}

.admin-empty {
    padding: 2rem;
    text-align: center;
    color: #718096;
}

/* Admin detail view */
.admin-detail-header {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    justify-content: space-between;
}

.admin-detail-info h3 {
    margin: 0 0 0.25rem;
    font-size: 1.1rem;
}

.admin-viewer-toggles {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}

.admin-toggle-btn {
    padding: 0.3rem 0.6rem;
    font-size: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.25rem;
    background: white;
    cursor: pointer;
    font-family: inherit;
    color: #4a5568;
}

.admin-toggle-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.admin-detail-drawing {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
}

/* === Landing screen — hero pair + primary CTA === */
.landing-hero {
    text-align: center;
    padding: 0.5rem 0 1.5rem;
}

.landing-hero-pair {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    margin-bottom: 1.5rem;
    flex-wrap: nowrap;
}

.landing-drawing,
.landing-creature {
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.landing-drawing-frame,
.landing-creature-frame {
    position: relative;
    width: 140px;
    height: 140px;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    background: #f7fafc;
    border: 1px solid #edf2f7;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}


.landing-drawing-frame {
    background: #FFFDF5;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.landing-drawing-frame svg {
    width: 100%;
    height: 100%;
    display: block;
}

.landing-creature-frame {
    background: #f0f0f0;
    position: relative;
}

.landing-creature-frame canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
}

.landing-drawing figcaption,
.landing-creature figcaption {
    font-size: 0.8rem;
    color: #718096;
    font-weight: 500;
}

.landing-arrow {
    font-size: 1.5rem;
    color: #a0aec0;
    font-weight: 300;
    padding: 0;
    margin-bottom: 1.75rem;
    animation: landing-arrow-pulse 2s ease-in-out infinite;
}

@keyframes landing-arrow-pulse {
    0%, 100% { transform: translateX(0); opacity: 0.7; }
    50% { transform: translateX(4px); opacity: 1; }
}

@media (min-width: 600px) {
    .landing-drawing-frame,
    .landing-creature-frame { width: 200px; height: 200px; }
    .landing-arrow { font-size: 2.5rem; margin-bottom: 2rem; }
    .landing-hero-pair { gap: 1.5rem; }
}

.landing-tagline {
    font-size: 1.6rem;
    font-weight: 700;
    color: #2d3748;
    margin: 0 0 0.5rem;
    line-height: 1.2;
}

@media (min-width: 600px) {
    .landing-tagline { font-size: 2.25rem; }
}

.landing-subtitle {
    font-size: 1rem;
    color: #4a5568;
    max-width: 32rem;
    margin: 0 auto 1.75rem;
    line-height: 1.5;
}

.landing-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    max-width: 32rem;
    margin: 0 auto;
}

.landing-dropzone {
    cursor: pointer;
    border: 3px dashed #d6bcfa;
    border-radius: 1rem;
    padding: 1.75rem 1.25rem;
    text-align: center;
    background: linear-gradient(135deg, #faf5ff 0%, #f0e6ff 100%);
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.landing-dropzone:hover {
    border-color: #9f7aea;
    background: linear-gradient(135deg, #f0e6ff 0%, #e9d8fd 100%);
}

.landing-dropzone:focus-visible {
    outline: 3px solid #9f7aea;
    outline-offset: 4px;
}

.landing-dropzone.dragover {
    border-color: #667eea;
    background: #e9d8fd;
    transform: scale(1.02);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.25);
}

.landing-dropzone-icon {
    font-size: 2.5rem;
    line-height: 1;
    animation: egg-float 3s ease-in-out infinite;
}

.landing-dropzone-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #553c9a;
    margin: 0.25rem 0 0;
}

.landing-dropzone-hint {
    font-size: 0.9rem;
    color: #6b46c1;
    margin: 0;
    opacity: 0.85;
}

/* Show the right hint per input type: fine pointer (mouse) sees the
   drag-drop wording; coarse pointer (touch) sees the tap wording. */
.landing-dropzone-hint-desktop { display: none; }
.landing-dropzone-hint-touch { display: none; }
@media (pointer: fine)   { .landing-dropzone-hint-desktop { display: block; } }
@media (pointer: coarse) { .landing-dropzone-hint-touch { display: block; } }

.landing-dropzone .btn-camera { margin-top: 0.5rem; }

/* Separator between dropzone and the text-create entry */
.landing-or {
    text-align: center;
    color: #a0aec0;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    position: relative;
    margin: 0.25rem 0;
}
.landing-or::before,
.landing-or::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 30%;
    height: 1px;
    background: #e2e8f0;
}
.landing-or::before { left: 0; }
.landing-or::after  { right: 0; }

.landing-text-entry {
    cursor: pointer;
    border: 2px solid #c4b5fd;
    border-radius: 1rem;
    padding: 0.9rem 1.1rem;
    background: linear-gradient(135deg, #fefce8 0%, #fff8db 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    text-align: center;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.15s ease;
    font: inherit;
    color: inherit;
}
.landing-text-entry:hover {
    border-color: #8b5cf6;
    transform: translateY(-1px);
}
.landing-text-entry:focus-visible {
    outline: 3px solid #8b5cf6;
    outline-offset: 3px;
}
.landing-text-entry-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #553c9a;
}
.landing-text-entry-hint {
    font-size: 0.85rem;
    color: #6b46c1;
    opacity: 0.85;
}

/* ── Text-create screen ─────────────────────────────────────────────── */
.text-create-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    max-width: 520px;
    margin: 0 auto;
}
.text-create-title {
    font-size: 1.4rem;
    margin: 0;
    color: #2d3748;
    text-align: center;
}
.text-create-hint {
    font-size: 0.95rem;
    color: #4a5568;
    margin: 0;
    line-height: 1.45;
    text-align: center;
}
.text-create-prompt {
    width: 100%;
    box-sizing: border-box;
    border: 2px solid #cbd5e0;
    border-radius: 0.75rem;
    padding: 0.85rem 1rem;
    font: inherit;
    font-size: 1rem;
    line-height: 1.4;
    resize: vertical;
    min-height: 4.5em;
    background: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.text-create-prompt:focus {
    outline: none;
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.18);
}
.text-create-prompt.shake {
    animation: text-create-shake 0.4s ease;
    border-color: #f56565;
}
@keyframes text-create-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    50% { transform: translateX(6px); }
    75% { transform: translateX(-3px); }
}
.text-create-chips-label {
    font-size: 0.85rem;
    color: #718096;
    margin: 0.25rem 0 0;
}
.text-create-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}
.text-create-chip {
    cursor: pointer;
    border: 1px solid #e2e8f0;
    background: #f7fafc;
    border-radius: 999px;
    padding: 0.35rem 0.85rem;
    font-size: 0.85rem;
    color: #4a5568;
    font-family: inherit;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.text-create-chip:hover {
    background: #ebf4ff;
    border-color: #c3dafe;
    color: #4c51bf;
}
.text-create-chip:active {
    transform: scale(0.97);
}
.text-create-submit {
    margin-top: 0.5rem;
    align-self: stretch;
    font-size: 1.05rem;
    padding: 0.85rem 1.5rem;
}
.text-create-note {
    text-align: center;
    font-size: 0.85rem;
    color: #718096;
    margin: 0;
}

/* Prompt card shown in transform preview (text-mode replacement for the
   "Deine Zeichnung" image side) */
.transform-prompt-card {
    background: linear-gradient(135deg, #fef9c3 0%, #fef3c7 100%);
    border: 2px dashed #d97706;
    border-radius: 0.6rem;
    padding: 1rem;
    font-size: 1.05rem;
    color: #7c2d12;
    font-style: italic;
    line-height: 1.4;
    min-height: 4em;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.landing-wait-note {
    background: #fffaf0;
    border: 1px solid #feebc8;
    color: #744210;
    font-size: 0.9rem;
    line-height: 1.45;
    padding: 0.65rem 0.9rem;
    border-radius: 0.5rem;
    margin: 0;
    text-align: left;
}
.landing-wait-note b { color: #7b341e; }

.btn-link {
    background: none;
    border: none;
    color: #667eea;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: underline;
    padding: 0.5rem 1rem;
    font-family: inherit;
}

.btn-link:hover { color: #5a67d8; }


/* === Gradient background enrichment === */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(ellipse 600px 400px at 15% 20%, rgba(255, 255, 255, 0.07) 0%, transparent 70%),
        radial-gradient(ellipse 500px 350px at 85% 75%, rgba(255, 255, 255, 0.05) 0%, transparent 70%),
        radial-gradient(ellipse 300px 300px at 50% 50%, rgba(255, 255, 255, 0.03) 0%, transparent 70%);
}

/* === Landing page — desktop side decorations === */
.landing-decorations {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.landing-deco-item {
    position: absolute;
    width: 120px;
    height: 120px;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    background: #FFFDF5;
    border: 2px solid rgba(255, 255, 255, 0.6);
}

.landing-deco-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.landing-deco-item--svg {
    background: none;
    border: none;
    box-shadow: none;
}

.landing-deco-item--svg svg {
    width: 100%;
    height: 100%;
}

/* Positions for desktop decorations */
.landing-deco-item:nth-child(1) { top: 10rem; left: 2.5vw; transform: rotate(-8deg); opacity: 0.30; width: 110px; height: 110px; }
.landing-deco-item:nth-child(2) { top: 26rem; left: 1.5vw; transform: rotate(5deg); opacity: 0.25; width: 100px; height: 100px; }
.landing-deco-item:nth-child(3) { top: 40rem; left: 3vw; transform: rotate(-12deg); opacity: 0.20; width: 80px; height: 80px; }
.landing-deco-item:nth-child(4) { top: 8rem; right: 2vw; transform: rotate(10deg); opacity: 0.28; width: 100px; height: 100px; }
.landing-deco-item:nth-child(5) { top: 24rem; right: 1.5vw; transform: rotate(-6deg); opacity: 0.22; width: 115px; height: 115px; }
.landing-deco-item:nth-child(6) { top: 38rem; right: 2.5vw; transform: rotate(14deg); opacity: 0.25; width: 90px; height: 90px; }

/* Temporarily disabled until we have first-party artwork */
.landing-decorations {
    display: none !important;
}

/* @media (min-width: 1100px) {
    .landing-decorations { display: block; }
} */

/* === Landing showcase — before/after transformation cards === */
.landing-showcase {
    display: none;
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid #edf2f7;
}

.landing-showcase-heading {
    text-align: center;
    font-size: 1.2rem;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 1.5rem;
}

.landing-showcase-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
    max-width: 900px;
    margin: 0 auto;
}

.showcase-card {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    border-radius: 1rem;
    background: linear-gradient(135deg, #faf5ff 0%, #f7fafc 100%);
    border: 1px solid #e9d8fd;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.showcase-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.12);
}

.showcase-card-drawing,
.showcase-card-creature {
    flex: 1;
    aspect-ratio: 1;
    border-radius: 0.75rem;
    overflow: hidden;
    background: #f7fafc;
}

.showcase-card-drawing {
    background: #FFFDF5;
    border: 1px solid #edf2f7;
}

.showcase-card-creature {
    background: #f0f0f0;
    border: 1px solid #e2e8f0;
}

.showcase-card-drawing img,
.showcase-card-creature img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.showcase-card-arrow {
    font-size: 1.2rem;
    color: #a0aec0;
    flex-shrink: 0;
}

/* Temporarily disabled until we have first-party artwork */
/* @media (min-width: 600px) {
    .landing-showcase {
        display: block;
    }
} */

/* === Spielwiese background enhancement === */
#screenSpielwiese {
    position: relative;
}

#screenSpielwiese::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 60px;
    background: linear-gradient(to top, rgba(200, 230, 200, 0.08) 0%, transparent 100%);
    border-radius: 0 0 1rem 1rem;
    pointer-events: none;
    z-index: 0;
}

/* === Result celebration effect === */
@keyframes celebration-particle {
    0% { transform: translateY(0) scale(1); opacity: 1; }
    100% { transform: translateY(-80px) scale(0); opacity: 0; }
}

@keyframes celebration-burst {
    0% { transform: scale(0.8); opacity: 0; }
    30% { transform: scale(1.05); opacity: 1; }
    100% { transform: scale(1); opacity: 0; }
}

.result-celebration {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 10;
    overflow: hidden;
}

.result-celebration::before,
.result-celebration::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0;
}

.result-celebration::before {
    background: radial-gradient(circle, rgba(102, 126, 234, 0.15) 0%, transparent 70%);
    animation: celebration-burst 1.2s ease-out forwards;
}

.result-celebration::after {
    background: radial-gradient(circle, rgba(118, 75, 162, 0.1) 0%, transparent 70%);
    animation: celebration-burst 1.2s ease-out 0.15s forwards;
    width: 280px;
    height: 280px;
}

.celebration-sparkles {
    position: absolute;
    inset: 0;
}

.celebration-sparkle {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    animation: celebration-particle 1s ease-out forwards;
}

.celebration-sparkle:nth-child(1) { top: 40%; left: 30%; background: #667eea; animation-delay: 0.1s; }
.celebration-sparkle:nth-child(2) { top: 35%; left: 60%; background: #764ba2; animation-delay: 0.2s; }
.celebration-sparkle:nth-child(3) { top: 50%; left: 45%; background: #d69e2e; animation-delay: 0.05s; }
.celebration-sparkle:nth-child(4) { top: 45%; left: 70%; background: #48bb78; animation-delay: 0.25s; }
.celebration-sparkle:nth-child(5) { top: 55%; left: 35%; background: #ed8936; animation-delay: 0.15s; }
.celebration-sparkle:nth-child(6) { top: 30%; left: 50%; background: #e53e3e; animation-delay: 0.3s; }
