:root {
    --gold-1:      #F5E6C8;
    --gold-2:      #E8C97A;
    --gold-3:      #C9A84C;
    --gold-4:      #9B7820;
    --gold-5:      #6B520E;
    --ink:         #1C1917;
    --ink-2:       #3D3830;
    --ink-3:       #6B6560;
    --surface:     #FDFCF9;
    --surface-2:   #F7F3EC;
    --surface-3:   #EDE7D9;
    --border:      #DDD4BF;
    --border-2:    #C9BEA8;
    --white:       #FFFFFF;
    --success-bg:  #F0FAF3;
    --success-brd: #A8DEB8;
    --success-txt: #1A5C30;
    --warn-bg:     #FFF8EC;
    --warn-brd:    #F0D080;
    --warn-txt:    #7A5000;
    --danger-bg:   #FFF2F2;
    --danger-brd:  #F0AAAA;
    --danger-txt:  #8C1A1A;
    --radius-sm:   8px;
    --radius-md:   14px;
    --radius-lg:   20px;
    --shadow-sm:   0 2px 8px rgba(28,25,23,.06);
    --shadow-md:   0 6px 24px rgba(28,25,23,.09);
    --shadow-lg:   0 12px 40px rgba(28,25,23,.12);
    --font-main:   'Noto Naskh Arabic', 'Amiri', 'Scheherazade New', Tahoma, serif;
    --font-ui:     'Noto Kufi Arabic', 'Cairo', Tahoma, sans-serif;
    --transition:  0.22s cubic-bezier(.4,0,.2,1);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-main);
    background-color: var(--surface-2);
    background-image:
        radial-gradient(circle at 20% 0%, rgba(201,168,76,.10) 0%, transparent 50%),
        radial-gradient(circle at 80% 100%, rgba(201,168,76,.07) 0%, transparent 50%);
    background-attachment: fixed;
    color: var(--ink);
    direction: rtl;
    line-height: 1.85;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

.quran-text {
    font-family: 'Amiri Quran', 'Amiri', 'Noto Naskh Arabic', serif;
    font-size: 1.15rem;
    line-height: 2.3;
    color: var(--ink-2);
    letter-spacing: 0.01em;
}

.container { max-width: 960px; margin: 0 auto; padding: 0 20px; }

.site-header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    gap: 16px;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.header-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--gold-3), var(--gold-4));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 18px;
    flex-shrink: 0;
}

.header-title {
    font-family: var(--font-ui);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.2;
}

.header-sub {
    font-size: 0.75rem;
    color: var(--ink-3);
    font-family: var(--font-ui);
    line-height: 1;
}

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

.btn-contact {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background: var(--surface-2);
    border: 1px solid var(--border-2);
    border-radius: var(--radius-sm);
    color: var(--ink-2);
    font-family: var(--font-ui);
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
}
.btn-contact:hover { background: var(--surface-3); border-color: var(--gold-3); color: var(--gold-5); }

.page-body { padding: 28px 0 60px; }

.section-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition);
}
.section-card:hover { box-shadow: var(--shadow-md); }

.hero-banner {
    background: linear-gradient(135deg, var(--gold-5) 0%, var(--gold-4) 40%, var(--gold-3) 100%);
    border-radius: var(--radius-lg);
    padding: 32px 28px;
    margin-bottom: 20px;
    color: var(--white);
    position: relative;
    overflow: hidden;
}
.hero-banner::before {
    content: '';
    position: absolute;
    top: -30px; left: -30px;
    width: 160px; height: 160px;
    background: rgba(255,255,255,.06);
    border-radius: 50%;
}
.hero-banner::after {
    content: '';
    position: absolute;
    bottom: -40px; right: -20px;
    width: 200px; height: 200px;
    background: rgba(255,255,255,.04);
    border-radius: 50%;
}
.hero-title {
    font-family: var(--font-ui);
    font-size: clamp(1.35rem, 4vw, 1.75rem);
    font-weight: 800;
    margin-bottom: 8px;
    position: relative;
    z-index: 1;
}
.hero-desc {
    font-size: 0.95rem;
    opacity: .88;
    line-height: 1.9;
    max-width: 560px;
    position: relative;
    z-index: 1;
}
.hero-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    position: relative;
    z-index: 1;
    flex-wrap: wrap;
}
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(255,255,255,.18);
    border: 1px solid rgba(255,255,255,.25);
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 0.8rem;
    font-family: var(--font-ui);
    font-weight: 600;
    backdrop-filter: blur(4px);
}

