/* ===== Material-style theme (offline, system fonts) ===== */
:root {
  --primary: #1a73e8;
  --primary-dark: #1765cc;
  --primary-tint: #e8f0fe;
  --on-primary: #fff;
  --bg: #f1f3f6;
  --surface: #ffffff;
  --outline: #dadce0;
  --text: #202124;
  --muted: #5f6368;
  --danger: #d93025;
  --danger-tint: #fce8e6;
  --male: #1967d2;
  --male-bg: #d2e3fc;
  --female: #c2185b;
  --female-bg: #fcd2e3;
  --line: #9aa0a6;
  --hover: #f0f1f3;
  --spine-border: #a8c7fa;
  --ok: #188038;
  --warn: #e37400;
  --anc-bg: #e6f4ea;
  --anc-fg: #188038;
  --snack-bg: #323232;
  --snack-fg: #ffffff;
  --shadow1: 0 1px 2px rgba(60,64,67,.30), 0 1px 3px 1px rgba(60,64,67,.15);
  --shadow2: 0 1px 3px rgba(60,64,67,.30), 0 4px 8px 3px rgba(60,64,67,.15);
  --radius: 12px;
  font-family: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}
html[data-theme="dark"] {
  --primary: #8ab4f8;
  --primary-dark: #aecbfa;
  --primary-tint: #3c4a61;
  --on-primary: #202124;
  --bg: #202124;
  --surface: #2d2e31;
  --outline: #5f6368;
  --text: #e8eaed;
  --muted: #9aa0a6;
  --danger: #f28b82;
  --danger-tint: #4a3130;
  --male: #aecbfa;
  --male-bg: #3a4a66;
  --female: #f8a8c8;
  --female-bg: #5b3a4a;
  --line: #6e7378;
  --hover: #3a3b3f;
  --spine-border: #4a5b78;
  --ok: #81c995;
  --warn: #fdd663;
  --anc-bg: #2e4434;
  --anc-fg: #81c995;
  --snack-bg: #e8eaed;
  --snack-fg: #202124;
  --shadow1: 0 1px 2px rgba(0,0,0,.5), 0 1px 3px 1px rgba(0,0,0,.3);
  --shadow2: 0 1px 3px rgba(0,0,0,.5), 0 4px 8px 3px rgba(0,0,0,.35);
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--bg); color: var(--text); display: flex; flex-direction: column; overflow: hidden; overscroll-behavior: none; -webkit-text-size-adjust: 100%; }

/* ===== App bar ===== */
.appbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: var(--surface); padding: 8px 16px; box-shadow: var(--shadow1); z-index: 30; flex-wrap: wrap;
}
.appbar-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.logo { width: 36px; height: 36px; flex: none; }
html[data-theme="dark"] .logo,
html[data-theme="dark"] .welcome-logo svg { filter: grayscale(1) brightness(0) invert(1); }
.appbar h1 { font-size: 20px; font-weight: 500; margin: 0; white-space: nowrap; }
.stats { font-size: 12px; color: var(--muted); white-space: nowrap; }

.seg { display: flex; border: 1px solid var(--outline); border-radius: 24px; overflow: hidden; }
.seg button {
  border: none; background: transparent; padding: 8px 18px; font-size: 14px; cursor: pointer;
  color: var(--muted); font-family: inherit; white-space: nowrap; border-left: 1px solid var(--outline);
}
.seg button:first-child { border-left: none; }
.seg button.active { background: var(--primary-tint); color: var(--primary-dark); font-weight: 500; }
.seg button:hover:not(.active) { background: var(--hover); }

.appbar-right { display: flex; align-items: center; gap: 8px; }
.search { position: relative; display: flex; align-items: center; background: var(--bg); border-radius: 24px; padding: 0 12px; }
.search svg { color: var(--muted); flex: none; }
.search input { border: none; background: transparent; outline: none; padding: 9px 8px; width: 200px; font-size: 14px; font-family: inherit; }
.iconbtn {
  border: none; background: transparent; cursor: pointer; color: var(--muted); border-radius: 50%;
  width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; font-family: inherit;
}
.iconbtn:hover { background: var(--hover); }
.langbtn { font-size: 13px; font-weight: 600; color: var(--primary); border: 1px solid var(--outline); }
.savestatus { font-size: 12.5px; color: var(--muted); min-width: 86px; text-align: right; white-space: nowrap; }
.savestatus.saved { color: var(--ok); }
.savestatus.dirty { color: var(--warn); }
.savestatus.error { color: var(--danger); font-weight: 600; }

