/* صفحات الخدمات: أدوات PDF والبريد المؤقت. تكمل style.css. */

.page-head { padding: 36px 0 8px; }
.page-head h1 { font-size: 40px; margin: 0; line-height: 1.3; }
.page-head p { color: var(--muted); margin: 6px 0 0; }

.badge {
  display: inline-block; font-size: 14px; font-weight: 700;
  background: #ede9fe; color: var(--brand); border-radius: 999px; padding: 2px 12px;
}

.services { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; padding: 24px 0; }
a.service, button.service {
  all: unset; box-sizing: border-box; cursor: pointer;
  background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 18px 20px;
  display: flex; flex-direction: column; gap: 4px; transition: border-color .15s, transform .15s;
}
a.service:hover, button.service:hover, button.service:focus-visible, a.service:focus-visible {
  border-color: var(--brand-2); transform: translateY(-2px);
}
.service .ic { margin-bottom: 6px; }
.tool-title { display: flex; align-items: center; gap: 10px; }
.service b { font-size: 19px; }
.service span { color: var(--muted); font-size: 15px; line-height: 1.6; }

.panel { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 24px; margin: 24px 0; }
.panel h2 { margin: 0 0 4px; font-size: 26px; }
.panel .hint { color: var(--muted); font-size: 15px; margin: 0 0 16px; }
.back { all: unset; cursor: pointer; color: var(--brand); font-weight: 700; font-size: 16px; }

