/* The user's crayon world: pink, plum, bright pigment and a meadow. */
:root, :root[data-theme="light"] {
  --paper: #f9cedb;
  --ink: #352737;
  --muted: #705361;
  --line: #b98c9e;
  --surface: #f3bacd;
  --accent: #2846a5;
  --overlay: rgba(249,206,219,.98);
  --plate: #f5f3eb;
  --plate-ink: #65565f;
  --meadow-filter: none;
}
:root[data-theme="dark"] {
  --paper: #2d242e;
  --ink: #f5d9e3;
  --muted: #e3c9d6;
  --line: #826979;
  --surface: #443442;
  --accent: #f3aac5;
  --overlay: rgba(45,36,46,.98);
  --plate: #3b323c;
  --plate-ink: #d3becb;
  --meadow-filter: brightness(.33) saturate(.65);
}
:root {
  /* The 3:1 meadow is always drawn edge to edge, so its height follows the width. */
  --meadow-height: max(480px, 33.4vw);
  /* Plum crayon marks drawn by portfolio/make-crayon-marks.py; site.css colours them. */
  --crayon-underline: url('/portfolio/marks/crayon-underline.d5719694f5af.png');
  --crayon-ring: url('/portfolio/marks/crayon-ring.39b85b7cef62.png');
  --crayon-ring-wide: url('/portfolio/marks/crayon-ring-wide.3d6dc97b21a9.png');
  --crayon-rule: url('/portfolio/marks/crayon-rule.58ddf4a50044.png');
  --crayon-frame: url('/portfolio/marks/crayon-frame.556832c47b67.png');
  --crayon-edge: url('/portfolio/marks/crayon-edge.860e2bf48165.png');
}
body { position: relative; isolation: isolate; min-height: 100svh; }
/* The meadow is the ground at the foot of every page and, on Home, under the
   companions. It scrolls with the page, so its outline never crosses text. */
body::before, .painted-entry::before {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: var(--meadow-height);
  z-index: -1;
  pointer-events: none;
  background-image: url('/portfolio/images/optimized/meadow-2172.68585ed7bbe5.webp');
  background-image: image-set(url('/portfolio/images/optimized/meadow-2172.2e2a4b26b6c5.avif') type('image/avif'), url('/portfolio/images/optimized/meadow-2172.68585ed7bbe5.webp') type('image/webp'));
  background-repeat: no-repeat;
  background-position: center bottom;
  background-size: auto 100%;
  filter: var(--meadow-filter);
}
.painted-entry { position: relative; }
/* On Home the meadow ends above Selected work: its lower edge is coloured out
   like crayon instead of cut straight. */
.painted-entry::before {
  -webkit-mask: linear-gradient(#000 0 0) top / 100% calc(100% - 27px) no-repeat, var(--crayon-edge) left bottom / auto 28px repeat-x;
  mask: linear-gradient(#000 0 0) top / 100% calc(100% - 27px) no-repeat, var(--crayon-edge) left bottom / auto 28px repeat-x;
}
.brand { transform: rotate(-3deg); }
.section-heading h2 { transform: rotate(-2deg); transform-origin: left center; }
.page-title { transform: rotate(-2deg); transform-origin: left center; }
@media(max-width:767px) {
  :root { --meadow-height: 486px; }
}
@media print {
  body::before, .painted-entry::before, .site-header, .site-footer, .gallery-tools, .zoom-mark, .back-link, .work-pagination { display: none; }
  .drawing-tools, .stamp-picker, .tool-status, .drawing-actions, .drawing-help, .studio-invitation, .collection-outro { display: none; }
  .drawing-paper::after { display: none; }
  .painted-entry { min-height: 0; }
  .hero-scene { padding-bottom: 0; }
  :root, :root[data-theme="dark"] { --paper: white; --ink: #352737; --muted: #705361; --plate: white; }
  .wrap { padding: 0; }
  .detail-image .artwork { height: 140mm; min-height: 0; padding: 0; }
  .work-description { padding-block: 12mm; }
  .additional-image { break-inside: avoid; }
  .detail-composition { display: block; }
  .detail-composition .detail-image .artwork img { max-height: 150mm; width: auto; margin-inline: auto; }
  .detail-composition .work-description { padding-top: 12mm; }
}
