/* Guide setup — big popup, left bubble, sidebar row. */

.dashboard-sidebar [data-senditto-guide] {
  flex: none;
  margin: 0;
  padding: 2px 10px 8px;
}
.dashboard-sidebar [data-senditto-guide] + .sidebar-bottom {
  margin-top: 0;
}
.dashboard-sidebar [data-senditto-guide] button {
  display: flex !important;
  align-items: center !important;
  height: 43px !important;
  min-height: 43px !important;
  width: 100%;
  gap: 12px;
  padding: 0 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 13.5px;
  font-weight: 650;
  cursor: pointer;
  text-align: left;
}
.dashboard-sidebar [data-senditto-guide] button:hover {
  background: var(--sd-sunk, #f1f5fb);
}
.dashboard-sidebar [data-senditto-guide] button svg {
  width: 18.5px;
  height: 18.5px;
  flex: none;
}
.dashboard-shell.collapsed .dashboard-sidebar [data-senditto-guide] {
  padding: 4px 8px 8px;
}
.dashboard-shell.collapsed .dashboard-sidebar [data-senditto-guide] button {
  justify-content: center !important;
  height: 40px !important;
  min-height: 40px !important;
  padding: 8px 0 !important;
}
.dashboard-shell.collapsed .dashboard-sidebar [data-senditto-guide] button span {
  opacity: 0 !important;
  max-width: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
}

.sg-scrim {
  position: fixed;
  inset: 0;
  z-index: 2147481800;
  background: rgba(11, 24, 59, 0.42);
  backdrop-filter: blur(4px);
  display: grid;
  place-items: center;
  padding: 28px 22px;
}
.sg-scrim[hidden] { display: none !important; }

.sg-panel {
  width: min(1180px, 100%);
  height: min(88vh, 920px);
  display: flex;
  flex-direction: column;
  background: var(--paper, #fff);
  color: var(--ink, #16223c);
  border: 1px solid var(--sd-line, #e3e9f2);
  border-radius: 22px;
  box-shadow: 0 30px 80px rgba(11, 24, 59, 0.24);
  overflow: hidden;
  font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, sans-serif;
}

.sg-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--sd-line, #eef2f7);
  flex: none;
}
.sg-back {
  width: 36px;
  height: 36px;
  border: 1px solid var(--sd-line, #d9e2ef);
  background: var(--paper, #fff);
  border-radius: 10px;
  cursor: pointer;
  font: 700 18px/1 inherit;
  color: var(--ink, #16223c);
  flex: none;
}
.sg-back[hidden] { display: none !important; }
.sg-head-copy { flex: 1 1 auto; min-width: 0; }
.sg-head-copy small {
  display: block;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sd-blue-ink, #1e5fd6);
}
.sg-head-copy h1 {
  margin: 4px 0 0;
  font-size: 22px;
  letter-spacing: -0.02em;
  font-weight: 800;
}
.sg-head .sd-doc {
  margin: 8px 4px 0 0;
}
.sg-icon-btn {
  width: 36px;
  height: 36px;
  border: 1px solid var(--sd-line, #d9e2ef);
  background: var(--sd-sunk, #f6f8fc);
  border-radius: 10px;
  cursor: pointer;
  font: 700 20px/1 inherit;
  color: var(--ink, #16223c);
  flex: none;
}
.sg-icon-btn:hover { background: #eef3fb; }

.sg-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 22px 24px 32px;
}

.sg-lead {
  max-width: 72ch;
  margin: 0 0 18px;
  color: var(--sd-mut, #5b6b82);
  font-size: 14.5px;
  line-height: 1.55;
}
.sg-order {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 26px;
}
.sg-order button {
  border: 1px solid var(--sd-line, #d9e2ef);
  background: var(--paper, #fff);
  border-radius: 999px;
  padding: 7px 12px;
  font: 700 12.5px inherit;
  cursor: pointer;
  color: var(--ink, #16223c);
}
.sg-order button:hover { border-color: #94b7ed; color: #1e5fd6; }
.sg-order b {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin-right: 6px;
  border-radius: 50%;
  background: #e8f0ff;
  color: #1e5fd6;
  font-size: 11px;
}

.sg-group { margin: 0 0 26px; }
.sg-group > small {
  display: block;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sd-blue-ink, #1e5fd6);
  margin: 0 0 10px;
}
.sg-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.sg-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: left;
  border: 1px solid var(--sd-line, #e3e9f2);
  background: var(--paper, #fff);
  border-radius: 16px;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  color: inherit;
  font: inherit;
  min-width: 0;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03);
}
.sg-card:hover { border-color: #94b7ed; box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08); }
.sg-card img {
  width: 100%;
  height: 128px;
  object-fit: cover;
  background: #eef3fb;
  display: block;
}
.sg-card > div { padding: 12px 14px 14px; }
.sg-card small {
  display: block;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--sd-mut, #6a7590);
}
.sg-card b { display: block; margin: 4px 0 4px; font-size: 15px; }
.sg-card p { margin: 0; color: var(--sd-mut, #5b6b82); font-size: 13px; line-height: 1.45; }

.sg-detail-hero {
  display: grid;
  grid-template-columns: minmax(180px, 260px) minmax(0, 1fr);
  gap: 22px;
  margin-bottom: 22px;
  align-items: start;
}
.sg-detail-hero img {
  width: 100%;
  border-radius: 16px;
  object-fit: cover;
  aspect-ratio: 1;
  background: #eef3fb;
}
.sg-detail-hero p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--ink, #16223c); }
.sg-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.sg-btn {
  height: 40px;
  padding: 0 14px;
  border: 1px solid var(--sd-line, #d9e2ef);
  border-radius: 10px;
  background: var(--paper, #fff);
  color: var(--ink, #18243d);
  font: 750 13px inherit;
  cursor: pointer;
}
.sg-btn.primary { background: #2476f3; border-color: #2476f3; color: #fff; }
.sg-btn:hover { border-color: #94b7ed; }

.sg-h {
  margin: 26px 0 10px;
  font-size: 16px;
  font-weight: 800;
}
.sg-step {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 12px;
  margin: 0 0 16px;
}
.sg-step > b {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #e8f0ff;
  color: #1e5fd6;
  display: grid;
  place-items: center;
  font-size: 12px;
}
.sg-step h3 { margin: 3px 0 6px; font-size: 14.5px; }
.sg-step p { margin: 0 0 8px; color: var(--sd-mut, #5b6b82); }

.sg-fill {
  display: grid;
  gap: 0;
  border: 1px solid var(--sd-line, #e3e9f2);
  border-radius: 12px;
  overflow: hidden;
  background: var(--sd-sunk, #fbfcff);
}
.sg-fill div {
  display: grid;
  grid-template-columns: minmax(110px, 180px) minmax(0, 1fr);
  gap: 10px;
  padding: 9px 12px;
  border-top: 1px solid var(--sd-line, #edf1f6);
}
.sg-fill div:first-child { border-top: 0; }
.sg-fill dt { color: var(--sd-mut, #6a7590); font-size: 12px; font-weight: 700; }
.sg-fill dd { margin: 0; font-weight: 650; word-break: break-word; }

.sg-path {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 0;
  align-items: center;
}
.sg-path li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 650;
}
.sg-path li span {
  background: var(--sd-sunk, #f4f7fb);
  border: 1px solid var(--sd-line, #e3e9f2);
  border-radius: 8px;
  padding: 5px 9px;
}
.sg-path li + li::before {
  content: "→";
  color: #8b99ad;
  font-weight: 800;
  margin: 0 6px 0 2px;
}

.sg-look {
  border: 1px solid var(--sd-line, #e3e9f2);
  border-radius: 14px;
  overflow: hidden;
  background: var(--paper, #fff);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
  margin: 0 0 12px;
}
.sg-look-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: #f6f8fc;
  border-bottom: 1px solid var(--sd-line, #eef2f7);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #3d4d68;
}
.sg-look-bar em { font-style: normal; color: #1e5fd6; }
.sg-look-body { padding: 14px; display: grid; gap: 10px; }
.sg-field { display: grid; gap: 4px; }
.sg-field small {
  font-size: 11px;
  font-weight: 750;
  color: var(--sd-mut, #6a7590);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.sg-field b,
.sg-fake {
  display: block;
  min-height: 38px;
  padding: 8px 11px;
  border: 1px solid #d9e2ef;
  border-radius: 10px;
  background: #fbfcff;
  font-weight: 650;
  font-size: 13.5px;
  color: var(--ink, #16223c);
  word-break: break-word;
}
.sg-fake.area { min-height: 72px; white-space: pre-wrap; }
.sg-fake.tog {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
}
.sg-switch {
  width: 36px;
  height: 20px;
  border-radius: 999px;
  background: #2476f3;
  position: relative;
  flex: none;
}
.sg-switch::after {
  content: "";
  position: absolute;
  top: 2px;
  right: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
}
.sg-switch.off { background: #c5cedb; }
.sg-switch.off::after { right: auto; left: 2px; }
.sg-fake-btn {
  justify-self: start;
  height: 38px;
  padding: 0 14px;
  border: 0;
  border-radius: 10px;
  background: #2476f3;
  color: #fff;
  font: 750 13px inherit;
  pointer-events: none;
}

.sg-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 8px 0 16px;
}
.sg-col {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--sd-line, #e3e9f2);
  min-width: 0;
}
.sg-col.bad { border-color: #f0b4ae; background: #fff7f6; }
.sg-col.ok { border-color: #9ed4b6; background: #f3fbf6; }
.sg-col .sg-look { margin: 0; box-shadow: none; border: 0; border-radius: 0; background: transparent; }
.sg-col .sg-look-bar { background: transparent; }
.sg-verdict {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px 0;
  font-weight: 800;
  font-size: 13.5px;
}
.sg-mark {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 13px;
  flex: none;
}
.sg-mark.x { background: #e23d3d; }
.sg-mark.tick { background: #1a9a58; }
.sg-happens {
  margin: 0;
  padding: 0 12px 12px;
  font-size: 12.5px;
  line-height: 1.45;
  color: #4a3a38;
}
.sg-col.ok .sg-happens { color: #1d4d36; }
.sg-col .sg-fake { background: #fff; }

.sg-issues { display: grid; gap: 8px; margin: 0 0 12px; }
.sg-issue {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #f0b4ae;
  background: #fff7f6;
  border-radius: 12px;
}
.sg-issue .sg-mark { margin-top: 1px; }
.sg-issue b { display: block; margin-bottom: 2px; }
.sg-issue p { margin: 0; color: #5a3a38; font-size: 13px; }

@media (max-width: 760px) {
  .sg-pair { grid-template-columns: 1fr; }
}

.sg-code {
  margin: 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: #10192c;
  color: #e8edf7;
  font: 12.5px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.sg-note {
  border-radius: 12px;
  padding: 12px 14px;
  margin: 0 0 10px;
  border: 1px solid #ead9a8;
  background: #fff8e6;
}
.sg-note b { display: block; margin-bottom: 4px; }
.sg-note p { margin: 0; color: #5c4a16; }
.sg-note.law { border-color: #c9d6ea; background: #f3f7ff; }
.sg-note.law p { color: #24365c; }
.sg-note.ai { border-color: #c4b6f2; background: #f6f2ff; }
.sg-note.ai p { color: #3d2f6b; }
.sg-note.warn { border-color: #ead9a8; background: #fff8e6; }

.sg-bubble {
  position: fixed;
  z-index: 2147482000;
  bottom: 22px;
  left: 22px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border: 0;
  border-radius: 999px;
  background: #131c2f;
  color: #fff;
  font: 600 14px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(19, 28, 47, 0.28);
}
.sg-bubble[hidden] { display: none !important; }
.sg-bubble:hover { background: #1d2a44; }
body:has(.wm-toast, .ws-toast, .pp-toast, .se-toast, .pk-toast, .pw-toast, .pc-toast, .pa-toast, .ps-toast, .pi-toast, .tp2-toast) .sg-bubble {
  display: none !important;
}

html[data-theme="dark"] .sg-panel {
  background: #131c2e;
  color: #e8edf7;
  border-color: #26314a;
}
html[data-theme="dark"] .sg-head { border-color: #24304a; }
html[data-theme="dark"] .sg-back,
html[data-theme="dark"] .sg-icon-btn,
html[data-theme="dark"] .sg-btn,
html[data-theme="dark"] .sg-card,
html[data-theme="dark"] .sg-order button {
  background: #131c2e;
  border-color: #26314a;
  color: #e8edf7;
}
html[data-theme="dark"] .sg-fill { background: #0f1726; border-color: #26314a; }
html[data-theme="dark"] .sg-fill div { border-color: #24304a; }
html[data-theme="dark"] .sg-lead,
html[data-theme="dark"] .sg-card p,
html[data-theme="dark"] .sg-step p { color: #9aa8c0; }
html[data-theme="dark"] .sg-look,
html[data-theme="dark"] .sg-fake,
html[data-theme="dark"] .sg-col .sg-fake { background: #0f1726; border-color: #26314a; color: #e8edf7; }
html[data-theme="dark"] .sg-look-bar { background: #0f1726; border-color: #24304a; color: #9aa8c0; }
html[data-theme="dark"] .sg-path li span { background: #0f1726; border-color: #26314a; }
html[data-theme="dark"] .sg-col.bad { background: #2a1518; border-color: #7a3030; }
html[data-theme="dark"] .sg-col.ok { background: #10261c; border-color: #2f7a52; }
html[data-theme="dark"] .sg-happens,
html[data-theme="dark"] .sg-issue p { color: #d7c4c2; }
html[data-theme="dark"] .sg-col.ok .sg-happens { color: #b7e0c8; }
html[data-theme="dark"] .sg-issue { background: #2a1518; border-color: #7a3030; }
html[data-theme="dark"] .dashboard-sidebar [data-senditto-guide] button:hover {
  background: #1b2540;
}

.sg-works { display: grid; gap: 8px; margin: 0 0 12px; }
.sg-work {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--sd-line, #e3e9f2);
  border-radius: 12px;
  background: var(--paper, #fff);
  cursor: pointer;
}
.sg-work.on { border-color: #9ed4b6; background: #f3fbf6; }
.sg-work b { display: block; }
.sg-work small { color: var(--sd-mut, #6a7590); }
.sg-custom { display: flex; gap: 8px; margin: 0 0 12px; }
.sg-custom .sg-fake { flex: 1; min-height: 40px; }
.sg-live { margin: 0 0 22px; }

@media (max-width: 760px) {
  .sg-scrim { padding: 10px; }
  .sg-panel { height: min(94vh, 100%); border-radius: 16px; }
  .sg-detail-hero { grid-template-columns: 1fr; }
  .sg-detail-hero img { max-width: 220px; }
  .sg-fill div { grid-template-columns: 1fr; gap: 2px; }
}
