/* Personal studio: quiet surfaces, tactile objects, motion with a purpose. */
:root {
  --c-bg: #fafaf9; --surface: #fff; --surface-soft: #f0f0ee;
  --fg: #454643; --fg-deep: #242523; --fg-deeper: #20211f;
  --fg-light: #72746e; --fg-editorial: #72746e;
  --rule: #e4e5e0; --rule-strong: #b6b9b0; --c-seal: #b9512d;
  --c-scrollbar: #dedfd9; --c-scrollbar-hover: #b5b8ae;
  --font-ui: Inter, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: "DM Mono", ui-monospace, monospace;
  --studio-ease: cubic-bezier(.22, 1, .36, 1);
}
html.dark {
  --c-bg: #171816; --surface: #20211e; --surface-soft: #272924;
  --fg: #c4c7bd; --fg-deep: #e6e8e0; --fg-deeper: #f0f1eb;
  --fg-light: #9b9e93; --fg-editorial: #9b9e93;
  --rule: #32352d; --rule-strong: #575c4f; --c-seal: #e99b74;
  --c-scrollbar: #34382e; --c-scrollbar-hover: #53594a;
}
body { font-family: var(--font-ui); }
body::before, body::after, .app-shell::after, #view::before, #view::after { display: none; }
a, button { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--c-seal); outline-offset: 5px; }
::selection { background: #ce795d30; }
.studio-skip { position: fixed; top: -80px; left: 24px; z-index: 2000; padding: 12px 20px; background: var(--fg-deeper); color: var(--c-bg); border-radius: 10px; }
.studio-skip:focus { top: 12px; }
.app-shell .nav-wrap {
  position: relative; inset: auto; z-index: 20; width: min(1120px, calc(100% - 80px)); height: auto; min-height: 104px;
  margin: 0 auto; padding: 0; display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 32px;
  border: 0; background: transparent; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none;
}
.nav-wrap::before, .nav-wrap::after { display: none; }
.nav-wrap > * { margin: 0; }
.nav-wrap .logo { position: static; display: inline-flex; align-items: center; gap: 12px; width: auto; height: auto; font: 600 18px/1 var(--font-ui); letter-spacing: -.6px; text-decoration: none; color: var(--fg-deeper); opacity: 1; }
.studio-brand-dot { color: var(--c-seal); }
.studio-brand-mark { display: flex; gap: 3px; transform: rotate(-12deg); transition: transform .35s var(--studio-ease); }
.studio-brand-mark i { display: block; width: 5px; height: 21px; border-radius: 2px; background: currentColor; }
.studio-brand-mark i:nth-child(2) { height: 28px; margin-top: -3px; }
.studio-brand-mark i:nth-child(3) { height: 16px; margin-top: 2px; }
.logo:hover .studio-brand-mark { transform: rotate(0); }
.nav-wrap .nav-right { width: auto; display: flex; align-items: center; justify-content: flex-end; gap: 4px; margin: 0; padding: 0; font-family: var(--font-ui); }
.nav-right::after, .nav-right > a[data-nav]::before, .nav-right > a[data-nav]::after { display: none; }
.nav-wrap .nav-right > a[data-nav] { display: block; width: auto; padding: 9px 13px; min-height: 36px; border: 0; border-radius: 8px; font: 450 13px/20px var(--font-ui); color: var(--fg-light); opacity: 1; transition: background .18s, color .18s; }
.nav-wrap .nav-right > a[data-nav]:hover { color: var(--fg-deeper); background: var(--surface-soft); }
.nav-wrap .nav-right > a[data-nav]:focus-visible { outline: 2px solid var(--c-seal); outline-offset: 2px; }
.nav-wrap .nav-right > a.nav-active { color: var(--fg-deeper); background: var(--surface-soft); }
.nav-wrap .nav-right > .icon-btn { width: 34px; height: 36px; padding: 8px; margin: 0; border-radius: 8px; opacity: .65; }
.nav-wrap .nav-right > [data-search] { margin-left: 12px; }
.nav-wrap .nav-right > .icon-btn:hover { background: var(--surface-soft); opacity: 1; }
.nav-wrap .nav-right > a.icon-btn { display: none; }
#view { margin-left: 0; min-height: 65vh; transform: none; filter: none; }
#view:focus { outline: 0; }
#view .page { width: 100%; max-width: 960px; margin-inline: auto; padding: 72px 40px 100px; }
#view .page::after, .article-prose::before { display: none; }
#view .prose { font-family: var(--font-ui); font-size: 16px; line-height: 1.85; }
#view .page h1, #view .page h2, #view .page h3, #view .page h4 { font-family: var(--font-ui); color: var(--fg-deeper); }
#view .page > h1 { margin: 16px 0 32px; max-width: none; font-size: clamp(34px, 4.5vw, 50px); font-weight: 550; line-height: 1.3; letter-spacing: -.045em; box-shadow: none; background: none; }
#view .page > h1::after, .article-kicker::after, .year-label::after { display: none; }
#view .studio-eyebrow { margin: 0; font: 10px/1.6 var(--font-mono); letter-spacing: .1em; color: var(--fg-light); }
.app-shell .footer { opacity: 1; max-width: 1040px; margin: 0 auto; padding: 32px 0 44px; border-top: 1px solid var(--rule); text-align: left; color: var(--fg-light); font: 11px/1.8 var(--font-ui); }
.footer > div:first-child, .footer .footer-links { justify-content: flex-start !important; gap: 20px !important; }
.footer a { color: var(--fg-light); text-decoration: none; border: 0; }
.footer .studio-rss { float: right; margin-left: 20px; }
.footer a:hover { color: var(--fg-deeper); }
.nav-profile-live { display: none; }
body[data-route-kind='article'] > .app-shell > .nav-profile-live { display: block; position: fixed; z-index: 50; left: 0; right: 0; top: 0; margin: 0; padding: 0; border: 0; }
.nav-profile-live-head { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.nav-profile-live-track { display: block; height: 2px; margin: 0; background: transparent; }
.nav-profile-live-track > span { display: block; height: 100%; width: 100%; background: var(--c-seal); transform-origin: left; transform: scaleX(0); }
#view .post-row { grid-template-columns: minmax(0,1fr) max-content; padding: 22px 0; gap: 12px; border-bottom: 1px solid var(--rule) !important; opacity: 1; }
#view .post-row::before { display: none; }
#view .post-row > span:first-of-type { font: 450 15px/1.6 var(--font-ui); text-decoration: none; }
#view .post-row .meta { font: 10px/1.6 var(--font-mono); transform: none; word-spacing: normal; }
#view .post-row:hover > span:first-of-type { transform: translateX(4px); }
/* Shared inner pages and a consistent reading axis. */
#view .index-page [data-year-group] { grid-template-columns: 80px minmax(0,1fr); gap: 0 40px; margin-top: 48px; }
#view .index-page [data-year-group] > .year-label { font: 12px var(--font-mono); padding-top: 26px; color: var(--fg-light); }
#view .index-page .post-row { grid-column: 2; }
#view .article-prose { max-width: 800px; }
#view .article-prose > :is(p,h2,h3,h4,h5,h6,ul,ol,blockquote,pre,table,.alert,.tabs,.share-line,.article-colophon) { margin-left: 0; margin-right: 0; max-width: 100%; }
#view .article-prose > h1:first-of-type { font-size: clamp(32px, 4vw, 46px); line-height: 1.35; margin: 22px 0 24px; letter-spacing: -.04em; }
#view .article-prose > p { font-size: 16px; line-height: 2; margin-top: 1.6em; margin-bottom: 1.6em; }
#view .article-prose.has-cjk-lead > p:first-of-type::first-letter { float: none; font: inherit; margin: 0; padding: 0; color: inherit; }
#view .article-prose h2 { font-size: 25px; font-weight: 550; margin-top: 2.6em; }
#view .article-prose h3 { font-size: 19px; font-weight: 550; }
.article-kicker { color: var(--fg-light); font: 10px var(--font-mono); letter-spacing: .1em; }
#view .article-prose > .post-meta { display: block; transform: none; margin: 0 0 40px; padding-bottom: 26px; border-bottom: 1px solid var(--rule); font: 11px/1.8 var(--font-mono); }
#view .article-colophon { display: none; }
#view .prose blockquote { font-family: var(--font-ui); font-style: normal; padding-left: 24px; border-left: 2px solid var(--rule-strong); color: var(--fg-light); }
#view .prose pre { border: 1px solid var(--rule); border-radius: 10px; padding: 22px; background: var(--surface-soft); }
.studio-outline { margin: 0 0 32px; border: 1px solid var(--rule); border-radius: 10px; padding: 12px 16px; font-size: 12px; }
.studio-outline summary { cursor: pointer; color: var(--fg-light); }
.studio-outline .nav-outline-label { display: none; }
.studio-outline .nav-profile-outline { animation: none; padding: 12px 0 0; }
.studio-outline .nav-outline-list { max-height: 50vh; overflow-y: auto; }
.studio-outline .nav-outline-item { display: block; text-align: left; width: 100%; padding: 8px 0; font: 12px/1.5 var(--font-ui); color: var(--fg-light); }
.studio-outline .nav-outline-item.is-active { color: var(--fg-deeper); }
.studio-outline .nav-outline-item::before { display: none; }
.studio-outline .nav-outline-item.is-subsection { padding-left: 12px; font-size: 11px; }
#view .studio-projects, #view .studio-photos { max-width: 1120px !important; }
#view .project-grid { margin-inline: 0; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
#view .project-grid a.item { width: auto; padding: 25px; border: 1px solid var(--rule); border-radius: 12px; background: var(--surface); opacity: 1; align-items: start; transition: border-color .2s, transform .3s var(--studio-ease), box-shadow .3s; }
#view .project-grid a.item:hover { border-color: var(--rule-strong); transform: translateY(-3px); box-shadow: 0 6px 18px #00000006; background: var(--surface); }
.project-grid .project-icon { width: 10px; height: 10px; min-width: 10px; margin-top: 6px; border-radius: 3px; }
.project-grid .project-name { font-family: var(--font-ui); font-size: 14px; font-weight: 500; }
.project-grid .project-desc { opacity: 1; font-size: 12px; line-height: 1.8; }
#view .studio-projects h4 { font: 500 13px var(--font-ui); margin: 42px 0 20px; }
.toc-nav { display: flex; flex-wrap: wrap; gap: 8px; padding: 20px 0; }
#view .toc-nav a { border: 1px solid var(--rule); padding: 5px 10px; border-radius: 6px; font: 10px/1.5 var(--font-ui); color: var(--fg-light); }
#view .talk-block { padding: 28px 0; border-top: 1px solid var(--rule); }
#view .talk-block hr { display: none; }
#view .talk-title { font: 500 23px/1.5 var(--font-ui); }
#view .talk-desc { font-size: 14px; color: var(--fg-light); }
#view .talk-pres { font-size: 12px; }
#view .photo-grid { gap: 16px; }
#view .photo-grid img { border-radius: 10px; }
.btn { border: 1px solid var(--rule); border-radius: 7px; font-family: var(--font-ui); }
/* Guestbook: a small writing desk within the same studio. */
#view .guestbook-page { max-width: 1120px; padding-top: 62px; }
.gb-title-row { align-items: center; margin: 22px 0 28px; }
#view .gb-title-row h1 { font: 550 clamp(38px,5vw,58px)/1.2 var(--font-ui); letter-spacing: -.055em; }
.gb-title-row h1 span { display: inline; }
.gb-title-row p { font-size: 12px; line-height: 1.9; }
.gb-heading-bottom { padding: 0 0 36px; }
.gb-button { border-radius: 9px; }
.gb-primary { box-shadow: inset 0 1px 0 #ffffff20, 0 2px 3px #00000010; }
.gb-wall-section { margin-top: 24px; padding: 24px 32px 32px; border: 1px solid var(--rule); border-radius: 16px; background: var(--surface-soft); }
.gb-wall-label { margin: 0 0 38px; font-size: 10px; }
.gb-wall { gap: 40px 28px; padding: 0; }
.gb-note { box-shadow: 0 1px 2px #30281e10, 0 8px 14px -10px #30281e50; }
.gb-add-paper { min-height: 220px; border-radius: 3px; color: var(--fg-light); font-family: var(--font-ui) !important; }
.gb-add-paper:hover { background: var(--surface); }
.gb-local { font-size: 10px; }
.gb-dialog { border-radius: 18px; padding: 28px; background: var(--c-bg); box-shadow: 0 24px 80px #00000025, 0 4px 16px #00000008; }
.gb-dialog::backdrop { background: #15191465; backdrop-filter: blur(8px); }
.gb-dialog h2 { font: 500 23px/1.5 var(--font-ui); letter-spacing: -.025em; }
.gb-close { border: 0; background: var(--surface-soft); border-radius: 9px; }
.gb-segment { border-radius: 9px; background: var(--surface-soft); border: 0; }
.gb-segment button { border-radius: 6px; }
.gb-segment button[aria-pressed='true'] { background: var(--surface); color: var(--fg-deeper); box-shadow: 0 1px 4px #00000015; }
.gb-writing-paper { border-radius: 3px; }
.search-panel { border: 1px solid var(--rule); border-radius: 16px; box-shadow: 0 25px 80px #00000020; background: var(--surface); }
.back-to-top { border-radius: 10px; }
/* No sequential fade across a long article. Navigation remains immediate. */
#view .slide-enter-content > *:not(.toc-fixed), #view .slide-enter-content .post-row { animation: none; }
#view .slide-enter-content { animation: studio-arrive .3s var(--studio-ease) both; }
@keyframes studio-arrive { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
@media (min-width: 1280px) {
  .studio-outline { position: fixed; top: 190px; left: calc(50% + 430px); width: 155px; border: 0; padding: 0; margin: 0; }
}
@media (max-width: 1050px) {
  .nav-wrap .nav-right > a[data-nav] { padding-inline: 10px; }
  .app-shell .footer { margin-inline: 40px; }
  #view .project-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .gb-wall { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 760px) {
  .app-shell .nav-wrap { width: calc(100% - 40px); min-height: 104px; flex-wrap: wrap; gap: 20px; padding: 24px 0 18px; }
  .nav-wrap .logo { font-size: 16px; }
  .nav-wrap .nav-right { width: 100%; justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; gap: 2px; }
  .nav-wrap .nav-right > a[data-nav] { flex-shrink: 0; padding: 7px 10px; font-size: 12px; }
  .nav-wrap .nav-right > .icon-btn { flex-shrink: 0; }
  .nav-wrap .nav-right > [data-search] { margin-left: auto; }
  #view .page { padding: 40px 24px 64px; }
  .studio-journal-intro > p:not(.studio-eyebrow) { white-space: normal; }
  #view .index-page [data-year-group] { grid-template-columns: 1fr; margin-top: 32px; }
  #view .index-page [data-year-group] > .year-label { grid-column: 1; grid-row: auto; margin: 0 0 8px; padding: 0; }
  #view .index-page .post-row { grid-column: 1; }
  #view .post-row { gap: 8px; padding-block: 18px; }
  #view .post-row > span:first-of-type { font-size: 14px; }
  #view .post-row .meta { font-size: 9px; white-space: normal; text-align: right; max-width: 100px; }
  .app-shell .footer { margin-inline: 24px; padding-top: 24px; }
  #view .guestbook-page { padding-top: 40px; }
  .gb-title-row { display: block; }
  .gb-title-row p { margin-top: 20px; }
  .gb-wall-section { padding: 24px 20px; }
  .gb-wall { gap: 32px 24px; }
  .gb-wall-label > span:last-child { display: none; }
}
@media (max-width: 500px) {
  #view .project-grid { grid-template-columns: 1fr; }
  .gb-wall { grid-template-columns: 1fr; }
  .gb-dialog { padding: 20px; }
  .gb-detail { padding-top: 60px; }
  .gb-tools { gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  #view *, #view *::before, #view *::after, .nav-wrap *, .nav-profile-live * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* A personal journal: the writing is the page, interactions live in its margins. */
body[data-route-kind='home'] .nav-wrap { max-width: 800px; }
body[data-route-kind='home'] .footer { max-width: 720px; width: calc(100% - 48px); margin-inline: auto; }
#view .journal-home { max-width: 800px; padding-top: 66px; padding-bottom: 80px; }
.journal-intro { max-width: 610px; }
.journal-overline { margin: 0 0 20px; color: var(--fg-light); font: 9px/1.6 var(--font-mono); letter-spacing: .14em; }
#view .journal-intro h1 { margin: 0 0 24px; font: 400 clamp(26px,3vw,33px)/1.5 var(--font-ui); letter-spacing: -.04em; }
.journal-name { font-weight: 550; }
.journal-bio, .journal-wandering { font-size: 14px; line-height: 2; color: var(--fg); }
.journal-bio { max-width: 560px; margin: 0 0 12px; }
.journal-wandering { margin: 0; color: var(--fg-light); }
.journal-wandering a, .journal-inline-link, .journal-project-link { color: var(--fg-deeper); text-decoration: underline; text-decoration-color: var(--rule-strong); text-underline-offset: 5px; text-decoration-thickness: 1px; transition: text-decoration-color .2s; }
.journal-wandering a:hover, .journal-inline-link:hover, .journal-project-link:hover { text-decoration-color: var(--c-seal); }
.journal-letter { margin: 24px 0 66px; max-width: 570px; }
.journal-letter-toggle { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; padding: 4px 8px 4px 0; font: 15px var(--font-kai); color: var(--fg-light); }
.journal-envelope { position: relative; display: block; width: 29px; height: 21px; border: 1px solid #b3a58d; border-radius: 2px; background: #eee8da; transform: rotate(-8deg); transition: transform .4s var(--studio-ease); perspective: 100px; }
.journal-envelope::before, .journal-envelope::after { content: ''; position: absolute; inset: 0; }
.journal-envelope::before { background: linear-gradient(33deg,transparent 49%,#b3a58d 50%,transparent 53%) left bottom / 50% 100% no-repeat, linear-gradient(-33deg,transparent 49%,#b3a58d 50%,transparent 53%) right bottom / 50% 100% no-repeat; }
.journal-envelope::after { height: 13px; background: #c7bba2; clip-path: polygon(0 0,100% 0,50% 100%); transform-origin: top; transition: transform .45s var(--studio-ease); backface-visibility: visible; }
.journal-envelope i { position: absolute; left: 4px; right: 4px; top: 2px; height: 14px; border: 1px solid #d0c4ac; background: #fffdf5; transition: transform .45s var(--studio-ease); }
.journal-letter-toggle:hover .journal-envelope { transform: rotate(0) translateY(-2px); }
.journal-letter.is-open .journal-envelope { transform: rotate(0); }
.journal-letter.is-open .journal-envelope::after { transform: rotateX(180deg); }
.journal-letter.is-open .journal-envelope i { transform: translateY(-6px); }
.journal-reveal { display: grid; grid-template-rows: 0fr; opacity: 0; visibility: hidden; transition: grid-template-rows .4s var(--studio-ease), opacity .25s, visibility .4s; }
.journal-reveal > div { overflow: hidden; min-height: 0; }
.is-open > .journal-reveal { grid-template-rows: 1fr; opacity: 1; visibility: visible; }
.journal-letter-text { padding: 16px 0 4px 40px; }
.journal-letter-text p { margin: 0 0 14px; font: 16px/2 var(--font-kai); color: var(--fg); }
.journal-letter-text small { display: block; margin-top: 14px; color: var(--fg-light); font-size: 10px; }
.journal-inline-link { font-size: 12px; line-height: 1.8; }
.journal-section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 10px; padding-bottom: 12px; border-bottom: 1px solid var(--rule); }
#view .journal-section-head h2, #view .journal-work h2 { margin: 0; font: 500 14px/1.6 var(--font-ui); letter-spacing: .02em; }
.journal-entry { border-bottom: 1px solid var(--rule); }
.journal-entry-row { display: grid; grid-template-columns: 22px minmax(0,1fr) auto 44px; align-items: center; gap: 14px; min-height: 74px; }
.journal-number { font: 9px var(--font-mono); color: var(--fg-light); opacity: .65; }
#view .journal-entry h3 { margin: 0; font: 450 16px/1.7 var(--font-ui); letter-spacing: -.01em; }
.journal-entry h3 a { text-decoration: none; }
.journal-entry h3 a:hover { text-decoration: underline; text-decoration-color: var(--rule-strong); text-underline-offset: 5px; }
.journal-date { max-width: 110px; color: var(--fg-light); font: 10px/1.6 var(--font-mono); text-align: right; }
.journal-fold { display: grid; place-items: center; height: 44px; width: 44px; border-radius: 5px; }
.journal-fold-paper { display: block; position: relative; width: 19px; height: 25px; border: 1px solid var(--rule-strong); border-radius: 1px; background: var(--surface); transform: rotate(5deg); transition: transform .35s var(--studio-ease), box-shadow .35s; }
.journal-fold-paper::before { content: ''; position: absolute; left: 4px; top: 9px; width: 9px; height: 9px; background: repeating-linear-gradient(to bottom,var(--rule-strong) 0 1px,transparent 1px 4px); opacity: .65; }
.journal-fold-paper i { position: absolute; right: -1px; top: -1px; width: 9px; height: 9px; background: linear-gradient(45deg,var(--surface-soft) 48%,var(--rule-strong) 49% 54%,var(--c-bg) 55%); transform-origin: bottom left; transition: transform .4s var(--studio-ease); }
.journal-fold:hover .journal-fold-paper, .journal-fold:focus-visible .journal-fold-paper { transform: translateY(-2px) rotate(-7deg); box-shadow: 1px 3px 4px #0000000c; }
.journal-entry.is-open .journal-fold-paper { transform: rotate(-7deg); border-color: var(--c-seal); }
.journal-entry.is-open .journal-fold-paper i { transform: rotateY(-150deg); }
.journal-excerpt-text { padding: 5px 58px 25px 36px; }
.journal-excerpt-label { font: 10px var(--font-kai); color: var(--fg-light); }
.journal-excerpt-text p { margin: 10px 0 15px; color: var(--fg); font-size: 14px; line-height: 2; }
.journal-archive { display: inline-block; margin-top: 25px; color: var(--fg-light); text-decoration: none; font-size: 11px; }
.journal-archive:hover { color: var(--fg-deeper); }
.journal-work { margin-top: 66px; }
.journal-work > p { margin: 15px 0 22px; font-size: 13px; line-height: 1.9; color: var(--fg-light); }
.journal-work ul { padding: 0; margin: 0 0 20px; list-style: none; }
.journal-work li { display: grid; grid-template-columns: 180px minmax(0,1fr); gap: 20px; align-items: baseline; padding: 10px 0; }
.journal-project-link { width: fit-content; font: 450 13px/1.8 var(--font-ui); }
.journal-work li > span { color: var(--fg-light); font-size: 11px; line-height: 1.8; }
.journal-about { margin-top: 50px; padding-top: 22px; border-top: 1px solid var(--rule); }
.journal-about summary { width: fit-content; color: var(--fg-light); font-size: 11px; cursor: pointer; }
.journal-original { margin-top: 28px; font-size: 14px; line-height: 1.9; }
.journal-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 760px) {
  #view .journal-home { padding-top: 38px; }
  body[data-route-kind='home'] .footer { margin-inline: 24px; }
  .journal-letter { margin-bottom: 44px; }
  .journal-entry-row { grid-template-columns: 17px minmax(0,1fr) 44px; gap: 0 8px; padding: 13px 0; min-height: 80px; }
  .journal-entry h3 { grid-column: 2; grid-row: 1; }
  .journal-number { grid-column: 1; grid-row: 1; }
  .journal-date { grid-column: 2; grid-row: 2; text-align: left; max-width: none; font-size: 9px; margin-top: 4px; }
  .journal-fold { grid-column: 3; grid-row: 1 / 3; }
  #view .journal-entry h3 { font-size: 15px; }
  .journal-excerpt-text { padding: 4px 12px 22px 25px; }
  .journal-letter-text { padding-left: 12px; }
  .journal-work { margin-top: 48px; }
  .journal-work li { grid-template-columns: 1fr; gap: 5px; padding-block: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .journal-home *, .journal-home *::before, .journal-home *::after { animation: none !important; transition: none !important; }
}

/* Different kinds of content deserve different ways of lingering. */
.journal-photo-window { margin: -24px 0 64px; }
/* A small stack on the desk; only the photos move. */
.photo-desk-stage { position: relative; height: 285px; overflow: hidden; isolation: isolate; }
.photo-print { position: absolute; top: 44px; left: 50%; width: 260px; margin-left: -130px; padding: 8px 8px 0; border: 1px solid #a39c851c; border-radius: 2px; background: #faf8f1; color: #716d62; box-shadow: 0 2px 3px #30281e12, 0 10px 22px -12px #30281e55; transform-origin: 50% 75%; transition: transform .42s cubic-bezier(.2,.8,.25,1), box-shadow .25s; user-select: none; touch-action: pan-y; }
.photo-print img { display: block; width: 100%; height: 155px; object-fit: cover; pointer-events: none; }
.photo-print > span { display: block; padding: 10px 3px 12px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; text-align: left; font: 11px var(--font-serif); }
.photo-print.is-front { cursor: grab; }
.photo-print.is-front:hover, .photo-print.is-front:focus-visible { box-shadow: 0 2px 3px #30281e12, 0 16px 25px -12px #30281e66; }
.photo-desk-stage.is-dragging .photo-print.is-front { transition: none; cursor: grabbing; box-shadow: 0 18px 28px -12px #30281e77; }
.photo-desk-caption { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.photo-desk-controls { display: flex; align-items: center; gap: 9px; }
.photo-desk-controls button { width: 36px; height: 36px; border: 0; background: transparent; color: var(--fg-light); cursor: pointer; transition: color .2s, transform .2s; }
.photo-desk-controls button:hover { color: var(--fg-deeper); }
.photo-desk-controls button:active { transform: scale(.88); }
.photo-desk-controls output { font: 10px var(--font-mono); color: var(--fg-light); }
.journal-photo-link { color: var(--fg-light); font: 11px var(--font-ui); text-decoration: none; }
.journal-photo-link:hover { color: var(--fg-deeper); }
.photo-desk-hint { margin: 2px 0 0 10px; font: 11px/1.8 var(--font-serif); color: var(--fg-light); }
#view .contact-source { display: none !important; }
#view .studio-photos { padding-top: 38px; }
#view .studio-photos > h1 { margin-bottom: 18px; }
.studio-photos > .prose { margin: 0 0 26px; font-size: 12px !important; color: var(--fg-light); }
.contact-room { margin-top: 24px; }
.contact-stage { position: relative; aspect-ratio: 16 / 10; max-height: 70vh; background: #171b19; overflow: hidden; border: 14px solid #171b19; border-radius: 3px; }
.contact-stage > img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.contact-loading { position: absolute; left: 14px; bottom: 14px; padding: 7px 10px; background: #171b19b3; color: #e0e5dd; font-size: 11px; }
.contact-loading[hidden] { display: none; }
.contact-zoom { position: absolute; right: 14px; bottom: 14px; border: 1px solid #ffffff40; border-radius: 5px; padding: 9px 13px; color: white; background: #171b1999; font-size: 11px; backdrop-filter: blur(8px); transition: background .2s; }
.contact-zoom:hover { background: #171b19; }
.contact-caption { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 20px 0 26px; }
.contact-caption p { margin: 0 0 4px; font: 500 14px/1.7 var(--font-ui); color: var(--fg-deeper); }
.contact-caption > div > span { color: var(--fg-light); font: 10px/1.5 var(--font-mono); }
.contact-controls { display: flex; align-items: center; flex-shrink: 0; gap: 12px; }
.contact-controls button { width: 36px; height: 36px; border: 1px solid var(--rule); border-radius: 50%; font-size: 16px; transition: background .2s, transform .2s; }
.contact-controls button:hover { background: var(--surface-soft); }
.contact-controls button:active { transform: scale(.92); }
.contact-controls output { color: var(--fg-light); font: 10px var(--font-mono); min-width: 52px; text-align: center; }
.contact-strip { display: flex; gap: 10px; overflow-x: auto; padding: 14px; background: #242923; border-radius: 3px; scrollbar-width: thin; scrollbar-color: #7d8978 #242923; }
.contact-frame { flex: 0 0 96px; display: block; padding: 4px; border: 1px solid transparent; border-radius: 2px; color: #d5d7ca; opacity: .55; transition: opacity .2s, border-color .2s; }
.contact-frame img { display: block; width: 100%; height: 61px; object-fit: cover; }
.contact-frame span { display: block; padding-top: 7px; text-align: left; font: 8px var(--font-mono); }
.contact-frame[aria-pressed='true'], .contact-frame:hover { opacity: 1; }
.contact-frame[aria-pressed='true'] { border-color: #d7d4bb; }
.contact-room .photo-toolbar { justify-content: flex-start; margin: 18px 0 0; font: 11px var(--font-ui); }
.contact-credit { margin: 12px 0 0; color: var(--fg-light); font-size: 10px; }
.reading-opening { position: relative; padding: 28px 0 38px 32px; margin: 16px 0 64px; border-left: 2px solid var(--rule); }
.reading-opening-label { display: flex; justify-content: space-between; align-items: center; gap: 16px; color: var(--fg-light); font: 11px var(--font-ui); }
.reading-opening-label button { min-height: 36px; padding: 4px 0 4px 15px; }
#view .reading-opening blockquote { margin: 22px 0 25px; padding: 0; border: 0; font: 400 clamp(20px,2.5vw,28px)/1.85 var(--font-serif); color: var(--fg-deeper); }
#view .reading-source { font: 11px/1.8 var(--font-ui); color: var(--fg-light); text-decoration: none; }
#view .reading-source:hover { color: var(--fg-deeper); }
.reading-page { display: block; margin-top: 26px; color: var(--fg-light); font: 9px var(--font-mono); }
#view .article-next { max-width: 100%; margin: 70px 0 0; padding: 30px 0 0; border-top: 1px solid var(--rule); }
.article-next > span { display: block; color: var(--fg-light); font: 13px var(--font-kai); }
#view .article-next > a { display: block; width: fit-content; margin-top: 15px; font-size: 20px; text-decoration: none; }
#view .article-next > .article-next-note { font-size: 11px; color: var(--fg-light); margin-top: 25px; }
.talk-index-number { font: 10px var(--font-mono); color: var(--fg-light); }
#view .talk-block { position: relative; padding: 35px 0; }
#view .talk-title { margin-top: 16px; max-width: 650px; font-size: clamp(23px,3vw,32px); }
.talk-recordings { margin-top: 25px; }
.talk-recordings summary { width: fit-content; font: 11px/1.7 var(--font-ui); color: var(--fg-light); cursor: pointer; }
.talk-recordings .talk-pres { margin-top: 22px; }
/* The wall is the one place where the visitor becomes the author. */
#view .guestbook-page { max-width: 1040px; }
.gb-wall-section { border: 0; border-radius: 0; background: transparent; padding: 26px 4px; }
.gb-wall { gap: 52px 36px; }
.gb-note::before { width: 50px; height: 20px; top: -10px; background: #c4b99d66; }
.gb-add-paper { border-style: solid; border-color: var(--rule); background: var(--surface); box-shadow: 3px 3px 0 var(--c-bg), 4px 4px 0 var(--rule); transform: rotate(1deg); transition: transform .3s var(--studio-ease); }
.gb-add-paper:hover { transform: rotate(-2deg) translateY(-4px); }
@media (max-width: 760px) {
  .journal-photo-window { margin: -8px 0 42px; }
  .photo-desk-stage { height: 260px; }
  .photo-print { width: 230px; margin-left: -115px; }
  .photo-print img { height: 137px; }
  #view .studio-photos { padding-top: 30px; }
  .contact-stage { aspect-ratio: 4 / 5; max-height: 65vh; border-width: 8px; }
  .contact-caption { align-items: start; gap: 14px; padding-block: 16px 22px; }
  .contact-caption p { font-size: 12px; }
  .contact-controls { gap: 5px; }
  .contact-controls button { width: 30px; height: 30px; }
  .contact-frame { flex-basis: 81px; }
  .contact-frame img { height: 51px; }
  .contact-strip { padding: 10px; gap: 6px; }
  .reading-opening { padding-left: 20px; margin-bottom: 40px; }
  .gb-wall { gap: 38px 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .journal-photo-link *, .contact-room *, .gb-add-paper { transition: none !important; animation: none !important; }
}

/* A typographic voice: fine serif headlines, italic marginalia, quiet UI. */
:root {
  --font-display: "Instrument Serif", "Noto Serif SC", "Songti SC", Georgia, serif;
  --font-heading: "Noto Serif SC", "Songti SC", Georgia, serif;
}
.nav-wrap .logo { font: 400 27px/1 var(--font-display); letter-spacing: -.025em; }
.studio-brand-mark { gap: 2px; transform: rotate(-12deg) scale(.8); }
#view .page > h1, #view .gb-title-row h1 { font-family: var(--font-heading); font-weight: 400; font-size: clamp(40px,5.8vw,70px); line-height: 1.3; letter-spacing: -.045em; }
#view .article-prose > h1:first-of-type { font-family: var(--font-heading); font-weight: 500; font-size: clamp(32px,4.2vw,50px); line-height: 1.5; letter-spacing: -.025em; }
#view .article-prose h2, #view .article-prose h3 { font-family: var(--font-heading); font-weight: 500; }
#view .article-prose > p { font-size: 16px; line-height: 2.05; }
#view .journal-intro h1 { font-family: var(--font-heading); font-weight: 400; font-size: clamp(28px,3.4vw,38px); line-height: 1.6; }
.journal-name { font-family: var(--font-display); font-weight: 400; font-size: 1.16em; }
#view .post-row > span:first-of-type, #view .journal-entry h3 { font-family: var(--font-heading); font-weight: 500; font-size: 17px; line-height: 1.8; }
#view .talk-title { font-family: var(--font-display); font-size: clamp(28px,3.6vw,42px); font-weight: 400; }
.studio-eyebrow, .journal-overline { letter-spacing: .15em !important; }
/* A real gesture, in its own space. No document text follows the pointer. */
.reading-opening { display: grid; grid-template-columns: minmax(0,1fr) 120px; column-gap: 28px; padding: 20px 0 30px; border-left: 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); margin: 28px 0 55px; min-height: 315px; }
.reading-opening-label { grid-column: 1; display: block; margin-top: 12px; }
.reading-opening-label > span { display: block; font: 11px/1.6 var(--font-ui); }
.reading-opening-label em { display: block; margin-top: 8px; font: italic 27px/1.2 var(--font-display); letter-spacing: -.02em; color: var(--fg-light); }
#view .reading-opening blockquote { grid-column: 1; margin: 25px 0 20px; font: 400 clamp(21px,2.4vw,27px)/1.9 var(--font-heading); }
.reading-source, .reading-page { grid-column: 1; }
.reading-page { margin-top: 18px; }
.pull-bookmark { grid-column: 2; grid-row: 1 / span 4; position: relative; width: 120px; height: 280px; align-self: start; margin-top: 8px; user-select: none; -webkit-user-select: none; }
.pull-bookmark > svg { position: absolute; width: 120px; height: 250px; inset: 0; overflow: visible; pointer-events: none; }
.pull-bookmark path { fill: none; stroke: #a59273; stroke-width: 1.5; stroke-linecap: round; }
.pull-anchor { position: absolute; top: 4px; left: 56px; width: 8px; height: 8px; border-radius: 50%; background: #c9c5ba; border: 2px solid var(--c-bg); box-shadow: 0 0 0 1px var(--rule-strong); }
.pull-handle { position: absolute; top: 34px; left: 31px; width: 58px; height: 113px; padding: 0; display: flex; flex-direction: column; align-items: center; color: #fff3d8; background: linear-gradient(90deg,#86412d,#ad603d 9%,#b76b46 50%,#a45a39 92%,#87422e); clip-path: polygon(0 0,100% 0,100% 100%,50% 87%,0 100%); box-shadow: inset 3px 0 #ffffff15, inset -3px 0 #35150019; cursor: grab; touch-action: none; transform-origin: 50% 10px; -webkit-user-select: none; user-select: none; }
.pull-handle::before { content: ''; position: absolute; inset: 5px 5px 10px; border: 1px dashed #ffd6a73d; border-bottom: 0; pointer-events: none; }
.pull-hole { display: block; width: 5px; height: 5px; border-radius: 50%; background: var(--c-bg); margin-top: 7px; box-shadow: 0 1px 1px #45261590; }
.pull-word { writing-mode: vertical-rl; margin-top: 12px; font: 500 13px/1 var(--font-heading); letter-spacing: .18em; }
.pull-arrow { font-size: 12px; margin-top: 9px; opacity: .7; }
.pull-hint { display: block; position: absolute; bottom: 0; width: 100%; text-align: center; font: 11px/1.5 var(--font-kai); color: var(--fg-light); }
.pull-handle:hover { filter: brightness(1.08); }
.pull-handle:focus-visible { outline: 0; filter: brightness(1.18); }
.pull-bookmark:has(.pull-handle:focus-visible) { outline: 2px solid var(--c-seal); outline-offset: 5px; border-radius: 4px; }
.pull-bookmark.is-held .pull-handle { cursor: grabbing; }
.pull-bookmark.is-ready .pull-hint { color: var(--c-seal); }
.pull-bookmark.is-ready .pull-arrow { opacity: 1; }
.pull-handle:disabled { opacity: .4; cursor: default; }
html.dark .pull-handle { background: linear-gradient(90deg,#713a2e,#94503a 9%,#a56144 50%,#8f4a32 92%,#713a2e); }
@media (max-width: 600px) {
  #view .page > h1 { font-size: 44px; }
  #view .article-prose > h1:first-of-type { font-size: 32px; }
  .reading-opening { column-gap: 15px; grid-template-columns: minmax(0,1fr) 120px; }
  .reading-opening-label { align-self: center; }
  .reading-opening-label em { font-size: 26px; max-width: 130px; }
  .pull-bookmark { grid-column: 2; grid-row: 1; height: 280px; margin-top: 0; }
  #view .reading-opening blockquote { grid-column: 1 / -1; margin-top: 12px; font-size: 22px; }
  .reading-source, .reading-page { grid-column: 1 / -1; }
  #view .post-row > span:first-of-type, #view .journal-entry h3 { font-size: 16px; }
}

/* Content-specific motion: page hinge, photographic reveal, unfolding records. */
.contact-frame { transition: opacity .2s, border-color .2s, transform .35s var(--studio-ease); }
.contact-frame:hover, .contact-frame:focus-visible { transform: translateY(-4px) rotate(-2deg); }
.talk-recordings { overflow: hidden; }
.talk-recordings-body { display: flow-root; }
.talk-recordings summary::marker { color: var(--c-seal); }
#view .post-row > span:first-of-type { transform: none; }
#view .post-row { position: relative; }
#view .post-row::after { content: ''; position: absolute; bottom: -1px; left: 0; height: 1px; width: 100%; background: var(--fg-light); transform: scaleX(0); transform-origin: left; transition: transform .4s var(--studio-ease); }
#view .post-row:hover::after, #view .post-row:focus-visible::after { transform: scaleX(1); }
.podcast-sleeve { position: relative; padding: 22px 0 22px 88px; border-bottom: 1px solid var(--rule); }
.podcast-disc { position: absolute; top: 24px; left: 0; width: 62px; height: 62px; border-radius: 50%; border: 1px solid var(--rule-strong); background: repeating-radial-gradient(circle, transparent 0 4px, var(--rule) 4px 5px); transition: transform 1.1s cubic-bezier(.15,.65,.2,1); }
.podcast-disc::before { content: ''; position: absolute; inset: 21px; border: 5px solid var(--c-seal); border-radius: 50%; background: var(--c-bg); }
.podcast-disc::after { content: ''; position: absolute; left: 29px; top: 8px; width: 3px; height: 8px; border-radius: 2px; background: var(--fg-light); }
.podcast-sleeve:hover .podcast-disc, .podcast-sleeve:focus-within .podcast-disc { transform: rotate(240deg); }
.circles > a { transition: transform .4s cubic-bezier(.2,.8,.2,1), box-shadow .4s; }
.circles > a:hover, .circles > a:focus-visible { transform: translateY(-5px) rotate(-8deg); box-shadow: 0 10px 16px -8px #00000050; }
@media (prefers-reduced-motion: reduce) {
  #view .podcast-disc, #view .contact-frame, #view .circles > a, #view .post-row::after { transition: none; transform: none; }
}

/* Guestbook is a place, not a page inside the blog shell. */
body:has([data-guestbook]) { --wall-material: linear-gradient(115deg,#fffdf530,transparent 65%), url('../assets/materials/plaster-wall.svg'); background: #e3dfd6; }
body:has([data-guestbook]) :is(.nav-wrap,.footer,.back-to-top,.nav-profile-live) { display: none !important; }
body:has([data-guestbook]) #view { min-height: 100svh; }
#view main.guestbook-page { max-width: none !important; width: 100%; padding: 100px 0 0 !important; margin: 0; min-height: 100svh; animation: none; transform: none; background-color: #e3dfd6; background-image: var(--wall-material); background-position: center top; background-size: auto, 768px 768px; color: #30352f; }
#view .guestbook-page .gb-wall-section { margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; }
#view .guestbook-page .gb-wall[data-wall] { min-height: calc(100svh - 100px); margin-top: 0; background: transparent; border: 0; }
.gb-wall-invitation { position: absolute; top: 40px; left: 50%; width: max-content; max-width: calc(100% - 40px); transform: translateX(-50%); color: #777366; text-align: center; pointer-events: none; }
.guestbook-page .gb-wall-invitation > span { display: block; font: 24px/1.8 var(--font-kai); letter-spacing: .1em; }
.guestbook-page .gb-wall-invitation > small { display: block; margin-top: 8px; font: 11px/1.8 var(--font-ui); color: #817c70; }
.gb-wall-header { position: absolute; inset: 0 0 auto; display: flex; align-items: center; justify-content: space-between; height: 100px; padding: 0 32px; z-index: 2; }
.gb-wall-header h1 { position: absolute; left: 50%; transform: translateX(-50%); margin: 0; color: #55564b; text-align: center; font: 24px/1.4 var(--font-serif); letter-spacing: .22em; }
.gb-wall-header h1 span { display: block; margin-top: 6px; font: 8px/1.4 var(--font-mono); letter-spacing: .16em; color: #8a867b; }
.gb-exit { position: fixed; top: 28px; left: 28px; z-index: 1000000001; display: inline-flex; align-items: center; gap: 9px; min-height: 44px; padding: 0 15px; border: 1px solid #918a7525; border-radius: 24px; color: #53564c !important; background: #f4f1e7ec; box-shadow: 0 2px 8px #433b2810; font: 12px var(--font-ui); text-decoration: none !important; transition: background .2s, transform .2s; }
.gb-exit:hover { background: #fffdf4; transform: translateX(-2px); }
.gb-local-label { margin-left: auto; color: #78776b; font: 10px var(--font-ui); letter-spacing: .04em; }
.gb-wall-dock { position: fixed; bottom: max(24px,env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); z-index: 1000000001; display: flex; align-items: center; gap: 2px; padding: 6px; width: max-content; max-width: calc(100% - 24px); border: 1px solid #fffdf436; border-radius: 32px; background: #343d36f5; color: #f2f0e5; box-shadow: 0 8px 26px #292d252e, inset 0 1px 0 #ffffff16; }
.guestbook-page .gb-wall-dock button { display: flex; justify-content: center; align-items: center; gap: 9px; min-width: 40px; min-height: 44px; border: 0; border-radius: 24px; background: transparent; color: inherit; font: 12px var(--font-ui); transition: background .2s, transform .2s; }
.guestbook-page .gb-wall-dock button:disabled { opacity: .25; }
.guestbook-page .gb-wall-dock button:hover:not(:disabled) { background: #ffffff15; }
.guestbook-page .gb-wall-dock button:active:not(:disabled) { transform: scale(.94); }
.gb-wall-picker { display: flex; align-items: center; gap: 8px; padding-left: 4px; font: 10px var(--font-ui); color: #bfc5b6; }
.guestbook-page .gb-wall-picker select { max-width: 110px; height: 44px; padding: 0 4px; border: 0; background: transparent; color: #f2f0e5; font: 12px var(--font-mono); cursor: pointer; }
.gb-wall-picker option { background: #343d36; color: #f2f0e5; }
.gb-dock-divider { width: 1px; height: 22px; margin: 0 8px; background: #ffffff25; }
.guestbook-page .gb-wall-dock .gb-leave-mark { padding: 0 18px; background: #e7eccf; color: #354036; }
.guestbook-page .gb-wall-dock .gb-leave-mark:hover { background: #f1f5df; }
.gb-leave-mark > span { font-size: 22px; line-height: 1; }
.gb-wall-dock :focus-visible { outline: 2px solid #e7eccf; outline-offset: 1px; }
@media (max-width:600px) {
  .gb-wall-header { padding: 0 16px; height: 100px; }
  .gb-wall-header h1 { left: auto; right: 18px; transform: none; text-align: right; font-size: 20px; }
  .gb-exit { top: 22px; left: 16px; }
  .gb-local-label { position: absolute; top: 82px; right: 18px; font-size: 9px; }
  .gb-wall-picker > span { display: none; }
  .gb-wall-dock { bottom: max(16px,env(safe-area-inset-bottom)); }
  .gb-wall-invitation { top: 200px; max-width: calc(100% - 48px); }
  .guestbook-page .gb-wall-invitation > span { font-size: 18px; }
}
#view .gb-wall > .gb-note { border-radius: 1px 2px 4px 1px; background-image: linear-gradient(135deg,#ffffff35,transparent 45%,#81714d0b); }
#view .gb-wall > .gb-note[data-medium='paper'][data-fastener='pin']::before { width: 9px; height: 9px; border-radius: 50%; top: 8px; left: 48%; background: #8c4e38; box-shadow: inset 1px 1px 2px #f4bd8270, 1px 2px 2px #201a1440; }
#view .gb-wall > .gb-note[data-medium='paper']:not(.is-lifted) { box-shadow: .5px 1px 1px #26281c50, 1px 3px 5px #26281c28; }
#view .gb-wall .gb-note[data-medium='paper']::after { content: ''; position: absolute; bottom: -2px; right: 8px; width: 55%; height: 10px; box-shadow: 0 4px 5px #463a2728; transform: rotate(3deg); z-index: -1; }
#view .gb-note.gb-wall-mark { background: transparent; border: 0; border-radius: 0; box-shadow: none; filter: none; cursor: pointer; }
#view .gb-note.gb-wall-mark::before, #view .gb-note.gb-wall-mark::after { display: none; }
#view .gb-wall > .gb-wall-mark:hover, #view .gb-wall > .gb-wall-mark:focus-visible { transform: rotate(var(--note-angle)); box-shadow: none; }
.gb-wall-mark .gb-note-content { aspect-ratio: auto; min-height: 145px; overflow: visible; }
.gb-wall-mark .gb-note-content p { font: 25px/1.7 var(--font-kai); padding: 22px 20px 10px; letter-spacing: .06em; }
.gb-wall-mark[data-medium='ink'] .gb-note-content { color: #454a43; opacity: .82; }
.gb-wall-mark .gb-note-foot { border: 0; margin: 0 20px; padding: 10px 0; color: #787164; font-family: var(--font-kai); }
.gb-wall-mark .gb-note-content svg { height: auto; aspect-ratio: 5 / 3; }
.gb-materials { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; margin-bottom: 22px; }
.guestbook-page .gb-materials button { padding: 14px 8px; border: 1px solid var(--rule); border-radius: 3px; background: transparent; color: var(--fg-light); font-size: 13px; text-align: left; }
.gb-materials button small { display: block; font-size: 9px; margin-top: 7px; opacity: .65; }
.guestbook-page .gb-materials button[aria-pressed='true'] { color: var(--fg-deeper); background: var(--surface-soft); border-color: var(--fg-light); }
.gb-writing-paper[data-medium='engraving'], .gb-preview, .gb-detail [data-detail-note] { background-color: #e3dfd6; background-image: var(--wall-material); background-position: center; background-size: auto, 768px 768px; }
.gb-writing-paper[data-medium='ink'], .gb-preview:has([data-medium='ink']), .gb-detail:has([data-medium='ink']) [data-detail-note] { background-color: #e3dfd6; background-image: var(--wall-material); background-position: center; background-size: auto, 768px 768px; }
.gb-writing-paper[data-medium='engraving'] textarea { color: #4f524c; text-shadow: 0 1px 0 #d9dbca; }
.gb-pen-row.is-engraving .gb-inks { display: none; }
.guestbook-page .gb-status { position: fixed; bottom: 100px; left: 50%; transform: translate(-50%,8px); z-index: 1000000002; max-width: calc(100% - 40px); width: max-content; padding: 10px 16px; margin: 0; border-radius: 4px; background: #33372ee6; color: #f5f0e4; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.guestbook-page .gb-status.is-visible { opacity: 1; transform: translate(-50%,0); }
.guestbook-page .gb-undo-wall { position: fixed; bottom: 110px; right: 24px; z-index: 1000000002; color: #48483c; background: #e7e0ce; padding: 8px 12px; }
@media (max-width: 600px) { .gb-materials { gap: 5px; } .gb-materials button small { line-height: 1.5; } .gb-wall-mark .gb-note-content p { font-size: 23px; } }

/* Original sticker art and recessed, grain-broken engraving. */
.gb-carved-art { overflow: visible; }
.gb-carved-glyph { font-family: 'Kaiti SC','STKaiti','KaiTi',var(--font-serif); font-weight: 600; letter-spacing: 1.1px; }
#view .gb-wall-mark[data-medium='engraving'] .gb-note-content { text-shadow: none; color: #686c62; min-height: 0; }
#view .gb-carved-art path { filter: none; }
#view .gb-wall-mark[data-medium='engraving'] .gb-note-foot { color: #424a43; text-shadow: 0 1px 0 #d9dbca88; }
#view .gb-wall-mark[data-medium='ink'] .gb-note-content { opacity: .92; }
.gb-wall > .gb-note.is-distant .gb-note-content { visibility: hidden; }
#view .gb-note[data-medium='sticker'] { background: transparent; border: 0; box-shadow: none; }
#view .gb-note[data-medium='sticker']::before, #view .gb-note[data-medium='sticker']::after { display: none; }
.gb-note[data-medium='sticker'] .gb-note-content { aspect-ratio: 1; overflow: visible; filter: drop-shadow(.5px 1px .4px #20251e90) drop-shadow(0 2px 2px #20251e20); }
.gb-wall > [data-medium='sticker'] .gb-note-foot { display: none; }
.gb-detail .gb-note[data-medium='sticker'] { width: min(100%,var(--mark-size)); margin-inline: auto; }
:is(.gb-preview,.gb-detail) .gb-note[data-medium='sticker'] .gb-note-foot { position: relative; left: 50%; transform: translateX(-50%); width: 220px; max-width: calc(100vw - 140px); margin: 18px 0 0; padding: 0; border: 0; }
.gb-sticker-picker { display: flex; align-items: center; justify-content: center; gap: 20px; padding: 30px 15px; background: var(--surface-soft); }
.gb-sticker-picker button { width: 100px; padding: 10px; border: 1px solid transparent; background: transparent; border-radius: 12px; transition: transform .2s; }
.gb-sticker-picker button[aria-pressed='true'] { border-color: var(--c-seal); transform: rotate(-5deg); }
.gb-sticker-picker svg { width: 100%; display: block; }
.gb-materials { grid-template-columns: repeat(4,minmax(0,1fr)); }
.gb-mark-size { display: flex; align-items: center; gap: 12px; margin: 0 0 18px; font-size: 11px; color: var(--fg-light); }
.gb-mark-size select { background: var(--surface); border: 1px solid var(--rule); color: var(--fg); padding: 6px; border-radius: 3px; }
.gb-mark-size span { margin-left: auto; font-size: 10px; }
.gb-preview .gb-note { width: min(100%,var(--mark-size,280px)); margin-inline: auto; }
[data-ink='#e9edcf'] { background: #e9edcf; } [data-ink='#d7f557'] { background: #d7f557; } [data-ink='#6286ee'] { background: #6286ee; } [data-ink='#f47760'] { background: #f47760; }
@media (max-width:600px) { .gb-materials { grid-template-columns: repeat(2,minmax(0,1fr)); } .gb-mark-size { flex-wrap: wrap; } .gb-mark-size span { flex-basis:100%; margin: 0; } .gb-inks { gap: 7px; } .gb-sticker-picker { gap: 8px; } }

/* Pale inks remain visible on mineral plaster without changing stored strokes. */
#view .gb-wall-mark[data-medium='ink'] .gb-note-content svg { filter: drop-shadow(0 .45px .3px #5d66534d); mix-blend-mode: multiply; }

/* A working wall: close-set marks and tools beside the actual drawing surface. */
#view .guestbook-page .gb-wall-section { position: relative; }
#view .guestbook-page .gb-wall[data-wall] { width: min(980px,calc(100% - 40px)); margin-inline: auto; }
#view .gb-wall .gb-note-foot { padding: 8px 0; font-size: 8px; }
#view .gb-wall .gb-wall-mark .gb-note-foot { position: absolute; bottom: -13px; left: 0; right: 0; padding: 0; opacity: 0; transition: opacity .2s; }
#view .gb-wall .gb-wall-mark:is(:hover,:focus-visible) .gb-note-foot { opacity: 1; }
#view .gb-wall-mark .gb-note-content { min-height: 0; }
#view .gb-wall > .gb-note[data-medium='paper'] { background-image: linear-gradient(165deg,#ffffff48,transparent 60%,#81714d13); }
#view .gb-wall > .gb-note[data-medium='paper']::before { opacity: .85; }
.gb-wall-dock [data-wall-tool] { flex-direction: column; gap: 0 !important; width: 56px; height: 58px; font-size: 10px !important; }
.gb-wall-dock [data-wall-tool] > span { display: block; font: 28px/1.1 Georgia,serif; color: #e7eccf; transition: transform .2s; }
.gb-wall-dock [data-wall-tool]:hover > span { transform: translateY(-3px) rotate(-8deg); }
.gb-wall-dock [data-wall-tool][aria-pressed='true'] { background: #e7eccf !important; color: #354036 !important; }
.gb-wall-dock [data-wall-tool][aria-pressed='true'] > span { color: #354036; transform: translateY(-3px) rotate(-8deg); }
.gb-placement-hint { position: fixed; bottom: 112px; left: 50%; transform: translateX(-50%); z-index: 1000000002; display: flex; align-items: center; gap: 14px; width: max-content; max-width: calc(100% - 24px); padding: 10px 14px; border: 1px solid #78756630; border-radius: 6px; background: #f9f6ecef; box-shadow: 0 4px 14px #312f2412; font: 12px var(--font-ui); }
.gb-placement-hint button { border: 0; padding: 6px; background: transparent; color: #4e6456; font: 10px var(--font-ui); }
.gb-placement-hint > button:last-child { font-size: 20px; }
.is-choosing .gb-wall { cursor: crosshair; outline: 1px dashed #74756750; outline-offset: -8px; }
.is-choosing .gb-wall > .gb-note { cursor: default; }
.is-writing .gb-wall-dock { visibility: hidden; }
.guestbook-page [data-composer] { position: fixed; inset: 100px 24px auto auto; width: 280px; max-height: calc(100dvh - 130px); margin: 0; padding: 18px; border: 1px solid #b3ad9b60; border-radius: 10px; background: #f8f5edfa; color: #444b40; box-shadow: 0 12px 40px #322e2424,0 2px 4px #322e2412; z-index: 1000000003; }
.guestbook-page [data-composer][open] { animation: none; }
[data-composer] .gb-dialog-head { margin: 0 0 16px; align-items: center; }
[data-composer] .gb-dialog-head h2 { font-size: 17px; color: #45483d; }
[data-composer] .gb-eyebrow { margin: 0; color: #817b6c; font-size: 9px; }
[data-composer] .gb-materials { display: none; }
[data-composer] .gb-mark-size { margin-bottom: 12px; }
[data-composer] .gb-mark-size span { display: none; }
[data-composer] .gb-tools { margin-bottom: 10px; }
[data-composer] .gb-pen-row { gap: 8px; }
[data-composer] .gb-inks { gap: 9px; flex-wrap: wrap; }
[data-composer] .gb-inks button { width: 24px; height: 24px; }
[data-composer] .gb-pen-size { flex-basis: 100%; margin: 6px 0 0; }
[data-composer] .gb-signature { margin-top: 8px; }
[data-composer] .gb-signature input { padding: 8px 0; font-size: 12px; }
[data-composer] .gb-error:empty { display: none; }
[data-composer] .gb-text-count { height: auto; padding: 0; }
[data-composer] .gb-dialog-foot { flex-wrap: wrap; gap: 8px 14px; margin-top: 14px; }
[data-composer] .gb-dialog-foot > span { flex-basis: 100%; max-width: none; font-size: 9px; }
[data-composer] .gb-dialog-foot > .gb-primary { margin-left: auto; padding: 9px 12px; font-size: 12px; }
[data-composer] .gb-sticker-picker { padding: 8px 0; gap: 4px; }
[data-composer] .gb-sticker-picker button { width: 76px; }
.gb-live-stage { position: absolute; z-index: 1000000001; outline: 1px dashed #60645590; outline-offset: 8px; }
.gb-live-stage::before { content: '在这里落笔'; position: absolute; left: 0; top: -27px; color: #626654; font: 10px var(--font-ui); letter-spacing: .1em; pointer-events: none; }
.gb-live-stage[data-medium='sticker']::before { content: '贴在这里'; }
.gb-live-stage .gb-writing-paper { box-shadow: none; }
.gb-live-stage .gb-writing-paper:is([data-medium='ink'],[data-medium='engraving']) { background: transparent; }
.gb-live-stage .gb-note { width: 100%; }
.gb-live-stage .gb-note-foot { display: none; }
.gb-live-stage .gb-writing-paper textarea { padding: 14px; font-size: 18px; }
.gb-live-stage .gb-canvas-hint { font-size: 17px; color: #6d7161; }
.gb-live-stage .gb-canvas-hint span { font-size: 9px; color: #7d806f; }
.gb-live-carving { position: absolute; inset: 0; pointer-events: none; }
.gb-live-carving svg { width: 100%; height: 100%; display: block; }
.gb-writing-paper.is-carving-text textarea { color: transparent !important; text-shadow: none !important; caret-color: #393e34; }
@media (max-width:900px) {
  .guestbook-page [data-composer] { top: auto; bottom: 12px; right: 12px; width: 280px; max-height: 43dvh; }
}
@media (max-width:600px) {
  #view .guestbook-page .gb-wall[data-wall] { width: calc(100% - 16px); }
  .gb-wall-dock { gap: 0; padding: 4px; }
  .gb-wall-dock [data-wall-tool] { width: 45px; min-width: 42px !important; }
  .gb-wall-dock .gb-wall-picker { padding: 0; }
  .gb-wall-dock .gb-wall-picker select { width: 52px; font-size: 10px; }
  .gb-wall-dock [data-gb='previous-wall'],.gb-wall-dock [data-gb='next-wall'] { min-width: 24px !important; }
  .gb-dock-divider { margin-inline: 3px; }
  .gb-placement-hint { bottom: 100px; flex-wrap: wrap; gap: 0 6px; justify-content: center; }
  .gb-placement-hint > span { font-size: 11px; }
  .guestbook-page [data-composer] { bottom: max(8px,env(safe-area-inset-bottom)); right: 8px; width: calc(100% - 16px); max-height: 43dvh; padding: 12px; }
  [data-composer] .gb-dialog-head { margin-bottom: 10px; }
  [data-composer] .gb-dialog-head h2 { font-size: 15px; }
  [data-composer] .gb-tools { margin-bottom: 0; }
  [data-composer] .gb-pen-size { flex-basis: auto; }
  [data-composer] .gb-dialog-foot { position: sticky; bottom: -12px; background: #f8f5ed; padding: 6px 0; }
}

.gb-wall-dock [data-wall-tool] svg { display: block; width: 34px; height: 34px; }

/* Continuous village lime plaster; drawing takes place on the wall, never inside a card. */
body:has([data-guestbook]) { --wall-material: linear-gradient(#f6ead340,#f6ead340),url('../assets/materials/village-wall-v1.jpg'); background: #e4cba5; }
#view main.guestbook-page { background-size: cover; background-attachment: fixed; background-repeat: no-repeat; }
#view .guestbook-page .gb-wall[data-wall] { width: calc(100% - 48px); max-width: none; }
.gb-writing-paper[data-medium='engraving'],.gb-detail [data-detail-note] { background-size: cover; }
#view .gb-note[data-freeform] { transform: none !important; transition: none; }
#view .gb-note[data-freeform] .gb-note-content { width: 100%; height: 100%; aspect-ratio: auto; }
#view .gb-note[data-freeform] .gb-note-content :is(canvas,svg) { display: block; width: 100%; height: 100%; aspect-ratio: auto; }
#view .gb-note[data-freeform] .gb-note-foot { bottom: -20px; }
#view .gb-note[data-freeform].gb-just-pinned { animation: gb-finished-cut 1.8s ease both; outline-offset: 8px; }
@keyframes gb-finished-cut { 0%,65% { outline: 1px dashed #514d3e80; } 100% { outline: 1px dashed transparent; } }
.gb-free-layer,.gb-wall-presence { position: absolute; z-index: 1000000001; }
.gb-free-layer > canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: none; outline: none !important; }
.gb-free-carving { position: absolute; pointer-events: none; }
.gb-free-carving svg { display: block; width: 100%; height: 100%; }
.gb-wall-presence { pointer-events: none; z-index: 1000000002; }
.gb-other-painter { position: absolute; border: 1px dashed #b47c55a0; border-radius: 7px; background: #b98f5b10; color: #66432d; padding: 5px; white-space: nowrap; font: 10px var(--font-ui); }
.is-free-painting .gb-wall-dock,.is-free-painting .gb-wall-invitation { visibility: hidden; }
.is-free-painting .gb-exit { z-index: 1000000004; }
.gb-real-tool { position: fixed; width: 70px; height: 110px; pointer-events: none; z-index: 1000000005; transform: translate(-30px,-11px) rotate(-14deg); transform-origin: 30px 11px; filter: drop-shadow(5px 9px 4px #25221835); }
.gb-real-tool[data-tool='engraving'] { transform: translate(-10px,-9px) rotate(-8deg); transform-origin: 10px 9px; }
.gb-real-tool svg { width: 100%; height: 100%; }
.nozzle-mist { visibility: hidden; }
.is-working .nozzle-mist { visibility: visible; }
.gb-real-tool.is-working { filter: drop-shadow(2px 5px 2px #25221830); }
.gb-real-tool.is-blocked { opacity: .45; }
.gb-free-panel { position: fixed; bottom: max(20px,env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 18px; width: max-content; max-width: calc(100% - 24px); padding: 17px 22px; color: #eee9dc; background: #292f2bf5; border: 1px solid #fff7dc28; border-radius: 18px; box-shadow: 0 12px 40px #211e1938; z-index: 1000000004; }
.gb-free-instrument { width: 54px; height: 84px; flex-shrink: 0; transform: rotate(-10deg); animation: gb-pick-tool .6s ease both; }
.gb-free-instrument svg { width: 100%; height: 100%; }
@keyframes gb-pick-tool { 0% { transform: translateY(20px) rotate(-25deg); opacity: 0; } 40% { transform: translateY(-6px) rotate(8deg); } 70% { transform: rotate(-18deg); } 100% { transform: rotate(-10deg); opacity: 1; } }
.gb-free-controls { min-width: 0; }
.gb-free-heading { display: flex; align-items: baseline; gap: 12px; margin-bottom: 10px; }
.gb-free-heading strong { font: 17px var(--font-kai); }
.gb-free-heading span { color: #b9bdaf; font-size: 10px; }
.gb-free-colors { display: flex; gap: 10px; margin-bottom: 12px; }
.gb-free-colors button { width: 23px; height: 23px; border: 1px solid #fff8; border-radius: 50%; background: var(--swatch); box-shadow: inset 0 1px 2px #ffffff60; }
.gb-free-colors button[aria-pressed='true'] { outline: 1px solid #eee9dc; outline-offset: 3px; }
.gb-free-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.gb-free-panel button,.gb-free-panel select { font: 11px var(--font-ui); }
.gb-free-actions button { border: 0; background: transparent; color: #dfdfd0; padding: 7px 0; }
.gb-free-actions label { font-size: 11px; }
.gb-free-actions select { background: #42493e; color: #f2eedf; border: 0; border-radius: 4px; padding: 4px; }
.gb-free-actions .gb-free-finish { padding: 8px 12px; border-radius: 7px; background: #e9ecd6; color: #2c332a; }
.gb-free-panel [data-feedback] { margin: 9px 0 0; min-height: 14px; color: #b8bba9; font-size: 10px; }
.gb-wall-dock [data-wall-tool] svg { overflow: visible; }
#view .gb-wall-mark .gb-engraved-text,.gb-live-stage .gb-writing-paper[data-medium='engraving'] textarea { font: 600 20px/1.65 'Kaiti SC','STKaiti','KaiTi',var(--font-serif); letter-spacing: .02em; padding: 14px; white-space: pre-wrap; overflow-wrap: anywhere; color: #585448; text-shadow: -.35px -.6px .3px #28281f80,.4px .8px .3px #f6efdb90; }
.gb-live-stage .gb-writing-paper[data-medium='engraving'] textarea { caret-color: #191d15; }
@media (max-width:600px) {
  #view .guestbook-page .gb-wall[data-wall] { width: calc(100% - 20px); }
  .gb-free-panel { bottom: 10px; padding: 12px; gap: 10px; width: calc(100% - 20px); border-radius: 14px; }
  .gb-free-instrument { width: 36px; height: 65px; }
  .gb-free-heading { flex-wrap: wrap; gap: 4px 10px; }
  .gb-free-actions { gap: 2px 11px; }
  .gb-free-actions button { min-height: 34px; }
  .gb-free-colors { gap: 10px; margin-bottom: 7px; }
  .gb-free-heading span { font-size: 9px; }
}
@media (prefers-reduced-motion:reduce) { .gb-free-instrument,#view .gb-note[data-freeform].gb-just-pinned { animation: none; } }

/* Mounted calligraphy and a cinnabar seal occupy only the far-right edge. */
#view main.guestbook-page { padding-top: 0 !important; }
.gb-wall-header { pointer-events: none; }
.gb-wall-header .gb-exit { pointer-events: auto; }
.gb-wall-header .gb-wall-title { left: auto; right: 22px; top: 48px; transform: none; display: flex; flex-direction: row-reverse; align-items: flex-start; gap: 9px; }
.gb-wall-header .gb-wall-title [data-wall-name] { margin: 0; writing-mode: vertical-rl; font: 500 44px/1.15 'Kaiti SC','STKaiti','KaiTi',var(--font-serif); letter-spacing: .12em; color: #33342c; text-shadow: -.4px -.5px 0 #e9d7b875, .6px .8px 0 #262820, 1.2px 1.6px 0 #35372c, 1.8px 2.4px 0 #454538, 3px 4px 2px #51472e45, 5px 7px 5px #5b4d3330; }
.gb-wall-title i { width: 34px; height: 34px; margin-top: 106px; transform: rotate(-4deg); opacity: .87; }
.gb-wall-title i img { display: block; width: 100%; height: 100%; mix-blend-mode: multiply; }
.gb-wall-title small { writing-mode: vertical-rl; font: 10px var(--font-serif); letter-spacing: 3px; margin-top: 5px; }
.gb-local-label { position: absolute; top: 38px; right: 32px; opacity: .7; }
.guestbook-page .gb-wall-picker select { max-width: 170px; font-family: var(--font-ui); }
#view .guestbook-page .gb-wall[data-wall] { min-height: 100svh; }
@media(max-width:600px) {
  .gb-wall-header .gb-wall-title { top: 54px; right: 12px; gap: 7px; }
  .gb-wall-header .gb-wall-title [data-wall-name] { font-size: 34px; }
  .gb-wall-title i { width: 29px; height: 29px; margin-top: 76px; }
  .gb-local-label { top: 29px; right: 20px; font-size: 9px; }
  .guestbook-page .gb-wall-picker select { width: 94px; font-size: 10px; }
}
.gb-editing-original { visibility: hidden !important; pointer-events: none !important; }
.gb-paint-warning { position: fixed; z-index: 1000000006; pointer-events: none; padding: 7px 10px; border: 1px solid #ad715840; border-radius: 7px; background: #fff4e4f2; color: #8b432c; box-shadow: 0 3px 12px #60432316; font: 11px var(--font-ui); }
.gb-free-actions [data-action='erase'][aria-pressed='true'] { color: #f9ccae; box-shadow: 0 1px currentColor; }
.gb-real-tool[data-tool='eraser'] { transform: translate(-12px,-22px) rotate(-10deg); }
.gb-peer-trace { position: absolute; inset: 0; overflow: visible; pointer-events: none; fill: #b76c4438; }

/* The selected point stays put; material and typography match the saved mark. */
.gb-placement-ghost { position: absolute; z-index: 1000000000; pointer-events: none; border: 1px dashed #645e4c80; border-radius: 2px; background: #fff9e532; display: grid; place-items: center; color: #665a43; font: 12px var(--font-ui); }
.gb-live-stage::before { display: none; }
.gb-stage-handle { position: absolute; left: 0; top: -34px; padding: 5px 10px; border: 1px solid #8c7d5f45; border-radius: 16px; background: #faf5e9ed; color: #655944; font: 11px var(--font-ui); cursor: grab; touch-action: none; }
.gb-stage-handle:active { cursor: grabbing; }
.gb-live-stage.is-conflicting { outline-color: #b2442d; background: #b2442d09; }
.gb-type-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 12px 0 6px; font: 12px var(--font-ui); }
.gb-type-tools label { display: flex; align-items: center; gap: 7px; }
.gb-type-tools select { padding: 5px; border: 1px solid #8d816233; border-radius: 5px; background: #fff9ef; color: #474737; }
.gb-type-tools button { flex-basis: 100%; text-align: left; }
.gb-lettering { width: 100%; position: relative; color: var(--letter-ink,#3f5870); }
#view .gb-lettering .gb-letter-glyph,#view .gb-live-stage .is-material-text textarea { box-sizing: border-box; width: 100%; min-height: 100%; margin: 0; padding: 14px; font: 400 var(--letter-size,24px)/1.6 var(--letter-font); letter-spacing: 0; text-align: left; white-space: pre-wrap; overflow-wrap: anywhere; word-break: normal; color: var(--letter-ink,#3f5870); text-shadow: none; }
#view .gb-lettering[data-material='engraving'] .gb-letter-glyph { color: #817056; }
.gb-material-defs { position: absolute !important; width: 0 !important; height: 0 !important; overflow: hidden; }
#view .gb-note[data-typed] .gb-note-content { min-height: var(--letter-min-height,calc(var(--mark-size) * .6)); aspect-ratio: auto; align-items: flex-start; overflow: visible; }
#view .gb-note[data-typed] .gb-note-content .gb-lettering { min-height: inherit; }
.gb-live-stage .is-material-text { aspect-ratio: auto; min-height: 0; }
#view .gb-live-stage .is-material-text textarea { display: block; position: relative; z-index: 1; color: transparent; caret-color: #252c23; text-shadow: none; overflow: hidden; }
#view .gb-live-stage .is-material-text.is-typing textarea { color: var(--letter-ink); }
#view .gb-live-stage .is-material-text.is-typing[data-medium='engraving'] textarea { color: #625240; text-shadow: -.5px -.5px .4px #352c2360,.5px 1px .4px #fff4db; }
.gb-live-stage .is-material-text.is-typing .gb-live-carving { visibility: hidden; }
.gb-live-stage .is-material-text .gb-live-carving { overflow: hidden; }
.gb-live-stage .gb-note { transform: none; }
#view .gb-wall > .gb-note[data-medium='paper'][data-mark-size] .gb-note-foot { box-sizing: border-box; height: 36px; padding: 8px 0; align-items: center; }
.gb-wall-picker { flex-wrap: wrap; gap: 0 4px; max-width: 165px; }
.gb-wall-picker [data-wall-capacity] { display: block !important; flex-basis: 100%; padding: 0 4px; font: 10px var(--font-mono); color: #d0d4bd; }
.gb-wall-dock [data-gb='next-wall'] { white-space: nowrap; font-size: 11px; min-width: 44px; }
.gb-free-heading [data-capacity] { font: 10px var(--font-ui); color: #d6d9c7; }
.gb-free-heading { flex-wrap: wrap; }
.gb-primary:disabled { cursor: not-allowed; opacity: .45; }
@media(max-width:600px){.gb-wall-picker{max-width:100px}.gb-wall-dock [data-gb='next-wall']{min-width:42px!important}.gb-live-stage .gb-stage-handle{top:-30px}.gb-type-tools{gap:6px;margin:6px 0}.gb-type-tools button{flex-basis:auto}.guestbook-page [data-composer]{max-height:38dvh}}

body:has([data-guestbook]) { overflow-anchor: none; }

#view .gb-wall-mark[data-typed].gb-just-pinned { animation: gb-finished-cut 1.2s ease both; }

#view .gb-live-stage .is-material-text textarea { min-height: 0; }

/* Shared wall coordinates scale with the wall; text and paper details must follow. */
#view .gb-wall > .gb-note[data-world-sized] .gb-letter-glyph { padding: calc(14px * var(--note-scale)); }
#view .gb-wall > .gb-note[data-world-sized][data-medium='paper'] .gb-note-foot { height: calc(36px * var(--note-scale)); padding: calc(8px * var(--note-scale)) 0; margin-inline: calc(19.2px * var(--note-scale)); font-size: calc(8px * var(--note-scale)); gap: calc(8px * var(--note-scale)); flex-wrap: nowrap; }

.gb-free-selection { position:absolute; border:1px dashed #655842; outline:5px solid #fff6; pointer-events:none; }
.gb-free-layer.is-moving canvas { cursor:grab; }
.gb-free-layer.is-moving canvas:active { cursor:grabbing; }
.gb-draft-resume { position:fixed; left:24px; bottom:110px; z-index:80; padding:12px 18px; border:1px solid #8c7d5e55; border-radius:24px; background:#faf6eb; color:#464333; box-shadow:0 3px 18px #39321f20; }
#view .gb-wall > .gb-note[data-world-sized][data-typed] .gb-lettering { flex:none; }
#view .gb-wall > .gb-note[data-world-sized][data-typed] .gb-note-content { height:100%; min-height:0; justify-content:flex-start; }
#view .gb-wall > .gb-note[data-world-sized][data-typed][data-medium='paper'] .gb-note-content { height:calc(100% - 36px * var(--note-scale)); }
