:root {
  --hm-ink: #242044;
  --hm-muted: #68647a;
  --hm-paper: rgba(255, 255, 255, 0.93);
  --hm-line: rgba(56, 50, 91, 0.14);
  --hm-pink: #f54891;
  --hm-pink-dark: #c62368;
  --hm-cyan: #27b9c4;
  --hm-cyan-dark: #087e8c;
  --hm-yellow: #ffd568;
  --hm-mint: #a6e8cd;
  --hm-violet: #8c79e8;
}

body {
  color: var(--hm-ink);
}

body:has(.how-many-app),
body:has(.how-many-home) {
  min-height: 100vh;
  background:
    linear-gradient(rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.18)),
    url("/assets/how-many/how-many-bg.webp?v=20260726-how-many-1") center top / cover fixed no-repeat,
    #fff7e9;
}

.how-many-app {
  width: min(1440px, calc(100% - 28px));
  margin: 14px auto 48px;
  padding: 0;
  background: transparent;
}

.how-many-app .topbar {
  margin-bottom: 14px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 24px rgba(40, 32, 72, 0.14);
  backdrop-filter: blur(14px);
}

.how-many-app .topbar h1 {
  color: var(--hm-ink);
}

.how-many-app .topbar .badge {
  border-color: rgba(245, 72, 145, 0.22);
  background: #fff0f6;
  color: #a21855;
}

.how-many-home {
  min-height: 100vh;
  background: transparent;
}

.how-many-home .public-nav,
.how-many-home .public-footer {
  background: rgba(255, 255, 255, 0.93);
  backdrop-filter: blur(14px);
}

.how-many-home .public-footer a {
  color: var(--hm-ink);
}

.how-many-home-hero {
  align-items: center;
}

.how-many-home-title {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 16px;
}

.how-many-home-title img {
  width: 124px;
  height: 124px;
  border-radius: 26px;
  object-fit: cover;
  box-shadow: 0 12px 26px rgba(54, 39, 83, 0.2);
}

.how-many-home-title h1 {
  margin: 4px 0 0;
  font-size: clamp(2.35rem, 6vw, 4.8rem);
  line-height: 1.02;
  letter-spacing: 0;
  color: var(--hm-ink);
}

.how-many-home-title .eyebrow {
  color: var(--hm-pink-dark);
}

.how-many-home .home-copy > p {
  color: #504a66;
  font-weight: 700;
  line-height: 1.9;
}

.how-many-home .home-points span:nth-child(1) {
  background: #fff1a9;
}

.how-many-home .home-points span:nth-child(2) {
  background: #ddf8ee;
}

.how-many-home .home-points span:nth-child(3) {
  background: #e7f7fb;
}

.how-many-home .play-card {
  border-top: 5px solid transparent;
  border-image: linear-gradient(90deg, var(--hm-pink), var(--hm-yellow), var(--hm-cyan), var(--hm-violet)) 1;
  background: rgba(255, 255, 255, 0.96);
}

.how-many-lobby {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, 0.65fr);
  gap: 16px;
}

.how-many-lobby > .panel {
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.93);
  box-shadow: 0 12px 32px rgba(43, 37, 71, 0.14);
  backdrop-filter: blur(16px);
}

.how-many-lobby-main {
  position: relative;
  overflow: hidden;
  border-top: 5px solid var(--hm-cyan) !important;
}

.how-many-lobby-main::before {
  position: absolute;
  top: 0;
  right: 0;
  width: 150px;
  height: 95px;
  border-radius: 0 0 0 100%;
  background: linear-gradient(145deg, rgba(255, 213, 104, 0.55), rgba(245, 72, 145, 0.2));
  content: "";
  pointer-events: none;
}

.how-many-lobby-code {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  padding: 9px 13px;
  border: 1px solid rgba(39, 185, 196, 0.25);
  border-radius: 8px;
  background: #edfafa;
}

