:root {
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    Segoe UI,
    sans-serif;
  color: #f2f2df;
  background: #0b221c;
  font-synthesis: none;
  color-scheme: dark;
}
/* Startfelter og fælles ABCPLAY-ramme. Selve bordets mål ændres ikke. */
.abc-game--8ball main.abc-game-main {
  width: min(1320px, 100%);
  max-width: 1320px;
  padding: 24px 40px 16px;
}
.abc-game--8ball .pool-setup {
  display: grid;
  grid-template-columns: 1fr 1.7fr;
  gap: 28px;
  background: #123b2b;
  border: 1px solid #a4bc8f38;
  padding: 24px;
  border-radius: 17px;
  margin-bottom: 22px;
}
.pool-setup h2 {
  font:
    normal 27px Georgia,
    serif;
  margin: 8px 0 12px;
  color: #f3e7bd;
}
.pool-setup h3 {
  font-size: 15px;
  margin: 0 0 13px;
}
.pool-setup p {
  font-size: 13px;
  line-height: 1.6;
  color: #b5cebe;
  margin: 0;
}
.setup-forms {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 20px;
}
.setup-forms form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.setup-forms label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: #d3ddcb;
}
.setup-forms input,
.setup-forms select {
  width: 100%;
  min-height: 44px;
  background: #0a261c;
  color: #f5ecd4;
  border: 1px solid #b0c59d55;
  border-radius: 9px;
  padding: 10px 12px;
  font: inherit;
}
.setup-forms button {
  margin-top: auto;
}
.abc-game--8ball .pool-error {
  border: 1px solid #d8a2a277;
  background: #693b3933;
  color: #ffdad3;
  padding: 12px;
  border-radius: 10px;
  font-size: 13px;
}
.pool-room {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 7px 0 12px;
  font-size: 12px;
  color: #d6d9b9;
}
.pool-room #pool-leave {
  margin-left: auto;
}
.pocket-choice {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  padding: 9px;
  margin: 0 0 10px;
  border: 1px solid #b99a5c66;
  border-radius: 12px;
  font-size: 12px;
  color: #f4dda3;
}
.pocket-choice > div {
  display: flex;
  gap: 6px;
}
.abc-game--8ball .pocket-choice button {
  padding: 5px;
  min-width: 36px;
  min-height: 36px;
  border: 1px solid #bdab7766;
  border-radius: 8px;
  background: #1e4635;
  color: #f6e6ba;
}
.abc-game--8ball .pocket-choice button[aria-pressed="true"] {
  background: #e4c88b;
  color: #153223;
}
.fine-aim {
  display: flex;
  gap: 6px;
}
.abc-game--8ball .fine-aim button {
  padding: 4px 9px;
  min-width: 40px;
  min-height: 40px;
  font-size: 20px;
}
.abc-game--8ball #shoot {
  background: #e7c77f;
  color: #183326;
  border: 1px solid #f2dca8;
  padding: 14px 24px;
  font-size: 16px;
  font-weight: 800;
  border-radius: 12px;
}
.abc-game--8ball #shoot:disabled {
  opacity: 0.45;
  cursor: default;
}
.abc-game--8ball .pool-controls-note {
  font-size: 11px;
  line-height: 1.5;
  color: #a0bca7;
  text-align: center;
  margin: 15px 0 0;
}
.dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
}
.abc-game--8ball #table {
  touch-action: none;
}
@media (min-width: 601px) {
  .abc-game--8ball.pool-playing .table-shell {
    width: min(100%, max(520px, calc((100dvh - 430px) * 1.6667)));
  }
  .abc-game--8ball.pool-playing .abc-game-intro {
    margin-top: 18px;
    margin-bottom: 14px;
  }
  .abc-game--8ball.pool-playing .pool-room {
    margin-top: 0;
    margin-bottom: 9px;
  }
}
@media (max-width: 900px) {
  .abc-game--8ball main.abc-game-main {
    padding: 14px;
  }
  .abc-game--8ball .pool-setup {
    grid-template-columns: 1fr;
    gap: 18px;
  }
}
@media (max-width: 600px) {
  .abc-game--8ball main.abc-game-main {
    padding: 8px;
  }
  .abc-game--8ball .pool-setup {
    padding: 17px;
    margin-bottom: 12px;
  }
  .abc-game--8ball .pool-setup h2 {
    font-size: 23px;
  }
  .abc-game--8ball .setup-forms {
    grid-template-columns: 1fr;
  }
  .abc-game--8ball .setup-copy p {
    font-size: 11px;
  }
  .abc-game--8ball .table-shell {
    width: min(100%, max(180px, calc((100dvh - 370px) * 0.6)));
  }
  .abc-game--8ball.pool-on-eight .table-shell {
    width: min(100%, max(180px, calc((100dvh - 425px) * 0.6)));
  }
  .abc-game--8ball #shoot {
    padding: 11px 16px;
    font-size: 13px;
    min-height: 44px;
  }
  .abc-game--8ball .shot-panel {
    grid-template-columns: 1fr auto;
    gap: 10px;
  }
  .fine-aim {
    grid-column: 2;
    grid-row: 1;
  }
  .abc-game--8ball .fine-aim button {
    min-height: 40px;
    min-width: 40px;
  }
  .pool-room {
    font-size: 9px;
    gap: 6px;
    margin-bottom: 7px;
  }
  .pool-room button {
    font-size: 9px;
  }
  .abc-game--8ball .pocket-choice {
    flex-wrap: wrap;
    gap: 6px;
    font-size: 10px;
  }
  .abc-game--8ball .pocket-choice button {
    min-height: 40px;
    min-width: 40px;
  }
  .abc-game--8ball .pool-controls-note {
    font-size: 9px;
    margin-top: 8px;
  }
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: radial-gradient(ellipse at 48% 0, #245944 0, #122e25 42%, #0a201a 85%);
  min-height: 100vh;
}
button,
a,
input {
  -webkit-tap-highlight-color: transparent;
}
button {
  font: inherit;
  cursor: pointer;
}
button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid #f0d99a;
  outline-offset: 4px;
}
.pool-app {
  max-width: 1320px;
  margin: auto;
  padding: 24px 46px 16px;
}
.site-head {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-bottom: 19px;
  border-bottom: 1px solid #e1dcba17;
}
.brand {
  font:
    900 23px Georgia,
    serif;
  color: #fbf3d9;
  text-decoration: none;
  letter-spacing: -0.5px;
}
.brand span {
  color: #e7ca85;
}
.prototype-label {
  font-size: 9px;
  letter-spacing: 1.3px;
  color: #a5b8a7;
  border: 1px solid #aec4ad30;
  padding: 6px 9px;
  border-radius: 5px;
}
.site-head > .quiet {
  margin-left: auto;
}
.quiet {
  color: #d0d9c5;
  background: none;
  border: 0;
  padding: 9px 0;
  font-size: 12px;
}
.outline {
  padding: 11px 14px;
  background: #254a393d;
  color: #e7d4a2;
  border: 1px solid #c8ad6a5c;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 600;
}
.game-head {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 22px 0 0;
}
.eyebrow {
  font-size: 9px;
  letter-spacing: 1.6px;
  color: #cfb986;
  font-weight: 700;
}
h1 {
  margin: 5px 0 0;
  font:
    500 46px/1 Georgia,
    serif;
  letter-spacing: -1.8px;
}
.title-dot {
  color: #dbbe7d;
}
.mode-switch {
  display: flex;
  gap: 5px;
  padding: 5px;
  background: #0b251c80;
  border: 1px solid #b8d2b51c;
  border-radius: 11px;
  margin-left: auto;
}
.mode-switch button {
  padding: 11px 14px;
  border: 0;
  border-radius: 7px;
  background: none;
  color: #abc0ac;
  font-size: 12px;
  font-weight: 600;
}
.mode-switch button[aria-pressed="true"] {
  background: #dfc587;
  color: #173629;
  box-shadow: 0 2px 7px #0003;
}
.preview-note {
  color: #8fae98;
  font-size: 11px;
  margin: 12px 0 18px;
}
.play-area {
  border: 1px solid #bfd2b51c;
  background: linear-gradient(145deg, #1c3f2f77, #0d281f88);
  border-radius: 18px;
  padding: 15px 20px 0;
  box-shadow: 0 22px 60px #00140b40;
}
.scorebar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 3px 13px 9px;
  gap: 12px;
}
.player {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 8px 0;
}
.player strong {
  font-size: 13px;
  font-weight: 650;
  display: block;
  white-space: nowrap;
}
.player small {
  display: block;
  font-size: 10px;
  color: #a2b7a2;
  margin-top: 4px;
}
.player.right {
  text-align: right;
}
.avatar {
  width: 33px;
  height: 33px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
  border: 1px solid #ffffff30;
}
.avatar.gold {
  color: #283a27;
  background: #d2b578;
}
.avatar.sage {
  color: #a8b9a2;
  background: #2b4938;
}
.player.active strong {
  color: #ead7a0;
}
.player.active .avatar {
  box-shadow: 0 0 0 3px #dac18a14;
}
.table-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #b6be9f;
  letter-spacing: 2px;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.4;
}
.table-brand small {
  font-size: 7px;
  font-weight: 400;
  letter-spacing: 2.5px;
}
.eight-mark {
  height: 27px;
  width: 27px;
  border: 1px solid #b3b78f72;
  color: #dbd9b9;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font:
    bold 17px Georgia,
    serif;
}
.table-shell {
  position: relative;
  margin: 0 auto;
  max-width: 1040px;
  touch-action: none;
  user-select: none;
}
#table {
  display: block;
  width: 100%;
  height: auto;
  touch-action: none;
  cursor: crosshair;
  overflow: visible;
}
.table-hint {
  position: absolute;
  bottom: 6.5%;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 9px;
  letter-spacing: 0.4px;
  color: #cfccab77;
  pointer-events: none;
}
.shot-panel {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) minmax(150px, 260px) auto auto;
  gap: 26px;
  align-items: center;
  padding: 15px 13px 20px;
  border-top: 1px solid #c7d2b019;
  margin-top: 0;
}
.shot-state {
  display: flex;
  gap: 10px;
  align-items: center;
}
.turn-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #d6bd7d;
  box-shadow: 0 0 0 5px #dfc88e10;
  flex-shrink: 0;
}
.shot-state strong {
  font-size: 12px;
  font-weight: 650;
  display: block;
}
.shot-state small {
  font-size: 10px;
  color: #95ad97;
  display: block;
  margin-top: 5px;
}
.power-control label {
  font-size: 10px;
  color: #c4d1b8;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 9px;
}
.power-control output {
  font-variant-numeric: tabular-nums;
  color: #e2cb8a;
  font-size: 11px;
  font-weight: 700;
}
input[type="range"] {
  width: 100%;
  height: 6px;
  accent-color: #dfc587;
  display: block;
  cursor: pointer;
}
.shoot {
  border: 1px solid #ead59b;
  background: linear-gradient(145deg, #f1d89b, #c8a762);
  color: #203a28;
  font-weight: 800;
  border-radius: 10px;
  padding: 14px 26px;
  font-size: 13px;
  box-shadow: 0 4px 12px #0002;
  min-width: 120px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
}
.shoot span {
  font-size: 18px;
  font-weight: 400;
  line-height: 16px;
}
.shoot:disabled {
  opacity: 0.55;
  cursor: wait;
}
.new-table {
  font-size: 11px;
  white-space: nowrap;
}
.concept-footer {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  padding: 19px 6px 0;
  color: #7c9984;
  font-size: 10px;
}
.concept-footer span:first-child:before {
  content: "◇ ";
  color: #c2b07e;
}
dialog {
  max-width: 620px;
  width: calc(100% - 32px);
  background: #163b2c;
  color: #e5ead7;
  border: 1px solid #d5b87473;
  border-radius: 20px;
  padding: 32px;
  box-shadow: 0 24px 80px #0006;
}
dialog::backdrop {
  background: #020f0bbf;
  backdrop-filter: blur(3px);
}
dialog h2 {
  font:
    500 30px/1.15 Georgia,
    serif;
  margin: 12px 0 24px;
}
dialog p,
dialog li {
  font-size: 13px;
  line-height: 1.65;
  color: #bdd0ba;
}
dialog li {
  padding-bottom: 10px;
}
.close-dialog {
  position: absolute;
  right: 18px;
  top: 12px;
  background: none;
  border: 0;
  font-size: 25px;
  color: #c7d7bc;
}
.options-list article {
  display: flex;
  gap: 17px;
  padding: 17px 0;
  border-top: 1px solid #cbd9bd24;
}
.options-list article > span {
  color: #ceb782;
  font-size: 11px;
  margin-top: 3px;
}
.options-list h3 {
  font-size: 16px;
  margin: 0;
}
.options-list p {
  margin: 7px 0;
}
.options-list small {
  font-size: 11px;
  color: #d7c494;
  line-height: 1.5;
  display: block;
}
.option-note {
  border: 1px solid #b9c7a426;
  padding: 12px;
  border-radius: 10px;
}
.mode-switch button:disabled {
  opacity: 0.5;
}
.is-moving .table-hint {
  visibility: hidden;
}
@media (min-width: 1450px) {
  .pool-app {
    padding-top: 28px;
  }
  .play-area {
    margin-top: 22px;
  }
}
@media (max-width: 800px) {
  .pool-app {
    padding: 15px 17px;
  }
  .game-head {
    gap: 12px;
  }
  .game-head > .outline {
    display: none;
  }
  .mode-switch button {
    padding: 10px 9px;
    font-size: 11px;
  }
  .shot-panel {
    gap: 16px;
    grid-template-columns: 1fr 1fr auto;
  }
  .new-table {
    grid-column: 3;
  }
  .shot-state small {
    display: none;
  }
  .table-brand {
    display: none;
  }
  .shot-panel > .power-control {
    min-width: 110px;
  }
  .shoot {
    padding: 12px 16px;
    min-width: 90px;
  }
  .scorebar {
    padding-inline: 5px;
  }
}
@media (max-width: 600px) {
  .pool-app {
    padding: 12px 12px 8px;
  }
  .site-head {
    padding-bottom: 12px;
    gap: 10px;
  }
  .brand {
    font-size: 20px;
  }
  .prototype-label {
    font-size: 7px;
    letter-spacing: 0.8px;
    padding: 5px 6px;
  }
  .site-head > .quiet {
    font-size: 10px;
  }
  .game-head {
    padding-top: 14px;
    flex-wrap: wrap;
    gap: 12px;
  }
  .eyebrow {
    font-size: 8px;
  }
  h1 {
    font-size: 35px;
  }
  .mode-switch {
    padding: 3px;
    gap: 1px;
    margin-left: auto;
  }
  .mode-switch button {
    font-size: 9px;
    padding: 10px 8px;
  }
  .mode-switch button[data-mode="local"] {
    max-width: 84px;
    line-height: 1.1;
  }
  .preview-note {
    font-size: 9px;
    line-height: 1.5;
    margin: 9px 0 12px;
    max-width: 350px;
  }
  .play-area {
    border-radius: 14px;
    padding: 8px 7px 0;
  }
  .scorebar {
    padding: 2px 5px 5px;
    gap: 7px;
  }
  .avatar {
    width: 25px;
    height: 25px;
    font-size: 10px;
  }
  .player {
    gap: 7px;
    padding: 4px 0;
  }
  .player strong {
    font-size: 11px;
  }
  .player small {
    font-size: 8px;
    max-width: 125px;
    white-space: normal;
  }
  .table-shell {
    width: 100%;
    max-width: 390px;
  }
  .table-hint {
    bottom: 3%;
    font-size: 8px;
    color: #d0caa17f;
  }
  .shot-panel {
    padding: 12px 7px;
    grid-template-columns: 1fr auto;
    gap: 12px 14px;
    margin-top: 3px;
  }
  .shot-state {
    grid-column: 1;
    grid-row: 1;
  }
  .shot-state strong {
    font-size: 11px;
  }
  .shot-state small {
    font-size: 8px;
    display: block;
  }
  .new-table {
    grid-column: 2;
    grid-row: 1;
    font-size: 10px;
    padding: 4px 0;
  }
  .power-control {
    grid-column: 1;
    grid-row: 2;
  }
  .power-control label {
    font-size: 9px;
    margin-bottom: 9px;
  }
  .shoot {
    grid-column: 2;
    grid-row: 2;
    font-size: 12px;
    padding: 12px 17px;
    min-width: 100px;
  }
  .concept-footer {
    font-size: 8px;
    line-height: 1.5;
    padding: 13px 2px 0;
    gap: 20px;
  }
  .concept-footer span:last-child {
    text-align: right;
  }
  dialog {
    padding: 25px 20px;
  }
  dialog h2 {
    font-size: 26px;
  }
  .options-list article {
    padding: 13px 0;
  }
  .options-list h3 {
    font-size: 14px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}
.mobile-options {
  display: none;
}
@media (max-width: 800px) {
  .concept-footer {
    flex-wrap: wrap;
  }
  .mobile-options {
    display: block;
    width: 100%;
    text-align: center;
    padding: 8px;
    margin-top: 0;
    font-size: 10px;
  }
  .concept-footer span {
    flex: 1;
  }
}
@media (max-width: 600px) {
  .table-shell {
    width: min(100%, calc((100dvh - 400px) * 0.6));
  }
}

@media (max-width: 600px) {
  .mobile-options {
    width: auto;
    flex: 0 0 auto;
    margin: 0;
    padding: 0;
    font-size: 9px;
  }
  .concept-footer {
    gap: 10px;
  }
  .table-shell {
    width: min(100%, calc((100dvh - 415px) * 0.6));
  }
}
