@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700;800&display=swap');

:root {
  font-family: Inter, "Cairo", "Dubai", "Segoe UI", system-ui, sans-serif;
  color: #111218;
  background: #fff;
  --blue: #477df4;
  --blue-dark: #2d64eb;
  --muted: #575b67;
  --surface: #f4f5fb;
  --line: #e1e3eb;
  --shadow: 0 2px 10px #151f3612;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .55; }
button:focus-visible, a:focus-visible, summary:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid var(--blue-dark); outline-offset: 3px; }
.topbar { min-height: 70px; padding: 14px clamp(16px, 2.5vw, 44px); display: flex; justify-content: space-between; align-items: center; gap: 16px; border-bottom: 1px solid #f0f0f4; background: #fff; }
.topbar nav { display: flex; align-items: center; gap: clamp(10px, 2.3vw, 32px); font-size: 14px; }
.brand { display: inline-flex; align-items: center; gap: 8px; font-size: clamp(17px, 2vw, 23px); font-weight: 750; white-space: nowrap; }
.brand-icon { display: grid; grid-template: repeat(2, 10px) / repeat(2, 10px); gap: 2px; color: var(--blue); }
.brand-icon i { border: 1.7px solid currentColor; border-radius: 2px; }
.brand-icon i:first-child, .brand-icon i:last-child { box-shadow: inset 0 0 0 2px white; background: currentColor; }
.primary, .outline, .swatches button { display: inline-flex; align-items: center; justify-content: center; text-align: center; border-radius: 8px; padding: 11px 17px; border: 1px solid var(--line); background: #fff; color: #15151c; }
.primary { background: var(--blue); border-color: var(--blue); color: #fff; font-weight: 650; }
.primary:hover { background: var(--blue-dark); }
.outline:hover, .swatches button:not(.primary):hover { border-color: var(--blue); }
.big { min-width: 228px; padding: 16px 27px; font-size: 18px; }
.hero { min-height: 630px; padding: clamp(65px, 10vw, 150px) clamp(16px, 2.5vw, 44px) 55px; display: grid; grid-template-columns: 1fr 1fr; align-items: center; overflow: hidden; background: linear-gradient(#fff, #f6f7fc); }
.hero h1 { font-size: clamp(38px, 4.1vw, 64px); line-height: 1.08; letter-spacing: -.035em; margin: 0 0 25px; }
.hero ul { list-style: none; padding: 0; margin: 0 0 30px; display: grid; gap: 17px; color: #30323d; font-size: clamp(16px, 1.55vw, 21px); }
.hero li::before { content: "✓"; margin-right: 10px; }
.hero-art { min-height: 430px; position: relative; isolation: isolate; }
.hero-orbit { position: absolute; width: min(75%, 420px); aspect-ratio: 1; border-radius: 50%; background: linear-gradient(135deg, #e6e7ff, #f1f2fc); left: 0; top: 0; z-index: -1; }
.hero-orbit::after { content: ""; position: absolute; inset: 18%; border-radius: 50%; background: #dadcfb66; }
.mock-list, .mock-types { position: absolute; background: white; border: 1px solid #f5f5fa; border-radius: 15px; box-shadow: 0 15px 50px #3c4b8820; }
.mock-list { top: 36px; left: 18%; width: 47%; max-width: 270px; padding: 19px; min-height: 365px; font-size: 14px; }
.mock-menu { font-size: 19px; }
.mock-row { display: flex; align-items: center; gap: 10px; margin: 12px 0; white-space: nowrap; font-size: 12px; }
.mock-row small { display: block; color: var(--muted); margin-top: 3px; }
.mock-row .active-dot { color: #247950; }
.sample-qr { display: inline-flex; padding: 3px; background: #fff; border: 1px solid #e1e2eb; border-radius: 7px; width: 51px; aspect-ratio: 1; flex: none; }
.sample-qr svg { width: 100%; height: auto; }
.mock-types { top: 121px; right: 2%; width: 45%; max-width: 275px; padding: 20px; font-size: 14px; }
.mock-types small { float: right; color: var(--muted); }
.mock-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 15px; }
.mock-grid span { background: #f4f4fb; border-radius: 7px; padding: 10px 5px; text-align: center; font-size: 11px; white-space: nowrap; }
.mock-grid span:first-child { background: #818af5; color: white; }
.mock-strip { display: flex; gap: 7px; position: absolute; top: 342px; left: 8%; }
.mock-strip .sample-qr { width: 40px; box-shadow: var(--shadow); }
.how, .faq { padding: 75px 22px; max-width: 1160px; margin: auto; }
.how { text-align: center; }
.how h2, .faq h2 { margin: 0 0 26px; font-size: clamp(25px, 3.5vw, 37px); letter-spacing: -.025em; }
.how-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 35px 0; }
.how article { border: 1px solid var(--line); border-radius: 14px; padding: 24px 15px; }
.how article span { color: var(--blue-dark); font-size: 26px; }
.how article p, .faq p { color: var(--muted); }
.faq { max-width: 850px; }
.faq details { border-bottom: 1px solid var(--line); padding: 18px 0; }
.faq summary { font-weight: 650; cursor: pointer; }
footer { display: flex; gap: 25px; border-top: 1px solid var(--line); padding: 27px 32px; }
.wizard { background: var(--surface); }
.wizard .topbar { justify-content: flex-start; }
.wizard .topbar nav { margin-left: auto; margin-right: min(24%, 305px); color: var(--blue-dark); }
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) 275px; gap: 32px; padding: 46px clamp(16px, 2.5vw, 44px) 106px; max-width: 1520px; margin: auto; min-height: calc(100dvh - 70px); }
.editor h1 { font-size: clamp(21px, 2.1vw, 29px); margin: 10px 0 17px; letter-spacing: -.02em; }
.editor h1:focus { outline: none; }
.type-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.type-card, .panel { border-radius: 9px; background: #fff; box-shadow: var(--shadow); border: 1px solid #eeeff4; }
.type-card { min-height: 80px; padding: 12px 15px; display: flex; align-items: center; gap: 22px; text-align: left; }
.type-card:hover, .type-card:focus-visible { border-color: var(--blue); }
.tile-icon { flex: 0 0 46px; height: 46px; display: grid; place-items: center; background: #f5f6ff; color: var(--blue); border-radius: 8px; font-size: 24px; font-weight: 550; }
.type-card:hover .tile-icon { color: white; background: var(--blue); }
.type-card strong, .panel strong { font-size: 17px; }
.type-card small, .panel small { display: block; margin-top: 3px; color: var(--muted); line-height: 1.35; font-size: 14px; }
.panel { margin-bottom: 14px; }
.panel summary { list-style: none; cursor: pointer; padding: 16px 30px; display: flex; align-items: center; gap: 16px; }
.panel summary::-webkit-details-marker { display: none; }
.panel summary::after { content: "⌄"; margin-left: auto; font-size: 22px; }
.panel[open] summary::after { transform: rotate(180deg); }
.panel-body { margin: 0 30px; padding: 22px 0 28px; border-top: 1px solid #edf0f4; }
label { display: block; color: #222531; font-weight: 600; margin: 8px 0 12px; }
input:not([type="radio"]):not([type="checkbox"]), textarea, select { display: block; width: 100%; padding: 11px 13px; min-height: 46px; border: 1px solid #d9dce5; border-radius: 7px; margin-top: 8px; background: #fff; color: #21222e; }
textarea { min-height: 115px; resize: vertical; }
.check { display: flex; gap: 8px; align-items: center; font-weight: 500; }
.hint { font-size: 14px; color: var(--muted); line-height: 1.5; }
.preview { text-align: center; min-width: 0; align-self: start; position: sticky; top: 20px; }
.preview:not(:has(.switch)) { margin-top: 57px; }
.switch { display: inline-flex; margin: 1px auto 15px; border: 1px solid #b6c6ee; padding: 3px; border-radius: 24px; }
.switch button { padding: 6px 12px; color: var(--blue-dark); border: 0; background: transparent; border-radius: 20px; font-size: 13px; }
.switch button[aria-pressed="true"] { color: white; background: var(--blue); }
.phone { margin: 0 auto; width: 100%; max-width: 275px; min-height: 490px; border: 8px solid #111116; border-radius: 40px; background: linear-gradient(#d8d9fc 38%, #fff 38%); overflow: hidden; }
.phone:has(.phone-code) { background: white; }
.phone-top { height: 32px; padding: 0 13px; display: flex; justify-content: space-between; align-items: center; font-size: 11px; }
.phone-top i { background: #111116; display: block; width: 67px; height: 19px; border-radius: 20px; }
.address { border-radius: 20px; font-size: 11px; background: #f5f5fbe8; margin: 0 10px; padding: 7px 9px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.phone-page { padding: 17px 12px; }
.phone-card, .phone-skeleton { background: white; border-radius: 8px; box-shadow: var(--shadow); padding: 9px; margin-bottom: 12px; }
.phone-card p { overflow-wrap: anywhere; font-size: 12px; color: var(--muted); margin: 6px 0; white-space: pre-wrap; }
.phone-image { height: 130px; border-radius: 6px; background: #e7e8ef; display: grid; place-items: center; font-size: 42px; color: #818aad; margin-bottom: 12px; }
.phone-skeleton { height: 50px; background: linear-gradient(#e9e9f0 0 0) center / 78% 6px no-repeat, linear-gradient(#e9e9f0 0 0) center 67% / 60% 6px no-repeat, #fff; }
.phone-code { min-height: 375px; display: grid; place-items: center; }
.phone-code svg { width: 78%; height: auto; max-height: 280px; }
.wizard-bar { position: fixed; z-index: 2; bottom: 0; left: 0; right: 0; min-height: 78px; background: #fff; box-shadow: 0 -6px 28px #212d5512; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; padding: 12px clamp(16px, 2.5vw, 44px); }
.wizard-bar ol { display: flex; align-items: center; gap: 18px; list-style: none; margin: 0; padding: 0; }
.wizard-bar li { display: flex; gap: 7px; align-items: center; font-size: 14px; color: var(--muted); }
.wizard-bar li + li::before { content: "›"; padding-right: 6px; }
.wizard-bar li span { border: 1px solid var(--line); border-radius: 50%; width: 27px; height: 27px; display: grid; place-items: center; }
.wizard-bar .current { color: #111; }
.wizard-bar .current span { color: white; background: var(--blue); border-color: var(--blue); }
.wizard-bar .primary { justify-self: end; width: min(100%, 222px); min-height: 46px; }
.back, .text { border: 0; padding: 6px 0; color: var(--blue-dark); background: none; }
.back { justify-self: start; color: #373944; }
.swatches, .colors { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.swatch:has(:checked) { border-color: var(--blue); background: #f5f8ff; }
.colors label { min-width: 130px; }
input[type="color"] { cursor: pointer; }
.error { color: #a7242c; }
.error a { text-decoration: underline; }
dialog { border: 1px solid var(--line); border-radius: 16px; padding: 25px; width: min(400px, calc(100% - 32px)); }
dialog::backdrop { background: #161a3680; }
dialog h2 { margin: 0 28px 10px 0; }
.close { float: right; border: 0; background: none; font-size: 23px; }
.auth { max-width: 450px; margin: 50px auto; padding: 28px; }
.dashboard { max-width: 850px; margin: 40px auto; padding: 0 16px; }
.saved a { color: var(--blue-dark); overflow-wrap: anywhere; }
.daily { white-space: pre-line; }
@media (max-width: 850px) {
  .workspace { grid-template-columns: minmax(0, 1fr) 210px; gap: 17px; padding-top: 26px; }
  .type-card { gap: 10px; padding: 10px; }
  .mock-list { left: 8%; width: 58%; }
  .mock-types { right: 0; width: 51%; padding: 12px; }
}
@media (max-width: 640px) {
  .topbar nav { gap: 10px; font-size: 13px; }
  .topbar nav a[href="/faq"] { display: none; }
  .topbar nav .outline { padding: 8px; }
  .hero { display: block; padding-top: 58px; padding-bottom: 10px; }
  .hero-art { margin-top: 25px; min-height: 355px; }
  .hero-orbit { width: 72%; }
  .mock-list { min-height: 280px; top: 21px; }
  .mock-types { top: 90px; }
  .mock-strip { top: 275px; }
  .how, .faq { padding: 44px 16px; }
  .how-grid { grid-template-columns: 1fr; gap: 10px; }
  .workspace { grid-template-columns: minmax(0, 1fr); }
  .workspace:has(.type-grid) .preview { display: none; }
  .preview { position: static; }
  .phone { min-height: 340px; }
  .phone-code { min-height: 260px; }
  .phone-code svg { max-height: 220px; }
  .type-grid { gap: 8px; }
  .type-card { min-height: 87px; }
  .tile-icon { flex-basis: 32px; height: 36px; font-size: 19px; }
  .type-card strong, .panel strong { font-size: 14px; }
  .type-card small, .panel small { font-size: 12px; }
  .panel summary { padding: 13px; }
  .panel-body { margin: 0 13px; padding-top: 13px; }
  .wizard-bar { min-height: 74px; gap: 8px; grid-template-columns: auto 1fr auto; }
  .wizard-bar ol { justify-content: center; gap: 5px; }
  .wizard-bar li { font-size: 0; gap: 0; }
  .wizard-bar li + li::before { display: none; }
  .wizard-bar li span, .wizard-bar .primary, .back { font-size: 13px; }
  .wizard-bar .primary { padding: 8px; }
  .auth { margin: 30px 16px; }
}

.phone-image img { width: 100%; height: 100%; object-fit: contain; border-radius: inherit; }
.phone-card p { overflow-wrap: anywhere; white-space: pre-wrap; }
.preview-link { padding: 12px; background: #edf2ff; border-radius: 8px; overflow-wrap: anywhere; font-size: 13px; }
.phone-page { overflow-y: auto; }
.language-toggle { flex-shrink: 0; font-size: 14px; }
html:lang(ar), [dir="rtl"], :lang(ar) {
  font-family: "Cairo", "Dubai", Tahoma, "Segoe UI", sans-serif;
  line-height: 1.8;
  letter-spacing: normal;
}
html:lang(ar) :is(h1, h2, h3, .brand), [dir="rtl"] :is(h1, h2, h3, .brand) {
  letter-spacing: normal;
  line-height: 1.6;
}
html:lang(ar) :is(.type-card small, .panel small, .hint),
[dir="rtl"] :is(.type-card small, .panel small, .hint) { line-height: 1.8; }
[dir="rtl"] .type-card { text-align: right; }
[dir="rtl"] .panel summary { text-align: right; }
[dir="rtl"] .panel summary::after { margin-left: 0; margin-right: auto; }
[dir="rtl"] .hero li::before { margin-right: 0; margin-left: 10px; }
[dir="rtl"] input[type="email"], [dir="rtl"] input[type="url"], [dir="rtl"] input[type="tel"], [dir="rtl"] input[name="url"], [dir="rtl"] input[name="website"] { direction: ltr; text-align: left; }
@media (max-width: 600px) { .topbar { flex-wrap: wrap; } .topbar nav { flex: 1; } .language-toggle { padding: 8px; } }

.social-picker{display:grid;grid-template-columns:repeat(auto-fill,minmax(76px,1fr));gap:8px;margin:16px 0 24px}.social-picker button{display:flex;align-items:center;flex-direction:column;gap:6px;padding:10px 4px;background:#fff;border:1px solid #e4e7ec;border-radius:10px;cursor:pointer}.social-picker button:hover{border-color:#7357db;background:#f5f2ff}.social-picker button:disabled{opacity:.35;cursor:default}.social-icon{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:36px;height:36px;color:#fff;border-radius:10px;font:700 23px Arial}.social-row{display:grid;grid-template-columns:36px 1fr auto;align-items:center;gap:10px;padding:18px;border:1px solid #e4e7ec;border-radius:12px;margin:14px 0}.social-row label{grid-column:1/-1}.social-actions{display:flex;gap:6px}.social-actions button{border:1px solid #ddd;border-radius:5px;background:white;padding:4px 9px}.social-presets{display:flex;gap:12px;flex-wrap:wrap;margin:16px 0}.social-presets button{width:36px;height:36px;border:3px solid white;outline:1px solid #ccc;border-radius:50%;cursor:pointer}.social-page{min-height:450px;padding:32px 16px;text-align:center}.social-page h2{color:var(--social-primary);overflow-wrap:anywhere}.social-page p{white-space:pre-wrap;overflow-wrap:anywhere}.social-page a{display:flex;align-items:center;gap:12px;text-align:start;background:white;border:1px solid #e4e7ec;border-radius:12px;padding:12px;margin:12px 0;color:#202538;text-decoration:none;box-shadow:0 3px 8px #00000008}.social-page a span:nth-child(2){flex:1;overflow-wrap:anywhere}.social-page a:hover{border-color:var(--social-primary)}

.social-input-hint{grid-column:1/-1;margin:0;font-size:13px}

/* Keep grid items and long account names within the available screen width. */
.editor, .panel, .panel-body, .type-card > span, .panel summary > span,
.social-row > *, .social-page a > span { min-width: 0; }
.type-card, .panel summary, .social-row strong, .social-page h1 { overflow-wrap: anywhere; }
input, textarea, select { max-width: 100%; min-width: 0; }
.mobile-preview-toggle { display: none; }
html { scroll-padding-bottom: 120px; }

@media (max-width: 900px) and (min-width: 641px) {
  .workspace .type-grid { grid-template-columns: minmax(0, 1fr); }
  .wizard-bar ol { gap: 8px; }
  .wizard-bar li { font-size: 12px; }
  .wizard-bar .primary { width: auto; }
}

@media (max-width: 640px) {
  .topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    padding: 12px max(12px, env(safe-area-inset-left)) 12px max(12px, env(safe-area-inset-right));
  }
  .topbar .brand { grid-column: 1; grid-row: 1; font-size: clamp(16px, 4.7vw, 21px); }
  .topbar .language-toggle { grid-column: 2; grid-row: 1; min-height: 44px; padding: 8px 12px; }
  .topbar nav, .wizard .topbar nav {
    grid-column: 1 / -1;
    grid-row: 2;
    margin: 0;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px 16px;
  }
  .topbar nav a { min-height: 44px; display: inline-flex; align-items: center; }
  .wizard .topbar nav { display: none; }
  .workspace {
    padding: 16px 12px calc(120px + env(safe-area-inset-bottom));
    gap: 16px;
    min-height: calc(100svh - 70px);
  }
  .editor h1 { margin-top: 0; line-height: 1.4; }
  .preview { grid-row: 1; margin: 0; }
  .mobile-preview-toggle {
    display: flex;
    width: 100%;
    min-height: 46px;
    justify-content: space-between;
    font-weight: 600;
  }
  .mobile-preview-toggle::after { content: "+"; font-size: 22px; }
  .mobile-preview-toggle[aria-expanded="true"]::after { content: "\2212"; }
  .preview[data-expanded="false"] .preview-panel { display: none; }
  .preview-panel { padding-top: 16px; }
  .phone { width: min(100%, 275px); }
  .switch button { min-height: 44px; padding-inline: 16px; font-size: 14px; }
  .type-card { gap: 10px; align-items: flex-start; padding: 12px; }
  .type-card strong, .panel strong { font-size: 15px; }
  .panel summary { gap: 10px; }
  .panel summary::after { flex-shrink: 0; }
  input:not([type="radio"]):not([type="checkbox"]), textarea, select {
    font-size: 16px;
    min-height: 48px;
    scroll-margin-block: 110px;
  }
  input[type="file"] { padding: 8px; font-size: 14px; }
  input[type="file"]::file-selector-button { min-height: 36px; max-width: 100%; }
  .check { align-items: flex-start; line-height: 1.6; }
  .check input { flex-shrink: 0; width: 20px; height: 20px; margin-top: 3px; }
  .social-picker { grid-template-columns: repeat(auto-fit, minmax(66px, 1fr)); gap: 8px; }
  .social-picker button { min-height: 76px; min-width: 0; }
  .social-picker small { font-size: 11px; overflow-wrap: anywhere; }
  .social-row { grid-template-columns: 36px minmax(0, 1fr) auto; padding: 12px; gap: 8px; }
  .social-actions { gap: 4px; }
  .social-actions button { min-width: 44px; min-height: 44px; padding: 4px; font-size: 20px; }
  .social-presets { gap: 10px; }
  .social-presets button { width: 44px; height: 44px; }
  .colors { gap: 12px; }
  .colors label { flex: 1 1 120px; min-width: 0; }
  .swatch { min-height: 48px; flex: 1 1 110px; }
  .swatches button, .outline, .back, .close { min-height: 44px; }
  .wizard-bar {
    grid-template-columns: minmax(44px, 1fr) auto minmax(88px, 1fr);
    gap: 8px;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  }
  .wizard-bar .back { padding-inline: 8px; font-size: 14px; }
  .wizard-bar .primary { min-height: 48px; padding: 10px 12px; font-size: 14px; white-space: normal; }
  .wizard-bar li span { width: 24px; height: 24px; flex-shrink: 0; }
  .wizard-bar ol { gap: 4px; }
  dialog { padding: 20px; max-height: calc(100dvh - 40px); overflow-y: auto; }
  dialog .close { min-width: 44px; }
  .social-page { padding: 24px 12px; }
  .social-page a { min-height: 56px; }
  .phone .social-page { padding: 20px 8px; }
  .auth { padding: 20px; }
  footer { padding: 24px 16px; flex-wrap: wrap; }
}

@media (max-width: 360px) {
  .type-grid { grid-template-columns: minmax(0, 1fr); }
  .type-card { min-height: 70px; align-items: center; }
  .social-row { grid-template-columns: 30px minmax(0, 1fr); }
  .social-row > .social-icon { width: 30px; height: 30px; }
  .social-actions { grid-column: 1 / -1; justify-content: flex-end; }
}

.save-notice{background:#edf2ff;border:1px solid #d2dfff;border-radius:8px;padding:12px;font-size:14px;line-height:1.7}.save-notice a{color:var(--blue-dark);text-decoration:underline}.daily{white-space:normal;overflow-wrap:anywhere}.daily table{width:100%;border-collapse:collapse;font-size:14px;margin:12px 0}.daily th,.daily td{text-align:start;padding:8px;border-bottom:1px solid var(--line)}.daily caption{text-align:start;font-weight:700}.saved summary small{overflow-wrap:anywhere}
@media(max-width:640px){.wizard .topbar nav{display:flex}.saved .swatches button{flex:1 1 140px}.dashboard .panel-body{margin:0 12px}}