.section-title {
    font-family: var(--font-ui);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.section-title .icon-badge {
    width: 30px; height: 30px;
    background: linear-gradient(135deg, var(--gold-1), var(--gold-2));
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
}

.price-table-wrap { overflow-x: auto; border-radius: var(--radius-md); border: 1px solid var(--border); }
.price-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--font-ui);
    font-size: 0.92rem;
}
.price-table thead th {
    background: var(--ink);
    color: var(--gold-1);
    padding: 11px 16px;
    text-align: center;
    font-weight: 700;
    white-space: nowrap;
}
.price-table thead th:first-child { border-radius: 0 var(--radius-md) 0 0; }
.price-table thead th:last-child  { border-radius: var(--radius-md) 0 0 0; }
.price-table tbody td {
    padding: 11px 16px;
    text-align: center;
    border-bottom: 1px solid var(--border);
    color: var(--ink-2);
    vertical-align: middle;
}
.price-table tbody tr:last-child td { border-bottom: none; }
.price-table tbody tr:hover td { background: var(--surface-2); }
.price-table .karat-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px; height: 36px;
    background: linear-gradient(135deg, var(--gold-1), var(--gold-2));
    border-radius: 50%;
    font-weight: 800;
    color: var(--gold-5);
    font-size: 0.9rem;
}
.price-value { font-weight: 600; color: var(--ink); }
.price-sar { color: var(--gold-4); font-weight: 700; }

.update-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
}
.date-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 5px 14px;
    font-family: var(--font-ui);
    font-size: 0.8rem;
    color: var(--ink-3);
}
.rate-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 5px 14px;
    font-family: var(--font-ui);
    font-size: 0.8rem;
    color: var(--ink-3);
}
.rate-chip strong { color: var(--gold-4); }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-ui);
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    min-height: 44px;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}
.btn::after {
    content: '';
    position: absolute; inset: 0;
    background: rgba(255,255,255,0);
    transition: background var(--transition);
}
.btn:hover::after { background: rgba(255,255,255,.1); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .55; cursor: not-allowed; }

.btn-primary {
    background: linear-gradient(135deg, var(--gold-4), var(--gold-3));
    color: var(--white);
    box-shadow: 0 3px 12px rgba(155,120,32,.30);
}
.btn-primary:hover { box-shadow: 0 5px 18px rgba(155,120,32,.40); }

.btn-outline {
    background: var(--white);
    border: 1.5px solid var(--border-2);
    color: var(--ink-2);
}
.btn-outline:hover { border-color: var(--gold-3); color: var(--gold-4); background: var(--surface-2); }

.btn-ghost {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--ink-3);
    font-size: 0.82rem;
    padding: 7px 14px;
    min-height: 36px;
}
.btn-ghost:hover { background: var(--surface-2); color: var(--ink-2); }

.btn-danger-outline {
    background: var(--white);
    border: 1.5px solid var(--danger-brd);
    color: var(--danger-txt);
    font-size: 0.85rem;
}
.btn-danger-outline:hover { background: var(--danger-bg); }

.btn-sm { padding: 6px 12px; min-height: 34px; font-size: 0.82rem; }
.btn-w { width: 100%; }

.btn-refresh {
    background: var(--ink);
    color: var(--gold-2);
    font-size: 0.85rem;
    padding: 8px 16px;
    min-height: 38px;
}
.btn-refresh:hover { background: var(--ink-2); }

.form-group { margin-bottom: 0; }
.form-label {
    display: block;
    font-family: var(--font-ui);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--ink-2);
    margin-bottom: 6px;
}
.form-control, .form-select {
    width: 100%;
    background: var(--white);
    border: 1px solid var(--border-2);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-family: var(--font-ui);
    font-size: 0.92rem;
    color: var(--ink);
    transition: var(--transition);
    min-height: 46px;
    outline: none;
    direction: ltr;
    text-align: right;
}
.form-control::placeholder { color: var(--ink-3); opacity: .7; direction: rtl; text-align: right; }
.form-control:focus, .form-select:focus {
    border-color: var(--gold-3);
    box-shadow: 0 0 0 3px rgba(201,168,76,.15);
}
.form-select { cursor: pointer; direction: rtl; text-align: right; }

