/* 3.4 — stable header columns across homepage, reading pages and account states. */
:root { --site-header-height: 96px; }
html { overflow-y: scroll; scrollbar-gutter: stable; }
.site-header { font-family: var(--sans); line-height: 1; }
.site-mark { align-items: center; min-width: 0; line-height: 1; }
.site-mark span { line-height: 1; }
.main-nav { margin-left: 0; }
.main-nav a { display: flex; align-items: center; justify-content: center; height: 44px; padding-block: 0; line-height: 1; }
.room-time { justify-content: flex-end; line-height: 1; font-variant-numeric: tabular-nums; }
.account-trigger { justify-content: flex-end; line-height: 1; min-width: 0; }
.account-trigger span { line-height: 1.3; }
@media (min-width: 761px) {
  .site-header { display: grid; grid-template-columns: minmax(0,1fr) auto 164px 120px; align-items: center; width: 100%; height: var(--site-header-height); max-width: none; padding: 0 3.2%; gap: 20px; }
  .site-mark { font-size: 32px; gap: 20px; }
  .site-mark span { font-size: 16.5px; }
  .main-nav { gap: clamp(18px,2vw,33px); }
  .main-nav a { font-size: 18.7px; }
  .room-time { font-size: 15.4px; gap: 10px; margin-left: 0; }
  .account-trigger { font-size: 13.2px; gap: 8px; }
  .account-trigger img { width: 37px; height: 37px; }
  .home-room.hero-poster { height: calc(100svh - var(--site-header-height)); }
}
@media (max-width: 760px) {
  :root { --site-header-height: 122px; }
}
@media (min-width: 1200px) {
  .is-poster .home-room.hero-poster { min-height: 800px; --poster-title-size: clamp(138px,min(14.25vw,21.2vh),235px); }
  .poster-topline { top: 31px; font-size: 18.75px; }
  .poster-signature { top: 95px; width: 350px; gap: 21px; padding-block: 15px 19px; }
  .signature-portrait { flex-basis: 64px; }
  .signature-portrait img { width: 64px; height: 64px; }
  .poster-signature p { font-size: 20px; gap: 11px; margin-bottom: 10px; }
  .poster-signature strong, .signature-star { font-size: 36px; }
  .poster-signature > div > span, .poster-signature > div > a { font-size: 17.5px; }
  .poster-signature > div > a { margin-top: 9px; width: 125px; }
  .poster-title { top: 13.5%; }
  /* A height limit keeps the enlarged two-line title above the quote. */
  .poster-title h1 { font-size: var(--poster-title-size); }
  .poster-aside { font-size: 21px; gap: 19px; }
  .poster-aside span:last-child { padding-top: 56px; }
  .hero-poster .floating-word { font-size: calc(var(--word-size,28px) * 1.25); }
  .hero-poster .floating-word.type-emotion { left: max(31.4%,calc(3.1% + var(--poster-title-size) * 2.75)) !important; top: 21.5% !important; }
  .earth-record { left: 35.5%; width: clamp(220px,14.95vw,306px); }
  .poster-quote { top: 64%; font-size: clamp(28px,2.6vw,42.5px); }
  .poster-enter { top: 68%; font-size: clamp(22px,1.6vw,30px); gap: 35px; min-width: 294px; padding-block: 22px; }
  .poster-enter small { font-size: 16px; margin-bottom: 6px; }
  .enter-arrow { font-size: 67px; }
  .poster-bottom { bottom: 30px; padding-top: 20px; }
  .poster-mail { max-width: min(710px,calc(100vw - 500px)); }
  .mail-heading { display: block; font-size: 22.5px; line-height: 1.4; }
  .poster-mail p { max-width: 710px; font-size: 18px; line-height: 1.45; margin: 8px 0 10px; }
  .poster-mail > div { gap: 30px; }
  .poster-mail > div a { font-size: 21.25px; line-height: 1.3; }
  .poster-mail .copy-mail { font-size: 16px; padding-block: 4px; }
  .sea-fish { top: 6%; --sea-size: clamp(96px,6.8vw,143px); }
  .sea-jellyfish { --sea-size: clamp(62px,4.3vw,92px); }
  .sea-seal { left: 31.5%; top: 60%; --sea-size: clamp(104px,6.4vw,137px); }
  .sea-octopus { top: 82%; --sea-size: clamp(78px,5.3vw,110px); }
  .is-poster .music-player { width: 420px; bottom: 30px; }
  .is-poster .player-bar { height: 80px; padding: 10px 14px; gap: 16px; }
  .is-poster .music-toggle { width: 54px; height: 54px; flex-basis: 54px; padding: 14px; }
  .is-poster .music-toggle svg { width: 24px; height: 24px; }
  .is-poster .player-open { height: 58px; gap: 15px; }
  .is-poster .player-caption > [data-bar-title] { font-size: 21.25px; }
  .is-poster .player-subline > [data-bar-artist] { font-size: 15px; }
  .is-poster .player-panel { width: 460px; bottom: 92px; }
  .poster-copyright { right: calc(3.2% + 444px); bottom: 30px; font-size: 16px; }
}

