body {
  height: 100%;
  margin: 10px;
  font-family: ubuntu;
  font-size: 14px;
  overflow: hidden;
}

#wrapper {
  margin: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

p {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

#info {
  opacity: 0.2;
  margin: 0;
  text-align: center;
}

#termometer {
  width: 25px;
  background: #38383f;
  height: 240px;
  position: relative;
  border: 9px solid #2a2a2e;
  border-radius: 20px;
  z-index: 1;
  margin-bottom: 50px;
}
#termometer:before, #termometer:after {
  position: absolute;
  content: "";
  border-radius: 50%;
}
#termometer:before {
  width: 100%;
  height: 34px;
  bottom: 9px;
  background: #38383f;
  z-index: -1;
}
#termometer:after {
  transform: translateX(-50%);
  width: 50px;
  height: 50px;
  background-color: #3dcadf;
  bottom: -41px;
  border: 9px solid #2a2a2e;
  z-index: -3;
  left: 50%;
}
#termometer #graduations {
  height: 59%;
  top: 20%;
  width: 50%;
}
#termometer #graduations, #termometer #graduations:before {
  position: absolute;
  border-top: 2px solid rgba(0, 0, 0, 0.5);
  border-bottom: 2px solid rgba(0, 0, 0, 0.5);
}
#termometer #graduations:before {
  content: "";
  height: 34%;
  width: 100%;
  top: 32%;
}
#termometer #temperature {
  bottom: 0;
  background: linear-gradient(#ff2701, #3dcadf) no-repeat bottom;
  width: 100%;
  border-radius: 20px;
  background-size: 100% 240px;
  transition: all 0.2s ease-in-out;
}
#termometer #temperature, #termometer #temperature:before, #termometer #temperature:after {
  position: absolute;
}
#termometer #temperature:before {
  content: attr(data-value);
  background: rgba(0, 0, 0, 0.7);
  color: white;
  z-index: 2;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 1em;
  line-height: 1;
  transform: translateY(50%);
  left: calc(100% + 1em / 1.5);
  top: calc(-1em + 5px - 5px * 2);
}
#termometer #temperature:after {
  content: "";
  border-top: 0.4545454545em solid transparent;
  border-bottom: 0.4545454545em solid transparent;
  border-right: 0.6666666667em solid rgba(0, 0, 0, 0.7);
  left: 100%;
  top: calc(-1em / 2.2 + 5px);
}

#playground {
  font-size: 1.1em;
}
#playground #range {
  display: flex;
}
#playground #range input[type=text] {
  width: 2em;
  background: transparent;
  border: none;
  color: inherit;
  font: inherit;
  margin: 0 5px;
  padding: 0px 5px;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease-in-out;
}
#playground #range input[type=text]:focus {
  border-color: #3dcadf;
  outline: none;
}
#playground #range input[type=text]:first-child {
  text-align: right;
}
#playground #unit {
  width: 100%;
  margin: 0;
  text-align: center;
}
#playground #unit:hover {
  cursor: pointer;
}

