:root:not([data-view]) main > :not(#ink-route),
[data-view="contest"] main > :not(#round-lineup, #round-dialog),
[data-view="entries"] main > :not(#newsroom),
[data-view="oasis"] main > :not(#oasis),
[data-view="maker"] main > :not(#maker),
[data-view="pfp"] main > :not(#pigeon-pfp),
[data-view="stickers"] main > :not(#stickers),
[data-view="archive"] main > :not(#memes, #comics, #kit),
[data-view="burn"] main > :not(#briefing, #receipts),
[data-view="thesis"] main > :not(#growth),
[data-view="egg"] main > :not(#egg-day),
[data-view="game"] main > :not(#entry-game),
[data-view="token"] main > :not(#token),
[data-view="terms"] main > :not(#terms) { display: none; }

[data-view]:not([data-view="contest"], [data-view="entries"]) :is(main, .journal-footer) { margin-inline-start: 0; }
[data-view]:not([data-view="contest"], [data-view="entries"]) :is(.contest-sidebar, .contest-menu-toggle) { display: none; }
.mast #island-return { display: inline-block; white-space: nowrap; }
.mast .project-links { display: flex; align-items: center; gap: .38rem; margin-inline-start: auto; }
.project-links :is(a, button) {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 36px; padding: .25rem .48rem; border: 2px solid var(--ink);
  color: var(--ink); background: white; font: 800 .78rem/1 system-ui, sans-serif;
  white-space: nowrap; text-decoration: none; cursor: pointer;
}
.project-links :is(a, button):hover { background: #ffe5f2; }
.project-links:not([hidden]) ~ :is(.mast-competition, .contest-menu-toggle) { margin-inline-start: 0; }
.project-links .sr-only { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
.destination-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; margin-bottom: 1rem; }
.destination-heading h1 { margin: 0; font-size: clamp(2rem, 6vw, 4.4rem); }
.lore-toggle, .lore-close {
  border: 2px solid var(--ink); border-radius: 0;
  background: #ffd665; color: var(--ink); font: 900 1rem/1.1 Georgia, serif; cursor: pointer;
}
.lore-toggle { display: inline-flex; align-items: center; gap: .55rem; min-height: 2rem; padding: .24rem .58rem; }
.lore-toggle span { font: 800 .9rem/1 system-ui, sans-serif; }
.lore-toggle:hover, .lore-close:hover { background: #ff9fc6; }
.lore-toggle:focus-visible, .lore-close:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.lore-panel {
  position: fixed; inset: 0; margin: auto; width: min(58rem, calc(100vw - 1.75rem)); max-height: 90svh;
  overflow: auto; overscroll-behavior: contain; padding: clamp(.8rem, 3vw, 1.55rem);
  border: 3px solid var(--ink); background: #fffaf0; color: var(--ink); box-shadow: 6px 7px var(--ink);
}
.lore-panel::backdrop { background: #21191c49; }
.lore-panel > header { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; }
.lore-panel > header h2 { margin: 0; font: 900 clamp(2rem, 6vw, 4.3rem)/.96 Georgia, serif; }
.lore-close { display: grid; place-items: center; flex: none; width: 2.4rem; height: 2.4rem; padding: 0; background: white; font: 700 1.35rem/1 system-ui, sans-serif; }
.lore-lede { margin: .65rem 0 .85rem; font: 800 clamp(1.04rem, 2.6vw, 1.42rem)/1.22 Georgia, serif; }
.lore-flock { display: block; width: 100%; height: auto; max-height: 39svh; object-fit: contain; background: #fff9e9; border: 2px solid var(--ink); }
.lore-thesis { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .85rem 1.3rem; margin-block: 1rem; }
.lore-thesis > section { border-top: 2px solid var(--ink); padding-top: .5rem; }
.lore-thesis h3 { margin: 0 0 .32rem; font: 900 clamp(1.12rem, 3vw, 1.33rem)/1.14 Georgia, serif; }
.lore-thesis p { margin: 0; font: .96rem/1.5 system-ui, sans-serif; }
.lore-panel a { color: #8e244e; font-weight: 800; }
.lore-contest-link { display: inline-block; padding: .45rem .66rem; border: 2px solid var(--ink); background: #ffd665; text-decoration: none; }
.lore-contest-link:hover { background: #ff9fc6; }
@media (max-width: 600px) { .lore-thesis { grid-template-columns: 1fr; } }
.oasis-intro { position: relative; z-index: 2; max-width: 46ch; font-weight: 650; }
.terms-page { max-width: 780px; }
.terms-page h1 { font-size: clamp(2.6rem, 7vw, 5rem); }
.terms-page h2 { font-size: clamp(1.35rem, 3vw, 2rem); margin: 1.2em 0 .4em; }
.terms-page p + p { margin-top: .65em; }
.journal-footer { padding-bottom: 1.65rem; }

[data-view="maker"] #maker { padding-block: 1.2rem 3rem; background: #fff; }
[data-view="maker"] #maker :is(.round-workspace, .workspace-entries) { display: none; }
.studio-workbench { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); margin-top: .9rem; gap: clamp(.8rem, 2vw, 1.6rem); }
.studio-title h2 { font-size: clamp(2rem, 4.5vw, 3.9rem); margin: 0; }
.studio-editor { position: static; }
.meme-preview { position: relative; }
.meme-preview canvas { display: block; max-height: min(51svh, 465px); }
.meme-preview .art-tools { margin: .55rem 0 0; background: white; }
.meme-preview .art-tools summary { min-height: 30px; }
.art-controls select { min-height: 36px; margin: .2rem 0 0; padding: .2rem .35rem; }
.art-controls input[type="color"] { min-height: 2rem; }
.art-tools .actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .35rem; margin-top: .45rem; }
.art-tools .actions .button { min-height: 32px; padding: .22rem .33rem; font-size: .78rem; }
#meme-grid { max-height: 420px; overflow: auto; padding: .18rem; }
.round-dialog .studio-workbench { margin-top: .5rem; }
.round-dialog .round-workspace { margin-block: 0 .75rem; }

.pfp-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pfp-controls .button { text-align: center; }
#pfp-preview { background: conic-gradient(#ece9e9 90deg,#fff 90deg 180deg,#ece9e9 180deg 270deg,#fff 270deg) 0 0 / 20px 20px; }
#sticker-pack { grid-template-columns: repeat(auto-fit, minmax(min(100%, 185px), 1fr)); }
#sticker-pack .item { padding: .55rem .8rem .85rem; }
#sticker-pack .item canvas { width: 100%; max-height: 215px; object-fit: contain; }
#sticker-pack .item h3 { font-size: 1.06rem; }

.street-header, .burn-header { display: grid; grid-template-columns: minmax(0, 1fr) minmax(110px, .34fr); align-items: center; gap: 1rem; }
.street-header h1, .burn-header h1 { font-size: clamp(2.2rem, 6vw, 5.4rem); line-height: .97; }
.street-header :is(p, h1), .burn-header :is(p, h1) { max-width: 44rem; }
.street-header img, .burn-header img { display: block; width: 100%; height: auto; }
.street-header { padding: .3rem 0 1.35rem; border-bottom: 2px solid var(--ink); }
.street-header em { color: var(--red); }
[data-view="contest"] #round-lineup { background: #fff; padding-top: clamp(1rem, 3vw, 2.1rem); }
[data-view="burn"] #briefing { margin-block: 1.25rem 1.8rem; background: white; box-shadow: none; border: 0; padding: 0; }
.burn-header { padding-bottom: 1rem; border-bottom: 3px solid var(--ink); }
.burn-header .button { margin-top: .9rem; }
.burn-flow { margin: 1.5rem 0 1rem; }
.burn-intake { margin-inline: auto; width: fit-content; max-width: 100%; padding: .9rem 1.15rem; text-align: center; border: 2px solid var(--ink); background: #fff2b8; }
.burn-intake h2 { margin: 0 0 .3rem; font-size: clamp(1.4rem, 3.5vw, 2.1rem); }
.burn-branches { position: relative; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: clamp(.8rem, 3vw, 2.2rem); padding-top: 2.1rem; }
.burn-branches::before { content: ""; position: absolute; inset: 0 auto auto 50%; height: .93rem; border-left: 2px solid var(--ink); }
.burn-branches::after { content: ""; position: absolute; inset: .9rem 25% auto; height: 1.2rem; border: 2px solid var(--ink); border-bottom: 0; pointer-events: none; }
.burn-branches article { padding: clamp(.65rem, 3vw, 1.6rem); border: 2px solid var(--ink); background: #e6dafa; box-shadow: 4px 4px var(--ink); }
.burn-branches article + article { background: #ffd7e7; }
.burn-branches article b { display: block; font: 900 clamp(2rem, 7vw, 5rem)/1 Georgia,serif; color: var(--red); }
.burn-branches article h3 { margin: .28rem 0; }
.burn-calculator { padding: .6rem 0; }
.burn-calculator summary { cursor: pointer; font-weight: 800; }
.burn-wallets { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); border: 2px solid var(--ink); background: white; margin: 1rem 0; }
.burn-wallets > div { padding: .7rem; }
.burn-wallets > div + div { border-inline-start: 1px solid var(--ink); }
.burn-wallets dt { font-weight: 800; }
.burn-wallets dd { margin: .2rem 0 0; color: var(--muted); }
#receipts { border-top: 3px solid var(--ink); }
[data-view="game"] .hat-copy h1 { font-size: clamp(2.45rem, 7vw, 5.75rem); }

@media (max-width: 760px) {
  :root:has(.project-links:not([hidden])) { --mast-height: 92px; }
  .mast:has(.project-links:not([hidden])) .wrap {
    display: grid; grid-template-columns: auto 1fr auto; grid-template-rows: 51px 38px;
    gap: 0 .5rem;
  }
  .mast .project-links { grid-column: 1 / -1; grid-row: 2; justify-self: end; }
  .studio-workbench { grid-template-columns: 1fr; }
  .meme-preview canvas { max-height: min(49svh, 380px); }
}
@media (max-width: 490px) {
  .street-header, .burn-header { grid-template-columns: 1fr; }
  .street-header img { display: none; }
  .burn-header img { width: min(42%, 180px); }
  .burn-wallets { grid-template-columns: 1fr; }
  .burn-wallets > div + div { border-inline-start: 0; border-block-start: 1px solid var(--ink); }
  .house-sign .house-source { font-size: .65rem; }
}