/* ===== Layout ===== */
main { flex: 1; display: flex; min-height: 0; position: relative; }
#canvas { flex: 1; position: relative; overflow: hidden; cursor: grab; touch-action: none; }
#canvas.panning { cursor: grabbing; }
#world { position: absolute; left: 0; top: 0; width: 0; height: 0; transform-origin: 0 0; }
#lines { position: absolute; overflow: visible; pointer-events: none; }
#lines path { stroke: var(--line); stroke-width: 1.6; fill: none; }

/* ===== Person cards ===== */
.card {
  position: absolute; width: 180px; min-height: 72px; background: var(--surface);
  border-radius: var(--radius); box-shadow: var(--shadow1); border: 2px solid transparent;
  display: flex; align-items: center; gap: 8px; padding: 8px 10px; cursor: pointer; user-select: none;
}
.card:hover { box-shadow: var(--shadow2); }
.card.spine { border-color: var(--spine-border); }
.card.root { background: var(--primary-tint); border-color: var(--primary); }
.card.sel { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(26,115,232,.25), var(--shadow2); }
.card:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; }
.avatar {
  flex: none; width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 15px;
}
.card.m .avatar { background: var(--male-bg); color: var(--male); }
.card.f .avatar { background: var(--female-bg); color: var(--female); }
.card.u .avatar { background: var(--hover); color: var(--muted); }
.cinfo { min-width: 0; }
.cname { font-size: 13.5px; font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; }
.cdates, .cplace { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notebadge { position: absolute; top: 5px; right: 7px; font-size: 11px; color: var(--warn); }

/* Quick-add "+" buttons around the selected card (see renderQuickAdd) */
.qadd {
  position: absolute; width: 26px; height: 26px; border-radius: 50%; padding: 0;
  border: 2px solid var(--surface); cursor: pointer; z-index: 5;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; font-weight: 600; line-height: 1; font-family: inherit;
  box-shadow: var(--shadow1);
}
.qadd:hover { box-shadow: var(--shadow2); transform: scale(1.12); }
.qadd.m { background: var(--male-bg); color: var(--male); }
.qadd.f { background: var(--female-bg); color: var(--female); }
.qadd.c, .qadd.s { background: var(--primary-tint); color: var(--primary-dark); }
.qa-top { top: -15px; }
.qa-bottom { bottom: -15px; }
.qa-center { left: 50%; margin-left: -13px; }
.qa-left { left: 50%; margin-left: -31px; }
.qa-right { left: 50%; margin-left: 5px; }
/* spouse: centered on the right edge, sitting on the marriage-connector line */
.qa-side { right: -15px; top: 50%; margin-top: -13px; }

/* ===== Zoom controls & FAB ===== */
.zoomctrl {
  position: absolute; left: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 1px;
  background: var(--surface); border-radius: 10px; box-shadow: var(--shadow1); overflow: hidden; z-index: 20;
}
.zoomctrl button {
  border: none; background: var(--surface); width: 48px; height: 40px; cursor: pointer; font-size: 16px;
  color: var(--text); font-family: inherit;
}
.zoomctrl button:hover { background: var(--hover); }
#zoomFit { font-size: 11px; color: var(--primary); font-weight: 600; white-space: nowrap; padding: 0 2px; }
html[lang="tr"] #zoomFit { font-size: 10px; }

#fab {
  position: absolute; right: 20px; bottom: 20px; width: 56px; height: 56px; border-radius: 18px; border: none;
  background: var(--primary); color: var(--on-primary); cursor: pointer; box-shadow: var(--shadow2);
  display: flex; align-items: center; justify-content: center; z-index: 20;
}
#fab:hover { background: var(--primary-dark); }

