:root {
  --orange: #f97316;
  --orange-dark: #ea580c;
  --orange-soft: #fff7ed;
  --ink: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --panel: #ffffff;
  --workspace: #eef0f3;
  --danger: #dc2626;
  --shadow: 0 14px 34px rgba(17, 24, 39, 0.12);
  font-family: Tahoma, "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; color: var(--ink); background: #f7f7f8; }

button, input, select { font: inherit; }

button { cursor: pointer; }

.app-header {
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand, .header-actions, .row, .workspace-toolbar, .zoom-control, .check-row {
  display: flex;
  align-items: center;
}

.brand { gap: 12px; }

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: white;
  background: linear-gradient(135deg, var(--orange), #fb923c);
  font-size: 25px;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(249, 115, 22, .25);
}

.brand h1 { margin: 0; font-size: 22px; }
.brand p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }

.header-actions { gap: 10px; }

.status-badge {
  padding: 7px 11px;
  border-radius: 999px;
  background: #f3f4f6;
  color: var(--muted);
  font-size: 12px;
}

.app-shell {
  min-height: calc(100vh - 74px);
  display: grid;
  grid-template-columns: 355px minmax(0, 1fr);
}

.control-panel {
  background: var(--panel);
  border-left: 1px solid var(--line);
  padding: 14px;
  overflow-y: auto;
  max-height: calc(100vh - 74px);
  position: sticky;
  top: 74px;
}

.panel-section {
  padding: 4px 0 14px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.panel-section h2 {
  margin: 0 0 14px;
  font-size: 15px;
}

.drop-zone {
  min-height: 128px;
  border: 2px dashed #fdba74;
  border-radius: 16px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 5px;
  background: var(--orange-soft);
  transition: .2s ease;
  text-align: center;
  padding: 16px;
  outline: none;
}

.drop-zone:hover, .drop-zone.dragover, .drop-zone:focus {
  border-color: var(--orange);
  background: #ffedd5;
  transform: translateY(-1px);
}

.drop-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--orange);
  color: white;
  font-size: 25px;
}

.drop-zone small { color: var(--muted); }

.gap { gap: 8px; }
.grow { flex: 1; }

.btn {
  border: 0;
  border-radius: 10px;
  min-height: 40px;
  padding: 0 14px;
  font-weight: 700;
}

.btn:disabled { opacity: .45; cursor: not-allowed; }

