/* Shore and type from the three-link operator cover. */
:root {
  --cover-navy: #142b47;
  --cover-deep: #183c6a;
  --cover-type: "Hiragino Mincho ProN", "Yu Mincho", YuMincho, "Noto Serif CJK JP", serif;
  --cover-sand: linear-gradient(125deg, #fff6df, color-mix(in srgb, #e2d6bc 82%, var(--ground-paper, #e2d6bc)));
}
.cover-map { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.board { color: var(--cover-navy); --tide: color-mix(in srgb, #698f91 87%, var(--ground-paper)); }
.tile .label .cover, .chapter-reader header .label, .app-story .label, .section > .label {
  display: grid; justify-items: start; align-items: baseline; grid-template-columns: auto 1fr;
  gap: .35rem .6rem;
}
.tile .label .ring-mark,.chapter-reader header .ring-mark { display: none; }
.tile .label .en,.chapter-reader header .en,.app-story .label .en,.section > .label .en,.cover-caption {
  font: 600 clamp(10px,1.1vw,14px)/1.1 Georgia, serif; letter-spacing: .13em; text-transform: uppercase;
}
.tile .label .en { font-size: clamp(10px,2.3cqw,16px); }
.tile .label .count,.chapter-reader header .count,.section > .label .count {
  grid-area: 1 / 2; color: #38535f; font: 500 .76rem/1.2 Georgia, serif;
}
.tile .label .ja,.chapter-reader header .ja,.app-story .label .ja,.section > .label .ja {
  grid-column: 1 / -1; color: var(--cover-navy); font: 700 clamp(23px,4vw,56px)/1.2 var(--cover-type);
  letter-spacing: .025em; text-wrap: balance;
}
.tile .label .ja { display: block; font-size: clamp(21px,7.6cqw,68px); }
.tile.b .label .ja { font-size: clamp(17px,6.8cqw,40px); }
.tile .label { max-width: var(--content); }
.tile.b.origin .label .ja { position: static; width: auto; height: auto; overflow: visible; clip-path: none; }
.tile .about-lead { max-width: 64cqw; font-size: clamp(14px,3.3cqw,24px); }
.board .operator-name,.board .feature h3 { font-family: var(--cover-type); color: var(--cover-navy); }
.board .feature { --p-bg: #c2ded6; }
.board .operator { --p-bg: #f8f1df; }
.tile .tree,.tile .finder,.tile .timeline { border: 1px solid #9b9b8b73; }
.board .finder-bar,.board .finder-status { background: #e7e2d6; }
.board .finder-body { background: #fcf9f0; }
.board .reel-lead { color: var(--cover-navy); }
.board:not([data-cover-preview]) .cover-credit {
  display: flex; flex-direction: column; margin-bottom: .4em; gap: .1em;
}
.board:not([data-cover-preview]) .cover-credit small { display: block; font-size: clamp(10px,2.8cqw,14px); }
.board:not([data-cover-preview]) .cover-credit .preview-name { display: block; font: 700 clamp(26px,9cqw,64px)/1.2 var(--cover-type); }
.board:not([data-cover-preview]) .intro-line { font: 700 clamp(13px,3.6cqw,21px)/1.5 var(--font-body); }
.board .reel-detail { font-size: clamp(11px,3cqw,17px); }
.board .peek:not(.peek-works) > span {
  margin: 0; max-width: 100%; padding: .28em .32em; color: var(--cover-navy); background: #f6edd7;
  border-block: 1px solid #90a199; font-family: var(--cover-type);
}
[data-compact] .label .en,[data-compact] .label .count { display: none; }
[data-compact] .tile .label .ja { font: 700 max(33px,9cqw)/1.2 var(--cover-type); }
[data-compact] .label .full-name { display: none; }
[data-compact] .label .short-name { display: inline; }
[data-miniature].kamo .label { margin: 0; }
[data-miniature].kamo .label .ja { font-size: 0; }
.tile[data-miniature] .label .cover { display: block; }
.board .tile[data-miniature]:not(.kamo) .label .ja { display: block; font: 700 max(32px,11.8cqw)/1.18 var(--cover-type); }
[data-compact] .tile .label .ja .wb { white-space: nowrap; }

/* Only captions that travel over deep water need a slip of reading paper. */
[data-compact] :is(.journal,.about,.profiles,.origin,.a.person,.career) .label .ja {
  background: #f7eedb; padding: .13em .32em .18em;
  box-shadow: 0 1px 0 #72928e; width: fit-content;
}

/* Leave the actual controls and images on the small covers. Their captions
   reappear when the same panel reaches its reading size. */
[data-compact] .finder-bar,[data-compact] .feed-card .feed-head,
[data-compact] .tile.about .note-stack,[data-compact] .tree-folder { display: none; }
[data-compact] .feed-card .feed-media { margin-block: auto; object-fit: contain; }
[data-compact] .finder { padding-block: 1.5cqw; }
[data-compact] .tile .tree-name { font-size: max(33px,7cqw); }
.board .peek.peek-brand > span { font: 700 clamp(12px,17cqw,17px)/1.15 "Avenir Next Condensed","Arial Narrow",sans-serif; letter-spacing: -.04em; padding-inline: 0; justify-self: center; }
@container (max-width: 350px) {
  .tile .label .en,.tile .label .count { display: none; }
  .tile .label .cover { gap: 0; }
  .tile .label .ja { font-size: clamp(18px,7cqw,26px); }
  .tile .tree { padding-block: 3px; }
  .tile .feature { padding: 4cqw; }
  .tile .operator { padding: 4cqw; }
}
@container (max-width: 230px) {
  .board:not([data-cover-preview]) .reel-lead .intro-line { display: none; }
  .tile.origin .note { padding-block: 3cqw; }
}
@container (max-width: 380px) {
  .tile.about .about-lead { font-size: clamp(13px,3.6cqw,15px); }
  .tile.about .note-stack { gap: 9px; }
  .tile .timeline { padding-block: 2.2cqw; }
}
@container (max-width: 50px) {
  .peek-brand > span { transform: scaleX(.9); }
}
.peek { grid-template-columns: minmax(0,1fr); }
@media (max-height: 460px) {
  .tile.about { --gap: 10px; }
}
:root:not(.intro) #logo-edge feFlood { flood-opacity: 0; }

/* Journal opens at the bend: posts on deep water, the index on sand. */
.board[data-scene="2"]:not([data-moving]) .journal .label :is(.ja,.en) { color: #fff3d9; }
.board[data-moving] .journal .label .cover { background: #f8efd9; }
.board .profiles .tree {
  background: #fcf5e6d9; border: 0; border-block: 1px solid #959e8c;
  border-radius: 2px; box-shadow: none;
}
.board[data-scene="2"]:not([data-moving]) [data-compact] :is(.about,.origin) .label .ja,
.board[data-scene="2"] > .peek-person > span { padding: 0; background: none; box-shadow: none; border: 0; }
[data-compact] .tile.about:not([data-miniature]) .note-stack { display: block; }
[data-compact] .tile.about .note--a { padding-inline: 2.8cqw; }
[data-compact] .tile.about .note--a h3 { font-size: max(32px,5.6cqw); text-wrap: balance; }
[data-compact] .tile.origin .note h3 { display: none; }
[data-compact] .tile.origin .origin-logo { margin: 0; }

.chapter-reader { background: color-mix(in srgb, #f3eddf 76%, var(--ground-paper)); }
.chapter-reader main { max-width: 960px; }
.chapter-reader main > header {
  margin: clamp(15px,3vw,32px) 0 clamp(24px,4vw,42px);
}
.chapter-reader header { color: var(--cover-navy); }
.chapter-reader header p { max-width: 26em; font-size: clamp(14px,1.8vw,18px); line-height: 1.7; }
.chapter-reader .home,.journal-reader .home,.story-mast .home,.top .home,.workspace-reader .brand {
  color: var(--cover-deep); font-weight: 700; text-underline-offset: .25em;
}
.chapter-reader .home { padding-inline: 0; background: transparent; border: 0; }
.chapter-reader .work h2,.notes .note h2,.reading-leaf .post h2 { font-family: var(--cover-type); }
.journal-reader { --lapis: var(--cover-deep); --leaf: #fffaec; }
.journal-reader .index-leaf header { display: block; color: var(--index-ink); }
.journal-reader .index-leaf .cover-caption { margin: 0 0 .6em; }
.journal-reader .index-leaf h1 { display: block; font: 700 clamp(26px,3.3vw,47px)/1.2 var(--cover-type); letter-spacing: .015em; }
.app-story,.frame { background: var(--cover-deep); }
.dock { background: var(--cover-deep); }
.story-panel,.frame .panel { background-color: color-mix(in srgb, var(--panel) 65%, #f0e4cb); }
.story-hero,.hero--app,.hero--person {
  margin-top: 14px; padding-inline: clamp(17px,3vw,40px);
}
:is(.story-hero,.hero--app) .hero-lead {
  padding: 0; background: none; box-shadow: none;
  color: var(--ink);
}
:is(.story-hero,.hero--app) :is(p.hero-lead,.hero-lead > p) {
  text-shadow: 0 0 2px var(--panel), 0 0 4px var(--panel);
}
.story-hero::before,.story-hero::after,.hero :is(.sticker--bar,.sticker--dot) { display: none; }
.app-card h1,.hero--person .hero-name,.workspace-reader h1 { font-family: var(--cover-type); color: var(--cover-navy); }
.tonbooth .app-card h1 { font-size: min(var(--app-name), 17cqi); }
.story-hero .app-card { --p-bg: color-mix(in srgb,var(--art-paper) 37%,#fff5dd); }
.hero--app .app-card { --p-bg: #c9e2d6; }
.workspace-reader { --blue: var(--cover-deep); --mist: #e1ece6; --coral: #65999b; }
.workspace-reader .cover { background: none; }
html:has(.workspace-reader) { background: var(--cover-deep); }
.workspace-reader .mast { background: #f2ead8; border-radius: 12px 12px 0 0; }
.workspace-reader .tool-nav { column-gap: 4px; padding: 4px; background: #fbf4e4; }
.workspace-reader .cover-figure { padding: clamp(12px,1.5vw,21px); background: #fff9eb; border: 1px solid var(--rule); }
@media (max-width: 760px) {
  .journal-reader .index-leaf .cover-caption { margin-bottom: 4px; }
}