/* ===== Side panel ===== */
#panel {
  width: 372px; flex: none; background: var(--surface); box-shadow: -1px 0 4px rgba(60,64,67,.15);
  overflow-y: auto; padding: 16px 18px 28px; z-index: 25;
}
#panel.hidden { display: none; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.panel-head h2 { font-size: 18px; font-weight: 500; margin: 4px 0; overflow-wrap: anywhere; }
.badge {
  display: inline-block; font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 12px; margin-bottom: 10px;
}
.badge.root { background: var(--primary-tint); color: var(--primary-dark); }
.badge.anc { background: var(--anc-bg); color: var(--anc-fg); }

.field { margin-bottom: 12px; }
.field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; font-weight: 500; }
.field input, .field textarea, .field select {
  width: 100%; border: 1px solid var(--outline); border-radius: 8px; padding: 9px 12px; font-size: 14px;
  font-family: inherit; color: var(--text); background: var(--surface); outline: none;
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.field textarea { resize: vertical; min-height: 110px; line-height: 1.45; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.checkrow { display: flex; align-items: center; gap: 8px; margin: 2px 0 14px; font-size: 14px; cursor: pointer; }
.checkrow input { width: 17px; height: 17px; accent-color: var(--primary); cursor: pointer; }

.relsec { margin: 14px 0 4px; }
.relsec h3 { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin: 12px 0 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  border: 1px solid var(--outline); background: var(--surface); border-radius: 16px; padding: 5px 13px;
  font-size: 13px; cursor: pointer; font-family: inherit; color: var(--text);
}
.chip:hover { background: var(--primary-tint); border-color: var(--spine-border); }
.chip.addchip { color: var(--primary); border-style: dashed; font-weight: 500; }
.chip.ghost { color: var(--muted); border-style: dotted; cursor: default; }

.panel-actions { display: flex; gap: 8px; margin-top: 20px; flex-wrap: wrap; }
.btn {
  border: none; border-radius: 20px; padding: 9px 18px; font-size: 14px; font-weight: 500; cursor: pointer; font-family: inherit;
}
.btn.icon-label { display: inline-flex; align-items: center; gap: 6px; }
.btn.filled { background: var(--primary); color: var(--on-primary); }
.btn.filled:hover { background: var(--primary-dark); }
.btn.tonal { background: var(--primary-tint); color: var(--primary-dark); }
.btn.tonal:hover { opacity: .85; }
.btn.text { background: transparent; color: var(--primary); }
.btn.text:hover { background: var(--primary-tint); }
.btn.danger { background: var(--danger-tint); color: var(--danger); }
.btn.danger:hover { opacity: .85; }
.notvisible { font-size: 12.5px; color: var(--warn); margin: 6px 0; }

/* ===== Dialogs ===== */
dialog {
  border: none; border-radius: 24px; box-shadow: var(--shadow2); padding: 22px 24px; width: 420px; max-width: 92vw;
  font-family: inherit; color: var(--text);
}
dialog::backdrop { background: rgba(32,33,36,.45); }
dialog h2 { font-size: 18px; font-weight: 500; margin: 0 0 6px; }
.ad-rel { font-size: 13px; color: var(--primary-dark); background: var(--primary-tint); border-radius: 8px; padding: 7px 12px; margin-bottom: 14px; }
.actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.hint { font-size: 11.5px; color: var(--muted); margin-top: 4px; }

.segmini { display: flex; border: 1px solid var(--outline); border-radius: 20px; overflow: hidden; width: fit-content; }
.segmini button { border: none; background: transparent; padding: 7px 22px; font-size: 13.5px; cursor: pointer; font-family: inherit; color: var(--muted); }
.segmini button + button { border-left: 1px solid var(--outline); }
.segmini button.active { background: var(--primary-tint); color: var(--primary-dark); font-weight: 600; }

.namewrap { position: relative; }
.sug {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; background: var(--surface); border-radius: 10px;
  box-shadow: var(--shadow2); max-height: 260px; overflow-y: auto; z-index: 60;
}
.sug.hidden { display: none; }
.sug .item {
  width: 100%; border: 0; background: transparent; color: var(--text); font-family: inherit; text-align: left;
  padding: 9px 14px; font-size: 14px; cursor: pointer; display: flex; justify-content: space-between; gap: 10px;
}
.sug .item:hover, .sug .item.hl { background: var(--primary-tint); }
.sug .item .meta { color: var(--muted); font-size: 12px; white-space: nowrap; }
.sug .item .off { color: var(--warn); font-size: 11px; }
.search .sug { left: auto; right: 0; width: 320px; top: calc(100% + 6px); }

.chosen {
  display: inline-flex; align-items: center; gap: 8px; background: var(--primary-tint); color: var(--primary-dark);
  border-radius: 16px; padding: 5px 8px 5px 14px; font-size: 13.5px; font-weight: 500; margin-top: 6px;
}
.chosen button { border: none; background: transparent; cursor: pointer; font-size: 16px; color: var(--primary-dark); line-height: 1; }
.hidden { display: none !important; }

/* ===== Snackbar ===== */
#snackbar {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--snack-bg); color: var(--snack-fg);
  border-radius: 8px; padding: 11px 20px; font-size: 14px; box-shadow: var(--shadow2); z-index: 100;
  animation: snackin .18s ease-out;
}
@keyframes snackin { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }

@media (max-width: 900px) {
  .search input { width: 120px; }
  #panel { position: absolute; right: 0; top: 0; bottom: 0; }
}

/* ===== Phones ===== */
@media (max-width: 640px) {
  .appbar { gap: 8px; padding: 7px 10px; }
  .stats { display: none; }
  .savestatus { display: block; width: 9px; height: 9px; border-radius: 50%; overflow: hidden; font-size: 0; flex: none; }
  .savestatus.saved { background: #188038; }
  .savestatus.dirty { background: var(--warn); }
  .savestatus.error { background: var(--danger); }
  .treebtn { max-width: 46vw; font-size: 16px; }
  /* Segmented control drops to its own full-width row with equal buttons */
  .seg { order: 5; flex-basis: 100%; }
  .seg button { flex: 1; padding: 8px 6px; text-align: center; }
  .search input { width: 110px; }
  /* Editor panel fills the screen so fields never clip off-screen */
  #panel { width: 100vw; max-width: 100vw; padding: 14px 16px 28px; }
  /* Roomier touch targets for the zoom controls */
  .zoomctrl button { width: 52px; height: 44px; }
}

/* ===== Focus chip ===== */
#focusChip {
  position: absolute; top: 14px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px; background: var(--surface);
  border: 1px solid var(--outline); box-shadow: var(--shadow1); border-radius: 20px;
  padding: 7px 8px 7px 16px; font-size: 13.5px; font-weight: 500; z-index: 20; color: var(--text);
  max-width: 70%; white-space: nowrap;
}
#focusChip span { overflow: hidden; text-overflow: ellipsis; }
#focusChip button {
  border: none; background: var(--primary-tint); color: var(--primary-dark);
  width: 24px; height: 24px; border-radius: 50%; cursor: pointer; font-size: 13px;
  line-height: 1; flex: none; font-family: inherit;
}
#focusChip button:hover { opacity: .85; }

