.curling-dialog {
  padding: 0;
  border: 1px solid #d8c59c55;
  border-radius: 22px;
  width: min(860px, calc(100vw - 22px));
  max-height: calc(100svh - 22px);
  overflow: auto;
  color: #fff1d8;
  background: #4c1020;
  box-shadow: 0 30px 100px #130610bb;
}
.curling-dialog::backdrop {
  background: #17040bda;
  backdrop-filter: blur(10px);
}
.curl-shell {
  padding: 22px 25px 15px;
}
.curl-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.game-kicker {
  color: #d9c39e;
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.curl-header h2 {
  font:
    400 43px/1.05 "Instrument Serif",
    serif;
  margin: 5px 0 14px;
}
.game-close {
  width: 34px;
  height: 34px;
  border: 1px solid #fff3;
  border-radius: 50%;
  background: #ffffff0a;
  color: #fff1d8;
  font-size: 24px;
  cursor: pointer;
}
.curl-score {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 0 8px 14px;
}
.curl-score div {
  text-align: center;
  min-width: 60px;
}
.curl-score span {
  font-size: 10px;
  color: #ddc5ac;
}
.curl-score strong {
  display: block;
  font-size: 24px;
  font-weight: 500;
}
.curl-score p {
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
  color: #eddcbe;
  max-width: 330px;
  margin: 0;
}
.curl-stage {
  height: clamp(260px, calc(100svh - 345px), 470px);
  position: relative;
  overflow: hidden;
  border: 1px solid #dacba54d;
  border-radius: 14px;
  background: #143645;
  touch-action: none;
}
#curl-canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  outline-offset: -3px;
}
.curl-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 22px;
  background: #15354199;
  backdrop-filter: blur(4px);
}
.curl-overlay[hidden] {
  display: none;
}
.curl-overlay > div {
  text-align: center;
  max-width: 355px;
}
.curl-symbol {
  color: #ebd39f;
  font-size: 36px;
}
.curl-overlay h3 {
  font:
    400 42px/1.02 "Instrument Serif",
    serif;
  margin: 10px 0 15px;
}
.curl-overlay p {
  font-size: 13px;
  line-height: 1.7;
  color: #eef0e8;
}
.game-start {
  min-height: 44px;
  border: 1px solid #e9d1a0;
  background: #f2deb9;
  color: #4a1724;
  border-radius: 30px;
  padding: 12px 23px;
  font:
    600 12px "DM Sans",
    sans-serif;
  cursor: pointer;
  margin-top: 9px;
}
.curl-instruction {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding: 10px 0 8px;
}
.curl-instruction p {
  font-size: 11px;
  color: #ead5b7;
  margin: 0;
}
.curl-instruction > button {
  border: 0;
  background: transparent;
  color: #dac9af;
  font-size: 10px;
  padding: 8px 0 8px 10px;
  cursor: pointer;
}
.curl-packages {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
}
.curl-package {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-height: 65px;
  padding: 9px 4px;
  border: 1px solid #fff2;
  border-radius: 10px;
  color: #f5ead8;
  background: #ffffff06;
  cursor: pointer;
  font-family: "DM Sans", sans-serif;
}
.curl-package strong {
  font-size: 10px;
  font-weight: 600;
}
.curl-package small {
  font-size: 8px;
  color: #cdbb9e;
}
.curl-package.selected {
  border-color: #e8ce96;
  background: #efd29718;
}
.curl-package:disabled {
  opacity: 0.35;
  cursor: default;
}
.package-chip {
  width: 16px;
  height: 16px;
  border-radius: 3px;
  background: var(--package-color);
  position: relative;
}
.package-chip::after {
  content: "";
  position: absolute;
  width: 3px;
  height: 100%;
  left: 6px;
  background: #eed39a;
}
.curl-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #bb9b8b;
  font-size: 9px;
  padding-top: 12px;
}
.curl-banner {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translate(-50%, -7px);
  padding: 9px 14px;
  border-radius: 20px;
  background: #16333de3;
  border: 1px solid #ffffff26;
  color: #fff0cf;
  font-size: 12px;
  max-width: 95%;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.2s,
    transform 0.2s;
}
.curl-banner.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
.curl-power {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: 135px;
  height: 5px;
  border-radius: 5px;
  background: #17334144;
  overflow: hidden;
  pointer-events: none;
}
.curl-power span {
  display: block;
  height: 100%;
  width: 0;
  background: #b8404b;
  transition: width 0.05s;
}
.curl-ability {
  position: absolute;
  right: 16px;
  bottom: 16px;
  border: 1px solid #f0d399;
  border-radius: 30px;
  color: #4a1020;
  background: #f0dab0;
  padding: 12px 20px;
  cursor: pointer;
  font:
    600 12px "DM Sans",
    sans-serif;
  min-height: 44px;
}
.curl-ability[hidden] {
  display: none;
}
@media (max-width: 600px) {
  .curling-dialog {
    width: calc(100vw - 12px);
    max-height: calc(100svh - 12px);
    border-radius: 17px;
  }
  .curl-shell {
    padding: 16px 13px 12px;
  }
  .curl-header h2 {
    font-size: 35px;
  }
  .curl-stage {
    height: clamp(260px, calc(100svh - 360px), 460px);
  }
  .curl-packages {
    grid-template-columns: repeat(3, 1fr);
  }
  .curl-package {
    min-height: 47px;
    display: grid;
    grid-template-columns: 18px 1fr;
    padding: 7px 8px;
    gap: 3px 5px;
    text-align: left;
  }
  .curl-package small {
    grid-column: 2;
  }
  .package-chip {
    grid-row: 1/3;
  }
  .curl-package strong {
    font-size: 9px;
  }
  .curl-overlay h3 {
    font-size: 34px;
  }
  .curl-overlay p {
    font-size: 12px;
  }
  .curl-score {
    padding-bottom: 10px;
  }
  .curl-score p {
    font-size: 10px;
  }
  .curl-instruction p {
    font-size: 10px;
  }
  .curl-footer {
    font-size: 8px;
    padding-top: 9px;
  }
}
@media (min-width: 601px) {
  .curl-packages {
    grid-template-columns: repeat(7, 1fr);
  }
}