/* Large, tall desktops preserve the reference poster's original placements. */
@media (min-width: 1700px) and (min-height: 1100px) {
  .poster-title { top: 17%; }
  .poster-signature { top: 108px; width: 438px; }
  .hero-poster .floating-word.type-emotion { left: 26.6% !important; top: 27% !important; }
  .earth-record { left: 33.6%; width: 370px; }
  .poster-quote { top: 65%; }
  .poster-mail { max-width: 750px; }
  .poster-mail p { max-width: 725px; font-size: 20px; }
  .sea-fish { top: 9.8%; --sea-size: 157px; }
  .sea-seal { left: 25.8%; --sea-size: 164px; }
  .sea-jellyfish { --sea-size: 102px; }
  .sea-octopus { top: 86%; --sea-size: 123px; }
  .is-poster .music-player { width: 438px; }
  .poster-copyright { right: calc(3.2% + 468px); }
}

/* Comfortable type at 100%, with a modestly wider central column. */
@media (min-width: 761px) {
  body:not(.is-poster) .page-room.reading-room,
  body:not(.is-poster) .page-room.about-room { max-width: 1320px; width: calc(100% - 120px); padding: 86px 48px 121px; }
  .page-intro { margin-bottom: 53px; padding-bottom: 37px; column-gap: 8%; }
  .page-intro .tiny-eyebrow { font-size: 14.3px; }
  .page-intro h1 { font-size: 83.6px; margin-top: 18px; }
  .page-intro .hand-note { font-size: 16.5px; margin-top: 23px; }
  .page-intro > p, .guestbook-room .page-intro > p { font-size: 18.7px; max-width: 475px; padding-left: 25px; }
  .preview-note { font-size: 14.3px; margin-bottom: 28px; }
  .diary-feed { gap: 30px; }
  .diary-entry { padding: 42px 44px 28px; }
  .diary-entry::before { left: 44px; }
  .diary-entry .entry-date { font-size: 35.2px; top: 35px; right: 43px; }
  .entry-date small { font-size: 12.1px; }
  .diary-entry .entry-body h2 { font-size: clamp(24px,1.925vw,27.5px); padding-right: 180px; }
  .diary-entry .entry-meta { font-size: 15.4px; gap: 11px 20px; }
  .diary-entry .entry-excerpt { font-size: 19.8px; max-width: 900px; }
  .diary-entry .text-link { font-size: 15.4px; }
  .photo-grid { gap: 44px 30px; margin-top: 55px; }
  .photo-card-meta b { font-size: 17.6px; }
  .photo-card-meta small { font-size: 10px; }
  .photo-card-caption, .gallery-note { font-size: 12.1px; }
  .about-layout { grid-template-columns: 240px minmax(0,1fr); gap: 68px; }
  .about-portrait { width: 185px; }
  .about-portrait > span { font-size: 14.3px; }
  .about-intro { font-size: 34px; }
  .about-line { padding: 26px; grid-template-columns: 144px minmax(0,1fr); gap: 22px; }
  .about-line > span { font-size: 14.3px; }
  .about-line p { font-size: 24.2px; }
  .about-line small { font-size: 15.4px; }
  .about-line a { font-size: 17.6px; }
  body:not(.is-poster) .page-room.single-room { max-width: 1050px; margin-block: 70px 93px; padding: 54px 66px 62px; }
  .single-heading h1 { font-size: 52.8px; }
  .single-room .back-link { font-size: 15.4px; }
  .prose { font-size: 20.9px; }
  .prose blockquote { font-size: 26.4px; }
  .entry-end { font-size: 14.3px; }
  body:not(.is-poster) .site-footer { max-width: 1320px; width: calc(100% - 120px); padding: 28px 48px 121px; font-size: 14.3px; }
  .site-footer > span:last-child { font-size: 13.2px; }
  body:not(.is-poster) #site-content::after { inset-inline: max(30px,calc((100% - 1400px)/2)); }
  .room-sea-friends { inset-block-start: var(--site-header-height); --room-edge: max(12px,calc((100vw - 1400px)/4)); --friend-size: clamp(43px,calc((100vw - 1320px)/2 - 35px),160px); }
  body:not(.is-poster) .music-player { width: 385px; }
  body:not(.is-poster) .player-bar { height: 73px; }
  body:not(.is-poster) .player-caption > [data-bar-title] { font-size: 18.7px; }
  body:not(.is-poster) .player-subline > [data-bar-artist] { font-size: 13.2px; }
  .community-bar h2 { font-size: 22px; }
  .community-bar [data-comment-total], .community-like { font-size: 13.2px; }
  .community-thread details > summary { font-size: 13.2px; }
  .community-comment p { font-size: 16.5px; }
  .community-gate p { font-size: 15.4px; }
  .community-composer textarea { font-size: 16.5px; }
}

