/* Dev mode (Oct 16): Mike's markup layer on preview copies. Loud on
   purpose: red ink, plain labels, nothing that could be mistaken for
   the page itself. */

.dev-key {
  position: fixed; left: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 10002;
  appearance: none; border: 1px solid rgb(255 255 255 / .35); border-radius: 999px;
  background: rgb(20 20 20 / .78); color: #fff; font: 700 12px/1 -apple-system, system-ui, sans-serif;
  padding: 9px 12px; min-height: 36px; letter-spacing: .02em; cursor: pointer;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.dev-key.is-on { background: #ff3b30; border-color: #ff3b30; }

.dev-layer, .dev-dock, .dev-sheet, .dev-tip { display: none; }
body.dev-on .dev-layer { display: block; }
body.dev-on .dev-dock { display: flex; }
body.dev-on .dev-sheet:not([hidden]) { display: grid; }
body.dev-on .dev-tip:not([hidden]) { display: block; }

.dev-layer { position: fixed; inset: 0; z-index: 9990; pointer-events: none; }
.dev-layer[data-tool="pin"], .dev-layer[data-tool="cut"] { pointer-events: auto; cursor: crosshair; }
.dev-boxes, .dev-pins, .dev-cuts { position: absolute; inset: 0; }
.dev-canvas { position: absolute; inset: 0; pointer-events: none; touch-action: none; }
.dev-layer[data-tool="draw"] .dev-canvas { pointer-events: auto; cursor: crosshair; }

/* why */
.dev-box {
  position: absolute; appearance: none; background: rgb(0 122 255 / .06);
  border: 1.5px dashed rgb(0 122 255 / .8); border-radius: 6px; padding: 0; pointer-events: none;
}
.dev-q {
  position: absolute; top: -9px; right: -9px; pointer-events: auto; cursor: pointer;
  width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  background: #007aff; color: #fff; font: 700 12px/1 -apple-system, system-ui, sans-serif;
  box-shadow: 0 2px 6px rgb(0 0 0 / .3);
}
.dev-q::before { content: ""; position: absolute; inset: -10px; }
.dev-tip {
  position: fixed; z-index: 10001; width: min(320px, calc(100vw - 16px));
  background: #111; color: #fff; border-radius: 12px; padding: 12px 14px;
  font: 14px/1.45 -apple-system, system-ui, sans-serif; box-shadow: 0 10px 30px rgb(0 0 0 / .35);
}
.dev-tip b { display: block; font-size: 12px; color: #7cb8ff; margin-bottom: 4px; }
.dev-tip p { margin: 0 0 10px; }
.dev-tip button {
  appearance: none; border: 0; border-radius: 8px; background: #ff3b30; color: #fff;
  font: 600 13px/1 -apple-system, system-ui, sans-serif; padding: 10px 12px; cursor: pointer;
}

/* pins + cuts */
.dev-pin { position: absolute; transform: translate(-50%, -100%); pointer-events: auto; }
.dev-pin > span {
  display: grid; place-items: center; width: 28px; height: 28px; margin: 0 auto;
  border-radius: 50% 50% 50% 0; transform: rotate(-45deg);
  background: #ff3b30; color: #fff; font: 700 13px/1 -apple-system, system-ui, sans-serif;
  box-shadow: 0 2px 8px rgb(0 0 0 / .35);
}
.dev-pin > span { line-height: 28px; }
.dev-pin-note {
  position: absolute; left: 50%; top: 34px; transform: translateX(-50%);
  width: 200px; padding: 8px 10px; border-radius: 10px; border: 0; resize: none;
  background: #111; color: #fff; font: 14px/1.4 -apple-system, system-ui, sans-serif;
  box-shadow: 0 6px 18px rgb(0 0 0 / .35);
}
.dev-cut {
  position: absolute; border: 2px solid #ff3b30; border-radius: 6px;
  background: repeating-linear-gradient(135deg, rgb(255 59 48 / .18) 0 8px, transparent 8px 16px);
}
.dev-cut span {
  position: absolute; top: -10px; left: 6px; background: #ff3b30; color: #fff; border-radius: 6px;
  font: 700 11px/1 -apple-system, system-ui, sans-serif; padding: 4px 6px;
}

/* the dock + the note */
.dev-dock {
  position: fixed; left: 50%; transform: translateX(-50%); z-index: 10000;
  bottom: calc(10px + env(safe-area-inset-bottom));
  gap: 4px; padding: 5px; border-radius: 14px;
  background: rgb(20 20 20 / .86); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: 0 8px 24px rgb(0 0 0 / .35);
}
.dev-dock button {
  appearance: none; border: 0; border-radius: 10px; background: transparent; color: #fff;
  font: 600 13px/1 -apple-system, system-ui, sans-serif; padding: 0 10px; min-height: 40px; cursor: pointer;
}
.dev-dock button.is-on { background: #fff; color: #111; }
.dev-dock .dev-say.is-live { background: #ff3b30; color: #fff; animation: dev-blink 1.2s ease-in-out infinite; }
.dev-dock .dev-send { background: #34c759; color: #04210c; }
@keyframes dev-blink { 50% { opacity: .6; } }

.dev-sheet {
  position: fixed; left: 50%; transform: translateX(-50%); z-index: 10000;
  top: calc(40px + env(safe-area-inset-top)); width: min(560px, calc(100vw - 20px));
  gap: 4px; padding: 8px; border-radius: 14px;
  background: rgb(20 20 20 / .86); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.dev-note {
  width: 100%; border: 0; border-radius: 10px; resize: none; padding: 9px 11px;
  background: rgb(255 255 255 / .1); color: #fff; font: 15px/1.4 -apple-system, system-ui, sans-serif;
}
.dev-note::placeholder { color: rgb(255 255 255 / .55); }
.dev-status { margin: 0; min-height: 1em; color: #9be7ae; font: 12px/1.3 -apple-system, system-ui, sans-serif; padding: 0 4px; }

@media (max-width: 420px) {
  .dev-dock button { padding: 0 8px; font-size: 12.5px; }
  .dev-key { bottom: calc(64px + env(safe-area-inset-bottom)); }
}

/* looking through our own marks to the page underneath */
body.dev-probe .dev-layer, body.dev-probe .dev-layer *, body.dev-probe .dev-dock, body.dev-probe .dev-sheet, body.dev-probe .dev-tip, body.dev-probe .dev-key { pointer-events: none !important; }
.dev-sheet-done {
  justify-self: end; appearance: none; border: 0; border-radius: 8px; background: rgb(255 255 255 / .14); color: #fff;
  font: 600 13px/1 -apple-system, system-ui, sans-serif; padding: 9px 12px; cursor: pointer;
}