.curl-stage {
  height: clamp(240px, calc(100svh - 375px), 440px);
}
@media (max-width: 600px) {
  .curl-stage {
    height: clamp(250px, calc(100svh - 380px), 440px);
  }
}
.curl-shot-controls {
  display: grid;
  grid-template-columns: 1fr 1fr 150px;
  align-items: end;
  gap: 14px;
  padding: 13px 2px 2px;
}
.curl-shot-controls label {
  color: #ead5b5;
  font-size: 10px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px;
}
.curl-shot-controls output {
  text-align: right;
  font-size: 10px;
  color: #fff0d6;
}
.curl-shot-controls input {
  grid-column: 1/-1;
  width: 100%;
  margin: 0;
  height: 26px;
  accent-color: #ecd3a6;
  cursor: pointer;
  touch-action: pan-x;
}
.curl-shot-controls input:disabled {
  opacity: 0.35;
}
#curl-throw {
  min-height: 45px;
  border: 1px solid #f2d5a0;
  border-radius: 12px;
  background: #ecd6ae;
  color: #53172a;
  font:
    600 13px "DM Sans",
    sans-serif;
  cursor: pointer;
}
#curl-throw:disabled {
  cursor: default;
  opacity: 0.45;
}
#curl-throw:not(:disabled):active {
  transform: translateY(2px);
}
.curl-stage {
  height: clamp(230px, calc(100svh - 420px), 440px);
}
.curl-power {
  display: none;
}
@media (max-width: 600px) {
  .curl-shot-controls {
    grid-template-columns: 1fr 1fr;
    gap: 7px 16px;
    padding-top: 9px;
  }
  #curl-throw {
    grid-column: 1/-1;
    min-height: 44px;
  }
  .curl-stage {
    height: clamp(230px, calc(100svh - 470px), 420px);
  }
  .curl-package {
    min-height: 43px;
  }
  .curl-instruction {
    padding: 6px 0;
  }
  .curl-footer {
    display: none;
  }
  .curl-score {
    padding-bottom: 8px;
  }
  .curl-header h2 {
    margin-bottom: 8px;
  }
}
.curl-shot-controls input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  height: 38px;
  min-width: 0;
}
.curl-shot-controls input[type="range"]::-webkit-slider-runnable-track {
  height: 5px;
  background: #ffffff25;
  border-radius: 8px;
}
.curl-shot-controls input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 27px;
  height: 27px;
  margin-top: -11px;
  border-radius: 50%;
  background: #efd8ad;
  border: 3px solid #fff1d6;
  box-shadow: 0 2px 5px #21040b66;
}
.curl-shot-controls input[type="range"]::-moz-range-track {
  height: 5px;
  background: #ffffff25;
  border-radius: 8px;
}
.curl-shot-controls input[type="range"]::-moz-range-thumb {
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: #efd8ad;
  border: 3px solid #fff1d6;
}
@media (max-width: 600px) {
  .curl-shot-controls input[type="range"] {
    height: 44px;
  }
  .curl-stage {
    height: clamp(210px, calc(100svh - 500px), 400px);
  }
}
