/* CR-027: the standalone doodle prototype, scoped to the Etc. tool. */
/* CR-031: prevent Pencil text selection only within the doodle and its intro. */
.doodle-intro,.doodle{-webkit-user-select:none;user-select:none}
.doodle{border:2px solid #ac7f91;border-radius:15px;background:#fff;box-shadow:5px 6px 0 #edd9dd;overflow:hidden;min-width:0;color:#805b6d}
.doodle-bar{padding:11px 15px;background:#d6ece3;display:flex;align-items:center;border-bottom:2px solid #ac7f91;font-weight:900;font-size:.875rem}
.doodle-bar small{font-size:inherit;font-weight:500;color:#805e73}
.doodle-workspace{padding:20px;background:#fffaf8;min-width:0}
.doodle-toolbar{position:relative;display:flex;align-items:center;flex-wrap:nowrap;gap:12px;margin-bottom:15px}
.doodle-tools,.doodle-actions{display:flex;align-items:center;gap:7px;min-width:0}
.doodle-tools{flex-wrap:nowrap}.doodle-actions{flex-wrap:wrap}
.doodle-label{font-weight:800;font-size:.875rem;margin-right:3px}
.doodle button{font:inherit;color:inherit;touch-action:manipulation;-webkit-tap-highlight-color:transparent}
.doodle-tool{width:44px;height:44px;flex-shrink:0;border:1.5px solid #d6afbd;border-radius:10px;background:#fffdf9;display:grid;place-items:center;padding:10px}
.doodle-tool svg{width:20px;height:20px}
.doodle-tool[aria-pressed=true]{background:#f6d8e4;border-color:#a76b88;box-shadow:inset 0 0 0 1px #a76b88}
/* CR-034: an overlay keeps the tools on one row without moving the sheet. */
.doodle-widths{position:absolute;z-index:3;top:calc(100% + 4px);left:0;display:flex;align-items:center;flex-wrap:nowrap;gap:3px;width:max-content;max-width:100%;padding:7px;border:1px solid #be9cac;border-radius:14px;background:#fffaf8;box-shadow:2px 3px 0 #edd9dd}
.doodle-widths[hidden]{display:none}
.doodle-tool[aria-expanded=true]{background:#dceee7;border-color:#8aacaa;box-shadow:inset 0 0 0 1px #8aacaa}
.doodle-size{border:1px solid #d7b7c4;background:white;border-radius:50%;width:44px;height:44px;min-width:44px;min-height:44px;flex-shrink:0;padding:0;display:grid;place-items:center}
.doodle-size span{display:block;width:var(--dot);height:var(--dot);border-radius:50%;background:currentColor}
.doodle-size[aria-pressed=true]{background:#dceee7;border-color:#8aacaa;box-shadow:inset 0 0 0 1px #8aacaa}
.doodle-widths button:focus-visible{outline-offset:3px}
.doodle-colors{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));width:100%;max-width:373px;min-width:0;align-items:center;margin-bottom:18px;gap:3px}
.doodle-colors>.doodle-label{grid-column:1 / -1}
.doodle-swatch{display:grid;place-items:center;width:100%;min-width:0;height:44px;border:0;background:transparent;padding:0;border-radius:50%}
.doodle-swatch::before{content:"";display:block;width:28px;height:28px;background:var(--c);border-radius:50%;border:2px solid white;box-shadow:0 0 0 1px #c9aebb}
.doodle-swatch[aria-pressed=true]::before{box-shadow:0 0 0 2px #926b81,0 0 0 4px white}
/* CR-033: one subtle paper edge, with no decorative frame around it. */
.doodle-paper-wrap{position:relative;min-width:0}
.doodle-paper{box-sizing:border-box;position:relative;background:#FFFFFF;border:1px solid #e5d7d4;overflow:hidden;aspect-ratio:1200 / 760}
.doodle canvas{display:block;width:100%;height:100%;touch-action:none}
/* CR-035: native, fixed-size cursors only on paper when a hovering fine pointer is available. */
@media (any-hover:hover) and (any-pointer:fine){
  .doodle canvas[data-doodle-tool=pen]{cursor:url('./cursors/doodle-pencil.svg') 4 24,crosshair!important}
  .doodle canvas[data-doodle-tool=eraser]{cursor:url('./cursors/doodle-eraser.svg') 14 24,crosshair!important}
}
.doodle-lower{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-top:15px;flex-wrap:wrap}
.doodle-note,.doodle-help,.doodle-status{font-size:.875rem;overflow-wrap:anywhere;margin:0;color:#805e73}
.doodle-note{flex:1 1 250px}
.doodle-action{border:1.5px solid #be9cac;background:white;border-radius:9px;padding:10px 14px;font-size:.875rem!important;font-weight:800!important;min-height:44px}
.doodle-action.primary{background:#f2d1de;border-color:#b989a1}
.doodle button:disabled{opacity:.45;cursor:default!important}
.doodle-status{margin-top:12px;min-height:1.65em}
.doodle-help{margin-top:8px}.doodle-help a{display:inline-flex;align-items:center;min-height:44px;font-weight:800}
.doodle-status:empty{margin:0;min-height:0}
.doodle-external p{margin:0 0 14px}
.doodle-address-label{display:block;font-size:.875rem;margin-block:16px 12px}
.doodle-address{display:block;width:100%;min-height:44px;margin-top:6px;padding:8px 10px;font:inherit;color:inherit;background:#fff;border:1px solid #d7b7c4;border-radius:9px;-webkit-user-select:text;user-select:text}
.doodle-address:focus-visible{outline:3px solid #ad71ce;outline-offset:4px}
.doodle-external .doodle-status{margin:12px 0 0}
.doodle-dialog{max-width:min(360px,calc(100% - 32px));padding:24px;border:2px solid #ac7f91;border-radius:14px;background:#fffaf8;color:#805b6d;box-shadow:5px 6px 0 #805b6d33}
.doodle-dialog::backdrop{background:#53364966}.doodle-dialog h2{font-size:1.2rem;margin:0 0 8px}.doodle-dialog p{margin:0 0 18px;font-size:1rem}
#etc-archive{margin-top:32px}
@media (max-width:600px){
  .doodle-intro h1{font-size:24px}
  .doodle-workspace{padding:11px}.doodle-bar{padding:10px 12px}.doodle-bar small{display:none}
  .doodle-actions{width:100%}.doodle-actions .doodle-action{flex:1;padding-inline:8px}
}

@media (max-width:360px){.doodle-swatch::before{width:22px;height:22px}}

/* CR-029: enlarge only Etc.'s mobile sheet; keep every tool's touch height. */
@media (max-width:880px){
  #page-etc>.content{padding-inline:12px}
  #page-etc .page-intro{margin-bottom:18px}
  .doodle-workspace{padding:10px 8px}
  .doodle-toolbar{gap:4px 8px;margin-bottom:6px}
  .doodle-tools{gap:4px}
  .doodle-toolbar .doodle-label{display:none}
  .doodle-colors{margin-bottom:8px}
  .doodle-colors>.doodle-label{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
  .doodle-paper-wrap{margin-inline:6px}
  .doodle-paper{aspect-ratio:1 / 1}
  .doodle-lower{gap:6px;margin-top:10px}
  .doodle-note{flex-basis:100%;font-size:.75rem}
  .doodle-actions{width:100%}
  .doodle-actions .doodle-action{flex:1}
  .doodle-status:empty{margin:0;min-height:0}
}
