:root {
  --ink: #14234b;
  --blue: #2456ed;
  --ice: #eaf4ff;
  --pink: #ffa4d5;
  --lemon: #ffce55;
  --muted: #64738d;
  --board-width: min(
    calc(100vw - 32px),
    420px,
    calc((var(--game-height, 100svh) - 298px) * 0.857143)
  );
  font-family: "Noto Sans KR", sans-serif;
  color: var(--ink);
  background: var(--ice);
  font-synthesis: none;
}
html {
  overscroll-behavior-y: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: var(--game-height, 100svh);
  background-image: radial-gradient(#b7cdec 1px, transparent 1px);
  background-size: 20px 20px;
}
button,
input,
textarea {
  font: inherit;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  color: inherit;
  border: 0;
}
button:disabled {
  opacity: 0.45;
  cursor: default;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid #e4772c;
  outline-offset: 3px;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  touch-action: manipulation;
}
button:active:not(:disabled) {
  transform: translateY(1px);
}
[hidden] {
  display: none !important;
}
h1,
h2,
p {
  margin: 0;
}
.game-shell {
  width: calc(max(266px, var(--board-width)) + 24px);
  max-width: 100%;
  margin: 0 auto;
  padding: 0 12px;
  padding-top: env(safe-area-inset-top);
  padding-bottom: max(8px, env(safe-area-inset-bottom));
}
.game-guide {
  max-width: 444px;
  margin: 40px auto 0;
  padding: 0 24px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.9;
}
.game-guide h2 {
  margin: 0 0 16px;
  color: var(--ink);
  font-size: 17px;
  letter-spacing: -0.5px;
}
.game-guide p + p {
  margin-top: 12px;
}
.sponsor {
  width: 320px;
  max-width: 100%;
  min-height: 124px;
  margin: 36px auto 0;
  text-align: center;
}
.sponsor-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 10px;
  line-height: 16px;
}
#sponsor-slot {
  /* A fixed-size parent keeps AdSense mobile size optimization from expanding it. */
  height: 100px;
}
.legal-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 40px auto 0;
  padding: 0 16px max(28px, env(safe-area-inset-bottom));
  color: var(--muted);
  font-size: 11px;
  line-height: 44px;
}
.topbar {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  font-weight: 900;
  letter-spacing: -1.2px;
  font-size: 18px;
}
.brand span {
  color: var(--blue);
  margin-left: 3px;
}
.tools {
  display: flex;
  align-items: center;
  gap: 8px;
}
.tools button {
  height: 36px;
  min-width: 36px;
  background: transparent;
  font-size: 11px;
  font-weight: 800;
}
.tools button:last-child {
  width: 28px;
  min-width: 28px;
  height: 28px;
  background: white;
  border-radius: 50%;
  font-size: 16px;
  border: 1px solid #ccdbef;
}
.tools span {
  color: var(--blue);
  margin-left: 3px;
}
.title-row {
  height: 65px;
  display: flex;
  align-items: center;
  position: relative;
  gap: 16px;
}
.title-row h1 {
  font:
    42px/0.95 "Black Han Sans",
    sans-serif;
  letter-spacing: -3px;
  white-space: nowrap;
  color: var(--blue);
}
.title-row h1 span,
.title-row h1 i {
  color: #ff824d;
  font-style: normal;
}
.title-row p {
  font-size: 10px;
  line-height: 1.8;
  color: var(--muted);
}
.title-row strong {
  font-weight: 800;
  color: var(--ink);
}
.title-row img {
  width: 58px;
  height: 58px;
  object-fit: contain;
  margin-left: auto;
  transform: rotate(9deg);
}
.machine {
  border: 1px solid #b4c9e7;
  border-radius: 20px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 5px 0 #ccdaf0;
}
.hud {
  height: 64px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  gap: 10px;
}
.hud small {
  display: block;
  font:
    800 9px/1.4 "Noto Sans KR",
    sans-serif;
  letter-spacing: 1px;
  color: var(--muted);
}
.hud strong {
  display: block;
  font-weight: 900;
  font-size: 24px;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.8px;
}
.time-stat {
  min-width: 77px;
}
#bonus-total {
  display: inline-block;
  padding: 1px 4px;
  margin-left: 3px;
  border-radius: 4px;
  background: #d6f8e8;
  color: #136b52;
  font-size: 9px;
  font-style: normal;
  letter-spacing: 0;
}
.time-stat strong {
  color: var(--blue);
}
.time-stat b {
  font-size: 12px;
  margin-left: 2px;
}
.score-stat {
  flex: 1;
  text-align: center;
}
.score-stat strong {
  font-size: 29px;
  color: var(--ink);
}
.best-stat {
  text-align: right;
  min-width: 62px;
}
.best-stat strong {
  font-size: 16px;
  color: var(--muted);
}
.time-track {
  height: 4px;
  background: #e1eaff;
}
#time-bar {
  height: 100%;
  width: 100%;
  background: var(--blue);
  transform-origin: left;
  transition: background 0.3s;
}
.low-time #time-bar {
  background: #ff824d;
}
.low-time .time-stat strong {
  color: #e46d38;
}
.board-wrap {
  position: relative;
  aspect-ratio: 6/7;
  background: #dceafc;
  overflow: hidden;
  isolation: isolate;
  user-select: none;
  -webkit-user-select: none;
}
canvas {
  position: absolute;
  width: 100%;
  height: 100%;
  inset: 0;
  pointer-events: none;
}
.tile-controls {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: repeat(7, 1fr);
  touch-action: none;
}
.tile-control {
  background: transparent;
  border-radius: 15px;
  outline-offset: -5px !important;
  touch-action: none;
  padding: 0;
  position: relative;
}
.tile-control:focus-visible {
  outline: 3px solid var(--blue);
  background: #ffffff20;
}
.tile-control[aria-pressed="true"] {
  box-shadow: inset 0 0 0 3px #fff;
}
.status-strip {
  height: 48px;
  display: grid;
  grid-template-columns: 5px minmax(0, 1fr) auto;
  grid-template-rows: 18px 18px;
  align-items: center;
  padding: 6px 11px;
  gap: 0 6px;
  font-size: 10px;
  font-weight: 700;
  background: #f8fbff;
  white-space: nowrap;
}
.status-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--blue);
  flex-shrink: 0;
}
.status-strip > span:nth-child(2) {
  overflow: hidden;
  text-overflow: ellipsis;
}
.status-strip strong {
  margin-left: auto;
  color: var(--blue);
  font-size: 10px;
  flex-shrink: 0;
}
.fever-row {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #687998;
  font-size: 9px;
  font-variant-numeric: tabular-nums;
}
#fever-label {
  min-width: 57px;
}
#fever-window {
  min-width: 69px;
  text-align: right;
}
#fever-meter {
  display: flex;
  flex: 1;
  gap: 3px;
}
#fever-meter i {
  height: 5px;
  flex: 1;
  background: #dce5f3;
  border-radius: 3px;
}
#fever-meter i.filled {
  background: var(--blue);
}
.in-fever {
  border-color: #f58b37;
  box-shadow: 0 5px 0 #ffc890;
}
.in-fever .board-wrap {
  background: #fff0d7;
}
.in-fever .status-strip {
  background: #fff4e3;
}
.in-fever .fever-row {
  color: #a44b12;
}
.in-fever #fever-meter i.filled {
  background: #ee7b2a;
}
.action-dock {
  margin-top: 14px;
}
.action-dock > div {
  display: flex;
  gap: 8px;
}
.button {
  min-height: 48px;
  border-radius: 14px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 800;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex: 1;
  transition:
    background 0.15s,
    transform 0.15s;
}
.primary {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 3px 0 #173db8;
}
.primary:hover {
  background: #1947d7;
}
.yellow {
  background: #fee45b;
  box-shadow: 0 3px 0 #debf36;
}
.secondary {
  background: #fff;
  border: 1px solid #c8d7ed;
  box-shadow: 0 2px 0 #d7e2f2;
}
.button span {
  margin-left: auto;
}
#start {
  justify-content: flex-start;
  padding: 11px 20px;
}
#play-actions .button {
  min-height: 44px;
  font-size: 12px;
}
.quick-rules {
  display: flex;
  justify-content: center;
  gap: 13px;
  margin-top: 14px;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}
