.meme-canvas-frame { display: grid; justify-items: center; }
.meme-canvas-frame canvas { grid-area: 1 / 1; }
#card { touch-action: none; cursor: grab; }
#card:active { cursor: grabbing; }
#card[data-tool="draw"] { cursor: crosshair; }
#card-selection { background: transparent; pointer-events: none; }
.meme-layout-tools, .meme-palette {
  display: flex; flex-wrap: wrap; align-items: end;
  gap: .45rem .7rem; margin-top: .7rem;
}
.meme-layout-tools label, .meme-palette label { font-size: .82rem; font-weight: 750; }
.meme-layout-tools select { display: block; width: 100%; margin-top: .1rem; }
.meme-layout-tools button { min-height: 34px; padding: .3rem .5rem; font-size: .8rem; }
.meme-layout-tools input[type="range"] { display: block; width: 7rem; margin: .35rem 0; padding: 0; accent-color: #a81b61; }
#delete-object:not(:disabled) { background: #ffd6e8; }
.meme-palette { align-items: center; margin-block: .7rem; }
.meme-palette input[type="color"] { width: 2.1rem; height: 2.1rem; padding: .1rem; vertical-align: middle; margin-inline-start: .28rem; }
.meme-palette input[type="checkbox"] { width: auto; }
.street-entries { display: inline-flex; margin-top: .8rem; background: #e8dbff; }
.oasis-clouds a:nth-child(5) { background: #fff0b0; }
@media (min-width: 601px) { .oasis-clouds { grid-template-columns: repeat(5,minmax(0,1fr)); } }

.pfp-workbench { grid-template-columns: minmax(230px,1fr) minmax(0,1.18fr); align-items: start; }
.pfp-portrait { padding: clamp(.7rem,3vw,1.3rem); border: 3px solid var(--ink); background: #ffe2ee; box-shadow: 5px 5px var(--ink); }
.pfp-portrait h2 { margin: .42rem 0; font-size: clamp(1.55rem,3.5vw,2.4rem); }
#pfp-preview { display: block; width: 100%; max-width: 460px; margin-inline: auto; }
.pfp-controls { grid-template-columns: repeat(2,minmax(0,1fr)); gap: .55rem; }
.pfp-controls[hidden] { display: none; }
.pfp-trait-desk { min-width: 0; padding: .7rem; border: 3px solid var(--ink); background: #fffaf1; }
.pfp-trait-tabs { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .7rem; }
.pfp-trait-tabs button { flex: 1 0 auto; padding: .4rem .55rem; background: #f0e5ff; font-size: .85rem; }
.pfp-trait-tabs button[aria-selected="true"] { background: #ffd97d; box-shadow: 2px 2px var(--ink); }
.pfp-controls label {
  min-width: 0; padding: .45rem .55rem; border: 2px solid var(--ink);
  background: #e8ddff; font-size: .86rem; font-weight: 800;
}
.pfp-controls label:nth-child(4n+2), .pfp-controls label:nth-child(4n+3) { background: #fff0b9; }
.pfp-controls select { min-width: 0; background: #fff; font-size: .83rem; }
.pfp-collection { min-width: 0; margin-bottom: 1.35rem; padding: .75rem; border: 2px solid var(--ink); background: #fffaf1; }
.pfp-collection .destination-heading h2 { margin: 0; }
#pfp-page { margin: 0 0 .65rem; }
#pfp-page:empty { display: none; }
#pfp-gallery {
  display: grid; grid-auto-flow: column; grid-auto-columns: clamp(84px,13vw,128px); gap: .65rem;
  overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-width: thin; padding: .35rem .3rem .6rem;
}
#pfp-gallery button {
  min-width: 0; padding: .25rem; border: 2px solid var(--ink); color: var(--ink);
  background: #fff7dc; font: 800 .83rem/1.45 Georgia,serif; cursor: pointer;
}
#pfp-gallery button[aria-pressed="true"] { background: #ffc9e3; box-shadow: 3px 3px var(--ink); }
#pfp-gallery canvas { display: block; width: 100%; height: auto; background: #f2ebf5; }

.hat-player { display: grid; justify-items: start; gap: .55rem; margin-top: 1rem; }
.hat-identity { display: flex; align-items: center; gap: .6rem; overflow-wrap: anywhere; }
.hat-identity img, .hat-leaderboard li img, .pigeon-profile img { object-fit: cover; border: 2px solid var(--ink); background: #ffe5ef; }
.hat-board[data-night] { background: #4b3964; }
.hat-board[data-night] .hat-choice::before { background: #5c5375; }
.hat-leaderboard {
  width: min(36rem,calc(100% - 1.4rem)); max-height: 85svh; overflow: auto; padding: 1.05rem;
  margin: auto; background: #f4e9ff; border: 3px solid var(--ink); color: var(--ink); box-shadow: 6px 6px var(--ink);
}
.hat-leaderboard::backdrop { background: #241723a8; }
.hat-leaderboard form { float: right; }
.hat-leaderboard h2 { margin: .1rem 0 .4rem; font-size: clamp(1.6rem,5vw,2.45rem); }
.hat-leaderboard ol { margin: .65rem 0 0; padding-inline-start: 2rem; }
.hat-leaderboard li { padding: .4rem; border-bottom: 1px solid #8d728c; overflow-wrap: anywhere; }
.hat-leaderboard li span { display: block; font-size: .83rem; }
.hat-leaderboard li img { float: left; margin-inline-end: .6rem; }
.hat-leaderboard li { display: flow-root list-item; }
.pigeon-profile form { float: none; display: grid; justify-items: start; gap: .45rem; margin-top: .85rem; }
.pigeon-profile label { font-weight: 800; }
.pigeon-profile input { width: min(100%,22rem); border: 2px solid var(--ink); background: #fff8df; }
.profile-dismiss { float: right; }
#pigeon-profile-status { margin: .2rem 0; }
#pigeon-profile-status:empty, [data-view="pfp"] .profile-choose { display: none; }

@media (max-width: 660px) {
  .pfp-workbench { grid-template-columns: 1fr; }
}
