/* ==========================================================================
   Diamond Wolf — chat
   A messenger with a wolf, not an AI console: the wolf you talk to sits in the
   header like a contact, its replies read like a letter, and the room is lit in
   its colour. Surfaces are solid and cut like stone, as on the landing page.
   ========================================================================== */
@property --room-light { syntax: "<color>"; inherits: true; initial-value: rgba(70, 140, 255, 0.2); }
:root {
  --bg: #06080e;
  --fg: #f7f1e8;
  --fg-2: #dccdb9;
  --muted: #b39a80;
  --dim: #94795f;
  --line: rgba(255, 255, 255, 0.06);
  --line-2: rgba(255, 255, 255, 0.11);
  --hover: rgba(255, 255, 255, 0.05);
  --ice: #9fd3ff;
  --danger: #ff8a8a;
  --font: "IBM Plex Sans Arabic", "Sora", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
  --read: "Noto Naskh Arabic", "IBM Plex Sans Arabic", serif;
  --font-latin: "Sora", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --side: 288px;
  --cut: 12px;
  color-scheme: dark only;
}
/* the wolf you are talking to sets the accent and the colour of the room's light */
body[data-model="alpha"] { --accent: #a9dbff; --room-light: rgba(70, 140, 255, 0.22); }
body[data-model="hunter"] { --accent: #e3e8f0; --room-light: rgba(205, 216, 234, 0.13); }
body[data-model="scout"] { --accent: #c2b8ff; --room-light: rgba(128, 108, 245, 0.22); }
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg); font-family: var(--font); font-size: 16px; line-height: 1.75;
  -webkit-font-smoothing: antialiased; overflow: hidden; transition: --room-light 1.2s var(--ease);
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--accent, var(--ice)); outline-offset: 2px; border-radius: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
.ic { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
[hidden] { display: none !important; }

/* the room: dark velvet, a faint light from above in the wolf's colour */
.room { position: fixed; inset: 0; z-index: 0; pointer-events: none; background: url("../img/studio/room.webp") center top / cover no-repeat, var(--bg); }
.room::after { content: ""; position: absolute; inset: 0; background: radial-gradient(70% 55% at 50% -6%, var(--room-light), transparent 72%), linear-gradient(180deg, rgba(6, 8, 14, 0.15), rgba(6, 8, 14, 0.72) 70%); }

/* ---------- layout ---------- */
.app { position: relative; z-index: 1; display: grid; grid-template-columns: var(--side) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); height: 100%; transition: grid-template-columns 0.35s var(--ease); }
.app.collapsed { grid-template-columns: 0 minmax(0, 1fr); }
.app.collapsed .sidebar { visibility: hidden; opacity: 0; }

/* ---------- buttons ---------- */
.icon-btn { width: 38px; height: 38px; display: inline-grid; place-items: center; border: 0; border-radius: 10px; background: transparent; color: var(--fg-2); font-size: 20px; transition: background 0.2s, color 0.2s; }
.icon-btn:hover { background: var(--hover); color: var(--fg); }
.btn { height: 40px; padding: 0 18px; border-radius: 999px; border: 1px solid transparent; font-size: 14.5px; font-weight: 500; transition: background 0.2s, transform 0.2s var(--ease); }
.btn:active { transform: scale(0.98); }
.btn--light { background: #f6efe5; color: #120d08; }
.btn--light:hover { background: #fffaf3; }
.btn--ghost { background: rgba(255, 255, 255, 0.04); border-color: var(--line-2); color: var(--fg); }
.btn--ghost:hover { background: rgba(255, 255, 255, 0.09); }
.btn--danger { background: rgba(255, 120, 120, 0.1); border-color: rgba(255, 120, 120, 0.3); color: var(--danger); }
.btn--danger:hover { background: rgba(255, 120, 120, 0.18); }

/* ---------- sidebar: a solid drawer ---------- */
.sidebar {
  min-width: 0; overflow: hidden; display: flex; flex-direction: column; gap: 8px; padding: 12px;
  background: linear-gradient(180deg, #0d111b, #090c13); border-inline-end: 1px solid var(--line);
  transition: opacity 0.25s, visibility 0.25s;
}
.sidebar__head { display: flex; align-items: center; justify-content: space-between; padding: 0 2px 4px; }
.brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; font-family: var(--font-latin); font-weight: 600; font-size: 15.5px; direction: ltr; padding: 6px; border-radius: 10px; }
.brand:hover { background: var(--hover); }
.brand img { width: 22px; height: auto; flex: none; filter: drop-shadow(0 0 5px rgba(159, 211, 255, 0.28)); }
.side-action {
  display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 14px; border: 0; text-align: start; font-size: 14.5px; font-weight: 500;
  clip-path: polygon(var(--cut) 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, var(--cut) 100%, 0 calc(100% - var(--cut)), 0 var(--cut)); --cut: 10px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.045)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: background 0.2s;
}
.side-action:hover { background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.07)); }
.side-action .ic { font-size: 18px; color: var(--accent); }
.side-action span { flex: 1; }
.side-action kbd { font: 11px var(--mono); color: var(--muted); opacity: 0; transition: opacity 0.2s; }
.side-action:hover kbd { opacity: 1; }
.side-search { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 12px; border-radius: 10px; color: var(--muted); background: rgba(255, 255, 255, 0.03); box-shadow: inset 0 0 0 1px var(--line); }
.side-search:focus-within { box-shadow: inset 0 0 0 1px var(--line-2); color: var(--fg-2); }
.side-search .ic { font-size: 17px; }
.side-search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; font-size: 14px; }
.side-search input::placeholder { color: var(--muted); }
.side-search input::-webkit-search-cancel-button { filter: invert(1) opacity(0.5); }

