[hidden] { display:none !important }
.symbols,.symbol-sheet { position:absolute; width:0; height:0; overflow:hidden }
.sr-only { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%) }
.subpage { margin-bottom:52px }
.mast nav [aria-current="page"] { text-decoration:underline; text-decoration-color:#c45d16; text-decoration-thickness:3px; text-underline-offset:7px }
.page-hero { position:relative; isolation:isolate; overflow:hidden; display:flex; justify-content:space-between; align-items:center; gap:18px; padding:27px clamp(22px,3.4vw,52px); min-height:170px; margin:28px 0; border:2px solid var(--ink); border-radius:22px; background:var(--orange) }
.page-hero h1 { font-size:clamp(40px,5.4vw,78px); line-height:1; letter-spacing:-.07em }
.page-hero h1 span:first-child { color:inherit }
.page-hero h1 span:last-child { color:#fff5d2 }
.page-hero p { font-size:clamp(16px,1.4vw,19px); margin-top:13px; max-width:49ch }
.page-art { align-self:stretch; width:30%; position:relative; flex:none; pointer-events:none }
.page-art::before { content:''; position:absolute; width:90%; aspect-ratio:1; border-radius:50%; top:50%; left:50%; transform:translate(-50%,-50%); background:#ffb64a; box-shadow:0 0 0 18px #ffa247,0 0 0 19px #dd782e }
.page-art img { position:absolute; width:clamp(94px,10vw,145px); height:auto; aspect-ratio:1; object-fit:cover; top:50%; left:34%; transform:translate(-50%,-50%) rotate(-13deg); border:2px solid var(--ink); border-radius:13px; background:#fcf7f1; box-shadow:3px 4px var(--ink) }
.page-art img+img { left:64%; transform:translate(-50%,-48%) rotate(9deg) }
.icon,button svg,.button svg,.action svg,.range-label svg { display:inline-block; flex:none; width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round }
button,input,select,textarea { font:inherit; color:inherit }
button, .button, .action, .filter, .meme-folders a, .app-tabs a,.filters a { cursor:pointer; display:inline-flex; align-items:center; justify-content:center; gap:8px; line-height:1.2; font-weight:750; border:1px solid var(--ink); background:var(--paper); border-radius:9px; padding:10px 14px; min-height:42px }
button:hover,.button:hover,.action:hover,.meme-folders a:hover,.filters a:hover,.app-tabs a:hover { background:#ffedc4 }
button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible { outline:3px solid #244fc0; outline-offset:2px }
button:disabled,[aria-disabled=true] { opacity:.55; cursor:default }
button[aria-pressed=true],.modes [aria-pressed=true],.app-tabs a[aria-current],.filters a[aria-current],.meme-folders a[aria-current],.action.primary,.main-action,.button.primary { background:var(--ink); color:var(--paper) }
.primary:hover,.main-action:hover { color:white; background:#423b32 }
.to-top,.quiet,.text-button,.remix-link,.collection-end button { border:0; background:transparent; text-decoration:underline; text-underline-offset:3px; padding:5px 2px; font-weight:700 }
.to-top { text-decoration:none; min-height:0 }
.collection-end,.modal-bottom,.dialog-head,.chrome,.window-bar,.viewer-head,.archive-heading,.range-label,.pager { display:flex; align-items:center; justify-content:space-between; gap:12px }
.collection-end { margin-top:20px; color:#605649; font-size:14px; flex-wrap:wrap }
.collection-end button+button { margin-left:14px }
.subpage h2,dialog h2 { font-size:clamp(23px,2.4vw,37px) }
input:not([type=radio]),select,textarea { padding:9px 12px; border:1px solid #8b8174; background:#fffcf6; border-radius:8px; min-width:0; max-width:100% }
.gallery-tools,.toolbar,.filters,.app-tabs,.meme-folders,.modes,.density,.export-actions,.file-pager,.skin-actions,.detail-actions { display:flex; align-items:center; flex-wrap:wrap; gap:9px }
.gallery-tools,.toolbar,.app-tabs,.meme-folders,.subpage>.filters { margin-bottom:20px }
.folder-select,.finder,.search-box,.crop-sample,.avatar-line { display:flex; align-items:center; gap:10px }
.folder-select,.controls>label,.controls legend { font-weight:750 }
.finder,.search-box { padding-left:12px; border:1px solid #8b8174; border-radius:8px; background:#fffcf6 }
.finder input,.search-box input { width:100%; border:0 }
.density { margin-left:auto; gap:4px }
.density button,.file-pager button { padding:8px; min-width:42px }
.pfp-grid,.card-grid { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:clamp(9px,1.25vw,20px) }
[data-density=large] .pfp-grid { grid-template-columns:repeat(4,minmax(0,1fr)) }
.pfp-file,.ant-card,.sticker-file,.file-choice { display:block; min-width:0; border:1.5px solid var(--ink); border-radius:13px; overflow:hidden; background:#fcf7f1; transition:transform .14s,box-shadow .14s }
.pfp-file:hover,.ant-card:hover,.sticker-file:hover,.file-choice:hover { box-shadow:3px 4px var(--ink); transform:translateY(-2px) }
.pfp-thumb,.file-thumb { display:block; aspect-ratio:1; width:100%; background-size:500% 500%; background-position:var(--tile-x) var(--tile-y); background-repeat:no-repeat }
img.pfp-thumb { height:auto }
.sheet-1 { background-image:url('./pfps/art/collection/sheet-1.webp') }
.sheet-2 { background-image:url('./pfps/art/collection/sheet-2.webp') }
.sheet-3 { background-image:url('./pfps/art/collection/sheet-3.webp') }
.sheet-4 { background-image:url('./pfps/art/collection/sheet-4.webp') }
.sheet-5 { background-image:url('./pfps/art/collection/sheet-5.webp') }
.pfp-name,.sticker-file>span { border-top:1px solid var(--line); display:block; padding:10px 12px; font-weight:800 }
.empty-files,.empty-state { text-align:center; margin:35px auto }
.empty-files button,.empty-state button { margin-top:12px }
dialog { color:var(--ink); background:var(--paper); width:min(540px,94vw); max-height:90dvh; overflow:auto; padding:20px; border:2px solid var(--ink); border-radius:18px; box-shadow:5px 6px var(--ink) }
dialog::backdrop { background:#211e18a8 }
dialog p,dialog input { margin-block:10px }
.dialog-head,.chrome,.window-bar,.modal-bottom { padding-bottom:12px }
.chrome-title { display:flex; align-items:center; gap:7px; font-weight:700 }
.dialog-head button,.chrome>button,.window-bar button,.close-button { min-width:40px; padding:8px }
.file-dialog,#portrait-dialog { width:min(800px,94vw) }
.skin-detail,.dialog-box { display:grid; grid-template-columns:1.3fr 1fr; gap:20px; align-items:center }
.skin-canvas,.portrait-stage,.stage,.sticker-stage,.print-stage { background:#fcf7f1; border:1.5px solid var(--ink); border-radius:14px; overflow:hidden }
.skin-canvas img,.portrait-stage img,.stage img,.sticker-stage img,.print-stage img { width:100%; height:auto; display:block; object-fit:contain }
.skin-canvas img,.portrait-stage img { max-height:56dvh }
.skin-family,.asset-detail,.crop-sample small,.avatar-line small,.file-text small,.card-crew { color:#665c4e }
.crop-avatar,.avatar { width:48px; height:48px; border:1px solid var(--ink); display:block; flex:none; border-radius:50%; background-size:cover; background-position:center }
.crop-sample,.avatar-line { margin-block:17px; font-weight:700 }
.crop-sample small,.avatar-line small { font-size:12px; display:block; font-weight:500 }
.skin-actions,.detail-actions { align-items:stretch; flex-direction:column }
.modal-bottom { padding:14px 0 0; font-size:14px }
.skin-feedback,.feedback { font-size:14px }
.small-dialog label,.small-dialog input { display:block }
.notice:not(:empty),.toast:not(:empty),#toast.visible { position:fixed; right:4%; bottom:20px; z-index:8; background:var(--ink); color:white; padding:12px 16px; border-radius:9px }
#toast:not(.visible) { display:none }
.workspace { display:grid; align-items:start; grid-template-columns:minmax(205px,.86fr) minmax(225px,1.55fr) minmax(210px,.97fr); gap:clamp(14px,2vw,30px) }
.files,.viewer,.inspector,.controls,.sticker-inspect,.maker-layout>* { min-width:0 }
.files .subhead { font-size:22px; margin:0 0 10px }
.file-list { display:grid; gap:7px }
.file-choice { width:100%; padding:0; display:flex; justify-content:flex-start; gap:10px; text-align:left; border-color:var(--line); background:#fffaf1 }
.file-choice[aria-pressed=true],.sticker-file[aria-pressed=true] { border-color:var(--ink); color:var(--ink); background:#ffdda0; box-shadow:2px 2px var(--ink) }
.file-text { padding:3px 6px 3px 0 }
.file-text strong,.file-text small { display:block; line-height:1.25 }
.file-text small { margin-top:3px; font-size:12px; font-weight:500 }
.thumb { background-image:url('./preview/art/colony-thumbs.webp'); background-size:800% 100%; background-position:var(--thumb-x,0%) center }
[data-edition=preview] .thumb { background-image:url('./preview/art/thumbs.webp'); background-size:600% 100% }
.file-thumb { width:56px; flex:none; border-right:1px solid var(--line) }
.viewer-head { min-height:39px; margin-bottom:8px; font-size:14px; color:#615545; overflow-wrap:anywhere }
.file-pager { flex-wrap:nowrap }
.file-pager button { min-height:34px; min-width:34px }
.stage { position:relative }
.stage button { position:absolute; right:8px; top:8px; min-width:36px; min-height:36px; padding:0; font-size:24px; background:#fffbf1 }
.inspector,.controls { padding:clamp(16px,2vw,25px); border:1px solid var(--line); border-radius:14px; background:#f4eddf }
.inspector { margin-top:47px }
.punchline { margin-top:10px }
.export { border-top:1px solid var(--line); padding-top:14px }
.panel-title { font-weight:750; margin-bottom:8px }
.export .actions,.export-actions,.remix-link { margin-top:14px }
.inspector>.quiet { display:block; margin-top:6px }
#dialog-image { max-width:100%; max-height:60dvh; display:block; margin:12px auto }
.maker-layout,.sticker-workspace { display:grid; grid-template-columns:minmax(0,1.2fr) minmax(0,1fr); align-items:start; gap:clamp(14px,2.4vw,34px) }
.print-stage { display:grid; place-items:center; background:#f4eddf; padding:12px }
.print-stage a { display:block; max-width:100% }
.print-stage img { max-height:67vh; width:auto; max-width:100%; border-radius:6px }
.controls h2 { margin-bottom:14px }
.controls>label,.controls>select,.controls>textarea { display:block; width:100%; margin-block:8px }
.controls>.range-label { display:flex; margin-top:17px }.range-label output { font-weight:500; font-size:13px }
.controls textarea { resize:vertical }
.controls fieldset { border:0; padding:0; margin:12px 0 }
.radio-bar { display:flex; gap:14px; margin-top:5px }
.drawer-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px }
.sticker-file { padding:0; width:100%; text-align:left }
.sticker-file img { width:100%; display:block; height:auto }
.sticker-stage { display:grid; place-items:center; background:repeating-conic-gradient(#f9f4e9 0 25%,#fffaf3 0 50%) 0 0/22px 22px }
.sticker-stage img { max-width:300px }
.sticker-inspect .controls { margin-top:10px }
.archive-heading { margin:0 0 16px }
.card-info { padding:10px 12px }
.card-actions { display:flex; border-top:1px solid var(--line) }
.card-action { padding:7px 4px; flex:1; display:flex; gap:4px; justify-content:center; align-items:center; border:0; border-radius:0; min-height:36px; background:transparent; font-size:13px; font-weight:700 }
.card-action svg { width:16px; height:16px }
.art-button { display:block; width:100%; position:relative; padding:0; border:0; border-bottom:1px solid var(--line); border-radius:0 }
.art-button img { width:100%; height:auto; display:block }
.expand-cue { position:absolute; bottom:6px; right:6px }
.about { margin-top:40px; padding:25px; border:1px solid var(--line); border-radius:15px; background:#f4eddf }
.about-inner { display:flex; align-items:center; gap:20px }.about-portrait img { width:88px; border-radius:14px }.about-copy { max-width:65ch }.about-copy p { margin-top:8px }
.dialog-box .close-button { grid-column:1/-1; justify-self:end }
.pager { margin-top:14px }
@media (max-width:940px) {
 .workspace { grid-template-columns:minmax(0,1.25fr) minmax(0,1fr) }
 .files { grid-column:1/-1 }.file-list { grid-template-columns:repeat(4,minmax(0,1fr)) }.file-thumb { width:42px }
 .file-text small { display:none }.file-text { font-size:13px }.file-choice { gap:6px }
 .pfp-grid,.card-grid { grid-template-columns:repeat(4,minmax(0,1fr)) }
 [data-density=large] .pfp-grid { grid-template-columns:repeat(3,minmax(0,1fr)) }
}
@media (max-width:650px) {
 .subpage { margin-bottom:32px }
 .page-hero { margin:16px 0 20px; border-radius:17px; min-height:135px; padding:20px 16px; gap:8px }
 .page-hero h1 { font-size:clamp(34px,8vw,49px) }.page-hero p { font-size:14px; margin-top:8px }
 .page-art { width:21% }.page-art img { width:clamp(51px,12vw,80px); left:24%; border-radius:7px }.page-art img+img { left:65% }
 .gallery-tools { gap:8px }.gallery-tools .finder { order:-1; width:100% }.folder-select { font-size:14px }
 .pfp-grid,.card-grid { grid-template-columns:repeat(2,minmax(0,1fr)) }
 [data-density=large] .pfp-grid { grid-template-columns:1fr }
 .skin-detail,.dialog-box,.workspace,.maker-layout,.sticker-workspace { grid-template-columns:1fr }
 .skin-detail,.dialog-box { gap:12px }.skin-canvas img,.portrait-stage img { max-height:37vh }
 .skin-actions,.detail-actions { flex-direction:row; flex-wrap:wrap }.skin-actions>* { font-size:14px }
 .file-list { display:flex; overflow:auto; padding:2px 2px 6px; gap:8px }.file-choice { width:105px; flex:none; flex-direction:column; align-items:stretch; gap:0 }.file-thumb { width:100%; border-right:0; aspect-ratio:1 }.file-text { padding:5px; text-align:center }
 .inspector { margin-top:0 }.viewer-head { min-height:34px }
 .drawer-grid { gap:8px }.sticker-file>span { font-size:14px; padding:7px }
 .about { padding:16px }.about-portrait img { width:56px }.controls .export-actions { flex-wrap:wrap }
}
@media(prefers-reduced-motion:reduce) { .pfp-file,.ant-card,.sticker-file,.file-choice { transition:none; transform:none!important } }

.meme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 255px), 1fr));
  gap: clamp(14px, 2vw, 24px);
}
.meme-grid .ant-card { display: flex; flex-direction: column }
.meme-grid img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  background: #f4eddf;
}
