/* Hide the page scrollbar without disabling native scrolling. */
html { scrollbar-width: none; }
html::-webkit-scrollbar, body::-webkit-scrollbar { display: none; width: 0; height: 0; }
.shell { position: relative; z-index: 1; width: min(100% - 48px, 860px); margin: 0 auto; }
:root { --glass-bg: rgba(247, 245, 239, .9); --glass-line: rgba(90, 96, 80, .22); }
:root[data-theme="dark"] { --glass-bg: rgba(25, 29, 25, .9); --glass-line: rgba(210, 225, 200, .2); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) { --glass-bg: rgba(25, 29, 25, .9); --glass-line: rgba(210, 225, 200, .2); }
}
body { position: relative; isolation: isolate; }
#life { position: fixed; inset: 0; z-index: -1; width: 100%; height: 100%; pointer-events: none; opacity: .10; }
.site-header { display: flex; align-items: center; gap: 32px; padding: 27px 0; border-bottom: 1px solid var(--line); }
.brand { font: 600 23px var(--serif); letter-spacing: -.04em; text-decoration: none; }
.brand span { color: var(--accent); }
.site-header nav { display: flex; gap: 26px; margin-left: auto; font-size: 13px; }
.site-header nav a { text-decoration: none; }
.theme-button { display: grid; place-items: center; padding: 0; appearance: none; -webkit-appearance: none; flex: 0 0 40px; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 50%; background: var(--glass-bg); font-size: 19px; line-height: 1; }
.theme-button[hidden] { display: none; }
.theme-icon { display: block; width: 18px; height: 18px; border: 1.5px solid currentColor; border-radius: 50%; background: linear-gradient(90deg, currentColor 50%, transparent 50%); }
.theme-button:hover { background: var(--surface); }
.skip-link { position: fixed; top: -80px; left: 15px; z-index: 2; padding: 10px 16px; background: var(--ink); color: var(--paper); }
.skip-link:focus { top: 10px; }
.hero { padding: 58px 0 52px; }
.overline, .shelf-label { font: 500 10px var(--mono); letter-spacing: .12em; color: var(--accent); }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; }
h1 { margin: 10px 0 13px; font-size: clamp(43px, 5.5vw, 60px); line-height: 1.13; letter-spacing: -.04em; }
h1 em { color: var(--accent); font-weight: 400; }
.hero-lede { max-width: 570px; font-size: clamp(18px, 2.3vw, 21px); line-height: 1.5; }
.hero-detail { max-width: 555px; margin-top: 15px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.hello-links { display: flex; flex-wrap: wrap; gap: 10px 23px; margin-top: 22px; font-size: 12px; }
.hello-links a { text-decoration: none; border-bottom: 1px solid var(--line); }
.hello-links span { color: var(--accent); }
.life-dock { position: fixed; right: 22px; right: max(12px, env(safe-area-inset-right)); bottom: 22px; bottom: max(12px, env(safe-area-inset-bottom)); z-index: 3; width: min(240px, calc(100vw - 32px)); color: var(--ink); font-size: 12px; }
.life-dock summary { display: flex; align-items: center; gap: 9px; width: max-content; min-height: 44px; margin-left: auto; padding: 0 13px; border: 1px solid var(--glass-line); border-radius: 999px; background: var(--glass-bg); box-shadow: 0 5px 22px #00000012; backdrop-filter: blur(18px) saturate(1.5); -webkit-backdrop-filter: blur(18px) saturate(1.5); cursor: pointer; list-style: none; touch-action: manipulation; }
.life-dock summary::-webkit-details-marker { display: none; }
.life-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 11px var(--accent); }
.life-dock summary output { color: var(--muted); font: 10px var(--mono); }
.life-popover { display: grid; gap: 9px; margin-bottom: 9px; padding: 14px; border: 1px solid var(--glass-line); border-radius: 16px; background: var(--glass-bg); box-shadow: 0 12px 40px #00000018; backdrop-filter: blur(24px) saturate(1.5); -webkit-backdrop-filter: blur(24px) saturate(1.5); animation: life-appear 180ms ease-out; }
.life-popover p { color: var(--muted); font-size: 11px; }
.life-popover label { font: 10px var(--mono); color: var(--muted); }
.life-popover input { width: 100%; margin: 0; accent-color: var(--accent); }
.life-popover button { justify-self: start; min-height: 40px; padding: 5px 13px; border: 1px solid var(--glass-line); border-radius: 999px; background: var(--surface); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); font-size: 11px; touch-action: manipulation; }
@keyframes life-appear { from { opacity: 0; transform: translateY(5px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
.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; }
.content-section { padding: 27px 0 29px; border-top: 1px solid var(--line); scroll-margin-top: 20px; }
.section-head { display: flex; align-items: baseline; gap: 15px; margin-bottom: 18px; }
.section-head h2 { font-size: clamp(26px, 3.3vw, 31px); letter-spacing: -.025em; }
.section-head > span { margin-left: auto; color: var(--muted); font: 11px var(--mono); }
.work-list article { display: flex; align-items: center; gap: 18px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.work-list article:first-child { padding-top: 0; }
.work-list article:last-child { border: 0; padding-bottom: 0; }
.work-list h3 { font-size: 20px; }
.work-list p { color: var(--muted); font-size: 12px; margin-top: 3px; }
.work-list a { margin-left: auto; flex-shrink: 0; color: var(--accent); font-size: 12px; text-decoration: none; }
.section-lede { color: var(--muted); font-size: 12px; margin: -4px 0 20px; }
.shelf-label { margin-bottom: 12px; }
.book-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.book { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 10px; border: 1px solid var(--line); border-radius: 5px; background: var(--glass-bg); }
.book-cover { display: block; flex: 0 0 70px; width: 70px; max-width: 100%; overflow: hidden; border: 1px solid var(--line); border-radius: 2px; background: var(--surface); box-shadow: 2px 3px 7px #00000012; }
.book-cover img { display: block; width: 100%; height: auto; }
.book > div { min-width: 0; }
.book h4 { font-size: 13px; line-height: 1.4; font-weight: 550; }
.book p { font-size: 11px; color: var(--muted); line-height: 1.45; margin-top: 4px; }
.progress-label { display: inline-block; margin-top: 8px; color: var(--accent); font: 10px var(--mono); }
.progress-hint { margin-top: 16px; font-size: 11px; color: var(--muted); }
.next-label { margin-top: 19px; padding-top: 17px; border-top: 1px dashed var(--line); }
.up-next-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.up-next-grid .book { display: block; padding: 0; border: 0; background: transparent; }
.up-next-grid .book-cover { width: 74px; margin-bottom: 9px; }
footer { padding: 18px 0 30px; border-top: 1px solid var(--line); }
.footer-personal { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.footer-personal h2 { font-size: 21px; margin-bottom: 4px; }
.footer-personal p { color: var(--muted); font-size: 11px; }
#sprout-status { margin-top: 4px; }
.sprout-button { flex: 0 0 60px; display: grid; place-items: center; width: 60px; height: 88px; border: 0; background: transparent; padding: 0; }
.sprout-button img { width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; animation: sprout-float 3.8s ease-in-out infinite; }
.sprout-button.is-greeting img { animation: sprout-hop 700ms ease-out; }
@keyframes sprout-float { 50% { transform: translateY(-5px); } }
@keyframes sprout-hop { 35% { transform: translateY(-12px) rotate(-4deg); } 70% { transform: translateY(0) rotate(3deg); } }
.footer-links { display: flex; align-items: center; gap: 20px; padding-top: 10px; color: var(--muted); font-size: 11px; }
.footer-links .back { margin-left: auto; white-space: nowrap; }
@media (max-width: 650px) {
  .shell { width: min(100% - 36px, 520px); }
  .site-header { padding: 19px 0; }
  .site-header nav { gap: 17px; }
  .hero { padding: 38px 0 33px; }
  .hero-detail { font-size: 13px; }
  .life-dock { right: 12px; bottom: 12px; }
  .content-section { padding: 24px 0 25px; }
  .section-head > span { display: none; }
  .book-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 14px; }
  .book { display: block; padding: 0; border: 0; border-radius: 0; background: transparent; }
  .book-cover { width: 70px; margin-bottom: 9px; }
  .book > div { margin-top: 0; }
  .up-next-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 400px) {
  .site-header nav { gap: 12px; font-size: 11px; }
  .work-list article { align-items: flex-start; }
  .work-list a { font-size: 10px; }
  .up-next-grid { gap: 10px; }
  .up-next-grid .book-cover { width: 64px; }
  .up-next-grid h4 { font-size: 11px; }
  .up-next-grid p { font-size: 10px; }
  .footer-links { flex-wrap: wrap; }
  .footer-links .back { margin-left: 0; }
}

.brawl-detail { color: var(--muted); font-size: 13px; line-height: 1.7; }

.brawl-feature { display: flex; align-items: center; gap: 14px; }
.brawl-pet { flex: 0 0 112px; display: grid; place-items: center; width: 112px; height: 82px; padding: 0; border: 1px solid var(--glass-line); border-radius: 14px; background: var(--glass-bg); box-shadow: 0 5px 20px #0000000d; backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3); cursor: pointer; touch-action: manipulation; }
/* Keep the hit area still and give the image one transform owner. */
.brawl-pet img { display: block; width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; pointer-events: none; transform: rotateY(0deg); transition: transform 420ms cubic-bezier(.25, .8, .25, 1); }
.brawl-pet.is-turned img { transform: rotateY(180deg); }
@media (hover: hover) { .brawl-pet:hover { border-color: var(--accent); } }
.brawl-pet:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
@media (max-width: 650px) { .brawl-pet { flex-basis: 96px; width: 96px; height: 70px; } }
@media (prefers-reduced-motion: reduce) { .brawl-pet img { transition: none; } }
/* Review prototype: soften Life behind the reading column with feathered edges. */
.shell::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 -48px;
  pointer-events: none;
  background: linear-gradient(to right, transparent, var(--paper) 48px, var(--paper) calc(100% - 48px), transparent);
  opacity: .84;
}
@media (max-width: 650px) {
  .shell::before {
    inset-inline: -18px;
    background: linear-gradient(to right, transparent, var(--paper) 18px, var(--paper) calc(100% - 18px), transparent);
  }
}
/* The wrapper hops independently of the image's horizontal flip. */
.brawl-hop { display: block; width: 100%; height: 100%; pointer-events: none; }
.brawl-pet.is-greeting .brawl-hop { animation: brawl-bounce 650ms ease-out; }
@keyframes brawl-bounce {
  0%, 100% { transform: translateY(0); }
  32% { transform: translateY(-9px) rotate(-3deg); }
  68% { transform: translateY(0) rotate(2deg); }
}
@media (prefers-reduced-motion: reduce) {
  .brawl-pet.is-greeting .brawl-hop { animation: none; }
}