.calc-tabs { display: flex; gap: 8px; margin-bottom: 22px; }
.calc-tab {
    flex: 1;
    padding: 11px 16px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    font-family: var(--font-ui);
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--ink-3);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}
.calc-tab:hover { border-color: var(--gold-3); color: var(--gold-4); }
.calc-tab.active {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--gold-2);
    box-shadow: var(--shadow-sm);
}
.calc-pane { display: none; }
.calc-pane.active { display: block; animation: fadeIn .2s ease; }

.input-row {
    display: grid;
    gap: 14px;
    align-items: end;
    margin-bottom: 16px;
}
.input-row-3 { grid-template-columns: 1fr 120px 1fr auto; }
.input-row-2 { grid-template-columns: 1fr 140px; }

.items-table-wrap { overflow-x: auto; border-radius: var(--radius-md); border: 1px solid var(--border); margin: 16px 0; }
.items-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--font-ui);
    font-size: 0.88rem;
}
.items-table thead th {
    background: var(--surface-3);
    color: var(--ink-2);
    padding: 10px 14px;
    text-align: center;
    font-weight: 700;
    white-space: nowrap;
    border-bottom: 1px solid var(--border);
}
.items-table tbody td {
    padding: 10px 14px;
    text-align: center;
    border-bottom: 1px solid var(--border);
    color: var(--ink-2);
    vertical-align: middle;
}
.items-table tbody tr:last-child td { border-bottom: none; }
.items-table tbody tr:hover td { background: var(--surface-2); }
.items-table .empty-row td { color: var(--ink-3); font-style: italic; padding: 20px; }

.result-section { display: none; }
.result-section.visible { display: block; animation: slideUp .3s ease; }

.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}
.result-mini {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px;
    text-align: center;
}
.result-mini.highlight {
    background: linear-gradient(135deg, var(--gold-1), #FFF9E8);
    border-color: var(--gold-2);
}
.mini-label {
    font-family: var(--font-ui);
    font-size: 0.78rem;
    color: var(--ink-3);
    margin-bottom: 6px;
    line-height: 1.4;
}
.mini-value {
    font-family: var(--font-ui);
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--ink);
    direction: ltr;
    unicode-bidi: plaintext;
}
.mini-value.gold { color: var(--gold-4); }

.fatwa-box {
    border-radius: var(--radius-md);
    padding: 18px 20px;
    margin: 16px 0;
    font-size: 0.93rem;
    line-height: 2;
    border-width: 1px;
    border-style: solid;
}
.fatwa-box.wajib  { background: var(--success-bg); border-color: var(--success-brd); color: var(--success-txt); }
.fatwa-box.nawajib { background: var(--warn-bg); border-color: var(--warn-brd); color: var(--warn-txt); }
.fatwa-box-title {
    font-family: var(--font-ui);
    font-weight: 800;
    font-size: 0.92rem;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 7px;
}

.method-box {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px;
    margin: 14px 0;
    font-size: 0.88rem;
    line-height: 2;
}
.method-box h6 {
    font-family: var(--font-ui);
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 8px;
    font-size: 0.88rem;
}
.method-formula {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-family: var(--font-ui);
    font-size: 0.88rem;
    direction: ltr;
    text-align: right;
    unicode-bidi: plaintext;
    margin-top: 8px;
}

.evidence-box {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-right: 4px solid var(--gold-3);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    margin: 14px 0;
}
.evidence-box h6 {
    font-family: var(--font-ui);
    font-weight: 700;
    color: var(--gold-4);
    margin-bottom: 10px;
    font-size: 0.88rem;
}

.breakdown-box {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px;
    margin: 14px 0;
    font-size: 0.88rem;
}
.breakdown-box h6 {
    font-family: var(--font-ui);
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 10px;
}
.breakdown-row {
    padding: 7px 0;
    border-bottom: 1px dashed var(--border);
    font-family: var(--font-ui);
    font-size: 0.85rem;
    color: var(--ink-2);
    line-height: 1.7;
}
.breakdown-row:last-child { border-bottom: none; }