.history { flex: 1; overflow-y: auto; margin: 6px -4px 0; padding: 0 4px; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.12) transparent; }
.history h3 { font-size: 12px; font-weight: 500; color: var(--dim); margin: 16px 10px 6px; letter-spacing: 0.01em; }
.history h3:first-child { margin-top: 4px; }
.history__empty { color: var(--muted); font-size: 13.5px; padding: 10px; }
.chat-item { position: relative; display: flex; align-items: center; border-radius: 10px; transition: background 0.2s; }
.chat-item:hover, .chat-item:focus-within { background: var(--hover); }
.chat-item.active { background: linear-gradient(270deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.02)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05); }
.chat-item__link { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 0; background: none; text-align: start; font-size: 14.5px; color: var(--fg-2); }
.chat-item__gem { width: 15px; height: 15px; flex: none; opacity: 0.85; }
.chat-item__title { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-item.active .chat-item__link { color: var(--fg); }
.chat-item.active .chat-item__gem { opacity: 1; filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.25)); }
.chat-item__tools { display: flex; gap: 2px; padding-inline-end: 4px; opacity: 0; transition: opacity 0.2s; }
.chat-item:hover .chat-item__tools, .chat-item:focus-within .chat-item__tools, .chat-item.active .chat-item__tools { opacity: 1; }
.chat-item__tools button { width: 28px; height: 28px; display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 16px; }
.chat-item__tools button:hover { color: var(--fg); background: rgba(255, 255, 255, 0.08); }
.chat-item__rename { flex: 1; min-width: 0; margin: 4px; padding: 4px 8px; border-radius: 8px; border: 1px solid var(--accent); background: rgba(0, 0, 0, 0.3); outline: 0; font-size: 14.5px; }

