/* ============================================================
   إدارة برنتيرا — الهوية البصرية
   مستوحاة من شعار PRINTERA by sarai:
   • ورقة الحرف N (دائرية بثلاث زوايا وطرف حاد)  ← شكل الشارات والبطاقات المميّزة
   • الساق الرفيعة والنقطة                       ← مؤشر الصفحة الحالية
   • خط «by sarai ——•» المنتهي بنقطة              ← الفواصل تحت العناوين
   ============================================================ */
:root {
  /* لوحة الألوان المعتمدة (أغمق ← أفتح) */
  --espresso: #291C0E;
  --mocha: #6E473B;
  --latte: #A78D78;
  --greige: #BEB5A9;
  --cream: #E1D4C2;

  --bg: var(--cream);   /* خلفية الصفحة */
  --card: #F8F3EC;      /* البطاقات: درجة أفتح من الكريمي لوضوح الأرقام */
  --sand: var(--greige);
  --sand-2: #EDE4D8;    /* تظليل خفيف للعناصر عند المرور */
  --ink: var(--espresso);
  --caramel: var(--mocha);   /* الأزرار المهمة */
  --caramel-d: #553529;
  --taupe: var(--mocha);     /* النص الثانوي (تباين كافٍ للقراءة) */
  --line: #D6C9B8;
  --ok: #3F6B45;
  --ok-bg: #E4EBDD;
  --warn: #8A5A12;
  --warn-bg: #F1E2C6;
  --bad: #963A2E;
  --bad-bg: #F1DCD5;
  --info-bg: #EAE0D3;

  --body: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
  --display: "Amiri", "IBM Plex Sans Arabic", serif;
  --r: 16px;
  --r-leaf: 22px 22px 22px 6px;    /* ورقة الشعار: الطرف الحاد أسفل اليسار */
  --shadow: 0 1px 2px rgba(41, 28, 14, .05), 0 8px 24px -16px rgba(41, 28, 14, .22);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --nav-h: 68px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 16px/1.6 var(--body);
  min-height: 100vh;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--caramel-d); }
h1, h2, h3 { margin: 0; font-weight: 600; line-height: 1.3; }
.num, td.n, .money { font-variant-numeric: tabular-nums; }
.muted { color: var(--taupe); }
.small { font-size: .86rem; }
.hidden { display: none !important; }
[hidden] { display: none !important; }

/* ---------- الهيكل ---------- */
.shell { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.shell > div { min-width: 0; }
.card p, .note { overflow-wrap: anywhere; }
.rail {
  position: sticky; top: 0; height: 100vh; padding: 22px 16px;
  border-inline-end: 1px solid var(--line); background: var(--card);
  display: flex; flex-direction: column; gap: 4px;
}
.rail .brand { display: block; text-decoration: none; padding: 4px 8px 18px; margin-bottom: 10px; border-bottom: 1px solid var(--line); }
.rail .brand img { width: 150px; height: auto; display: block; mix-blend-mode: multiply; }
.rail .brand span { display: block; font-size: .8rem; color: var(--taupe); margin-top: 2px; letter-spacing: .02em; }
.nav-link {
  position: relative; display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 12px; text-decoration: none; color: var(--ink);
  transition: background .2s var(--ease);
}
.nav-link svg { width: 20px; height: 20px; color: var(--taupe); flex: none; }
.nav-link:hover { background: var(--sand-2); }
.nav-link.on { background: var(--bg); font-weight: 500; }
.nav-link.on svg { color: var(--caramel); }
/* الساق والنقطة من رمز الشعار */
.nav-link.on::before {
  content: ""; position: absolute; inset-inline-start: -16px; top: 12px; bottom: 12px;
  width: 2px; background: var(--caramel); border-radius: 2px;
}
.rail .grow { flex: 1; }
.rail .foot { font-size: .8rem; color: var(--taupe); padding: 8px 12px; }

main { padding: 28px clamp(16px, 4vw, 44px) 48px; max-width: 1180px; width: 100%; }
.page { animation: rise .35s var(--ease); }
.page.no-anim { animation: none; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.topbar { display: none; }
.bottom-nav { display: none; }

/* ---------- العناوين ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { font-family: var(--display); font-size: 2rem; font-weight: 700; letter-spacing: 0; }
.page-head p { margin: 2px 0 0; color: var(--taupe); }
/* خط «by sarai ——•» */
.rule { display: flex; align-items: center; gap: 12px; margin: 30px 0 14px; }
.rule h2 { order: 1; font-size: 1.05rem; color: var(--ink); white-space: nowrap; }
.rule::before { content: ""; order: 2; flex: 1; height: 1px; background: var(--sand); }
.rule::after { content: ""; order: 3; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--sand); }
.rule .act { order: 4; }

/* ---------- البطاقات ---------- */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: var(--shadow); padding: 18px 20px;
}
.card.leaf { border-radius: var(--r-leaf); }
.card + .card { margin-top: 14px; }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* ---------- صفحة البداية ---------- */
.hero {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 18px; isolation: isolate;
  background: var(--card); border: 1px solid var(--line); border-radius: 28px 28px 28px 8px;
  padding: 40px clamp(18px, 4vw, 48px) 28px; box-shadow: var(--shadow);
}
/* منحنيات هادئة مستوحاة من ورقة الحرف N */
.hero::before, .hero::after {
  content: ""; position: absolute; pointer-events: none; border: 1px solid var(--sand);
  border-radius: 50% 50% 50% 0;
}
.hero::before { width: 360px; height: 360px; inset-inline-end: -150px; top: -190px; }
.hero::after { width: 220px; height: 220px; inset-inline-end: -60px; top: -110px; opacity: .7; }
.hero::before, .hero::after { z-index: -1; }
/* الشعار نفسه دون تعديل؛ الدمج multiply يذيب خلفيته البيضاء في لون البطاقة العاجي */
.hero .logo-wrap { display: flex; justify-content: center; padding: 6px 24px 4px; background: var(--card); }
.hero .logo-wrap img { width: min(400px, 100%); height: auto; display: block; mix-blend-mode: multiply; }
.hero .greet { text-align: center; }
.hero .greet .date { color: var(--ink); font-weight: 500; }
.hero .greet p { margin: 2px 0 0; color: var(--taupe); font-size: .92rem; }
.hero .actions { width: 100%; max-width: 760px; }

.actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.action {
  display: flex; align-items: center; gap: 12px; text-align: start;
  padding: 14px 16px; border-radius: var(--r-leaf); border: 1px solid var(--line);
  background: var(--card); color: var(--ink); text-decoration: none; cursor: pointer;
  transition: transform .2s var(--ease), border-color .2s, box-shadow .2s;
}
.action:hover { transform: translateY(-2px); border-color: var(--caramel); box-shadow: var(--shadow); }
.action b { display: block; font-weight: 600; }
.action small { color: var(--taupe); font-size: .8rem; }
.action.primary { background: var(--caramel); border-color: var(--caramel); color: #fff; }
.action.primary small { color: var(--cream); }
.action.primary .leaf-badge { background: rgba(255, 255, 255, .16); color: #fff; }

/* شارة الورقة */
.leaf-badge {
  flex: none; width: 42px; height: 42px; display: grid; place-items: center;
  border-radius: 50% 50% 50% 6px; background: #E6D9C9; color: var(--mocha);
}
.leaf-badge svg { width: 20px; height: 20px; }

/* ---------- المؤشرات ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; }
.kpi .label { color: var(--taupe); font-size: .85rem; display: flex; align-items: center; gap: 6px; }
.kpi .value { font-size: 1.6rem; font-weight: 600; margin-top: 4px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.kpi .sub { font-size: .8rem; color: var(--taupe); margin-top: 2px; }
.kpi.accent { background: var(--ink); border-color: var(--ink); color: var(--card); }
.kpi.accent .label, .kpi.accent .sub { color: var(--greige); }
.neg { color: var(--bad); }
.kpi.accent .neg { color: #F2B8A8; }

/* ---------- الشارات ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px; border-radius: 999px;
  font-size: .78rem; font-weight: 500; background: var(--info-bg); color: var(--ink); white-space: nowrap;
}
.chip.ok { background: var(--ok-bg); color: var(--ok); }
.chip.warn { background: var(--warn-bg); color: var(--warn); }
.chip.bad { background: var(--bad-bg); color: var(--bad); }
.chip.caramel { background: #EADBCB; color: var(--caramel-d); }
.chip::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .8; }
.chip.plain::before { display: none; }

.note {
  display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px;
  background: var(--warn-bg); color: #6F4C14; font-size: .9rem; margin: 12px 0;
}
.note.info { background: var(--info-bg); color: var(--ink); }
.note.bad { background: var(--bad-bg); color: #7D3329; }
.note.ok { background: var(--ok-bg); color: #3A5E3F; }
.note svg { width: 18px; height: 18px; flex: none; margin-top: 3px; }

/* ---------- القوائم ---------- */
.list { display: flex; flex-direction: column; }
.row {
  display: flex; align-items: center; gap: 14px; padding: 13px 4px;
  border-bottom: 1px solid var(--sand-2); text-decoration: none; color: inherit;
}
.row:last-child { border-bottom: 0; }
a.row:hover { background: linear-gradient(to left, transparent, var(--bg), transparent); }
.row .main { flex: 1; min-width: 0; }
.row .title, .row .meta { display: block; }
.row .title { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .meta { color: var(--taupe); font-size: .84rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .end { text-align: end; flex: none; }
.row .amount { font-weight: 600; font-variant-numeric: tabular-nums; }
.empty { text-align: center; color: var(--taupe); padding: 26px 10px; }
.empty .leaf-badge { margin: 0 auto 10px; }

/* ---------- الجداول ---------- */
.table-wrap { overflow-x: auto; margin: 0 -4px; }
table { width: 100%; border-collapse: collapse; font-size: .93rem; }
th { text-align: start; font-weight: 500; color: var(--taupe); font-size: .8rem; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 10px; border-bottom: 1px solid var(--sand-2); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td.n, th.n { text-align: end; white-space: nowrap; }
tfoot td { font-weight: 600; border-top: 1px solid var(--line); }

/* ---------- الأزرار ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--ink); background: transparent; color: var(--ink);
  font-weight: 500; text-decoration: none; white-space: nowrap;
  transition: background .2s var(--ease), color .2s, transform .1s, border-color .2s;
}
.btn:hover { background: var(--sand-2); }
.btn:active { transform: scale(.98); }
.btn svg { width: 18px; height: 18px; }
.btn.primary { background: var(--caramel); border-color: var(--caramel); color: #fff; }
.btn.primary:hover { background: var(--caramel-d); border-color: var(--caramel-d); }
.btn.ghost { border-color: transparent; color: var(--caramel-d); padding: 0 12px; }
.btn.ghost:hover { background: var(--sand-2); }
.btn.danger { border-color: var(--bad); color: var(--bad); }
.btn.sm { min-height: 34px; padding: 0 14px; font-size: .88rem; }
.btn.icon { width: 40px; padding: 0; min-height: 40px; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ---------- النماذج ---------- */
.form { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
.field { display: grid; gap: 6px; }
.field > span { font-size: .86rem; color: var(--taupe); font-weight: 500; }
.field > span em { font-style: normal; color: var(--sand); font-weight: 400; }
input, select, textarea {
  width: 100%; min-height: 46px; padding: 10px 14px; border-radius: 12px;
  border: 1px solid var(--line); background: #fff; outline: none;
  transition: border-color .2s, box-shadow .2s;
}
textarea { min-height: 88px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--caramel); box-shadow: 0 0 0 3px rgba(110, 71, 59, .16); }
input[type="number"], input[inputmode="decimal"], .ltr { direction: ltr; text-align: right; }
input[type="checkbox"] { width: 20px; height: 20px; min-height: 0; accent-color: var(--caramel); }
label.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: .92rem; }
.f2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.f3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }

.line-item {
  border: 1px solid var(--line); border-radius: var(--r-leaf); padding: 14px; background: #fff;
  display: grid; gap: 10px; position: relative; animation: rise .3s var(--ease);
}
.line-item .remove { position: absolute; inset-inline-end: 8px; top: 8px; }
.line-item .lt { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 10px; }
details.more summary { cursor: pointer; color: var(--caramel-d); font-size: .88rem; list-style: none; }
details.more summary::-webkit-details-marker { display: none; }
details.more summary::before { content: "+ "; }
details.more[open] summary::before { content: "− "; }
details.more > div { margin-top: 10px; display: grid; gap: 10px; }

.totals {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0;
  border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--card);
}
.totals > div { padding: 12px 16px; border-inline-start: 1px solid var(--line); }
.totals > div:first-child { border-inline-start: 0; }
.totals span { display: block; font-size: .8rem; color: var(--taupe); }
.totals b { font-size: 1.3rem; font-variant-numeric: tabular-nums; }

.seg { display: inline-flex; background: var(--sand-2); padding: 4px; border-radius: 999px; gap: 2px; flex-wrap: wrap; }
.seg button, .seg a {
  border: 0; background: transparent; padding: 7px 16px; border-radius: 999px; cursor: pointer;
  font-size: .9rem; color: var(--taupe); text-decoration: none;
}
.seg .on { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(41, 28, 14, .1); font-weight: 500; }

.status-steps { display: flex; gap: 6px; flex-wrap: wrap; }
.status-steps button {
  border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 6px 14px;
  cursor: pointer; font-size: .88rem; color: var(--taupe);
}
.status-steps button.on { background: var(--ink); color: var(--card); border-color: var(--ink); }

/* ---------- التوصيات ---------- */
.rec { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--sand-2); }
.rec:last-child { border-bottom: 0; }
.rec h3 { font-size: 1rem; margin-bottom: 2px; }
.rec p { margin: 0; color: var(--taupe); font-size: .92rem; }

.bar { height: 6px; background: var(--sand-2); border-radius: 6px; overflow: hidden; min-width: 60px; }
.bar i { display: block; height: 100%; background: var(--latte); border-radius: 6px; }

/* ---------- الحوار والإشعارات ---------- */
dialog {
  border: 1px solid var(--line); border-radius: 22px 22px 22px 6px; padding: 0; background: var(--card); color: var(--ink);
  width: min(520px, calc(100vw - 24px)); box-shadow: 0 30px 60px -30px rgba(41, 28, 14, .45);
}
dialog::backdrop { background: rgba(41, 28, 14, .28); }
dialog .dh { padding: 18px 20px 0; display: flex; justify-content: space-between; align-items: center; }
dialog .dh h2 { font-family: var(--display); font-size: 1.4rem; }
dialog .db { padding: 16px 20px 20px; }
dialog[open] { animation: rise .25s var(--ease); }

#toast {
  position: fixed; inset-inline: 0; bottom: 24px; margin: auto; width: max-content; max-width: calc(100vw - 32px);
  background: var(--ink); color: var(--card); padding: 12px 18px; border-radius: 999px;
  display: flex; align-items: center; gap: 10px; font-size: .95rem; z-index: 50;
  opacity: 0; transform: translateY(16px); pointer-events: none; transition: all .3s var(--ease);
}
#toast.show { opacity: 1; transform: none; }
#toast.err { background: var(--bad); }
#toast svg { width: 18px; height: 18px; }
#toast .tick { stroke-dasharray: 24; stroke-dashoffset: 24; animation: draw .5s .1s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ---------- الدخول ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login .card { width: min(420px, 100%); padding: 34px 28px; text-align: center; border-radius: 28px 28px 28px 8px; }
.login img { width: min(280px, 90%); mix-blend-mode: multiply; margin-bottom: 14px; }
.login input { text-align: center; font-size: 1.5rem; letter-spacing: .4em; direction: ltr; }
.login p { color: var(--taupe); margin: 0 0 18px; font-size: .92rem; }