.hawl-box {
    background: linear-gradient(135deg, #F9F3E4, #FFF9EC);
    border: 1px solid var(--gold-2);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 20px;
}
.hawl-title {
    font-family: var(--font-ui);
    font-weight: 700;
    font-size: 1rem;
    color: var(--gold-5);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.hawl-form { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: end; }
.hawl-entry {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    margin-top: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.hawl-entry-info { flex: 1; }
.hawl-entry-name {
    font-family: var(--font-ui);
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--ink);
}
.hawl-entry-date {
    font-family: var(--font-ui);
    font-size: 0.8rem;
    color: var(--ink-3);
    margin-top: 2px;
}
.hawl-progress { flex: 1; min-width: 100px; max-width: 200px; }
.hawl-progress-bar {
    height: 6px;
    background: var(--surface-3);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 4px;
}
.hawl-progress-fill {
    height: 100%;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--gold-3), var(--gold-2));
    transition: width .5s ease;
}
.hawl-progress-fill.done { background: linear-gradient(90deg, var(--success-txt), #2D9348); }
.hawl-pct {
    font-family: var(--font-ui);
    font-size: 0.75rem;
    color: var(--ink-3);
    text-align: center;
}
.hawl-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 999px;
    font-family: var(--font-ui);
    font-size: 0.78rem;
    font-weight: 700;
    flex-shrink: 0;
}
.hawl-status-badge.pending { background: var(--warn-bg); color: var(--warn-txt); border: 1px solid var(--warn-brd); }
.hawl-status-badge.due     { background: var(--success-bg); color: var(--success-txt); border: 1px solid var(--success-brd); }
.hawl-status-badge.near    { background: #FFF0E0; color: #8C4A00; border: 1px solid #F0B060; }

.manual-prices-wrap {
    background: #FFFBF0;
    border: 1px solid var(--warn-brd);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-top: 14px;
    display: none;
}
.manual-prices-wrap.visible { display: block; animation: fadeIn .25s ease; }
.manual-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-top: 12px; }

.faq-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.faq-tab {
    padding: 7px 14px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface-2);
    font-family: var(--font-ui);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--ink-3);
    cursor: pointer;
    transition: var(--transition);
}
.faq-tab:hover { border-color: var(--gold-3); color: var(--gold-4); }
.faq-tab.active { background: var(--ink); border-color: var(--ink); color: var(--gold-2); }
.faq-pane { display: none; }
.faq-pane.active { display: block; animation: fadeIn .2s ease; }

.accordion { border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; }
.accordion-item:not(:last-child) { border-bottom: 1px solid var(--border); }
.accordion-btn {
    width: 100%;
    background: none;
    border: none;
    padding: 14px 18px;
    text-align: right;
    font-family: var(--font-ui);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--ink);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    transition: var(--transition);
}
.accordion-btn:hover { background: var(--surface-2); }
.accordion-btn.open { color: var(--gold-4); background: var(--surface-2); }
.accordion-btn .arrow {
    width: 20px; height: 20px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: var(--surface-3);
    font-size: 10px;
    transition: transform var(--transition);
    flex-shrink: 0;
}
.accordion-btn.open .arrow { transform: rotate(180deg); background: var(--gold-2); }
.accordion-body {
    display: none;
    padding: 14px 18px;
    background: var(--white);
    font-size: 0.9rem;
    line-height: 2;
    color: var(--ink-2);
    border-top: 1px solid var(--border);
}
.accordion-body.open { display: block; animation: fadeIn .2s ease; }
.source-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--gold-4);
    text-decoration: none;
    font-family: var(--font-ui);
    font-size: 0.82rem;
    font-weight: 700;
    margin-top: 10px;
    transition: var(--transition);
}
.source-link:hover { color: var(--gold-5); text-decoration: underline; }

.notice-box {
    background: var(--warn-bg);
    border: 1px solid var(--warn-brd);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    font-size: 0.88rem;
    line-height: 1.9;
    color: var(--warn-txt);
}
.notice-box a { color: var(--gold-4); font-weight: 700; text-decoration: none; }
.notice-box a:hover { text-decoration: underline; }

