/* UI skin: ricimi "Cartoon GUI Pack" (Asset Store; picked for Capybara Bolt 2026-11-27) + Lilita One (OFL).
   Images in assets/ui/ (shrunk copies; full pack in E:\GameMaking\GameAssets\Unsorted\GUI\Cartoon GUI Pack).
   The glossy shapes are stretched with border-image so any size keeps its round ends. */
@font-face { font-family: 'Lilita One'; src: url(assets/ui/fonts/LilitaOne-Regular.ttf) format('truetype'); font-display: swap; }
:root { --ink: #3d4a63; --cartoon: 'Lilita One', 'Arial Rounded MT Bold', system-ui, sans-serif;
  --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px);
  --outline: 0 2px 0 rgba(30,40,70,.45), 1px 0 0 rgba(30,40,70,.35), -1px 0 0 rgba(30,40,70,.35), 0 -1px 0 rgba(30,40,70,.25); }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #16232b; color: var(--ink);
  font: 600 15px/1.35 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; touch-action: none; user-select: none; -webkit-user-select: none; }
/* portrait frame, centred, dark backdrop either side on wide screens (same as Volatail) */
#frame { position: relative; margin: 0 auto; height: 100vh; height: 100dvh; width: min(100vw, calc(100vh * 0.62), 560px); width: min(100vw, calc(100dvh * 0.62), 560px);
  overflow: hidden; background: #9fd6ef; box-shadow: 0 0 60px rgba(0,0,0,.6); }
#view { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
button { font: inherit; color: inherit; border: 0; cursor: pointer; background: none; padding: 0; }

/* score: glossy blue pill at the top */
#hud { position: absolute; left: 0; right: 0; top: 0; padding-top: calc(10px + var(--safe-t)); text-align: center; pointer-events: none;
  font-family: var(--cartoon); color: #fff; }
#score { display: inline-block; min-width: 120px; padding: 4px 26px 6px; font-size: 30px; letter-spacing: .02em; text-shadow: var(--outline);
  border-style: solid; border-width: 0; border-image: url(assets/ui/btn-blue.png) 49 fill / 25px stretch; }
#hi { margin-top: 4px; font-size: 15px; text-shadow: var(--outline); }

/* JUMP: glossy orange ball with the white arrow */
#jumpBtn { position: absolute; right: 14px; bottom: calc(16px + var(--safe-b)); width: 96px; height: 96px;
  background: url(assets/ui/circle-orange.png) center / contain no-repeat; display: flex; flex-direction: column; align-items: center; justify-content: center;
  filter: drop-shadow(0 4px 0 rgba(0,0,0,.18)); transition: transform .06s; }
#jumpBtn img { width: 34px; height: 34px; margin-top: -4px; filter: drop-shadow(0 2px 0 rgba(120,50,0,.35)); pointer-events: none; }
#jumpBtn small { font: 15px var(--cartoon); color: #fff; letter-spacing: .04em; text-shadow: 0 2px 0 rgba(140,60,0,.5); margin-top: -2px; }
#jumpBtn:active, #jumpBtn.held { transform: scale(.92); filter: brightness(1.08) drop-shadow(0 2px 0 rgba(0,0,0,.18)); }

/* cards: the pack's white pop-up shape, pink ribbon title */
.overlay { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(30,70,110,.35); padding: 20px; }
.overlay[hidden] { display: none; }
.card { position: relative; width: min(320px, 100%); padding: 58px 18px 14px; text-align: center;
  border-style: solid; border-width: 0; border-image: url(assets/ui/panel.png) 99 fill / 40px stretch;   /* 99 of 200: the stretched middle is pure white, no seams */
  filter: drop-shadow(0 8px 0 rgba(20,50,90,.25)); }
.ribbon { position: absolute; left: 50%; top: -34px; transform: translateX(-50%); width: 300px; height: 96px;
  background: url(assets/ui/ribbon.png) center / contain no-repeat; display: grid; place-items: center; }
.ribbon h1 { margin: -8px 0 0; font: 30px var(--cartoon); color: #fff; letter-spacing: .02em; white-space: nowrap;
  text-shadow: 0 3px 0 rgba(150,20,70,.55), 1px 0 0 rgba(150,20,70,.4), -1px 0 0 rgba(150,20,70,.4); }
#panelIcon { display: block; width: 76px; height: 76px; margin: 6px auto -4px; }
#panelIcon[hidden] { display: none; }
.card p { margin: 8px 6px; font-weight: 600; color: var(--ink); }
#panelScore:empty { display: none; }
#panelScore { font: 40px var(--cartoon); color: #ff9a1f; margin: 2px 0 0; text-shadow: 0 3px 0 rgba(160,80,0,.35); }

/* loading bar: yellow pill filling a grey one */
.bar { height: 24px; margin: 14px 10px 0; border-style: solid; border-width: 0; border-image: url(assets/ui/btn-gray.png) 49 fill / 12px stretch; padding: 3px; }
.bar[hidden] { display: none; }
.bar i { display: block; height: 100%; width: 0; min-width: 18px; border-style: solid; border-width: 0;
  border-image: url(assets/ui/btn-yellow.png) 49 fill / 9px stretch; transition: width .15s; }

/* big buttons: glossy green (Run!) or orange (Again); grey while loading */
.primary { margin: 14px auto 4px; min-width: 190px; padding: 12px 34px 15px; font: 27px var(--cartoon); color: #fff; letter-spacing: .02em;
  text-shadow: 0 2px 0 rgba(20,80,0,.45); border-style: solid; border-width: 0; border-image: url(assets/ui/btn-green.png) 49 fill / 26px stretch;
  transition: transform .06s; }
.primary.again { border-image-source: url(assets/ui/btn-orange.png); text-shadow: 0 2px 0 rgba(140,60,0,.45); }
.primary:disabled { border-image-source: url(assets/ui/btn-gray.png); font-size: 20px; text-shadow: 0 2px 0 rgba(0,0,0,.3); cursor: default; }
.primary:not(:disabled):active { transform: scale(.95); }