input[type=range] {
  -webkit-appearance: none;
  background: transparent;
  margin: 5.5px 0;
  width: 100%;
}
input[type=range]::-moz-focus-outer {
  border: 0;
}
input[type=range]:hover {
  cursor: pointer;
}
input[type=range]:focus {
  outline: 0;
}
input[type=range]:focus::-webkit-slider-runnable-track {
  background: #313137;
  border-color: #313137;
}
input[type=range]:focus::-ms-fill-lower {
  background: #2a2a2e;
}
input[type=range]:focus::-ms-fill-upper {
  background: #313137;
  border-color: #313137;
}
input[type=range]::-webkit-slider-runnable-track {
  cursor: default;
  height: 10px;
  transition: all 0.2s ease;
  width: 100%;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  box-shadow: 1px 1px 1px transparent, 0 0 1px rgba(13, 13, 13, 0);
  background: #2a2a2e;
  border: 2px solid #2a2a2e;
  border-radius: 5px;
}
input[type=range]::-webkit-slider-thumb {
  box-shadow: 4px 4px 4px transparent, 0 0 4px rgba(13, 13, 13, 0);
  background: #3dcadf;
  border: 0px solid #3d3d44;
  border-radius: 12px;
  cursor: pointer;
  height: 11px;
  width: 18px;
  -webkit-appearance: none;
  margin-top: -2.5px;
}
input[type=range]::-moz-range-track {
  box-shadow: 1px 1px 1px transparent, 0 0 1px rgba(13, 13, 13, 0);
  cursor: default;
  height: 10px;
  transition: all 0.2s ease;
  width: 100%;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  background: #2a2a2e;
  border: 2px solid #2a2a2e;
  border-radius: 5px;
  height: 5px;
}
input[type=range]::-moz-range-thumb {
  box-shadow: 4px 4px 4px transparent, 0 0 4px rgba(13, 13, 13, 0);
  background: #3dcadf;
  border: 0px solid #3d3d44;
  border-radius: 12px;
  cursor: pointer;
  height: 7px;
  width: 14px;
}
input[type=range]::-ms-track {
  cursor: default;
  height: 10px;
  transition: all 0.2s ease;
  width: 100%;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  background: transparent;
  border-color: transparent;
  border-width: 5.5px 0;
  color: transparent;
}
input[type=range]::-ms-fill-lower {
  box-shadow: 1px 1px 1px transparent, 0 0 1px rgba(13, 13, 13, 0);
  background: #222226;
  border: 2px solid #2a2a2e;
  border-radius: 10px;
}
input[type=range]::-ms-fill-upper {
  box-shadow: 1px 1px 1px transparent, 0 0 1px rgba(13, 13, 13, 0);
  background: #2a2a2e;
  border: 2px solid #2a2a2e;
  border-radius: 10px;
}
input[type=range]::-ms-thumb {
  box-shadow: 4px 4px 4px transparent, 0 0 4px rgba(13, 13, 13, 0);
  background: #3dcadf;
  border: 0px solid #3d3d44;
  border-radius: 12px;
  cursor: pointer;
  height: 7px;
  width: 14px;
  margin-top: 2.5px;
}
input[type=range]:disabled::-webkit-slider-thumb {
  cursor: not-allowed;
}
input[type=range]:disabled::-moz-range-thumb {
  cursor: not-allowed;
}
input[type=range]:disabled::-ms-thumb {
  cursor: not-allowed;
}
input[type=range]:disabled::-webkit-slider-runnable-track {
  cursor: not-allowed;
}
input[type=range]:disabled::-ms-fill-lower {
  cursor: not-allowed;
}
input[type=range]:disabled::-ms-fill-upper {
  cursor: not-allowed;
}

.help {
  width: 40px;
}

.help .question {
  height: 40px;
  width: 40px;
  background: #ccc;
  font-size: 32px;
  line-height: 40px;
  text-align: center;
  border-radius: 50%;
  cursor: pointer;
}

.help .popup, .help .popup2 {
  width: 560px;
  height: 0px;
  text-align: left;
  overflow: hidden;
  position: relative;
  background: #eee;
  opacity: 0;
  transition: 1s;
}

.help .popup {
  left: -260px;
  top: 10px;
}

.help:hover .popup {
  opacity: 1;
  height: 270px;
}

.help .tell-me p:first-child {
  color: #317eac;
  cursor: pointer;
}

.tell-me {
  width: 150px;
}

.help .popup h3 {
  margin: 0;
  padding: 10px 0 0 10px;
  height: 30px;
  background: #555;
  color: #fff;
  font-weight: 400;
  font-size: 18px;
}

.help .popup p {
  font-size: 16px;
  padding: 10px;
  margin: 0;
}

.help .popup a {
  text-decoration: none;
  color: #317eac;
}

.help .popup a:visited {
  color: #317eac;
}

.help .popup p em {
  font-size: 12px;
}

