.routine-editor-ui {
  position: absolute;
  inset: 0;
  z-index: 27;
  pointer-events: none;
  color: #f4efdc;
  font: 13px/1.4 var(--sr-ui-font,"DM Sans Variable",sans-serif);
  --routine-gold:#e6c580;
  --routine-border:#abb68b55;
}
.routine-editor-ui[hidden],
.routine-editor-ui [hidden] {
  display: none !important;
}
.routine-editor-ui button,
.routine-editor-ui input,
.routine-editor-ui textarea,
.routine-editor-ui dialog {
  pointer-events: auto;
  font: inherit;
  box-sizing: border-box;
}
.routine-editor-ui button {
  min-height: 39px;
  border: 1px solid var(--routine-border);
  border-radius: 6px;
  padding: 8px 12px;
  background: #14291fea;
  color: #f2edda;
  cursor: pointer;
  touch-action: manipulation;
  box-shadow: 0 2px 8px #0002;
}
.routine-editor-ui button:hover:not(:disabled) {
  background: #304432;
  border-color: #d4d7af99;
}
.routine-editor-ui button:disabled {
  opacity: .4;
  cursor: default;
}
.routine-editor-ui button:focus-visible,
.routine-editor-ui input:focus-visible,
.routine-editor-ui textarea:focus-visible {
  outline: 2px solid var(--routine-gold);
  outline-offset: 3px;
}
.routine-editor-ui button.routine-editor-primary {
  background: var(--routine-gold);
  border-color: var(--routine-gold);
  color: #173124;
  font-weight: 750;
}
.routine-editor-ui button.routine-editor-primary:hover:not(:disabled) {
  background: #f3d99e;
}
.routine-editor-toolbar {
  position: absolute;
  top: max(14px, env(safe-area-inset-top));
  left: max(78px, calc(env(safe-area-inset-left) + 66px));
  right: max(16px, env(safe-area-inset-right));
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}
.routine-editor-toolbar button {
  font-size: 11px;
  white-space: nowrap;
}
.routine-editor-bottom {
  position: absolute;
  bottom: max(12px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  width: min(650px, calc(100% - 32px));
  padding: 8px 10px 6px;
  border: 1px solid var(--routine-border);
  border-radius: 10px;
  background: #10271fee;
  box-shadow: 0 7px 24px #0004;
}
.routine-editor-guidance {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 7px;
  font-size: 11px;
  color: #b3c7ae;
  pointer-events: none;
}
.routine-editor-guidance strong {
  font-size: 12px;
  color: #f3d999;
  white-space: nowrap;
}
.routine-editor-guidance span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.routine-editor-palette {
  display: flex;
  gap: 5px;
  justify-content: center;
  pointer-events: none;
}
.routine-editor-palette button {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
  min-height: 60px;
  padding: 6px 3px;
  background: #1e3529;
  border-color: transparent;
  font-size: 9px;
  box-shadow: none;
}
.routine-editor-palette button[aria-pressed=true] {
  border-color: #f1d391;
  background: #74804a55;
  color: #ffe8a9;
  box-shadow: 0 0 0 1px #e6c58022;
}
.routine-editor-palette-ball {
  display: block;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  border: 1px solid #ffffff45;
  background:
    radial-gradient(
      circle at 30% 25%,
      #ffffff8c,
      transparent 40%),
    var(--routine-ball);
  box-shadow: 0 3px 4px #0005;
}
.routine-editor-draft-status {
  display: block;
  text-align: right;
  font-size: 8px;
  color: #a2b69a;
  margin-top: 4px;
}
.routine-editor-draft-status[data-error=true] {
  color: #ffb6a3;
}
.routine-editor-status {
  position: absolute;
  left: 50%;
  bottom: 145px;
  transform: translateX(-50%);
  margin: 0;
  padding: 6px 12px;
  border-radius: 7px;
  background: #10251cd9;
  max-width: min(620px, calc(100% - 36px));
  font-size: 11px;
  text-align: center;
  color: #d1dfc1;
  text-wrap: pretty;
  pointer-events: none;
}
.routine-editor-status:empty {
  display: none;
}
.routine-editor-status[data-error=true] {
  color: #ffbdab;
  background: #321d19eb;
}
.routine-editor-test-controls {
  position: absolute;
  top: max(16px, env(safe-area-inset-top));
  right: max(16px, env(safe-area-inset-right));
  text-align: right;
}
.routine-editor-test-controls > span {
  display: block;
  font-size: 8px;
  letter-spacing: .12em;
  color: #d8c18d;
  margin-bottom: 6px;
  text-shadow: 0 1px 5px #000;
}
.routine-editor-test-controls > div {
  display: flex;
  gap: 6px;
}
.routine-editor-test-controls button {
  font-size: 12px;
}
.routine-editor-ui[data-mode=test] .routine-editor-status {
  bottom: auto;
  top: 86px;
  max-width: 340px;
  font-size: 10px;
}
.routine-editor-dialog {
  width: min(560px, calc(100vw - 28px));
  max-height: calc(100dvh - 32px);
  overflow: auto;
  padding: 25px;
  border: 1px solid #9ca87b88;
  border-top: 3px solid var(--routine-gold);
  border-radius: 10px;
  background: #172e23;
  color: #f4efdc;
  box-shadow: 0 20px 90px #0009;
}
.routine-editor-dialog::backdrop {
  background: #030f0bc9;
  backdrop-filter: blur(3px);
}
.routine-editor-dialog h2 {
  font-size: 24px;
  font-weight: 650;
  margin: 0 40px 9px 0;
}
.routine-editor-dialog h3 {
  font-size: 15px;
  margin: 24px 0 10px;
}
.routine-editor-dialog h3 span {
  font-size: 11px;
  color: #ddc38a;
  margin-left: 6px;
}
.routine-editor-dialog p {
  font-size: 12px;
  color: #bbcab2;
  line-height: 1.55;
}
.routine-editor-dialog label {
  display: block;
  font-size: 11px;
  color: #c0d0b8;
  margin: 14px 0 6px;
}
.routine-editor-dialog input,
.routine-editor-dialog textarea {
  width: 100%;
  border: 1px solid #a6b28c55;
  background: #0b2017;
  color: #f5efde;
  border-radius: 5px;
  padding: 9px 11px;
  line-height: 1.5;
}
.routine-editor-dialog textarea {
  resize: vertical;
  min-height: 65px;
}
.routine-editor-dialog textarea[data-routine-json-text] {
  font:
    11px/1.5 ui-monospace,
    SFMono-Regular,
    monospace;
  min-height: 200px;
}
.routine-editor-dialog input::placeholder,
.routine-editor-dialog textarea::placeholder {
  color: #829b7f;
}
.routine-editor-dialog .routine-editor-dialog-close {
  position: absolute;
  top: 10px;
  right: 10px;
  min-height: 34px;
  width: 35px;
  padding: 0;
  font-size: 24px;
  background: transparent;
  box-shadow: none;
  border: 0;
}
.routine-editor-dialog-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 15px;
}
.routine-editor-dialog-actions button {
  font-size: 11px;
  min-height: 38px;
}
.routine-editor-share-actions {
  padding-top: 13px;
  border-top: 1px solid #a6b28c33;
  margin-top: 17px;
}
.routine-editor-library-message[data-error=true] {
  color: #ffb6a3;
}
.routine-editor-library ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 6px;
  max-height: 230px;
  overflow: auto;
}
.routine-editor-library li {
  display: flex;
  gap: 5px;
}
.routine-editor-library .routine-editor-load {
  flex: 1;
  min-width: 0;
  text-align: left;
  padding: 9px 12px;
}
.routine-editor-load strong {
  display: block;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.routine-editor-load span {
  display: block;
  font-size: 10px;
  color: #b1c5a7;
  margin-top: 3px;
}
.routine-editor-load[aria-current=true] {
  border-color: #e6c58099;
}
.routine-editor-library .routine-editor-delete {
  width: 37px;
  flex: none;
  font-size: 21px;
  padding: 0;
  background: transparent;
}
.routine-editor-file-label {
  padding: 8px 10px;
  border: 1px dashed #a6b28c88;
  border-radius: 5px;
  background: #244231;
}
.routine-editor-file-label input {
  padding: 6px 0 0;
  background: transparent;
  border: 0;
  font-size: 11px;
}
.routine-editor-confirm {
  width: min(430px, calc(100vw - 30px));
}
@media (max-width: 720px) {
  .routine-editor-toolbar {
    left: max(68px, calc(env(safe-area-inset-left) + 58px));
    right: max(10px, env(safe-area-inset-right));
    top: max(10px, env(safe-area-inset-top));
    gap: 4px;
  }
  .routine-editor-toolbar button {
    min-height: 34px;
    padding: 6px 8px;
    font-size: 10px;
  }
  .routine-editor-bottom {
    width: calc(100% - 20px);
    padding: 7px 6px 5px;
  }
  .routine-editor-palette {
    gap: 3px;
  }
  .routine-editor-palette button {
    min-height: 55px;
    padding: 5px 1px;
    font-size: 8px;
  }
  .routine-editor-palette-ball {
    width: 23px;
    height: 23px;
  }
  .routine-editor-guidance {
    font-size: 9px;
    gap: 7px;
    margin-bottom: 5px;
  }
  .routine-editor-guidance strong {
    font-size: 11px;
  }
  .routine-editor-status {
    bottom: 131px;
    font-size: 10px;
    padding: 5px 9px;
  }
  .routine-editor-dialog {
    padding: 23px 18px;
  }
  .routine-editor-test-controls {
    right: max(10px, env(safe-area-inset-right));
    top: max(10px, env(safe-area-inset-top));
  }
  .routine-editor-test-controls button {
    min-height: 35px;
    font-size: 10px;
    padding: 7px 9px;
  }
}
@media (orientation: portrait) {
  .routine-editor-toolbar {
    justify-content: flex-end;
    max-width: calc(100% - 78px);
  }
  .routine-editor-toolbar [data-routine-copy] {
    display: none;
  }
  .routine-editor-guidance {
    display: block;
  }
  .routine-editor-guidance strong {
    margin-right: 6px;
  }
  .routine-editor-guidance span {
    display: inline;
    font-size: 9px;
  }
  .routine-editor-status {
    bottom: 138px;
  }
  .routine-editor-ui[data-mode=test] .routine-editor-status {
    left: auto;
    right: 10px;
    transform: none;
    top: 82px;
    max-width: 230px;
  }
}
@media (orientation: landscape) and (max-height: 500px) {
  .routine-editor-toolbar {
    top: max(8px, env(safe-area-inset-top));
    gap: 3px;
  }
  .routine-editor-toolbar button {
    min-height: 29px;
    padding: 5px 7px;
    font-size: 9px;
  }
  .routine-editor-bottom {
    bottom: max(6px, env(safe-area-inset-bottom));
    width: min(560px, calc(100% - 28px));
    padding: 5px 6px 3px;
  }
  .routine-editor-guidance {
    margin-bottom: 3px;
    font-size: 9px;
  }
  .routine-editor-guidance strong {
    font-size: 10px;
  }
  .routine-editor-palette button {
    min-height: 39px;
    padding: 3px 1px;
    gap: 2px;
    font-size: 8px;
  }
  .routine-editor-palette-ball {
    width: 18px;
    height: 18px;
  }
  .routine-editor-draft-status {
    font-size: 7px;
    margin-top: 2px;
  }
  .routine-editor-status {
    bottom: 94px;
    font-size: 9px;
    max-width: 380px;
    padding: 4px 8px;
  }
  .routine-editor-dialog {
    max-height: calc(100dvh - 18px);
    padding: 18px;
  }
  .routine-editor-dialog h2 {
    font-size: 21px;
  }
  .routine-editor-dialog p {
    font-size: 11px;
  }
  .routine-editor-dialog textarea[data-routine-json-text] {
    min-height: 120px;
  }
  .routine-editor-test-controls > span {
    font-size: 7px;
    margin-bottom: 4px;
  }
  .routine-editor-test-controls button {
    min-height: 31px;
  }
  .routine-editor-ui[data-mode=test] .routine-editor-status {
    top: 72px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .routine-editor-ui * {
    transition: none !important;
    animation: none !important;
  }
}
.routine-editor-active :is(#practice-score, #match-scoreboard, #table-actions, #guide-legend, #toast, .online-hud, .online-room-hud, .academy-game-hud, .last-shot-review-button, .shot-review-controls),
body.routine-editor-open :is(.controller-beta-hud, .game-fps-counter) {
  display: none !important;
}
.routine-editor-editing :is(.spin-dock, .power-dock, #aim-hint, #equipment-hint, #fine-aim-button, #free-view-hud, .portrait-free-view-control),
.routine-editor-editing .game-topbar > :not(#menu-button) {
  display: none !important;
}
.app-shell.routine-editor-active {
  --portrait-score-height:0px;
}
body.routine-editor-open #game-menu :is(.table-menu-match-column, .portrait-table-tools) {
  display: none !important;
}
body.routine-editor-open #game-menu .table-menu-body {
  grid-template-columns: 1fr;
}
.routine-editor-active :is(#table-notices, #game-header-clock) {
  display: none !important;
}
.routine-editor-test-controls {
  top: max(70px, calc(env(safe-area-inset-top) + 58px));
}
.routine-editor-ui[data-mode=test] .routine-editor-status {
  top: 144px;
}
@media (orientation: portrait) {
  .routine-editor-ui[data-mode=test] .routine-editor-status {
    top: 133px;
  }
}
@media (orientation: landscape) and (max-height: 500px) {
  .routine-editor-test-controls {
    top: max(59px, calc(env(safe-area-inset-top) + 49px));
  }
  .routine-editor-ui[data-mode=test] .routine-editor-status {
    top: 116px;
  }
}
.routine-editor-ui,
.routine-editor-ui * {
  box-sizing: border-box;
}
.routine-editor-bottom {
  left: max(12px, env(safe-area-inset-left));
  right: max(12px, env(safe-area-inset-right));
  width: auto;
  max-width: 650px;
  transform: none;
  margin-inline: auto;
}
@media (max-width: 720px) {
  .routine-editor-bottom {
    width: auto;
  }
}
@media (orientation: landscape) and (max-height: 500px) {
  .routine-editor-bottom {
    left: max(14px, env(safe-area-inset-left));
    right: max(14px, env(safe-area-inset-right));
    width: auto;
    max-width: 560px;
  }
}
.home-v3-theme .sr-home .sp-editor-invitation {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px max(16px, calc((100vw - 1296px)/2));
  border-bottom: 1px solid #a3b9a429;
  background: #10271d;
  color: #f1eee2;
  font:
    13px/1.4 "DM Sans Variable",
    Arial,
    sans-serif;
}
.sp-editor-invitation > div {
  display: grid;
  gap: 2px;
}
.sp-editor-invitation strong {
  font-size: 14px;
  color: #efdab0;
}
.sp-editor-invitation > div > span {
  color: #afc0b1;
  font-size: 12px;
}
.home-v3-theme .sr-home .sp-editor-open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 0 0 auto;
  min-height: 44px;
  padding: 9px 14px;
  border: 1px solid #c4a56588;
  border-radius: 5px;
  color: #f3e2bd;
  background: #223c2a;
  text-decoration: none;
  font-weight: 650;
  white-space: nowrap;
}
.sp-editor-open:focus-visible {
  outline: 2px solid #e9cd90;
  outline-offset: 3px;
}
@media (max-width: 600px) {
  .home-v3-theme .sr-home .sp-editor-invitation {
    gap: 12px;
    padding-block: 10px;
  }
  .sp-editor-invitation > div > span {
    font-size: 11px;
  }
}
@media (orientation: landscape) and (max-height: 500px) {
  .sp-editor-invitation > div > span {
    display: none;
  }
  .home-v3-theme .sr-home .sp-editor-invitation {
    padding-block: 4px;
  }
  .home-v3-theme .sr-home .sp-editor-open {
    min-height: 36px;
    padding-block: 5px;
  }
}
.sr-editor-redirect {
  max-width: 36rem;
  margin: 12vh auto;
  padding: 24px;
  font: 17px/1.5 system-ui;
  color: #f1eee2;
  background: #10271d;
}
.sr-editor-redirect a {
  color: #efdab0;
}

.routine-editor-active .game-wordmark{display:none!important}
.routine-editor-ui .routine-editor-toolbar{left:0;right:0;top:0;max-width:none;padding:10px 10px 10px max(68px,calc(env(safe-area-inset-left) + 58px));background:#0b1d14}