/* The paper dog page, on top of app.css and about/about.css (header, footer, tape, headings, buttons, polaroids). */

/* ---------------------------------------------------------------- hero: what it is, and the download */

.pd-hero .ab-h1 { white-space: pre-line; }   /* the title breaks where its string says */
.pd-hero .ab-lead { margin-bottom: 22px; }
.pd-hero .ab-hero-cap small { display: block; margin-top: 2px; font-size: 12px; }
.pd-get { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
/* the edition switch: on the page's sky the app's pale track disappears, so here it is white with a ring */
.pd-ed { align-self: flex-start; background: rgba(255, 255, 255, 0.85); box-shadow: 0 0 0 2px var(--sky-2); }
.pd-ed button { font-family: inherit; padding: 7px 18px; font-size: 14.5px; transition: background 0.15s, color 0.15s; }
.pd-ed button:hover:not(.on) { color: var(--deep); }
.pd-ed button.on { background: var(--sky-1); color: var(--deep); box-shadow: inset 0 0 0 1.5px var(--blue); }
.pd-ed-hint { margin: 0; max-width: 34em; font-size: 14px; line-height: 1.7 !important; color: var(--muted); }
.pd-btns { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 4px; }
.pd-btns .btn:not(.primary) { box-shadow: 0 0 0 1.5px var(--sky-2); }
.pd-meta { margin: 0; font-size: 13.5px; line-height: 1.6 !important; color: var(--muted); font-variant-numeric: tabular-nums; }
.pd-failed { margin: 0; color: var(--danger); }

/* ---------------------------------------------------------------- the eight pages */

.pd-sheets { max-width: 1040px; margin-left: auto; margin-right: auto; }
.pd-sheet { width: 100%; border: 0; font: inherit; text-align: left; cursor: zoom-in; }
.pd-sheet img { display: block; aspect-ratio: 1000 / 1414; background: #fff; box-shadow: 0 0 0 1px var(--line); }
.pd-sheet .ab-tile-strip { flex-direction: row; align-items: baseline; gap: 8px; }
.pd-sheet .ab-tile-strip span { flex: none; padding: 1px 8px; border-radius: 999px; background: var(--sky-1); color: var(--deep); font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- what you need, how to print, tips */

.pd-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px; max-width: 940px; margin: 34px auto 0; }
.pd-card { position: relative; padding: 26px 24px 22px; border-radius: 18px; background: #fff; box-shadow: 0 0 0 2px var(--sky-2), 0 12px 28px rgba(44, 132, 198, 0.12); }
.pd-card h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 20px; font-weight: normal; color: var(--deep); }
.pd-card .i { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pd-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; counter-reset: s; }
.pd-list li { position: relative; padding-left: 34px; font-size: 14.5px; line-height: 1.7; counter-increment: s; }
.pd-list li::before {
  position: absolute; left: 0; top: 1px; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; font-size: 13px;
}
.pd-list.num li::before { content: counter(s); background: var(--sky-1); color: var(--deep); }
.pd-list.tick li::before { content: ""; background: var(--tick-yes) center / 15px no-repeat, #d9f3e6; }
.pd-list.cloud li::before { content: ""; top: 5px; width: 24px; height: 15px; border-radius: 0; background: url("../assets/cloud_icon.webp") center / contain no-repeat; }

/* ---------------------------------------------------------------- the steps */

.pd-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 30px 22px; margin: 38px 0 0; padding: 0; list-style: none; }
.pd-step {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 12px 12px 16px; border-radius: 20px;
  background: #fff; box-shadow: 0 0 0 2px var(--sky-2), 0 12px 28px rgba(44, 132, 198, 0.12);
}
.pd-step .tape { width: 70px; height: 19px; margin-left: -35px; top: -10px; }
.pd-step-ph { position: relative; width: 100%; margin-bottom: 6px; }
.pd-step-ph img { display: block; width: 100%; height: auto; aspect-ratio: 1; border-radius: 13px; background: var(--sky-1); }
.pd-pin {   /* the step's number, pinned to the photo's corner */
  position: absolute; left: -4px; top: -4px; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(180deg, #5db7ef, var(--deep)); color: #fff; font-size: 17px; box-shadow: 0 0 0 3px #fff, 0 3px 0 3px rgba(31, 106, 163, 0.25);
}
.pd-num { padding: 1px 10px; border-radius: 999px; background: #fff0f5; color: #c95c86; font-size: 12px; letter-spacing: 1px; }
.pd-step h3 { margin: 0; font-size: 18px; font-weight: normal; line-height: 1.4; color: var(--deep); }
.pd-step p { margin: 0; font-size: 14.5px; line-height: 1.7; }

/* ---------------------------------------------------------------- the dos and don'ts */

.pd-rules { max-width: 640px; margin: 80px auto 0; padding: 18px 24px 20px; border-radius: 18px; background: #fff; box-shadow: 0 0 0 2px var(--sky-2), 0 10px 26px rgba(44, 132, 198, 0.1); }
.pd-rules-h { margin: 0 0 10px; text-align: center; font-size: 18px; font-weight: normal; color: var(--deep); }
.pd-rules ul { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.pd-rules li { position: relative; padding-left: 32px; font-size: 14.5px; line-height: 1.7; }
.pd-rules li::before {   /* a drawn tick (app.css --tick-yes) in a green circle, a cross in a pink one */
  content: ""; position: absolute; left: 0; top: 1px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--tick-yes) center / 14px no-repeat, #d9f3e6;
}
.pd-rules li.no::before { background: var(--tick-no) center / 12px no-repeat, #ffe1ea; }

/* ---------------------------------------------------------------- the viewer: one page, big */

.pd-view { width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 16px; border: 0; background: transparent; overflow: hidden; }
.pd-view[open] { display: flex; align-items: center; justify-content: center; }
.pd-view::backdrop { background: rgba(20, 60, 100, 0.45); backdrop-filter: blur(4px); }
.pd-view-box {
  position: relative; display: flex; align-items: center; gap: 30px; max-width: 100%; max-height: 100%; padding: 22px 26px 22px 22px;
  border-radius: 24px; background: #fff; box-shadow: var(--shadow-lg, 0 24px 60px rgba(20, 70, 120, 0.3));
}
.pd-shot { flex: none; display: flex; justify-content: center; }
.pd-shot img {
  display: block; width: auto; height: min(calc(100dvh - 76px), 900px); max-width: 100%; aspect-ratio: 1000 / 1414; object-fit: contain;
  border-radius: 6px; background: #fff; box-shadow: 0 0 0 1px var(--line), 0 0 0 7px var(--sky-1);
}
.pd-side { width: 250px; display: flex; flex-direction: column; gap: 10px; }
.pd-side .pd-count { align-self: flex-start; padding: 2px 11px; border-radius: 999px; background: var(--sky-1); color: var(--deep); font-size: 13px; font-variant-numeric: tabular-nums; }
.pd-side h3 { margin: 0; padding-right: 30px; font-size: 24px; font-weight: normal; line-height: 1.35; color: var(--deep); }
.pd-side .pd-meta { font-size: 13.5px; }
.pd-view-btns { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.pd-view-btns .btn { justify-content: center; }
.pd-view-btns .btn:not(.primary) { box-shadow: 0 0 0 1.5px var(--sky-2); }
.pd-hint { margin: 0; font-size: 13px; line-height: 1.6; color: var(--muted); }
.pd-round {
  display: grid; place-items: center; width: 38px; height: 38px; flex: none; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
  background: var(--sky-1); color: var(--deep); transition: background 0.15s, transform 0.15s;
}
.pd-round:hover:not(:disabled) { background: var(--sky-2); }
.pd-round:active:not(:disabled) { transform: scale(0.92); }
.pd-round:disabled { opacity: 0.4; cursor: default; }
.pd-round svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.pd-x { position: absolute; top: 12px; right: 12px; z-index: 2; }
.pd-nav { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 6px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }

@media (max-width: 1000px) {
  .pd-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 620px; margin-left: auto; margin-right: auto; }
}
@media (max-width: 900px) {
  .pd-hero .ab-hero-art { margin-left: 40px; }   /* room for the Cinnamoroll peeking in from its left */
  /* the viewer fills the screen: the page on top, the buttons under it */
  .pd-view { padding: 0; }
  .pd-view-box {
    flex-direction: column; align-items: stretch; gap: 10px; width: 100%; height: 100%; border-radius: 0;
    padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
  }
  .pd-shot { flex: 1; min-height: 0; align-items: center; }
  .pd-shot img { height: auto; max-height: 100%; box-shadow: 0 0 0 1px var(--line), 0 0 0 5px var(--sky-1); }
  .pd-side { width: 100%; gap: 6px; align-items: center; text-align: center; }
  .pd-side .pd-count { align-self: center; }
  .pd-side h3 { padding: 0; font-size: 19px; }
  .pd-view-btns { flex-direction: row; flex-wrap: wrap; width: 100%; max-width: 520px; gap: 8px; margin-top: 2px; }   /* side by side if both fit, else one under the other */
  .pd-view-btns .btn { flex: 1 1 auto; }
  .pd-view-btns .btn.big { padding: 11px 18px; font-size: 16px; }
  .pd-hint { display: none; }
  .pd-nav { margin-top: 2px; }
  .pd-x { top: 20px; right: 22px; background: rgba(255, 255, 255, 0.92); box-shadow: 0 2px 8px rgba(20, 70, 120, 0.2); }
}
@media (max-width: 820px) {
  .pd-pair { grid-template-columns: minmax(0, 1fr); max-width: 560px; }
}
@media (max-width: 600px) {
  .pd-btns { width: 100%; }
  .pd-btns .btn.big { flex: 1 1 100%; justify-content: center; padding: 13px 20px; font-size: 17px; }
  .pd-btns .btn:not(.big) { flex: 1; justify-content: center; }
  .pd-sheet .ab-tile-strip { gap: 6px; }
  .pd-sheet .ab-tile-strip span { padding: 1px 6px; font-size: 11.5px; }
  /* a step is a row: the photo on the left, the words beside it */
  .pd-steps { grid-template-columns: minmax(0, 1fr); gap: 22px; margin-top: 30px; }
  .pd-step { display: grid; grid-template-columns: 112px minmax(0, 1fr); grid-template-rows: auto auto 1fr; column-gap: 14px; row-gap: 4px; padding: 12px 14px 14px 12px; }
  .pd-step-ph { grid-row: 1 / span 3; margin: 0; }
  .pd-step .pd-num { justify-self: start; }
  .pd-step .tape { left: 68px; }
  .pd-step h3 { font-size: 17px; }
  .pd-step p { font-size: 14px; }
  .pd-rules { margin-top: 60px; padding: 16px 18px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .pd-round { transition: none; }
}