/* Shared hot-and-cold theme for the live game and game maker. */
.hot-app {
  --hot-ink: #19394d;
  --hot-muted: #526c7c;
  --hot-blue: #187eb8;
  --hot-orange: #d9571e;
  --hot-line: #dce7ed;
  --hot-tube-height: 260px;
  min-height: 100vh;
  height: auto;
  margin: 0;
  color: var(--hot-ink);
  background:
    radial-gradient(ellipse at 0% 0%, #e0f1fa, transparent 48%),
    radial-gradient(ellipse at 100% 100%, #ffead6, transparent 48%),
    #f6f8fa;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  overflow: visible;
  color-scheme: light;
}

.hot-app *, .hot-app *::before, .hot-app *::after {
  box-sizing: border-box;
}

.hot-app p {
  user-select: text;
}

.hot-app h1, .hot-app h2, .hot-app p {
  margin-top: 0;
}

.hot-app a {
  color: #126a9b;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.hot-app a:hover {
  color: #a63d10;
}

.hot-app a:focus-visible, .hot-app summary:focus-visible,
.hot-app button:focus-visible, .hot-app input:focus-visible {
  outline: 3px solid var(--hot-blue);
  outline-offset: 4px;
}

.game-eyebrow {
  display: inline-block;
  margin-bottom: 12px;
  color: #126a9b;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.game-page #wrapper {
  display: block;
  width: min(100%, 560px);
  margin: 0 auto;
  padding: 40px 20px 48px;
}

.game-heading {
  margin-bottom: 28px;
  text-align: center;
}

.game-heading h1 {
  margin-bottom: 12px;
  color: var(--hot-ink);
  font-size: clamp(32px, 6vw, 46px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.045em;
}

.game-heading h1 span {
  color: var(--hot-orange);
}

.game-heading > p {
  margin-bottom: 0;
  color: var(--hot-muted);
  font-size: 15px;
}

.game-panel {
  padding: 28px;
  background: #fff;
  border: 1px solid var(--hot-line);
  border-radius: 30px;
  box-shadow: 0 16px 50px rgba(37, 73, 95, 0.08);
}

.thermometer-stage {
  position: relative;
  display: flow-root;
  width: 100%;
}

.game-page #termometer {
  box-sizing: content-box;
  width: 34px;
  height: var(--hot-tube-height);
  margin: 94px auto 58px;
  background: #eaf1f5;
  border: 8px solid #c7dce8;
  border-radius: 28px;
  isolation: isolate;
}

.game-page #termometer::before {
  display: none;
}

.game-page #termometer::after {
  width: 72px;
  height: 72px;
  bottom: -47px;
  background: #47a9d5;
  border: 8px solid #c7dce8;
  box-shadow: 0 5px 16px rgba(24, 126, 184, 0.1);
  z-index: -1;
}

.game-page #termometer #temperature {
  max-height: 100%;
  background: linear-gradient(to top, #47a9d5 0%, #79cbdc 32%, #ffc479 66%, #ef642b 100%) no-repeat bottom;
  background-size: 100% var(--hot-tube-height);
  border-radius: 18px;
  transition: height 250ms ease;
}

.game-page #termometer #temperature::before {
  top: auto;
  bottom: calc(var(--hot-tube-height) + 22px);
  left: 50%;
  width: max-content;
  padding: 0;
  color: var(--hot-ink);
  background: transparent;
  border-radius: 0;
  font-size: clamp(32px, 6vw, 52px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.045em;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  transform: translateX(-50%);
}

.game-page #termometer #temperature::after {
  display: none;
}

.game-page #termometer #graduations {
  top: 6px;
  right: -30px;
  width: 12px;
  height: calc(100% - 12px);
  background: repeating-linear-gradient(to bottom, #a6bdcb 0, #a6bdcb 1px, transparent 1px, transparent 20px);
  border: 0;
}

.game-page #termometer #graduations::before {
  display: none;
}

.heat-scale {
  position: absolute;
  top: 102px;
  bottom: 66px;
  left: calc(50% + 55px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  pointer-events: none;
}

.heat-scale span:first-child {
  color: #b74718;
}

.heat-scale span:last-child {
  color: #126a9b;
}

.temperature-legend {
  display: flex;
  justify-content: center;
  gap: 26px;
  padding-top: 6px;
  color: var(--hot-muted);
  font-size: 13px;
}

.temperature-legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.temperature-legend span::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #187eb8;
}

.temperature-legend .legend-hot::before {
  background: #d9571e;
}

.game-page #feedback {
  margin: 24px 0 0;
  padding: 16px 18px;
  color: var(--hot-ink);
  background: #edf6fb;
  border: 1px solid #d7eaf5;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 500;
  text-align: center;
  overflow-wrap: anywhere;
}

