/* 偷釣魚佬 — shared UI look: weathered wood panels, rusty teal metal buttons, cream text with a dark outline. */
:root {
  --font: system-ui, sans-serif;
  --cream: #f6ead0;
  --amber: #ffc861;
  --teal: #4fb7a8;
  --moss: #8fbf5a;
  --danger: #ff5a4e;
  --ink: #0b1f1e;
  --panel-fill: rgba(14, 30, 30, 0.82);
}
html, body { margin: 0; height: 100%; background: #050c0e; overflow: hidden; user-select: none; -webkit-user-select: none; touch-action: none; -webkit-tap-highlight-color: transparent; }
html { font-size: clamp(14px, 2.5vh, 24px); }
body { font-family: var(--font); color: var(--cream); }
#stage { position: absolute; inset: 0; }
#stage canvas { width: 100%; height: 100%; display: block; }
#ui { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
#ui .scr { position: absolute; inset: 0; pointer-events: auto; }
#ui .tap { pointer-events: auto; }

/* outlined display text */
.out { font-weight: 900; color: var(--cream); text-shadow: -2px -2px 0 var(--ink), 2px -2px 0 var(--ink), -2px 2px 0 var(--ink), 2px 2px 0 var(--ink), 0 -2px 0 var(--ink), 0 2px 0 var(--ink), -2px 0 0 var(--ink), 2px 0 0 var(--ink), 0 4px 0 rgba(0,0,0,.55); }
.out-s { font-weight: 800; color: var(--cream); text-shadow: -1px -1px 0 var(--ink), 1px -1px 0 var(--ink), -1px 1px 0 var(--ink), 1px 1px 0 var(--ink), 0 2px 2px rgba(0,0,0,.6); }

/* 9-slice wooden panel */
.panel { border-style: solid; border-width: 26px; border-image: url(../assets/ui-panel.webp) 14% fill / 26px stretch; padding: 4px; box-sizing: border-box; filter: drop-shadow(0 6px 10px rgba(0,0,0,.5)); }
/* 9-slice metal button */
.btn { pointer-events: auto; display: inline-flex; align-items: center; justify-content: center; gap: .4em; min-height: 48px; min-width: 48px; box-sizing: border-box;
  border-style: solid; border-width: 12px 16px; border-image: url(../assets/ui-button.webp) 22% 12% fill / 12px 16px stretch; background: none;
  font: 900 1rem var(--font); color: var(--cream); cursor: pointer; padding: 0 .4em; transition: transform .12s, filter .12s; outline: none;
  text-shadow: -1.5px -1.5px 0 var(--ink), 1.5px -1.5px 0 var(--ink), -1.5px 1.5px 0 var(--ink), 1.5px 1.5px 0 var(--ink), 0 2px 2px rgba(0,0,0,.6); }
.btn:hover, .btn.focus, .btn:focus-visible { filter: brightness(1.25) drop-shadow(0 0 8px rgba(255, 200, 97, .55)); transform: scale(1.04); }
.btn:active { transform: scale(.93); }
.btn.primary { filter: brightness(1.1) saturate(1.3) hue-rotate(-20deg) drop-shadow(0 0 6px rgba(255, 200, 97, .5)); }
.btn.disabled { filter: grayscale(1) brightness(.6); }
.btn img { height: 1.4em; width: auto; }

/* small square icon plate (same plate as the pause button) */
.icon-btn { pointer-events: auto; width: 48px; height: 48px; border: 0; padding: 0; background: url(../assets/ui-pause.webp) center/100% 100% no-repeat; cursor: pointer; transition: transform .12s, filter .12s; }
.icon-btn.trophy { background-image: url(../assets/ui-trophy.webp); }
.icon-btn:hover { filter: brightness(1.2); } .icon-btn:active { transform: scale(.9); }

.chip { display: inline-flex; align-items: center; gap: .3em; padding: .15em .6em; border-radius: 999px; background: rgba(8, 22, 22, .66); border: 1.5px solid rgba(243, 227, 181, .35); }
.chip img { height: 1.3em; width: auto; }

@keyframes pop { 0% { transform: scale(.6); opacity: 0; } 70% { transform: scale(1.06); opacity: 1; } 100% { transform: scale(1); } }
@keyframes slideUp { 0% { transform: translateY(30px); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes pulse { 0%, 100% { opacity: .65; transform: scale(1); } 50% { opacity: 1; transform: scale(1.05); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.pop { animation: pop .28s ease-out both; }
.slide-up { animation: slideUp .25s ease-out both; }
.fade-in { animation: fadeIn .3s ease-out both; }
