/* Vinepluck - mobile-web, portrait, touch-only static bundle. */

:root {
  --ink: #101821;
  --canopy: #17352f;
  --leaf: #78c76b;
  --leaf-dark: #2e6d43;
  --fruit: #ffd86b;
  --fruit-hot: #fff3ad;
  --frost: #dff8ff;
  --frost-line: #94d8f2;
  --berry: #ff6f91;
  --muted: #abc6bd;
  --panel: rgba(16, 24, 33, 0.88);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  background: var(--ink);
  color: #f3fff4;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

#app {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100dvh;
  padding:
    max(12px, var(--safe-top))
    max(12px, var(--safe-right))
    max(12px, var(--safe-bottom))
    max(12px, var(--safe-left));
  background:
    radial-gradient(circle at 50% 10%, rgba(255, 216, 107, 0.18), transparent 25%),
    linear-gradient(180deg, #28404a 0%, #17352f 46%, #101821 100%);
}

#hud {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  align-items: center;
  min-height: 54px;
  padding: 5px 0 10px;
}

.stat {
  min-width: 0;
  text-align: center;
}

.label {
  display: block;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.1;
}

.stat span:last-child {
  display: block;
  margin-top: 2px;
  color: #f3fff4;
  font-size: 21px;
  font-weight: 850;
  line-height: 1;
}

#combo {
  color: var(--fruit);
}

#stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  border-radius: 8px;
}

#game {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

.panel {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 28px 18px;
  text-align: center;
  background: var(--panel);
  backdrop-filter: blur(2px);
}

.panel[hidden] {
  display: none;
}

.panel h1,
.panel h2 {
  margin: 0;
  font-weight: 900;
  letter-spacing: 0;
}

.panel h1 {
  color: var(--fruit);
  font-size: 42px;
}

.panel h2 {
  color: var(--frost);
  font-size: 31px;
}

.tagline {
  max-width: 276px;
  margin: 0;
  color: #d8eadf;
  font-size: 17px;
  line-height: 1.45;
}

.result {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
}

.result strong {
  color: var(--fruit);
  font-size: 25px;
}

.result.sub {
  color: #d8eadf;
}

.result.sub strong {
  color: #f3fff4;
}

.actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: min(100%, 232px);
}

.cta {
  appearance: none;
  width: 100%;
  min-width: 210px;
  min-height: 56px;
  border: 0;
  border-radius: 8px;
  padding: 0 24px;
  background: var(--fruit);
  color: var(--ink);
  font-size: 20px;
  font-weight: 850;
  touch-action: manipulation;
  transition: transform 0.06s ease, filter 0.12s ease;
}

.cta:active {
  transform: scale(0.96);
  filter: brightness(1.08);
}

.cta.secondary {
  background: var(--frost);
  font-size: 18px;
}

.cta[hidden] {
  display: none;
}