.scale-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-top: 14px; }
.scale-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition);
}
.scale-card:hover { border-color: var(--gold-2); box-shadow: var(--shadow-sm); }
.scale-img {
    height: 120px;
    display: flex; align-items: center; justify-content: center;
    background: var(--surface-2);
    position: relative;
}
.scale-device-draw {
    width: 100px; height: 80px;
    border: 2px solid var(--border-2);
    border-radius: 12px;
    background: var(--surface-3);
    position: relative;
    display: flex; align-items: center; justify-content: center;
}
.scale-screen-draw {
    width: 70px; height: 28px;
    background: var(--ink);
    border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    font-family: monospace;
    font-size: 12px;
    color: var(--gold-2);
    font-weight: 700;
    position: absolute;
    top: 12px;
}
.scale-platform {
    width: 80px; height: 10px;
    background: var(--white);
    border: 2px solid var(--border-2);
    border-radius: 4px;
    position: absolute;
    bottom: 12px;
}
.scale-body { padding: 14px; }
.scale-name {
    font-family: var(--font-ui);
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--ink);
    margin-bottom: 4px;
}
.scale-note { font-size: 0.8rem; color: var(--ink-3); line-height: 1.6; }
.scale-price {
    font-family: var(--font-ui);
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--gold-4);
    margin-top: 8px;
}
.scale-src {
    display: inline-block;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 1px 7px;
    font-family: var(--font-ui);
    font-size: 0.72rem;
    color: var(--ink-3);
    margin-bottom: 4px;
}

.rating-section { text-align: center; }
.stars-display { display: flex; justify-content: center; gap: 6px; margin: 12px 0; }
.star-btn {
    font-size: 28px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--border-2);
    transition: var(--transition);
    line-height: 1;
    padding: 2px;
}
.star-btn:hover, .star-btn.active { color: var(--gold-2); transform: scale(1.15); }
.rating-avg {
    font-family: var(--font-ui);
    font-size: 2rem;
    font-weight: 800;
    color: var(--gold-3);
}
.rating-count {
    font-family: var(--font-ui);
    font-size: 0.82rem;
    color: var(--ink-3);
}

.site-footer {
    background: var(--ink);
    color: var(--gold-1);
    padding: 28px 0;
    margin-top: 20px;
}
.footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
}
.footer-dua {
    font-family: var(--font-main);
    font-size: 1rem;
    color: var(--gold-2);
}
.footer-copy {
    font-family: var(--font-ui);
    font-size: 0.8rem;
    color: var(--gold-1);
    opacity: .75;
}
.footer-copy a { color: var(--gold-2); text-decoration: none; font-weight: 700; }
.footer-copy a:hover { text-decoration: underline; }
.footer-counter {
    font-family: var(--font-ui);
    font-size: 0.78rem;
    color: var(--gold-1);
    opacity: .6;
    display: flex; align-items: center; gap: 6px;
}
.footer-counter strong { color: var(--gold-2); opacity: 1; }