.game-page #feedback:empty {
  display: none;
}

.game-page #feedback a {
  display: inline-block;
  padding: 4px;
  font-weight: 700;
}

.game-page .help {
  width: 100%;
  margin-top: 18px;
  background: #fff;
  border: 1px solid var(--hot-line);
  border-radius: 18px;
}

.hot-app summary {
  position: relative;
  cursor: pointer;
  list-style: none;
}

.hot-app summary::-webkit-details-marker {
  display: none;
}

.hot-app summary::after {
  content: "";
  width: 8px;
  height: 8px;
  margin-left: auto;
  border: solid var(--hot-muted);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.hot-app details[open] > summary::after {
  transform: rotate(225deg);
}

.game-page .help .question {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  height: auto;
  min-height: 58px;
  padding: 16px 20px;
  color: var(--hot-ink);
  background: transparent;
  border-radius: 18px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
}

.game-page .help .question > span {
  width: 24px;
  height: 24px;
  color: #126a9b;
  background: #e7f3fa;
  border-radius: 50%;
  line-height: 24px;
  text-align: center;
}

.game-page .help .popup, .game-page .help:hover .popup {
  position: static;
  width: 100%;
  height: auto;
  padding: 0 24px 22px;
  color: var(--hot-muted);
  background: transparent;
  opacity: 1;
  overflow: visible;
  transition: none;
}

.game-page .help .popup h2 {
  margin: 0 0 12px;
  color: var(--hot-ink);
  font-size: 17px;
}

.game-page .help .popup ul {
  margin: 0;
  padding-left: 20px;
  font-size: 14px;
}

.game-page .help .popup li + li {
  margin-top: 14px;
}

.maker-shell {
  width: min(100%, 1480px);
  margin: 0 auto;
  padding: 44px clamp(20px, 4vw, 60px) 48px;
}

.maker-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 30px;
}

.maker-heading .game-eyebrow {
  margin-bottom: 8px;
}

.maker-heading h1 {
  margin-bottom: 10px;
  font-size: clamp(30px, 4vw, 42px);
  font-weight: 750;
  line-height: 1.2;
  letter-spacing: -0.035em;
}

.maker-heading p {
  margin-bottom: 0;
  color: var(--hot-muted);
  font-size: 15px;
}

.setup-badge {
  flex-shrink: 0;
  padding: 9px 15px;
  color: #a43d11;
  background: #fff0df;
  border: 1px solid #f1d7b8;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
}

.maker-layout {
  display: grid;
  grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
  align-items: start;
  gap: 24px;
}

.setup-panel, .map-panel {
  min-width: 0;
  background: #fff;
  border: 1px solid var(--hot-line);
  border-radius: 24px;
  box-shadow: 0 12px 36px rgba(37, 73, 95, 0.06);
}

.setup-panel {
  padding: 28px;
}

.setup-panel h2 {
  margin-bottom: 12px;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.setup-panel .panel-intro {
  margin-bottom: 20px;
  color: var(--hot-muted);
  font-size: 14px;
}

.setup-help {
  margin-bottom: 24px;
  padding: 13px 14px;
  background: #f4f8fb;
  border: 1px solid var(--hot-line);
  border-radius: 12px;
}

.setup-help summary {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #126a9b;
  font-size: 13px;
  font-weight: 600;
}

.setup-help p {
  margin: 14px 0 0;
  color: var(--hot-muted);
  font-size: 13px;
  line-height: 1.8;
}

.setup-help p br {
  display: block;
  content: "";
  margin-top: 10px;
}

.setup-panel .form-group {
  margin-bottom: 20px;
}

.setup-panel label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 600;
}

.setup-panel .form-control {
  width: 100%;
  height: 50px;
  padding: 12px;
  color: var(--hot-ink);
  background: #fff;
  border: 1px solid #bdced9;
  border-radius: 10px;
  font-family: inherit;
  font-size: 16px;
  box-shadow: none;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.setup-panel .form-control::placeholder {
  color: #607684;
  font-size: 13px;
  opacity: 1;
}

.setup-panel .form-control:focus {
  border-color: var(--hot-blue);
  box-shadow: 0 0 0 3px rgba(24, 126, 184, 0.12);
}

.setup-panel .form-control[readonly] {
  color: #466478;
  background: #f3f7fa;
  font-family: Consolas, monospace;
  font-size: 12px;
  text-overflow: ellipsis;
}

.setup-panel .form-check {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 24px;
  padding: 0;
}

.setup-panel .form-check-input {
  position: static;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--hot-blue);
}

