:root {
  --paper: #fbf5e6;
  --desk: #e7dcc1;
  --ink: #23335a;
  --red: #b23a2e;
  --text: #2b2a33;
  --brown: #5a5348;
  --tape: rgba(232, 214, 150, .72);
  --hand: Caveat, "Segoe Print", cursive;
  --wobble: 255px 18px 225px 18px / 18px 225px 18px 255px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--desk); color: var(--text); font: 400 17px/1.6 Kalam, "Segoe Print", cursive; }
p { margin: 0 0 14px; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--ink); }
a:focus-visible, summary:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

.sheet { position: relative; max-width: 560px; min-height: 100vh; margin: 0 auto; padding: 18px 22px 36px 36px; background: var(--paper); box-shadow: 0 0 40px rgba(60, 40, 10, .2); overflow: hidden; }
.sheet::before { content: ""; position: absolute; top: 0; bottom: 0; left: 18px; width: 2px; background: rgba(178, 58, 46, .3); }

h1, h2, h3, .brand, .hello, .title { margin: 0; font-family: var(--hand); font-weight: 700; color: var(--ink); }
h1 { font-size: 46px; line-height: 1; margin-bottom: 14px; }
h2 { font-size: 38px; line-height: 1.05; margin-bottom: 12px; }
.wavy { text-decoration: underline wavy var(--red) 2px; text-underline-offset: 7px; }

hr { height: 10px; margin: 38px 0 34px; border: 0; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='10'%3E%3Cpath d='M0 5q10-6 20 0t20 0' fill='none' stroke='%23b23a2e' stroke-width='1.6' opacity='.55'/%3E%3C/svg%3E") repeat-x center; }

.top { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.avatar { width: 56px; height: 56px; border-radius: 50%; border: 2px solid var(--ink); }
.brand { font-size: 28px; line-height: 1; }
.tagline { margin: 2px 0 0; font-size: 14px; color: var(--brown); }

.hello { font-size: 28px; color: var(--red); transform: rotate(-2deg); transform-origin: left; }
.lead { font-size: 18px; }
.or { margin: 12px 0 0; text-align: center; font-size: 16px; }
.tags { margin: 18px 0 0; text-align: center; font-size: 15px; color: var(--brown); }

.btn { display: flex; align-items: center; justify-content: center; min-height: 58px; padding: 8px 12px; font: 700 clamp(21px, 6.6vw, 27px)/1.05 var(--hand); text-align: center; white-space: nowrap; text-decoration: none; color: var(--paper); background: var(--red); border-radius: var(--wobble); box-shadow: 2px 4px 0 rgba(35, 51, 90, .28); }
.btn.blue { background: var(--ink); box-shadow: 2px 4px 0 rgba(178, 58, 46, .35); }
.btn:active { transform: translate(1px, 2px); box-shadow: 1px 2px 0 rgba(35, 51, 90, .28); }
.btn[aria-disabled="true"] { color: var(--brown); background: none; border: 2px dashed var(--brown); box-shadow: none; }
.btn s { opacity: .75; text-decoration-thickness: 2px; }
.price::before { content: " · "; white-space: pre; }

.polaroid { position: relative; max-width: 320px; margin: 40px auto 0; padding: 10px 10px 12px; background: #fff; box-shadow: 0 8px 20px rgba(60, 40, 10, .24); transform: rotate(-1.6deg); }
.polaroid::before { content: ""; position: absolute; top: -14px; left: 50%; width: 112px; height: 28px; margin-left: -56px; background: var(--tape); box-shadow: 0 1px 2px rgba(0, 0, 0, .1); transform: rotate(-3deg); }
.polaroid figcaption { padding-top: 10px; font: 700 25px/1.1 var(--hand); text-align: center; color: var(--ink); }
.polaroid.small { max-width: 220px; margin-top: 14px; transform: rotate(2deg); }

.stamp { display: inline-block; margin-bottom: 14px; padding: 9px 16px; font: 700 14px/1 Kalam, cursive; letter-spacing: .14em; text-transform: uppercase; color: var(--red); border: 2.5px solid var(--red); border-radius: 50%; transform: rotate(-6deg); }
.title { font-size: 30px; line-height: 1.1; color: var(--red); margin-bottom: 8px; }
.facts { font-size: 15px; color: var(--brown); }

.cover { position: relative; width: 220px; margin: 18px auto 20px; border-radius: 3px 7px 7px 3px; overflow: hidden; box-shadow: -3px 0 0 rgba(35, 51, 90, .5), 0 10px 22px rgba(60, 40, 10, .3); transform: rotate(2deg); }
.cover-title { position: absolute; top: 12%; left: 16%; width: 58%; margin: 0; font: 700 21px/.95 var(--hand); text-align: center; color: var(--ink); transform: rotate(-2deg); }
.cover-title small { display: block; margin-top: 6px; font-size: 15px; color: var(--red); }
.book .facts { text-align: center; }
.chapters { margin: 0 0 14px; padding: 0; list-style: none; font: 700 26px/1.25 var(--hand); color: var(--ink); }
.chapters li::before { content: "✓ "; color: var(--red); }
.favourites { margin-bottom: 20px; }

.note { margin: 26px 0 0; padding: 0 2px; font-size: 18px; line-height: 32px; background: repeating-linear-gradient(transparent 0 31px, rgba(35, 51, 90, .16) 31px 32px) 0 -7px; }
.note p { margin: 0 0 32px; }
.note footer { font: 700 32px/32px var(--hand); text-align: right; color: var(--ink); }

.mini-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 20px 0 0; padding: 0; list-style: none; }
.mini-grid li { display: flex; flex-direction: column; align-items: center; padding: 18px 10px 14px; text-align: center; background: #fffdf6; border: 1.5px solid rgba(35, 51, 90, .25); border-radius: 4px; box-shadow: 0 3px 8px rgba(60, 40, 10, .1); }
.mini-grid li:nth-child(odd) { transform: rotate(-.8deg); }
.mini-grid li:nth-child(even) { transform: rotate(.8deg); }
.mini-grid h3 { flex: 1; font-size: 27px; line-height: 1; margin-bottom: 14px; }
.mini-grid .btn { width: 100%; min-height: 48px; padding: 6px 4px; font-size: clamp(17px, 5.4vw, 22px); }
.mini-grid .btn[aria-disabled="true"] { font-size: 18px; line-height: 1.2; }
.mini-grid .btn[aria-disabled="true"] .price { display: block; }
.mini-grid .btn[aria-disabled="true"] .price::before { content: none; }

details { border-bottom: 1.5px dashed rgba(35, 51, 90, .3); }
summary { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; font: 700 25px/1.1 var(--hand); color: var(--ink); cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--red); }
details[open] summary::after { content: "–"; }

.bottom { margin-top: 44px; text-align: center; }
.ciao { font: 700 34px/1 var(--hand); color: var(--red); }
[hidden] { display: none !important; }
.follow { display: inline-block; margin-bottom: 18px; font-size: 18px; }
.fine { margin: 0 0 4px; font: 400 12px/1.5 system-ui, sans-serif; color: var(--brown); }
