:root {
    --ink: #1b1614;
    --muted: #6d625a;
    --paper: #f3ecdf;
    --sheet: #fffaf3;
    --line: #e2d5c4;
    --wine: #7c2f45;
    --wine-deep: #4e1c2b;
    --ok: #1f6b4a;
    --warn: #8a3d2f;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: "IBM Plex Sans Arabic", "Geeza Pro", "Noto Naskh Arabic", Tahoma, sans-serif;
}

body {
    min-height: 100vh;
    background-image: radial-gradient(circle at 100% 0, rgba(124, 47, 69, 0.08), transparent 28rem);
}

a { color: inherit; }

main, footer, .bar { width: min(1120px, calc(100% - 32px)); margin-inline: auto; }

.mast {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(243, 236, 223, 0.9);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line);
}

.bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 0;
}

.brand {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.brand img {
    height: 22px;
    width: auto;
    max-width: 110px;
    display: block;
}

nav { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

nav a, nav button, .filters a, .filters select, button, input, textarea, select {
    font: inherit;
}

nav a { text-decoration: none; }

nav button {
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
}

.nav-solid, .button {
    background: var(--ink);
    color: var(--sheet);
    text-decoration: none;
    text-align: center;
    border: 0;
    border-radius: 999px;
    padding: 12px 18px;
    cursor: pointer;
}

.button.ghost, .nav-solid.ghost {
    background: transparent;
    color: var(--ink);
    border: 1px solid var(--ink);
}

main { padding: 28px 0 64px; }

.hero {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr;
    gap: 36px;
    align-items: end;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--line);
}

h1, h2, h3 { font-weight: 650; letter-spacing: 0; margin: 0; }

h1 { font-size: clamp(34px, 5vw, 58px); line-height: 1.25; }

.eyebrow, .lede, .fine, em, .empty { color: var(--muted); }

.lede { font-size: 18px; line-height: 1.7; max-width: 38rem; }

.hero-actions { display: flex; gap: 10px; margin-top: 18px; }

.rules {
    list-style: none;
    margin: 0;
    padding: 8px 18px;
    background: var(--sheet);
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: 0 14px 34px rgba(78, 28, 43, 0.06);
}

.rules li {
    display: grid;
    gap: 4px;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
}

.rules strong { font-size: 16px; }

section { margin-top: 36px; }

.section-head, .filters, .ledger-row, .person, .facts {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
}

.section-head a { color: var(--wine); }

.directory {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.person {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 18px;
    background: var(--sheet);
    border: 1px solid var(--line);
    border-radius: 22px;
    box-shadow: 0 14px 34px rgba(78, 28, 43, 0.06);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.person:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 40px rgba(78, 28, 43, 0.1);
}

.person strong, .ledger-row strong { display: block; }

.person em, .ledger-row em { font-style: normal; color: var(--muted); font-size: 14px; }

.mark {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--wine-deep);
    color: #f6e7dc;
    flex: none;
}

.mark.large { width: 84px; height: 84px; font-size: 28px; }

.prices { display: flex; flex-direction: column; gap: 8px; width: 100%; }

.prices > span {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    width: 100%;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 8px 10px;
}

.prices b { font-variant-numeric: tabular-nums; }

.prices small { color: var(--muted); font-size: 12px; }

.gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.frame {
    display: grid;
    gap: 12px;
    background: var(--sheet);
    border: 1px solid var(--line);
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 14px 34px rgba(78, 28, 43, 0.06);
}

.stage {
    position: relative;
    aspect-ratio: 4 / 5;
    background: var(--wine-deep);
    overflow: hidden;
}

.stage img, .stage video { width: 100%; height: 100%; object-fit: cover; display: block; }

.plate {
    height: 100%;
    display: grid;
    align-content: end;
    padding: 16px;
    color: #f6e7dc;
    background:
        linear-gradient(160deg, rgba(255,255,255,0.08), transparent 40%),
        var(--wine-deep);
}

.plate span { font-size: 42px; }

.requester {
    position: absolute;
    right: 12px;
    bottom: 12px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid #fffaf3;
    display: grid;
    place-items: center;
    background: var(--ink);
    color: white;
    object-fit: cover;
    font-size: 14px;
}

.frame-copy { padding: 0 16px 16px; }

.frame-copy h3 { font-size: 18px; }

.frame-copy a { text-decoration: none; }

.frame-copy p, .fine { font-size: 14px; line-height: 1.6; }

.filters { justify-content: flex-start; flex-wrap: wrap; margin-bottom: 8px; }

.filters a, .filters select, .auth input, .auth select, .order-form input, .order-form textarea, .order-form select {
    background: var(--sheet);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 8px 12px;
    color: inherit;
    text-decoration: none;
}

.filters a.on { background: var(--ink); color: white; }

.profile { display: grid; grid-template-columns: 1fr; gap: 20px; max-width: 760px; margin-inline: auto; }

.profile-id {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    background: var(--sheet);
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 20px;
    box-shadow: 0 14px 34px rgba(78, 28, 43, 0.06);
}

.order-form, .auth {
    display: grid;
    gap: 14px;
    background: var(--sheet);
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 22px;
    box-shadow: 0 16px 40px rgba(27, 22, 20, 0.05);
}

.order-form fieldset, .auth fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }

.choice {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 10px;
    align-items: center;
    padding: 14px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
}

.choice:has(input:checked) {
    border-color: var(--wine);
    box-shadow: 0 0 0 3px rgba(124, 47, 69, 0.14);
}

.choice em { display: block; font-style: normal; color: var(--muted); font-size: 13px; }

.check { display: flex; gap: 8px; align-items: flex-start; }

textarea, input[type="text"], input[type="email"], input[type="password"], input[type="number"], select {
    width: 100%;
}

.auth { max-width: 460px; }

.ledger { display: grid; gap: 12px; }

.ledger-row {
    text-decoration: none;
    padding: 16px 18px;
    background: var(--sheet);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: 0 10px 24px rgba(27, 22, 20, 0.04);
}

.ledger-row > span:nth-child(2) {
    background: #f6e7ea;
    color: var(--wine-deep);
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 13px;
}

.minus { color: var(--warn); }

.facts { display: grid; grid-template-columns: repeat(3, 1fr); align-items: stretch; gap: 10px; margin: 18px 0; }

.facts div { background: var(--sheet); border: 1px solid var(--line); border-radius: 18px; padding: 14px; display: block; box-shadow: 0 8px 20px rgba(27, 22, 20, 0.04); }

.facts dt { color: var(--muted); font-size: 13px; }

.facts dd { margin: 4px 0 0; font-size: 18px; }

.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 16px; }

.actions form { display: flex; gap: 8px; align-items: center; }

.pills { display: flex; gap: 8px; flex-wrap: wrap; }

.pill {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    background: var(--sheet);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 6px 10px;
}

.pill b {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--wine);
    color: white;
    font-size: 12px;
}

.banner {
    background: #e7f3ec;
    color: var(--ok);
    border-radius: 12px;
    padding: 10px 14px;
}

.banner.warn { background: #f8e8e4; color: var(--warn); }

.banner p { margin: 0; }

.balance {
    font-size: 32px;
    font-variant-numeric: tabular-nums;
    background: var(--sheet);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 8px 16px;
}

footer { padding: 18px 0 32px; color: var(--muted); border-top: 1px solid var(--line); }

@media (max-width: 800px) {
    .hero, .profile, .gallery, .facts { grid-template-columns: 1fr; }
    .bar { align-items: flex-start; flex-direction: column; }
    .gallery { grid-template-columns: 1fr; }
}
