@font-face {
  font-family: 'Finger Paint';
  src: url('../memory/assets/fonts/finger-paint.ttf') format('truetype');
  font-display: swap;
}
:root {
  --heading: 'Finger Paint', 'Trebuchet MS', sans-serif;
  --ink: #382944;
  --paper: #fff9ec;
  --leaf: #b8db74;
  --pink: #f5b9d4;
  --orange: #ffb065;
  --shadow: 0 7px 0 #c5d995, 0 18px 34px #57443120;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--ink);
  font: 1.1rem/1.55 'Trebuchet MS', Arial, sans-serif;
  background: radial-gradient(ellipse at 0 12%, #f9cde2, transparent 38%), radial-gradient(ellipse at 100% 50%, #e3f4ac, transparent 38%), var(--paper);
}
main, .topbar { width: min(1040px, calc(100% - 40px)); margin: auto; }
.topbar { display:flex; align-items:center; justify-content:space-between; padding:20px 0; }
.brand { font:1.45rem var(--heading); text-decoration:none; }
a { color:inherit; }
.lichtung {
  display:grid; grid-template-columns: .95fr 1fr; align-items:center;
  gap:clamp(16px,4vw,54px); padding:clamp(18px,4vw,40px); text-align:center;
  background:#fffaf2; border:2px solid #e6cfab; border-radius:48px 72px 44px 65px; box-shadow:var(--shadow);
}
figure { position:relative; isolation:isolate; margin:0; }
figure::before {
  content:''; position:absolute; z-index:-1; inset:5% 0 7%;
  border-radius:47% 43% 38% 49%; border:5px solid #fff7df;
  background:linear-gradient(#fff3cc33,#f4f8d138),url('../wimmelbild/assets/huether/garten-vorschau.webp') center/cover;
  box-shadow:5px 7px 0 #cee68c,0 14px 26px #59483228;
}
figure img { display:block; width:100%; height:clamp(255px,36vw,390px); object-fit:contain; filter:drop-shadow(2px 5px 5px #48344850); }
figcaption { display:inline-block; background:#ffedbb; border-radius:20px 15px 22px 12px; padding:3px 15px; font-size:.83rem; }
h1,h2 { font-family:var(--heading); font-weight:400; line-height:1.25; margin:0; }
h1 { background:var(--orange); border-radius:45% 38% 39% 32% / 34% 51% 35% 48%; padding:.4em .28em; font-size:clamp(1.9rem,4.2vw,3.25rem); box-shadow:4px 6px 0 #c9e78a; }
button,.action { display:inline-block; cursor:pointer; touch-action:manipulation; min-height:48px; border:2px solid #ba9f8c; border-radius:23px 31px 20px 30px; padding:.65rem 1rem; font:inherit; color:inherit; background:#fff8e9; box-shadow:0 4px 0 #bea795; }
.action { background:var(--leaf); border-color:#8aa653; box-shadow:0 5px 0 #89a756; font-family:var(--heading); text-decoration:none; }
button:enabled:active,.action:active { transform:translateY(2px); }
button:disabled { opacity:.55; cursor:default; }
:focus-visible { outline:4px solid #75469b; outline-offset:4px; }
#spiel { position:relative; text-align:center; margin:58px 0 30px; border:3px solid #e5ca9d; background:#fffefa; border-radius:48px 34px 58px 38px; padding:18px clamp(10px,4vw,40px) 30px; box-shadow:var(--shadow); }
.sana { display:block; width:90px; height:90px; object-fit:contain; margin:-53px auto 2px; filter:drop-shadow(0 4px 3px #68446244); }
h2 { font-size:clamp(1.2rem,3vw,1.8rem); }
details { background:#fff3de; border:2px solid #e1c8a4; border-radius:27px 34px 24px 30px; padding:14px 22px; margin:0 0 38px; box-shadow:0 4px 0 #e2d3af; }
summary { cursor:pointer; }
@media(max-width:680px) {
  main,.topbar {width:calc(100% - 28px)}
  .lichtung { grid-template-columns:1fr; border-radius:32px 42px 30px 38px; }
  figure {width:min(100%,310px); margin:auto;}
  figure img {height:255px}
  .brand {font-size:1.13rem}
}
.lichtung { grid-template-columns:minmax(130px,.64fr) minmax(230px,1fr); padding:clamp(12px,2vw,24px) clamp(16px,5vw,52px); }
.lichtung figure img { height:clamp(165px,24vw,245px); }
.lichtung p { max-width:33em; margin:1.05rem auto; }
#spiel { margin-top:50px; }
.reward-actions { margin:1.3rem 0 .9rem; }
.reward-actions p { font-size:.97rem; margin:.6rem 0 .2rem; }
#invite { background:var(--pink); }
#together { max-width:31em; margin:1em auto; }
dialog { width:min(670px,calc(100% - 26px)); max-height:94vh; max-height:94dvh; overflow:auto; border:3px solid #ded0a5; border-radius:32px; padding:clamp(15px,3vw,30px); color:var(--ink); text-align:center; background:#fff9eb; box-shadow:0 18px 72px #23382375; }
dialog::backdrop { background:#23332bbd; }
dialog h2 { color:#543664; }
dialog p { margin:.65rem auto; }
#card-image { display:block; max-width:100%; width:auto; max-height:50vh; margin:.9rem auto 1.1rem; box-shadow:1px 4px 10px #543b243d; }
.card-buttons { display:flex; gap:12px; justify-content:center; flex-wrap:wrap; }
#continue { background:#f7cde1; }
.text-button { display:block; margin:12px auto 0; background:transparent; border:none; box-shadow:none; min-height:38px; font-size:.95rem; text-decoration:underline; }
.save-tip { font-size:.93rem; }
[hidden] { display:none !important; }
@media(max-width:680px) {
  .lichtung { grid-template-columns:minmax(90px,.54fr) minmax(0,1fr); padding:12px; gap:12px; }
  .lichtung figure img { height:clamp(146px,29vw,188px); }
  figcaption { font-size:.65rem; padding:2px 6px; }
  .lichtung h1 { font-size:clamp(1.3rem,4.5vw,2rem); }
  .lichtung p { font-size:.95rem; line-height:1.38; margin:.75rem 0; }
  .lichtung .action { font-size:.89rem; }
}
@media(max-width:440px) {

  .topbar { gap:8px; }
  .scene { border-radius:20px 26px 18px 24px; }
}
main,.topbar { width:min(1380px,calc(100% - 34px)); }
.lichtung { max-width:1060px; margin:auto; }
#spiel { padding-inline:clamp(12px,2.3vw,34px); }
#spiel .intro { margin:.55rem auto 1rem; }
#areas { display:flex; justify-content:center; gap:clamp(6px,1.2vw,18px); flex-wrap:wrap; margin:0 auto 20px; }
#areas button { min-width:clamp(98px,16vw,190px); background:linear-gradient(#fff8,#fff9),var(--thumb) center 55%/cover; border-color:#b7be8f; border-radius:23px 36px 26px 31px; color:#233a25; font:clamp(.85rem,1.5vw,1.08rem) var(--heading); text-shadow:0 1px 4px #fff; box-shadow:0 4px 0 #a9b980; }
[data-area="wiese"] { --thumb:url('blumenwiese.webp'); }
[data-area="wald"] { --thumb:url('waldrand.webp'); }
[data-area="ufer"] { --thumb:url('bachufer.webp'); }
#areas button[aria-pressed="true"] { outline:2px solid #5a7136; border-color:#5a7136; box-shadow:0 5px 0 #668140; }
.worktable { display:grid; grid-template-columns:minmax(190px,245px) minmax(0,1fr); gap:clamp(14px,2vw,30px); align-items:start; }
.basket { padding:12px; border:2px solid #e1cb9c; border-radius:28px 22px 32px 25px; background:#fff5db; }
#categories { display:grid; grid-template-columns:1fr 1fr; gap:6px; }
#categories button { min-height:42px; border:1px solid #ccbc90; margin:0; padding:3px 6px; border-radius:12px 16px; background:#fffdfa; box-shadow:0 2px 0 #dac9a0; font-size:.92rem; }
#categories button[aria-pressed=true] { color:#304119; background:#dfedb3; border-color:#7b9046; font-weight:bold; }
#palette { margin-top:13px; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
#palette button { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:4px; min-height:80px; padding:5px 3px; border:2px solid transparent; box-shadow:0 2px 0 #d7c9a6; font-size:.92rem; line-height:1.2; border-radius:16px 20px 15px 18px; background:#fffefa; }
#palette img { display:block; width:68px; height:51px; object-fit:contain; }
#palette button[aria-pressed=true] { border-color:#80547b; color:#593d5c; background:#fbe9ee; box-shadow:0 3px 0 #a77a95; font-weight:bold; }
.picture-area { min-width:0; }
.scene { width:100%; aspect-ratio:3/2; overflow:hidden; position:relative; border:3px solid #fff3ce; border-radius:30px 39px 28px 36px; background:#cfdf94 url('blumenwiese.webp') center/cover; box-shadow:0 0 0 2px #a5b674,0 6px 0 #abbd81; scrollbar-width:thin; }
#scene-inner { position:relative; width:100%; min-height:100%; }
#view.zoomed { overflow:auto; }
#view.zoomed #scene-inner { width:190%; }
#landscape { display:block; width:100%; height:auto; }
#field { position:absolute; inset:0; width:100%; height:100%; min-height:0; padding:0; border:0; border-radius:0; background:transparent; box-shadow:none; touch-action:manipulation; cursor:crosshair; -webkit-tap-highlight-color:transparent; }
#field:active { transform:none; }
#field:focus-visible { outline-offset:-5px; }
#aim { display:none; position:absolute; transform:translate(-50%,-50%); width:32px; height:32px; place-items:center; border-radius:50%; background:#fff8; color:#392244; border:2px dashed #5c3664; font-weight:bold; }
#field:focus-visible #aim { display:grid; }
#message { font-weight:bold; color:#405635; margin:1rem auto .4rem; min-height:1.55em; }
.tools-row { display:flex; flex-wrap:wrap; justify-content:center; gap:6px 9px; }
.tools-row button { min-height:40px; padding:.3em .8em; font-size:.91rem; box-shadow:0 3px 0 #c6b995; }
#sound { background:#dff0e5; }
#sound[aria-pressed=true] { background:#bde1cc; border-color:#6b9d7d; }
#album { background:#ffdbac; font-family:var(--heading); }
.reward-actions { display:flex; justify-content:center; align-items:center; flex-wrap:wrap; gap:9px; }
.reward-actions p { flex-basis:100%; margin:0; }
#card-choice { display:block; font-size:.95rem; }
#card-choice select { font:inherit; color:inherit; border:1px solid #998d72; min-height:40px; border-radius:10px; padding:4px; }
#animal-dialog { width:min(820px,calc(100% - 22px)); }
#album-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(105px,1fr)); gap:8px; margin:10px 0 18px; }
#album-grid>* { border-radius:13px; padding:8px 3px; display:flex; flex-direction:column; align-items:center; gap:4px; font-size:.86rem; line-height:1.2; min-width:0; }
#album-grid .found { background:#e5efca; font-weight:bold; }
#album-grid .clue { background:#f3ecdd; }
#album-grid img { width:75px; height:55px; object-fit:contain; }
#album-grid .clue img { opacity:.8; }
.sr-only { position:absolute; height:1px; width:1px; padding:0; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
@media(max-width:800px) {
  .worktable { grid-template-columns:minmax(0,1fr); gap:12px; }
  .basket { padding:9px; }
  #categories { display:flex; justify-content:center; gap:6px; flex-wrap:wrap; }
  #categories button { padding:3px 10px; }
  #palette { grid-template-columns:repeat(auto-fit,minmax(65px,1fr)); gap:5px; margin-top:9px; }
  #palette button { min-height:66px; font-size:.82rem; }
  #palette img { width:50px; height:35px; }
  #spiel .intro { font-size:1rem; }
}
@media(max-width:480px) {
  main,.topbar { width:calc(100% - 16px); }
  #spiel { padding-inline:8px; border-width:2px; }
  #areas { gap:6px; }
  #areas button { min-width:0; padding:.45rem .55rem; }
  #categories { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:3px; }
  #categories button { padding:2px; font-size:.78rem; }
  #palette { grid-template-columns:repeat(3,minmax(0,1fr)); }
  #palette button { flex-direction:row; min-height:46px; }
  #palette img { width:29px; height:32px; }
  .scene { border-radius:17px 24px 16px 22px; }
}