@media print {
    .site-header, .site-footer, .calc-tabs, .hero-banner,
    .hawl-box, .scale-grid, .faq-tabs, .faq-pane,
    .btn, .input-row, .items-table-wrap, .no-print,
    .accordion, .notice-box { display: none !important; }
    body { background: #fff; color: #000; font-size: 12pt; }
    .section-card { box-shadow: none; border: 1px solid #ccc; margin-bottom: 10px; padding: 12px; }
    .result-section { display: block !important; }
    .result-grid { grid-template-columns: repeat(4, 1fr); }
    .print-header { display: block !important; text-align: center; margin-bottom: 20px; }
    a[href]::after { content: ""; }
}
.print-header { display: none; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse { 0%,100% { opacity:1; } 50% { opacity:.5; } }
.loading-pulse { animation: pulse 1.2s ease infinite; }

@media (max-width: 768px) {
    .section-card { padding: 18px; border-radius: var(--radius-md); }
    .hero-banner { padding: 22px 18px; }
    .input-row-3 { grid-template-columns: 1fr 1fr; }
    .input-row-3 .btn-w { grid-column: span 2; }
    .input-row-2 { grid-template-columns: 1fr; }
    .result-grid { grid-template-columns: 1fr 1fr; }
    .hawl-form { grid-template-columns: 1fr; }
    .calc-tabs { flex-direction: column; }
    .header-inner { height: 56px; }
    .header-title { font-size: 0.9rem; }
    .price-table font-size { font-size: 0.82rem; }
}
@media (max-width: 480px) {
    .container { padding: 0 14px; }
    .result-grid { grid-template-columns: 1fr; }
    .hero-title { font-size: 1.2rem; }
    .manual-row { grid-template-columns: 1fr; }
}
.hawl-alert-strip {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 999;
    background: var(--white);
    border: 1px solid var(--gold-2);
    border-right: 4px solid var(--gold-3);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    box-shadow: var(--shadow-lg);
    max-width: 300px;
    font-family: var(--font-ui);
    font-size: 0.84rem;
    line-height: 1.7;
    animation: slideUp .3s ease;
    display: none;
}
.hawl-alert-strip.show { display: block; }
.hawl-alert-strip-title { font-weight: 700; color: var(--gold-4); margin-bottom: 4px; }
.hawl-alert-strip-close {
    position: absolute; top: 8px; left: 8px;
    background: none; border: none; cursor: pointer;
    color: var(--ink-3); font-size: 14px; padding: 2px;
}

.input-panel{background:var(--surface-2);border:1px solid var(--border);border-radius:var(--radius-md);padding:20px;margin-bottom:18px;}
.input-row-4{display:grid;grid-template-columns:1fr 110px 1fr auto;gap:14px;align-items:end;}
.actions-row{display:flex;gap:10px;margin-top:4px;flex-wrap:wrap;}
.actions-row .btn{flex:1;min-width:140px;}
.result-section{margin-top:22px;}
.result-section .result-grid{margin-bottom:16px;}
.result-section .fatwa-box{margin-top:0;}
.result-section .breakdown-box,.result-section .method-box,.result-section .evidence-box{margin-top:14px;}
.rating-layout{display:grid;grid-template-columns:340px 1fr;gap:28px;align-items:start;}
.rating-submit-col{text-align:center;}
.rating-reviews-col{border-right:1px solid var(--border);padding-right:24px;}
.reviews-title{font-family:var(--font-ui);font-weight:700;font-size:.95rem;color:var(--ink);margin-bottom:14px;display:flex;align-items:center;gap:7px;}
.review-item{padding:12px 0;border-bottom:1px solid var(--border);}
.review-item:last-child{border-bottom:none;}
.review-header{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:4px;}
.review-name{font-family:var(--font-ui);font-weight:700;font-size:.88rem;color:var(--ink);}
.review-stars{display:flex;gap:1px;}
.review-date{font-family:var(--font-ui);font-size:.75rem;color:var(--ink-3);margin-right:auto;}
.review-note{font-family:var(--font-ui);font-size:.85rem;color:var(--ink-2);line-height:1.7;padding-right:2px;}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;}
@media(max-width:900px){.rating-layout{grid-template-columns:1fr;}.rating-reviews-col{border-right:none;border-top:1px solid var(--border);padding-right:0;padding-top:20px;}}
@media(max-width:768px){.input-row-4{grid-template-columns:1fr 1fr;}.input-row-4>div:nth-child(4){grid-column:span 2;}.actions-row .btn{flex:1 1 calc(50% - 5px);}}
@media(max-width:480px){.input-row-4{grid-template-columns:1fr;}.input-row-4>div:nth-child(4){grid-column:auto;}.actions-row .btn{flex:1 1 100%;}}

.section-weighing .weighing-intro{font-family:var(--font-ui);font-size:.9rem;color:var(--ink-2);line-height:2;margin-bottom:18px;}
.weighing-tip-row{display:grid;grid-template-columns:1fr 1fr;gap:14px;}
.weighing-tip{display:flex;gap:14px;background:var(--surface-2);border:1px solid var(--border);border-radius:var(--radius-md);padding:16px;}
.weighing-tip-icon{width:38px;height:38px;background:linear-gradient(135deg,var(--gold-1),var(--gold-2));border-radius:10px;display:flex;align-items:center;justify-content:center;color:var(--gold-5);font-size:16px;flex-shrink:0;}
.weighing-tip-title{font-family:var(--font-ui);font-weight:700;font-size:.88rem;color:var(--ink);margin-bottom:4px;}
.weighing-tip-text{font-family:var(--font-ui);font-size:.83rem;color:var(--ink-2);line-height:1.75;}
@media(max-width:600px){.weighing-tip-row{grid-template-columns:1fr;}}

.small-desc { font-family:var(--font-ui); font-size:.82rem; color:var(--ink-3); line-height:1.8; margin-bottom:16px; }
