:root {
    --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

    --bg-page: #111416;
    --bg-card: #1a1e21;
    --bg-elevated: #22272b;
    --accent: #e0b85c;
    --accent-hover: #c9a96e;
    --brand: #c9a96e;
    --text-primary: #f2f0ea;
    --text-muted: #9fa6ab;
    --border: #2b3136;
    --danger: #d96c5c;
    --radius: 12px;
    --radius-sm: 8px;
}

* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: var(--font-body);
    background: var(--bg-page);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.topbar {
    border-bottom: 1px solid var(--border);
    background: var(--bg-card);
}

.topbar__inner {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: 0.02em;
}

.brand__mark {
    width: 16px;
    height: 16px;
    background: var(--accent);
    border-radius: 3px;
    transform: rotate(45deg);
    box-shadow: 0 0 0 3px rgba(224, 184, 92, 0.18);
}

.nav {
    display: flex;
    gap: 18px;
}

.nav__link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    padding: 6px 2px;
    border-bottom: 2px solid transparent;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.nav__link:hover {
    color: var(--text-primary);
    border-color: var(--accent);
}

/* Page */
.page {
    flex: 1;
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    padding: 32px 20px 64px;
}

h1 {
    font-size: 2rem;
    line-height: 1.2;
    margin: 0 0 8px;
    letter-spacing: -0.01em;
}

h2 {
    font-size: 1.25rem;
    margin: 32px 0 14px;
    color: var(--text-primary);
}

.lead {
    color: var(--text-muted);
    margin: 0 0 8px;
    font-size: 1.05rem;
}

/* Hero image */
.hero {
    margin: 0 0 24px;
}

.hero img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

/* Card image */
.card__img {
    display: block;
    margin: -18px -18px 12px;
    overflow: hidden;
    border-radius: var(--radius) var(--radius) 0 0;
}

.card__img img {
    display: block;
    width: 100%;
    height: 140px;
    object-fit: cover;
}

/* Cards */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: left;
    padding: 18px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    cursor: pointer;
    font: inherit;
    transition: border-color 0.15s ease, transform 0.15s ease, background 0.15s ease;
}

.card:hover {
    border-color: var(--accent);
    background: var(--bg-elevated);
}

.card:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.card[aria-pressed="true"] {
    border-color: var(--accent);
    background: var(--bg-elevated);
}

.card__title {
    font-weight: 600;
    font-size: 1.05rem;
}

.card__sub {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Chips (days, slots) */
.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}

.chip {
    padding: 10px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text-primary);
    cursor: pointer;
    font: inherit;
    font-size: 0.95rem;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.chip:hover {
    border-color: var(--accent);
}

.chip:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.chip[aria-pressed="true"] {
    border-color: var(--accent);
    background: rgba(224, 184, 92, 0.14);
}

/* Form */
.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.field span {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.field input {
    padding: 12px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font: inherit;
    font-size: 1rem;
}

.field input:focus {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
    border-color: var(--accent);
}

.btn {
    display: inline-block;
    padding: 13px 22px;
    border: none;
    border-radius: var(--radius-sm);
    font: inherit;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.1s ease;
}

.btn:active {
    transform: translateY(1px);
}

.btn--primary {
    background: var(--accent);
    color: #141414;
}

.btn--primary:hover {
    background: var(--accent-hover);
}

.btn--danger {
    background: transparent;
    color: var(--danger);
    border: 1px solid var(--danger);
}

.btn--danger:hover {
    background: rgba(217, 108, 92, 0.12);
}

.error {
    color: var(--danger);
    font-size: 0.95rem;
    margin: 0 0 12px;
}

/* Ticket summary */
.ticket {
    margin-top: 28px;
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--accent);
    border-radius: var(--radius);
}

.ticket h2 {
    margin-top: 0;
}

.ticket dl {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 6px 16px;
    margin: 0;
}

.ticket dt {
    color: var(--text-muted);
}

.ticket dd {
    margin: 0;
    color: var(--text-primary);
}

/* Appointments list */
.appointments {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.appointment {
    padding: 18px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.appointment__time {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--accent);
}

.appointment__meta {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin: 4px 0 12px;
}

.appointment__actions {
    display: flex;
    gap: 10px;
}

.empty {
    color: var(--text-muted);
    padding: 24px;
    text-align: center;
    background: var(--bg-card);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
}

/* Footer */
.footer {
    border-top: 1px solid var(--border);
    background: var(--bg-card);
}

.footer__inner {
    max-width: 720px;
    margin: 0 auto;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Motion */
@keyframes fade-in {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

.step {
    animation: fade-in 0.25s ease;
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

@media (max-width: 480px) {
    h1 { font-size: 1.6rem; }
    .cards { grid-template-columns: 1fr; }
    .footer__inner { flex-direction: column; gap: 4px; }
}
