/* Doodle — kindvriendelijke UI */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
:root {
  --ink: #3b3a55; --pink: #ff7aa2; --pink-d: #e85b86; --yellow: #ffd23f;
  --green: #45c486; --blue: #6fc3ff; --card: #fffdf7;
}
html, body { height: 100%; overflow: hidden; }
body {
  font-family: 'Baloo 2', 'Comic Sans MS', 'Chalkboard SE', system-ui, sans-serif;
  background: #cfeffd; color: var(--ink); user-select: none; -webkit-user-select: none;
  touch-action: none;
}
#game { position: fixed; inset: 0; }
#c { position: absolute; inset: 0; display: block; touch-action: none; }

.hidden { display: none !important; }

/* Screens */
.screen {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 14px; text-align: center;
  padding: 24px;
}
.screen.overlay { background: rgba(20, 24, 60, 0.45); backdrop-filter: blur(2px); }
.bgart { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }

/* ===== Premium splash + start ===== */
#splash { background:
  radial-gradient(120% 60% at 50% 8%, rgba(255,255,255,.55), rgba(255,255,255,0) 60%),
  linear-gradient(165deg, #ffe9a8 0%, #ffc24e 52%, #ff9d5e 100%); }
.splash-inner, .start-inner { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.splash-inner canvas { filter: drop-shadow(0 14px 22px rgba(80,50,20,.3)); }
.logo {
  font-size: clamp(54px, 16vw, 96px); font-weight: 800; letter-spacing: .5px; color: #ffd23f;
  -webkit-text-stroke: 5px #3a2d20; paint-order: stroke fill;
  text-shadow: 0 7px 0 #c47e10, 0 11px 0 #3a2d20, 0 15px 18px rgba(0,0,0,.35);
  transform: rotate(-3deg); animation: logofloat 3s ease-in-out infinite;
}
@keyframes logofloat { 0%,100%{ transform: rotate(-3deg) translateY(0) } 50%{ transform: rotate(-3deg) translateY(-8px) } }
.tag { font-size: clamp(17px, 4.8vw, 23px); font-weight: 800; color: #fff; max-width: 15em;
  -webkit-text-stroke: 3px #3a2d20; paint-order: stroke fill; text-shadow: 0 3px 0 rgba(0,0,0,.25); }
.loadtxt { font-weight: 800; color: #fff; -webkit-text-stroke: 2px #3a2d20; paint-order: stroke fill; }

.loader { width: 240px; max-width: 72vw; height: 22px; background: rgba(255,255,255,.6); border-radius: 14px;
  overflow: hidden; border: 4px solid #fff; box-shadow: 0 4px 12px rgba(0,0,0,.2), inset 0 2px 4px rgba(0,0,0,.15); }
.loaderfill { width: 0%; height: 100%; border-radius: 10px; transition: width .1s linear;
  background: linear-gradient(180deg, #ff9ec0, #e85b86); position: relative; }
.loaderfill::after { content: ''; position: absolute; inset: 0 0 50% 0; background: linear-gradient(180deg, rgba(255,255,255,.6), rgba(255,255,255,0)); border-radius: 10px; }

#start { background: linear-gradient(165deg, #bfeaff 0%, #9fd0ff 60%, #cfe0ff 100%); }
.start-inner { position: relative; z-index: 1;
  background: linear-gradient(180deg, rgba(255,255,255,.55), rgba(255,255,255,.32));
  padding: 26px 30px 30px; border-radius: 34px; backdrop-filter: blur(5px);
  border: 4px solid rgba(255,255,255,.8);
  box-shadow: 0 16px 40px rgba(30,40,90,.28), inset 0 2px 0 rgba(255,255,255,.7); overflow: hidden; }
.start-inner::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 40%;
  background: linear-gradient(180deg, rgba(255,255,255,.5), rgba(255,255,255,0)); pointer-events: none; }
.start-inner > * { position: relative; }
#playBtn { font-size: 28px; padding: 18px 46px; border-radius: 26px;
  background: linear-gradient(180deg, #7ee59a, #45c486 60%, #2ea36b); border-bottom-color: #1f7d50;
  box-shadow: 0 8px 20px rgba(40,120,70,.4); }

/* Buttons */
.btn {
  font-family: inherit; font-weight: 800; font-size: 20px; color: #fff;
  background: var(--pink); border: none; border-bottom: 5px solid var(--pink-d);
  padding: 14px 26px; border-radius: 18px; cursor: pointer; box-shadow: 0 6px 16px rgba(0,0,0,.15);
  transition: transform .08s; touch-action: manipulation;
}
.btn:active { transform: translateY(3px); border-bottom-width: 2px; }
.btn.big { font-size: 24px; padding: 16px 34px; }
.btn.ghost { background: #fff; color: var(--ink); border-bottom-color: #d8d2c2; }
.btn.small { font-size: 16px; padding: 8px 14px; }
.btn.pulse { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.06); } }

/* Cards — premium glossy panel */
.card {
  position: relative; border: 5px solid #fff; border-radius: 30px;
  background: linear-gradient(180deg, #fffdf7 0%, #fff3e0 100%);
  padding: 28px 24px 26px; max-width: 460px; width: 92%;
  box-shadow: 0 2px 0 rgba(255,255,255,.9) inset, 0 18px 40px rgba(40,30,70,.34), 0 0 0 4px rgba(255,255,255,.25);
  display: flex; flex-direction: column; gap: 14px; align-items: center; overflow: hidden;
}
.card::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 42%;
  background: linear-gradient(180deg, rgba(255,255,255,.55), rgba(255,255,255,0)); pointer-events: none; border-radius: 26px 26px 50% 50%; }
.card > * { position: relative; z-index: 1; }
.card h2 { font-size: 30px; letter-spacing: -.3px; }
ol.how { text-align: left; line-height: 1.7; font-size: 17px; padding-left: 6px; list-style: none; }
ol.how li { margin: 6px 0; }
.result-card h2 { font-size: 34px; color: var(--pink-d); }
.resultmsg { font-size: 18px; font-weight: 600; }
.result-btns { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.stars { display: flex; gap: 8px; justify-content: center; font-size: 46px; color: var(--yellow); min-height: 50px; align-items: center; }

.screen-title { font-size: clamp(26px,7vw,40px); color: #fff; text-shadow: 0 3px 0 var(--pink-d); transform: rotate(-2deg); }
#levelselect { background: linear-gradient(160deg, #ffe1ec, #ffc6dc);
  justify-content: flex-start; align-items: center; padding: 0;
  overflow-y: auto; -webkit-overflow-scrolling: touch; }
#levelselect .screen-title { margin: max(5vh, env(safe-area-inset-top)) 0 14px; position: sticky; top: 0; z-index: 2;
  padding-top: 10px; }
.levelgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px;
  width: min(640px, 92vw); padding-bottom: 8px; }
#lvlBack { margin: 16px 0 calc(28px + env(safe-area-inset-bottom)); }
.lvlcard, .levelbtn {
  background: var(--card); border: 4px solid var(--ink); border-radius: 18px; padding: 8px;
  display: flex; flex-direction: column; align-items: center; gap: 5px; cursor: pointer;
  box-shadow: 0 6px 14px rgba(0,0,0,.18); transition: transform .08s; font-family: inherit;
}
.lvlcard:active, .levelbtn:active { transform: scale(.96); }
.lvlcard.locked, .levelbtn.locked { opacity: .6; cursor: default; filter: grayscale(.5); }
.lvlcard canvas, .levelbtn canvas, .levelpreview { width: 100%; height: auto; border-radius: 11px; display: block; background: #cfeffd; }
.lname, .levellabel { font-weight: 800; font-size: 14px; color: var(--ink); text-align: center; line-height: 1.15; }
.lstars, .levelstars { font-size: 18px; color: var(--yellow); letter-spacing: 1px; min-height: 22px; display: flex; align-items: center; justify-content: center; }
.levelstars canvas { width: auto; background: none; }
.lockicon { font-size: 20px; }

/* HUD */
#hud { position: absolute; inset: 0; pointer-events: none; }
#hud .btn { pointer-events: auto; }
#inkwrap { position: absolute; top: 66px; left: 14px; display: flex; align-items: center; gap: 10px; }
.pencil { display: flex; align-items: center; filter: drop-shadow(0 3px 4px rgba(0,0,0,.22)); }
/* sharpened wooden tip + graphite lead */
.pencil-tip { position: relative; width: 0; height: 0; border-top: 14px solid transparent; border-bottom: 14px solid transparent; border-right: 18px solid #e7b86a; }
.pencil-tip .lead { position: absolute; top: -6px; left: 12px; width: 0; height: 0; border-top: 6px solid transparent; border-bottom: 6px solid transparent; border-right: 8px solid #4a4a55; }
.pencil-body { width: 132px; height: 28px; background: linear-gradient(180deg,#ffe07a,#f6c454 55%,#e7ad33); border: 3px solid var(--ink); border-left: none; overflow: hidden; position: relative; }
.pencil-body .grain { position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(90deg, transparent 0 14px, rgba(0,0,0,.05) 14px 15px); }
#inkfill { position: absolute; left: 0; top: 0; bottom: 0; height: 100%; width: 100%;
  background: linear-gradient(180deg, #8be38e, var(--green)); transition: width .06s linear, background .2s; }
.pencil-ferrule { width: 11px; height: 28px; background: repeating-linear-gradient(90deg,#cfd3da,#eef1f6 3px,#cfd3da 6px); border: 3px solid var(--ink); border-left: none; }
.pencil-eraser { width: 15px; height: 28px; background: linear-gradient(180deg,#ff9ec0,#f06b97); border: 3px solid var(--ink); border-left: none; border-radius: 0 8px 8px 0; }
#inkpct { font-weight: 800; font-size: 15px; color: #fff; text-shadow: 0 2px 0 rgba(0,0,0,.25);
  background: var(--ink); padding: 3px 9px; border-radius: 12px; }
#inkwrap.low .pencil { animation: inkshake .28s ease-in-out infinite; }
#inkwrap.low #inkfill { background: #ff5a5a; }
#inkwrap.empty .pencil { animation: inkpop .5s ease-out; }
#inkwrap.empty #inkpct { color: var(--pink-d); }
@keyframes inkshake { 0%,100%{transform:translateX(0) rotate(0)} 25%{transform:translateX(-2px) rotate(-2deg)} 75%{transform:translateX(2px) rotate(2deg)} }
@keyframes inkpop { 0%{transform:scale(1)} 40%{transform:scale(1.18) rotate(-3deg)} 100%{transform:scale(1)} }
#timerwrap { position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
  font-size: 24px; font-weight: 800; color: #fff; background: var(--ink);
  padding: 6px 16px; border-radius: 20px; box-shadow: 0 4px 10px rgba(0,0,0,.25);
  display: flex; align-items: center; gap: 6px; }
#timerwrap.urgent { background: var(--pink-d); animation: tick 1s ease-in-out infinite; }
@keyframes tick { 0%,100%{transform:translateX(-50%) scale(1)} 50%{transform:translateX(-50%) scale(1.12)} }
#powerbar { position: absolute; right: 10px; bottom: 78px; display: flex; flex-direction: column; gap: 8px; z-index: 4; }
.powbtn { position: relative; width: 56px; height: 56px; border-radius: 16px; border: 3px solid var(--ink); background: #fffdf7;
  box-shadow: 0 4px 0 #d8d2c2, 0 6px 12px rgba(0,0,0,.18); display: flex; flex-direction: column; align-items: center;
  justify-content: center; font-family: inherit; overflow: hidden; cursor: pointer; }
.powbtn .picon { font-size: 24px; line-height: 1; }
.powbtn .pname { font-size: 8px; font-weight: 800; color: var(--ink); margin-top: 1px; }
.powbtn .pcd { position: absolute; left: 0; bottom: 0; width: 100%; height: 0; background: rgba(58,45,32,.45); transition: height .1s linear; }
.powbtn.off { opacity: .45; filter: grayscale(.55); }
.powbtn.on { border-color: var(--accent, #61d3e4); box-shadow: 0 0 0 3px rgba(97,211,228,.55), 0 4px 8px rgba(0,0,0,.2); }
.powbtn:active { transform: translateY(2px); box-shadow: 0 1px 0 #d8d2c2; }

#hudbar { position: absolute; left: 0; right: 0; bottom: 0; height: 64px; display: flex;
  align-items: center; justify-content: space-between; gap: 8px; padding: 0 12px;
  background: linear-gradient(0deg, rgba(255,255,255,.9), rgba(255,255,255,0)); pointer-events: none; }
#hudbar .btn { pointer-events: auto; }
#attackBtn { flex: 1 1 auto; max-width: 66vw; margin: 0 auto; }
#attackBtn:active { transform: translateY(3px); }
#hudBack, #redrawBtn { flex: 0 0 auto; width: 50px; height: 50px; padding: 0; border-radius: 50%;
  font-size: 22px; display: flex; align-items: center; justify-content: center; }

/* ---- Roadmap map ---- */
#levelselect { padding: 0; justify-content: flex-start; align-items: stretch; overflow: hidden;
  background: linear-gradient(160deg, #d8f3ff, #ffe1ec 60%, #ffc6dc); }
.btn.rnd { width: 48px; height: 48px; padding: 0; border-radius: 50%; font-size: 20px;
  display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.btn.pink { background: var(--pink); color: #fff; border-bottom-color: var(--pink-d); }
.maptop { display: flex; align-items: center; gap: 8px; padding: max(12px, env(safe-area-inset-top)) 10px 8px;
  background: rgba(255,255,255,.55); backdrop-filter: blur(6px); box-shadow: 0 3px 10px rgba(0,0,0,.08); z-index: 3; }
.maptop > .btn { flex: 0 0 auto; }
.maptitle { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.chapname { display: flex; align-items: center; gap: 6px; font-weight: 800; font-size: 16px; color: var(--ink); max-width: 100%; }
.chapname > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.chev { border: none; background: #fff; color: var(--ink); width: 30px; height: 30px; border-radius: 50%;
  font-size: 20px; font-weight: 800; cursor: pointer; box-shadow: 0 2px 5px rgba(0,0,0,.15); }
.starcount { font-weight: 800; font-size: 13px; color: var(--pink-d); }
.roadscroll { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; display: flex; justify-content: center; }
.roadmap { position: relative; margin: 10px auto 30px; }
.roadsvg { position: absolute; left: 0; top: 0; pointer-events: none; }
.roadpath { fill: none; stroke: #ffffff; stroke-width: 16; stroke-linecap: round; stroke-linejoin: round; opacity: .85; }
.roadpath.dash { stroke: #ffb84d; stroke-width: 5; stroke-dasharray: 2 18; }
.mapnode { position: absolute; transform: translate(-50%, -50%); width: 76px; height: 76px; border-radius: 50%;
  border: 5px solid #fff; cursor: pointer; font-family: inherit;
  background:
    radial-gradient(circle at 36% 28%, rgba(255,255,255,.85), rgba(255,255,255,0) 42%),
    radial-gradient(circle at 50% 60%, #ffd23f, #f0a81e 70%, #d98e12);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 0 #c47e10, 0 10px 16px rgba(0,0,0,.28), inset 0 -4px 8px rgba(0,0,0,.18);
  animation: nodebob 2.6s ease-in-out infinite; }
@keyframes nodebob { 0%,100%{ transform: translate(-50%,-50%) } 50%{ transform: translate(-50%,calc(-50% - 5px)) } }
.mapnode:active { box-shadow: 0 2px 0 #c47e10, inset 0 -4px 8px rgba(0,0,0,.2); }
.mapnode.locked { border-color: #e7e7ee;
  background: radial-gradient(circle at 36% 28%, rgba(255,255,255,.6), rgba(255,255,255,0) 42%), radial-gradient(circle at 50% 60%, #cfd0da, #a7a9ba);
  box-shadow: 0 6px 0 #8f91a3, 0 10px 16px rgba(0,0,0,.18); cursor: default; animation: none; }
.mapnode.current { background:
    radial-gradient(circle at 36% 28%, rgba(255,255,255,.9), rgba(255,255,255,0) 42%),
    radial-gradient(circle at 50% 60%, #ff8fb3, #e85b86 72%, #c93b69);
  box-shadow: 0 6px 0 #b23560, 0 0 0 7px rgba(255,122,162,.32), 0 10px 18px rgba(0,0,0,.3);
  animation: nodepulse 1.3s ease-in-out infinite; }
@keyframes nodepulse { 0%,100%{ box-shadow: 0 6px 0 #b23560, 0 0 0 6px rgba(255,122,162,.34); } 50%{ box-shadow: 0 6px 0 #b23560, 0 0 0 14px rgba(255,122,162,.12); } }
.mnum { font-weight: 800; font-size: 26px; color: #fff; text-shadow: 0 2px 0 rgba(0,0,0,.3), 0 0 6px rgba(0,0,0,.15); }
.mcrown { position: absolute; top: -20px; left: 50%; transform: translateX(-50%); font-size: 22px;
  filter: drop-shadow(0 2px 2px rgba(0,0,0,.3)); }
.mstarbadge { position: absolute; top: calc(100% - 8px); left: 50%; transform: translateX(-50%);
  display: flex; gap: 2px; background: #fff; border: 3px solid var(--ink); border-radius: 14px; padding: 1px 6px;
  box-shadow: 0 3px 6px rgba(0,0,0,.22); }
.mstar { font-size: 14px; color: #d8d2c2; text-shadow: 0 1px 0 rgba(0,0,0,.15); }
.mstar.on { color: #ffcf33; }
.mlock { font-size: 22px; }
.mapcat { position: absolute; top: -46px; left: 50%; transform: translateX(-50%); pointer-events: none;
  filter: drop-shadow(0 3px 3px rgba(0,0,0,.25)); animation: cathop 1.3s ease-in-out infinite; }
@keyframes cathop { 0%,100%{ transform: translateX(-50%) translateY(0) } 50%{ transform: translateX(-50%) translateY(-6px) } }
.soonpanel { margin: auto; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 30px; }
.soonpanel canvas { border-radius: 14px; border: 4px solid var(--ink); box-shadow: 0 8px 18px rgba(0,0,0,.2); }
.soontxt { font-weight: 800; font-size: 18px; color: var(--ink); text-align: center; }

/* ---- Wardrobe ---- */
.wardcard { max-width: 440px; }
#wardpreview { display: flex; justify-content: center; }
#wardpreview canvas { border-radius: 14px; border: 4px solid var(--ink); }
.wardlbl { align-self: flex-start; font-weight: 800; font-size: 14px; color: var(--pink-d); margin-top: 4px; }
.wardrow { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.warditem { display: flex; flex-direction: column; align-items: center; gap: 2px; background: #fff;
  border: 3px solid var(--ink); border-radius: 12px; padding: 4px; cursor: pointer; font-family: inherit; min-width: 56px; }
.warditem.on { border-color: var(--pink); background: #fff0f5; box-shadow: 0 0 0 3px rgba(255,122,162,.3); }
.warditem.locked { opacity: .5; filter: grayscale(.6); cursor: default; }
.warditem .witxt { font-size: 11px; font-weight: 700; color: var(--ink); }
.penswatch { width: 38px; height: 38px; border-radius: 9px; border: 2px solid var(--ink); display: block; }

/* ---- Juice: scherm-transities + candy pop ---- */
.screen:not(.hidden):not(#splash) { animation: screenIn .26s ease both; }
@keyframes screenIn { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }
.result-card { animation: popIn .4s cubic-bezier(.34,1.56,.64,1) both; }
@keyframes popIn { 0% { opacity: 0; transform: scale(.7) translateY(12px); } 100% { opacity: 1; transform: none; } }
/* candy-glans op alle knoppen */
.btn { position: relative; overflow: hidden; }
.btn::after { content: ''; position: absolute; left: 8%; right: 8%; top: 6%; height: 34%;
  background: linear-gradient(180deg, rgba(255,255,255,.55), rgba(255,255,255,0)); border-radius: 50%; pointer-events: none; }
/* mute-knop */
#muteBtn { position: absolute; top: max(10px, env(safe-area-inset-top)); right: 12px; z-index: 6;
  width: 44px; height: 44px; border-radius: 50%; border: 3px solid var(--ink); background: #fff;
  font-size: 20px; display: flex; align-items: center; justify-content: center; cursor: pointer;
  box-shadow: 0 4px 10px rgba(0,0,0,.18); }
@media (prefers-reduced-motion: reduce) {
  .pulse, .mapnode, .mapnode.current, .mapcat, #timerwrap.urgent, .screen:not(.hidden) { animation: none !important; }
}

/* +Inkt boost-feedback */
#inkwrap.boost { animation: inkboost .6s ease-out; }
#inkwrap.boost #inkfill { background: linear-gradient(180deg,#bfffd0,#2ecf6b) !important; }
@keyframes inkboost { 0%{transform:scale(1)} 35%{transform:scale(1.22) rotate(-3deg)} 100%{transform:scale(1)} }
/* chunky HUD-knoppen (back/undo) passend bij de candy-stijl */
#hudBack, #redrawBtn { background: #fffdf7; border: 4px solid var(--ink); font-size: 24px;
  box-shadow: 0 5px 0 #d8d2c2, 0 7px 12px rgba(0,0,0,.2); }
#hudBack { background: linear-gradient(180deg,#fff,#ffe9f0); }

/* ===== Uniforme premium terug-knop (overal zelfde) ===== */
.btn.back { width: 52px; height: 52px; padding: 0; border-radius: 50%;
  background: linear-gradient(180deg,#fff,#ffe9f0); border: 4px solid var(--ink);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 5px 0 #d8aab8, 0 7px 12px rgba(0,0,0,.22); flex: 0 0 auto; }
.btn.back:active { transform: translateY(2px); box-shadow: 0 2px 0 #d8aab8; }
.btn.back .bk { display: inline-block; width: 13px; height: 13px;
  border-left: 5px solid var(--ink); border-bottom: 5px solid var(--ink);
  transform: rotate(45deg); margin-left: 4px; border-radius: 2px; }
/* fast-forward-knop (alleen tijdens aanval) */
#ffBtn { position: absolute; top: 10px; right: 66px; z-index: 5; width: 46px; height: 46px;
  background: linear-gradient(180deg,#bfe3ff,#6fb8ff); border: 4px solid var(--ink); color: #fff; }
#ffBtn.on { background: linear-gradient(180deg,#ffe08a,#ffb43e); box-shadow: 0 0 0 3px rgba(255,180,62,.5), 0 5px 0 #c47e10; }
/* start-knop prominenter (niet verstopt) */
#playBtn { font-size: 30px; padding: 20px 56px; margin-top: 8px; transform: scale(1.05); }
.start-inner { gap: 16px; }

/* ===== Kledingkast tabjes ===== */
.wardtabs { display: flex; gap: 8px; margin: 6px 0 4px; }
.wardtab { flex: 1; font-family: inherit; font-weight: 800; font-size: 14px; color: var(--ink);
  background: #efe9f7; border: 3px solid var(--ink); border-radius: 14px 14px 0 0; padding: 8px 6px; cursor: pointer; }
.wardtab.on { background: linear-gradient(180deg,#fff,#ffe9f0); box-shadow: inset 0 -3px 0 var(--pink); }
/* ===== Beloning op result-scherm ===== */
.rewardrow { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 4px 0 2px;
  background: linear-gradient(180deg,#fff6da,#ffe9b0); border: 3px solid var(--ink); border-radius: 16px; padding: 10px 14px; width: 100%; }
.rwhead { font-weight: 800; color: var(--pink-d); font-size: 15px; }
.rwstrip { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.rwitem { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.rwitem canvas { border: 3px solid var(--ink); border-radius: 12px; background: #cfeffd; animation: popIn .4s cubic-bezier(.34,1.56,.64,1) both; }
.rwname { font-size: 11px; font-weight: 800; color: var(--ink); }

/* garderobe-knop tijdens spelen (tekenfase) */
#wardBtn { position: absolute; top: 10px; left: 12px; z-index: 5; width: 46px; height: 46px;
  background: linear-gradient(180deg,#fff,#ffe9f0); border: 4px solid var(--ink); }

/* hoofdstuk-voltooid banner */
.rewardrow.chapdone { background: linear-gradient(180deg,#fff0fb,#ffe0f2); }
.chapnext { font-size: 13px; font-weight: 700; color: var(--ink); text-align: center; }

/* power-uitleg overlay */
.powbtn.powhelp { opacity: .9; }
#powerhelp .card { max-width: 460px; max-height: 86vh; overflow-y: auto; text-align: left; }
.phelp-sub { font-size: 13px; color: #5a5470; margin: 4px 0 10px; }
.phelp-row { display: flex; gap: 10px; align-items: flex-start; padding: 8px; border-radius: 12px; background: rgba(127,150,255,.08); margin-bottom: 7px; }
.phelp-row.locked { opacity: .55; }
.phelp-ic { font-size: 26px; line-height: 1; flex: 0 0 auto; }
.phelp-txt { font-size: 13px; color: #2a2350; }
.phelp-when { font-size: 11px; color: #8a84a0; font-weight: 700; }
.phelp-fx { font-size: 11px; color: #c0476b; margin-top: 2px; }
.phelp-mh { margin: 12px 0 6px; font-size: 15px; }

/* ===== AAA polish pass ===== */
#attackBtn {
  background: linear-gradient(180deg, #ff9ec0 0%, #ff6f9c 55%, #e6447e 100%);
  border-bottom: 5px solid #c5306a;
  box-shadow: 0 10px 26px rgba(230,68,126,.42), inset 0 2px 0 rgba(255,255,255,.6);
  text-shadow: 0 2px 0 rgba(0,0,0,.18); letter-spacing: .2px;
}
#attackBtn::after { content:''; position:absolute; }
.btn.rnd {
  background: linear-gradient(180deg, rgba(255,255,255,.95), rgba(235,240,255,.9));
  color: #3b3a55; border-bottom: 4px solid rgba(150,160,200,.6);
  box-shadow: 0 6px 16px rgba(40,40,90,.28), inset 0 2px 0 rgba(255,255,255,.9);
  backdrop-filter: blur(4px);
}
#timerwrap {
  background: linear-gradient(180deg, #ff8db4, #e85b86); color:#fff; font-weight: 800;
  padding: 7px 16px; border-radius: 20px; border: 3px solid #fff;
  box-shadow: 0 8px 20px rgba(232,91,134,.4), inset 0 2px 0 rgba(255,255,255,.5);
  text-shadow: 0 2px 0 rgba(0,0,0,.2);
}
#powerbar {
  gap: 10px; padding: 8px; border-radius: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,.28), rgba(255,255,255,.12));
  border: 1.5px solid rgba(255,255,255,.5); backdrop-filter: blur(7px);
  box-shadow: 0 8px 24px rgba(20,24,60,.25);
}
.powbtn {
  border-radius: 16px; border: 2px solid rgba(255,255,255,.85);
  background: linear-gradient(180deg, #fffdf7, #ffe9f2);
  box-shadow: 0 5px 14px rgba(40,30,70,.25), inset 0 2px 0 rgba(255,255,255,.9);
  transition: transform .08s, box-shadow .15s;
}
.powbtn.on { box-shadow: 0 0 0 3px #ffd23f, 0 6px 18px rgba(255,180,40,.5); transform: translateY(-2px); }
.powbtn.off { filter: grayscale(.55) brightness(.9); opacity: .7; }
.powbtn:active { transform: translateY(2px) scale(.97); }
.pencil { filter: drop-shadow(0 6px 8px rgba(0,0,0,.28)); }
/* zachte glans-rand bovenaan het scherm voor diepte */
#hud::before { content:''; position:absolute; left:0; right:0; top:0; height:120px; pointer-events:none;
  background: linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,0)); z-index:0; }

/* power-knoppen + overlays moeten klikbaar zijn binnen de pointer-events:none HUD */
#hud #powerbar, #hud .powbtn, #hud #wardBtn { pointer-events: auto; }
#powerhelp { pointer-events: auto; z-index: 50; }

.homemodes { display: flex; gap: 8px; justify-content: center; margin-top: 4px; }
.homemodes .small { font-size: 15px; padding: 8px 14px; }

/* ===== Premium "Royal Match" uplift ===== */
/* glans-sweep over knoppen */
.btn { position: relative; overflow: hidden; }
.btn::after { content:''; position:absolute; top:0; left:-60%; width:40%; height:100%;
  background: linear-gradient(100deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.55) 50%, rgba(255,255,255,0) 100%);
  transform: skewX(-18deg); animation: shine 3.6s ease-in-out infinite; pointer-events:none; }
@keyframes shine { 0%,72%{ left:-60%; } 88%,100%{ left:130%; } }

/* glossy win/result kaart */
#result .result-card {
  background: linear-gradient(180deg,#fffefb 0%,#fff2da 55%,#ffe6c0 100%);
  box-shadow: 0 24px 60px rgba(60,40,90,.4), inset 0 3px 0 rgba(255,255,255,.95), 0 0 0 5px rgba(255,255,255,.35);
}
.result-card h2 { text-shadow: 0 3px 0 rgba(255,255,255,.7), 0 5px 12px rgba(232,91,134,.4); }
.stars { filter: drop-shadow(0 6px 10px rgba(255,180,40,.5)); }

/* glossy map-nodes met zacht wiegen */
.mapnode { box-shadow: 0 8px 18px rgba(40,30,80,.3), inset 0 3px 0 rgba(255,255,255,.85); }
.mapnode:not(.locked) { animation: nodebob 2.8s ease-in-out infinite; }
.mapnode.current { animation: nodebob 1.6s ease-in-out infinite, nodeglow 1.6s ease-in-out infinite; }
@keyframes nodebob { 0%,100%{ transform: translate(-50%,-50%); } 50%{ transform: translate(-50%,-58%); } }
@keyframes nodeglow { 0%,100%{ box-shadow: 0 8px 18px rgba(40,30,80,.3), 0 0 0 0 rgba(255,210,63,.6); } 50%{ box-shadow: 0 8px 18px rgba(40,30,80,.3), 0 0 22px 6px rgba(255,210,63,.7); } }

/* honing-accent achter de start-kaart */
.start-inner { background-image:
  radial-gradient(circle at 20% 0%, rgba(255,221,120,.35), transparent 40%),
  radial-gradient(circle at 85% 15%, rgba(255,180,200,.3), transparent 42%),
  linear-gradient(180deg, rgba(255,255,255,.55), rgba(255,255,255,.32)); }

.wardcoins { font-weight: 800; color: #c9881a; font-size: 15px; background: rgba(255,210,63,.18);
  border: 2px solid rgba(255,210,63,.5); border-radius: 14px; padding: 3px 12px; align-self: center; }
.wardcoins.shake { animation: cshake .45s; }
@keyframes cshake { 0%,100%{transform:translateX(0)} 25%{transform:translateX(-5px)} 75%{transform:translateX(5px)} }
.warditem.locked .witxt { color: #c9881a; font-weight: 800; }

.starttop { display: flex; gap: 8px; align-items: center; justify-content: center; margin-bottom: 6px; }
.startcoins { font-weight: 800; color: #c9881a; background: rgba(255,210,63,.2); border: 2px solid rgba(255,210,63,.55);
  border-radius: 14px; padding: 4px 12px; font-size: 15px; }
.btn.rnd.small { width: 38px; height: 38px; font-size: 17px; }
.phelp h2 { margin-bottom: 4px; }
.setrow { display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 8px 6px;
  border-bottom: 1px dashed rgba(120,110,160,.3); font-weight: 700; color: #2a2350; }

/* wardrobe knop centreren (desktop fix) */
.wardcard { align-items: center; }
.wardcard #wardClose { align-self: center; margin-top: 6px; }
.wardcard .wardtabs { justify-content: center; align-self: center; }
.wardcard #wardpanel { align-self: stretch; }
