@import url("https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;800&family=Amiri:wght@700&family=Reem+Kufi:wght@700&display=swap");
:root { --bg: #140f24; --fg: #f6f1ff; --muted: #a99cc8; --accent: #ff7a59; --border: #2e2548; --radius: 18px; --font: "Cairo", sans-serif; color-scheme: dark; }
* { box-sizing: border-box; }
body { margin: 0; background: radial-gradient(circle at 80% -10%, #3b1f6b, var(--bg) 55%) fixed; color: var(--fg); font-family: var(--font); }
button, input, textarea { font: inherit; color: inherit; }
button:focus-visible, .chip:focus-within, input:focus-visible, textarea:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.app { max-width: 1100px; margin: 0 auto; padding: 0 16px calc(96px + env(safe-area-inset-bottom)); }
.top { display: flex; align-items: center; gap: 12px; padding: 18px 0; }
.top h1 { margin: 0; font-size: 1.5rem; line-height: 1.1; }
.top p { margin: 0; color: var(--muted); font-size: .9rem; }
.logo { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-weight: 800; font-size: 1.6rem;
  background: linear-gradient(135deg, #ff7a59, #c2185b, #5b4bdb); }
.free { margin-inline-start: auto; background: #2bb67333; color: #7ee2a8; padding: 4px 12px; border-radius: 99px; font-weight: 700; font-size: .85rem; }
.maker { display: grid; gap: 18px; }
@media (min-width: 820px) { .maker { grid-template-columns: 1fr 380px; align-items: start; } .stage { position: sticky; top: 16px; } }
.stage { display: flex; justify-content: center; }
.cv { width: 100%; max-width: 460px; border-radius: var(--radius); box-shadow: 0 20px 50px #0008; display: block; background: #000; }
.cv.story { max-width: 300px; }
.cv.hide { display: none; }
.result { width: 100%; display: flex; justify-content: center; }
.side { display: grid; gap: 14px; }
.panel { background: #ffffff0d; border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; display: grid; gap: 8px; }
.lbl { color: var(--muted); font-size: .9rem; font-weight: 600; }
.inp { width: 100%; background: #0007; border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; font-size: 16px; resize: vertical; }
.themes { display: flex; flex-wrap: wrap; gap: 10px; }
.sw { width: 44px; height: 44px; border-radius: 50%; border: 3px solid transparent; cursor: pointer; }
.sw.on { border-color: #fff; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 44px; padding: 0 16px; border-radius: 99px; border: 1px solid var(--border); background: #ffffff10; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; font-weight: 600; }
.main { display: block; min-width: 0; }
.chip.file { position: relative; }
.chip.on { background: var(--fg); color: var(--bg); }
.chip.wide { width: 100%; min-height: 54px; border-style: dashed; border-radius: var(--radius); }
input[type=range] { width: 100%; accent-color: var(--accent); min-height: 32px; }
.btn-main { min-height: 54px; border: 0; border-radius: var(--radius); background: linear-gradient(135deg, #ff7a59, #c2185b); font-weight: 800;
  font-size: 1.1rem; cursor: pointer; display: flex; align-items: center; justify-content: center; text-decoration: none; color: #fff; }
.btn-main.alt { background: linear-gradient(135deg, #2bb673, #0d5c46); flex: 1; }
.btn-ghost { min-height: 54px; padding: 0 20px; border-radius: var(--radius); border: 1px solid var(--border); background: none; cursor: pointer; }
.row2 { display: flex; gap: 10px; }
.prog { position: relative; height: 54px; border-radius: var(--radius); background: #ffffff10; overflow: hidden; display: grid; place-items: center; }
.prog div { position: absolute; inset: 0 0 0 auto; background: linear-gradient(135deg, #ff7a5988, #c2185b88); }
.prog span { position: relative; font-weight: 700; }
.err { background: #c2185b33; border: 1px solid #c2185b; padding: 10px 14px; border-radius: 12px; }
.tabs { position: fixed; bottom: 0; left: 0; right: 0; display: flex; justify-content: center; gap: 8px; background: #140f24ee; backdrop-filter: blur(12px);
  border-top: 1px solid var(--border); padding: 6px 16px max(8px, env(safe-area-inset-bottom)); }
.tabs button { flex: 1; max-width: 220px; min-height: 56px; border: 0; background: none; color: var(--muted); border-radius: 14px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; font-weight: 700; font-size: .85rem; }
.tabs button span { font-size: 1.3rem; }
.tabs button.on { color: var(--fg); background: #ffffff12; }
