* {
    box-sizing: border-box;
  }
  
  body {
    margin: 0;
    color: #342b25;
    background: #e9e2d8;
    font-family: Georgia, "Times New Roman", serif;
  }
  
  button,
  input {
    font: inherit;
  }
  
  button {
    cursor: pointer;
  }
  
  button:focus-visible,
  input:focus-visible,
  a:focus-visible {
    outline: 3px solid #8e573b;
    outline-offset: 4px;
  }
  
  button:disabled {
    opacity: 0.3;
    cursor: default;
  }
  
  a {
    color: #70452f;
  }
  
  .eyebrow {
    font-family: Arial, sans-serif;
    font-size: 0.7rem;
    font-weight: bold;
    letter-spacing: 0.16em;
    text-transform: uppercase;
  }
  
  .login-screen {
    min-height: 100svh;
    display: grid;
    place-items: center;
    padding: 24px;
  }
  
  .login-card {
    width: min(100%, 420px);
    padding: 36px;
    border-radius: 16px;
    background: #fffaf2;
    box-shadow: 0 20px 65px #342b2518;
  }
  
  .login-card h1 {
    font-size: 2.4rem;
    font-weight: normal;
  }
  
  .login-card p {
    line-height: 1.6;
  }
  
  .login-card form {
    display: grid;
    gap: 12px;
    margin-top: 28px;
  }
  
  .login-card input {
    width: 100%;
    padding: 12px;
    border: 1px solid #cabaa8;
    border-radius: 6px;
    background: white;
  }
  
  .primary-button {
    padding: 13px 18px;
    border: 0;
    border-radius: 6px;
    color: white;
    background: #70452f;
  }
  
  .toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    max-width: 900px;
    margin: auto;
    padding: 20px;
  }
  
  .toolbar button {
    padding: 8px 14px;
    border: 1px solid #b7a694;
    border-radius: 6px;
    background: transparent;
  }
  
  .reader {
    padding: 0 16px 30px;
  }
  
  .reader-hint,
  .page-status {
    text-align: center;
    font-family: Arial, sans-serif;
    font-size: 0.85rem;
    color: #6b5e51;
  }
  
  .reader-hint {
    margin-bottom: 24px;
  }
  
  .book-shell {
    position: relative;
    width: 100%;
    max-width: 460px;
    margin: auto;
    box-shadow: 0 24px 60px #342b2533;
  }
  
  #book {
    width: 100%;
  }
  
  .page {
    overflow: hidden;
    background: #fffaf0;
    border: 1px solid #ddcfbc;
  }
  
  .page-content {
    height: 100%;
    padding: clamp(20px, 6vw, 38px);
    padding-bottom: 76px;
    overflow-y: auto;
  }
  
  .page h1 {
    margin-top: 28px;
    font-size: clamp(2rem, 7vw, 3.2rem);
    font-weight: normal;
  }
  
  .page h2 {
    font-size: clamp(1.5rem, 5vw, 2rem);
    font-weight: normal;
  }
  
  .page p {
    line-height: 1.65;
  }
  
  .page img {
    display: block;
    width: 100%;
    max-height: 260px;
    object-fit: contain;
    margin: 20px 0;
    border-radius: 3px;
  }
  
  .cover {
    background: #614738;
    color: #fff6e6;
  }
  
  .cover .page-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  
  .corner-button {
    position: absolute;
    bottom: 0;
    z-index: 100;
    width: 64px;
    height: 64px;
    border: 0;
    color: #513b2c;
    font-size: 1.6rem;
  }
  
  .next {
    right: 0;
    border-radius: 24px 0 0 0;
    background: linear-gradient(135deg, #f3e6d2, #d9bfa0);
  }
  
  .previous {
    left: 0;
    border-radius: 0 24px 0 0;
    background: #eadcc8;
  }
  
  .page-status {
    margin-top: 24px;
  }
  [hidden] {
    display: none !important;
  }
  
  .book-shell.exploding {
    pointer-events: none;
    animation: book-disappear 650ms ease-in forwards;
  }
  
  .explosion-layer {
    position: fixed;
    inset: 0;
    z-index: 1000;
    pointer-events: none;
    overflow: hidden;
  }
  
  .paper-piece {
    position: absolute;
    width: var(--size);
    height: var(--size);
    background: var(--paper-color);
    border-radius: 2px;
    box-shadow: 0 2px 6px #342b2526;
    animation: paper-explode 950ms ease-out forwards;
  }
  
  .ending {
    max-width: 460px;
    margin: 60px auto;
    padding: 40px 24px;
    text-align: center;
  }
  
  .ending h2 {
    margin-bottom: 28px;
    font-size: 2rem;
    font-weight: normal;
  }
  
  @keyframes book-disappear {
    0% {
      transform: scale(1);
      opacity: 1;
    }
  
    20% {
      transform: scale(1.04) rotate(-2deg);
      opacity: 1;
    }
  
    100% {
      transform: scale(0.6) rotate(7deg);
      opacity: 0;
    }
  }
  
  @keyframes paper-explode {
    0% {
      transform: translate(0, 0) rotate(0);
      opacity: 0;
    }
  
    10% {
      opacity: 1;
    }
  
    100% {
      transform:
        translate(var(--travel-x), var(--travel-y))
        rotate(var(--rotation));
      opacity: 0;
    }
  }
  
  @media (prefers-reduced-motion: reduce) {
    .book-shell.exploding {
      animation: none;
      opacity: 0;
    }
  
    .paper-piece {
      animation: none;
    }
  }

  /* Green and orange theme */
body {
    color: #173d2b;
    background: #dcebdd;
  }
  
  a {
    color: #245c3e;
  }
  
  button:focus-visible,
  input:focus-visible,
  a:focus-visible {
    outline-color: #e97824;
  }
  
  .login-card {
    background: #f0f7e9;
    box-shadow: 0 20px 65px #173d2b20;
  }
  
  .login-card input {
    color: #173d2b;
    background: #f8fcf4;
    border-color: #8fb493;
  }
  
  .primary-button {
    color: #172d20;
    background: #ff9b45;
  }
  
  .primary-button:hover {
    background: #ffad66;
  }
  
  .toolbar button {
    color: #173d2b;
    border-color: #6e9977;
    background: #eaf4e5;
  }
  
  .reader-hint,
  .page-status {
    color: #3b654a;
  }
  
  .book-shell {
    box-shadow: 0 24px 60px #173d2b33;
  }
  
  .page {
    color: #173d2b;
    background: #edf5e5;
    border-color: #a3c19a;
  }
  
  .page .eyebrow,
  .ending .eyebrow {
    color: #a8460b;
  }
  
  .cover {
    color: #f0f7e9;
    background: #174c35;
    border-color: #103c29;
  }
  
  .cover .eyebrow {
    color: #ffad66;
  }
  
  .corner-button {
    color: #173d2b;
  }
  
  .next {
    background: linear-gradient(135deg, #ffbd73, #f38630);
  }
  
  .previous {
    background: #bed9ad;
  }
  
  .paper-piece {
    box-shadow: 0 2px 6px #173d2b26;
  }

  