.quick-rules b {
  color: var(--blue);
  margin-right: 2px;
  font-size: 13px;
}
.under-note {
  color: var(--muted);
  font-size: 10px;
  text-align: center;
  margin: 6px 0 0;
  min-height: 16px;
}
footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 14px 2px 0;
  color: var(--muted);
  font-size: 9px;
}
footer a {
  font-weight: 800;
}
.challenge-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 9px 0 10px;
  font-size: 10px;
}
.challenge-banner > span {
  background: #ffe7f3;
  color: #a62968;
  border-radius: 5px;
  padding: 3px 6px;
  white-space: nowrap;
}
.challenge-banner strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.challenge-banner small {
  display: none;
}
.has-challenge {
  --board-width: min(
    calc(100vw - 32px),
    420px,
    calc((var(--game-height, 100svh) - 335px) * 0.857143)
  );
}
.screen {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  background: #f5f9fff2;
  backdrop-filter: blur(5px);
  padding: 20px;
  text-align: center;
}
.screen h2 {
  font-size: 21px;
  letter-spacing: -0.8px;
  font-weight: 900;
}
.screen p {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.6;
  margin-top: 8px;
}
.countdown-screen {
  background: #14234b48;
  color: #fff;
}
.countdown-screen strong {
  font:
    100px/1.2 "Black Han Sans",
    sans-serif;
  text-shadow: 0 5px 0 #14234b66;
}
.countdown-screen span {
  font-weight: 800;
  font-size: 12px;
}
.big-symbol {
  font-size: 55px;
  color: var(--blue);
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 16px;
}
.paused-screen .button {
  flex: 0;
  width: 100%;
  margin-top: 26px;
}
.text-button {
  background: transparent;
  text-decoration: underline;
  text-underline-offset: 4px;
  color: var(--muted);
  font-size: 11px;
  padding: 13px;
}
.result-screen {
  background: #f7fbfff5;
  padding: 14px;
}
.result-stamp {
  display: block;
  background: #ffdf63;
  color: #715221;
  letter-spacing: 1px;
  font-weight: 900;
  font-size: 10px;
  border-radius: 5px;
  padding: 5px 10px;
  transform: rotate(-4deg);
  margin-bottom: 14px;
}
.result-score {
  display: flex;
  align-items: baseline;
  gap: 5px;
  color: var(--blue);
  margin-top: 8px;
}
.result-score strong {
  font-size: 58px;
  letter-spacing: -3px;
  line-height: 1.1;
  font-weight: 900;
}
.result-score span {
  font-size: 15px;
  font-weight: 800;
}
.result-stats {
  display: flex;
  justify-content: center;
  gap: 25px;
  width: 100%;
  border-top: 1px dashed #bdcfea;
  border-bottom: 1px dashed #bdcfea;
  padding: 14px 0;
  margin-top: 20px;
}
.result-stats strong {
  display: block;
  font-size: 24px;
  line-height: 1.2;
  font-weight: 900;
}
.result-stats small {
  font-size: 9px;
  color: var(--muted);
}
.duel {
  display: grid;
  grid-template-columns: 1fr 22px 1fr;
  align-items: center;
  gap: 6px;
  width: 100%;
  margin-top: 12px;
}
.duel span {
  display: block;
  font-size: 10px;
}
.duel strong {
  display: block;
  font-size: 20px;
  color: var(--blue);
}
.duel b {
  font-size: 10px;
  color: var(--muted);
}
.duel p {
  grid-column: 1/-1;
  margin: 0;
  font-weight: 800;
  color: var(--ink);
}
.best-note {
  font-size: 10px !important;
}
.board-callout {
  position: absolute;
  left: 50%;
  top: 38%;
  transform: translate(-50%, -50%) scale(0.75);
  opacity: 0;
  pointer-events: none;
  z-index: 3;
  white-space: nowrap;
  color: #fff;
  font:
    34px/1 "Black Han Sans",
    sans-serif;
  text-shadow:
    -2px -2px 0 var(--blue),
    2px -2px 0 var(--blue),
    -2px 2px 0 var(--blue),
    2px 2px 0 var(--blue),
    0 4px 0 #173db8;
  transition:
    transform 0.2s,
    opacity 0.2s;
}
.board-callout.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
dialog {
  border: 1px solid #cedcf0;
  border-radius: 24px;
  width: min(440px, calc(100vw - 24px));
  padding: 24px;
  max-height: calc(100svh - 36px);
  color: var(--ink);
  background: #f8fbff;
  box-shadow: 0 20px 100px #14234b40;
}
dialog::backdrop {
  background: #10214988;
  backdrop-filter: blur(4px);
}
.dialog-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 20px;
}
.eyebrow {
  font-size: 10px;
  font-weight: 800;
  color: var(--blue);
  letter-spacing: 0.8px;
}
.dialog-top h2 {
  font-size: 22px;
  letter-spacing: -1px;
  margin-top: 4px;
}
.close-button {
  background: #e6effb;
  width: 36px;
  min-width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 25px;
}
.help-rules {
  margin: 0;
  padding-left: 23px;
}
.help-rules li {
  padding-left: 4px;
  margin: 18px 0;
}
.help-rules li::marker {
  color: var(--blue);
  font-weight: 900;
}
.help-rules strong {
  font-size: 14px;
}
.help-rules p,
.help-note {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.8;
  margin-top: 5px;
}
.setting-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #d7e1ef;
  padding: 12px 0;
  font-size: 12px;
  margin-top: 10px;
}
.setting-row button {
  background: #e3edff;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 800;
}
.name-field {
  display: block;
  font-size: 12px;
  font-weight: 800;
}
.name-field input {
  width: 100%;
  border: 1px solid #c6d5eb;
  border-radius: 10px;
  padding: 12px;
  background: white;
  color: var(--ink);
  margin: 8px 0 16px;
  font-size: 16px;
}
#share-preview {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  aspect-ratio: 1200/630;
  background: var(--ice);
}
.share-actions {
  display: grid;
  gap: 9px;
  margin-top: 16px;
}
.share-actions .button {
  font-size: 13px;
}
.share-note {
  font-size: 11px;
  line-height: 1.8;
  color: var(--muted);
  margin-top: 9px;
}
#copy-fallback {
  width: 100%;
  min-height: 90px;
  margin-top: 10px;
  font-size: 12px;
  border: 1px solid #c6d5eb;
  border-radius: 8px;
}
.toast {
  position: fixed;
  bottom: max(20px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translate(-50%, 12px);
  background: var(--ink);
  color: white;
  z-index: 20;
  border-radius: 12px;
  padding: 13px 18px;
  font-size: 12px;
  max-width: calc(100vw - 32px);
  width: max-content;
  opacity: 0;
  pointer-events: none;
  transition: 0.2s;
}
.toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
.sr-only,
.skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link:focus {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 30;
  background: white;
  padding: 10px;
}
.reduced-motion * {
  animation: none !important;
  transition: none !important;
}
@media (min-width: 600px) {
  body {
    display: grid;
    place-items: center;
  }
  .game-shell {
    padding: 8px 20px 18px;
    width: calc(max(266px, var(--board-width)) + 40px);
    background: #eaf4ff;
    border-left: 1px solid #cddbf0;
    border-right: 1px solid #cddbf0;
    box-shadow: 0 0 100px #2456ed09;
    min-height: var(--game-height, 100svh);
  }
  .topbar {
    height: 48px;
  }
  .title-row {
    height: 70px;
  }
  .title-row p {
    font-size: 11px;
  }
  .title-row h1 {
    font-size: 47px;
  }
  .under-note {
    font-size: 11px;
  }
}
:root.compact-game .title-row {
  height: 53px;
  gap: 10px;
}
:root.compact-game .title-row h1 {
  font-size: 36px;
}
:root.compact-game .title-row p {
  font-size: 9px;
}
:root.compact-game .title-row img {
  width: 46px;
  height: 46px;
}
:root.compact-game .topbar {
  height: 38px;
}
:root.compact-game .hud {
  height: 55px;
  padding: 0 10px;
}
:root.compact-game .status-strip {
  font-size: 9px;
  padding: 6px 8px;
}
:root.compact-game .status-strip strong {
  font-size: 9px;
}
:root.compact-game .quick-rules {
  gap: 8px;
  font-size: 9px;
  margin-top: 11px;
}
:root.compact-game .under-note {
  font-size: 9px;
}
:root.compact-game .action-dock {
  margin-top: 10px;
}
:root.compact-game .result-score strong {
  font-size: 44px;
}
:root.compact-game .result-stamp {
  margin-bottom: 8px;
}
:root.compact-game .result-stats {
  margin-top: 12px;
  padding: 10px 0;
}
:root.compact-game .result-screen h2 {
  font-size: 18px;
}
:root.compact-game .result-screen p {
  font-size: 10px;
}
:root.compact-game .duel {
  margin-top: 8px;
}
:root.compact-game footer {
  padding-top: 9px;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

.sound-settings {
  padding: 0 14px 12px;
  margin: 18px 0;
  background: #eff5ff;
  border-radius: 16px;
}
.sound-settings .button {
  width: 100%;
  margin-top: 12px;
  min-height: 44px;
}
.sound-settings .help-note {
  margin-bottom: 0;
}
#chain-best {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
#chain-best.streak-miss {
  color: #ba3459;
}

/* A pocket-sized friend league, in the space previously occupied by the tagline. */
.title-row .social-strip {
  flex: 1;
  min-width: 0;
  max-width: 230px;
  margin-left: auto;
  padding: 5px 10px;
  background: #fff;
  border: 1px solid #c5d6ee;
  border-radius: 12px;
  text-align: left;
  min-height: 44px;
  box-shadow: 0 2px 0 #d3e0f1;
}
#room-title {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}
.social-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}
.social-bottom b {
  font:
    900 18px/1.3 "Noto Sans KR",
    sans-serif;
}
.social-bottom i {
  color: #e75382;
  font-style: normal;
}
.social-bottom small {
  font-size: 10px;
  margin-left: 2px;
}
.title-row .social-bottom strong {
  font-size: 10px;
  color: var(--blue);
  white-space: nowrap;
}
.no-lives .social-strip {
  background: #fff0f5;
  border-color: #f3b7ca;
}
.ranking-dialog {
  width: min(440px, calc(100vw - 24px));
  padding: 22px;
}
.ranking-dialog h2 {
  font-size: 24px;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.ranking-dialog h3 {
  font-size: 15px;
}
.room-subtitle {
  color: var(--muted);
  font-size: 11px;
  margin: 5px 0 18px;
}
.hearts-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 15px;
  border: 1px solid #f3bfd1;
  background: #fff1f6;
  border-radius: 15px;
}
.hearts-left {
  text-align: center;
  flex-shrink: 0;
}
#hearts-art {
  display: flex;
  gap: 3px;
  font-size: 23px;
  line-height: 1;
}
#hearts-art .full {
  color: #e34b7d;
}
#hearts-art .empty {
  color: #e8cbd7;
}
.hearts-left p {
  font-size: 10px;
  margin-top: 3px;
}
.hearts-left strong {
  font-size: 18px;
}
#hearts-caption {
  font-size: 12px;
  display: block;
}
#invite-progress {
  display: block;
  font-size: 10px;
  color: #865b70;
  margin-top: 5px;
}
.invite-card {
  margin: 16px 0 0;
}
.invite-card > p {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.8;
  margin-top: 6px;
}
.invite-card > p b {
  color: var(--ink);
}
.invite-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.invite-actions .button {
  min-height: 44px;
  font-size: 12px;
}
.invite-actions .yellow {
  flex: 1;
}
.invite-actions .secondary {
  flex: 0 0 88px;
}
#invite-url {
  width: 100%;
  padding: 8px;
  margin-top: 8px;
  font-size: 11px;
}
.social-error {
  padding: 12px;
  background: #fff0f4;
  color: #ad2e56;
  font-size: 12px;
  line-height: 1.7;
  margin: 12px 0;
}
.social-message {
  font-size: 11px;
  color: #2456ad;
  line-height: 1.7;
  margin: 10px 0;
}
.social-message:empty {
  display: none;
}
.active-round-note {
  padding: 10px 12px;
  background: #fff7df;
  border-radius: 10px;
  margin: 14px 0;
}
.active-round-note p {
  font-size: 11px;
  line-height: 1.7;
}
.active-round-note .text-button {
  font-size: 10px;
}
.room-profile {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #dce5f3;
}
.room-profile label {
  font-size: 11px;
  white-space: nowrap;
}
.room-profile input {
  min-width: 0;
  width: 100%;
  padding: 10px;
  border-radius: 9px;
  border: 1px solid #c7d6ea;
  font-size: 13px;
}
.room-profile button {
  background: #e8efff;
  color: var(--blue);
  border-radius: 8px;
  min-width: 44px;
  min-height: 44px;
  font-size: 11px;
  font-weight: 800;
}
.room-switcher {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 12px;
}
.room-switcher select {
  width: 100%;
  min-height: 44px;
  padding: 8px;
  font: inherit;
  margin-top: 5px;
  border: 1px solid #c7d6ea;
  background: #fff;
  border-radius: 8px;
}
.ranking-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 20px;
}
.ranking-title button {
  font-size: 10px;
  color: var(--blue);
  background: transparent;
  min-height: 44px;
  padding: 0 2px 0 10px;
}
.rank-target {
  font-size: 11px;
  color: var(--blue);
  margin-bottom: 10px;
  line-height: 1.7;
}
.ranking-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.rank-row {
  display: flex;
  align-items: center;
  gap: 9px;
  border-top: 1px solid #e1e9f5;
  padding: 12px 2px;
}
.rank-row.is-me {
  background: #edf3ff;
  border-radius: 10px;
  padding-left: 8px;
  padding-right: 8px;
  border-color: transparent;
}
.rank-number {
  width: 18px;
  text-align: center;
  font-size: 14px;
  color: #7a88a1;
}
.is-first .rank-number {
  color: #ad7222;
}
.friend-avatar {
  flex: 0 0 31px;
  height: 33px;
  display: grid;
  place-items: center;
  border-radius: 12px 12px 15px 15px;
  font-size: 12px;
  font-weight: 900;
  box-shadow: inset 0 -3px 0 #0000000c;
  background: #ffe0ef;
}
.tone-1 {
  background: #d6faff;
}
.tone-2 {
  background: #fff3bf;
}
.tone-3 {
  background: #efe4ff;
}
.tone-4 {
  background: #ddffe8;
}
.rank-person {
  flex: 1;
  min-width: 0;
}
.rank-person > strong {
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-wrap: anywhere;
}
.rank-person small {
  display: block;
  font-size: 9px;
  color: var(--muted);
  margin-top: 4px;
  overflow-wrap: anywhere;
}
.me-tag {
  font-size: 8px;
  font-style: normal;
  color: #fff;
  background: var(--blue);
  border-radius: 3px;
  padding: 1px 3px;
  white-space: nowrap;
}
.rank-record {
  text-align: right;
  flex-shrink: 0;
}
.rank-record strong {
  font-size: 13px;
  font-weight: 900;
}
.rank-record small {
  display: block;
  font-size: 8px;
  color: var(--muted);
  margin-top: 3px;
}
.connections {
  margin-top: 20px;
  padding: 13px;
  border: 1px dashed #bdcfe8;
  border-radius: 12px;
  background: #f4f8ff;
}
.connections summary {
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.connections p {
  margin-top: 10px;
  font-size: 10px;
  color: var(--muted);
  line-height: 1.7;
}
.connections ul {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
}
.connection-line {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 6px;
  font-size: 11px;
}
.connection-line span,
.connection-line strong {
  background: #fff;
  padding: 5px 8px;
  border: 1px solid #dae4f2;
  border-radius: 8px;
  overflow-wrap: anywhere;
}
.connection-line i {
  font-size: 9px;
  font-style: normal;
  color: #7a8fae;
  white-space: nowrap;
}
.connection-line .connection-me {
  border-color: #8baaf4;
  color: var(--blue);
}
.rank-sync {
  font-size: 10px;
  line-height: 1.6;
}
#result-ranking {
  min-height: 40px;
  font-size: 12px;
  color: var(--blue);
}
#retry-sync {
  font-size: 11px;
}
.result-screen {
  overflow-y: auto;
  justify-content: safe center;
}
.result-screen > * {
  flex-shrink: 0;
}
@media (max-width: 350px) {
  .ranking-dialog {
    padding: 16px;
  }
  .rank-row {
    gap: 5px;
  }
  .rank-record strong {
    font-size: 12px;
  }
  .friend-avatar {
    flex-basis: 26px;
    height: 29px;
  }
  .social-bottom b {
    font-size: 16px;
  }
  .title-row .social-strip {
    padding: 4px 8px;
  }
}

.room-settings {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid #dce5f3;
}
.room-settings summary {
  cursor: pointer;
  font-size: 11px;
  color: var(--muted);
  padding: 8px 0;
}
.room-settings .room-profile {
  margin-top: 4px;
  padding-top: 0;
  border: 0;
}
.ranking-dialog .dialog-top {
  position: sticky;
  top: -22px;
  z-index: 2;
  background: #f8fbff;
  padding: 10px 0;
  margin-top: -10px;
}
@media (max-width: 350px) {
  .ranking-dialog .dialog-top {
    top: -16px;
  }
}

/* Avoid Safari focus zoom without disabling the reader's pinch zoom. */
@media (max-width: 599px) {
  #nickname,
  #player-name,
  #invite-url,
  #copy-fallback,
  #room-select {
    font-size: 16px;
  }
}
.invite-actions {
  flex-wrap: wrap;
}
#invite-kakao {
  flex: 1 0 100%;
}
#invite-share {
  flex: 1;
}
.tile-control:active:not(:disabled) {
  transform: none;
}