.how-many-lobby-code span {
  color: var(--hm-cyan-dark);
  font-size: 0.76rem;
  font-weight: 900;
}

.how-many-lobby-code strong {
  font-size: 1.2rem;
  letter-spacing: 0.14em;
}

.how-many-player-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.how-many-player-grid > div {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  min-height: 64px;
  padding: 9px 11px;
  border: 1px solid var(--hm-line);
  border-radius: 8px;
  background: #fff;
}

.how-many-player-grid > div > span {
  min-width: 0;
  overflow: hidden;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.how-many-player-grid > div > b {
  padding: 3px 6px;
  border-radius: 999px;
  background: #fff0b8;
  color: #795b00;
  font-size: 0.68rem;
}

.how-many-player-grid > div > small {
  grid-column: 2 / -1;
  color: #368365;
  font-size: 0.68rem;
  font-weight: 800;
}

.how-many-player-grid > div.is-away {
  opacity: 0.55;
}

.how-many-lobby-guide {
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  border-top: 5px solid var(--hm-pink) !important;
}

.how-many-lobby-guide .how-many-guide-icon {
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  margin: 0 auto 14px;
  border: 4px solid #fff;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--hm-yellow), #ff9e8b);
  box-shadow: 0 8px 18px rgba(214, 89, 115, 0.24);
  color: #72214b;
  font-size: 2.4rem;
  font-weight: 1000;
}

.how-many-lobby-guide h2 {
  margin: 0;
  font-size: 1.3rem;
}

.how-many-lobby-guide p {
  margin: 10px 0 22px;
  color: var(--hm-muted);
  font-weight: 700;
  line-height: 1.8;
}

.how-many-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 14px;
  align-items: start;
}

.how-many-board {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 14px 38px rgba(42, 35, 72, 0.18);
  backdrop-filter: blur(16px);
}

.how-many-board::before {
  display: block;
  width: 100%;
  height: 5px;
  background: linear-gradient(90deg, var(--hm-pink), #ffb563 30%, var(--hm-yellow) 48%, var(--hm-cyan) 72%, var(--hm-violet));
  content: "";
}

.how-many-side {
  position: sticky;
  top: 14px;
  display: grid;
  gap: 12px;
}

.how-many-side > section {
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.93);
  box-shadow: 0 10px 28px rgba(43, 37, 71, 0.14);
  backdrop-filter: blur(14px);
}

.how-many-progress {
  display: grid;
  grid-template-columns: minmax(230px, auto) 1fr;
  gap: 22px;
  align-items: center;
  padding: 15px 20px;
  border-bottom: 1px solid var(--hm-line);
  background: rgba(255, 250, 245, 0.74);
}

.how-many-progress > div:first-child {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 10px;
  align-items: center;
}

.how-many-progress span {
  grid-row: 1 / 3;
  padding: 7px 9px;
  border-radius: 7px;
  background: var(--hm-pink);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 1000;
}

.how-many-progress strong {
  font-size: 1.05rem;
}

.how-many-progress small {
  color: var(--hm-muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.how-many-progress-dots {
  display: flex;
  gap: 5px;
  justify-content: flex-end;
}

.how-many-progress-dots i {
  width: min(22px, 3vw);
  height: 6px;
  border-radius: 999px;
  background: #e6e2eb;
}

.how-many-progress-dots i.is-done {
  background: var(--hm-mint);
}

.how-many-progress-dots i.is-current {
  width: min(36px, 5vw);
  background: var(--hm-pink);
}

.how-many-progress.is-preparing {
  grid-template-columns: minmax(250px, 1fr) minmax(180px, 0.8fr);
}

.how-many-progress-meter {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8e4ec;
}

.how-many-progress-meter i {
  display: block;
  width: var(--progress);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--hm-cyan), var(--hm-mint), var(--hm-yellow), var(--hm-pink));
  transition: width 0.3s ease;
}