/* ===== Date fields ===== */
.unclbl {
  float: right; display: inline-flex; align-items: center; gap: 4px;
  font-weight: 400; color: var(--muted); cursor: pointer; font-size: 11.5px;
}
.unclbl input { width: 13px; height: 13px; accent-color: var(--primary); margin: 0; cursor: pointer; }
.field input.invalid { border-color: var(--danger); box-shadow: 0 0 0 1px var(--danger); }

/* ===== Dialog sizing ===== */
dialog { max-height: 88vh; overflow-y: auto; }

/* ===== Round 3 additions ===== */
dialog { background: var(--surface); color: var(--text); }
.search input { caret-color: var(--primary); }
.search:focus-within { background: var(--surface); box-shadow: 0 0 0 2px var(--primary); }
.cnick { color: var(--muted); font-weight: 500; font-size: 12px; white-space: nowrap; }

/* ===== Tree switcher & menu ===== */
.treewrap { position: relative; }
.treebtn {
  display: flex; align-items: center; gap: 4px; border: 1px solid transparent; background: transparent;
  border-radius: 10px; padding: 6px 8px 6px 10px; cursor: pointer; font-family: inherit; color: var(--text);
  font-size: 17px; font-weight: 500; max-width: 320px;
}
.treebtn:hover { background: var(--hover); border-color: var(--outline); }
.treebtn #treeBtnName { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.treebtn svg { color: var(--muted); flex: none; }
.treemenu {
  position: absolute; top: calc(100% + 6px); left: 0; min-width: 300px; max-width: 380px;
  background: var(--surface); border: 1px solid var(--outline); border-radius: 14px; box-shadow: var(--shadow2);
  z-index: 60; overflow: hidden; display: flex; flex-direction: column;
}
.treemenu-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 8px 10px 14px; border-bottom: 1px solid var(--outline);
}
.tm-label { font-size: 13px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.treemenu-actions { display: flex; gap: 2px; flex: none; }
.iconbtn.sm { width: 30px; height: 30px; }
.iconbtn.sm.danger { color: var(--danger); }
.iconbtn:disabled { opacity: .35; cursor: default; }
.iconbtn:disabled:hover { background: transparent; }
.treemenu-list { max-height: 320px; overflow-y: auto; padding: 6px; }
.tm-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%;
  border: none; background: transparent; border-radius: 8px; padding: 9px 12px; cursor: pointer;
  font-family: inherit; font-size: 14px; color: var(--text); text-align: left;
}
.tm-item:hover { background: var(--hover); }
.tm-item.active { background: var(--primary-tint); color: var(--primary-dark); font-weight: 600; }
.tm-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tm-count { flex: none; font-size: 12px; color: var(--muted); background: var(--bg); border-radius: 10px; padding: 1px 8px; }
.tm-item.active .tm-count { color: var(--primary-dark); }
.tm-empty { padding: 18px 14px; font-size: 13px; color: var(--muted); text-align: center; }
.treemenu-foot { display: flex; gap: 6px; padding: 8px; border-top: 1px solid var(--outline); }
.treemenu-foot button {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--outline); background: var(--surface); border-radius: 8px; padding: 9px 8px;
  cursor: pointer; font-family: inherit; font-size: 13px; font-weight: 500; color: var(--primary);
}
.treemenu-foot button:hover { background: var(--primary-tint); border-color: var(--spine-border); }
.treemenu-foot svg { flex: none; }
.tm-data {
  display: flex; align-items: center; gap: 9px; width: 100%; text-align: left;
  border: none; border-top: 1px solid var(--outline); background: transparent;
  padding: 9px 14px; cursor: pointer; font-family: inherit; color: var(--muted);
}
.tm-data:hover { background: var(--hover); }
.tm-data svg { flex: none; color: var(--muted); }
.tm-data-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.tm-data-label { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; }
.tm-data-path { font-size: 12px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tm-store {
  display: flex; align-items: center; gap: 9px;
  border-top: 1px solid var(--outline); padding: 9px 14px; color: var(--muted);
}
.tm-store > svg { flex: none; color: var(--muted); }
.tm-store-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; flex: 1; }
.tm-store-label { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; }
.tm-store-path { font-size: 12px; color: var(--text); }
.tm-folder {
  flex: none; display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--outline); background: var(--surface); border-radius: 8px;
  padding: 7px 10px; cursor: pointer; font-family: inherit; font-size: 12.5px; font-weight: 500; color: var(--primary);
}
.tm-folder:hover { background: var(--primary-tint); border-color: var(--spine-border); }
.tm-folder svg { flex: none; }

