
    :root {
      color-scheme: light;
      --ink: #49382b;
      --muted: #8a7867;
      --accent: #ad623d;
      --paper: #fff9ed;
      --back-paper: #edcfb5;
      --line: #d7cbb9;
      --turn-time: 1080ms;
      --serif: Georgia, "Palatino Linotype", "Book Antiqua", serif;
      --sans: "Trebuchet MS", "Avenir Next", Avenir, system-ui, sans-serif;
    }
    * { box-sizing: border-box; }
    html { min-height: 100%; background: #eee5d6; }
    body {
      margin: 0;
      min-width: 280px;
      min-height: 100vh;
      min-height: 100svh;
      font-family: var(--sans);
      color: var(--ink);
      background:
        radial-gradient(ellipse at 50% 8%, #fffdf6 0%, #f3ebdf 45%, #e7ddce 100%);
      -webkit-font-smoothing: antialiased;
      -webkit-tap-highlight-color: transparent;
    }
    button { font: inherit; color: inherit; }
    button, a { touch-action: manipulation; }
    button { cursor: pointer; }
    button:disabled { cursor: default; }
    button:focus-visible, [tabindex]:focus-visible, a:focus-visible {
      outline: 3px solid #517269;
      outline-offset: 5px;
    }
    button svg { pointer-events: none; flex: 0 0 auto; }
    .sr-only {
      position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
      overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
    }
    [hidden] { display: none !important; }
    .app-shell {
      min-height: 100vh;
      min-height: 100svh;
      display: flex;
      flex-direction: column;
      padding-bottom: max(12px, env(safe-area-inset-bottom));
    }
    .topbar {
      width: min(1220px, 100%);
      margin: 0 auto;
      padding: max(18px, env(safe-area-inset-top)) 32px 12px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 20px;
      position: relative;
      z-index: 10;
    }
    .brand {
      display: inline-flex;
      align-items: center;
      gap: 11px;
      border: 0;
      padding: 4px 0;
      background: none;
      text-align: left;
      min-height: 44px;
    }
    .brand-mark {
      width: 34px;
      height: 36px;
      color: #af704a;
      transform: rotate(-5deg);
    }
    .brand-title {
      display: block;
      font-family: var(--serif);
      font-size: 23px;
      line-height: 1.1;
      letter-spacing: -.035em;
    }
    .brand-note {
      display: block;
      margin-top: 4px;
      color: var(--muted);
      font-size: 10px;
      font-weight: 600;
      letter-spacing: .12em;
      text-transform: uppercase;
    }
    .top-actions { display: flex; gap: 8px; align-items: center; }
    .quiet-button {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      min-height: 44px;
      padding: 9px 13px;
      border: 1px solid transparent;
      border-radius: 24px;
      background: transparent;
      color: #766250;
      font-size: 13px;
      transition: background .18s, border-color .18s, color .18s;
    }
    .quiet-button:hover { background: #ffffff65; border-color: #dbcdbb; color: var(--ink); }
    .quiet-button[aria-pressed="true"] { background: #e4eade; border-color: #b5c3a8; color: #496249; }
    .quiet-button:disabled { opacity: .42; }
    .quiet-button svg { width: 19px; height: 19px; }
    .reader {
      flex: 1;
      width: 100%;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      padding: 8px 24px 0;
      overflow: hidden;
    }
    .chapter-kicker {
      min-height: 22px;
      margin: 0 0 12px;
      color: var(--muted);
      text-transform: uppercase;
      letter-spacing: .2em;
      font-size: 10px;
      font-weight: 700;
      line-height: 22px;
    }
    .stage {
      width: min(1100px, calc(100vw - 80px), max(700px, calc((100svh - 278px) * 1.6)));
      aspect-ratio: 8 / 5;
      position: relative;
      perspective: 2400px;
      perspective-origin: 52% 46%;
      isolation: isolate;
      touch-action: pan-y pinch-zoom;
      user-select: none;
      -webkit-user-select: none;
      transition: opacity 180ms ease, translate 180ms ease;
    }
    .reader.is-cover .stage, .reader.is-finale .stage {
      width: min(480px, calc(100vw - 48px), max(350px, calc((100svh - 275px) * .8)));
      aspect-ratio: 4 / 5;
    }
    .stage.changing-next { opacity: 0; translate: -12px 0; }
    .stage.changing-prev { opacity: 0; translate: 12px 0; }
    .stage.changing-soft { opacity: 0; translate: 0 3px; }
    .book-spread { position: absolute; inset: 0; transform-style: preserve-3d; }
    .book-spread::after {
      content: "";
      position: absolute;
      width: 102%;
      height: 93%;
      left: -1%;
      top: 7%;
      background: #6e503528;
      filter: blur(25px);
      border-radius: 50%;
      transform: translateZ(-12px);
      pointer-events: none;
      z-index: -2;
    }
    .board {
      position: absolute;
      top: 0;
      width: 50%;
      height: 100%;
      border: 1px solid #d6c3a8;
    }
    .left-board {
      left: 0;
      border-radius: 13px 0 0 13px;
      background: var(--back-paper);
      box-shadow: -3px 4px 0 #d9c5aa, -5px 7px 0 #c8b495, -6px 14px 24px #65452616;
    }
    .right-board {
      left: 50%;
      border-radius: 0 13px 13px 0;
      background: var(--paper);
      box-shadow: 3px 3px 0 #efe4cf, 5px 6px 0 #dacbb0, 7px 8px 0 #d2bf9f, 8px 15px 24px #65452618;
    }
    .left-board::after, .right-board::after {
      content: "";
      position: absolute;
      inset: 0;
      border-radius: inherit;
      background:
        repeating-linear-gradient(3deg, #fff4 0 1px, transparent 1px 4px),
        linear-gradient(90deg, transparent 85%, #7e583520 100%);
      opacity: .2;
      pointer-events: none;
    }
    .right-board::after { background: linear-gradient(90deg, #7e583515, transparent 9%); opacity: 1; }
    .spine {
      position: absolute;
      top: 0; bottom: 0; left: calc(50% - 1px); width: 3px;
      background: #91724d3b;
      box-shadow: -5px 0 9px #77512612, 5px 0 8px #77512612;
      z-index: 4;
      pointer-events: none;
    }
    .left-inner {
      position: absolute;
      inset: 9% 12%;
      color: #695342;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: space-between;
      text-align: center;
    }
    .left-small-title {
      font-size: 10px;
      font-weight: 700;
      letter-spacing: .24em;
      text-transform: uppercase;
      opacity: .65;
    }
    .left-poem { position: absolute; top: 62%; left: 0; right: 0; font-family: var(--serif); font-size: clamp(20px, 2.8vw, 33px); line-height: 1.6; font-style: italic; }
    .left-poem span { display: block; }
    .left-ornament { width: 68px; height: 58px; margin-bottom: 22px; opacity: .5; }
    .left-bottom { font-size: 11px; letter-spacing: .04em; opacity: .72; line-height: 1.7; }
    .page {
      position: absolute;
      top: 0; left: 50%; width: 50%; height: 100%;
      container-type: inline-size;
    }
    .reveal-page { overflow: hidden; border-radius: 0 12px 12px 0; }
    .scene-image {
      position: absolute;
      left: 8.333333%;
      top: 3.888889%;
      width: 83.333333%;
      height: 66.666667%;
      object-fit: contain;
      pointer-events: none;
      -webkit-user-drag: none;
      mix-blend-mode: multiply;
    }
    .page-caption {
      position: absolute;
      left: 8%; right: 8%; top: 73%;
      display: flex;
      flex-direction: column;
      align-items: center;
      text-align: center;
      font-family: var(--serif);
      line-height: 1.16;
      letter-spacing: .005em;
      color: var(--ink);
      pointer-events: none;
    }
    .caption-lead { display: block; font-size: clamp(18px, 5.2cqw, 35px); font-weight: 400; margin-bottom: 8px; }
    .caption-word { display: block; font-size: clamp(31px, 10cqw, 66px); font-weight: 600; letter-spacing: .035em; }
    .caption-word .initial { color: var(--accent); }
    .caption-punctuation { color: var(--ink); letter-spacing: 0; }
    .caption-tail { font-size: .66em; letter-spacing: 0; }
    .page-no {
      position: absolute;
      bottom: 4%;
      right: 7%;
      font-size: clamp(10px, 2.5cqw, 15px);
      font-family: var(--serif);
      color: #ad9b84;
      pointer-events: none;
    }
    .turning-leaf {
      position: absolute;
      top: 0; left: 50%; width: 50%; height: 100%;
      transform-origin: 0% 50%;
      transform-style: preserve-3d;
      transform: rotateY(0deg);
      transition: transform var(--turn-time) cubic-bezier(.2, .7, .25, 1);
      z-index: 7;
      will-change: transform;
      container-type: inline-size;
    }
    .turning-leaf.is-open { transform: rotateY(-180deg); }
    .turning-leaf.is-dragging { transition: none !important; }
    .leaf-face {
      position: absolute;
      inset: 0;
      backface-visibility: hidden;
      -webkit-backface-visibility: hidden;
      transform-style: flat;
      pointer-events: none;
    }
    .leaf-front { transform: translateZ(.35px); }
    .leaf-back { transform: rotateY(180deg) translateZ(.35px); }
    .paper-svg {
      position: absolute;
      inset: 0;
      display: block;
      width: 100%;
      height: 100%;
      overflow: visible;
      filter: drop-shadow(2px 4px 2px #63452520);
      pointer-events: none;
    }
    .leaf-back .paper-svg { filter: drop-shadow(-2px 3px 2px #63452518); }
    .turn-corner {
      position: absolute;
      width: 33px; height: 33px;
      right: 0; bottom: 0;
      border-radius: 0 0 10px 0;
      overflow: hidden;
      opacity: .7;
    }
    .turn-corner::after {
      content: "";
      position: absolute;
      width: 46px; height: 46px;
      left: 12px; top: 12px;
      transform: rotate(45deg);
      background: linear-gradient(135deg, #e0ceb0, #fffaf0 65%);
      box-shadow: -1px -1px 3px #8d6c4830;
    }
    .back-caption {
      position: absolute;
      left: 9%; right: 9%; bottom: 12%;
      text-align: center;
      color: #5d4837;
      font-family: var(--serif);
    }
    .back-caption p { margin: 0 0 12px; font-size: clamp(15px, 4cqw, 25px); font-style: italic; opacity: .8; }
    .back-pair { display: flex; gap: 12px; justify-content: center; align-items: center; font-size: clamp(18px, 6cqw, 37px); letter-spacing: .03em; }
    .back-pair b { font-weight: 500; }
    .back-pair .initial { color: var(--accent); }
    .back-pair .pair-dot { opacity: .35; font-size: .65em; }
    .closed-book {
      position: absolute;
      inset: 0;
      border-radius: 12px;
      container-type: inline-size;
      background: transparent;
      box-shadow: 3px 4px 0 #ded0b8, 5px 7px 0 #c9b18c, 8px 20px 45px #72502d22;
      overflow: hidden;
    }
    .closed-book::after {
      content: "";
      position: absolute;
      inset: 13px 12px 13px 16px;
      border: 1px solid #aa784c37;
      border-radius: 5px;
      pointer-events: none;
      z-index: 2;
    }
    .closed-book .scene-image { z-index: 0; }
    #coverImage { top: 21.888889%; left: 19.583333%; }
    .closed-book .paper-svg { z-index: 1; filter: none; }
    #finaleView { background: #f6ebd7; }
    #finaleImage { top: 18%; z-index: 2; }
    .cover-spine {
      position: absolute;
      top: 0; left: 0; bottom: 0; width: 16px;
      background: linear-gradient(90deg, #b3814e26, #ffe8cb10 55%, #8d5d3220 80%, transparent);
      z-index: 3; pointer-events: none;
    }
    .cover-title {
      position: absolute;
      top: 8.2%; left: 12%; right: 10%;
      margin: 0;
      z-index: 3;
      color: #593b24;
      font-family: var(--serif);
      text-align: center;
      font-size: clamp(39px, 11.6cqw, 68px);
      line-height: 1.02;
      font-weight: 500;
      letter-spacing: -.045em;
      pointer-events: none;
    }
    .cover-title span { display: block; }
    .cover-title em { font-style: normal; color: #ad623d; }
    .cover-subtitle {
      position: absolute;
      top: 76%; left: 13%; right: 11%;
      margin: 0; z-index: 3;
      font-family: var(--serif);
      font-style: italic;
      font-size: clamp(18px, 5.3cqw, 27px);
      line-height: 1.4;
      text-align: center;
      color: #7d5e43;
      pointer-events: none;
    }
    .cover-footer {
      position: absolute; bottom: 7%; left: 0; right: 0; z-index: 3;
      text-align: center; color: #94765a; font-size: 10px; font-weight: 700;
      letter-spacing: .18em; text-transform: uppercase; pointer-events: none;
    }
    .finale-title {
      position: absolute; top: 8%; left: 12%; right: 10%; z-index: 3;
      margin: 0; text-align: center; font-family: var(--serif);
      font-size: clamp(28px, 8cqw, 44px); font-weight: 400; line-height: 1.2;
      color: #68503a;
    }
    .finale-title strong { display: block; margin-top: 9px; font-size: 1.55em; letter-spacing: .02em; font-weight: 500; }
    .finale-title strong:first-letter { color: var(--accent); }
    .finale-note {
      position: absolute; top: 75%; left: 13%; right: 11%; z-index: 3;
      margin: 0; text-align: center; font-family: var(--serif); font-style: italic;
      font-size: clamp(18px, 5.1cqw, 27px); line-height: 1.4; color: #7d674f;
    }
    .controls {
      width: min(700px, calc(100% - 10px));
      display: flex;
      justify-content: center;
      align-items: center;
      gap: 24px;
      position: relative;
      z-index: 9;
      margin: 25px auto 0;
      min-height: 48px;
    }
    .nav-back {
      border: 1px solid #cabcaa;
      border-radius: 50%;
      width: 46px; height: 46px;
      padding: 12px;
      display: inline-flex; align-items: center; justify-content: center;
      background: #fffcf680;
      box-shadow: 0 2px 5px #71533306;
      transition: background .18s, opacity .18s, transform .18s;
    }
    .nav-back:hover:not(:disabled) { background: #fffdf9; transform: translateX(-2px); }
    .nav-back:disabled { opacity: .3; }
    .nav-back svg { width: 20px; height: 20px; }
    .nav-main {
      border: 1px solid #9c5735;
      border-radius: 28px;
      min-width: 188px; min-height: 48px;
      display: inline-flex; align-items: center; justify-content: center; gap: 13px;
      padding: 12px 22px 13px;
      background: #ad633e;
      color: #fffaf0;
      font-size: 14px; font-weight: 600; letter-spacing: .025em;
      box-shadow: 0 5px 12px #8d583522, inset 0 1px 0 #ffffff20;
      transition: background .18s, transform .18s, opacity .18s;
    }
    .nav-main:hover:not(:disabled) { background: #9a5634; transform: translateY(-1px); }
    .nav-main:active:not(:disabled) { transform: translateY(1px); }
    .nav-main:disabled { opacity: .7; }
    .nav-main svg { width: 20px; height: 20px; }
    .control-spacer { width: 46px; height: 46px; flex: 0 0 auto; }
    .reading-footer {
      display: flex; flex-direction: column; align-items: center;
      min-height: 67px; margin-top: 10px; gap: 6px;
    }
    .chapter-dots { display: flex; gap: 0; height: 44px; align-items: center; justify-content: center; }
    .chapter-dot {
      width: 44px; height: 44px; padding: 0; border: 0; background: transparent;
      display: inline-flex; align-items: center; justify-content: center;
    }
    .chapter-dot::before {
      content: ""; width: 6px; height: 6px; border-radius: 50%;
      background: #bfb09b;
      transition: width .2s, background .2s;
    }
    .chapter-dot[aria-current="step"]::before { width: 18px; border-radius: 5px; background: var(--accent); }
    .chapter-dot:disabled { opacity: .55; }
    .gesture-note { margin: 0; font-size: 11px; color: #9a8874; letter-spacing: .035em; text-align: center; }
    .gesture-note svg { width: 13px; height: 13px; vertical-align: -3px; margin-right: 5px; }
    .toast {
      position: fixed;
      left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); transform: translate(-50%, 15px);
      width: max-content; max-width: min(440px, calc(100% - 32px));
      padding: 14px 20px; border-radius: 15px; z-index: 100;
      color: #fff9ec; background: #4c433aeF;
      box-shadow: 0 8px 25px #31200e25; font-size: 13px; line-height: 1.45;
      opacity: 0; pointer-events: none;
      transition: opacity .2s, transform .2s;
    }
    .toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
    .chapter-dialog {
      padding: 0; border: 1px solid #d9c7ad; border-radius: 20px;
      width: min(440px, calc(100vw - 32px)); max-height: min(680px, calc(100svh - 48px));
      color: var(--ink); background: #fff9ef;
      box-shadow: 0 30px 100px #35250f40;
    }
    .chapter-dialog::backdrop { background: #493c2e55; backdrop-filter: blur(5px); }
    .dialog-inner { padding: 24px 26px 20px; }
    .dialog-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
    .dialog-top h2 { font-family: var(--serif); margin: 0; font-size: 29px; font-weight: 400; }
    .dialog-close { width: 44px; height: 44px; padding: 12px; border: 0; border-radius: 50%; background: #eee5d7; }
    .dialog-close svg { width: 20px; height: 20px; }
    .dialog-intro { color: var(--muted); font-size: 13px; line-height: 1.6; margin: 6px 0 19px; }
    .chapter-list { list-style: none; margin: 0; padding: 0; }
    .chapter-list li { border-top: 1px solid #e5d9c9; }
    .chapter-choice {
      width: 100%; display: flex; align-items: center; gap: 16px;
      background: none; border: 0; padding: 17px 4px; text-align: left;
      border-radius: 8px; min-height: 64px;
    }
    .chapter-choice:hover { background: #f4eadc; }
    .chapter-choice[aria-current="true"] { background: #eee7da; }
    .chapter-choice .number { color: #ad9981; font-family: var(--serif); width: 24px; font-size: 17px; }
    .chapter-choice .words { font-family: var(--serif); font-size: 22px; flex: 1; letter-spacing: .025em; }
    .chapter-choice .words strong { font-weight: 400; }
    .chapter-choice .words .initial { color: var(--choice-accent, var(--accent)); }
    .chapter-choice .arrow { color: #a89b87; padding: 0 8px; font-size: 16px; }
    .dialog-cover { margin-top: 10px; width: 100%; text-align: center; }
    .no-script { max-width: 500px; margin: 40px auto; padding: 30px; text-align: center; }
    @media (max-width: 760px) {
      .topbar { padding: max(12px, env(safe-area-inset-top)) 16px 7px; gap: 8px; }
      .brand-mark { width: 27px; height: 29px; }
      .brand { gap: 8px; }
      .brand-title { font-size: 20px; }
      .brand-note { font-size: 8px; letter-spacing: .1em; }
      .top-actions { gap: 0; }
      .quiet-button { padding: 10px 9px; gap: 5px; }
      .quiet-button .button-label { display: none; }
      .quiet-button svg { width: 21px; height: 21px; }
      .reader { padding: 6px 16px 0; justify-content: center; }
      .chapter-kicker { margin-bottom: 9px; font-size: 9px; letter-spacing: .17em; }
      .stage, .reader.is-cover .stage, .reader.is-finale .stage {
        width: min(540px, calc(100vw - 36px));
        aspect-ratio: 4 / 5;
        perspective: 1700px;
        perspective-origin: 5% 45%;
      }
      .left-board, .spine { display: none; }
      .right-board, .page, .turning-leaf { left: 0; width: 100%; }
      .right-board { border-radius: 10px; box-shadow: 2px 3px 0 #efe4cf, 4px 5px 0 #dacbb0, 5px 7px 0 #d2bf9f, 7px 14px 22px #65452618; }
      .reveal-page { border-radius: 10px; }
      .turning-leaf { transform-origin: 0% 50%; }
      .book-spread::after { width: 100%; left: 0; filter: blur(20px); }
      .controls { margin-top: 22px; gap: 18px; }
      .nav-main { min-width: 184px; }
      .reading-footer { min-height: 61px; margin-top: 7px; gap: 3px; }
      .gesture-note { font-size: 10px; }
      .closed-book { box-shadow: 2px 3px 0 #ded0b8, 4px 6px 0 #c9b18c, 7px 17px 35px #72502d22; }
      .cover-title { top: 8.8%; }
      .cover-footer { font-size: 8px; letter-spacing: .14em; }
      .turn-corner { width: 28px; height: 28px; }
    }
    @media (max-width: 360px) {
      .brand-note { display: none; }
      .brand-title { font-size: 19px; }
      .controls { gap: 12px; }
      .nav-main { min-width: 170px; padding-inline: 15px; }
      .nav-back, .control-spacer { width: 44px; height: 44px; }
      .caption-lead { margin-bottom: 5px; }
      .dialog-inner { padding: 20px 18px 16px; }
      .chapter-choice .words { font-size: 20px; }
    }
    @media (max-height: 560px) and (min-width: 600px) {
      .app-shell { padding-bottom: 0; }
      .topbar { padding-top: 8px; padding-bottom: 4px; }
      .brand-note { display: none; }
      .reader { display: grid; grid-template-columns: minmax(0, 1fr) 184px; grid-template-rows: auto auto auto; column-gap: 24px; align-content: center; justify-items: center; padding: 0 28px 12px; }
      .chapter-kicker { grid-column: 1; grid-row: 1; margin-bottom: 5px; }
      .stage { grid-column: 1; grid-row: 2 / span 2; width: min(calc(100vw - 290px), calc((100svh - 104px) * 1.6)); aspect-ratio: 8 / 5; perspective-origin: 52% 46%; }
      .reader.is-cover .stage, .reader.is-finale .stage { width: min(calc(100vw - 290px), calc((100svh - 104px) * .8)); aspect-ratio: 4 / 5; }
      .left-board, .spine { display: block; }
      .right-board, .page, .turning-leaf { left: 50%; width: 50%; }
      .left-poem { font-size: 18px; }
      .left-small-title, .left-bottom { font-size: 8px; }
      .left-ornament { width: 42px; height: 36px; }
      .cover-title { font-size: clamp(25px, 11.6cqw, 52px); }
      .cover-subtitle, .finale-note { font-size: clamp(13px, 5.3cqw, 22px); }
      .cover-footer { font-size: 7px; }
      .finale-title { font-size: clamp(20px, 8cqw, 38px); }
      .caption-lead { font-size: 15px; margin-bottom: 4px; }
      .caption-word { font-size: clamp(25px, 10cqw, 50px); }
      .back-caption p { font-size: 12px; margin-bottom: 7px; }
      .back-pair { font-size: 20px; gap: 6px; }
      .controls { grid-column: 2; grid-row: 2; width: 184px; margin-top: 0; display: flex; flex-wrap: wrap; gap: 12px; align-self: end; }
      .nav-main { order: 0; flex-basis: 100%; min-width: 0; padding: 13px 14px; }
      .nav-back { order: 1; }
      .control-spacer { display: none; }
      .reading-footer { grid-column: 2; grid-row: 3; width: 184px; min-height: 0; margin-top: 10px; align-self: start; }
      .chapter-dots { gap: 0; }
      .chapter-dots button { width: 30px; }
      .gesture-note { font-size: 9px; line-height: 1.5; text-align: center; }
    }
    @media (prefers-reduced-motion: reduce) {
      *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
    }
/* La carta mantiene profondità solo dentro il libro, come nell’oggetto reale. */
:root{--ink:#173330;--muted:#596f6b;--accent:#15564f;--paper:#fffdf9;--back-paper:#dfece7;--serif:Georgia,"Times New Roman",serif;--sans:Inter,ui-sans-serif,system-ui,sans-serif}
html,body{background:#f6f1e8}
body{background:#f6f1e8}
.app-shell{padding-bottom:16px;min-height:100svh}
.topbar{padding:20px 28px 10px;min-height:72px}
.brand-mark{color:#15564f;transform:none}
.brand-title{font-size:22px;color:#173330}
.brand-note{font-size:13px;letter-spacing:0;text-transform:none;font-weight:400;line-height:1.4}
.quiet-button{color:#15564f;font-size:14px;min-height:44px}
.quiet-button:hover{background:#dfece7;border-color:transparent}
.reader{padding:6px 24px 0;justify-content:flex-start;overflow:clip}
.chapter-kicker{font-size:14px;letter-spacing:0;text-transform:none;margin:0 0 16px;color:#15564f}
.stage{width:min(950px,calc(100vw - 80px),calc((100svh - 340px) * 1.6));transition:opacity 280ms ease,translate 360ms cubic-bezier(.22,1,.36,1);perspective:2600px}
.reader.is-cover .stage,.reader.is-finale .stage{width:min(360px,calc(100vw - 64px),calc((100svh - 340px) * .8))}
.stage.changing-next{translate:-7px 0}.stage.changing-prev{translate:7px 0}.stage.changing-soft{translate:0 4px}
.left-board,.right-board{border:0}
.left-board::after,.right-board::after{background:none}
.left-small-title,.left-bottom{font-size:14px;letter-spacing:0;text-transform:none;color:#173330;opacity:1}
.left-poem{font-size:clamp(20px,2.5vw,29px);font-style:normal;line-height:1.5;color:#15564f}
.left-ornament{opacity:.7;color:#15564f}
.left-small-title{max-width:20ch;line-height:1.5}
.cover-title{font-weight:500;font-size:clamp(32px,11.6cqw,52px);color:#173330}
.cover-title em{color:#15564f}
.cover-subtitle{color:#173330;font-size:clamp(19px,5.3cqw,24px);font-style:normal}
.cover-footer{font-size:13px;letter-spacing:0;text-transform:none;color:#596f6b;bottom:6%}
.cover-spine{background:#15564f18}
.closed-book::after{border:0}
#finaleView{background:#fffdf9}
.finale-title,.finale-note{color:#173330}.finale-note{font-style:normal;font-size:clamp(18px,5.1cqw,24px)}
.caption-word{color:#15564f;font-weight:600;letter-spacing:.025em}
.caption-lead{font-size:clamp(18px,5.2cqw,28px);color:#173330}
.page-no{font-family:var(--sans);color:#596f6b;font-size:13px}
.back-caption,.back-caption p{color:#173330;font-style:normal;opacity:1}
.back-pair{color:#15564f}
.controls{margin-top:24px;gap:20px}
.nav-main{background:#15564f;border:0;box-shadow:none;color:#fffdf9;font-size:15px;letter-spacing:0;min-height:50px}
.nav-main:hover:not(:disabled){background:#0d3935}
.nav-back{background:#dfece7;color:#15564f;border:0;box-shadow:none;width:48px;height:48px}
.nav-back:hover:not(:disabled){background:#fffdf9}
.adult-prompt{margin:16px auto 0;min-height:48px;max-width:620px;padding:0 8px;font-size:14px;line-height:1.6;color:#173330;text-align:center}
.reading-footer{margin-top:6px;gap:2px;min-height:0}
.chapter-dot::before{background:#abbfb7;transition:transform .2s,background .2s;width:7px;height:7px}
.chapter-dot[aria-current="step"]::before{width:7px;background:#15564f;transform:scale(1.55)}
.gesture-note{font-size:13px;color:#596f6b;letter-spacing:0;line-height:1.5;max-width:38ch}
.chapter-dialog{border:0;background:#fffdf9;color:#173330;width:min(500px,calc(100vw - 32px))}
.chapter-dialog::backdrop{backdrop-filter:none;background:#17333070}
.dialog-top h2{font-family:var(--serif);color:#173330;font-size:28px}
.dialog-intro{font-size:15px;color:#596f6b}
.chapter-list li{border:0}
.chapter-choice{padding:12px;gap:12px;min-height:60px}
.chapter-choice:hover,.chapter-choice[aria-current="true"]{background:#dfece7}
.chapter-choice .words{font-size:21px;letter-spacing:0;color:#15564f}
.chapter-choice .number{font-family:var(--sans);font-size:14px;color:#596f6b}
.dialog-close{background:#dfece7;color:#15564f}
.toast{background:#173330;color:#fffdf9;font-size:15px;bottom:18px}
@keyframes caption-arrive{from{opacity:.7;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}
@keyframes picture-awake{0%{transform:translateY(0)}45%{transform:translateY(-3px)}100%{transform:translateY(0)}}
@media(prefers-reduced-motion:no-preference){.reader.is-revealed .reveal-page .page-caption{animation:caption-arrive .55s cubic-bezier(.22,1,.36,1) both}.reader.is-revealed .reveal-page .scene-image{animation:picture-awake 1.6s ease-in-out both}}
@media(max-width:760px){
 .topbar{padding:16px 18px 8px;gap:10px;min-height:68px}.brand{gap:8px}.brand-title{font-size:20px}.brand-note{font-size:12px}.brand-mark{width:26px}
 .quiet-button .button-label{display:inline}.quiet-button{padding:8px;font-size:13px;gap:5px}
 .reader{padding:6px 16px 0}.chapter-kicker{font-size:14px;margin-bottom:14px}
 .stage,.reader.is-cover .stage,.reader.is-finale .stage{width:min(540px,calc(100vw - 36px));aspect-ratio:4/5;perspective:1900px}
 .controls{margin-top:20px;gap:12px}.nav-main{min-width:184px;padding-inline:16px}.control-spacer{display:none}
 .adult-prompt{min-height:68px;font-size:14px;margin-top:14px;max-width:44ch}
 .chapter-dots{display:grid;grid-template-columns:repeat(6,44px);height:auto}.chapter-dot{width:44px;height:40px}
 .gesture-note{font-size:13px;padding:0 8px;max-width:32ch}.reading-footer{margin-top:0}
 .cover-footer{font-size:13px;letter-spacing:0}.cover-title{top:8.8%}.brand-note{display:block}
}
@media(max-width:360px){.brand-note{font-size:11px}.brand-title{font-size:18px}.quiet-button .button-label{display:none}.controls{gap:10px}.nav-main{min-width:170px}.dialog-inner{padding:20px 16px}.chapter-choice .words{font-size:20px}}
@media(max-height:560px) and (min-width:600px){.reader{display:flex;padding:8px 24px}.stage{width:min(700px,calc(100vw - 80px))}.reader.is-cover .stage,.reader.is-finale .stage{width:300px}.controls{display:flex;width:auto;flex-wrap:nowrap;align-self:center;margin-top:20px}.reading-footer{width:auto;align-self:center}.chapter-dots{display:flex}.adult-prompt{min-height:48px}.cover-footer{font-size:13px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
/* Nell’incorporamento l’altezza segue il contenuto e la scena non salta all’apertura. */
html.is-embedded,.is-embedded body,.is-embedded .app-shell{min-height:0}
.is-embedded .app-shell{padding-bottom:24px}
.is-embedded .stage,.is-embedded .reader.is-cover .stage,.is-embedded .reader.is-finale .stage{width:min(950px,calc(100vw - 80px));aspect-ratio:8/5}
.is-embedded .closed-book{inset:auto;top:50%;left:50%;width:min(360px,50%);height:auto;aspect-ratio:4/5;transform:translate(-50%,-50%)}
@media(max-width:760px){
 .is-embedded .stage,.is-embedded .reader.is-cover .stage,.is-embedded .reader.is-finale .stage{width:min(540px,calc(100vw - 36px));aspect-ratio:4/5}
 .is-embedded .closed-book{inset:0;width:100%;height:100%;transform:none}
}
