/* The installation window reuses Maccy's warm theme tokens. */
.maccy-install-open { overflow: hidden; }
.maccy-install-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(11, 9, 8, .72);
  backdrop-filter: blur(10px);
}
.maccy-install-dialog {
  width: min(100%, 590px);
  max-height: min(90vh, 800px);
  overflow: auto;
  border: 1px solid var(--t-border);
  border-radius: 24px;
  background: var(--t-bg, #f5ede0);
  color: var(--t-text, #2d2a26);
  box-shadow: 0 32px 90px rgba(0, 0, 0, .34), 0 6px 22px rgba(0, 0, 0, .14);
  font: 15px/1.5 system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.maccy-install-titlebar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 49px;
  border-bottom: 1px solid var(--t-border);
  background: var(--t-bg2, #ede3d5);
  color: var(--t-text2, #6b5c4a);
  font-size: 13px;
  font-weight: 650;
}
.maccy-install-lights {
  position: absolute;
  left: 20px;
  display: flex;
  gap: 8px;
}
.maccy-install-lights i {
  display: block;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #ff5f57;
}
.maccy-install-lights i:nth-child(2) { background: #febc2e; }
.maccy-install-lights i:nth-child(3) { background: #28c840; }
.maccy-install-close {
  position: absolute;
  right: 12px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--t-text2, #6b5c4a);
  font: 28px/1 system-ui, sans-serif;
  cursor: pointer;
  transition: background-color .18s ease, color .18s ease;
}
.maccy-install-close:hover { background: var(--t-kbd-bg); color: var(--t-head); }
.maccy-install-body { padding: 26px 30px 28px; }
.maccy-install-header { display: grid; justify-items: center; gap: 12px; margin-bottom: 25px; text-align: center; }
.maccy-install-header img {
  width: 62px;
  height: 62px;
  object-fit: contain;
  border-radius: 16px;
  box-shadow: 0 12px 26px rgba(54, 33, 30, .2);
}
.maccy-install-header h2 {
  margin: 0;
  color: var(--t-head, #1a1714);
  font: 750 clamp(22px, 5vw, 27px)/1.2 system-ui, sans-serif;
  letter-spacing: -.035em;
  text-wrap: balance;
}
.maccy-install-steps {
  overflow: hidden;
  border: 1px solid var(--t-border);
  border-radius: 18px;
  background: var(--t-card-bg);
}
.maccy-install-step {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 14px;
  padding: 22px 24px;
}
.maccy-install-step + .maccy-install-step { border-top: 1px solid var(--t-border); }
.maccy-install-num {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--dl-accent-tint, #fff7ed);
  color: var(--dl-accent, #c2691d);
  font-size: 15px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}
.maccy-install-step strong {
  display: block;
  margin: 2px 0 6px;
  color: var(--t-head, #1a1714);
  font-size: 16px;
  font-weight: 700;
}
.maccy-install-step p { margin: 0; color: var(--t-text2, #6b5c4a); font-size: 14px; text-wrap: pretty; }
.maccy-install-command-row {
  display: flex;
  align-items: stretch;
  min-width: 0;
  margin: 15px 0 9px;
  padding: 5px;
  border: 1px solid var(--t-border);
  border-radius: 12px;
  background: var(--t-bg2, #ede3d5);
}
.maccy-install-command {
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  padding: 11px 12px;
  color: var(--t-head, #1a1714);
  font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: nowrap;
  user-select: all;
}
.maccy-install-copy {
  flex: none;
  min-width: 80px;
  padding: 9px 12px;
  border: 0;
  border-radius: 8px;
  background: var(--dl-accent, #c2691d);
  color: #fff;
  font: 650 13px system-ui, sans-serif;
  cursor: pointer;
  transition: filter .18s ease, transform .18s ease;
}
.maccy-install-copy:hover:not(:disabled) { filter: brightness(1.08); }
.maccy-install-copy:active:not(:disabled) { transform: scale(.96); }
.maccy-install-copy:disabled { opacity: .5; cursor: wait; }
.maccy-install-hint { font-size: 12px !important; }
.maccy-install-status { margin: 0; color: var(--t-text2); font-size: 13px; }
.maccy-install-status:empty { display: none; }
.maccy-install-dialog :focus-visible { outline: 2px solid var(--dl-accent); outline-offset: 3px; }
@media (max-width: 480px) {
  .maccy-install-body { padding: 22px 17px 20px; }
  .maccy-install-step { grid-template-columns: 26px minmax(0, 1fr); gap: 10px; padding: 17px 14px; }
  .maccy-install-num { width: 26px; height: 26px; }
  .maccy-install-command { padding: 11px 7px; font-size: 11px; }
  .maccy-install-copy { min-width: 67px; padding: 8px; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .maccy-install-dialog *, .maccy-install-dialog *::before, .maccy-install-dialog *::after { transition: none !important; }
}
/* Keep long commands in one line; copying still uses the full text. */
.maccy-install-command {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}
.maccy-install-copy.is-copied {
  background: #6f54e8;
  box-shadow: 0 0 0 4px rgba(111, 84, 232, .17), 0 0 24px rgba(111, 84, 232, .55);
  animation: maccy-copy-success .55s ease-out;
}
@keyframes maccy-copy-success {
  0% { box-shadow: 0 0 0 0 rgba(111, 84, 232, .5), 0 0 0 rgba(111, 84, 232, 0); }
  100% { box-shadow: 0 0 0 4px rgba(111, 84, 232, .17), 0 0 24px rgba(111, 84, 232, .55); }
}
@media (prefers-reduced-motion: reduce) {
  .maccy-install-copy.is-copied { animation: none; }
}
.maccy-install-instruction kbd,
.maccy-install-instruction code {
  display: inline-block;
  padding: 2px 8px;
  border: 1px solid var(--t-border);
  border-radius: 7px;
  background: var(--t-bg, #f5ede0);
  color: var(--t-text, #2d2a26);
  font: 500 13px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: nowrap;
  vertical-align: baseline;
}
.maccy-install-instruction code {
  border-color: transparent;
  background: var(--dl-accent-tint, #fff7ed);
  color: var(--dl-accent, #c2691d);
}

/* This selector owns the clipping even when the site's global code styles load later. */
.maccy-install-dialog .maccy-install-command-row { width: 100%; max-width: 100%; min-width: 0; overflow: hidden; }
.maccy-install-dialog .maccy-install-command-row .maccy-install-command {
  flex: 1 1 0;
  display: block;
  min-width: 0;
  max-width: 100%;
  overflow: hidden !important;
  white-space: nowrap !important;
  text-overflow: ellipsis;
  scrollbar-width: none;
}
.maccy-install-dialog .maccy-install-command-row .maccy-install-command::-webkit-scrollbar { display: none; }
