#p20-avaa, #p20-reitti {
  pointer-events: auto; min-height: 40px; margin-top: .38rem; border: 1px solid #a67d55;
  border-radius: 9px; color: #31574c; background: #fff4de; box-shadow: var(--paperivarjo);
}
#p20-avaa { display: inline-flex; align-items: center; gap: .34rem; padding: 0 .64rem 0 .33rem; font-weight: 750; }
#p20-avaa canvas, #p20-reitti canvas { position: static; width: 27px; height: 27px; }
#p20-reitti { display: flex; width: max-content; align-items: center; background: #315d52; color: #fff2d9; }
#p20-reitti button { border: none; border-radius: inherit; background: none; padding: .4rem .55rem; min-height: 44px; font-weight: 750; }
#p20-laskuri { padding: 0 .6rem; border-inline-start: 1px solid #fff2d953; font-variant-numeric: tabular-nums; }
#p20-merkit { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.p20-merkki {
  position: absolute; top: 0; left: 0; display: flex; align-items: center; gap: .18rem; pointer-events: auto;
  border: 1px solid #816448; border-radius: 40% 45% 40% 44%; padding: 0 4px;
  min-width: 48px; min-height: 48px; color: #343a31; background: #fff4df; box-shadow: 0 3px 13px #244a5666;
}
.p20-merkki[data-rooli="löytö"] { background: #fff5dcf5; border-color: #bc7845; }
.p20-merkki[data-rooli="tavoite"], .p20-merkki[data-rooli="aukio"] {
  border-radius: 18px; padding-inline-end: .6rem; font-size: .84rem; font-weight: 780; white-space: nowrap;
}
.p20-merkki:is(:hover,:focus-visible) { background: #fffaf0; }
.p20-merkki canvas { position: static; width: 40px; height: 40px; flex: none; }
.p20-merkki span:empty { display: none; }
#p20-palaute {
  position: absolute; z-index: 4; inset: 27% auto auto 50%; max-width: calc(100% - 32px);
  transform: translateX(-50%); pointer-events: none; color: #fff4e1; text-align: center;
  font-weight: 790;
}
#p20-palaute:not(:empty) {
  padding: .6rem 1rem; border-radius: 18px; border: 1px solid #d8a76b; background: #31594f;
  box-shadow: var(--paperivarjo); animation: p20-pilahdus .32s ease-out both;
}
#p20-juhla {
  position: absolute; z-index: 2; inset: 0 auto auto 0; margin-inline-start: -4.2em; width: 8.4em; text-align: center; pointer-events: none;
  color: #ffdc87; text-shadow: 0 0 10px #aa6026, 0 0 24px #eeab4c;
  font-size: clamp(1.3rem,5vw,4.5rem); animation: p20-loiste 2.8s ease-in-out infinite alternate;
}
@keyframes p20-pilahdus { from { opacity: .45; transform: translate(-50%, .35rem) scale(.94); } }
@keyframes p20-loiste { from { opacity: .68; transform: translateY(5px); } to { opacity: 1; transform: translateY(-5px); } }
.p20-paperi {
  width: min(100% - 24px, 35rem); max-height: calc(100dvh - 28px);
  padding: clamp(1rem, 4vw, 2rem); border: 1px solid #946540; border-radius: 18px 13px 14px 20px;
  background: #fff2db; color: #363e34; box-shadow: 0 16px 54px #1e343b60;
}
.p20-paperi::backdrop { background: #192d3e8c; }
.p20-paperi h2 { margin: 0 3rem .5rem 0; color: #793b30; font: 600 clamp(1.7rem, 5vw, 2.65rem)/1.04 var(--otsikkokirjasin); }
.p20-paperi button {
  min-height: 44px; border: 1px solid #a77851; border-radius: 9px; background: #f7e2bc; padding: .35rem .7rem; font-weight: 750;
}
.p20-paperi button:hover { background: #fff8e7; }
.p20-paperi .p20-sulje { position: absolute; right: .8rem; top: .8rem; width: 44px; font-size: 1.45rem; line-height: 1; }
#p20-kirjanapit, #p20-kirjan-toimet { display: flex; gap: .4rem; flex-wrap: wrap; }
#p20-kirjanapit button[aria-pressed="true"], #p20-lahjareitti, #p20-lumiukko {
  background: #315d52; color: #fff2db; border-color: #2a5146;
}
#p20-albumi, #p20-passi { display: grid; padding: .6rem; list-style: none; margin: .65rem 0; gap: .28rem; border-radius: 9px; background: #e9dabb; }
#p20-albumi { grid-template-columns: repeat(7,minmax(0,1fr)); }
#p20-albumi li {
  aspect-ratio: 1.06; display: grid; grid-template-columns: 1fr; place-items: center;
  border: 1px solid #b48a5850; border-radius: 5px; background: #fff9e65f; position: relative; min-width: 0;
}
#p20-albumi li[data-tarra] { background: #fff9e8; outline: 2px dotted #c79a68; outline-offset: -4px; }
#p20-albumi li[data-jahti]::after {
  position: absolute; content: "✦"; bottom: 0; right: 2px; color: #a76423; font-size: .85em;
}
#p20-albumi canvas { position: static; width: 91%; height: auto; }
#p20-passi { grid-template-columns: repeat(auto-fit,minmax(7.6rem,1fr)); align-items: stretch; }
#p20-passi button {
  width: 100%; height: 100%; display: grid; justify-items: center;
  font-size: .84rem; padding: .24rem .3rem; background: #fff8e8;
}
#p20-passi canvas, #p20-aukion-kuva canvas { position: static; width: 44px; height: 44px; }
#p20-passi button:not([data-leima]) canvas { opacity: .3; }
#p20-aukion-kuva canvas { width: 65px; height: 65px; }
#p20-aukion-edistys { width: 100%; height: 1.25em; accent-color: #315d52; }
#p20-aukion-maara { margin-top: .15rem; font-weight: 800; }
#p20-kortin-osoite { margin: .18rem .4rem .4rem; font-weight: 800; }
@media (max-width: 600px) {
  #p20-avaa { min-height: 44px; }
  #p20-avaa, #p20-reitti { font-size: .82rem; }
  #p20-albumi { gap: .22rem; padding: .42rem; }
  #p20-palaute { inset-block-start: 37%; }
}
@media (prefers-reduced-motion: reduce) { #p20-palaute, #p20-juhla { animation: none; } }
#p20-otsake { display: flex; align-items: center; gap: .26rem; flex-wrap: wrap; }
#p20-otsake:has(#p20-avaa[hidden]) { display: none; }
#kortti[data-p20-polku] #kalenteripaikka { display: none; }
@media (max-width: 600px) {
  #kortti[data-p20-polku] :is(.kylaposti,#liikeohje) { display: none; }
}
.p20-merkki[data-rooli="löytö"] { z-index: 2; }
.p20-merkki[data-rooli="posti"] { z-index: 1; }

#p20-avaa, #p20-reitti button, .p20-paperi button, .p20-merkki { -webkit-tap-highlight-color: transparent; }
#p20-kortin-osoite:not([hidden]) { padding: .24rem .45rem .16rem; text-align: right; color: #79503e; letter-spacing: .09em; }
