:root {
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #111827;
    background: #f5f7fb;
    font-synthesis: none;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: #f5f7fb; }
button, input, textarea, select { font: inherit; }
button { touch-action: manipulation; }

.app-shell { min-height: 100vh; max-width: 720px; margin: 0 auto; padding: 0 18px 48px; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 18px 0 8px; }
.brand-mark { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: #111827; color: white; font-weight: 800; }
.brand-name { font-weight: 800; letter-spacing: -.02em; }
.brand-subtitle { color: #6b7280; font-size: .82rem; margin-top: 1px; }
.admin-link { margin-left: auto; text-decoration: none; color: #111827; font-weight: 700; font-size: .9rem; }

.hero { padding: 28px 0 20px; }
.eyebrow { display: inline-block; font-size: .75rem; font-weight: 750; text-transform: uppercase; letter-spacing: .08em; color: #6b7280; margin-bottom: 8px; }
h1 { margin: 0; font-size: clamp(2.1rem, 9vw, 3.8rem); line-height: .98; letter-spacing: -.055em; }
.hero p { margin: 14px 0 0; max-width: 520px; color: #6b7280; font-size: 1rem; line-height: 1.55; }

.catalog-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.dessert-card { min-height: 168px; border: 1px solid #e5e7eb; background: white; border-radius: 20px; padding: 18px; text-align: left; display: flex; flex-direction: column; cursor: pointer; transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease; }
.dessert-card:active { transform: scale(.98); }
.dessert-card.selected { border-color: #111827; box-shadow: 0 0 0 2px #111827; }
.dessert-emoji { font-size: 2rem; line-height: 1; margin-bottom: auto; }
.dessert-name { font-weight: 800; font-size: 1.08rem; margin-top: 22px; }
.dessert-description { color: #6b7280; font-size: .82rem; line-height: 1.35; margin-top: 5px; }

.request-panel { margin-top: 16px; padding: 18px; background: white; border: 1px solid #e5e7eb; border-radius: 22px; }
.field-row { margin-bottom: 16px; }
.field-row label { display: block; font-weight: 750; font-size: .9rem; margin-bottom: 7px; }
.field-row label span { color: #9ca3af; font-weight: 500; }
.field-row input, .field-row textarea, .field-row select { width: 100%; border: 1px solid #d1d5db; border-radius: 13px; padding: 12px 13px; background: #fff; outline: none; }
.field-row input:focus, .field-row textarea:focus, .field-row select:focus { border-color: #111827; box-shadow: 0 0 0 2px rgba(17,24,39,.08); }
.compact-row { display: flex; justify-content: space-between; align-items: center; }
.compact-row label { margin: 0; }
.quantity-picker { display: inline-flex; align-items: center; gap: 14px; padding: 4px; border: 1px solid #e5e7eb; border-radius: 999px; }
.quantity-picker button { width: 34px; height: 34px; border: 0; border-radius: 50%; background: #f3f4f6; font-size: 1.2rem; }
.quantity-picker span { min-width: 18px; text-align: center; font-weight: 800; }

.primary-button { width: 100%; border: 0; border-radius: 14px; padding: 14px 18px; background: #111827; color: white; font-weight: 800; cursor: pointer; }
.primary-button:disabled { opacity: .38; cursor: default; }
.secondary-button { border: 1px solid #d1d5db; border-radius: 12px; padding: 10px 12px; background: #fff; font-weight: 700; color: #111827; cursor: pointer; }
.secondary-button:disabled { opacity: .45; cursor: default; }
.admin-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.status-card, .success-card, .phase-card { background: white; border: 1px solid #e5e7eb; border-radius: 22px; padding: 24px; }
.phase-card { text-align: center; }
.phase-art { font-size: 2.2rem; margin-bottom: 8px; }
.status-card.error, .inline-error { color: #991b1b; background: #fef2f2; }
.inline-error { border-radius: 12px; padding: 10px 12px; margin-bottom: 14px; font-size: .9rem; }
.success-card { text-align: center; padding: 38px 24px; }
.success-card h2 { margin-bottom: 6px; }
.success-card p { color: #6b7280; }
.success-icon { width: 58px; height: 58px; display: grid; place-items: center; margin: 0 auto 16px; border-radius: 50%; background: #ecfdf5; font-size: 1.8rem; font-weight: 900; }
.jira-key { display: inline-block; margin: 12px 0 22px; padding: 7px 11px; border-radius: 9px; background: #f3f4f6; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 800; }
.empty-state { padding: 48px 0; }
.boot-screen {
    min-height: 100vh;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 14px;
    padding: 24px;
    text-align: center;
}
.boot-brand { font-weight: 900; font-size: clamp(1.7rem, 8vw, 2.2rem); letter-spacing: -.03em; }
.boot-spinner {
    width: 34px;
    height: 34px;
    border: 3px solid #d1d5db;
    border-top-color: #111827;
    border-radius: 50%;
    animation: boot-spin .8s linear infinite;
}
.boot-message { color: #6b7280; font-size: .95rem; }
.boot-progress {
    width: min(320px, 80vw);
    height: 8px;
    border-radius: 999px;
    overflow: hidden;
    background: #e5e7eb;
}
.boot-progress-bar {
    width: 8%;
    height: 100%;
    background: #111827;
    transition: width .18s ease;
}

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

@media (max-width: 430px) {
    .app-shell { padding-left: 14px; padding-right: 14px; }
    .catalog-grid { gap: 9px; }
    .dessert-card { min-height: 156px; padding: 15px; border-radius: 17px; }
}