.how-many-topic {
  position: relative;
  margin: 20px 24px 0;
  padding: 22px 28px 24px;
  overflow: hidden;
  border: 2px solid rgba(36, 32, 68, 0.12);
  border-radius: 8px;
  background: #fff;
  text-align: center;
  box-shadow: 0 8px 18px rgba(44, 36, 69, 0.08);
}

.how-many-topic::before,
.how-many-topic::after {
  position: absolute;
  top: 0;
  width: 78px;
  height: 100%;
  content: "";
  opacity: 0.23;
}

.how-many-topic::before {
  left: 0;
  background: linear-gradient(90deg, var(--hm-cyan), transparent);
}

.how-many-topic::after {
  right: 0;
  background: linear-gradient(-90deg, var(--hm-pink), transparent);
}

.how-many-topic > span {
  position: relative;
  z-index: 1;
  display: inline-block;
  padding: 4px 9px;
  border-radius: 999px;
  background: #fff2ae;
  color: #755500;
  font-size: 0.72rem;
  font-weight: 1000;
}

.how-many-topic h2 {
  position: relative;
  z-index: 1;
  max-width: 820px;
  margin: 10px auto 6px;
  font-size: clamp(1.45rem, 3vw, 2.25rem);
  line-height: 1.45;
}

.how-many-topic small {
  position: relative;
  z-index: 1;
  color: var(--hm-muted);
  font-weight: 700;
}

.how-many-phase {
  padding: 24px;
}

.how-many-phase > header {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 18px;
}

.how-many-phase > header span {
  color: var(--hm-pink-dark);
  font-size: 0.74rem;
  font-weight: 1000;
}

.how-many-phase > header h2 {
  margin: 3px 0 0;
  font-size: clamp(1.25rem, 2.5vw, 1.85rem);
}

.how-many-phase > header > strong {
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1px solid rgba(39, 185, 196, 0.22);
  border-radius: 7px;
  background: #ebfafa;
  color: var(--hm-cyan-dark);
  font-size: 0.82rem;
}

.how-many-guidance {
  margin: -3px 0 18px;
  padding: 12px 15px;
  border-left: 4px solid var(--hm-yellow);
  background: #fffbed;
  color: #565069;
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.7;
}