.loading { padding: 60px 0; text-align: center; color: var(--taupe); }
.loading::after {
  content: ""; display: block; width: 8px; height: 8px; border-radius: 50%; background: var(--caramel);
  margin: 12px auto 0; animation: pulse 1s infinite alternate;
}
@keyframes pulse { from { opacity: .2; transform: scale(.8); } to { opacity: 1; transform: scale(1.2); } }

/* ---------- الهاتف ---------- */
@media (max-width: 900px) {
  .shell { display: block; }
  .rail { display: none; }
  .topbar {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    position: sticky; top: 0; z-index: 10; padding: 10px 16px;
    background: rgba(225, 212, 194, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
  }
  .topbar img { height: 40px; width: auto; mix-blend-mode: multiply; }
  main { padding: 18px 16px calc(var(--nav-h) + 30px); }
  .bottom-nav {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; inset-inline: 0; bottom: 0; z-index: 20;
    height: calc(var(--nav-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
    background: var(--card); border-top: 1px solid var(--line);
  }
  .bottom-nav a {
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    font-size: .72rem; color: var(--taupe); text-decoration: none;
  }
  .bottom-nav svg { width: 22px; height: 22px; }
  .bottom-nav a.on { color: var(--ink); font-weight: 500; }
  .bottom-nav a.on svg { color: var(--caramel); }
  .bottom-nav a.on::after {
    content: ""; position: absolute; top: 6px; width: 5px; height: 5px; border-radius: 50%; background: var(--caramel);
  }
  .hero { padding: 26px 16px 18px; border-radius: 22px 22px 22px 6px; }
  .hero .logo-wrap img { width: min(280px, 82vw); }
  .actions { grid-template-columns: 1fr; }
  .kpis, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g3, .g2 { grid-template-columns: 1fr; }
  .page-head h1 { font-size: 1.6rem; }
  .line-item .lt { grid-template-columns: 1fr 1fr; }
  .line-item .lt > :first-child { grid-column: 1 / -1; }
  .kpi .value { font-size: 1.3rem; }
  .totals b { font-size: 1.1rem; }
  .hide-m { display: none; }
  #toast { bottom: calc(var(--nav-h) + 16px + env(safe-area-inset-bottom)); }
}
@media (max-width: 420px) {
  .f2, .f3 { grid-template-columns: 1fr; }
  .totals { grid-template-columns: 1fr; }
  .totals > div { border-inline-start: 0; border-top: 1px solid var(--line); }
  .totals > div:first-child { border-top: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media print {
  .rail, .topbar, .bottom-nav, .btn { display: none !important; }
  body { background: #fff; }
}

/* ============================================================
   رونق — الشخصية الرئيسية في الصفحات
   إطارها على شكل ورقة الشعار؛ تتكلم في فقاعة بجانبها.
   ============================================================ */
.rq-scene { display: flex; align-items: flex-end; gap: 16px; width: 100%; }
.rq-figure {
  flex: none; margin: 0; overflow: hidden; cursor: pointer; background: #F3D2C1;
  border-radius: 140px 140px 140px 18px; border: 2px solid var(--latte);
  box-shadow: 0 14px 30px -22px rgba(41, 28, 14, .55);
}
.rq-figure canvas { width: 100%; height: 100%; display: block; transition: transform .12s linear; }
.rq-scene.big { max-width: 760px; }
.rq-scene.big .rq-figure { width: 220px; height: 300px; }
.rq-scene.strip { margin-bottom: 20px; align-items: center; }
.rq-scene.strip .rq-figure { width: 92px; height: 112px; border-radius: 60px 60px 60px 12px; }
.rq-scene.is-mini { margin-bottom: 14px; gap: 10px; }
.rq-scene.is-mini .rq-figure { width: 46px; height: 46px; border-radius: 50% 50% 50% 8px; }

.rq-bubble {
  position: relative; flex: 1; min-width: 0; background: var(--card); border: 1px solid var(--line);
  border-radius: 20px 20px 20px 6px; padding: 12px 16px 10px; box-shadow: var(--shadow);
  text-align: start;
}
.rq-scene.big .rq-bubble { align-self: center; margin-bottom: 30px; background: var(--sand-2); box-shadow: none; }
/* ذيل الفقاعة يشير إلى رونق */
.rq-bubble::before {
  content: ""; position: absolute; inset-inline-start: -8px; bottom: 26px; width: 14px; height: 14px;
  background: inherit; border-bottom: 1px solid var(--line); border-inline-start: 1px solid var(--line);
  transform: rotate(45deg);
}
[dir="rtl"] .rq-bubble::before { transform: rotate(-45deg); }
.rq-scene.strip .rq-bubble::before { bottom: auto; top: calc(50% - 7px); }
.rq-who { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2px; }
.rq-who b { font-family: var(--display); font-size: 1.15rem; color: var(--mocha); }
.rq-min, .rq-next, .rq-expand { border: 0; background: none; cursor: pointer; font: inherit; }
.rq-min { color: var(--taupe); font-size: .78rem; padding: 2px 6px; border-radius: 8px; }
.rq-min:hover { background: var(--sand-2); }
.rq-text { margin: 0; font-size: .95rem; line-height: 1.75; }
.rq-in { animation: rq-text .45s var(--ease); }
@keyframes rq-text { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.rq-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.rq-acts:empty { display: none; }
.rq-acts a { font-size: .84rem; padding: 6px 13px; border-radius: 999px; text-decoration: none; background: var(--caramel); color: #fff; }
.rq-acts a + a { background: transparent; color: var(--ink); border: 1px solid var(--ink); padding: 5px 12px; }
.rq-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 4px; }
.rq-nav:has(.rq-next[hidden]) { display: none; }
.rq-count { font-size: .76rem; color: var(--taupe); }
.rq-next { color: var(--caramel-d); font-weight: 500; font-size: .88rem; padding: 4px 0; }
.rq-expand {
  color: var(--caramel-d); font-size: .88rem; padding: 6px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--card);
}
.rq-faq { margin-top: 6px; border-top: 1px solid var(--sand-2); padding-top: 6px; }
.rq-faq summary { cursor: pointer; font-size: .86rem; color: var(--caramel-d); list-style: none; }
.rq-faq summary::-webkit-details-marker { display: none; }
.rq-faq summary::before { content: "+ "; }
.rq-faq[open] summary::before { content: "− "; }
.rq-faq div { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.rq-faq button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 5px 12px; cursor: pointer; font: inherit; font-size: .84rem; }
.rq-faq button:hover { border-color: var(--caramel); }
@media (max-width: 900px) {
  .rq-scene.big { gap: 10px; }
  .rq-scene.big .rq-figure { width: 128px; height: 186px; }
  .rq-scene.big .rq-bubble { margin-bottom: 14px; padding: 10px 12px 8px; }
  .rq-scene.strip .rq-figure { width: 72px; height: 88px; }
  .rq-text { font-size: .9rem; }
}
@media print { .rq-scene { display: none !important; } }