/* ===== Data folder dialog ===== */
.dd-current { font-size: 13px; color: var(--muted); margin: 0 0 14px; }
.dd-current code {
  display: block; margin-top: 4px; font-size: 12.5px; color: var(--text);
  background: var(--bg); border: 1px solid var(--outline); border-radius: 8px;
  padding: 7px 10px; word-break: break-all;
}
.dd-locked { font-size: 12.5px; color: var(--warn); margin-top: 6px; }

/* ===== Empty state ===== */
#emptyState {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; text-align: center; color: var(--muted); padding: 24px; pointer-events: none;
}
#emptyState svg { color: var(--outline); }
#emptyState h2 { font-size: 20px; font-weight: 500; color: var(--text); margin: 4px 0 0; }
#emptyState p { font-size: 14px; margin: 0 0 8px; max-width: 360px; }
#emptyState .btn { pointer-events: auto; }
.canvas-error {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 15;
  max-width: 440px; padding: 14px 18px; border: 1px solid var(--danger); border-radius: 12px;
  background: var(--danger-tint); color: var(--danger); text-align: center; font-size: 14px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* ===== Prompt dialog ===== */
#promptDialog { width: 360px; }
#promptDialog .field { margin-bottom: 4px; }

/* ===== Welcome dialog ===== */
#welcomeDialog { width: 468px; position: relative; }
#welcomeDialog[open] { animation: welcomein .22s cubic-bezier(.2, .8, .25, 1); }
@keyframes welcomein { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
.welcome-x {
  position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; border-radius: 50%;
  border: none; background: transparent; color: var(--muted); cursor: pointer; font-size: 15px;
  display: flex; align-items: center; justify-content: center; font-family: inherit; line-height: 1;
}
.welcome-x:hover { background: var(--hover); }
.welcome-hero { text-align: center; padding: 4px 4px 0; }
.welcome-logo {
  width: 72px; height: 92px;
  display: inline-flex; align-items: center; justify-content: center; margin-bottom: 12px;
}
.welcome-logo svg { width: 72px; height: 92px; }
.welcome-hero h2 { font-size: 21px; font-weight: 600; margin: 0 0 7px; }
.welcome-intro { font-size: 13.5px; color: var(--muted); line-height: 1.5; margin: 0 auto; max-width: 384px; }
.welcome-exploring {
  font-size: 12.5px; color: var(--primary-dark); background: var(--primary-tint);
  border-radius: 10px; padding: 9px 13px; margin: 16px 0 2px; text-align: center; line-height: 1.4;
}
.welcome-steps { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-direction: column; gap: 13px; }
.welcome-step { display: flex; gap: 12px; align-items: flex-start; }
.welcome-step .ico {
  flex: none; width: 36px; height: 36px; border-radius: 11px; background: var(--bg); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
}
.welcome-step .txt { font-size: 13.5px; line-height: 1.45; padding-top: 1px; }
.welcome-step .txt b { font-weight: 600; }
.welcome-step .txt span { color: var(--muted); }
.welcome-tips { font-size: 12px; color: var(--muted); line-height: 1.5; margin: 14px 0 0; }
.welcome-note { display: flex; gap: 9px; align-items: center; margin-top: 14px; font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.welcome-note svg { flex: none; color: var(--ok); }
.welcome-local {
  margin-top: 16px; border: 1px solid var(--outline); border-radius: 12px; padding: 13px 14px; background: var(--bg);
}
.welcome-local h3 { font-size: 13px; font-weight: 600; margin: 0 0 4px; }
.welcome-local p { font-size: 12.5px; color: var(--muted); margin: 0 0 10px; line-height: 1.45; }
.welcome-cmd { display: flex; align-items: center; gap: 8px; }
.welcome-cmd code {
  flex: 1; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px;
  background: var(--surface); border: 1px solid var(--outline); border-radius: 8px; padding: 8px 12px;
  color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.welcome-copy {
  flex: none; border: 1px solid var(--outline); background: var(--surface); border-radius: 8px;
  padding: 8px 13px; cursor: pointer; font-family: inherit; font-size: 12.5px; font-weight: 500; color: var(--primary);
}
.welcome-copy:hover { background: var(--primary-tint); border-color: var(--spine-border); }
.welcome-actions { margin-top: 22px; display: flex; justify-content: flex-end; }
.welcome-actions .btn { padding: 10px 26px; }