.setup-panel .form-check-label {
  margin: 0;
  padding: 8px 0;
  color: var(--hot-muted);
  font-weight: 400;
  cursor: pointer;
}

.coordinate-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.setup-panel #createLinkBtn {
  width: 100%;
  min-height: 52px;
  padding: 14px 20px;
  color: #fff;
  background: #c84b16;
  border: 1px solid #c84b16;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  box-shadow: 0 6px 16px rgba(200, 75, 22, 0.16);
  transition: background-color 150ms ease, box-shadow 150ms ease;
}

.setup-panel #createLinkBtn:hover {
  background: #ad3e10;
  border-color: #ad3e10;
  box-shadow: 0 8px 20px rgba(200, 75, 22, 0.22);
}

.setup-panel #error {
  margin-top: 20px;
  padding: 16px;
  color: var(--hot-ink);
  background: #edf6fb;
  border: 1px solid #d7eaf5;
  border-radius: 12px;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.setup-panel #error:empty {
  display: none;
}

.setup-panel #error a {
  display: block;
  margin-top: 10px;
  font-size: 15px;
  font-weight: 700;
}

.map-panel {
  padding: 10px;
}

.map-heading {
  padding: 18px 18px 22px;
}

.map-heading h2 {
  margin-bottom: 6px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.map-heading p {
  margin-bottom: 0;
  color: var(--hot-muted);
  font-size: 13px;
}

.maker-page #map {
  width: 100%;
  height: clamp(420px, 64vh, 700px);
  min-height: 420px;
  background: #e6eef0;
  border: 1px solid var(--hot-line);
  border-radius: 16px;
  font-family: inherit;
}

.maker-page .leaflet-bar {
  overflow: hidden;
  border: 1px solid #bdced9;
  border-radius: 9px;
  box-shadow: 0 3px 12px rgba(25, 57, 77, 0.12);
}

.maker-page .leaflet-bar a {
  width: 36px;
  height: 36px;
  color: var(--hot-ink);
  line-height: 36px;
  text-decoration: none;
}

.maker-page .leaflet-control-custom {
  border: 1px solid #bdced9;
  border-radius: 9px !important;
  box-shadow: 0 3px 12px rgba(25, 57, 77, 0.12);
}

.maker-page .leaflet-control-custom button {
  min-height: 36px;
  padding: 6px 12px;
  color: var(--hot-ink);
  background: #fff;
  border: 0;
  border-radius: 6px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
}

.maker-page .leaflet-control-custom button:hover {
  background: #edf6fb;
}

@media (max-width: 899px) {
  .maker-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .maker-page #map {
    height: 420px;
  }
}

@media (max-width: 599px) {
  .hot-app {
    --hot-tube-height: 220px;
  }

  .game-page #wrapper {
    padding: 28px 16px 32px;
  }

  .game-heading {
    margin-bottom: 22px;
  }

  .game-heading > p {
    font-size: 14px;
  }

  .game-panel {
    padding: 22px;
    border-radius: 24px;
  }

  .game-page #termometer {
    margin-top: 80px;
    margin-bottom: 52px;
  }

  .heat-scale {
    top: 88px;
    bottom: 60px;
    left: calc(50% + 50px);
  }

  .game-page #feedback {
    padding: 14px 12px;
    font-size: 14px;
  }

  .maker-shell {
    padding: 28px 16px 32px;
  }

  .maker-heading {
    display: block;
    margin-bottom: 24px;
  }

  .setup-badge {
    display: inline-block;
    margin-top: 16px;
  }

  .setup-panel {
    padding: 24px 20px;
    border-radius: 20px;
  }

  .maker-layout {
    gap: 18px;
  }

  .map-heading {
    padding: 14px 12px 18px;
  }

  .maker-page #map {
    height: 360px;
    min-height: 360px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .game-page #termometer #temperature,
  .setup-panel .form-control, .setup-panel #createLinkBtn {
    transition: none;
  }
}
