/* Desktop heritage artwork for PDFDaily. */
.pdfdaily-margins { display: none; pointer-events: none; }
@media screen and (min-width: 1001px) and (min-height: 480px) {
  .pdfdaily-margins {
    --rail: calc((100% - min(1040px, 68%)) / 2);
    position: fixed; inset: 0; display: grid;
    grid-template-columns: var(--rail) 1fr var(--rail);
    grid-template-rows: 1fr 1fr 1fr .26fr;
    padding-block: 5vh 2vh;
    align-items: center; justify-items: center;
  }
  .pdfdaily-margins > span {
    display: block; grid-column: 1;
    width: min(72%, var(--max), var(--vh));
    background: url("art.png") no-repeat;
    opacity: .83; mix-blend-mode: multiply;
  }
  .pdfdaily-margins > span:nth-child(even) { grid-column: 3; }
  .pdfdaily-margins .motif-jaapi {
    grid-row: 1; --max: 205px; --vh: 23vh;
    aspect-ratio: 211 / 136; background-size: 856.87204% 639.70588%;
    background-position: 5.63557% 17.43869%;
  }
  .pdfdaily-margins .motif-tea {
    grid-row: 1; --max: 184px; --vh: 21vh;
    aspect-ratio: 204 / 142; background-size: 886.27451% 612.67606%;
    background-position: 93.01746% 15.52198%;
  }
  .pdfdaily-margins .motif-dhol {
    grid-row: 2; --max: 235px; --vh: 25vh;
    aspect-ratio: 242 / 164; background-size: 747.10744% 530.48780%;
    background-position: 4.02299% 51.27479%;
  }
  .pdfdaily-margins .motif-temple {
    grid-row: 2; --max: 242px; --vh: 25vh;
    aspect-ratio: 277 / 201; background-size: 652.70758% 432.83582%;
    background-position: 95.88504% 47.83259%;
  }
  .pdfdaily-margins .motif-rhino {
    grid-row: 3; --max: 280px; --vh: 31vh;
    aspect-ratio: 293 / 165; background-size: 617.06485% 527.27273%;
    background-position: 2.70627% 83.97163%;
  }
  .pdfdaily-margins .motif-rangghar {
    grid-row: 3; --max: 282px; --vh: 31vh;
    aspect-ratio: 307 / 164; background-size: 588.92508% 530.48780%;
    background-position: 96.80213% 83.00283%;
  }
  .pdfdaily-margins .motif-border-left {
    grid-row: 4; --max: 305px; --vh: 38vh;
    aspect-ratio: 313 / 50; background-size: 577.63578% 1740.00000%;
    background-position: 1.80602% 98.78049%;
  }
  .pdfdaily-margins .motif-border-right {
    grid-row: 4; --max: 305px; --vh: 38vh;
    aspect-ratio: 333 / 51; background-size: 542.94294% 1705.88235%;
    background-position: 97.89831% 98.77900%;
  }
}
/* Phone and tablet: use the desktop artwork as a compact illustrated strip. */
@media screen and (max-width: 1000px) {
  .pdfdaily-margins {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    align-items: center;
    gap: clamp(5px, 1.5vw, 12px);
    max-width: 540px;
    margin: 0 auto 12px;
    padding: 0 6px;
    pointer-events: none;
  }

  .pdfdaily-margins > span {
    display: block;
    width: 100%;
    background-image: url("art.png");
    background-repeat: no-repeat;
    mix-blend-mode: multiply;
    opacity: .83;
  }

  .pdfdaily-margins .motif-jaapi {
    aspect-ratio: 211 / 136;
    background-size: 856.87% 639.71%;
    background-position: 5.64% 17.44%;
  }

  .pdfdaily-margins .motif-tea {
    aspect-ratio: 204 / 142;
    background-size: 886.27% 612.68%;
    background-position: 93.02% 15.52%;
  }

  .pdfdaily-margins .motif-dhol {
    aspect-ratio: 242 / 164;
    background-size: 747.11% 530.49%;
    background-position: 4.02% 51.13%;
  }

  .pdfdaily-margins .motif-temple {
    aspect-ratio: 277 / 201;
    background-size: 652.71% 432.84%;
    background-position: 95.89% 47.83%;
  }

  .pdfdaily-margins .motif-rhino {
    aspect-ratio: 293 / 165;
    background-size: 617.06% 527.27%;
    background-position: 2.71% 83.97%;
  }

  .pdfdaily-margins .motif-rangghar {
    aspect-ratio: 307 / 164;
    background-size: 588.93% 530.49%;
    background-position: 96.80% 83.00%;
  }

  .pdfdaily-margins .motif-border-left,
  .pdfdaily-margins .motif-border-right {
    display: none;
  }
}

@media screen and (max-width: 680px) {
  main {
    width: calc(100% - 24px);
    padding-top: 10px;
  }

  .brand {
    gap: 10px;
    margin-bottom: 6px;
  }

  .brand h1 { font-size: 34px; }
  .brand .gamosa { width: 52px; }
  .workspace { padding: 12px; }

  /* Swipe sideways to reach all five tools. */
  .modes {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    overflow-x: auto;
    padding: 2px 2px 8px;
    margin-bottom: 12px;
    scrollbar-width: thin;
  }

  .modes button {
    flex: 0 0 auto;
    min-height: 44px;
    padding: 6px 11px;
    font-size: 14px;
    white-space: nowrap;
  }

  .drop {
    padding: 14px 10px;
    gap: 5px;
  }

  .drop .upload-icon { display: none; }
  .panel { padding: 14px; }
}