.sidebar__foot { border-top: 1px solid var(--line); padding-top: 8px; }
.account { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px; border: 0; border-radius: 12px; background: transparent; text-align: start; transition: background 0.2s; }
.account:hover { background: var(--hover); }
.account__avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(140deg, #dfe7f2, #8b98ad); color: #070a12; font-weight: 600; font-size: 15px; }
.account__meta { flex: 1; display: grid; line-height: 1.3; }
.account__meta b { font-weight: 500; font-size: 14.5px; }
.account__meta small { color: var(--muted); font-size: 12.5px; }
.account .ic { font-size: 18px; color: var(--muted); }
.scrim { display: none; }

/* ---------- main and the contact header ---------- */
.main { position: relative; min-width: 0; min-height: 0; display: flex; flex-direction: column; height: 100%; }
.topbar { position: relative; z-index: 6; flex: none; height: 66px; display: flex; align-items: center; gap: 6px; padding: 0 12px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, rgba(7, 9, 15, 0.82), rgba(7, 9, 15, 0.55)); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.topbar__end { margin-inline-start: auto; display: flex; gap: 4px; }
#openSidebar, .only-collapsed { display: none; }
.app.collapsed #openSidebar, .app.collapsed .only-collapsed { display: inline-grid; }

.model-picker { position: relative; }
.contact__btn { display: flex; align-items: center; gap: 11px; height: 54px; padding: 4px 10px 4px 12px; border: 0; border-radius: 14px; background: transparent; text-align: start; transition: background 0.2s; }
.contact__btn:hover, .contact__btn[aria-expanded="true"] { background: var(--hover); }
.contact__btn > .ic { font-size: 15px; color: var(--muted); margin-inline-start: 2px; }
.contact__face { width: 40px; height: 44px; display: grid; place-items: center; }
.contact__face img { height: 40px; width: auto; filter: drop-shadow(0 0 8px var(--glow)); transition: transform 0.4s var(--ease); }
.contact__btn:hover .contact__face img { transform: scale(1.08); }
.contact__meta { display: grid; line-height: 1.2; }
.contact__name b { font-family: var(--font-latin); font-weight: 600; font-size: 19px; letter-spacing: -0.02em; direction: ltr; display: inline-block; }
.contact__status { font-size: 12.5px; color: var(--muted); }
.contact__status.is-live { background: linear-gradient(90deg, var(--muted), var(--accent), var(--muted)); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 1.6s linear infinite; }
.ink--alpha, .ink--hunter, .ink--scout { -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; padding-bottom: 0.12em; margin-bottom: -0.12em; }
.ink--alpha { background-image: linear-gradient(180deg, #f4fbff 8%, #b3e0ff 52%, #74b4f5 100%); }
.ink--hunter { background-image: linear-gradient(180deg, #ffffff 8%, #dfe5ee 50%, #98a3b6 100%); }
.ink--scout { background-image: linear-gradient(180deg, #fbf9ff 8%, #c4bbff 52%, #8a7cf0 100%); }
/* the model menu: a heavy plate; each choice is its name alone, written in its wolf's colours */
.menu {
  position: absolute; top: calc(100% + 8px); inset-inline-start: 0; z-index: 30; width: min(340px, 88vw); padding: 8px;
  background: linear-gradient(180deg, #151b2a, #0c1019); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 30px 80px -20px rgba(0, 0, 0, 0.85);
  animation: pop 0.2s var(--ease);
}
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(0.98); } }
.menu__item { position: relative; width: 100%; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 0 14px; padding: 12px 16px 12px 14px; border: 0; border-radius: 12px; background: transparent; text-align: start; overflow: hidden; isolation: isolate; }
.menu__item + .menu__item { margin-top: 2px; }
.menu__item::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; opacity: 0; transition: opacity 0.3s; background: linear-gradient(270deg, var(--tint), transparent 78%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05); }
.menu__item[data-model="alpha"] { --tint: rgba(90, 160, 255, 0.17); --mark: #9fd3ff; }
.menu__item[data-model="hunter"] { --tint: rgba(225, 232, 242, 0.11); --mark: #e6ebf2; }
.menu__item[data-model="scout"] { --tint: rgba(140, 120, 245, 0.18); --mark: #b9aefc; }
.menu__item:hover::before, .menu__item:focus-visible::before, .menu__item[aria-checked="true"]::before { opacity: 1; }
.menu__name { grid-column: 1; justify-self: start; font-family: var(--font-latin); font-weight: 600; font-size: 27px; line-height: 1.1; letter-spacing: -0.03em; direction: ltr; transition: transform 0.35s var(--ease); }
.menu__item:hover .menu__name { transform: translateX(-3px); }
.menu__item small { grid-column: 1; color: var(--muted); font-size: 13px; line-height: 1.5; margin-top: 3px; }
.menu__mark { grid-row: 1 / span 2; grid-column: 2; width: 10px; height: 10px; background: var(--mark); box-shadow: 0 0 12px var(--mark); opacity: 0; transform: rotate(45deg) scale(0.4); transition: opacity 0.3s, transform 0.45s var(--ease); }
.menu__item[aria-checked="true"] .menu__mark { opacity: 1; transform: rotate(45deg) scale(1); }
/* lock-in: the plate takes the press, the name takes the hit */
.menu__item.picked { animation: lock-in 0.34s cubic-bezier(0.2, 0.8, 0.2, 1); }
.menu__item.picked .menu__name { animation: name-hit 0.34s cubic-bezier(0.2, 0.8, 0.2, 1); }
.menu__item.picked .menu__mark { opacity: 1; transform: rotate(45deg) scale(1.3); }
@keyframes lock-in { 35% { transform: scale(0.97); } }
@keyframes name-hit { 35% { transform: scale(1.09); filter: brightness(1.45) drop-shadow(0 0 10px var(--mark)); } }

/* ---------- wordmark: "Diamond" is cut like a stone, "Wolf" stays warm ivory ----------
   angled facets, a lit crown above the girdle and a darker pavilion below; the dot of the i is a
   cut diamond, and now and then a light runs across the stone and ends in a glint */
.wm { position: relative; display: inline-block; font-family: var(--font-latin); font-weight: 600; letter-spacing: -0.01em; direction: ltr; white-space: nowrap; }
.wm__cry, .wm__rest, .wm__i { -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
.wm__cry {
  background:
    linear-gradient(100deg, transparent 40%, rgba(255, 255, 255, 0.95) 50%, transparent 60%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.26) 0 52%, rgba(8, 16, 34, 0.34) 52% 100%),
    linear-gradient(118deg, #ffffff 0 20%, #9fb0c6 20% 27%, #eef3f9 27% 46%, #7b8ca6 46% 52%, #dbe4ef 52% 70%, #8b9bb3 70% 76%, #ffffff 76% 100%);
  background-size: 300% 100%, 100% 100%, 1.7em 100%;
  background-repeat: no-repeat, no-repeat, repeat-x;
  background-position: 130% 0, 0 0, 0 0;
  -webkit-background-clip: text; background-clip: text; /* after the shorthand, which resets the clip */
  filter: drop-shadow(0 0 0.1em rgba(200, 225, 255, 0.38));
  animation: wm-sheen 9s var(--ease) 2s infinite;
}
.wm__rest { background-image: linear-gradient(180deg, #fffaf3, #d8c6ae); }
.wm__i { position: relative; background: inherit; -webkit-background-clip: text; background-clip: text; animation: inherit; } /* positioned, so it carries its own fill */
.wm__i::before { content: ""; position: absolute; left: 50%; top: 0.06em; width: 0.42em; height: 0.39em; transform: translateX(-50%);
  background: url("../img/gems/hunter.svg") center / contain no-repeat; filter: drop-shadow(0 0 0.12em rgba(190, 220, 255, 0.55)); }
.wm__i::after { content: ""; position: absolute; left: 50%; top: 0.08em; width: 0.9em; height: 0.9em; margin: -0.38em 0 0 -0.45em; pointer-events: none; opacity: 0;
  background: radial-gradient(closest-side, #fff 0 6%, transparent 7%), linear-gradient(90deg, transparent 46%, rgba(255, 255, 255, 0.95) 50%, transparent 54%), linear-gradient(0deg, transparent 46%, rgba(255, 255, 255, 0.95) 50%, transparent 54%);
  -webkit-mask: radial-gradient(closest-side, #000, transparent); mask: radial-gradient(closest-side, #000, transparent);
  animation: wm-glint 9s var(--ease) 2s infinite; }
@keyframes wm-sheen { 0%, 62% { background-position: 130% 0, 0 0, 0 0; } 82%, 100% { background-position: -30% 0, 0 0, 0 0; } }
@keyframes wm-glint { 0%, 70% { opacity: 0; transform: scale(0.3) rotate(0deg); } 76% { opacity: 1; transform: scale(1) rotate(45deg); } 86%, 100% { opacity: 0; transform: scale(0.5) rotate(90deg); } }
@media (prefers-reduced-motion: reduce) { .wm__cry, .wm__i, .wm__i::after { animation: none; } }


/* ---------- thread ---------- */
.thread { position: relative; flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.14) transparent; }
.messages { width: min(760px, 100%); margin: 0 auto; padding: 22px 24px 32px; display: flex; flex-direction: column; gap: 22px; }
/* day dividers stay pinned while you scroll through that day */
.day { position: sticky; top: 10px; z-index: 2; align-self: center; }
.day span { display: block; padding: 3px 12px; border-radius: 999px; font-size: 12px; color: var(--muted); background: rgba(10, 13, 21, 0.86); box-shadow: inset 0 0 0 1px var(--line); backdrop-filter: blur(8px); }

/* a new conversation opens on the wolf's profile */
.empty { display: none; }
.main.is-empty .thread { flex: 0 0 auto; margin-top: auto; overflow: visible; }
.main.is-empty .composer-wrap { margin-bottom: auto; }
.main.is-empty .messages { display: none; }
.main.is-empty .empty { display: grid; justify-items: center; text-align: center; padding: 0 20px 20px; }
.empty__wolf { position: relative; display: grid; place-items: center; width: 210px; height: 176px; }
.empty__wolf .sigil__wolf { height: 150px; filter: drop-shadow(0 0 26px var(--glow)) drop-shadow(0 20px 26px rgba(0, 0, 0, 0.55)); }
.empty__wolf .sigil__wave { width: 150px; height: 20px; margin-bottom: 0; }
.empty__wolf:hover .sigil { scale: 1.05; }
.profile__name { margin: 8px 0 0; font-family: var(--font-latin); font-weight: 600; font-size: clamp(38px, 5vw, 54px); line-height: 1.05; letter-spacing: -0.035em; direction: ltr; }
.profile__role { margin: 6px 0 0; color: var(--fg-2); font-size: 15px; }
.profile__greet { margin: 18px 0 0; font-family: var(--read); font-size: clamp(19px, 2.3vw, 23px); color: var(--fg); }

/* your messages: light bubbles with one cut corner */
.msg { display: flex; gap: 14px; animation: msg-in 0.4s var(--ease) both; }
@keyframes msg-in { from { opacity: 0; transform: translateY(8px); } }
.msg--user { flex-direction: column; align-items: flex-end; gap: 4px; }
.msg--user .bubble {
  max-width: min(78%, 560px); padding: 10px 16px; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--fg);
  border-radius: 18px; background: linear-gradient(180deg, #1d2537, #161d2c); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 12px 100%, 0 calc(100% - 12px));
}
.msg--user .msg__images { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; margin-bottom: 4px; }
.msg--user .msg__images img { width: 132px; height: 132px; object-fit: cover; border-radius: 14px; box-shadow: inset 0 0 0 1px var(--line-2); }
.msg__foot { display: flex; align-items: center; gap: 6px; min-height: 28px; }
.msg__time { font-size: 12px; color: var(--dim); }

/* the wolf's replies read like a letter */
.msg--bot .msg__body { flex: 1; min-width: 0; }
.msg__meta { display: flex; align-items: baseline; gap: 10px; margin: 3px 0 4px; }
.msg__meta b { font-family: var(--font-latin); font-weight: 600; font-size: 14.5px; letter-spacing: -0.01em; direction: ltr; }
/* the sigil: the model's wolf while it writes (breathing like the loading wolf), its gem once the reply is done */
.msg__avatar { position: relative; flex: none; width: 34px; height: 34px; display: grid; place-items: center; margin-top: -2px; transition: scale 0.35s var(--ease); }
.msg__avatar > *, .sigil > *, .empty__wolf > * { grid-area: 1 / 1; }
.msg__avatar:hover { scale: 1.16; }
[data-model="alpha"] { --glow: rgba(120, 180, 255, 0.5); }
[data-model="hunter"] { --glow: rgba(225, 233, 245, 0.42); }
[data-model="scout"] { --glow: rgba(160, 145, 255, 0.5); }
.sigil { display: grid; place-items: center; animation: pre-pulse 1.8s ease-in-out infinite; transition: scale 0.4s var(--ease); }
.sigil.is-broken { animation: none; }
/* writing: no pulsing. The wolf floats a little, a light sweeps across its facets, warm dust rises from it */
.sigil--writing { animation: float 3.4s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-2.5px); } }
.sigil--writing .sigil__wolf { animation: glow 2.6s ease-in-out infinite; }
@keyframes glow { 50% { filter: drop-shadow(0 0 11px var(--glow)) brightness(1.07); } }
.sigil__shine {
  align-self: stretch; justify-self: stretch; pointer-events: none; mix-blend-mode: screen;
  -webkit-mask-position: center; mask-position: center; -webkit-mask-size: contain; mask-size: contain; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  background: linear-gradient(115deg, transparent 36%, rgba(255, 248, 236, 0.95) 50%, transparent 64%) 130% 0 / 260% 100% no-repeat;
  animation: sweep 2.6s cubic-bezier(0.45, 0, 0.25, 1) infinite;
}
@keyframes sweep { 0% { background-position: 130% 0; } 55%, 100% { background-position: -30% 0; } }
.sigil__motes { position: relative; align-self: end; justify-self: center; width: 30px; height: 0; pointer-events: none; }
.sigil__motes i { position: absolute; bottom: 2px; left: var(--x); width: 2px; height: 2px; border-radius: 50%; background: #ecd2ab; box-shadow: 0 0 5px #d9b27f; opacity: 0; animation: mote 2.8s ease-out var(--d) infinite; }
.sigil__motes i:nth-child(1) { --x: 6px; --d: 0s; --dx: -3px; }
.sigil__motes i:nth-child(2) { --x: 15px; --d: 0.7s; --dx: 2px; }
.sigil__motes i:nth-child(3) { --x: 23px; --d: 1.4s; --dx: 4px; }
.sigil__motes i:nth-child(4) { --x: 11px; --d: 2.1s; --dx: -1px; }
@keyframes mote { 0% { opacity: 0; transform: translate(0, 0) scale(1); } 18% { opacity: 0.95; } 100% { opacity: 0; transform: translate(var(--dx), -30px) scale(0.6); } }
.sigil.is-broken .sigil__shine, .sigil.is-broken .sigil__motes { display: none; }
.msg__avatar:hover .sigil__wolf, .msg__avatar:hover .sigil__shine, .msg__avatar:hover .sigil__motes i { animation-play-state: paused; }
.msg__avatar:hover .sigil, .empty__wolf:hover .sigil { animation-play-state: paused; }
@keyframes pre-pulse { 50% { transform: scale(1.05); opacity: 0.85; } }
.sigil__wolf { display: block; height: 32px; width: auto; filter: drop-shadow(0 0 6px var(--glow)); }
.sigil__gem { display: block; width: 26px; height: 26px; transform-origin: 50% 100%; filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.5)) drop-shadow(0 0 6px var(--glow)); }
.shards { position: relative; display: block; }
.shards i { position: absolute; inset: 0; background: center / 100% 100% no-repeat; will-change: transform, opacity; }
.sigil__flash { position: absolute; inset: -8px; border-radius: 50%; pointer-events: none; background: radial-gradient(closest-side, rgba(255, 255, 255, 0.95), rgba(200, 225, 255, 0.4) 45%, transparent); }
.sigil__wave { justify-self: center; align-self: end; width: 40px; height: 10px; margin-bottom: -3px; border-radius: 50%; border: 1px solid var(--glow); box-shadow: 0 0 10px var(--glow); pointer-events: none; }
.wait-slot:empty { display: none; }
.typing-dots { display: inline-flex; gap: 7px; padding: 10px 2px 8px; }
.typing-dots i { width: 7px; height: 7px; transform: rotate(45deg); background: var(--accent); opacity: 0.25; animation: dot 1.2s var(--ease) infinite; }
.typing-dots i:nth-child(2) { animation-delay: 0.16s; }
.typing-dots i:nth-child(3) { animation-delay: 0.32s; }
@keyframes dot { 30% { opacity: 1; transform: rotate(45deg) translateY(-3px); box-shadow: 0 0 8px var(--accent); } }
@keyframes breathe { 50% { box-shadow: 0 0 0 6px rgba(159, 211, 255, 0.08); } }
.msg__actions { display: flex; gap: 2px; opacity: 0; transition: opacity 0.2s; }
.msg--bot .msg__actions { margin-top: 4px; margin-inline-start: -8px; }
.msg:hover .msg__actions, .msg:focus-within .msg__actions, .msg--bot.last .msg__actions { opacity: 1; }
.msg.streaming .msg__actions { visibility: hidden; }
.msg__actions button { width: 32px; height: 32px; display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 17px; }
.msg__actions button:hover { background: var(--hover); color: var(--fg); }
.msg__actions button[aria-pressed="true"] { color: var(--accent); }
.msg__error { margin-top: 8px; padding: 10px 14px; border-radius: 12px; border: 1px solid rgba(255, 138, 138, 0.3); background: rgba(255, 138, 138, 0.08); color: #ffd0d0; font-size: 14.5px; font-family: var(--font); }
.edit-box { width: min(100%, 620px); display: grid; gap: 8px; padding: 10px; border-radius: 18px; background: linear-gradient(180deg, #1d2537, #161d2c); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08); }
.edit-box textarea { width: 100%; min-height: 60px; max-height: 40vh; resize: none; border: 0; outline: 0; background: transparent; line-height: 1.7; }
.edit-box div { display: flex; gap: 8px; justify-content: flex-end; }

/* thinking */
.think-box { margin-bottom: 10px; }
.think-box { font-family: var(--font); }
.think-box summary { display: inline-flex; align-items: center; gap: 8px; list-style: none; cursor: pointer; color: var(--muted); font-size: 14.5px; padding: 2px 0; }
.think-box summary::-webkit-details-marker { display: none; }
.think-box summary .ic { font-size: 14px; transition: transform 0.2s; }
.think-box[open] summary .ic { transform: rotate(180deg); }
.think-box__body { margin-top: 8px; padding-inline-start: 14px; border-inline-start: 2px solid var(--line-2); color: var(--muted); font-size: 14.5px; white-space: pre-wrap; }
.shimmer { background: linear-gradient(90deg, var(--muted) 0%, #fff 50%, var(--muted) 100%); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 1.6s linear infinite; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.caret { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--fg); margin-inline-start: 4px; vertical-align: middle; animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: 0.25; } }

/* markdown */
.md { overflow-wrap: anywhere; color: #efe6da; font-family: var(--read); font-size: 18px; line-height: 2; }
.md > *:first-child { margin-top: 0; }
.md p { margin: 0 0 14px; }
.md h2, .md h3, .md h4 { margin: 22px 0 10px; line-height: 1.4; font-weight: 600; }
.md h2 { font-size: 21px; } .md h3 { font-size: 18px; } .md h4 { font-size: 16px; }
.md ul, .md ol { margin: 0 0 14px; padding-inline-start: 24px; }
.md li { margin: 4px 0; }
.md li::marker { color: var(--accent); }
.md strong { font-weight: 600; color: #fffaf2; }
.md a { color: var(--accent); text-underline-offset: 3px; }
.md code { font-family: var(--mono); font-size: 0.86em; padding: 2px 6px; border-radius: 6px; background: rgba(255, 255, 255, 0.08); direction: ltr; unicode-bidi: isolate; }
.md blockquote { margin: 0 0 14px; padding: 4px 16px; border-inline-start: 3px solid var(--line-2); color: var(--fg-2); }
.md hr { border: 0; border-top: 1px solid var(--line-2); margin: 20px 0; }
.table-wrap { overflow-x: auto; margin: 0 0 14px; border: 1px solid var(--line-2); border-radius: 12px; }
.md table { border-collapse: collapse; width: 100%; font-size: 14.5px; font-family: var(--font); line-height: 1.6; }
.md th, .md td { padding: 9px 14px; text-align: start; border-bottom: 1px solid var(--line); }
.md th { background: rgba(255, 255, 255, 0.04); font-weight: 600; }
.md tr:last-child td { border-bottom: 0; }
.codeblock { margin: 0 0 16px; border-radius: 14px; overflow: hidden; background: #0a0d16; box-shadow: inset 0 0 0 1px var(--line-2), 0 14px 30px -18px rgba(0, 0, 0, 0.8); line-height: 1.7; }
.codeblock__bar { line-height: 1.5; display: flex; align-items: center; justify-content: space-between; padding: 6px 8px 6px 14px; padding-inline-start: 14px; background: rgba(255, 255, 255, 0.04); font: 12.5px var(--mono); color: var(--muted); direction: ltr; }
.codeblock__copy { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font: 12.5px var(--font); }
.codeblock__copy:hover { background: var(--hover); color: var(--fg); }
.codeblock pre { margin: 0; padding: 14px 16px; overflow-x: auto; text-align: left; font-size: 13.5px; line-height: 1.7; }
.codeblock code { font: 13.5px/1.7 var(--mono); background: none; padding: 0; }
.t-k { color: #9fd3ff; } .t-s { color: #c8e3b0; } .t-n { color: #f0c8a0; } .t-c { color: #6f7a90; font-style: italic; } .t-f { color: #e6edf8; }

.to-bottom { position: sticky; bottom: 12px; display: grid; place-items: center; width: 38px; height: 38px; margin: -50px auto 12px; border: 0; border-radius: 50%; background: linear-gradient(180deg, #1a2131, #10141f); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 8px 20px rgba(0, 0, 0, 0.5); color: var(--fg); font-size: 18px; z-index: 5; }

/* ---------- composer: a cut stone ---------- */
.composer-wrap { position: relative; z-index: 2; flex: none; width: min(760px, 100%); margin: 0 auto; padding: 0 20px calc(18px + env(safe-area-inset-bottom)); }
.composer-shell { filter: drop-shadow(0 22px 30px rgba(0, 0, 0, 0.5)); } /* the cut shape clips its own shadow, so the shell casts it */
.composer {
  --cut: 14px;
  position: relative; display: grid; gap: 4px; padding: 12px 14px 10px; isolation: isolate;
  clip-path: polygon(var(--cut) 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, var(--cut) 100%, 0 calc(100% - var(--cut)), 0 var(--cut));
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.07) 30%, rgba(255, 255, 255, 0.03) 70%, rgba(0, 0, 0, 0.55));
}
.composer::before { content: ""; position: absolute; inset: 1px; z-index: -1; --cut: 13.6px; clip-path: polygon(var(--cut) 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, var(--cut) 100%, 0 calc(100% - var(--cut)), 0 var(--cut)); background: linear-gradient(180deg, #161d2c, #0d111a 70%); }
.composer::after { content: ""; position: absolute; inset: 1px; z-index: -1; pointer-events: none; --cut: 13.6px; clip-path: polygon(var(--cut) 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, var(--cut) 100%, 0 calc(100% - var(--cut)), 0 var(--cut)); background: linear-gradient(104deg, transparent 32%, rgba(255, 255, 255, 0.035) 46%, transparent 60%); }
.composer:focus-within { background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 62%, transparent), color-mix(in srgb, var(--accent) 16%, transparent) 30%, rgba(255, 255, 255, 0.04) 70%, rgba(0, 0, 0, 0.55)); }
.composer textarea { width: 100%; min-height: 28px; max-height: 40vh; padding: 4px 10px; border: 0; outline: 0; resize: none; background: transparent; line-height: 1.7; font-size: 16px; }
.composer textarea::placeholder { color: var(--muted); }
.composer__bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.composer__tools, .composer__send { display: flex; align-items: center; gap: 6px; }
.tool-btn { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; border: 0; background: transparent; color: var(--fg-2); font-size: 19px; transition: background 0.2s, color 0.2s; }
.tool-btn:hover { background: var(--hover); color: var(--fg); }
.tool-btn.listening { color: #070a12; background: var(--accent); animation: breathe 1.4s infinite; }
/* a baguette-cut toggle */
.chip-toggle { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 16px; border: 0; clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 10px 100%, 0 50%); background: rgba(255, 255, 255, 0.07); color: var(--fg-2); font-size: 14px; white-space: nowrap; transition: background 0.2s, color 0.2s; }
.chip-toggle .ic { font-size: 17px; }
.chip-toggle:hover { background: rgba(255, 255, 255, 0.11); }
.chip-toggle[aria-pressed="true"] { color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, transparent); }
/* send: a cut gem */
.send-btn { position: relative; width: 40px; height: 40px; display: grid; place-items: center; padding: 0; border: 0; background: transparent; color: #070a12; font-size: 17px; transition: opacity 0.2s; }
.send-btn::before { content: ""; position: absolute; inset: 6px; border-radius: 5px; transform: rotate(45deg); background: linear-gradient(135deg, #ffffff 0%, #e8eef6 42%, #aab6c8 100%); box-shadow: inset 0 1px 0 #ffffff, inset 0 -2px 0 rgba(0, 0, 0, 0.18), 0 4px 12px -2px rgba(0, 0, 0, 0.55), 0 0 14px rgba(190, 220, 255, 0.22); transition: transform 0.25s var(--ease); }
.send-btn .ic { position: relative; stroke-width: 2.3; }
.send-btn:disabled { opacity: 0.35; cursor: default; }
.send-btn:not(:disabled):hover::before { transform: rotate(45deg) scale(1.08); }
.send-btn:not(:disabled):active::before { transform: rotate(45deg) scale(0.93); }
.send-btn .ic-stop { display: none; fill: currentColor; }
.main.streaming .send-btn .ic-send { display: none; }
.main.streaming .send-btn .ic-stop { display: block; }
.attachments { display: flex; flex-wrap: wrap; gap: 8px; padding: 2px 6px 6px; }
.attachment { position: relative; width: 60px; height: 60px; border-radius: 12px; overflow: hidden; box-shadow: inset 0 0 0 1px var(--line-2); }
.attachment img { width: 100%; height: 100%; object-fit: cover; }
.attachment button { position: absolute; top: 3px; inset-inline-end: 3px; width: 20px; height: 20px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: rgba(0, 0, 0, 0.7); color: #fff; font-size: 12px; }
/* openers: suggested first messages, like quick replies in a messenger */
.suggestions { display: none; }
.main.is-empty .suggestions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0 0 14px; }
.suggestion { --cut: 8px; display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 15px; border: 0; clip-path: polygon(var(--cut) 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, var(--cut) 100%, 0 calc(100% - var(--cut)), 0 var(--cut)); background: linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.035)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07); color: var(--fg-2); font-size: 14px; white-space: nowrap; transition: background 0.2s, color 0.2s, transform 0.25s var(--ease); }
.suggestion:hover { background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.06)); color: var(--fg); transform: translateY(-1px); }
.suggestion .ic { font-size: 16px; color: var(--accent); }

.dropzone { position: absolute; inset: 10px; z-index: 40; display: grid; place-items: center; border-radius: 24px; border: 2px dashed color-mix(in srgb, var(--accent) 50%, transparent); background: rgba(7, 10, 18, 0.88); font-size: 18px; pointer-events: none; }

/* ---------- dialog ---------- */
.dialog { padding: 0; border: 0; background: transparent; color: var(--fg); max-width: min(560px, calc(100vw - 24px)); width: 100%; }
.dialog::backdrop { background: rgba(3, 5, 10, 0.7); backdrop-filter: blur(4px); }
.dialog[open] { animation: pop 0.2s var(--ease); }
.dialog__card { display: grid; gap: 16px; padding: 20px; border-radius: 22px; background: #0e1220; border: 1px solid var(--line-2); max-height: calc(100dvh - 40px); overflow-y: auto; }
.dialog__head { display: flex; align-items: center; justify-content: space-between; }
.dialog__head h2 { margin: 0; font-size: 19px; font-weight: 600; }
.dialog__foot { display: flex; justify-content: flex-end; gap: 8px; }
.field { display: grid; gap: 6px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field > span, .field legend { font-size: 14px; color: var(--fg-2); padding: 0; margin-bottom: 6px; }
.field input:not([type="radio"]), .field textarea { width: 100%; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.04); outline: 0; font-size: 14.5px; }
.field input:focus, .field textarea:focus { border-color: var(--ice); }
.field textarea { resize: vertical; line-height: 1.6; }
.field small { color: var(--muted); font-size: 12.5px; }
.field-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.radio { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); cursor: pointer; margin-bottom: 8px; }
.radio:has(input:checked) { border-color: rgba(159, 211, 255, 0.5); background: rgba(159, 211, 255, 0.05); }
.radio input { margin-top: 6px; accent-color: var(--ice); color-scheme: dark; }
.radio span { display: grid; }
.radio b { font-weight: 500; }
.radio small { color: var(--muted); font-size: 13px; }
.api-fields { display: grid; gap: 14px; }
.api-fields.off { display: none; }
.field-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- toast ---------- */
.toast { position: fixed; bottom: 24px; left: 50%; z-index: 60; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; padding: 10px 18px; border-radius: 999px; background: #f2f5fa; color: #070a12; font-size: 14.5px; transition: opacity 0.25s, transform 0.25s var(--ease); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .app, .app.collapsed { grid-template-columns: minmax(0, 1fr); }
  .sidebar {
    position: fixed; inset-block: 0; inset-inline-start: 0; z-index: 50; width: min(300px, 86vw);
    transform: translateX(100%); transition: transform 0.3s var(--ease); visibility: visible !important; opacity: 1 !important;
  }
  .app.side-open .sidebar { transform: none; }
  .scrim { display: block; position: fixed; inset: 0; z-index: 45; background: rgba(3, 5, 10, 0.6); opacity: 0; pointer-events: none; transition: opacity 0.3s; }
  .app.side-open .scrim { opacity: 1; pointer-events: auto; }
  #openSidebar, .only-collapsed { display: inline-grid; }
  .room { background-image: url("../img/studio/room-900.webp"); }
  .topbar { height: 60px; padding: 0 6px; }
  .contact__btn { height: 50px; gap: 9px; padding: 4px 8px; }
  .contact__face { width: 34px; height: 40px; }
  .contact__face img { height: 34px; }
  .contact__name b { font-size: 17px; }
  .messages { padding: 14px 14px 24px; }
  .composer-wrap { padding: 0 10px calc(12px + env(safe-area-inset-bottom)); }
  /* phones: the four openers sit in a 2 x 2 grid that always fits the screen width */
  .main.is-empty .suggestions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .suggestion { min-width: 0; justify-content: center; padding: 0 10px; font-size: 13.5px; }
  .suggestion span { overflow: hidden; text-overflow: ellipsis; }
  /* phones: the writing box stays docked at the bottom; the wolf's greeting centres in the space above */
  .main.is-empty .thread { flex: 1 1 auto; min-height: 0; margin-top: 0; display: flex; flex-direction: column; justify-content: center; overflow-y: auto; }
  .main.is-empty .composer-wrap { margin-bottom: 0; }
  .empty__wolf { width: 170px; height: 140px; }
  .empty__wolf .sigil__wolf { height: 118px; }
  .field-row { grid-template-columns: 1fr; }
  .msg__actions { opacity: 1; }
  .chat-item__tools { opacity: 1; }
  .md { font-size: 17.5px; }
}
@media (max-width: 420px) {
  .chip-toggle { padding: 0 13px; }
  .composer__tools, .composer__send { gap: 4px; }
}
/* phones: the model menu opens as a plate under the header, never past the screen edge */
@media (max-width: 560px) {
  .menu { position: fixed; top: 64px; inset-inline: 10px; width: auto; }
}
/* short screens (landscape phones): the profile shrinks so the composer always stays in view */
@media (max-height: 560px) {
  .topbar { height: 54px; }
  .contact__btn { height: 48px; }
  .menu { top: 58px; max-height: calc(100svh - 70px); overflow-y: auto; }
  .main.is-empty .thread { flex: 0 1 auto; min-height: 0; overflow-y: auto; }
  .main.is-empty .empty { padding-bottom: 10px; }
  .empty__wolf { width: 130px; height: 100px; }
  .empty__wolf .sigil__wolf { height: 84px; }
  .empty__wolf .sigil__wave { width: 100px; }
  .profile__name { margin-top: 0; font-size: 32px; }
  .profile__role { margin-top: 2px; font-size: 13.5px; }
  .profile__greet { margin-top: 8px; font-size: 17px; }
  .main.is-empty .suggestions { margin-bottom: 8px; }
  .composer { padding: 8px 12px 6px; }
  .messages { padding-top: 12px; padding-bottom: 16px; gap: 16px; }
}
@media (max-height: 440px) {
  .profile__greet { display: none; }
}
/* large desktops: a wider letter and larger type, so the room is not a strip in the middle */
@media (min-width: 1680px) {
  :root { --side: 312px; }
  body { font-size: 17px; }
  .topbar { height: 72px; }
  .messages, .composer-wrap { width: min(880px, 100%); }
  .md { font-size: 19.5px; }
  .msg--user .bubble { max-width: min(78%, 640px); font-size: 17px; }
  .empty__wolf { width: 250px; height: 210px; }
  .empty__wolf .sigil__wolf { height: 180px; }
  .profile__name { font-size: 64px; }
  .profile__role { font-size: 16.5px; }
  .profile__greet { font-size: 26px; }
  .composer textarea { font-size: 17px; }
  .suggestion { height: 42px; font-size: 15.5px; }
}
@media (min-width: 2200px) {
  :root { --side: 340px; }
  body { font-size: 18px; }
  .topbar { height: 80px; }
  .messages, .composer-wrap { width: min(1000px, 100%); }
  .md { font-size: 21px; }
  .msg--user .bubble { max-width: min(78%, 720px); font-size: 18.5px; }
  .codeblock pre { font-size: 15px; }
  .empty__wolf { width: 290px; height: 240px; }
  .empty__wolf .sigil__wolf { height: 210px; }
  .profile__name { font-size: 76px; }
  .profile__role { font-size: 18px; }
  .profile__greet { font-size: 29px; }
  .composer textarea { font-size: 18.5px; }
  .chat-item__title { font-size: 16px; }
}
@media (pointer: coarse) {
  .icon-btn, .tool-btn, .send-btn { min-width: 44px; min-height: 44px; }
  .send-btn::before { inset: 7px; } /* the turned square must fit inside the 44px target */
  .suggestion { height: 42px; }
  .chip-toggle { height: 40px; }
  .msg__actions button { width: 40px; height: 40px; }
  .chat-item__tools button { width: 40px; height: 40px; }
  .composer textarea { min-height: 40px; padding-block: 7px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

/* وضع الهاتف الداكن/الفاتح لا يغيّر ألوان الموقع: المتصفّحات (Samsung Internet وChrome) لا تعيد تلوين صفحة تعلن أنّها داكنة. */
@media (prefers-color-scheme: dark) { :root { color-scheme: dark only; } }

/* install-as-app button: shown by install.js only where the browser can install the site */
[data-install][hidden] { display: none !important; }
.install-btn { width: 100%; justify-content: center; gap: 10px; margin-bottom: 8px; }
.install-btn img { border-radius: 6px; }
