@font-face { font-family: "Aref Ruqaa"; src: url(/static/fonts/ArefRuqaa-Bold.ttf) format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Aref Ruqaa"; src: url(/static/fonts/ArefRuqaa-Regular.ttf) format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Almarai"; src: url(/static/fonts/Almarai-Regular.ttf) format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Almarai"; src: url(/static/fonts/Almarai-Bold.ttf) format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Almarai"; src: url(/static/fonts/Almarai-ExtraBold.ttf) format("truetype"); font-weight: 800; font-display: swap; }

:root {
  --plum: #63334D; --plum-2: #4A2439; --rose: #C84F79; --gold: #C8A46A; --peach: #F6C6B5; --cream: #FFF9F1;
  --ink: #2E1A26; --muted: #8A6F7D; --line: #EEDFD6; --card: #FFFFFF; --ok: #2F8A5B; --bad: #B83A4B;
  --r: 18px; --shadow: 0 10px 30px rgba(99, 51, 77, .10);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--cream); color: var(--ink); font-family: "Almarai", system-ui, sans-serif; line-height: 1.7; }
a { color: var(--rose); text-decoration: none; }
img, video { max-width: 100%; display: block; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.ruqaa { font-family: "Aref Ruqaa", serif; font-weight: 700; }

/* header / footer */
.top { background: rgba(255, 249, 241, .9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 14px; height: 64px; }
.top .logo { margin-inline-end: auto; }
.top .logo img { height: 40px; width: auto; }
.topnav { display: none; gap: 20px; font-weight: 700; font-size: 15px; }
.topnav a { color: var(--plum); }
.topnav a:hover { color: var(--rose); }
@media (min-width: 760px) { .topnav { display: flex; } }
.menu-btn { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: #fff; display: grid; place-content: center; gap: 4px; cursor: pointer; padding: 0; }
.menu-btn span { width: 4px; height: 4px; border-radius: 50%; background: var(--plum); display: block; }
.menu-btn:hover { border-color: var(--gold); }
.foot { background: var(--plum); color: #F3E3EA; margin-top: 72px; padding-block: 40px; font-size: 14px; }
.foot .wrap { display: grid; gap: 22px; }
.foot-brand img { height: 46px; width: auto; }
.foot-brand p { margin: 8px 0 0; color: #E9D3DE; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.foot a { color: var(--peach); }
.foot-pay { margin: 0; color: #CFB3C2; font-size: 13px; }
@media (min-width: 760px) { .foot .wrap { grid-template-columns: 1fr auto; align-items: end; } .foot-pay { grid-column: 1 / -1; } }

/* side menu */
.scrim { position: fixed; inset: 0; background: rgba(46, 26, 38, .45); z-index: 40; opacity: 0; transition: opacity .3s ease-out; }
.scrim.on { opacity: 1; }
.drawer { position: fixed; z-index: 41; top: 0; bottom: 0; inset-inline-end: 0; width: min(340px, 88vw); background: var(--cream); box-shadow: 0 0 40px rgba(46, 26, 38, .25);
  transform: translateX(-105%); transition: transform .35s cubic-bezier(.2, .7, .2, 1); display: flex; flex-direction: column;
  padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); visibility: hidden; }
.drawer.on { transform: translateX(0); visibility: visible; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.drawer-head img { height: 36px; width: auto; }
.drawer-x { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: #fff; font-size: 16px; color: var(--plum); cursor: pointer; }
.drawer-body { overflow-y: auto; padding: 8px 18px 28px; }
.drawer h3 { font: 700 22px/1.4 "Aref Ruqaa", serif; color: var(--plum); margin: 18px 0 8px; }
.dsec { border-bottom: 1px solid var(--line); }
.dsec summary { display: flex; justify-content: space-between; align-items: center; padding: 11px 0; font-weight: 800; color: var(--ink); cursor: pointer; list-style: none; }
.dsec summary::-webkit-details-marker { display: none; }
.dsec summary small { color: var(--muted); font-weight: 400; }
.dsec summary::after { content: "+"; color: var(--gold); font-size: 20px; margin-inline-start: 10px; }
.dsec[open] summary::after { content: "−"; }
.dsec a { display: flex; justify-content: space-between; padding: 7px 14px 7px 0; color: var(--plum); font-size: 15px; }
.dsec a:last-child { padding-bottom: 12px; }
.dsec a small { color: var(--muted); }
.dsoon { color: var(--muted); font-size: 14px; margin: 12px 0 0; line-height: 2; }
.dlink { display: block; padding: 9px 0; color: var(--plum); font-weight: 700; border-bottom: 1px solid var(--line); }
.mine { display: grid; gap: 8px; }
.mine-empty { color: var(--muted); font-size: 14px; margin: 0; }
.mine a { display: block; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 9px 12px; color: var(--ink); }
.mine a b { display: block; font-size: 15px; }
.mine a span { color: var(--muted); font-size: 13px; }
body.locked { overflow: hidden; }

/* home hero: the envelope */
.hero2 { display: grid; gap: 28px; align-items: center; padding-block: 36px 12px; }
.hero2-text { min-width: 0; }
.hero2 h1 { font-family: "Aref Ruqaa", serif; font-weight: 700; font-size: clamp(42px, 9vw, 74px); line-height: 1.25; color: var(--plum); margin: 0; text-wrap: balance; }
.hero2 p { color: var(--muted); font-size: clamp(16px, 2.3vw, 19px); max-width: 34em; margin: 14px 0 0; }
.hero2 .lead { color: var(--ink); }
.facts { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.facts li { font-size: 14px; font-weight: 700; color: var(--plum); background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px 6px 12px; display: flex; align-items: center; gap: 6px; }
.facts li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); }
.hero2-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }

@media (min-width: 860px) { .envelope { --w: 340px; } .hero2 { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); padding-block: 56px 24px; } }

.envelope { --w: min(300px, 78vw); --eh: calc(var(--w) * .64); --h: calc(var(--w) * 1.3); position: relative; width: var(--w); height: var(--h); margin: 0 auto; perspective: 900px; }
.env-back, .env-pocket { position: absolute; inset-inline: 0; bottom: 0; height: var(--eh); border-radius: 14px; }
.env-back { background: var(--plum-2); }
.env-slot { position: absolute; inset: 0; overflow: hidden; }
.env-card { position: absolute; z-index: 2; inset-inline-start: 50%; bottom: calc(var(--w) * .1); width: calc(var(--w) * .64); aspect-ratio: 9 / 16; max-width: 100%;
  margin-inline-start: calc(var(--w) * -.32); border-radius: 16px; overflow: hidden; background: #000; box-shadow: 0 18px 40px rgba(74, 36, 57, .35);
  outline: 1.5px solid var(--gold); outline-offset: 3px; animation: env-rise 1s cubic-bezier(.2, .7, .2, 1) 1.45s both; }
.env-card video { width: 100%; height: 100%; object-fit: cover; }
.env-pocket { z-index: 3; background: var(--plum); clip-path: polygon(0 0, 50% 56%, 100% 0, 100% 100%, 0 100%); }
.env-flap { position: absolute; z-index: 4; inset-inline: 0; height: calc(var(--w) * .38); transform-origin: top center;
  background: color-mix(in srgb, var(--plum) 82%, var(--peach)); clip-path: polygon(0 0, 100% 0, 50% 100%); border-radius: 14px 14px 0 0;
  animation: env-open .75s cubic-bezier(.2, .7, .2, 1) .85s both; }
.env-flap { top: calc(var(--h) - var(--eh)); bottom: auto; }
.env-seal { position: absolute; z-index: 5; width: 64px; height: 64px; inset-inline-start: 50%; margin-inline-start: -32px; top: calc(var(--h) - var(--eh) + var(--w) * .38 - 40px);
  padding: 10px; border-radius: 50%; background: var(--plum-2); border: 2px solid var(--gold); animation: env-seal .5s ease-in .45s both; }
@keyframes env-seal { to { transform: scale(1.25); opacity: 0; } }
@keyframes env-open { 0% { transform: rotateX(0); z-index: 4; } 49% { z-index: 4; } 50% { z-index: 1; } 100% { transform: rotateX(180deg); z-index: 1; } }
@keyframes env-rise { from { transform: translateY(calc(var(--w) * .78)); } to { transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) {
  .env-card, .env-flap, .env-seal { animation-duration: 1ms; animation-delay: 0s; }
}

/* steps joined by a stitched line */
.how .sec { margin-top: 28px; }
.stitch { list-style: none; margin: 8px 0 0; padding: 0; display: grid; position: relative; }
.stitch::before { content: ""; position: absolute; inset-inline-start: 22px; top: 32px; bottom: 32px; border-inline-start: 2px dotted var(--gold); }
.stitch li { display: flex; align-items: center; gap: 14px; padding-block: 9px; position: relative; font-weight: 700; }
.stitch b { flex: none; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; background: var(--cream); border: 1.5px solid var(--gold);
  color: var(--gold); font: 700 24px/1 "Aref Ruqaa", serif; }
@media (min-width: 720px) {
  .stitch { grid-template-columns: repeat(4, 1fr); text-align: center; }
  .stitch::before { inset-inline: 12.5%; top: 32px; bottom: auto; border-inline-start: 0; border-top: 2px dotted var(--gold); }
  .stitch li { flex-direction: column; padding: 9px 8px; }
}

h2.sec { font-family: "Aref Ruqaa", serif; color: var(--plum); font-size: clamp(28px, 5vw, 36px); margin: 40px 0 8px; line-height: 1.35; text-wrap: balance; }
.sub { color: var(--muted); margin: 0 0 18px; }

/* occasions */
.cats2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.cat2 { position: relative; display: block; border-radius: var(--r); overflow: hidden; background: var(--plum); color: #fff; aspect-ratio: 4 / 5; max-width: 100%; }
.cat2 img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.cat2 .t { position: absolute; inset: auto 0 0 0; padding: 70px 14px 14px; background: linear-gradient(rgba(74, 36, 57, 0), rgba(74, 36, 57, .94) 62%); }
.cat2 h3 { margin: 0; font: 700 clamp(24px, 5vw, 34px)/1.3 "Aref Ruqaa", serif; }
.cat2 small { opacity: .92; font-size: 13px; }
@media (min-width: 720px) { .cat2 { aspect-ratio: 16 / 10; } }
.soon-list { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; color: var(--muted); font-size: 15px; margin: 16px 0 0; }
.pill { display: inline-block; background: var(--gold); color: var(--plum-2); border-radius: 999px; padding: 2px 12px; font-size: 13px; font-weight: 800; }

/* design rail */
.rail-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.rail-head .more { font-weight: 800; white-space: nowrap; }
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: 44%; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 10px; overscroll-behavior-x: contain; }
.rail .card { scroll-snap-align: start; }
@media (min-width: 720px) { .rail { grid-auto-columns: 196px; } }

/* home tabs */
.tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin: 4px 0 6px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; font: 800 15px "Almarai", sans-serif; color: var(--plum); background: #fff; border: 1.5px solid var(--line); border-radius: 999px; padding: 9px 16px; cursor: pointer; transition: background .2s ease-out, color .2s ease-out, border-color .2s ease-out; }
.tab small { font-weight: 400; color: var(--muted); }
.tab[aria-selected="true"] { background: var(--plum); color: #fff; border-color: var(--plum); }
.tab[aria-selected="true"] small { color: var(--peach); }
.tabpanel .sub { margin-top: 6px; }
.tabpanel.fade { animation: tabin .35s cubic-bezier(.2, .7, .2, 1); }
@keyframes tabin { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.more-card { display: grid; place-items: center; text-align: center; background: var(--plum); color: #fff; font: 700 22px/1.5 "Aref Ruqaa", serif; aspect-ratio: 9 / 16; border-color: var(--plum); }
.more-card span { padding: 12px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 14px 0; font-weight: 800; font-size: 16px; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--gold); font-size: 22px; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0 0 16px; color: var(--muted); max-width: 46em; }
.about { max-width: 760px; }
.about p { max-width: 42em; }
.about .lead { font-size: 19px; color: var(--plum); font-weight: 700; }
.ticks { padding: 0; list-style: none; display: grid; gap: 10px; }
.ticks li { display: flex; gap: 10px; }
.ticks li::before { content: "✓"; color: var(--gold); font-weight: 800; }
.empty { color: var(--muted); }
.chips small { font-weight: 400; opacity: .75; }
.chips-style { margin-top: -6px; }
.chips-style a { background: transparent; }
.codebox label { font-weight: 700; }
.coderow { display: flex; gap: 8px; align-items: stretch; }
.coderow input { margin-top: 6px; text-transform: uppercase; letter-spacing: .04em; direction: ltr; text-align: right; }
.coderow .btn { margin-top: 6px; flex: none; }
.codemsg { margin: 6px 0 0; font-size: 14px; min-height: 1.2em; }
.codemsg.ok { color: var(--ok); }
.codemsg.bad { color: var(--bad); }
.price s { color: var(--muted); font-weight: 400; font-size: 16px; margin-inline-start: 8px; }

/* theme grid */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.chips a { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 14px; color: var(--plum); font-size: 14px; font-weight: 700; }
.chips a.on { background: var(--plum); color: #fff; border-color: var(--plum); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.card { display: block; background: var(--card); border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); color: var(--ink); box-shadow: var(--shadow); }
.card .ph { aspect-ratio: 9 / 16; background: #EADBD3 center / cover no-repeat; position: relative; }
.card .ph::after { content: "▶"; position: absolute; inset: auto auto 10px 10px; width: 34px; height: 34px; border-radius: 50%; background: rgba(255, 255, 255, .9); color: var(--plum); display: grid; place-items: center; font-size: 13px; }
.card .ph video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card .ph.playing::after { opacity: 0; }
.card .nm { padding: 10px 12px 12px; }
.card .nm b { display: block; font-size: 15px; }
.card .nm span { color: var(--muted); font-size: 13px; }

/* theme page */
.split { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 32px; align-items: start; padding-top: 28px; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; gap: 20px; } }
.player { border-radius: 22px; overflow: hidden; background: #000; box-shadow: var(--shadow); aspect-ratio: 9 / 16; }
.player video { width: 100%; height: 100%; object-fit: cover; }
.note { font-size: 13px; color: var(--muted); text-align: center; margin-top: 8px; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; box-shadow: var(--shadow); }
.panel h1 { font-family: "Aref Ruqaa", serif; color: var(--plum); margin: 0; font-size: 38px; line-height: 1.3; }
.meta { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--muted); font-size: 14px; margin-top: 4px; }
.price { font-size: 22px; font-weight: 800; color: var(--rose); margin: 4px 0 14px; }
label.f { display: block; margin: 0 0 14px; font-weight: 700; font-size: 15px; }
label.f small { color: var(--muted); font-weight: 400; }
input, select, textarea { width: 100%; font: inherit; font-size: 16px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: #FFFDFB; color: var(--ink); margin-top: 6px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--rose); box-shadow: 0 0 0 3px rgba(200, 79, 121, .15); }
textarea { min-height: 84px; resize: vertical; }
div.f { margin: 0 0 14px; font-weight: 700; font-size: 15px; }
.picks { display: flex; gap: 8px; }
.picks select { flex: 1 1 0; min-width: 0; padding-inline: 8px; }
.picks select[name$="_m"] { flex-grow: 1.9; }
.timebox { flex: 1.4 1 0; min-width: 0; display: flex; align-items: center; gap: 4px; }
.timebox input { text-align: center; padding-inline: 6px; font-weight: 800; }
.timebox span { font-weight: 800; color: var(--muted); margin-top: 6px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 420px) { .row2 { grid-template-columns: 1fr; } }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 14px; padding: 14px 22px; font: inherit; font-weight: 800; font-size: 17px; cursor: pointer; background: var(--rose); color: #fff; text-align: center; }
.btn:hover { filter: brightness(1.05); }
.btn:active { transform: translateY(1px); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.btn.block { width: 100%; }
.btn.plum { background: var(--plum); }
.btn.gold { background: var(--gold); color: var(--plum-2); }
.btn.ghost { background: transparent; color: var(--plum); border: 1.5px solid var(--plum); }
.btn.wa { background: #1FA855; }
.btn.sm { padding: 8px 14px; font-size: 14px; border-radius: 10px; }
.errors { background: #FCEBEC; color: var(--bad); border-radius: 12px; padding: 12px 16px; margin: 0 0 14px; }
.errors ul { margin: 0; padding: 0 18px 0 0; }
.trust { display: flex; flex-wrap: wrap; gap: 8px 16px; color: var(--muted); font-size: 13px; margin-top: 14px; justify-content: center; }

/* order page */
.center { max-width: 560px; margin: 28px auto 0; text-align: center; }
.status { font-size: 20px; font-weight: 800; color: var(--plum); }
.spinner { width: 54px; height: 54px; border-radius: 50%; border: 5px solid var(--peach); border-top-color: var(--rose); animation: spin 1s linear infinite; margin: 18px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.summary { text-align: right; margin: 16px 0; font-size: 15px; }
.summary div { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px dashed var(--line); padding: 7px 0; }
.summary div span:first-child { color: var(--muted); }
.actions { display: grid; gap: 10px; margin-top: 16px; }
.testpay { border: 2px dashed var(--gold); border-radius: 14px; padding: 12px; margin-top: 14px; background: #FFF7E8; font-size: 14px; }

.ready-title { color: var(--plum); margin: 0; font-size: 36px; }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 60; }

/* watch page */
.watch { min-height: 100vh; background: radial-gradient(circle at 50% 20%, #7A4060, var(--plum-2)); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px 16px; }
.watch .player { width: min(420px, 100%); }
.watch .foot-mini { color: #F3E3EA; font-size: 13px; margin-top: 14px; text-align: center; }
.watch .foot-mini a { color: var(--peach); }

/* admin */
.admin { font-size: 14px; }
.admin .top { background: var(--plum); }
.admin .top nav a, .admin .top .logo { color: #fff; }
.admintop .wrap { height: auto; min-height: 64px; flex-wrap: wrap; padding-block: 8px; }
.adminnav { display: flex; flex-wrap: wrap; gap: 6px 16px; font-weight: 700; font-size: 14px; }
.codeform { max-width: 720px; margin-bottom: 18px; }
.codeform h2 { margin: 0 0 12px; color: var(--plum); font-size: 18px; }
.stylebox small { display: block; margin-top: 4px; }
.admin h1 { color: var(--plum); font-size: 24px; margin: 24px 0 12px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 18px; }
.kpis div { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.kpis b { display: block; font-size: 22px; color: var(--plum); }
.tbl { width: 100%; border-collapse: collapse; background: #fff; border-radius: 14px; overflow: hidden; }
.tbl th, .tbl td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: right; vertical-align: top; }
.tbl th { background: #F8EEE9; color: var(--plum); font-size: 13px; }
.scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; }
.tag { display: inline-block; border-radius: 999px; padding: 1px 10px; font-size: 12px; font-weight: 800; background: #EEE; white-space: nowrap; }
.tag.ready { background: #DDF3E6; color: var(--ok); }
.tag.awaiting_payment { background: #FFF1D6; color: #8A5A00; }
.tag.paid, .tag.rendering, .tag.queued { background: #E3ECFF; color: #2B4C9A; }
.tag.failed { background: #FCE1E4; color: var(--bad); }
.tag.cancelled, .tag.off { background: #EEE; color: #777; }
.inline { display: inline; }
.athemes { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.athemes .panel { padding: 12px; }
.athemes img { aspect-ratio: 9 / 16; object-fit: cover; width: 100%; border-radius: 10px; background: #EADBD3; }
.athemes input, .athemes select { padding: 7px 9px; font-size: 14px; margin-top: 4px; }
.btns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.msg { background: #DDF3E6; color: var(--ok); padding: 10px 14px; border-radius: 12px; margin-bottom: 12px; }
.help { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; margin-bottom: 16px; }
.help ol { margin: 0; padding-right: 18px; }

/* admin: light, fast, every click answers */
.admin .top { backdrop-filter: none; -webkit-backdrop-filter: none; }
.admin .panel { box-shadow: none; }
.admin a, .admin button, .admin select, .admin label { -webkit-tap-highlight-color: rgba(200, 79, 121, .18); }
.admin .btn { transition: transform .08s ease-out, filter .15s ease-out, background .15s ease-out; }
.admin .btn:active { transform: scale(.97); }
.admin .btn.ghost:hover { background: #F8EEE9; }
.admin .btn.is-busy { opacity: .75; cursor: progress; }
.admin .btn.danger { color: var(--bad); border-color: var(--bad); }
.admin .adminnav a { padding: 4px 2px; border-bottom: 2px solid transparent; }
.admin .adminnav a:hover { border-bottom-color: var(--gold); }
.admin select { cursor: pointer; }
.admin input:hover, .admin select:hover, .admin textarea:hover { border-color: #D9C3B8; }
::placeholder { color: #BBA8B2; opacity: 1; font-weight: 400; }
.ltr { direction: ltr; text-align: right; text-transform: uppercase; }
.ah2 { color: var(--plum); font-size: 19px; margin: 22px 0 4px; }
.ah2 small { color: var(--muted); font-weight: 400; }
.aform { display: grid; gap: 8px; margin-top: 10px; }
.aform label { display: grid; gap: 2px; font-size: 13px; font-weight: 700; color: var(--muted); }
.aform input, .aform select { margin-top: 0; padding: 8px 10px; font-size: 15px; }
.aform .row2 { gap: 8px; }
.savestate { font-size: 12px; color: var(--muted); min-height: 1.3em; }
.savestate.busy { color: #2B4C9A; }
.savestate.ok { color: var(--ok); font-weight: 800; }
.savestate.bad { color: var(--bad); font-weight: 800; }
.savestate.dirty { color: #8A5A00; }
.panel.saving { border-color: #9FB6E8; }
.panel.flash { border-color: var(--ok); box-shadow: 0 0 0 3px rgba(47, 138, 91, .15); }
.seg { display: inline-flex; border: 1.5px solid var(--line); border-radius: 12px; overflow: hidden; margin-top: 6px; background: #fff; }
.seg label { display: block; cursor: pointer; margin: 0; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; padding: 9px 14px; font-weight: 700; font-size: 14px; color: var(--plum); }
.seg input:checked + span { background: var(--plum); color: #fff; }
.seg input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: -3px; }
.seg.sm span { padding: 6px 12px; font-size: 13px; }
.switch { display: flex !important; align-items: center; gap: 10px; cursor: pointer; font-size: 14px !important; color: var(--ink) !important; }
.switch input { appearance: none; -webkit-appearance: none; width: 42px; height: 24px; border-radius: 999px; background: #DCCFD6; position: relative; margin: 0; padding: 0; border: 0; cursor: pointer; transition: background .2s; flex: none; }
.switch input::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .2s; }
.switch input:checked { background: var(--ok); }
.switch input:checked::after { transform: translateX(-18px); }
.newcode { max-width: 720px; padding: 0; }
.newcode summary { cursor: pointer; padding: 16px 20px; font-weight: 800; color: var(--plum); font-size: 16px; list-style: none; }
.newcode summary::-webkit-details-marker { display: none; }
.newcode form { padding: 0 20px 20px; }
.codegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.codecard { padding: 14px; }
.codecard.off { opacity: .7; }
.cc-head { display: flex; justify-content: space-between; align-items: center; }
.cc-head b { font-size: 18px; letter-spacing: .03em; }
.cc-stats { display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--muted); font-size: 13px; margin-top: 6px; }
.cc-stats .due { color: var(--plum); }
.asearch { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.asearch input { flex: 1 1 240px; margin: 0; }
.asearch select { flex: 0 1 180px; margin: 0; }
.atoast { position: fixed; z-index: 60; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); inset-inline: 16px; margin: 0 auto; max-width: 420px; background: var(--ok); color: #fff; font-weight: 800; text-align: center; padding: 12px 16px; border-radius: 14px; box-shadow: 0 8px 24px rgba(0, 0, 0, .2); }
.atoast.bad { background: var(--bad); }
@media (prefers-reduced-motion: reduce) { .admin .btn, .switch input, .switch input::after { transition: none; } }

/* admin: music player, colour previews, advisor */
.mplay { --p: 0%; flex: none; width: 38px; height: 38px; border-radius: 50%; border: 0; padding: 0; cursor: pointer; display: grid; place-items: center;
  background: conic-gradient(var(--rose) var(--p), #F3E6EC 0); position: relative; transition: transform .08s ease-out; }
.mplay::before { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: #fff; }
.mplay .ico { position: relative; width: 0; height: 0; border-style: solid; border-width: 7px 0 7px 11px; border-color: transparent transparent transparent var(--plum); margin-left: 3px; }
.mplay.playing .ico, .mplay.loading .ico { width: 11px; height: 13px; border: 0; margin: 0; border-inline: 4px solid var(--rose); }
.mplay.loading .ico { opacity: .45; }
.mplay:active { transform: scale(.92); }
.mplay:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.mlist { display: grid; gap: 6px; }
.mgroup { display: grid; gap: 6px; }
.mgroup h3 { margin: 10px 0 0; font-size: 14px; color: var(--muted); }
.mrow { display: flex; align-items: center; gap: 10px; background: #fff; border: 1.5px solid var(--line); border-radius: 14px; padding: 8px 10px; cursor: pointer; }
.mrow:hover { border-color: #D9C3B8; }
.mrow input[type=radio] { width: 18px; height: 18px; margin: 0; flex: none; accent-color: var(--plum); }
.mrow:has(input:checked) { border-color: var(--plum); background: #FBF4F7; }
.mtxt { display: grid; flex: 1; min-width: 0; line-height: 1.45; }
.mtxt b { font-size: 15px; color: var(--ink); }
.mtxt small { color: var(--muted); font-size: 12.5px; }
.mused { color: var(--muted); font-size: 12px; white-space: nowrap; }
.mbadge { background: #FFF1D6; color: #8A5A00; border-radius: 999px; padding: 1px 9px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.tag.new { background: #FBE3EC; color: var(--rose); font-size: 11px; padding: 0 7px; }
.mtxt > .tag { justify-self: start; }
.mall { margin: 4px 0 10px; }
.msel { display: flex; gap: 6px; align-items: center; }
.msel select { flex: 1; min-width: 0; }
.msel .pbtn { flex: none; padding: 7px 10px; }
.nstep { display: flex; align-items: center; gap: 8px; color: var(--plum); font-size: 18px; margin: 26px 0 10px; }
.nstep span { font-family: "Aref Ruqaa", serif; color: var(--gold); font-size: 24px; line-height: 1; }
.nstep small { color: var(--muted); font-weight: 400; font-size: 13px; }
.upgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.upbox { position: relative; display: grid; place-items: center; text-align: center; aspect-ratio: 9 / 16; border: 2px dashed #DCCBC2; border-radius: 14px;
  background: #FFFDFB; cursor: pointer; overflow: hidden; padding: 8px; }
.upbox:hover { border-color: var(--gold); }
.upbox input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.upbox img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.upbox b { position: relative; font-size: 14px; color: var(--plum); align-self: end; }
.upbox small { position: relative; color: var(--muted); font-size: 12px; align-self: start; }
.upbox.has { border-style: solid; border-color: var(--plum); }
.upbox.has b, .upbox.has small { background: rgba(255, 255, 255, .88); border-radius: 8px; padding: 0 6px; }
.advise { margin: 16px 0 4px; display: grid; gap: 6px; justify-items: start; }
.advise > small { color: var(--muted); }
.advice { width: 100%; background: #FFFBF2; border: 1.5px solid #EBD9B4; border-radius: 14px; padding: 10px 14px; margin-top: 8px; font-size: 14px; }
.advice p { margin: 6px 0; }
.adv-head { font-weight: 800; color: #8A5A00; font-size: 13px; }
.adv-m { display: inline-flex; align-items: center; gap: 6px; margin: 4px 0 4px 10px; }
.adv-m .mplay { width: 32px; height: 32px; }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.pgrid.busy { opacity: .6; pointer-events: none; }
.pcard { position: relative; display: grid; gap: 4px; cursor: pointer; background: none; border: 0; padding: 0; font: inherit; text-align: center; }
.pcard input { position: absolute; opacity: 0; pointer-events: none; }
.pimg { display: grid; place-content: center; gap: 0; aspect-ratio: 9 / 16; border-radius: 12px; overflow: hidden; border: 2.5px solid var(--line);
  background: linear-gradient(#FBF3EA, #F3E6DA); line-height: 1.15; }
.pimg i, .pimg em { font-family: "Aref Ruqaa", serif; font-style: normal; font-weight: 700; font-size: 30px;
  background: linear-gradient(var(--t), var(--b)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pimg em { font-size: 18px; }
.pimg s { text-decoration: none; color: var(--x); font-size: 11px; font-weight: 800; margin-top: 6px; }
.pimg.real { display: block; }
.pimg.real img { width: 100%; height: 100%; object-fit: cover; }
.pname { font-weight: 800; font-size: 14px; color: var(--plum); }
.pcard .mbadge { position: absolute; top: 6px; inset-inline-start: 6px; }
.pcard:has(input:checked) .pimg, .pcard.on .pimg { border-color: var(--plum); box-shadow: 0 0 0 3px rgba(99, 51, 77, .18); }
.pcard:has(input:focus-visible) .pimg, .pcard:focus-visible .pimg { outline: 3px solid var(--gold); outline-offset: 2px; }
.pdialog { border: 0; border-radius: 18px; padding: 16px; width: min(760px, calc(100vw - 32px)); max-height: calc(100vh - 40px); background: var(--cream); }
.pdialog::backdrop { background: rgba(46, 26, 38, .55); }
.pdhead { display: flex; justify-content: space-between; align-items: center; gap: 10px; color: var(--plum); font-size: 16px; }
.athemes .btn.block { width: 100%; margin-top: 8px; }
@media (max-width: 420px) { .upgrid { gap: 6px; } .upbox b { font-size: 12px; } .upbox small { display: none; } .pgrid { grid-template-columns: repeat(2, 1fr); gap: 8px; } }
@media (prefers-reduced-motion: reduce) { .mplay { transition: none; } }

fieldset.vgroup { border: 0; padding: 0; margin: 0; min-width: 0; }
