* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #ece2d0; color: #2a2420; touch-action: manipulation;
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP", "Noto Sans CJK JP", "Yu Gothic", sans-serif;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; overscroll-behavior: none; overflow: hidden; }
#app { touch-action: none; position: fixed; inset: 0; display: flex; flex-direction: column; max-width: 560px; margin: 0 auto; }
#stage { position: relative; flex: 1; min-height: 0; }
#c { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
#foot { flex: none; padding: 8px 16px calc(12px + env(safe-area-inset-bottom, 0px)); min-height: 72px; }
#stop { width: 100%; font-size: 18px; padding: 13px; border-radius: 999px; white-space: nowrap; }
#stop[hidden] { display: none; }
#stop:disabled { opacity: 0.35; }

#hint { position: absolute; left: 50%; top: 34%; width: 0; height: 0; pointer-events: none; }
#hint[hidden] { display: none; }
#hint span { position: absolute; left: 0; top: 0; animation: dig 1.3s ease-in-out infinite; }
#hint i { position: absolute; width: 30px; height: 38px; margin: -19px -15px; border-radius: 50% 50% 46% 46%; border: 3px solid #2a2420; background: rgba(255,255,255,.9); }
#hint b { position: absolute; left: 26px; top: -52px; font-size: 22px; letter-spacing: 2px; white-space: nowrap; -webkit-text-stroke: 5px #fff; paint-order: stroke; }
@keyframes dig { 0% { transform: translate(0, 0); } 60% { transform: translate(0, 90px); } 100% { transform: translate(0, 90px); opacity: 0; } }

.panel { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(236,226,208,.9); overflow-y: auto; overscroll-behavior: contain; padding: 16px; z-index: 10; }
.panel[hidden] { display: none; }
#title { background: rgba(236,226,208,.97); }
#result { background: #ece2d0; align-items: flex-start; }
.box { width: 100%; max-width: 360px; text-align: center; margin: auto; }
.box.wide { max-width: 520px; margin-top: 0; }
#tart { width: 100%; height: clamp(130px, 26vh, 200px); display: block; margin: 0 auto 6px; }
h1 { font-size: 52px; letter-spacing: 4px; margin: 0 0 4px; }
.sub { margin: 0 0 26px; font-size: 16px; font-weight: 700; word-break: auto-phrase; text-wrap: pretty; }
button, .button { font: inherit; font-size: 16px; font-weight: 700; color: #2a2420; background: #fff; border: 2px solid #2a2420; border-radius: 10px;
  padding: 10px 18px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 4px; }
button.primary, .button.primary { background: #2a2420; color: #fff; }
button.big { width: 100%; padding: 14px; font-size: 18px; margin-top: 12px; }
#hero { width: 100%; aspect-ratio: 1 / 0.92; max-height: 60vh; display: block; margin: 0 auto; }
.row { display: flex; gap: 8px; justify-content: center; margin-top: 12px; }
#r-post { flex: 1.7; background: #2a2420; color: #fff; font-size: 18px; padding: 13px 8px; white-space: nowrap; }
#r-post svg { width: 18px; height: 18px; }
#again { flex: 1; font-size: 15px; padding: 10px 4px; white-space: nowrap; }
#r-after { margin-top: 18px; }
#r-share { gap: 8px; margin-top: 10px; }
:lang(en) h1, :lang(es) h1, :lang(pt) h1, :lang(fr) h1, :lang(de) h1 { letter-spacing: 1px; }
html.lang-wait #app, html.lang-wait .panel { visibility: hidden; }
.langsw { position: relative; display: inline-flex; align-items: center; gap: 4px; margin-top: 14px; padding: 5px 10px; border: 1.5px solid #2a2420; border-radius: 99px; font-size: 13px; font-weight: 800; }
.langsw svg { width: 15px; height: 15px; }
.langsw select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; font-size: 16px; cursor: pointer; }