/* Short thoughts: one header, the text, and one quiet line of actions. */
.thought-card { padding: 21px 26px; }
.thought-meta { display: grid; grid-template-columns: 32px auto minmax(0,1fr) auto; gap: 11px; }
.thought-meta img { width: 32px; height: 32px; }
.thought-meta b { font-size: 14px; }
.thought-meta .thought-tag { justify-self: start; margin-left: 5px; font-size: 11px; line-height: 1.35; padding: 4px 10px; }
.thought-meta time { grid-column: 4; margin: 0; font-size: 15px; letter-spacing: .035em; font-variant-numeric: tabular-nums; white-space: nowrap; color: #d2e1efd4; }
.thought-content { font-size: 18.7px; line-height: 1.7; margin: 13px 0 0; white-space: pre-line; }
.thought-content > :first-child { margin-top: 0; }
.thought-content > :last-child { margin-bottom: 0; }
.thought-content p + p { margin-top: .6em; }
.thought-card .thought-comments { position: relative; margin-top: 15px; padding-top: 12px; }
.thought-comments .community-bar { min-height: 30px; }
.thought-comments .community-bar > div { min-width: 0; max-width: calc(100% - 140px); }
.thought-comments .community-bar [data-comment-total] { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thought-comments .community-bar [data-comment-total] { font-size: 13.2px; }
.thought-comments .community-like { min-width: 32px; min-height: 30px; font-size: 13.2px; }
.thought-comments .community-like svg { width: 18px; height: 18px; }
.thought-comments details > summary { position: absolute; top: 12px; right: 56px; min-height: 30px; display: flex; align-items: center; margin: 0; padding: 0 5px; font-size: 13.2px; color: #d0e1e9bb; }
.thought-comments details > summary:focus-visible { outline: 1px solid #c5e2b3; outline-offset: 3px; border-radius: 4px; }
.thought-comments details[open] [data-comment-list] { margin-top: 10px; }
.thought-card .thought-comments .community-empty { display: block; }
.thought-comments .community-gate, .thought-comments .community-composer { margin-top: 12px; }

@media (min-width: 761px) and (max-width: 1350px) {
  body:not(.is-poster) .page-room.reading-room,
  body:not(.is-poster) .page-room.about-room,
  body:not(.is-poster) .site-footer { width: calc(100% - 104px); padding-inline: 32px; }
  body:not(.is-poster) .page-room.single-room { width: calc(100% - 104px); padding-inline: 48px; }
  .site-header { grid-template-columns: minmax(0,1fr) auto 132px 112px; gap: 15px; }
  .site-mark { font-size: 28px; gap: 12px; }
  .site-mark span { font-size: 13px; }
  .main-nav { gap: 19px; }
  .room-time { font-size: 12px; margin-left: 0; }
  .about-layout { grid-template-columns: 185px minmax(0,1fr); gap: 42px; }
  .about-line { grid-template-columns: 120px minmax(0,1fr); padding: 23px; }
  .room-sea-friends { --room-edge: 8px; --friend-size: 43px; }
}
@media (min-width: 761px) and (max-width: 1150px) {
  .site-header { grid-template-columns: minmax(0,1fr) auto 132px 40px; }
  .account-trigger span { display: none; }
}
@media (min-width: 761px) and (max-width: 1000px) {
  .site-header { grid-template-columns: minmax(0,1fr) auto 126px 40px; }
  .site-mark span { display: none; }
  .main-nav { gap: 15px; }
  .main-nav a { font-size: 17px; }
  .page-intro { grid-template-columns: minmax(0,.9fr) minmax(0,1fr); }
  .page-intro h1 { font-size: 74px; }
  .about-layout { grid-template-columns: 140px minmax(0,1fr); gap: 30px; }
  .about-portrait { width: 135px; }
  .about-intro { font-size: 28px; }
  .about-line { grid-template-columns: 1fr; gap: 8px; }
}
@media (max-width: 760px) {
  .site-header { display: grid; grid-template-columns: minmax(0,1fr) auto 32px; grid-template-rows: 38px 40px; height: var(--site-header-height); width: 100%; max-width: none; padding: 16px 22px; gap: 12px 10px; align-items: center; align-content: center; }
  .site-mark { grid-column: 1; grid-row: 1; font-size: 27px; gap: 10px; }
  .site-mark span { font-size: 11px; }
  .main-nav { grid-column: 1 / -1; grid-row: 2; width: 100%; margin: 0; gap: 8px; justify-content: space-between; }
  .main-nav a { height: 40px; min-height: 40px; font-size: 14px; padding: 0; }
  .room-time { grid-column: 2; grid-row: 1; position: static; margin: 0; font-size: 10px; gap: 5px; }
  .account-trigger { grid-column: 3; grid-row: 1; }
  .account-trigger img { width: 32px; height: 32px; }
  .thought-card { padding: 18px; }
  .thought-meta { grid-template-columns: 28px auto minmax(0,1fr) auto; gap: 8px; }
  .thought-meta img { width: 28px; height: 28px; }
  .thought-meta b { font-size: 12px; }
  .thought-meta .thought-tag { font-size: 10px; padding: 3px 7px; margin-left: 0; }
  .thought-meta time { font-size: 13px; letter-spacing: 0; }
  .thought-content { font-size: 16px; margin-top: 12px; }
  .thought-comments .community-bar [data-comment-total], .thought-comments .community-like,
  .thought-comments details > summary { font-size: 12px; }
  .thought-comments .community-bar > div { max-width: calc(100% - 120px); }
  .thought-comments details > summary { right: 44px; }
}
@media (max-width: 480px) {
  .thought-meta { grid-template-columns: 28px auto minmax(0,1fr); gap: 5px 8px; }
  .thought-meta time { grid-column: 3; grid-row: 1; justify-self: end; }
  .thought-meta .thought-tag { grid-column: 2 / -1; grid-row: 2; }
}

/* A bounded player: controls remain visible; only the song list scrolls. */
.music-player .player-panel {
  display: flex; flex-direction: column; width: 400px; max-width: 100%;
  height: min(520px,calc(100svh - var(--site-header-height) - 136px));
  max-height: none; padding: 22px; overflow: hidden;
}
.music-player .player-panel[hidden] { display: none; }
.player-panel > :not(.playlist) { flex-shrink: 0; }
.music-player .player-kicker { margin-bottom: 14px; }
.music-player .track-details { gap: 14px; margin-bottom: 14px; }
.music-player .track-details p { font-size: 23px; line-height: 1.2; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.music-player .track-details span { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.music-player .record { width: 46px; height: 46px; flex-shrink: 0; }
.music-player .record i { inset: 15px; }
.music-player .record i::before { inset: 6px; }
.music-player .seek { height: 22px; cursor: pointer; touch-action: none; }
.music-player .seek::-webkit-slider-runnable-track { height: 3px; border-radius: 4px; }
.music-player .seek::-moz-range-track { height: 3px; border-radius: 4px; }
.music-player .seek::-webkit-slider-thumb { appearance: none; width: 12px; height: 12px; margin-top: -4.5px; border-radius: 50%; background: #e6effc; }
.music-player .seek::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: #e6effc; }
.music-player .track-time { margin: 0 0 10px; font-variant-numeric: tabular-nums; }
.music-player .player-controls { gap: 7px; }
.music-player .player-controls [data-panel-play] { display: grid; place-items: center; width: 44px; height: 44px; min-width: 44px; flex: 0 0 44px; padding: 12px; border: 1px solid #c8e06470; border-radius: 50%; background: #c8e06412; color: #eff5fc; }
.music-player [data-panel-play] svg { display: block; width: 20px; height: 20px; }
.music-player [data-panel-play] .play-shape { fill: currentColor; }
.music-player [data-panel-play] .pause-shape { fill: none; stroke: currentColor; stroke-width: 2; }
.music-player .pause-shape { display: none; }
.music-player.is-playing .play-shape { display: none; }
.music-player.is-playing .pause-shape { display: block; }
.music-player .player-controls [data-panel-play]:hover { background: #c8e06426; }
.music-player .playlist { flex: 1 1 0; min-height: 0; margin-top: 14px; padding-top: 10px; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; scrollbar-gutter: stable; scrollbar-width: thin; scrollbar-color: #b6ccea80 transparent; }
.music-player .playlist::-webkit-scrollbar { width: 5px; }
.music-player .playlist::-webkit-scrollbar-thumb { border-radius: 10px; background: #b6ccea80; }
.music-player .playlist button { grid-template-columns: 20px minmax(0,1fr) 92px; min-height: 46px; padding: 8px 6px; }
.music-player .playlist-title { min-width: 0; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; font: 14px/1.4 var(--sans); color: inherit; }
.music-player .playlist button small { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; font-size: 11px; line-height: 1.4; }
.music-player .player-message { margin-top: 10px; font-size: 11px; line-height: 1.4; }
@media (max-width: 760px) {
  .music-player .player-panel { width: 100%; padding: 18px; }
  .music-player .track-details p { font-size: 21px; }
  .music-player .playlist button { grid-template-columns: 18px minmax(0,1fr) 80px; }
  .music-player #music-volume { width: 65px; }
}