.drop {
  border: 2px dashed var(--brand-2); border-radius: 18px; padding: 28px 16px; text-align: center;
  background: #faf8ff; cursor: pointer; transition: background .15s;
}
.drop.over { background: #ede9fe; }
.drop b { display: block; font-size: 18px; color: var(--brand); }
.drop span { color: var(--muted); font-size: 15px; }

.files { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 8px; }
.files li {
  display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--line);
  border-radius: 12px; padding: 8px 12px; font-size: 15px;
}
.files li .name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; direction: ltr; text-align: right; }
.files li .meta { color: var(--muted); font-size: 13px; white-space: nowrap; }
.icon-btn {
  all: unset; cursor: pointer; width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center;
  color: var(--muted); font-size: 16px;
}
.icon-btn:hover, .icon-btn:focus-visible { background: #f3f0ff; color: var(--brand); }

.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; margin-top: 14px; }
.thumb {
  background: #fff; border: 2px solid var(--line); border-radius: 10px; padding: 4px; text-align: center;
  font-size: 13px; color: var(--muted); cursor: grab; user-select: none;
}
.thumb img { width: 100%; aspect-ratio: 1 / 1.414; object-fit: contain; background: #f6f6f6; border-radius: 6px; display: block; }
.thumb.dragging { opacity: .4; }
.thumb.over { border-color: var(--brand); }

.opts { display: grid; gap: 14px; margin: 18px 0 0; }
.opts label { display: grid; gap: 4px; font-weight: 700; font-size: 16px; }
.opts .row { display: flex; flex-wrap: wrap; gap: 10px; }
.opts input[type=text], .opts input[type=number], .opts select {
  font: inherit; font-size: 16px; font-weight: 400; border: 1px solid #d8d3ee; border-radius: 10px; padding: 8px 12px; background: #fff;
}
.opts input[type=range] { accent-color: var(--brand); }
.choice { display: inline-flex; align-items: center; gap: 6px; font-weight: 400 !important; }
.choice input { accent-color: var(--brand); }

.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 20px; }
button.btn { border: 0; cursor: pointer; font-family: inherit; }
button.btn:disabled { opacity: .5; cursor: default; transform: none; }
.btn.sm { font-size: 16px; padding: 8px 20px; }
.btn.ghost { background: #fff; color: var(--brand); border: 1px solid var(--brand-2); box-shadow: none; }

.status { margin-top: 14px; font-size: 16px; }
.status.err { color: #b91c1c; }
.status.ok { color: #047857; }

.pad { width: 100%; height: 180px; border: 1px solid #d8d3ee; border-radius: 12px; background: #fff; touch-action: none; display: block; }

.note { background: #fffbeb; border: 1px solid #fde68a; border-radius: 14px; padding: 12px 16px; font-size: 15px; color: #78350f; }

/* البريد المؤقت */
.addr {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between;
  background: #faf8ff; border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px;
}
.addr code { direction: ltr; font-size: 20px; font-weight: 700; color: var(--brand); word-break: break-all; font-family: ui-monospace, Consolas, monospace; }
.timer { color: var(--muted); font-size: 15px; }
.inbox { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 8px; }
.inbox li button {
  all: unset; box-sizing: border-box; cursor: pointer; width: 100%; display: grid; gap: 2px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px;
}
.inbox li button:hover, .inbox li button:focus-visible { border-color: var(--brand-2); }
.inbox .from { font-size: 14px; color: var(--muted); direction: ltr; text-align: right; }
.inbox .subj { font-weight: 700; }
.inbox .unread .subj::before { content: "● "; color: var(--brand); }
.empty { text-align: center; color: var(--muted); padding: 24px 0; }
.msg-head { border-bottom: 1px solid var(--line); padding-bottom: 10px; margin-bottom: 12px; }
.msg-head .subj { font-size: 22px; font-weight: 700; margin: 0; }
.msg-head .from { color: var(--muted); font-size: 14px; direction: ltr; text-align: right; }
.msg-frame { width: 100%; min-height: 420px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.msg-text { white-space: pre-wrap; direction: auto; unicode-bidi: plaintext; font-size: 16px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px; overflow-wrap: anywhere; }

nav.top a { margin-inline-start: 16px; text-decoration: none; font-weight: 700; font-size: 16px; }

@media (max-width: 520px) {
  .page-head h1 { font-size: 32px; }
  .panel { padding: 18px; }
  .addr code { font-size: 17px; }
}

.field { display: grid; gap: 6px; }
.field > b { font-size: 16px; }

/* مولّد QR */
.qr-layout { display: grid; grid-template-columns: 1fr 340px; gap: 28px; align-items: start; }
.qr-layout .opts { margin: 0; }
.qr-layout textarea { font: inherit; font-size: 16px; font-weight: 400; border: 1px solid #d8d3ee; border-radius: 10px; padding: 8px 12px; resize: vertical; }
.qr-layout input[type=color] { width: 56px; height: 38px; padding: 2px; border: 1px solid #d8d3ee; border-radius: 10px; background: #fff; }
.qr-out { position: sticky; top: 16px; }
.qr-frame { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 14px; }
.qr-frame canvas { width: 100%; height: auto; display: block; aspect-ratio: 1; }
.qr-frame canvas.empty { background: repeating-linear-gradient(45deg, #faf8ff 0 10px, #f3f0ff 10px 20px); border-radius: 10px; }
.chips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  min-height: 86px; padding: 12px 6px; cursor: pointer; text-align: center;
  font-weight: 700; font-size: 15px; line-height: 1.3; color: var(--ink);
  background: #fff; border: 1.5px solid var(--line); border-radius: 16px;
  transition: border-color .15s, background .15s, transform .15s, box-shadow .15s;
}
.chip i {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px;
  color: var(--c); background: color-mix(in srgb, var(--c) 12%, #fff);
  transition: background .15s, color .15s;
}
.chip svg { width: 22px; height: 22px; }
.chip span:hover { border-color: color-mix(in srgb, var(--c) 45%, #fff); transform: translateY(-1px); }
.chip input:checked + span {
  border-color: var(--c); background: color-mix(in srgb, var(--c) 7%, #fff);
  box-shadow: 0 4px 14px color-mix(in srgb, var(--c) 22%, transparent);
}
.chip input:checked + span i { background: var(--c); color: #fff; }
.chip input:focus-visible + span { outline: 2px solid var(--c); outline-offset: 2px; }
details.more { border-top: 1px solid var(--line); padding-top: 12px; }
details.more summary { cursor: pointer; font-weight: 700; color: var(--brand); }
details.more > .opts { margin-top: 14px; }
@media (max-width: 760px) {
  .qr-layout { grid-template-columns: 1fr; }
  .qr-out { position: static; order: -1; max-width: 340px; margin: 0 auto; width: 100%; }
}

/* إزالة الخلفية */
.bg-stage {
  position: relative; display: grid; place-items: center; overflow: hidden;
  border: 1px solid var(--line); border-radius: 18px; min-height: 220px; max-height: 70vh;
  background: conic-gradient(#eee 25%, #fff 0 50%, #eee 0 75%, #fff 0) 0 0 / 20px 20px;
}
.bg-stage canvas { grid-area: 1 / 1; max-width: 100%; max-height: 70vh; width: auto; height: auto; display: block; }
.bg-original { pointer-events: none; }
.bg-busy {
  grid-area: 1 / 1; align-self: stretch; justify-self: stretch; z-index: 2;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  background: rgba(250, 249, 255, .82); backdrop-filter: blur(2px); font-weight: 700; color: var(--brand); text-align: center; padding: 16px;
}
.bg-busy[hidden] { display: none; }
.bg-spinner { width: 36px; height: 36px; border-radius: 50%; border: 4px solid #e9e5fb; border-top-color: var(--brand); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.bg-bar { width: min(260px, 80%); height: 8px; border-radius: 99px; background: #e9e5fb; overflow: hidden; }
.bg-bar i { display: block; height: 100%; width: 0; background: var(--brand); border-radius: 99px; transition: width .2s; }
.bg-bar.indeterminate i { width: 40% !important; animation: slide 1.1s ease-in-out infinite; }
@keyframes slide { from { transform: translateX(160%); } to { transform: translateX(-260%); } }
.bg-compare { display: flex; align-items: center; gap: 10px; margin-top: 10px; font-size: 15px; color: var(--muted); }
.bg-compare input { flex: 1; accent-color: var(--brand); }
.bg-swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.bg-swatches label { position: relative; cursor: pointer; }
.bg-swatches input[type=radio] { position: absolute; opacity: 0; pointer-events: none; }
.sw {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px;
  border: 1.5px solid #d8d3ee; font-size: 20px; color: var(--muted); overflow: hidden;
}
.sw-clear { background: conic-gradient(#ddd 25%, #fff 0 50%, #ddd 0 75%, #fff 0) 0 0 / 12px 12px; }
.sw-blur { background: radial-gradient(circle, #c4b5fd, #ede9fe); color: var(--brand); }
.sw-custom { background: conic-gradient(#ef4444, #f59e0b, #10b981, #3b82f6, #8b5cf6, #ef4444); }
.sw-custom input[type=color] { opacity: 0; width: 100%; height: 100%; cursor: pointer; border: 0; padding: 0; }
.bg-swatches input:checked + .sw { border-color: var(--brand); box-shadow: 0 0 0 3px #ddd6fe; }
.bg-swatches input:focus-visible + .sw { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ---------- ضغط الصور ---------- */
.chip-btn { all: unset; cursor: pointer; font-size: 14px; padding: 3px 12px; border-radius: 999px; border: 1px solid #d8d3ee; background: #fff; }
.chip-btn:hover, .chip-btn:focus-visible { border-color: var(--brand); color: var(--brand); }
.opts .presets { margin-top: 8px; }
.opts .row > span { display: inline-flex; align-items: center; gap: 6px; font-weight: 400; }
.opts input[type=number] { width: 110px; }
.img-results { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 8px; }
.img-results li { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; }
.img-results img, .img-results .ph { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; background: #f3f0ff; display: grid; place-items: center; flex: none; }
.img-results .info { flex: 1; min-width: 0; display: grid; font-size: 14px; line-height: 1.6; }
.img-results .info b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.img-results .info span { color: var(--muted); }
.img-results strong { color: var(--ink); }
em.ok { color: #047857; font-style: normal; }
em.warn { color: #b45309; font-style: normal; }

/* ---------- صورة الهوية ---------- */
.ph-layout { display: grid; grid-template-columns: minmax(0, 300px) 1fr; gap: 24px; align-items: start; }
@media (max-width: 640px) { .ph-layout { grid-template-columns: 1fr; } .ph-layout > div:first-child { max-width: 300px; margin: 0 auto; width: 100%; } }
.ph-frame { position: relative; width: 100%; border-radius: 6px; overflow: hidden; box-shadow: 0 0 0 1px var(--line), 0 8px 24px rgba(0,0,0,.08); background: #fff; }
.ph-frame canvas { width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
.ph-frame canvas:active { cursor: grabbing; }
.ph-guide { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.ph-zoom { display: flex; align-items: center; gap: 10px; margin-top: 10px; font-weight: 700; font-size: 15px; }
.ph-zoom input { flex: 1; accent-color: var(--brand); }
.sw-orig { display: grid; place-items: center; color: var(--muted); font-size: 16px; background: repeating-linear-gradient(45deg, #fef3c7 0 6px, #e0f2fe 6px 12px) !important; }

/* ---------- استخراج النص ---------- */
.ocr-bar { margin-top: 10px; }
.ocr-text { width: 100%; min-height: 260px; margin-top: 16px; font: inherit; font-size: 17px; line-height: 1.9; border: 1px solid #d8d3ee; border-radius: 12px; padding: 12px 14px; background: #fff; resize: vertical; }

/* ---------- معاينة Word ---------- */
.doc-preview { margin-top: 18px; }
.doc-preview iframe { width: 100%; height: 520px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }

/* ---------- واتساب وصفحة الروابط ---------- */
.wa-phone select { max-width: 48%; }
.wa-phone input { flex: 1; min-width: 160px; }
.opts textarea { font: inherit; font-size: 16px; font-weight: 400; border: 1px solid #d8d3ee; border-radius: 10px; padding: 8px 12px; background: #fff; resize: vertical; }
.wa-out { margin-top: 18px; }
.wa-link { background: #f6f4ff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; overflow-wrap: anywhere; font-size: 15px; }
.wa-qr { width: 200px; height: 200px; margin-top: 14px; border-radius: 10px; border: 1px solid var(--line); display: block; }
a.btn.sm { font-size: 16px; padding: 8px 20px; }
.lb-layout { display: grid; grid-template-columns: 1fr 320px; gap: 20px; align-items: start; margin-top: 24px; }
@media (max-width: 760px) { .lb-layout { grid-template-columns: 1fr; } }
.lb-id { display: flex; gap: 10px; }
.lb-id label { display: grid; gap: 4px; }
.lb-id input { width: 100%; }
.opts input[type=text] { min-width: 0; }
.lb-quick { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.lb-rows { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 8px; }
.lb-rows li { display: grid; grid-template-columns: 1fr 1.4fr auto auto; gap: 6px; align-items: center; }
@media (max-width: 480px) { .lb-rows li { grid-template-columns: 1fr auto auto; } .lb-rows li input[data-k=u] { grid-column: 1 / -1; grid-row: 2; } }
.lb-paste { font: inherit; font-size: 14px; border: 1px solid #d8d3ee; border-radius: 8px; padding: 4px 10px; width: 100%; margin-top: 6px; }
.lb-phone { position: sticky; top: 16px; border: 10px solid #1f2937; border-radius: 34px; overflow: hidden; background: #fff; height: 600px; overflow-y: auto; }
.lb-phone .lp { padding: 28px 16px; min-height: 100%; }

/* الصفحة المعروضة (/l/) والمعاينة */
.lp-body { background: #f6f5fb; }
.lp { --lc: #5b21b6; max-width: 520px; margin: 0 auto; padding: 48px 20px 24px; }
.lp-head { text-align: center; }
.lp-avatar { position: relative; overflow: hidden; width: 88px; height: 88px; border-radius: 50%; margin: 0 auto 10px; display: grid; place-items: center; font-size: 44px; color: #fff; background: var(--lc); box-shadow: 0 8px 24px color-mix(in srgb, var(--lc) 35%, transparent); }
.lp-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #fff; }
.lp-head h1 { font-size: 26px; margin: 0; line-height: 1.4; }
.lp-head p { color: var(--muted); margin: 4px 0 0; font-size: 16px; }
.lp-links { display: grid; gap: 12px; margin-top: 24px; }
.lp-link { display: grid; text-align: center; text-decoration: none; color: #fff; background: var(--lc); border-radius: 16px; padding: 12px 16px; line-height: 1.5; transition: transform .15s; }
.lp-link:hover, .lp-link:focus-visible { transform: translateY(-2px); }
.lp-link b { font-size: 17px; }
.lp-link small { font-size: 12px; opacity: .8; }
.lp-empty { text-align: center; color: var(--muted); }
.lp-foot { max-width: 520px; margin: 0 auto; padding: 8px 20px 32px; text-align: center; font-size: 13px; color: var(--muted); }
.lp-foot p { margin: 0 0 6px; }

/* ---------- الفواتير ---------- */
.inv-top { display: flex; flex-wrap: wrap; gap: 10px; }
.inv-top label { flex: 1 1 140px; }
.inv-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 640px) { .inv-parties { grid-template-columns: 1fr; } }
.inv-parties fieldset { border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; display: grid; gap: 8px; margin: 0; }
.inv-parties legend { font-weight: 700; padding: 0 6px; }
.inv-parties input, .inv-parties textarea, .inv-items input { font: inherit; font-size: 16px; border: 1px solid #d8d3ee; border-radius: 10px; padding: 8px 12px; background: #fff; min-width: 0; width: 100%; }
.inv-items-head, .inv-items li { display: grid; grid-template-columns: 1fr 70px 120px 30px; gap: 6px; align-items: center; }
.inv-items-head { font-size: 13px; color: var(--muted); font-weight: 700; }
.inv-items { list-style: none; padding: 0; margin: 4px 0 10px; display: grid; gap: 6px; }
.inv-sheet-wrap { overflow-x: auto; padding: 4px 0 32px; }
.inv-sheet { background: #fff; color: #111; width: 210mm; min-height: 297mm; margin: 0 auto; padding: 16mm 16mm; box-shadow: 0 4px 30px rgba(0,0,0,.12); font-size: 11pt; line-height: 1.6; display: flex; flex-direction: column; gap: 8mm; }
.inv-h { display: flex; justify-content: space-between; gap: 10mm; align-items: flex-start; }
.inv-logo { max-height: 22mm; max-width: 50mm; display: block; margin-bottom: 3mm; }
.inv-seller b { font-size: 14pt; }
.inv-seller div, .inv-to div { color: #444; font-size: 10pt; }
.inv-title { text-align: end; }
.inv-title h2 { margin: 0; font-size: 22pt; color: #5b21b6; line-height: 1.2; }
.inv-to { border-inline-start: 3px solid #5b21b6; padding-inline-start: 4mm; display: grid; }
.inv-to small, .inv-notes small { color: #777; }
.inv-table { width: 100%; border-collapse: collapse; }
.inv-table th { background: #f3f0ff; text-align: start; padding: 2.5mm 3mm; font-size: 10pt; }
.inv-table td { border-bottom: 1px solid #e5e7eb; padding: 2.5mm 3mm; vertical-align: top; }
.inv-table .n, .inv-sum .n { text-align: end; white-space: nowrap; direction: ltr; unicode-bidi: isolate; }
.inv-table th:nth-child(n+3) { text-align: end; }
.inv-empty { text-align: center; color: #aaa; }
.inv-sum { margin-inline-start: auto; min-width: 75mm; border-collapse: collapse; }
.inv-sum td { padding: 1.5mm 3mm; }
.inv-total td { font-weight: 700; font-size: 13pt; border-top: 2px solid #111; }
.inv-notes { font-size: 10pt; }
.inv-sign { margin-top: auto; align-self: flex-end; width: 60mm; border-top: 1px solid #999; padding-top: 2mm; text-align: center; color: #777; font-size: 10pt; }
@media print {
  @page { size: A4; margin: 0; }
  body { background: #fff; }
  .no-print { display: none !important; }
  .inv-wrap { max-width: none; padding: 0; }
  .inv-sheet-wrap { padding: 0; overflow: visible; }
  .inv-sheet { box-shadow: none; margin: 0; width: 210mm; min-height: 296mm; zoom: 1 !important; }
}

.note.ok-text { color: #047857; }
.note.err-text { color: #b91c1c; }
.share-btn { display: inline-flex; align-items: center; gap: 6px; }
.share-btn[hidden] { display: none; }
.thumb.picked { border-color: var(--brand); box-shadow: 0 0 0 3px #ddd6fe; }
@media (max-width: 520px) {
  .services { grid-template-columns: 1fr 1fr; gap: 8px; padding: 16px 0; }
  a.service, button.service { padding: 12px; border-radius: 14px; }
  .service b { font-size: 16px; line-height: 1.4; }
  .service span { font-size: 13px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
}

/* ---------- ZIP ---------- */
.zip-pick { margin-top: 12px; }
.zip-list { max-height: 340px; overflow: auto; }
.zip-list li .name { direction: rtl; unicode-bidi: plaintext; text-align: start; }
.zip-list li .dir { color: var(--muted); }
.zip-sum { margin: 10px 0 0; color: var(--muted); font-size: 15px; }
.opts input[type=password] { font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; min-width: 0; flex: 1; max-width: 360px; }
.tips ul { margin: 8px 0 0; padding-inline-start: 20px; line-height: 1.9; }
.muted { color: var(--muted); }
.btn[hidden] { display: none; }
#encRow .choice { display: inline-flex; }

/* ---------- أدوات النص ---------- */
.tx-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 2px; margin-top: 18px; scrollbar-width: none; }
.tx-tabs a { flex: none; padding: 9px 16px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--ink, #1f1235); text-decoration: none; font-weight: 700; font-size: 15px; white-space: nowrap; }
.tx-tabs a[aria-selected="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.tx-area { width: 100%; box-sizing: border-box; font: inherit; font-size: 18px; line-height: 1.8; padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; resize: vertical; background: #fff; }
.tx-area:focus, .tx-amount:focus { outline: 2px solid var(--brand-2); border-color: transparent; }
.tx-stats { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 10px 0 4px; color: var(--muted); font-size: 14px; }
.tx-stats b { color: var(--brand); font-size: 16px; }
.tx-groups { display: grid; gap: 10px; margin-top: 14px; }
.tx-groups > div { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tx-groups b { min-width: 64px; font-size: 15px; }
.tx-replace { margin-top: 16px; border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; background: #fff; }
.tx-replace summary { cursor: pointer; font-weight: 700; color: var(--brand); }
.tx-replace .opts { margin-top: 10px; }
.tx-replace input[type=text] { flex: 1; min-width: 140px; }
.tx-amount { font: inherit; font-size: 24px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 14px; width: 220px; max-width: 100%; }
.tx-out { display: block; min-height: 1.6em; margin-top: 16px; padding: 16px 18px; border-radius: 16px; background: #f5f3ff; font-size: 20px; line-height: 1.9; font-weight: 700; color: var(--brand); }
.tx-out:empty { display: none; }
.tx-pw { font-family: ui-monospace, Consolas, monospace; font-size: 22px; letter-spacing: .5px; word-break: break-all; text-align: center; }
.tx-dates { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.tx-date { display: grid; gap: 8px; align-content: start; }
.tx-date input, .tx-date select { font: inherit; padding: 9px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.tx-num { width: 76px; } .tx-num4 { width: 96px; }
.tx-winners { margin: 16px 0 0; padding-inline-start: 26px; font-size: 22px; font-weight: 700; color: var(--brand); line-height: 1.9; }
.tx-winners .tx-meta { list-style: none; font-size: 14px; font-weight: 400; margin-top: 6px; }
.opts label.choice { display: inline-flex; }