.btn-primary { color: #fff; background: var(--orange); }
.btn-primary:hover { background: var(--orange-dark); }
.btn-secondary { color: #9a3412; background: #ffedd5; }
.btn-danger { color: var(--danger); background: #fee2e2; }
.btn-large { width: 100%; min-height: 48px; font-size: 15px; }

.image-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  max-height: 260px;
  overflow: auto;
}

.image-item {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 32px;
  align-items: center;
  gap: 9px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
}

.image-item img {
  width: 52px;
  height: 44px;
  object-fit: cover;
  border-radius: 7px;
  background: #f3f4f6;
}

.image-meta { min-width: 0; }
.image-meta strong, .image-meta small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.image-meta strong { font-size: 12px; }
.image-meta small { color: var(--muted); margin-top: 3px; font-size: 11px; }

.icon-btn {
  border: 0;
  background: transparent;
  color: var(--danger);
  font-size: 23px;
  border-radius: 8px;
}
.icon-btn:hover { background: #fee2e2; }

label > span { display: block; margin-bottom: 7px; font-size: 12px; font-weight: 700; }

select, input[type="number"] {
  width: 100%;
  min-height: 40px;
  border: 1px solid #d1d5db;
  border-radius: 9px;
  padding: 0 10px;
  background: #fff;
}

select:focus, input:focus {
  outline: 2px solid #fed7aa;
  border-color: var(--orange);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.check-row {
  gap: 8px;
  margin-top: 12px;
  font-size: 12px;
}
.check-row span { margin: 0; font-weight: 500; }
.check-row input { accent-color: var(--orange); }

.hidden { display: none !important; }

.workspace {
  min-width: 0;
  background: var(--workspace);
  display: flex;
  flex-direction: column;
}

.workspace-toolbar {
  min-height: 58px;
  justify-content: space-between;
  gap: 15px;
  padding: 10px 18px;
  background: rgba(255,255,255,.86);
  border-bottom: 1px solid #d9dde3;
  position: sticky;
  top: 74px;
  z-index: 10;
  backdrop-filter: blur(8px);
}

.workspace-toolbar strong, .workspace-toolbar span { display: block; }
.workspace-toolbar strong { font-size: 13px; }
.workspace-toolbar > div > span { color: var(--muted); margin-top: 3px; font-size: 11px; }

.zoom-control { gap: 8px; direction: ltr; }
.zoom-control label, .zoom-control span { font-size: 12px; color: var(--muted); }
.zoom-control input { width: 130px; accent-color: var(--orange); }

.preview-area {
  flex: 1;
  padding: 28px;
  overflow: auto;
  position: relative;
  min-height: calc(100vh - 132px);
}

.empty-state {
  min-height: 420px;
  display: grid;
  place-items: center;
  align-content: center;
  text-align: center;
  color: var(--muted);
}

.empty-state h2 { margin: 12px 0 6px; color: var(--ink); }
.empty-state p { margin: 0 0 18px; }
.empty-icon { font-size: 56px; }

.pages-container {
  display: grid;
  justify-content: center;
  gap: 28px;
  transform-origin: top center;
}

.print-page {
  position: relative;
  background: white;
  box-shadow: var(--shadow);
  overflow: hidden;
  flex: none;
}

.print-item {
  position: absolute;
  overflow: visible;
  background: transparent;
}

.photo-viewport {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #fff;
}

.photo-viewport img {
  width: 100%;
  height: 100%;
  display: block;
  transform-origin: center center;
}

.photo-viewport.cover img { object-fit: cover; }
.photo-viewport.contain img { object-fit: contain; }

/* إطار قص متقطع مستقل يحيط بالصورة من الخارج ولا يغطي محتواها. */
.cut-mark-frame {
  position: absolute;
  z-index: 3;
  inset: calc(-1 * var(--cut-offset));
  box-sizing: border-box;
  border: var(--cut-thickness) dashed #111827;
  pointer-events: none;
}

.action-section { border-bottom: 0; margin-bottom: 0; }

@media (max-width: 900px) {
  .app-shell { grid-template-columns: 1fr; }
  .control-panel { position: static; max-height: none; border-left: 0; border-bottom: 1px solid var(--line); }
  .workspace-toolbar { top: 74px; }
}

@media print {
  @page { margin: 0; }
  body { background: #fff; }
  .app-header,
  .control-panel,
  .workspace-toolbar,
  .preview-summary,
  .empty-state { display: none !important; }
  .app-shell, .workspace, .preview-area, .pages-container {
    display: block;
    margin: 0;
    padding: 0;
    background: #fff;
    overflow: visible;
  }
  .pages-container {
    transform: none !important;
    gap: 0 !important;
  }
  .workspace,
  .preview-area,
  .pages-container,
  .print-page {
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
  }
  .print-page {
    box-shadow: none;
    margin: 0;
    page-break-after: always;
    break-after: page;
  }
  .print-page:last-child { page-break-after: auto; break-after: auto; }
}


.mode-hint {
  margin: 9px 0 0;
  padding: 9px 10px;
  border-radius: 9px;
  background: #fff7ed;
  color: #9a3412;
  font-size: 11px;
  line-height: 1.7;
}

.images-toolbar{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:10px}
.images-toolbar .btn{min-height:36px;padding-inline:11px;font-size:12px}
select{font-size:12px}
input[type="number"]{direction:ltr;text-align:center;font-variant-numeric:tabular-nums;padding-inline:10px}
.field-help{display:block;margin-top:6px;color:var(--muted);font-size:10px;line-height:1.5}
.preview-summary{margin:14px auto 0;padding:7px 12px;border-radius:999px;background:rgba(255,255,255,.92);border:1px solid #d9dde3;color:#4b5563;font-size:12px;box-shadow:0 4px 14px rgba(17,24,39,.06)}
.image-item{grid-template-columns:66px minmax(0,1fr) 34px;padding:8px}
.image-item img{width:66px;height:56px}


/* Prominent spacing control restored in v0.5.3 hotfix */
.spacing-control {
  margin: 12px 0;
  padding: 12px;
  border: 2px solid var(--orange);
  border-radius: 12px;
  background: var(--orange-soft);
}
.spacing-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.spacing-heading strong { font-size: 14px; }
.spacing-heading span { color: var(--muted); font-size: 11px; }
.spacing-control input {
  width: 100%;
  min-height: 44px;
  font-size: 18px;
  font-weight: 800;
  text-align: center;
  border-color: var(--orange);
  background: #fff;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.action-buttons {
  display: grid;
  gap: 9px;
}

.header-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

@media (max-width: 620px) {
  .app-header {
    align-items: flex-start;
    gap: 10px;
  }
  .header-actions {
    justify-content: flex-end;
  }
  .header-actions .status-badge {
    width: 100%;
    text-align: center;
  }
}

/* v0.6.0 product shell */
.site-nav { display: flex; align-items: center; gap: 16px; margin-inline: auto 18px; }
.site-nav a, .site-footer a { color: #4b5563; text-decoration: none; font-size: 13px; font-weight: 700; }
.site-nav a:hover, .site-nav a[aria-current="page"], .site-footer a:hover { color: var(--orange-dark); }
.intro-bar { display: flex; align-items: center; justify-content: space-between; gap: 28px; padding: 20px 24px; background: linear-gradient(135deg,#fff7ed,#fff); border-bottom: 1px solid #fed7aa; }
.intro-bar h2 { margin: 3px 0 7px; font-size: clamp(20px, 3vw, 30px); }
.intro-bar p { margin: 0; color: var(--muted); line-height: 1.7; }
.eyebrow { color: var(--orange-dark) !important; font-weight: 800; font-size: 12px; }
.quick-steps { display: flex; gap: 10px; list-style: none; padding: 0; margin: 0; flex-wrap: wrap; }
.quick-steps li { display: flex; align-items: center; gap: 7px; padding: 9px 11px; background: #fff; border: 1px solid #fed7aa; border-radius: 999px; font-size: 12px; white-space: nowrap; }
.quick-steps span { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--orange); font-weight: 800; }
.site-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px 24px; background: #fff; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.site-footer p { margin: 0; }
.site-footer nav { display: flex; gap: 14px; flex-wrap: wrap; }
.content-page { max-width: 900px; margin: 36px auto; padding: 0 20px; }
.content-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: clamp(22px,4vw,44px); box-shadow: 0 10px 30px rgba(17,24,39,.06); }
.content-card h1 { margin-top: 0; font-size: clamp(26px,4vw,38px); }
.content-card h2 { margin-top: 28px; font-size: 19px; }
.content-card p, .content-card li { line-height: 1.9; color: #4b5563; }
.content-card .notice { padding: 14px; border-radius: 12px; background: var(--orange-soft); color: #9a3412; }
@media (max-width: 980px) { .site-nav { display: none; } .intro-bar { align-items: flex-start; flex-direction: column; } }
@media (max-width: 620px) { .intro-bar { padding: 17px; } .quick-steps { display: grid; width: 100%; } .site-footer { align-items: flex-start; flex-direction: column; } }
@media print { .intro-bar, .site-footer { display:none !important; } }
.metrics-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(160px,1fr)); gap:12px; margin:22px 0; }
.metric-card { padding:18px; border:1px solid var(--line); border-radius:14px; background:#f9fafb; }
.metric-card span { display:block; color:var(--muted); font-size:12px; }
.metric-card strong { display:block; margin-top:8px; font-size:30px; }
.metrics-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(160px,1fr)); gap:12px; margin:22px 0; }
.metric-card { padding:18px; border:1px solid var(--line); border-radius:14px; background:#f9fafb; }
.metric-card span { display:block; color:var(--muted); font-size:12px; }
.metric-card strong { display:block; margin-top:8px; font-size:30px; }

/* v0.7.0 official photos interface */
.official-photos-panel { border: 1px solid #fdba74; background: linear-gradient(180deg,#fff7ed 0%,#fff 70%); }
.section-title-row { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.section-title-row h2 { margin:0; }
.section-kicker { margin:0 0 3px; color:var(--orange-dark); font-size:10px; font-weight:900; letter-spacing:.08em; }
.beta-badge { padding:5px 8px; border-radius:999px; background:#ffedd5; color:#9a3412; font-size:10px; font-weight:800; }
.official-intro { margin:9px 0 12px; color:var(--muted); font-size:11px; line-height:1.7; }
.official-status-card { margin-top:12px; padding:12px; border:1px solid var(--line); border-radius:12px; background:#f9fafb; }
.official-status-card strong { display:block; font-size:13px; }
.official-status-card p { margin:5px 0 0; color:var(--muted); font-size:11px; line-height:1.7; }
.official-status-card.is-pending { border-color:#fbbf24; background:#fffbeb; }
.official-status-card.is-pending strong { color:#92400e; }
.official-status-card.is-verified { border-color:#86efac; background:#f0fdf4; }
.official-status-card.is-verified strong { color:#166534; }
.official-status-card.is-error { border-color:#fca5a5; background:#fef2f2; }
.official-status-card.is-error strong { color:#991b1b; }
.official-apply { width:100%; margin-top:10px; }

/* v0.7.7 local image editor */
.image-item { grid-template-columns: 52px minmax(0, 1fr) auto; }
.image-item-actions { display:flex; align-items:center; gap:2px; }
.edit-image { color:#9a3412; font-size:18px; }
.edit-image:hover { background:#ffedd5; }
.image-editor-section { border:2px solid #fed7aa; background:#fffaf5; }
.editor-close { color:var(--muted); }
.selected-image-name { margin:8px 0 10px; font-size:12px; font-weight:800; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.editor-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.editor-actions .btn { min-height:38px; font-size:12px; }
.editor-sliders { display:grid; gap:10px; margin-top:14px; }
.editor-sliders label > span { display:flex; justify-content:space-between; align-items:center; }
.editor-sliders input[type=range] { width:100%; accent-color:var(--orange); }
.editor-sliders output { color:var(--orange-dark); font-weight:900; }
.editor-reset { width:100%; margin-top:12px; min-height:40px; }
.photo-viewport img { transform-origin:center center; }


/* v0.7.9 precise image adjustment controls */
.slider-stepper { display:grid; grid-template-columns:36px minmax(0,1fr) 36px; align-items:center; gap:8px; margin-top:6px; }
.slider-stepper input[type=range] { min-width:0; }
.step-btn { width:36px; height:34px; border:1px solid #fdba74; border-radius:9px; background:#fff; color:var(--orange-dark); font-size:20px; font-weight:900; line-height:1; cursor:pointer; }
.step-btn:hover { background:#ffedd5; }
.step-btn:active { transform:translateY(1px); }


/* v0.8.0 image management */
.images-toolbar { flex-wrap:wrap; justify-content:flex-start; }
.selection-summary { margin:8px 0 0; color:var(--muted); font-size:11px; font-weight:700; }
.image-item { grid-template-columns:24px 52px minmax(0,1fr) auto; }
.image-select { width:18px; height:18px; accent-color:var(--orange); cursor:pointer; }
.image-item.is-selected { border-color:#fb923c; background:#fff7ed; }
.image-item.is-editing { box-shadow:inset 3px 0 0 var(--orange); }
.image-item-actions { flex-wrap:wrap; justify-content:flex-end; max-width:112px; }
.image-item-actions .icon-btn { width:28px; height:28px; padding:0; font-size:16px; line-height:1; }
.image-item-actions .icon-btn:disabled { opacity:.3; cursor:not-allowed; }
.duplicate-image,.move-image-up,.move-image-down { color:#9a3412; }
.editor-apply-all { margin:0 0 12px; }
@media (max-width:520px) {
  .image-item { grid-template-columns:22px 46px minmax(0,1fr); }
  .image-item-actions { grid-column:2 / -1; max-width:none; justify-content:flex-end; }
}


/* v0.9.0 guided print wizard */
.print-wizard-panel { border:2px solid #fdba74; background:linear-gradient(180deg,#fff7ed 0%,#fff 78%); }
.wizard-badge { padding:5px 8px; border-radius:999px; background:#f97316; color:#fff; font-size:10px; font-weight:900; }
.wizard-intro { margin:9px 0 12px; color:var(--muted); font-size:11px; line-height:1.7; }
.wizard-options { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.wizard-option { min-height:70px; padding:11px; border:1px solid #fed7aa; border-radius:12px; background:#fff; color:inherit; text-align:right; cursor:pointer; transition:border-color .15s ease,background .15s ease,transform .15s ease; }
.wizard-option:hover { border-color:#fb923c; background:#fff7ed; transform:translateY(-1px); }
.wizard-option.is-active { border-color:#f97316; background:#ffedd5; box-shadow:inset 0 0 0 1px #f97316; }
.wizard-option strong { display:block; font-size:13px; }
.wizard-option span { display:block; margin-top:4px; color:var(--muted); font-size:10px; line-height:1.5; }
.wizard-result { margin-top:10px; padding:10px 11px; border-radius:10px; background:#f9fafb; border:1px solid var(--line); color:#4b5563; font-size:11px; line-height:1.65; }
@media (max-width:420px) { .wizard-options { grid-template-columns:1fr; } }


/* v0.9.1 — simplified interface */
.collapsible-panel {
  padding: 0;
  overflow: hidden;
}
.collapsible-summary {
  list-style: none;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 2px;
  cursor: pointer;
  user-select: none;
}
.collapsible-summary::-webkit-details-marker { display: none; }
.collapsible-summary > span:first-child { display: grid; gap: 3px; }
.collapsible-summary strong { font-size: 15px; }
.collapsible-summary small { color: var(--muted); font-size: 11px; font-weight: 600; }
.summary-chevron {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--orange-dark);
  background: var(--orange-soft);
  transition: transform .2s ease;
}
.collapsible-panel[open] .summary-chevron { transform: rotate(180deg); }
.collapsible-content { padding: 2px 0 16px; }
.collapsible-content > .section-title-row:first-child { display: none; }
.compact-section-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.compact-section-heading h2 { margin: 0 0 3px; }
.compact-section-heading small { color: var(--muted); font-size: 11px; }
.images-panel { padding-top: 2px; }
.action-section { position: sticky; bottom: -14px; z-index: 5; background: var(--panel); padding-top: 12px; padding-bottom: 14px; box-shadow: 0 -8px 18px rgba(17,24,39,.05); }
@media (max-width: 900px) {
  .control-panel { padding: 12px; }
  .intro-bar { padding-block: 14px; }
}


/* v1.0.0 RC — feedback, progress and final polish */
.busy-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(17, 24, 39, .38);
  backdrop-filter: blur(3px);
}
.busy-card {
  width: min(360px, 100%);
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 24px;
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow);
  text-align: center;
}
.busy-card small { color: var(--muted); }
.busy-spinner {
  width: 38px;
  height: 38px;
  border: 4px solid #ffedd5;
  border-top-color: var(--orange);
  border-radius: 50%;
  animation: busy-spin .8s linear infinite;
}
@keyframes busy-spin { to { transform: rotate(360deg); } }
body.is-busy { overflow: hidden; }
.toast-region {
  position: fixed;
  inset-inline-start: 18px;
  bottom: 18px;
  z-index: 1100;
  display: grid;
  gap: 8px;
  pointer-events: none;
}
.toast-message {
  max-width: min(360px, calc(100vw - 36px));
  padding: 12px 14px;
  border-radius: 12px;
  color: #fff;
  background: #166534;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease;
  font-size: 13px;
  font-weight: 700;
}
.toast-message.toast-error { background: #991b1b; }
.toast-message.is-visible { opacity: 1; transform: translateY(0); }
.btn:focus-visible, .wizard-option:focus-visible, .collapsible-summary:focus-visible, .drop-zone:focus-visible {
  outline: 3px solid #fdba74;
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

.diagnostic-center {
  margin: 24px auto;
  width: min(1120px, calc(100% - 32px));
  padding: 20px;
  border: 1px solid var(--border, #d9dde5);
  border-radius: 16px;
  background: var(--surface, #fff);
}
.diagnostic-header,
.diagnostic-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.diagnostic-header h2 { margin: 0 0 4px; }
.diagnostic-header p { margin: 0; color: var(--muted, #667085); }
.diagnostic-status {
  padding: 6px 10px;
  border-radius: 999px;
  background: #eef2f7;
  font-weight: 700;
}
.diagnostic-status.is-success { background: #e7f8ed; color: #176b36; }
.diagnostic-status.is-error { background: #fff0f0; color: #a32626; }
.diagnostic-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}
.diagnostic-metrics > div {
  padding: 14px;
  border: 1px solid var(--border, #d9dde5);
  border-radius: 12px;
}
.diagnostic-metrics small { display: block; color: var(--muted, #667085); margin-bottom: 6px; }
.diagnostic-summary { margin: 16px 0; padding: 12px; border-radius: 10px; background: #f6f7f9; }
.diagnostic-results { display: grid; gap: 8px; }
.diagnostic-result {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border, #d9dde5);
  border-radius: 10px;
}
.diagnostic-result.is-pass strong { color: #176b36; }
.diagnostic-result.is-fail strong { color: #a32626; }
@media (max-width: 760px) {
  .diagnostic-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}


/* v1.0.3 RC launch polish */
.launch-toolbar { flex-wrap: wrap; justify-content: flex-end; }
.toolbar-group { display: flex; align-items: center; gap: 6px; padding-inline: 6px; border-inline-start: 1px solid var(--line); }
.app-status-bar {
  position: sticky;
  bottom: 0;
  z-index: 18;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 16px;
  background: rgba(255,255,255,.96);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  backdrop-filter: blur(10px);
}
.app-status-bar strong { color: var(--ink); font-weight: 700; }
.about-dialog {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(17,24,39,.45);
}
.about-dialog.hidden { display: none; }
.about-card { position: relative; width: min(440px,100%); background:#fff; border-radius:18px; padding:24px; box-shadow:var(--shadow); }
.about-card h2 { margin: 4px 0 10px; }
.about-close { position:absolute; inset-inline-end:14px; top:14px; }
.about-meta { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin:18px 0 0; }
.about-meta div { background:#f9fafb; border:1px solid var(--line); border-radius:12px; padding:10px; }
.about-meta dt { color:var(--muted); font-size:12px; }
.about-meta dd { margin:4px 0 0; font-weight:700; }
.project-dirty #statusSaveState { color: var(--orange-dark); }
@media (max-width: 900px) {
  .app-header { height:auto; min-height:74px; align-items:flex-start; gap:12px; flex-direction:column; padding-block:12px; }
  .launch-toolbar { width:100%; justify-content:flex-start; }
  .toolbar-group { border-inline-start:0; padding-inline:0; }
  .control-panel { top:0; max-height:none; position:relative; }
  .app-shell { min-height:auto; }
}
