/* Theme copied from the Muse app (theme.css values): warm paper background,
   green #1d6b4f accent, amber for Muse codes, IBM Plex Sans Arabic. */
:root {
  --font-sans: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, system-ui, sans-serif;
  --font-display: "Noto Kufi Arabic", "IBM Plex Sans Arabic", "Segoe UI", sans-serif;
  --bg: #faf6ee;
  --surface: #fffdf7;
  --surface-alt: #f3ecdc;
  --text: #1c1a15;
  --muted: #6d6455;
  --border: #e3d9c3;
  --accent: #1d6b4f;
  --accent-soft: #e3f0e8;
  --amber: #b45309;
  --amber-bg: #fdf3e0;
  --danger: #b3261e;
  --danger-bg: #fdecea;
  --radius: 12px;
  --maxw: 48rem;
}
html[data-theme="dark"] {
  --bg: #171410;
  --surface: #221e18;
  --surface-alt: #2c271e;
  --text: #f2ecdd;
  --muted: #a99e8a;
  --border: #3a332a;
  --accent: #3fae82;
  --accent-soft: #1d2f27;
  --amber: #e0a44a;
  --amber-bg: #33291a;
  --danger: #f08080;
  --danger-bg: #3a1d1b;
}
* { box-sizing: border-box; }
html { font-family: var(--font-sans); }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font-sans); line-height: 1.7; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.4; margin: 0 0 .5rem; }
p { margin: 0 0 .75rem; }
a { color: var(--accent); }
button { font-family: var(--font-sans); cursor: pointer; }
input, textarea, select { font-family: var(--font-sans); font-size: 1rem; }
.num { font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: embed; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 1rem; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.1rem; margin-bottom: 1rem; }
.muted { color: var(--muted); font-size: .92rem; }
.small { font-size: .85rem; }
.center { text-align: center; }
.badge { display: inline-block; font-size: .78rem; font-weight: 600; padding: .1rem .55rem; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.badge.amber { background: var(--amber-bg); color: var(--amber); }
.badge.danger { background: var(--danger-bg); color: var(--danger); }
.badge.general { background: var(--surface-alt); color: var(--muted); }

.btn { display: inline-block; border: 0; border-radius: 999px; padding: .55rem 1.2rem; font-weight: 600; font-size: .95rem; background: var(--accent); color: #fff; }
.btn:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.btn.amber { background: var(--amber); }
.btn.danger { background: var(--danger); }
.btn.small { padding: .3rem .8rem; font-size: .85rem; }
.btn:disabled { opacity: .55; cursor: wait; }
.btn-block { display: block; width: 100%; text-align: center; }

input[type=text], input[type=url], textarea, select { width: 100%; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 8px; padding: .55rem .7rem; margin-bottom: .6rem; }
input[type=text]:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: .25rem; }
.field-note { font-size: .82rem; color: var(--muted); margin: -.35rem 0 .6rem; }
textarea { resize: vertical; min-height: 3.2rem; }
.char-counter { text-align: left; font-size: .8rem; color: var(--muted); margin-top: -.5rem; margin-bottom: .6rem; }

.hero { text-align: center; padding: 1.2rem 0 .4rem; }
.hero h1 { font-size: 1.7rem; }
.owner-card img { width: 100%; border-radius: var(--radius); display: block; aspect-ratio: 3 / 2; object-fit: cover; }
.owner-card .owner-name { font-family: var(--font-display); font-size: 1.15rem; font-weight: 700; margin-top: .6rem; }
.entry-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }
@media (max-width: 560px) { .entry-grid { grid-template-columns: 1fr; } }
.entry-card { text-align: center; }
.entry-card .big-num { font-size: 1.6rem; font-weight: 700; color: var(--accent); }
.entry-card .counters { display: flex; justify-content: space-around; margin: .6rem 0 .9rem; }
.entry-card .counters div span { display: block; font-size: .8rem; color: var(--muted); }

.topnav { position: sticky; top: 0; z-index: 10; background: var(--bg); border-bottom: 1px solid var(--border); }
.topnav-inner { max-width: var(--maxw); margin: 0 auto; display: flex; align-items: stretch; padding: 0 .5rem; }
.topnav button.tab { flex: 1; background: none; border: 0; color: var(--text); font-size: .92rem; font-weight: 600; padding: .8rem .2rem; border-bottom: 3px solid transparent; white-space: nowrap; }
.topnav button.tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.topnav button.tab .short { display: none; }
@media (max-width: 560px) {
  .topnav button.tab { font-size: 13px; padding: .7rem .1rem; }
  .topnav button.tab .full { display: none; }
  .topnav button.tab .short { display: inline; }
}
.back-btn { background: none; border: 0; color: var(--muted); font-size: .9rem; padding: .4rem 0; }
.theme-btn { background: none; border: 1px solid var(--border); border-radius: 999px; color: var(--muted); font-size: .82rem; padding: .25rem .7rem; }

.progress { height: 8px; background: var(--surface-alt); border-radius: 999px; overflow: hidden; margin: .4rem 0; }
.progress > div { height: 100%; background: var(--accent); }
.progress.amber > div { background: var(--amber); }
.item-card { border: 1px solid var(--border); border-radius: var(--radius); padding: .8rem .9rem; margin-bottom: .7rem; background: var(--surface); }
.item-card .meta { font-size: .85rem; color: var(--muted); }
.item-card .value-box { background: var(--surface-alt); border-radius: 8px; padding: .5rem .7rem; margin: .5rem 0; word-break: break-all; direction: ltr; text-align: left; }
.item-card .actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .5rem; }
.empty { color: var(--muted); text-align: center; padding: .8rem 0; }
.section-title { font-size: 1.25rem; margin-top: 1.4rem; }
.footer { text-align: center; color: var(--muted); font-size: .88rem; padding: 1.4rem 0 2rem; border-top: 1px solid var(--border); margin-top: 1.6rem; }
.footer .credit { color: var(--accent); font-weight: 700; }
.filters { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: .8rem; }
.filters button { border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 999px; padding: .25rem .8rem; font-size: .85rem; }
.filters button.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.toast { position: fixed; bottom: 1rem; right: 50%; transform: translateX(50%); background: var(--text); color: var(--bg); padding: .6rem 1.1rem; border-radius: 999px; font-size: .92rem; z-index: 50; max-width: 92vw; text-align: center; }
.modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.5); display: flex; align-items: center; justify-content: center; z-index: 40; padding: 1rem; }
.modal { background: var(--surface); border-radius: var(--radius); padding: 1.2rem; max-width: 26rem; width: 100%; }
.service-list { list-style: none; padding: 0; margin: 0; }
.service-list li { padding: .35rem 0; border-bottom: 1px dashed var(--border); }
.service-list li:last-child { border-bottom: 0; }
.prompt-body { white-space: pre-wrap; word-break: break-word; }
.prompt-link { display: block; word-break: break-all; direction: ltr; text-align: left; }
.about-cards { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
@media (max-width: 560px) { .about-cards { grid-template-columns: 1fr; } }
.about-cards .card { margin-bottom: 0; }
.strip { background: var(--accent-soft); border-radius: var(--radius); padding: .9rem 1rem; text-align: center; font-weight: 600; color: var(--accent); }
