/* «المستشار» — مسرح الواجهة التفاعلي (cc-*). الفيديو بيفضل شغال ورا زجاج غامق؛ الكارت اللي الصوت بيتكلم عنه بينوّر نحاسي.
   prefers-reduced-motion: من غير حركة ولا لمعة (التمييز بالإطار بس). */
.cc-invite { position: relative; margin-top: 18px; display: inline-flex; align-items: center; gap: 12px; min-height: 46px; padding: 6px 18px 6px 8px; border-radius: 999px;
    border: 1px solid rgba(216, 188, 124, .55); background: rgba(23, 19, 16, .45); color: #F7F2EA; font: inherit; font-size: .95rem; cursor: pointer;
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); opacity: 0; transform: translateY(8px); transition: opacity .5s var(--md-ease), transform .5s var(--md-ease), border-color .3s; }
[dir=rtl] .cc-invite { padding: 6px 8px 6px 18px; }
.cc-invite.is-on { opacity: 1; transform: none; }
.cc-invite:hover { border-color: #D8BC7C; }
.cc-invite[hidden] { display: none; }
.cc-invite .cc-orb { width: 32px; height: 32px; background: var(--md-accent); color: #171310; }
.cc-invite .cc-orb i { animation: ccBar 1.2s ease-in-out infinite; background: #171310; }
.cc-invite::after { content: ""; position: absolute; inset: -4px; border-radius: inherit; border: 1px solid rgba(216, 188, 124, .5); animation: ccRing 2.4s ease-out infinite; pointer-events: none; }

html.cc-lock { overflow: hidden; }
.cc { position: fixed; inset: 0; z-index: 9990; display: grid; place-items: center; color: #F7F2EA; font-size: 16px; }
.cc[hidden] { display: none; }
.cc-veil { position: absolute; inset: 0; background: rgba(15, 12, 10, .62); -webkit-backdrop-filter: blur(6px) saturate(1.1); backdrop-filter: blur(6px) saturate(1.1); opacity: 0; transition: opacity .3s; }
.cc.is-on .cc-veil { opacity: 1; }
.cc-panel { position: relative; width: min(1040px, 100% - 32px); max-height: min(92vh, 860px); display: grid; grid-template-rows: auto 1fr auto; border-radius: 18px; overflow: hidden;
    background: linear-gradient(180deg, rgba(34, 28, 23, .92), rgba(23, 19, 16, .96)); border: 1px solid rgba(216, 188, 124, .22); box-shadow: 0 40px 120px rgba(0, 0, 0, .55);
    opacity: 0; transform: translateY(18px) scale(.985); transition: opacity .35s var(--md-ease), transform .45s var(--md-ease); }
.cc.is-on .cc-panel { opacity: 1; transform: none; }
.cc-top { display: flex; align-items: center; gap: 10px; padding: 14px 16px; }
.cc-sp { flex: 1; }
.cc-ic { width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(247, 242, 234, .22); background: rgba(247, 242, 234, .04); color: inherit; display: inline-grid; place-items: center; cursor: pointer; }
.cc-ic:hover { border-color: #D8BC7C; }
.cc-ic svg { width: 18px; height: 18px; }
.cc-ic[hidden] { display: none; }
.cc-prog { display: flex; gap: 6px; }
.cc-prog i { width: 26px; height: 4px; border-radius: 4px; background: rgba(247, 242, 234, .18); transition: background .3s, width .3s; }
.cc-prog i.is-done { background: rgba(216, 188, 124, .6); }
.cc-prog i.is-on { background: #D8BC7C; width: 40px; }

.cc-body { overflow: auto; padding: 4px clamp(16px, 4vw, 40px) 22px; overscroll-behavior: contain; }
.cc-q { font-family: var(--md-display); font-size: clamp(1.6rem, 3.4vw, 2.4rem); line-height: 1.25; margin: 4px 0 6px; color: #F7F2EA; outline: none; }
.cc-sub { color: #CFC5B8; margin: 0 0 16px; }
.cc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); gap: 14px; margin-top: 14px; }
.cc-card { position: relative; display: flex; align-items: flex-end; aspect-ratio: 3 / 4; padding: 0; border: 1px solid rgba(247, 242, 234, .14); border-radius: 14px; overflow: hidden;
    background: #2a221c; color: #F7F2EA; font: inherit; text-align: start; cursor: pointer; text-decoration: none; isolation: isolate;
    transition: transform .45s var(--md-ease), opacity .4s, border-color .3s, box-shadow .45s; }
.cc-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform 1.2s var(--md-ease), filter .4s; }
.cc-card::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(15, 12, 10, .92) 0%, rgba(15, 12, 10, .35) 55%, rgba(15, 12, 10, .1) 100%); }
.cc-card.no-img { background: radial-gradient(120% 80% at 50% 0%, #3a2f25, #1f1915); }
.cc-card-t { display: grid; gap: 2px; padding: 14px; }
.cc-card-t b { font-size: 1.08rem; line-height: 1.35; }
.cc-card-t small { color: #CFC5B8; font-size: .82rem; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cc-card:hover, .cc-card:focus-visible { border-color: rgba(216, 188, 124, .7); }
.cc-card:hover img { transform: scale(1.05); }
/* الصوت بيتكلم عن الكارت ده */
.cc-grid.is-cueing .cc-card:not(.is-cue) { opacity: .5; }
.cc-grid.is-cueing .cc-card:not(.is-cue) img { filter: saturate(.6) brightness(.8); }
.cc-card.is-cue { transform: translateY(-6px) scale(1.035); border-color: #D8BC7C; box-shadow: 0 0 0 1px rgba(216, 188, 124, .6), 0 18px 50px rgba(216, 188, 124, .28), 0 0 60px rgba(216, 188, 124, .22); z-index: 1; }
.cc-card.is-cue img { transform: scale(1.08); }
.cc-card.is-cue::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
    background: linear-gradient(115deg, transparent 30%, rgba(255, 236, 190, .28) 48%, transparent 66%); background-size: 250% 100%; animation: ccShine 1.6s var(--md-ease) both; }
.cc-card--menu { aspect-ratio: 4 / 3; }
.cc-card--menu.is-sel { border-color: #D8BC7C; box-shadow: 0 0 0 2px #D8BC7C inset; }
.cc-est { color: #EBD7A8 !important; font-weight: 600; }
.cc-grid--menus { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.cc-grid--menus > :only-child { max-width: 420px; }

.cc-chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 16px; }
.cc-chip { min-height: 50px; padding: 0 22px; border-radius: 999px; border: 1px solid rgba(247, 242, 234, .25); background: rgba(247, 242, 234, .05); color: inherit; font: inherit; cursor: pointer; transition: border-color .2s, background .2s, transform .2s; }
.cc-chip:hover, .cc-chip[aria-pressed=true] { border-color: #D8BC7C; background: rgba(216, 188, 124, .14); }
.cc-exact { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.cc-in { min-height: 48px; padding: 0 16px; border-radius: 12px; border: 1px solid rgba(247, 242, 234, .25); background: rgba(247, 242, 234, .06); color: inherit; font: inherit; min-width: 180px; color-scheme: dark; }
.cc-in:focus { outline: 2px solid #D8BC7C; outline-offset: 2px; }
.cc-day { min-height: 1.6em; margin: 10px 0 0; font-size: .92rem; color: #CFC5B8; }
.cc-day.is-ok { color: #A8D5A2; } .cc-day.is-busy { color: #EBD7A8; } .cc-day.is-full { color: #F2A7A0; }
.cc-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.cc-cta .md-btn--ghost { color: #F7F2EA; }

.cc-cap { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid rgba(247, 242, 234, .1); background: rgba(15, 12, 10, .55); min-height: 64px; }
.cc-cap-t { flex: 1; margin: 0; font-size: 1rem; line-height: 1.6; color: #F1E9DD; }
.cc-skip { background: none; border: 0; color: #CFC5B8; font: inherit; font-size: .9rem; cursor: pointer; min-height: 44px; padding: 0 8px; text-decoration: underline; text-underline-offset: 3px; }
.cc-orb { flex: none; width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; gap: 3px; background: rgba(216, 188, 124, .14); border: 1px solid rgba(216, 188, 124, .4); }
.cc-orb i { width: 3px; height: 10px; border-radius: 3px; background: #D8BC7C; transform-origin: center; }
.cc-orb.is-on i { animation: ccBar .9s ease-in-out infinite; }
.cc-orb i:nth-child(2) { animation-delay: .15s !important; } .cc-orb i:nth-child(3) { animation-delay: .3s !important; }

@keyframes ccBar { 0%, 100% { transform: scaleY(.5); } 50% { transform: scaleY(1.7); } }
@keyframes ccShine { from { background-position: 120% 0; } to { background-position: -40% 0; } }
@keyframes ccRing { 0% { opacity: .9; transform: scale(1); } 100% { opacity: 0; transform: scale(1.18); } }

@media (max-width: 760px) {
    .cc { place-items: end stretch; }
    .cc-panel { width: 100%; max-height: 100%; height: 100%; border-radius: 0; border: 0; padding-bottom: env(safe-area-inset-bottom); }
    .cc-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .cc-grid--menus { grid-template-columns: 1fr; }
    .cc-card { aspect-ratio: 3 / 4; }
    .cc-card--menu { aspect-ratio: 16 / 9; }
    .cc-card-t { padding: 10px; } .cc-card-t b { font-size: .98rem; }
    .cc-card-t small { -webkit-line-clamp: 1; }
    .cc-row .md-btn { flex: 1 1 100%; }
    .cc-invite { width: 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
    .cc-invite, .cc-panel, .cc-veil, .cc-card, .cc-card img { transition: none !important; }
    .cc-invite::after, .cc-card.is-cue::after { display: none; }
    .cc-orb i, .cc-invite .cc-orb i { animation: none !important; }
    .cc-card.is-cue, .cc-card.is-cue img { transform: none; }
}
