@import url("https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600&display=swap");

:root { --font: "Geist", system-ui, -apple-system, sans-serif; }

*,*::before,*::after { box-sizing: border-box; }
html, body {
  -webkit-tap-highlight-color: transparent; height: 100%; margin: 0; overflow: hidden; overscroll-behavior: none; }
body { font-family: var(--font); background: #cbb68d; touch-action: none; }

canvas { display: block; position: fixed; inset: 0; cursor: crosshair; }

/* controls */
.controls {
  position: fixed; top: clamp(16px, 3vw, 30px); left: 50%; transform: translateX(-50%);
  display: flex; gap: 8px; z-index: 10;
}
.ctrl-btn {
  appearance: none; font-family: var(--font); font-size: 0.74rem; font-weight: 600;
  letter-spacing: 0.02em; cursor: pointer; color: #5a4427;
  padding: 8px 15px; border-radius: 11px;
  background: rgba(255, 250, 238, 0.66); border: 1px solid rgba(120, 92, 52, 0.28);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 4px 14px rgba(90, 68, 39, 0.14);
  transition: background .15s, transform .1s, color .15s;
}
.ctrl-btn:hover { background: rgba(255, 252, 244, 0.92); color: #3f2f1a; }
.ctrl-btn:active { transform: translateY(1px) scale(.98); }
.ctrl-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(150, 116, 66, 0.5); }

.frame { position: fixed; inset: 0; pointer-events: none; z-index: 10; }
.frame__corner {
  position: absolute; font-size: clamp(0.56rem, 1.2vw, 0.7rem); font-weight: 500;
  letter-spacing: 0.2em; text-transform: uppercase; color: rgba(90, 68, 39, 0.5);
  white-space: nowrap; font-family: var(--font); text-shadow: 0 1px 4px rgba(255, 248, 232, 0.5);
}
.frame__corner--tl { top: clamp(18px, 3.5vw, 34px); left: clamp(18px, 3.5vw, 34px); }
.frame__corner--tr { top: clamp(18px, 3.5vw, 34px); right: clamp(18px, 3.5vw, 34px); }
.frame__corner--bl { bottom: clamp(20px, 3.5vw, 34px); left: clamp(18px, 3.5vw, 34px); }
.frame__corner a { color: inherit; text-decoration: none; pointer-events: auto; border-bottom: 1px solid transparent; transition: color .14s, border-color .14s; }
.frame__corner a:hover { color: rgba(63, 47, 26, 0.95); border-bottom-color: rgba(120, 92, 52, 0.5); }

.hint {
  position: fixed; bottom: clamp(20px, 3.5vw, 34px); left: 50%; transform: translateX(-50%);
  margin: 0; font-size: 0.64rem; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase;
  color: rgba(90, 68, 39, 0.48); pointer-events: none; z-index: 10; white-space: nowrap;
  text-shadow: 0 1px 4px rgba(255, 248, 232, 0.5); transition: opacity .6s;
}
.hint.is-hidden { opacity: 0; }

@media (max-width: 600px) {
  .hint { font-size: 0.58rem; white-space: normal; text-align: center; width: 84%; }
}
