.drawing-page { --desk-ink: #32372f; --paper-edge: #b5b5a6; }
.drawing-page [hidden] { display: none !important; }
.draw-heading { margin: 1.5rem 0; }
.draw-heading h1 { margin-bottom: .35rem; }
.draw-heading p { margin: 0; }
.drawing-desk { margin-inline: auto; max-width: 55rem; padding: clamp(.6rem, 1.8vw, 1.25rem); border: 1px solid #c4a581; border-radius: 1.3rem; background: #e5c8a5; box-shadow: 0 5px 0 #b1916f; }
.artboard { position: relative; background: #fffdf6; border: 1px solid var(--paper-edge); border-radius: .4rem .4rem .65rem .4rem; box-shadow: 1px 2px 0 #ece5d3, 2px 3px 0 var(--paper-edge); overflow: hidden; }
.paper-binding { height: 1.25rem; border-bottom: 1px dashed #d5ccba; background: radial-gradient(circle, #b29373 0 2px, #806f59 2.4px, transparent 3px) 0 2px/22px 14px repeat-x; }
#paper { display: block; width: 100%; height: auto; touch-action: none; user-select: none; -webkit-user-select: none; cursor: crosshair; }
.paper-caption { margin: 0 !important; padding: .25rem 1rem .8rem; color: var(--desk-ink); font: 700 1.1rem/1.3 Georgia, serif; text-align: center; overflow-wrap: anywhere; }
.color-chip { width: .65em; height: .65em; border-radius: 50% 55% 45% 50%; margin-inline-end: .45em; background: #edbb5b; border: 1px solid #a7763f; display: inline-block; }
.desk-controls, .toolset, .ink-picker { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem; }
.desk-controls { justify-content: space-between; margin-top: 1rem; }
.desk-controls button, .ink-picker { min-height: 44px; padding: .6rem 1rem; font-size: .92rem; line-height: 1.25; font-family: inherit; font-weight: 700; color: #393b32; background: #fffaf1; border: 1px solid #b9a38b; border-radius: .85rem; cursor: pointer; box-shadow: 0 2px 0 #b39a7e; }
.desk-controls button:disabled { opacity: .55; cursor: default; }
.desk-controls button.major-action { color: white; background: #246151; border-color: #164e40; }
.ink-picker { cursor: default; gap: .45rem; }
.ink-picker input { width: 2rem; height: 2rem; padding: 0; border: 1px solid #877765; background: transparent; border-radius: .35rem; cursor: pointer; }
.draw-feedback { min-height: 1.5em; text-align: center; font-weight: 700; color: #255e4d; }
.sky { opacity: 0; }
.in-flight #paper { cursor: default; touch-action: auto; background: #e5f2ec; }
.in-flight #paper > rect:first-of-type { fill: #e5f2ec; }
.in-flight #dots { opacity: .12; }
.in-flight .sky { opacity: 1; }
.in-flight .flyer { transform: translateY(-16px); }
.flying-now .flyer { animation: swoop 3s ease-in-out both; }
.flying-now .wing-left { transform-origin: 281px 190px; animation: beat-left .55s ease-in-out 5 alternate; }
.flying-now .wing-right { transform-origin: 399px 190px; animation: beat-right .55s ease-in-out 5 alternate; }
.preview-stroke:not(.in-flight) .wing-left { transform-origin: 281px 190px; animation: beat-left .27s ease-in-out 2 alternate; }
.preview-stroke:not(.in-flight) .wing-right { transform-origin: 399px 190px; animation: beat-right .27s ease-in-out 2 alternate; }
@keyframes swoop { 0% {transform: translate(0,0)} 22% {transform: translate(-10px,-23px) rotate(-2deg)} 58% {transform: translate(24px,-15px) rotate(2deg)} 79% {transform: translate(8px,-38px)} 100% {transform: translateY(-16px)} }
@keyframes beat-left { to { transform: scaleY(.65) rotate(6deg); } }
@keyframes beat-right { to { transform: scaleY(.65) rotate(-6deg); } }
@media screen and (min-width: 700px) and (max-height: 850px) {
  .draw-heading { margin-block: .7rem 1rem; }
  .drawing-desk { max-width: min(55rem, 101vh); }
}
@media(max-width:510px) {
  .desk-controls, .toolset { justify-content: center; }
  .desk-controls button, .ink-picker { padding-inline: .75rem; }
  .paper-binding { height: .95rem; }
}
@media(prefers-reduced-motion:reduce) {
  .flying-now .flyer,.flying-now .wing-left,.flying-now .wing-right,.preview-stroke:not(.in-flight) .wing-left,.preview-stroke:not(.in-flight) .wing-right { animation: none; }
}
@media print {
  .drawing-page { background: white; }
  .drawing-page header,.desk-controls,.draw-feedback,.paper-binding,.draw-heading p {display: none !important;}
  .drawing-page main { margin: 0; max-width: none; }
  .drawing-desk,.artboard { padding: 0; background: white; box-shadow: none; border: 0; }
  #dots,.sky,#outlines { display: none; }
  .flyer,.wing-left,.wing-right { animation: none !important; transform: none !important; }
  #paper { max-height: 65vh; }
  #paper > rect:first-of-type { fill: white; }
}
