* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: #14181c;
  color: #f0f0f0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  overflow: hidden;
}

body {
  display: flex;
  flex-direction: column;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  font-size: 0.85rem;
  color: #9aa5b1;
  flex: 0 0 auto;
}

main#card {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 8px 16px;
  min-height: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

#imgbox {
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

#sign {
  max-width: 85%;
  max-height: 100%;
  background: #fff;
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.4);
}

#answer {
  flex: 0 0 auto;
  min-height: 2.6rem;
  font-size: 1.5rem;
  font-weight: 600;
  text-align: center;
  padding: 0 8px;
}

#answer.hidden-text {
  visibility: hidden;
}

#answer .nr {
  display: block;
  font-size: 0.95rem;
  font-weight: 400;
  color: #9aa5b1;
  margin-top: 4px;
}

footer {
  flex: 0 0 auto;
  display: flex;
  gap: 10px;
  padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
}

button {
  flex: 1 1 auto;
  font-size: 1.1rem;
  font-weight: 600;
  padding: 16px;
  border: none;
  border-radius: 14px;
  background: #3a7bfd;
  color: #fff;
  -webkit-tap-highlight-color: transparent;
}

button:active {
  background: #2f66d6;
}

#btn-shuffle {
  flex: 0 0 56px;
  background: #2a3038;
}

#btn-shuffle:active {
  background: #1e2228;
}