.how-many-topic-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.how-many-topic-option {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto 1fr;
  gap: 8px 12px;
  min-height: 126px;
  padding: 16px;
  border: 2px solid rgba(43, 37, 71, 0.12);
  border-radius: 8px;
  background: #fff;
  color: var(--hm-ink);
  text-align: left;
  box-shadow: 0 5px 12px rgba(43, 37, 71, 0.06);
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

button.how-many-topic-option:hover {
  transform: translateY(-2px);
  border-color: rgba(39, 185, 196, 0.58);
  box-shadow: 0 8px 16px rgba(43, 37, 71, 0.1);
}

.how-many-topic-option.is-selected {
  border-color: var(--hm-pink);
  box-shadow: 0 0 0 3px rgba(245, 72, 145, 0.12), 0 8px 18px rgba(43, 37, 71, 0.1);
}

.how-many-topic-option > span {
  grid-column: 2;
  color: var(--hm-cyan-dark);
  font-size: 0.7rem;
  font-weight: 1000;
}

.how-many-topic-option > b {
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #fff0f6;
  color: var(--hm-pink-dark);
}

.how-many-topic-option > strong {
  align-self: center;
  font-size: 1rem;
  line-height: 1.55;
}

.how-many-custom-topic label {
  color: var(--hm-ink);
  font-size: 0.9rem;
  font-weight: 900;
}

.how-many-custom-topic input {
  grid-column: 2;
  width: 100%;
  min-width: 0;
  margin: 0;
  border-color: rgba(43, 37, 71, 0.17);
  background: #fffdf8;
}

.how-many-topic-selection > button:last-child,
.how-many-predicting > button:last-child,
.how-many-next > button,
.how-many-final > button {
  display: block;
  width: min(430px, 100%);
  margin: 18px auto 0;
  background: linear-gradient(135deg, var(--hm-pink), #ff696e);
  color: #fff;
  box-shadow: 0 8px 18px rgba(223, 55, 120, 0.25);
}

.how-many-yes-no {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  max-width: 820px;
  margin: 12px auto 6px;
}

.how-many-yes-no > div {
  color: #9c96a8;
  font-size: 0.76rem;
  font-weight: 1000;
  text-align: center;
  text-transform: uppercase;
}

.how-many-yes-no button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 218px;
  padding: 22px 16px;
  border: 4px solid #fff;
  border-radius: 8px;
  color: #fff;
  box-shadow: 0 12px 24px rgba(43, 37, 71, 0.17);
  transition: transform 0.16s ease, filter 0.16s ease;
}

.how-many-yes-no button:hover {
  transform: translateY(-4px) scale(1.01);
  filter: saturate(1.08);
}

.how-many-yes-no button.is-yes {
  background: linear-gradient(145deg, #45cbd2, #078b9b);
}

.how-many-yes-no button.is-no {
  background: linear-gradient(145deg, #ff6da6, #c92770);
}

.how-many-yes-no button span,
.how-many-yes-no button small {
  font-weight: 800;
}

.how-many-yes-no button strong {
  margin: 5px 0;
  font-size: clamp(3.2rem, 8vw, 5.8rem);
  line-height: 1;
  text-shadow: 0 4px 0 rgba(0, 0, 0, 0.1);
}

.how-many-own-secret {
  display: grid;
  place-items: center;
  width: min(430px, 100%);
  min-height: 190px;
  margin: 10px auto 18px;
  padding: 20px;
  border: 5px solid #fff;
  border-radius: 8px;
  color: #fff;
  text-align: center;
  box-shadow: 0 12px 24px rgba(43, 37, 71, 0.16);
}

.how-many-own-secret.is-yes {
  background: linear-gradient(145deg, #45cbd2, #078b9b);
}

.how-many-own-secret.is-no {
  background: linear-gradient(145deg, #ff6da6, #c92770);
}

.how-many-own-secret span,
.how-many-own-secret small {
  font-weight: 800;
}

.how-many-own-secret strong {
  font-size: 4.5rem;
  line-height: 1;
}

.how-many-number-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(76px, 1fr));
  gap: 9px;
  max-width: 850px;
  margin: 0 auto;
}

.how-many-number-grid button {
  display: flex;
  gap: 4px;
  align-items: baseline;
  justify-content: center;
  min-height: 78px;
  padding: 10px;
  border: 2px solid rgba(43, 37, 71, 0.12);
  border-radius: 8px;
  background: #fff;
  color: var(--hm-ink);
  box-shadow: 0 4px 10px rgba(43, 37, 71, 0.06);
}

.how-many-number-grid button strong {
  font-size: 2rem;
}

.how-many-number-grid button span {
  font-size: 0.72rem;
  font-weight: 900;
}

.how-many-number-grid button:hover,
.how-many-number-grid button.is-selected {
  border-color: var(--hm-pink);
  background: #fff1f6;
}

.how-many-number-grid button.is-selected {
  box-shadow: 0 0 0 3px rgba(245, 72, 145, 0.13);
  color: var(--hm-pink-dark);
}

.how-many-own-prediction {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: center;
  width: min(420px, 100%);
  margin: 12px auto 20px;
  padding: 20px;
  border: 2px solid rgba(140, 121, 232, 0.28);
  border-radius: 8px;
  background: #f7f4ff;
}

.how-many-own-prediction span {
  color: #62598b;
  font-weight: 900;
}

.how-many-own-prediction strong {
  color: #6c54d7;
  font-size: 3.4rem;
  line-height: 1;
}

.how-many-own-prediction small {
  margin-left: 3px;
  font-size: 0.9rem;
}

.how-many-anonymous-wait {
  display: grid;
  place-items: center;
  max-width: 560px;
  margin: 16px auto 0;
  padding: 26px 20px;
  border-top: 1px solid var(--hm-line);
  color: var(--hm-muted);
  text-align: center;
}

.how-many-anonymous-wait strong {
  margin: 8px 0 3px;
  color: var(--hm-ink);
}

.how-many-anonymous-wait span {
  font-size: 0.82rem;
  font-weight: 700;
}

.how-many-wait-dots {
  display: flex;
  gap: 7px;
}

.how-many-wait-dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--hm-cyan);
  animation: how-many-bounce 1.2s ease-in-out infinite;
}

.how-many-wait-dots i:nth-child(2) {
  background: var(--hm-yellow);
  animation-delay: 0.15s;
}

.how-many-wait-dots i:nth-child(3) {
  background: var(--hm-pink);
  animation-delay: 0.3s;
}

@keyframes how-many-bounce {
  0%,
  70%,
  100% { transform: translateY(0); }
  35% { transform: translateY(-7px); }
}

.how-many-count-reveal {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 120px 1fr;
  gap: 6px;
  align-items: center;
  max-width: 820px;
  margin: 2px auto 18px;
  opacity: 0;
  transform: scale(0.86);
  transition: opacity 0.35s ease, transform 0.45s cubic-bezier(0.2, 1.4, 0.5, 1);
}

.how-many-count-reveal.is-visible {
  opacity: 1;
  transform: scale(1);
}

.how-many-count-reveal > div:not(.how-many-count-ring) {
  display: grid;
  place-items: center;
  min-height: 190px;
  padding: 20px;
  border: 5px solid #fff;
  border-radius: 8px;
  color: #fff;
  box-shadow: 0 10px 22px rgba(43, 37, 71, 0.17);
}

.how-many-count-reveal > .is-yes {
  background: linear-gradient(145deg, #46ccd3, #078c9c);
}

.how-many-count-reveal > .is-no {
  background: linear-gradient(145deg, #ff70a8, #ca2871);
}

.how-many-count-reveal span {
  font-size: 1rem;
  font-weight: 1000;
}

.how-many-count-reveal strong {
  font-size: clamp(4rem, 9vw, 6.6rem);
  line-height: 1;
}

.how-many-count-reveal strong small {
  margin-left: 4px;
  font-size: 1rem;
}

.how-many-count-ring {
  z-index: 2;
  display: grid;
  place-items: center;
  width: 116px;
  height: 116px;
  margin: 0 -4px;
  border: 6px solid #fff;
  border-radius: 50%;
  background: var(--hm-yellow);
  box-shadow: 0 8px 20px rgba(80, 61, 29, 0.2);
  color: #5f4715;
}

.how-many-count-ring b {
  font-size: 0.86rem;
}

.how-many-own-result {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  margin: 12px 0 18px;
  padding: 11px 14px;
  border-radius: 8px;
  background: #f1eff4;
  color: #5e5968;
}

.how-many-own-result.is-exact {
  background: #fff2b9;
  color: #654c00;
}

.how-many-own-result.is-near {
  background: #dff7ef;
  color: #17684f;
}

.how-many-own-result span,
.how-many-own-result b {
  font-size: 0.82rem;
}

.how-many-own-result strong {
  font-size: 1.35rem;
}

.how-many-prediction-results {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}

.how-many-prediction-results > div {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  align-items: center;
  min-height: 58px;
  padding: 8px 10px;
  border: 1px solid var(--hm-line);
  border-radius: 8px;
  background: #fff;
}

.how-many-prediction-results > div.is-exact {
  border-color: rgba(221, 173, 34, 0.45);
  background: #fff9df;
}

.how-many-prediction-results > div.is-near {
  border-color: rgba(40, 168, 126, 0.35);
  background: #f0fbf7;
}

.how-many-prediction-results span {
  min-width: 0;
  overflow: hidden;
  font-size: 0.82rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.how-many-prediction-results small {
  display: block;
  color: var(--hm-muted);
  font-size: 0.66rem;
}

.how-many-prediction-results > div > strong {
  color: var(--hm-pink-dark);
}

.how-many-next {
  margin-top: 18px;
}

.how-many-scoreboard,
.how-many-privacy {
  padding: 14px;
}

.how-many-scoreboard {
  max-height: calc(100vh - 290px);
  overflow: auto;
  border-top: 4px solid var(--hm-cyan) !important;
}

.how-many-scoreboard h2,
.how-many-privacy h2 {
  margin: 0 0 10px;
  font-size: 1rem;
}

.how-many-scoreboard > div {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  align-items: center;
  min-height: 50px;
  padding: 6px 7px;
  border-bottom: 1px solid var(--hm-line);
}

.how-many-scoreboard > div:last-child {
  border-bottom: 0;
}

.how-many-scoreboard > div.is-self {
  border-radius: 7px;
  background: #fff0f6;
}

.how-many-scoreboard span {
  min-width: 0;
  overflow: hidden;
  font-size: 0.82rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.how-many-scoreboard strong {
  color: var(--hm-pink-dark);
  font-size: 0.84rem;
}

.how-many-privacy {
  border-top: 4px solid var(--hm-pink) !important;
  text-align: center;
}

.how-many-lock {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin: 0 auto 8px;
  border-radius: 50%;
  background: #fff0b8;
  color: #755500;
  font-size: 1.35rem;
  font-weight: 1000;
}

.how-many-privacy p {
  margin: 0;
  color: var(--hm-muted);
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.65;
}

.how-many-privacy > div:last-child {
  display: flex;
  justify-content: space-between;
  margin-top: 11px;
  padding-top: 10px;
  border-top: 1px solid var(--hm-line);
  font-size: 0.75rem;
  font-weight: 900;
}

.how-many-final {
  padding: 34px 24px 28px;
}

.how-many-final-title {
  text-align: center;
}

.how-many-final-title > span {
  color: var(--hm-pink-dark);
  font-size: 0.75rem;
  font-weight: 1000;
}

.how-many-final-title h2 {
  margin: 5px 0 6px;
  font-size: clamp(2rem, 5vw, 3.5rem);
}

.how-many-final-title p {
  margin: 0;
  color: var(--hm-muted);
  font-weight: 800;
}

.how-many-podium {
  display: flex;
  gap: 10px;
  align-items: end;
  justify-content: center;
  max-width: 760px;
  margin: 28px auto 18px;
}

.how-many-podium > div {
  display: grid;
  place-items: center;
  width: min(220px, 31%);
  min-height: 180px;
  padding: 16px 10px;
  border: 3px solid #fff;
  border-radius: 8px;
  background: #f4f2f6;
  box-shadow: 0 8px 20px rgba(43, 37, 71, 0.12);
  text-align: center;
}

.how-many-podium > div.is-rank-1 {
  order: 2;
  min-height: 220px;
  background: linear-gradient(#fff7bd, #ffe58a);
}

.how-many-podium > div.is-rank-2 {
  order: 1;
  background: linear-gradient(#f7f8fb, #e5e8ef);
}

.how-many-podium > div.is-rank-3 {
  order: 3;
  background: linear-gradient(#ffe2cd, #f3bb93);
}

.how-many-podium .how-many-avatar {
  width: 58px;
  height: 58px;
  margin: 8px 0;
  font-size: 1.35rem;
}

.how-many-podium span,
.how-many-podium strong {
  font-weight: 1000;
}

.how-many-podium strong {
  color: var(--hm-pink-dark);
  font-size: 1.35rem;
}

.how-many-podium small {
  color: var(--hm-muted);
  font-weight: 800;
}

.how-many-ranking {
  max-width: 660px;
  margin: 0 auto;
}

.how-many-ranking > div {
  display: grid;
  grid-template-columns: 50px 38px 1fr auto;
  align-items: center;
  min-height: 54px;
  padding: 7px 10px;
  border-bottom: 1px solid var(--hm-line);
}

.how-many-avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 2px solid #fff;
  border-radius: 50%;
  color: #352c54;
  font-style: normal;
  font-weight: 1000;
  box-shadow: 0 2px 6px rgba(43, 37, 71, 0.12);
}

.how-many-avatar.is-coral { background: #ffb3a8; }
.how-many-avatar.is-cyan { background: #9ee7ec; }
.how-many-avatar.is-mint { background: #bcebd8; }
.how-many-avatar.is-yellow { background: #ffe69a; }
.how-many-avatar.is-violet { background: #c9bef6; }
.how-many-avatar.is-orange { background: #ffd0a6; }
.how-many-avatar.is-blue { background: #b9d9f8; }
.how-many-avatar.is-rose { background: #f7bdd3; }

@media (max-width: 980px) {
  .how-many-layout {
    grid-template-columns: 1fr;
  }

  .how-many-side {
    position: static;
    grid-template-columns: 1fr 1fr;
  }

  .how-many-scoreboard {
    max-height: none;
  }
}

@media (max-width: 760px) {
  body:has(.how-many-app),
  body:has(.how-many-home) {
    background-attachment: scroll;
  }

  .how-many-app {
    width: min(100% - 14px, 1440px);
    margin-top: 7px;
  }

  .how-many-home-title {
    align-items: flex-start;
    gap: 12px;
  }

  .how-many-home-title img {
    width: 84px;
    height: 84px;
    border-radius: 18px;
  }

  .how-many-home-title h1 {
    font-size: clamp(2rem, 11vw, 3.4rem);
  }

  .how-many-lobby {
    grid-template-columns: 1fr;
  }

  .how-many-progress,
  .how-many-progress.is-preparing {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .how-many-progress-dots {
    justify-content: flex-start;
    overflow: hidden;
  }

  .how-many-topic {
    margin: 12px 12px 0;
    padding: 18px 14px;
  }

  .how-many-phase {
    padding: 18px 12px;
  }

  .how-many-topic-options {
    grid-template-columns: 1fr;
  }

  .how-many-topic-option {
    min-height: 104px;
  }

  .how-many-yes-no {
    grid-template-columns: 1fr 34px 1fr;
    gap: 5px;
  }

  .how-many-yes-no button {
    min-height: 175px;
    padding: 16px 7px;
  }

  .how-many-yes-no button strong {
    font-size: clamp(2.8rem, 15vw, 4.4rem);
  }

  .how-many-yes-no button small {
    font-size: 0.64rem;
  }

  .how-many-number-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .how-many-count-reveal {
    grid-template-columns: 1fr 66px 1fr;
  }

  .how-many-count-reveal > div:not(.how-many-count-ring) {
    min-height: 145px;
    padding: 12px 5px;
    border-width: 3px;
  }

  .how-many-count-ring {
    width: 68px;
    height: 68px;
    border-width: 3px;
  }

  .how-many-count-ring b {
    font-size: 0.64rem;
  }

  .how-many-count-reveal strong {
    font-size: clamp(3.2rem, 16vw, 5rem);
  }

  .how-many-own-result {
    flex-wrap: wrap;
  }

  .how-many-side {
    grid-template-columns: 1fr;
  }

  .how-many-podium {
    gap: 5px;
  }

  .how-many-podium > div {
    width: 33%;
    min-height: 165px;
    padding: 12px 5px;
  }

  .how-many-podium > div.is-rank-1 {
    min-height: 198px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .how-many-wait-dots i,
  .how-many-count-reveal {
    animation: none;
    transition: none;
  }
}
