/* Keep the public layout width stable across short pages, loading and scroll locks. */
html { scrollbar-gutter: stable; }
@supports not (scrollbar-gutter: stable) {
  html { overflow-y: scroll; }
}

/* Public collection: calm typography, visible titles and accessible controls. */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-content { position: fixed; top: -80px; left: 16px; z-index: 100; padding: 12px 20px; background: var(--fg); color: var(--bg); border-radius: 8px; }
.skip-content:focus { top: 12px; }
.gallery :is(a, button, input, select):focus-visible, .player button:focus-visible { outline: 3px solid var(--accent, #4679cd); outline-offset: 4px; }
.gallery .site-header { padding-top: 70px; padding-bottom: 26px; }
.gallery .logo { font-size: clamp(40px, 6vw, 72px); }
.gallery .header-kicker { margin-bottom: 16px; }
.gallery .bio { margin-top: 20px; }
.gallery .header-rule { margin-top: 28px; }
.gallery .tabs { gap: 28px; }
.gallery .tab-btn { min-height: 44px; flex-shrink: 0; }
.latest-work { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); max-width: 1116px; margin: 32px auto 12px; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--paper); }
.latest-work[hidden], .discovery[hidden], .discovery-form [hidden] { display: none; }
.latest-media { position: relative; min-height: 320px; max-height: 400px; overflow: hidden; background: var(--soft); }
.latest-media img { width: 100%; height: 100%; position: absolute; object-fit: cover; transition: transform .4s ease; }
.latest-media:hover img { transform: scale(1.025); }
.latest-play { position: absolute; bottom: 24px; left: 24px; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: #fff; color: #171817; box-shadow: 0 4px 24px #0003; font-size: 17px; }
.latest-copy { padding: clamp(24px, 4vw, 48px); align-self: center; min-width: 0; }
.collection-kicker { color: var(--dim); font-size: 11px; font-weight: 650; letter-spacing: .08em; margin: 0 0 12px; }
.latest-copy h2 { font-size: clamp(24px, 3vw, 38px); line-height: 1.18; letter-spacing: -.04em; margin: 0 0 14px; overflow-wrap: anywhere; }
.latest-meta { color: var(--dim); font-size: 12px; }
.latest-description { color: var(--dim); font-size: 14px; line-height: 1.8; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; margin: 22px 0; overflow-wrap: anywhere; }
.latest-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 20px; font-size: 13px; }
.latest-actions a { min-height: 44px; display: inline-flex; align-items: center; gap: 12px; color: var(--fg); text-decoration: none; }
.latest-actions .discovery-primary { background: var(--fg); color: var(--bg); padding: 0 18px; border-radius: 7px; font-weight: 600; }
.discovery { max-width: 1180px; margin: 0 auto; padding: 40px 32px 0; scroll-margin-top: 90px; box-sizing: border-box; }
.collection-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.collection-heading h1 { font-size: clamp(23px, 3vw, 32px); line-height: 1.2; letter-spacing: -.035em; margin: 0; overflow-wrap: anywhere; }
#discovery-count { color: var(--dim); font-size: 12px; flex-shrink: 0; margin: 0 0 2px; }
.discovery-form { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.discovery-form label { display: flex; flex-direction: column; gap: 7px; min-width: 0; flex: 1 1 140px; }
.discovery-form label > span:first-child { font-size: 11px; font-weight: 600; color: var(--dim); }
.discovery-form .discovery-search { flex: 3 1 290px; }
.search-field { display: flex; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); overflow: visible; }
.discovery-form input, .discovery-form select, .discovery-form button { font: inherit; font-size: 13px; min-height: 44px; color: var(--fg); box-sizing: border-box; }
.discovery-form input { width: 100%; min-width: 0; border: 0; background: transparent; padding: 10px 12px; border-radius: 8px; }
.discovery-form select { width: 100%; border: 1px solid var(--line); background: var(--paper); border-radius: 8px; padding: 10px; text-overflow: ellipsis; }
.discovery-form button { cursor: pointer; padding: 0 14px; border: 0; background: var(--soft); border-radius: 7px; white-space: nowrap; }
.discovery-form .discovery-reset { background: transparent; color: var(--dim); text-decoration: underline; text-underline-offset: 4px; }
.gallery .grid:not(.brand-mode):not(.about-mode):not(.timeline-mode):not(.thread-mode) { gap: 24px; padding-top: 24px; }
.gallery .cell { border-radius: 10px; isolation: isolate; }
.gallery .cell .cap { opacity: 1; padding: 64px 18px 18px; background: linear-gradient(transparent, rgba(0,0,0,.86)); }
.gallery .cell .cap-title { font-size: 16px; line-height: 1.4; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.gallery .cell .cap-meta { color: #e1e1dd; margin-top: 7px; }
.gallery .cell:hover .thumb { filter: none; }
.gallery .cell:focus-visible .thumb { transform: scale(1.025); }
.gallery .feed-more { max-width: 1116px; margin: 0 auto 36px; padding: 20px; text-align: center; color: var(--dim); font-size: 13px; }
.feed-more .feed-state { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.feed-more button, .feed-empty button { padding: 11px 20px; min-height: 44px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); color: var(--fg); font: inherit; cursor: pointer; }
.feed-empty { grid-column: 1 / -1; text-align: center; padding: 56px 20px; color: var(--dim); line-height: 1.7; }
.feed-empty p { margin: 0 0 16px; }
.player .msg:not(:empty) { z-index: 8; max-width: min(340px, 85%); padding: 18px 22px; border: 1px solid #ffffff30; border-radius: 12px; background: #15171af2; color: #fff; text-align: center; line-height: 1.6; }
.player .msg button { display: block; margin: 12px auto 0; padding: 10px 18px; min-height: 44px; background: #fff; color: #171817; border: 0; border-radius: 7px; font: inherit; cursor: pointer; }
@media (max-width: 1180px) { .latest-work { margin-inline: 32px; } }
@media (max-width: 760px) {
  .gallery .site-header { padding: 64px 20px 22px; }
  .gallery .tabs { gap: 22px; padding-inline: 20px; }
  .latest-work { margin: 24px 20px 0; }
  .latest-media { min-height: 300px; }
  .latest-copy { padding: 24px; }
  .latest-description { -webkit-line-clamp: 2; margin-block: 16px; }
  .latest-actions { gap: 8px 16px; }
  .discovery { padding: 32px 20px 0; }
  .discovery-form .discovery-search { flex-basis: 100%; }
  .discovery-form label { flex-basis: 100px; }
  .gallery .grid:not(.brand-mode):not(.about-mode):not(.timeline-mode):not(.thread-mode) { gap: 14px; padding-inline: 20px; }
  .gallery .cell .cap { padding: 48px 12px 14px; }
  .gallery .cell .cap-title { font-size: 14px; }
}
@media (max-width: 520px) {
  .latest-work { grid-template-columns: 1fr; }
  .latest-media { min-height: 0; aspect-ratio: 16 / 10; }
  .latest-copy { padding: 24px; }
  .latest-copy h2 { font-size: 26px; }
  .collection-heading { align-items: start; }
  #discovery-count { max-width: 110px; text-align: right; white-space: normal; }
  .discovery-form label { flex-basis: calc(50% - 12px); }
  .gallery .site-controls :is(a, button) { min-height: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  .gallery *, .gallery *::before, .gallery *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Compact discovery bar and shared menus, independent of OS select styling. */
.collection-heading { margin-bottom: 18px; align-items: center; }
.collection-heading h1 { font-size: clamp(20px, 2.2vw, 26px); }
.discovery-form { gap: 10px; padding-bottom: 20px; align-items: center; }
.discovery-form label { flex: 0 1 auto; }
.discovery-form label > span:first-child { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.discovery-form .discovery-search { flex: 1 1 270px; margin-right: auto; max-width: 420px; }
.search-field { background: var(--paper); border-color: var(--line); border-radius: 9px; }
.discovery-form .search-submit { display: grid; place-items: center; background: transparent; padding-inline: 13px; border-radius: 8px; }
.discovery-form .search-submit:hover { background: var(--soft); }
.studio-select { position: relative; display: inline-block; min-width: 0; font-size: 13px; }
.studio-select > select[hidden], .studio-select .select-menu[hidden] { display: none !important; }
.studio-select .select-trigger { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 44px; padding: 10px 13px; border: 1px solid var(--line); border-radius: 9px; background: var(--paper); color: var(--fg); font: inherit; text-align: left; cursor: pointer; }
.studio-select .select-trigger > span:first-child { max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.studio-select .select-caret { color: var(--dim); font-size: 10px; flex-shrink: 0; }
.studio-select .select-trigger:hover, .studio-select .select-trigger[aria-expanded="true"] { background: var(--soft); }
.studio-select .select-menu { position: absolute; top: calc(100% + 7px); left: 0; z-index: 40; display: block; min-width: max(100%, 180px); max-width: min(300px, calc(100vw - 40px)); max-height: min(320px, 50vh); overflow-y: auto; overscroll-behavior: contain; padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); color: var(--fg); box-shadow: 0 14px 38px #0002; }
.studio-select .select-menu.align-end { left: auto; right: 0; }
.studio-select .select-option { display: flex; align-items: center; gap: 9px; width: 100%; min-height: 40px; padding: 10px; border: 0; border-radius: 7px; background: transparent; color: var(--fg); font: inherit; text-align: left; white-space: normal; cursor: pointer; }
.studio-select .select-option:hover, .studio-select .select-option:focus-visible { background: var(--soft); outline: none; }
.studio-select .select-option[aria-selected="true"] { font-weight: 650; }
.studio-select .select-check { display: inline-block; min-width: 14px; }
.studio-select .select-option:disabled { opacity: .45; cursor: default; }
.brand-tools .studio-select { min-width: 160px; }
.discovery-form .discovery-reset { padding-inline: 8px; font-size: 12px; }
@media (max-width: 760px) {
  .discovery-form .discovery-search { flex-basis: 100%; max-width: none; }
  .discovery-form label:not(.discovery-search) { flex: 1 1 0; }
  .discovery-form .studio-select { width: 100%; }
  .discovery-form .select-trigger { padding-inline: 10px; gap: 6px; }
  .discovery-form .select-trigger > span:first-child { max-width: none; }
  .discovery-form .discovery-reset { margin-left: auto; }
}

/* Studio portfolio: an editorial collection with space for the work. */
.gallery .site-header { padding-top: 76px; }
.gallery .logo { font-weight: 520; letter-spacing: -.065em; }
.gallery .tabs { position: sticky; top: 0; z-index: 45; background: var(--bg); border-bottom: 1px solid var(--line); }
.studio-intro { max-width: 1180px; margin: auto; padding: 48px 32px 8px; display: flex; align-items: end; justify-content: space-between; gap: 24px; box-sizing: border-box; }
.studio-intro[hidden] { display: none; }
.studio-intro h2 { margin: 0; max-width: 800px; font-size: clamp(28px, 4vw, 48px); line-height: 1.2; letter-spacing: -.055em; font-weight: 540; text-wrap: balance; }
.studio-intro-copy { max-width: 650px; margin: 18px 0 0; color: var(--dim); font-size: 14px; line-height: 1.85; text-wrap: pretty; }
.studio-text-link { color: var(--fg); text-decoration: none; white-space: nowrap; font-size: 13px; padding-block: 12px; }
.latest-work { display: block; border-radius: 4px; margin-top: 32px; }
.latest-slide { display: grid; grid-template-columns: minmax(0,1.08fr) minmax(0,1fr); }
.latest-media { min-height: 410px; max-height: none; }
.latest-copy h2 { font-weight: 530; }
.latest-controls { display: flex; align-items: center; gap: 8px; padding: 10px 20px; border-top: 1px solid var(--line); }
.latest-controls[hidden] { display: none; }
.latest-counter { font-size: 11px; letter-spacing: .1em; color: var(--dim); font-variant-numeric: tabular-nums; }
.latest-dots { display: flex; gap: 0; margin-right: auto; margin-left: 14px; }
.latest-controls button { border: 0; background: transparent; color: var(--fg); min-width: 44px; min-height: 44px; cursor: pointer; font: inherit; font-size: 14px; border-radius: 6px; }
.latest-controls button:hover { background: var(--soft); }
.latest-controls .latest-pause { font-size: 11px; padding: 0 12px; }
.latest-dots button { min-width: 28px; }
.latest-dots span { display: block; height: 3px; width: 15px; margin: auto; background: var(--line); border-radius: 2px; }
.latest-dots [aria-current="true"] span { background: var(--fg); }
.gallery .grid:not(.brand-mode):not(.about-mode):not(.timeline-mode):not(.thread-mode) { row-gap: 32px; }
.gallery .cell { border-radius: 4px; }
.gallery[data-collection="photo"] .cell { aspect-ratio: auto; overflow: visible; background: transparent; }
.gallery[data-collection="photo"] .cell .thumb { height: auto; aspect-ratio: 4/5; border-radius: 4px; }
.gallery[data-collection="photo"] .cell .cap { position: static; background: transparent; color: var(--fg); padding: 16px 0 0; opacity: 1; }
.gallery[data-collection="photo"] .cell .cap-meta { color: var(--dim); }
.gallery[data-collection="photo"] .cell:hover .thumb { transform: none; }
.gallery[data-collection="photo"] .cell .cap-title { font-weight: 500; font-size: 15px; }
.gallery .grid.thread-mode { max-width: 680px; width: 100%; box-sizing: border-box; }
.gallery .th-post { padding-block: 22px; }
.gallery .th-text { font-size: 14px; line-height: 1.6; }
.gallery .brand-hero { text-align: left; padding-bottom: 28px; }
.gallery .brand-hero-title { font-size: clamp(30px,4vw,48px); font-weight: 540; letter-spacing: -.05em; line-height: 1.2; }
.gallery .brand-hero-sub { max-width: 650px; line-height: 1.85; margin: 18px 0 0; }
.gallery .brand-tile { flex-direction: column; padding: 28px 18px 14px; gap: 22px; border-radius: 4px; }
.gallery .brand-tile-logo { flex: 1; min-height: 74px; }
.brand-tile-caption { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid var(--line); padding-top: 12px; font-size: 11px; color: var(--dim); }
.brand-tile-caption span:first-child { color: var(--fg); overflow-wrap: anywhere; }
.brand-tile-caption span:last-child { flex-shrink: 0; }
.studio-practice h3 { font-size: clamp(25px,3vw,36px); line-height: 1.3; font-weight: 520; letter-spacing: -.04em; }
.studio-practice > div { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); margin-top: 28px; border-top: 1px solid var(--line); }
.studio-practice article { padding: 28px 24px 4px 0; }
.studio-practice h4 { font-size: 18px; margin: 16px 0 10px; font-weight: 540; }
.studio-practice article p { color: var(--dim); font-size: 14px; line-height: 1.8; }
.studio-paths { max-width: 1116px; margin: 56px auto 0; border-top: 1px solid var(--line); padding: 32px 0; }
.studio-path-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }
.studio-path-grid a { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 22px 18px; border: 1px solid var(--line); color: var(--fg); text-decoration: none; font-size: 16px; }
.studio-path-grid a:hover { background: var(--soft); }
/* Detail: media on a dark stage, a readable project sheet alongside it. */
body.player { grid-template-columns: minmax(0,1fr) minmax(360px,440px); }
.player .info-panel { padding: 80px 32px 36px; background: var(--paper); color: var(--fg); }
.player .info-inner { gap: 20px; }
.player .info-title { font-size: clamp(26px,2.5vw,34px); font-weight: 550; line-height: 1.25; color: var(--fg); }
.player .info-desc { font-size: 14px; line-height: 1.9; color: var(--dim); }
.project-context { font-size: 11px; color: var(--dim); letter-spacing: .1em; border-bottom: 1px solid var(--line); padding-bottom: 18px; }
.project-explore { margin-top: 16px; border-top: 1px solid var(--line); }
.project-explore a { display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--fg); text-decoration: none; font-size: 13px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.project-explore a:hover { color: var(--dim); }
.player .thread-page { max-width: 720px; width: 100%; box-sizing: border-box; padding: 88px 24px 48px; }
.story-heading { margin-bottom: 22px; }
.story-heading h1 { font-size: clamp(23px,3vw,30px); line-height: 1.35; letter-spacing: -.04em; font-weight: 550; text-wrap: balance; overflow-wrap: anywhere; }
.player .tp-text { font-size: 14px; line-height: 1.6; }
.player .tp-carousel { margin-top: 18px; }
@media (max-width: 1180px) { .studio-paths { margin-inline: 32px; } }
@media (max-width: 900px) {
  body.player { display: block; height: auto; min-height: 100svh; overflow-y: auto; background: var(--paper); color: var(--fg); }
  .player .stage-wrap { height: min(80svh,820px); min-height: 340px; }
  .player .stage { padding: 58px 8px 16px; }
  .player .info-panel { position: relative; inset: auto; padding: 28px 24px 40px; pointer-events: auto; border: 0; background: var(--paper); transform: none !important; opacity: 1 !important; }
  .player .info-title, .player .info-desc { display: block; overflow: visible; -webkit-line-clamp: unset; }
  .player .info-title { font-size: 28px; }
  .player .info-inner { gap: 18px; }
  .player .info-more { margin-top: 0; }
  .player #desc-more { display: none; }
  .player .chrome-peek { display: none !important; }
  .player .info-links { display: flex; }
  .player .thread-page { padding-top: 86px; }
  .player .photo-stage { height: 100%; }
}
@media (max-width: 760px) {
  .studio-intro { padding: 32px 20px 0; align-items: start; flex-direction: column; gap: 12px; }
  .studio-intro h2 { font-size: 32px; }
  .studio-intro-copy { font-size: 13px; margin-top: 14px; }
  .latest-slide { grid-template-columns: 1fr 1fr; }
  .latest-media { min-height: 330px; }
  .latest-copy { padding: 24px; }
  .studio-paths { margin: 36px 20px 0; }
  .studio-path-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .studio-path-grid a { font-size: 14px; padding: 20px 14px; }
  .studio-practice > div { grid-template-columns: 1fr; }
  .studio-practice article { padding: 24px 0; border-bottom: 1px solid var(--line); }
  .gallery .brand-tile { padding-inline: 12px; }
  .brand-tile-caption { align-items: start; flex-direction: column; gap: 4px; }
}
@media (max-width: 520px) {
  .latest-slide { grid-template-columns: 1fr; }
  .latest-media { aspect-ratio: 16/11; min-height: 0; }
  .latest-controls { gap: 2px; padding: 6px 10px; }
  .latest-counter { font-size: 10px; }
  .latest-dots { margin-left: 6px; }
  .latest-dots button { min-width: 20px; }
  .latest-dots span { width: 12px; }
  .latest-controls .latest-pause { padding-inline: 6px; }
  .player .thread-page { padding-inline: 20px; }
}
.gallery .brand-tile { aspect-ratio: auto; min-height: 190px; }
.gallery .brand-tile-logo { height: 88px; flex: none; min-height: 0; padding: 12px; }
.gallery .brand-logo-img { max-height: 64px; }
.gallery .preserve-dark-logo .brand-tile-caption { color: #bcbfc6; border-color: #ffffff30; }
.gallery .preserve-dark-logo .brand-tile-caption span:first-child { color: #f5f5f5; }
.gallery[data-collection="photo"] .cell { box-shadow: none; }
.gallery[data-collection="photo"] .cell-mosaic { position: relative; height: auto; aspect-ratio: 4/5; }
.project-pagination { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 24px; }
.project-pagination button { min-width: 0; min-height: 70px; padding: 12px 0; border: 0; background: transparent; color: var(--fg); cursor: pointer; font: inherit; text-align: left; }
.project-pagination span { display: block; color: var(--dim); font-size: 11px; margin-bottom: 10px; }
.project-pagination strong { font-size: 13px; font-weight: 500; line-height: 1.6; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.project-pagination button:disabled { opacity: .35; cursor: default; }
.player .project-pagination button:hover:not(:disabled) strong { text-decoration: underline; text-underline-offset: 4px; }
@media (prefers-reduced-motion: reduce) { .player *, .player *::before, .player *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* The studio name leads; the introduction and real channel links support it. */
.gallery .header-content { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: end; }
.gallery .header-summary { padding-bottom: 4px; }
.gallery .header-summary .bio { margin: 0; max-width: 410px; font-size: clamp(15px,1.5vw,18px); line-height: 1.75; color: var(--fg); text-wrap: balance; }
.header-channels { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 22px; }
.header-channels[hidden] { display: none; }
.header-channels a { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; color: var(--dim); font-size: 12px; text-decoration: none; border-bottom: 1px solid transparent; transition: color .2s, border-color .2s; }
.header-channels a:hover { color: var(--fg); border-color: var(--fg); }
.header-channels a > span:last-child { transition: transform .25s ease; }
.header-channels a:hover > span:last-child { transform: translate(2px,-2px); }
@keyframes studio-arrive { from { opacity: .1; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes studio-image-drift { from { transform: scale(1.05) translate(-1%, .6%); } to { transform: scale(1.23) translate(1.5%, -1%); } }
@keyframes studio-copy-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: no-preference) {
  .studio-arrive { animation: studio-arrive .65s cubic-bezier(.2,.7,.2,1) var(--arrival-delay,0ms) backwards; }
  .latest-slide .latest-media img { animation: studio-image-drift 6.5s ease-in-out infinite alternate both; }
  .latest-slide .latest-copy { animation: studio-copy-in .65s cubic-bezier(.2,.7,.2,1) both; }
  .player .story-heading { animation: studio-copy-in .6s ease both; }
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .gallery .cell .thumb { transition: transform .65s cubic-bezier(.2,.7,.2,1), filter .4s; }
  .gallery .cell:hover .thumb { transform: scale(1.035); }
  .gallery[data-collection="photo"] .cell { overflow: hidden; }
  .gallery[data-collection="photo"] .cell:hover .thumb { transform: scale(1.02); }
  .gallery .about-work-media img { transition: transform .65s cubic-bezier(.2,.7,.2,1); }
  .gallery .about-work:hover .about-work-media img { transform: scale(1.035); }
  .player .still-thumb { transition: transform .3s ease; }
  .player .still-thumb:hover { transform: translateY(-3px); }
}
@media (max-width:760px) {
  .gallery .header-content { grid-template-columns: 1fr; gap: 26px; }
  .gallery .header-summary .bio { max-width: 460px; font-size: 15px; }
  .header-channels { margin-top: 12px; gap: 4px 18px; }
  .gallery .site-header { padding-bottom: 18px; }
}
/* Journal: ongoing projects lead into a selected reading list and the original archive. */
.studio-journal {max-width:1180px;margin:0 auto;padding:48px 32px 0;box-sizing:border-box}
.studio-journal[hidden]{display:none}
.journal-heading{margin-bottom:24px}.journal-heading h2,.journal-digital h2,.journal-future h2,.journal-identity h2{font-size:clamp(25px,3vw,36px);font-weight:540;letter-spacing:-.04em;line-height:1.3;margin:0 0 12px}
.journal-heading p,.journal-digital>p,.journal-future>p,.journal-identity p{color:var(--dim);font-size:14px;line-height:1.9;max-width:740px}
.journal-projects{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin-bottom:24px;align-items:start}
.journal-project{display:block;background:var(--paper);border:1px solid var(--line);color:var(--fg);text-decoration:none;min-width:0;border-radius:4px;overflow:hidden;scroll-margin-top:90px}
a.journal-project,.journal-project summary{padding:28px;list-style:none;cursor:pointer;position:relative;min-height:220px;box-sizing:border-box}
.journal-project summary::-webkit-details-marker{display:none}.journal-project summary:focus-visible{outline:3px solid var(--accent);outline-offset:-4px}
.journal-number{display:block;font-size:54px;line-height:1;margin-bottom:30px;font-weight:400;opacity:.26;letter-spacing:-.06em}
.journal-state{font-size:11px;line-height:1.6;display:block;opacity:.7}.journal-project h3{font-size:22px;font-weight:520;letter-spacing:-.03em;margin:12px 0 24px}.journal-open{font-size:12px}
.journal-project.thinkpad{background:#222522;color:#f0f0e9}.journal-project.drawer{background:#eeeae2;color:#292b28}.journal-project.skadis{background:#404b3c;color:#f6f1e8}
.journal-project-body{padding:0 28px 28px;font-size:14px;line-height:1.9}.journal-project-body p{margin:0 0 18px}.journal-project-body a{color:inherit;text-underline-offset:4px}
.journal-digital,.journal-future{padding:36px 0;border-block:1px solid var(--line);margin:48px 0}
.journal-featured{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px}
.journal-story{color:var(--fg);text-decoration:none;min-width:0}.journal-story img{width:100%;aspect-ratio:4/3;object-fit:cover;border-radius:4px;display:block}.journal-story>div{padding:18px 0}.journal-story h3{font-size:19px;line-height:1.4;font-weight:530;margin:8px 0 14px}.journal-story span{font-size:12px;color:var(--dim)}
.journal-featured button{border:1px solid var(--line);background:var(--paper);color:var(--fg);padding:18px;font:inherit;cursor:pointer}
.journal-archive-note{font-size:13px;color:var(--dim);line-height:1.8;margin:0}
.journal-identity>div{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:28px;margin-top:32px}.journal-identity article{border-top:1px solid var(--line);padding-top:20px}.journal-identity h3{font-size:18px;line-height:1.5;font-weight:540}
#journal-selected{scroll-margin-top:90px}
@media(max-width:760px){.studio-journal{padding:32px 20px 0}.journal-projects{grid-template-columns:1fr;gap:12px}a.journal-project,.journal-project summary{min-height:0;padding:24px}.journal-number{float:right;font-size:48px;margin:0 0 0 16px}.journal-project h3{margin-bottom:18px}.journal-featured{grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.journal-identity>div{grid-template-columns:1fr;gap:12px}.journal-project-body{padding-inline:24px}}
@media(max-width:420px){.journal-featured{grid-template-columns:1fr}}

/* Project notes and brand collaboration stories. */
.case-study { margin-top: 64px; padding-top: 40px; border-top: 1px solid var(--line); }
.case-study h2,.brand-case-section h2 { font-size: clamp(24px,3vw,36px); line-height: 1.3; letter-spacing: -.04em; font-weight: 550; margin: 12px 0; }
.case-study header>p:last-child,.brand-case-section header>p:last-child { color: var(--dim); line-height: 1.8; max-width: 660px; }
.case-steps { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 28px; margin: 36px 0; }
.case-step-number { display: block; color: var(--dim); font-size: 12px; margin-bottom: 18px; }
.case-steps h3 { font-size: 17px; margin: 0 0 14px; font-weight: 550; }
.case-steps p { color: var(--dim); font-size: 15px; line-height: 1.9; margin: 0; word-break: keep-all; overflow-wrap: anywhere; }
.case-inquire { display: inline-flex; padding: 14px 18px; border: 1px solid var(--line); border-radius: 6px; color: var(--fg); text-decoration: none; font-size: 14px; }
.case-related { margin-top: 48px; }
.case-related>h2 { font-size: 21px; }
.case-stories { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 22px; margin-top: 26px; }
.case-story { display: flex; flex-direction: column; min-width: 0; overflow: hidden; text-decoration: none; color: var(--fg); border: 1px solid var(--line); border-radius: 8px; }
.case-story img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; transition: filter .25s ease; }
.case-story:hover img { filter: brightness(1.08); }
.case-story>div { padding: 22px; }
.case-story h3 { font-size: clamp(18px,2vw,24px); font-weight: 550; line-height: 1.45; margin: 10px 0 22px; overflow-wrap: anywhere; }
.case-story span { font-size: 12px; color: var(--dim); }
.case-story:focus-visible,.case-inquire:focus-visible,.brand-collection-tabs a:focus-visible { outline: 2px solid var(--fg); outline-offset: 4px; }
.brand-case-section { margin: 4px 0 56px; }
.brand-directory-heading { font-size: 24px; font-weight: 550; margin: 8px 0 0; }
.studio-intro:has(.brand-collection-tabs) { display: grid; grid-template-columns: 1fr auto; }
.brand-collection-tabs { grid-column: 1/-1; display: flex; flex-wrap: wrap; gap: 10px; }
.brand-collection-tabs a { color: var(--dim); border: 1px solid var(--line); padding: 10px 15px; border-radius: 30px; text-decoration: none; font-size: 13px; }
.brand-collection-tabs a[aria-current] { color: var(--bg); background: var(--fg); border-color: var(--fg); }
.studio-intro>.brand-case-section { grid-column: 1/-1; width: 100%; margin: 28px 0 0; }
.studio-intro .case-stories { grid-template-columns: minmax(0,600px); }
@media(max-width:700px) {
 .case-steps,.case-stories { grid-template-columns: 1fr; gap: 20px; }
 .case-steps article { border-top: 1px solid var(--line); padding-top: 20px; }
 .case-step-number { margin-bottom: 10px; }
 .case-study { margin-top: 40px; padding-top: 28px; }
 .case-inquire { display: flex; justify-content: center; text-align: center; }
 .studio-intro:has(.brand-collection-tabs) { grid-template-columns: 1fr; }
 .case-story>div { padding: 20px; }
}
@media(prefers-reduced-motion:reduce) { .case-story img { transition: none; } }

.prose-paragraph { display: block; white-space: normal; }
.prose-paragraph + .prose-paragraph { margin-top: .7em; }

/* Keep prose readable on wide screens while letting it fit smaller viewports. */
.gallery .th-text, .gallery .tl-text, .player .tp-text { max-width: 720px; }
.prose-paragraph { overflow-wrap: anywhere; }

.latest-work[data-motion-paused="true"] .latest-media img { animation-play-state: paused; }

/* Clear entry points from work to a collaboration conversation. */
.brand-hero-actions { display:flex; flex-wrap:wrap; align-items:center; gap:18px 28px; margin-top:28px; }
.brand-hero-actions .case-inquire { background:var(--fg); color:var(--bg); }
#brand-directory { scroll-margin-top:100px; }
.brand-form .bf-field { display:flex; flex-direction:column; gap:8px; flex:1 1 0; min-width:0; font-size:13px; }
.brand-form .bf-row { gap:16px; margin-bottom:18px; }
.bf-help { color:var(--dim); font-size:12px; line-height:1.65; margin:10px 0 0; }
.project-explore .project-inquiry { color:var(--fg); font-weight:600; }
@media(max-width:640px) {
 .brand-hero-actions { align-items:stretch; }
 .brand-hero-actions .case-inquire { width:100%; box-sizing:border-box; }
 .brand-form input,.brand-form textarea { font-size:16px; }
}

/* About: one spacing rhythm across legacy and new editorial sections. */
.gallery .about-page { --about-gap:56px; display:grid; gap:var(--about-gap); padding:40px 32px 72px; }
.gallery .about-page > .about-section { margin:0; padding:0; min-width:0; }
.gallery .about-page > .about-section:not(.about-contact) { background:transparent; border:0; border-radius:0; box-shadow:none; }
.gallery .about-page .about-hero-top { margin:0 0 28px; gap:20px; }
.gallery .about-page .about-label,.gallery .about-page .collection-kicker { margin:0 0 12px; line-height:1.5; }
.gallery .about-page .about-hero-top .about-label { margin:0; }
.gallery .about-page .about-hero-statement { font-size:clamp(32px,4.6vw,56px); line-height:1.25; letter-spacing:-.045em; word-break:keep-all; overflow-wrap:anywhere; }
.gallery .about-page .about-hero-bottom { margin-top:28px; gap:32px; align-items:start; }
.gallery .about-page .about-text { margin:0; font-size:14px; line-height:1.8; }
.gallery .about-page .about-trust { padding:24px 0; border-block:1px solid var(--line); }
.gallery .about-page .about-trust > div { padding-block:0; }
.gallery .about-page .journal-identity > h2,
.gallery .about-page .studio-practice > h3,
.gallery .about-page .about-section-head h3 { margin:0; font-size:clamp(24px,3vw,32px); line-height:1.4; letter-spacing:-.035em; overflow-wrap:anywhere; }
.gallery .about-page .journal-identity > p:not(.collection-kicker) { margin:16px 0 0; max-width:680px; }
.gallery .about-page .journal-identity > div { margin-top:28px; gap:24px; }
.gallery .about-page .journal-identity article h3 { margin:0 0 12px; font-size:17px; }
.gallery .about-page .journal-identity article p { margin:0; font-size:14px; line-height:1.8; }
.gallery .about-page .journal-identity > .studio-text-link { display:inline-flex; margin-top:24px; }
.gallery .about-page .studio-practice > div { margin-top:24px; gap:24px; }
.gallery .about-page .studio-practice article { padding:24px 0 0; min-width:0; }
.gallery .about-page .studio-practice h4 { margin:12px 0; font-size:17px; line-height:1.5; }
.gallery .about-page .studio-practice article p { margin:0; line-height:1.8; }
.gallery .about-page .about-section-head { margin:0 0 24px; grid-template-columns:140px minmax(0,1fr); gap:24px; }
.gallery .about-page .about-section-head .about-label { margin:0; }
.gallery .about-page .member-card { padding:24px; min-height:0; }
.gallery .about-page .member-bio { overflow-wrap:anywhere; }
.gallery .about-page > .about-contact { padding:36px; border-radius:8px; }
.gallery .about-page .about-contact-title { margin:0 0 16px; font-size:clamp(26px,3.5vw,38px); line-height:1.35; max-width:85%; }
.gallery .about-page .about-contact .contact-row { margin-top:24px; flex-wrap:wrap; gap:12px; }
.gallery .about-page .contact-email { overflow-wrap:anywhere; min-width:0; }
@media(max-width:760px) {
 .gallery .about-page { --about-gap:40px; padding:28px 20px 48px; }
 .gallery .about-page .about-hero-top { margin-bottom:24px; align-items:start; }
 .gallery .about-page .about-hero-bottom { grid-template-columns:1fr; margin-top:24px; gap:24px; }
 .gallery .about-page .journal-identity > div,.gallery .about-page .studio-practice > div { grid-template-columns:1fr; gap:24px; }
 .gallery .about-page .studio-practice article { padding:0; border:0; }
 .gallery .about-page .studio-practice > div { padding-top:24px; }
 .gallery .about-page .about-section-head { grid-template-columns:1fr; gap:8px; margin-bottom:20px; }
 .gallery .about-page .about-trust > div { padding-inline:12px; }
 .gallery .about-page .about-trust > div:first-child { padding-left:0; }
 .gallery .about-page .about-trust > div:last-child { padding-right:0; }
 .gallery .about-page .about-trust span { font-size:10px; letter-spacing:0; line-height:1.5; }
 .gallery .about-page .member-card { padding:20px; }
 .gallery .about-page > .about-contact { padding:28px 22px; }
}

/* Compact screens: keep every carousel control reachable and inputs readable. */
@media(max-width:520px) {
 .latest-controls { display:grid; grid-template-columns:minmax(0,1fr) 44px 44px auto; column-gap:4px; row-gap:0; padding:8px 12px; }
 .latest-counter { grid-column:1; grid-row:1; }
 .latest-dots { grid-column:1/-1; grid-row:2; justify-content:center; margin:0; }
 .latest-dots button { min-width:32px; }
 .latest-controls [data-step="-1"] { grid-column:2; grid-row:1; }
 .latest-controls [data-step="1"] { grid-column:3; grid-row:1; }
 .latest-controls .latest-pause { grid-column:4; grid-row:1; white-space:nowrap; }
 .gallery #discovery-query,.gallery #brand-search { font-size:16px; }
}

/* Project cards invert their own palette while the number rolls into an arrow. */
.journal-project.thinkpad { --project-bg:#222522;--project-fg:#f0f0e9; }
.journal-project.drawer { --project-bg:#eeeae2;--project-fg:#292b28; }
.journal-project.skadis { --project-bg:#404b3c;--project-fg:#f6f1e8; }
.journal-project { transition:background-color 380ms ease,color 380ms ease,border-color 380ms ease; }
.journal-number { position:relative;overflow:hidden;transition:opacity 380ms ease;width:2.2em; }
.journal-number>span { display:block;transition:transform 480ms cubic-bezier(.22,1,.36,1); }
.journal-number>span+span { position:absolute;top:100%;left:0; }
.journal-open { display:inline-block;transition:letter-spacing 380ms ease; }
.journal-project:focus-visible,.journal-project:has(summary:focus-visible) { background:var(--project-fg);color:var(--project-bg);border-color:var(--project-fg); }
.journal-project:focus-visible .journal-number,.journal-project:has(summary:focus-visible) .journal-number { opacity:.8; }
.journal-project:focus-visible .journal-number>span,.journal-project:has(summary:focus-visible) .journal-number>span { transform:translateY(-100%); }
@media(hover:hover) and (pointer:fine) {
 a.journal-project:hover,.journal-project:has(summary:hover) { background:var(--project-fg);color:var(--project-bg);border-color:var(--project-fg); }
 a.journal-project:hover .journal-number,.journal-project:has(summary:hover) .journal-number { opacity:.8; }
 a.journal-project:hover .journal-number>span,.journal-project:has(summary:hover) .journal-number>span { transform:translateY(-100%); }
 a.journal-project:hover .journal-open,.journal-project summary:hover .journal-open { letter-spacing:.025em; }
}
a.journal-project:active,.journal-project:has(summary:active) { background:var(--project-fg);color:var(--project-bg); }
@media(prefers-reduced-motion:reduce) {
 .journal-project,.journal-number,.journal-number>span,.journal-open { transition:none; }
 a.journal-project:hover .journal-number>span,.journal-project:has(summary:hover) .journal-number>span,.journal-project:focus-visible .journal-number>span,.journal-project:has(summary:focus-visible) .journal-number>span { transform:none; }
}

/* Notes are a compact reading list; attachments signal depth without filling the feed. */
.gallery[data-collection="thread"] .discovery { max-width:744px;padding:32px 32px 0; }
.gallery[data-collection="thread"] .collection-heading { margin-bottom:16px;align-items:center; }
.gallery[data-collection="thread"] .collection-heading h1 { font-size:24px; }
.gallery[data-collection="thread"] .discovery-form { gap:8px;padding-bottom:18px; }
.gallery[data-collection="thread"] .discovery-form .discovery-search { flex:1 0 100%; }
.gallery[data-collection="thread"] .discovery-form label:not(.discovery-search) { flex:0 1 auto; }
.gallery .grid.thread-mode { width:100%;max-width:744px;padding:0 32px 32px;box-sizing:border-box; }
.grid.thread-mode .tl-year { margin:20px 0 0;padding:0 0 6px; }
.note-summary { padding:18px 0;border-bottom:1px solid var(--line);min-width:0; }
.note-summary-head { display:flex;align-items:center;gap:8px;color:var(--dim);font-size:11px; }
.note-summary-head .th-avatar { width:26px;height:26px;font-size:12px; }
.note-summary-author { color:var(--fg);font-size:13px;font-weight:600; }
.note-summary-head time { margin-left:auto; }
.note-edit { font:inherit;color:var(--dim);background:transparent;border:0;cursor:pointer;padding:6px; }
.note-summary-open { display:block;color:var(--fg);text-decoration:none;margin:8px 0 0 34px; }
.note-excerpt { margin:0;font-size:14px;line-height:1.6;display:block;overflow:visible;overflow-wrap:anywhere; }
.note-attachments { display:flex;align-items:center;gap:9px;margin-top:10px;color:var(--dim);font-size:11px;min-width:0; }
.note-mini-group { display:flex;gap:4px;flex-shrink:0; }
.note-mini { display:grid;place-items:center;width:40px;height:40px;border-radius:6px;overflow:hidden;background:var(--soft); }
.note-mini img { width:100%;height:100%;object-fit:cover; }
.note-link-hint { overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border:1px solid var(--line);border-radius:6px;padding:5px 8px; }
.note-summary-footer { display:flex;justify-content:space-between;margin:8px 0 0 34px;font-size:10px;color:var(--dim); }
@media(hover:hover) { .note-summary-open:hover .note-excerpt { color:var(--dim); } }
.note-overlay { position:fixed;inset:0;margin:auto;overflow:auto;width:min(760px,calc(100% - 32px));max-width:none;max-height:88dvh;padding:0;border:1px solid var(--line);border-radius:16px;color:var(--fg);background:var(--bg);overscroll-behavior:contain;box-sizing:border-box; }
.note-overlay::backdrop { background:#000a;backdrop-filter:blur(6px); }
.note-overlay-bar { position:sticky;top:0;z-index:2;display:flex;align-items:center;gap:16px;padding:12px 20px;background:var(--bg);border-bottom:1px solid var(--line);font-size:12px; }
.note-overlay-bar>a { margin-left:auto;color:var(--dim);text-decoration:none; }
.note-overlay-bar>button { width:36px;height:36px;font-size:26px;border:0;border-radius:50%;background:var(--soft);color:var(--fg);cursor:pointer; }
.note-overlay-content { padding:12px 24px 28px; }
.note-overlay .th-post { border:0;cursor:default; }
.note-overlay .th-line,.note-overlay .th-more { display:none!important; }
.note-overlay .th-text { display:block;max-height:none;-webkit-line-clamp:unset;font-size:14px;line-height:1.7; }
.note-overlay .th-carousel { height:auto;max-height:none; }
.note-overlay .th-media { height:320px;flex-shrink:0; }
.note-overlay .th-media img,.note-overlay .th-media video { height:100%;max-width:560px;object-fit:contain; }
.note-overlay .th-meta { flex-wrap:wrap;white-space:normal; }
@media(max-width:760px) {
 .gallery[data-collection="thread"] .discovery { padding:24px 20px 0; }
 .gallery .grid.thread-mode { padding:0 20px 24px; }
 .note-overlay { width:calc(100% - 16px);max-height:92dvh;border-radius:12px; }
 .note-overlay-content { padding:8px 16px 20px; }
 .note-overlay .th-rail { display:none; }
 .note-overlay .th-media { height:260px; }
 .note-overlay .th-media img,.note-overlay .th-media video { max-width:calc(100vw - 64px); }
 .note-overlay .th-head { flex-wrap:wrap; }
}

/* Preserve the shared page width; organize each note internally. */
.gallery[data-collection="thread"] .discovery,.gallery .grid.thread-mode { max-width:1180px; }
.gallery[data-collection="thread"] .discovery-form .discovery-search { flex:1 1 270px;max-width:none; }
.note-summary { padding:20px 0; }
.note-summary-head { justify-content:flex-start;flex-wrap:wrap; }
.note-summary-head time { margin-left:4px; }
.note-summary-topic { padding-left:10px;margin-left:2px;border-left:1px solid var(--line); }
.note-summary-head .note-edit { margin-left:auto; }
.note-summary-open { display:grid;grid-template-columns:minmax(0,1fr) 224px;align-items:start;gap:28px; }
.note-summary-open:not(:has(.note-attachments)) { grid-template-columns:1fr; }
.note-summary-copy { min-width:0; }
.note-read { display:inline-block;margin-top:12px;color:var(--dim);font-size:11px; }
.note-attachments { display:grid;grid-template-columns:1fr auto;gap:7px 8px;margin:0;align-items:center; }
.note-mini-group { grid-column:1/-1;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px; }
.note-mini { width:100%;height:64px;border-radius:6px; }
.note-media-count { white-space:nowrap; }
.note-link-hint { justify-self:end;max-width:150px;box-sizing:border-box;border:0;padding:0;border-radius:0; }
.note-attachments:not(:has(.note-mini-group)) .note-link-hint { grid-column:1/-1;justify-self:start;border:1px solid var(--line);padding:8px 10px;border-radius:6px;max-width:100%; }
@media(max-width:760px) {
 .gallery[data-collection="thread"] .discovery-form .discovery-search { flex-basis:100%; }
 .note-summary-open { grid-template-columns:minmax(0,1fr) 144px;gap:16px; }
 .note-mini { height:48px; }
 .note-attachments { grid-template-columns:1fr;gap:5px; }
 .note-link-hint { justify-self:start;max-width:100%; }
}
@media(max-width:480px) {
 .note-summary-topic { flex-basis:calc(100% - 34px);margin-left:34px;padding:0;border:0; }
 .note-summary-open { grid-template-columns:1fr;gap:10px; }
 .note-attachments { display:flex;flex-wrap:wrap;gap:8px; }
 .note-mini-group { display:flex;gap:4px; }
 .note-mini { width:38px;height:38px; }
 .note-read { margin-top:8px; }
}
/* Note text follows the shared left edge instead of an indented centered column. */
.note-summary { text-align:left; }
.note-summary-open { margin-left:0;text-align:left; }
.note-summary-copy,.note-excerpt { text-align:left; }

/* Link card precedes the media bundle in the compact attachment area. */
.note-media-bundle { display:flex;flex-direction:column;gap:6px;min-width:0; }
.note-attachments { display:flex;align-items:flex-start;gap:12px; }
.note-attachments .note-media-bundle { width:224px;flex:0 0 224px; }
.note-summary-open:has(.note-link-hint):has(.note-media-bundle) { grid-template-columns:minmax(0,1fr) 360px; }
.note-attachments .note-link-hint { display:block;flex:1 1 0;min-width:0;max-width:none;padding:10px;border:1px solid var(--line);border-radius:8px;white-space:normal;overflow-wrap:anywhere;font-size:11px; }
.note-attachments .note-link-hint>span { display:block;font-size:17px;margin-bottom:5px; }
.note-overlay .note-media-stage { display:block;height:clamp(240px,48dvh,480px);overflow:hidden; }
.note-overlay .note-media-stage .th-media { width:100%;height:100%;max-height:none;max-width:none;min-height:0;min-width:0;border:0;background:var(--soft);border-radius:8px; }
.note-overlay .note-media-stage .th-media[hidden] { display:none; }
.note-overlay .note-media-stage :is(img,video) { width:100%;height:100%;max-width:100%;max-height:100%;min-width:0;object-fit:contain; }
.note-image-zoom { display:block;width:100%;height:100%;padding:0;border:0;background:transparent;cursor:zoom-in; }
.note-media-controls { display:flex;align-items:center;justify-content:space-between;margin:10px 0;font-size:12px;color:var(--dim); }
.note-media-controls button { width:40px;height:36px;border:1px solid var(--line);border-radius:6px;background:var(--soft);color:var(--fg);cursor:pointer; }
.note-media-controls button:disabled { opacity:.3;cursor:default; }
.note-media-thumbs { display:flex;gap:6px;overflow-x:auto;padding:3px 0 8px; }
.note-media-thumbs button { width:48px;height:48px;flex:0 0 48px;padding:2px;border:2px solid transparent;border-radius:7px;background:var(--soft);color:var(--fg);cursor:pointer; }
.note-media-thumbs button[aria-pressed="true"] { border-color:var(--fg); }
.note-media-thumbs img { width:100%;height:100%;object-fit:cover;border-radius:3px; }
.note-media-controls[hidden],.note-media-thumbs[hidden] { display:none; }
.note-image-viewer { position:fixed;inset:0;margin:auto;width:calc(100vw - 32px);height:calc(100dvh - 32px);max-width:none;max-height:none;padding:0;border:0;background:transparent;overflow:hidden; }
.note-image-viewer::backdrop { background:#000e; }
.note-image-viewer>img { width:100%;height:100%;object-fit:contain; }
.note-image-viewer>button { position:absolute;right:8px;top:8px;width:44px;height:44px;border:1px solid #fff5;border-radius:50%;background:#111c;color:white;font-size:28px;cursor:pointer; }
@media(max-width:900px) {
 .note-summary-open:has(.note-link-hint):has(.note-media-bundle) { grid-template-columns:minmax(0,1fr) 270px; }
 .note-attachments .note-media-bundle { width:156px;flex-basis:156px; }
}
@media(max-width:620px) {
 .note-summary-open,.note-summary-open:has(.note-link-hint):has(.note-media-bundle) { grid-template-columns:1fr; }
 .note-attachments { flex-wrap:wrap;justify-content:flex-start; }
 .note-attachments .note-link-hint { flex:0 1 130px; }
 .note-attachments .note-media-bundle { width:144px;flex-basis:144px; }
 .note-attachments .note-mini-group { display:grid;grid-template-columns:repeat(3,1fr); }
 .note-attachments .note-mini { width:100%;height:44px; }
}
@media(min-width:621px) and (max-width:760px) {
 .note-summary-open:not(:has(.note-link-hint)) { grid-template-columns:minmax(0,1fr) 156px; }
 .note-summary-open:not(:has(.note-attachments)) { grid-template-columns:1fr; }
}

/* Compact Open Graph card shares the exact thumbnail height, including fallbacks. */
.note-attachments { --note-thumb-height:64px; }
.note-attachments .note-mini { height:var(--note-thumb-height); }
.note-summary-open:has(.note-link-hint):has(.note-media-bundle) { grid-template-columns:minmax(0,1fr) 400px; }
.note-attachments .note-link-hint,.note-attachments:not(:has(.note-mini-group)) .note-link-hint { display:grid;grid-template-columns:44px minmax(0,1fr);align-items:center;height:var(--note-thumb-height);padding:0;gap:8px;overflow:hidden;border:1px solid var(--line);border-radius:6px;background:var(--soft); }
.note-attachments .note-link-hint>span { margin:0;font-size:inherit; }
.note-og-picture { position:relative;display:grid!important;place-items:center;align-self:stretch;height:100%;color:var(--dim);background:var(--paper); }
.note-og-picture img { position:absolute;inset:0;width:100%;height:100%;object-fit:cover; }
.note-og-copy { display:flex!important;flex-direction:column;gap:4px;min-width:0;padding-right:8px; }
.note-og-title { display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;font-size:11px;line-height:1.3;color:var(--fg);font-weight:500;overflow-wrap:anywhere; }
.note-og-site { display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10px;color:var(--dim); }
@media(max-width:900px) {
 .note-summary-open:has(.note-link-hint):has(.note-media-bundle) { grid-template-columns:minmax(0,1fr) 320px; }
}
@media(max-width:760px) { .note-attachments { --note-thumb-height:48px; } }
@media(max-width:620px) {
 .note-summary-open:has(.note-link-hint):has(.note-media-bundle) { grid-template-columns:1fr; }
 .note-attachments { --note-thumb-height:52px;gap:8px; }
 .note-attachments .note-link-hint { flex:0 1 152px;grid-template-columns:36px minmax(0,1fr);gap:6px; }
 .note-attachments .note-media-bundle { flex:0 0 132px;width:132px; }
}

/* Landscape link thumbnails retain a 16:9 frame at the shared media height. */
.note-summary-open:has(.note-link-hint):has(.note-media-bundle) { grid-template-columns:minmax(0,1fr) 480px; }
.note-attachments .note-link-hint,.note-attachments:not(:has(.note-mini-group)) .note-link-hint { grid-template-columns:calc((var(--note-thumb-height) - 2px) * 16 / 9) minmax(0,1fr); }
.note-attachments .note-og-picture { align-self:center;height:auto;width:100%;aspect-ratio:16/9; }
@media(max-width:900px) {
 .note-summary-open:has(.note-link-hint):has(.note-media-bundle) { grid-template-columns:minmax(0,1fr) 400px; }
}
@media(max-width:760px) {
 .note-summary-open:has(.note-link-hint):has(.note-media-bundle) { grid-template-columns:1fr; }
 .note-attachments .note-link-hint { flex:0 1 224px; }
}
@media(max-width:620px) {
 .note-attachments .note-link-hint { flex:0 1 196px; }
 .note-attachments .note-media-bundle { width:104px;flex-basis:104px; }
}

/* Empty attachment slots keep every note's prose and media columns aligned. */
.note-attachments .note-attachment-empty { visibility:hidden;pointer-events:none; }
.note-attachments .note-media-bundle.note-attachment-empty { min-height:var(--note-thumb-height); }

/* Subdued list previews; the last visible thumbnail counts additional media. */
.note-mini { position:relative; }
.note-mini img { filter:brightness(.82); }
.note-mini-more { position:absolute;inset:0;display:grid;place-items:center;background:#0009;color:#fff;font-size:18px;font-weight:600;line-height:1;text-shadow:0 1px 4px #0008;pointer-events:none; }

/* Limit prose width independently of the shared page and attachment columns. */
.note-summary-copy { width:100%;max-width:480px; }

/* Keep both reserved slots while showing photos before the link preview. */
.note-attachments .note-media-bundle { order:0; }
.note-attachments .note-link-hint { order:1; }

/* Preserve authored line and paragraph breaks within the four-line preview. */
.note-excerpt { white-space:pre-line; }

/* Quiet decorative placeholders keep the attachment slots visually balanced. */
.note-mini-placeholder { display:block;width:100%;height:var(--note-thumb-height);border-radius:6px;box-sizing:border-box;background:color-mix(in srgb,var(--fg) 3%,transparent);border:1px solid color-mix(in srgb,var(--fg) 5%,transparent); }
.note-attachments .note-link-hint.note-attachment-empty { visibility:visible;background:color-mix(in srgb,var(--fg) 3%,transparent);border-color:color-mix(in srgb,var(--fg) 5%,transparent); }
.note-attachments .note-media-bundle.note-attachment-empty { visibility:visible; }

/* Preserve authored breaks with modest paragraph spacing in list and detail. */
.note-excerpt { white-space:normal;line-height:1.4; }
.note-overlay .th-text,.player .tp-text { line-height:1.4; }
:is(.note-excerpt,.note-overlay .th-text,.player .tp-text) .prose-paragraph + .prose-paragraph { margin-top:.35em; }

/* Empty slots should be barely perceptible beside real attachments. */
.note-mini-placeholder,.note-attachments .note-link-hint.note-attachment-empty { opacity:.25; }

/* A restrained frosted preview invites a closer look without obscuring detail views. */
.note-mini img { filter:brightness(.82) blur(1.5px);transform:scale(1.045);transition:filter 360ms ease,transform 450ms ease; }
.note-mini::after { content:"";position:absolute;inset:0;pointer-events:none;border-radius:inherit;background:linear-gradient(135deg,#fff2,transparent 45%,#fff1);box-shadow:inset 0 0 0 1px #ffffff12;opacity:.65;transition:opacity 360ms ease; }
.note-mini-more { z-index:1; }
@media(hover:hover) and (pointer:fine) {
 .note-mini:hover img { filter:brightness(.94) blur(0);transform:scale(1); }
 .note-mini:hover::after { opacity:0; }
}
.note-summary-open:focus-visible .note-mini img { filter:brightness(.94) blur(0);transform:scale(1); }
.note-summary-open:focus-visible .note-mini::after { opacity:0; }
@media(prefers-reduced-motion:reduce) {
 .note-mini img,.note-mini::after { transition:none; }
}

/* The counter belongs to the fixed preview frame, so cycling never shifts a row. */
.note-link-hint { position:relative; }
.note-attachments .note-link-hint>.note-og-index { position:absolute;left:4px;bottom:4px;padding:2px 4px;border-radius:3px;background:#000b;color:#fff;font-size:9px;line-height:1.2;pointer-events:none; }

/* Two image previews, with the remainder count on the second. */
.note-attachments .note-mini-group { display:grid;grid-template-columns:repeat(2,minmax(0,1fr)); }
