:root {
  color-scheme: only light;
  --paper: #f2e4c9;
  --paper-shadow: #dbcaab;
  --ink: #2f2a24;
  --soft-ink: #726659;
  --wax: #a43f36;
  --wax-dark: #772a24;
  --brass: #a9812b;
  --felt: #6b7a52;
  --desk: #b98758;
}

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background:
    radial-gradient(circle at top, rgba(255, 245, 214, 0.22), transparent 36%),
    linear-gradient(180deg, #d09a66 0%, var(--desk) 34%, #9b6944 100%);
  font-family: Georgia, "Times New Roman", serif;
  color: var(--ink);
}

body {
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
}

.app {
  position: relative;
  width: 100%;
  height: 100%;
}

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

.hud {
  position: absolute;
  left: max(14px, env(safe-area-inset-left));
  right: max(14px, env(safe-area-inset-right));
  top: max(14px, env(safe-area-inset-top));
  pointer-events: none;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.title,
.instruction {
  margin: 0;
  padding: 9px 12px;
  background: rgba(247, 236, 214, 0.82);
  border: 1px solid rgba(64, 49, 36, 0.16);
  box-shadow: 0 10px 24px rgba(74, 46, 25, 0.12);
  backdrop-filter: blur(2px);
}

.title {
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.82rem;
}

.instruction {
  max-width: min(56ch, 62vw);
  font-size: 0.98rem;
  line-height: 1.35;
  text-align: right;
}

@media (max-width: 720px) {
  .hud {
    flex-direction: column;
    align-items: stretch;
  }

  .instruction {
    max-width: none;
    text-align: left;
    font-size: 0.92rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .title,
  .instruction {
    box-shadow: none;
    backdrop-filter: none;
  }
}
