.technical-editor-root {
  position: fixed;
  z-index: 520;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 32px;
  font-family: var(--font-app);
}

.technical-editor-root button,
.technical-editor-root input {
  font-family: inherit;
}

.technical-editor-root > .record-editor-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  padding: 0;
  border: 0;
  background: rgb(0 0 0 / 52%);
}

.technical-editor-root .technical-modal-panel {
  position: relative;
  z-index: 1;
  display: flex;
  width: min(540px, calc(100vw - 64px));
  height: min(82vh, 720px);
  max-height: min(82vh, 720px) !important;
  flex-direction: column;
  padding: 0 16px 24px !important;
  overflow: hidden !important;
  border-radius: 24px;
  color: var(--color-text);
  background: var(--color-surface);
  box-shadow: 0 24px 70px rgb(0 0 0 / 28%);
}

.technical-editor-title {
  display: flex;
  flex: 0 0 auto;
  gap: 12px;
  align-items: center;
  padding: 10px 4px 16px;
  background: var(--color-surface);
}

.technical-editor-title--metrics {
  background: var(--color-surface-alt);
}

.technical-editor-title > div {
  flex: 1;
  min-width: 0;
}

.technical-editor-header-metrics {
  display: flex;
  min-width: 0;
  gap: 10px;
  align-items: center;
}

.technical-editor-header-metrics > span,
.technical-editor-header-metrics > strong {
  overflow: hidden;
  color: var(--color-text);
  font-size: 12px;
  font-weight: 900;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.technical-editor-header-metrics > :first-child {
  margin-right: auto;
  text-align: left;
}

.technical-editor-header-metrics > strong {
  color: #dc2d43;
}

.technical-editor-title h1,
.technical-editor-title p {
  margin: 0;
}

.technical-editor-title h1 {
  font-size: 18px;
  line-height: 1.2;
  font-weight: 900;
  letter-spacing: 0;
}

.technical-editor-title p {
  overflow: hidden;
  margin-top: 2px;
  color: var(--color-muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.technical-editor-title > button {
  display: grid;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: var(--color-muted);
  background: var(--color-input);
}

.technical-specific-panel,
.technical-entry-card,
.technical-entry-grid {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
}

.technical-entry-card {
  overflow: hidden;
  background: var(--color-surface);
}

.technical-entry-toolbar {
  display: grid;
  grid-template-columns: minmax(105px, 140px) minmax(54px, 1fr) minmax(60px, 1fr) minmax(60px, 1fr) 36px;
  flex: 0 0 auto;
  gap: 5px;
  align-items: center;
  padding: 8px;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface-alt);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

.technical-entry-toolbar--actions {
  grid-template-columns: minmax(105px, 180px) 36px;
  justify-content: space-between;
}

.technical-entry-toolbar--compact {
  grid-template-columns: minmax(72px, 110px) minmax(0, 1fr) auto 42px 42px;
}

.technical-entry-toolbar--editor {
  min-height: 64px;
  margin: 1px 1px 0;
  padding: 10px 4px 16px 8px;
  background: var(--color-surface);
}

.technical-entry-toolbar.app-page-modal__header {
  display: flex;
  grid-template-columns: none;
  gap: 10px;
}

.technical-entry-toolbar__content {
  display: grid;
  min-width: 0;
  min-height: 43.55px;
  flex: 1;
  grid-template-columns: minmax(100px, 140px) minmax(72px, 1fr) auto;
  gap: 5px;
  align-items: center;
}

.technical-entry-toolbar--compact > span {
  text-align: right;
}

.technical-entry-toolbar > span,
.technical-entry-toolbar > strong,
.technical-entry-toolbar__content > span,
.technical-entry-toolbar__content > strong {
  overflow: hidden;
  color: var(--color-text);
  font-size: 11px;
  font-weight: 900;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.technical-entry-toolbar > strong,
.technical-entry-toolbar__content > strong {
  color: #dc2d43;
  font-size: 12px;
  text-align: right;
}

.technical-entry-toolbar__format {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: stretch;
  gap: 1px;
  line-height: 1.2;
}

.technical-entry-toolbar__format small {
  overflow: hidden;
  color: var(--color-muted);
  font-size: 9px;
  font-weight: 800;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.technical-entry-toolbar__total {
  min-width: 0;
  overflow: hidden;
  color: var(--color-text);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.technical-format-button {
  display: flex;
  width: 100%;
  min-width: 0;
  height: 30px;
  gap: 5px;
  align-items: center;
  justify-content: space-between;
  padding: 0 7px;
  border: 1.5px solid color-mix(in srgb, var(--color-yellow), transparent 48%);
  border-radius: 8px;
  color: var(--color-text);
  background: color-mix(in srgb, var(--color-yellow), transparent 88%);
  font-size: 11px;
  font-weight: 900;
  text-align: left;
}

/* The shared entry header must not inherit the desktop chat-modal button size. */
.technical-entry-toolbar .technical-format-button {
  font-size: 11px !important;
}

.technical-format-button span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.technical-format-button b {
  color: #7a5c00;
  font-size: 14px;
}

.technical-format-button.is-structure-changed {
  border-color: #dc2d43;
}

.technical-rounds-button {
  display: grid;
  min-width: 36px;
  height: 30px;
  padding: 0;
  place-items: center;
  border: 1.5px solid rgb(255 211 45 / 34%);
  border-radius: 11px;
  color: #7a5c00;
  background: rgb(255 211 45 / 10%);
}

.technical-entry-toolbar__actions { justify-self: auto; }

.technical-entry-toolbar--compact .technical-rounds-button {
  width: 42px;
  height: 38px;
}

.technical-entry-grid {
  display: grid;
  grid-template-rows: minmax(150px, 1fr) auto;
}

.technical-editor-root .score-table-scroll {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.technical-round-summary {
  display: flex;
  width: 100%;
  min-height: 36px;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  border: 0;
  border-bottom: 1px solid var(--color-border);
  color: #7a5c00;
  background: rgb(255 211 45 / 7%);
  text-align: left;
}

.technical-round-summary__copy {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.technical-round-summary__copy strong {
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.technical-round-summary__badges {
  display: flex;
  gap: 5px;
}

.technical-round-summary__badges span {
  padding: 2px 6px;
  border: 1px solid rgb(255 211 45 / 34%);
  border-radius: 999px;
  background: rgb(255 211 45 / 9%);
  font-size: 11px;
  font-weight: 900;
}

.technical-round-summary__copy small,
.technical-round-summary__stats {
  color: var(--color-text);
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.technical-series-row {
  display: grid;
  width: 100%;
  min-height: 54px;
  grid-template-columns: 34px minmax(0, 1fr) 34px 42px;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border: 0;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text);
  background: transparent;
  text-align: left;
}

.technical-series-row__rest-slot {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
}

.technical-series-row__rest {
  display: grid;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1.5px solid rgb(255 211 45 / 45%);
  border-radius: 10px;
  color: #7a5c00;
  background: rgb(255 211 45 / 11%);
  place-items: center;
}

.technical-series-row__rest svg {
  width: 18px;
  height: 18px;
}

.technical-series-row.is-active {
  outline: 2px solid rgb(27 190 170 / 53%);
  outline-offset: -2px;
}

.technical-series-row.is-editing-filled-arrow {
  background: #e7edec;
}

[data-theme="dark"] .technical-series-row.is-editing-filled-arrow {
  background: rgb(255 255 255 / 8%);
}

.technical-series-row.is-editing-filled-arrow .technical-series-row__number,
.technical-series-row.is-editing-filled-arrow .technical-series-row__total {
  opacity: .55;
}

.technical-series-row.is-editing-filled-arrow .technical-score-cell:not(.is-active) {
  opacity: .42;
  filter: grayscale(.35);
}

.technical-series-row__number {
  display: flex;
  flex-direction: column;
  gap: 1px;
  align-self: start;
  padding-top: 9px;
  color: var(--color-muted);
  font-size: 13px;
  font-weight: 800;
}
.technical-series-row__distance { color: var(--color-muted); font-size: 9px; font-weight: 900; line-height: 1.1; }

.technical-series-row__counter {
  display: flex;
  min-height: 34px;
  align-items: center;
  font-size: 15px;
  font-weight: 900;
}
.technical-series-row__counter.is-draft { color: var(--color-danger); }

.technical-series-row__total {
  display: flex;
  min-height: 32px;
  align-items: center;
  justify-content: flex-end;
  align-self: start;
  padding-top: 0;
  font-size: 14px;
  font-weight: 900;
  text-align: right;
}

.technical-score-cells {
  display: grid;
  width: max-content;
  grid-template-columns: repeat(var(--score-cell-columns, 6), 32px);
  gap: 5px;
  align-items: center;
  align-content: start;
}

.technical-score-cell {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1.5px solid var(--color-border);
  border-radius: 50%;
  color: var(--score-color);
  background: var(--score-bg);
  font-size: 14px;
  font-weight: 900;
}

.technical-score-cell:not(:empty) {
  border-color: transparent;
}

.technical-score-cell.is-active {
  position: relative;
  z-index: 1;
  border: 2px solid var(--color-teal);
}

.technical-score-cell.is-active:not(:empty) {
  box-shadow: 0 0 0 4px rgb(255 255 255 / 90%);
}

[data-theme="dark"] .technical-score-cell.is-active:not(:empty) {
  box-shadow: 0 0 0 4px rgb(255 255 255 / 14%);
}

.technical-rest-row {
  width: 100%;
  min-height: 32px;
  padding: 6px 52px;
  border: 0;
  border-bottom: 1px solid var(--color-border);
  color: #7a5c00;
  background: rgb(255 211 45 / 7%);
  font-size: 13px;
  font-weight: 900;
  text-align: left;
}
.technical-rest-row.is-active { outline: 2px solid rgb(255 211 45 / 60%); outline-offset: -2px; }

.technical-keyboard {
  flex: 0 0 auto;
  background: var(--color-surface-alt);
  box-shadow: 0 -8px 18px rgb(0 0 0 / 18%);
}

.technical-series-config-summary {
  display: flex;
  width: 100%;
  height: 34px;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  color: var(--color-text);
  background: var(--color-border);
  font-size: 11px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.technical-series-config-fields {
  display: grid;
  grid-template-columns: repeat(var(--series-config-columns), minmax(0, 1fr));
  gap: 6px;
  align-items: end;
  padding: 6px;
  background: var(--color-border);
}

.technical-series-config-fields > div {
  min-width: 0;
}

.technical-series-config-fields span {
  display: block;
  margin: 0 0 2px 1px;
  color: var(--color-teal);
  font-size: 9px;
  font-weight: 900;
}

.technical-series-config-fields button {
  width: 100%;
  min-width: 0;
  height: 30px;
  padding: 0 5px;
  overflow: hidden;
  border: 1.5px solid var(--color-border);
  border-radius: 8px;
  color: var(--color-text);
  background: var(--color-input);
  font-size: 11px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.technical-series-config-fields button.is-active {
  border-color: var(--color-teal);
}

.technical-keyboard__body {
  display: grid;
  grid-template-columns: 1fr 70px;
  gap: 6px;
  padding: 6px;
  background: var(--color-border);
}

.technical-score-buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
}

.technical-score-buttons button {
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  color: var(--score-color);
  background: var(--score-bg);
  font-size: 18px;
  font-weight: 900;
}

.technical-keyboard__side {
  display: grid;
  grid-template-rows: repeat(2, minmax(42px, 1fr));
  gap: 5px;
}

.technical-keyboard__side.is-editing-arrow {
  grid-template-rows: 42px 42px minmax(42px, 1fr);
}

.technical-keyboard__side button {
  display: grid;
  min-height: 42px;
  padding: 0;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  place-items: center;
}

.technical-keyboard__side button svg {
  display: block;
  width: 22px;
  height: 22px;
}

.technical-keyboard__side .is-delete {
  border: 1.5px solid rgb(255 96 96 / 13%);
  color: var(--color-danger);
  background: rgb(255 96 96 / 7%);
}

.technical-keyboard__side .is-next {
  border: 1.5px solid rgb(27 190 170 / 20%);
  color: var(--color-teal);
  background: rgb(27 190 170 / 9%);
  line-height: 1.15;
}

.technical-keyboard__side .is-previous {
  border: 1.5px solid rgb(255 211 45 / 27%);
  color: #7a5c00;
  background: rgb(255 211 45 / 9%);
  font-size: 12px;
}

.technical-counter-body {
  padding: 0;
  border-radius: 10px;
  background: var(--color-border);
}
.technical-rest-choice { position: fixed; z-index: 624; inset: 0; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgb(0 0 0 / 45%); }
.technical-rest-choice__panel { width: 100%; max-width: 420px; padding: 16px; border: 1.5px solid var(--color-border); border-radius: 20px; color: var(--color-text); background: var(--color-surface); box-shadow: 0 18px 50px rgb(0 0 0 / 28%); }
.technical-rest-choice__panel h2 { margin: 0 0 5px; font-size: 18px; font-weight: 900; }
.technical-rest-choice__panel p { margin: 0 0 14px; color: var(--color-muted); font-size: 13px; font-weight: 700; line-height: 1.45; }
.technical-rest-choice__panel > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.technical-rest-choice__panel > div > button { display: flex; height: 58px; align-items: center; justify-content: center; gap: 8px; border: 1.5px solid rgb(255 211 45 / 40%); border-radius: 16px; color: #7a5c00; background: rgb(255 211 45 / 9%); font-size: 13px; font-weight: 900; }
.technical-rest-choice__panel > div > button:first-child { grid-column: 1 / -1; }
.technical-rest-choice__panel > div > button strong { font-size: 18px; line-height: 1; }

.technical-completion-modal__panel {
  width: min(460px, calc(100vw - 32px));
  height: auto;
  max-height: min(78dvh, 620px);
}

.technical-completion-modal__scroll { padding-bottom: 14px; }

.technical-completion-rounds {
  display: grid;
  gap: 8px;
}

.technical-completion-round {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  border: 1.5px solid rgb(255 211 45 / 44%);
  border-radius: 12px;
  color: var(--color-text);
  background: rgb(255 211 45 / 8%);
}

.technical-completion-round > div { min-width: 0; }

.technical-completion-round strong {
  display: block;
  color: #7a5c00;
  font-size: 13px;
  font-weight: 900;
}

.technical-completion-round__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 5px;
}

.technical-completion-round__badges span {
  padding: 2px 7px;
  border: 1px solid rgb(255 211 45 / 50%);
  border-radius: 999px;
  color: #7a5c00;
  font-size: 10px;
  font-weight: 800;
}

.technical-completion-round p {
  flex: 0 0 auto;
  margin: 0;
  color: var(--color-text);
  font-size: 11px;
  font-weight: 800;
  text-align: right;
}

.technical-completion-actions {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: 8px;
  margin-top: 12px;
}

.technical-completion-actions button {
  min-height: 46px;
  padding: 8px 10px;
  border: 1.5px solid var(--color-border);
  border-radius: 12px;
  color: var(--color-text);
  background: var(--color-surface);
  font-size: 12px;
  font-weight: 900;
}

.technical-completion-actions .is-primary {
  border-color: var(--color-teal);
  color: #fff;
  background: var(--color-teal);
}

.technical-config-modal,
.format-manager-modal-root {
  position: fixed;
  z-index: 622;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgb(0 0 0 / 46%);
}

.technical-config-modal .round-config-modal-panel,
.format-manager-modal-panel {
  width: min(460px, 100%);
  padding: 12px 12px calc(12px + env(safe-area-inset-bottom, 0px));
  border: 1.5px solid var(--color-border);
  border-radius: 18px 18px 0 0;
  color: var(--color-text);
  background: #edf9f7;
  box-shadow: 0 -14px 36px rgb(0 0 0 / 28%);
}

.technical-config-modal h2,
.format-manager-modal-panel h2 {
  margin: 0 0 10px;
  color: var(--color-teal);
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0;
}

.format-manager-modal-root {
  z-index: 623;
  align-items: center;
  padding: 16px;
}

.format-manager-modal-panel {
  max-height: calc(100dvh - 32px);
  overflow: auto;
  border-color: rgb(197 149 14 / 52%);
  border-radius: 18px;
  background: #fff9e8;
  transform: translateY(-12dvh);
}

.format-manager-modal-panel.is-name-editing {
  max-width: 430px;
}

.format-manager-modal-panel.is-name-editing .technical-format-name {
  margin-top: 0;
}

.format-manager-modal-panel h2 {
  color: #7a5c00;
}

.format-manager-modal-panel .technical-wheel,
.format-manager-modal-panel .vanilla-wheel {
  border-color: rgb(197 149 14 / 42%);
  background: var(--color-surface);
}

.format-manager-modal-panel .technical-wheel > i,
.format-manager-modal-panel .vanilla-wheel > i {
  border-color: rgb(197 149 14 / 44%);
  background: rgb(255 211 45 / 14%);
}

.format-manager-modal-panel .technical-wheel__viewport button[aria-selected="true"],
.format-manager-modal-panel .vanilla-wheel__viewport button.is-selected {
  color: #7a5c00;
}

.format-manager-modal-panel .technical-wheel__viewport:focus-visible,
.format-manager-modal-panel .vanilla-wheel__viewport:focus-visible {
  outline-color: #9a760b;
}

.technical-wheel {
  position: relative;
  height: 108px;
  overflow: hidden;
  border: 1.5px solid var(--color-border);
  border-radius: 12px;
  background: var(--color-input);
}

.technical-wheel > i {
  position: absolute;
  z-index: 0;
  top: 36px;
  right: 6px;
  left: 6px;
  height: 36px;
  border-top: 1.5px solid rgb(122 148 144 / 34%);
  border-bottom: 1.5px solid rgb(122 148 144 / 34%);
  background: var(--color-input);
  pointer-events: none;
}

.technical-wheel__viewport {
  position: relative;
  z-index: 1;
  height: 100%;
  box-sizing: border-box;
  padding: 36px 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  scroll-snap-type: y mandatory;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
}

.technical-wheel__viewport::-webkit-scrollbar {
  display: none;
}

.technical-wheel__viewport:focus-visible {
  outline: 2px solid var(--color-teal);
  outline-offset: -3px;
}

.technical-wheel__viewport button {
  display: flex;
  width: 100%;
  height: 36px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  color: var(--color-text);
  background: transparent;
  font-size: 14px;
  font-weight: 700;
  scroll-snap-align: center;
}

.technical-wheel__viewport button[aria-selected="true"] {
  font-size: 16px;
  font-weight: 900;
}

.technical-wheel-value {
  display: grid;
  gap: 10px;
}

.technical-wheel-value__main {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.technical-wheel-value__main > button {
  min-height: 108px;
  border: 1.5px solid var(--color-border);
  border-radius: 12px;
  color: var(--color-text);
  background: var(--color-input);
  font-size: 30px;
  font-weight: 900;
}

.technical-wheel-shortcuts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-top: 10px;
}

.technical-wheel-shortcuts button {
  height: 34px;
  padding: 2px 4px;
  border: 1.5px solid var(--color-border);
  border-radius: 10px;
  color: var(--color-text);
  background: var(--color-input);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.1;
}

.technical-counter-body .technical-wheel-shortcuts button {
  height: 42px;
  font-size: 18px;
}

.technical-rest-keyboard .technical-wheel-shortcuts button {
  font-size: 13px;
}

.technical-format-changed {
  margin: 8px 2px;
  color: var(--color-muted);
  font-size: 10px;
  font-weight: 800;
}

.technical-format-name {
  display: block;
  margin-top: 10px;
}

.technical-format-name span {
  display: block;
  margin: 0 0 4px 2px;
  color: #087f73;
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.technical-format-name input {
  width: 100%;
  height: 42px;
  box-sizing: border-box;
  padding: 0 12px;
  border: 1.5px solid color-mix(in srgb, var(--color-teal), transparent 48%);
  border-radius: 10px;
  outline: none;
  color: var(--color-text);
  caret-color: var(--color-teal);
  background: var(--color-surface);
  -webkit-user-select: text;
  user-select: text;
  font-size: 14px;
  font-weight: 900;
}

.technical-format-name-error {
  margin: 5px 2px 0;
  color: var(--color-danger);
  font-size: 10px;
  font-weight: 900;
}

.technical-format-name-error[hidden] {
  display: none;
}

.technical-format-actions {
  display: grid;
  grid-template-columns: repeat(3, 44px);
  gap: 8px;
  justify-content: end;
  margin: 10px 0 12px;
}

.technical-format-actions:has(.is-duplicate) {
  grid-template-columns: repeat(4, 44px);
}

.technical-format-actions button {
  display: grid;
  width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  place-items: center;
  border: 1.5px solid color-mix(in srgb, var(--color-teal), transparent 48%);
  border-radius: 10px;
  color: #087f73;
  background: color-mix(in srgb, var(--color-teal), transparent 88%);
  font-size: 12px;
  font-weight: 900;
}

.technical-format-actions button[hidden] {
  display: none;
}

.technical-format-actions.is-save-as-only {
  grid-template-columns: minmax(0, 1fr);
  justify-content: stretch;
}

.technical-format-actions.is-save-as-only button {
  width: 100%;
}

.technical-format-actions.is-save-as-only.is-icon-only {
  grid-template-columns: 44px;
  justify-content: end;
}

.technical-format-actions.is-save-as-only.is-icon-only button {
  width: 44px;
}

.format-manager-modal-panel .technical-wheel,
.format-manager-modal-panel .vanilla-wheel {
  height: 252px;
}

.format-manager-modal-panel .technical-wheel > i,
.format-manager-modal-panel .vanilla-wheel > i {
  top: 108px;
}

.format-manager-modal-panel .technical-wheel__viewport,
.format-manager-modal-panel .vanilla-wheel__viewport {
  padding-block: 108px;
}

.technical-format-actions .is-update {
  border-color: color-mix(in srgb, var(--color-teal), transparent 38%);
  color: #087f73;
  background: color-mix(in srgb, var(--color-teal), transparent 82%);
}

.technical-format-actions .is-delete {
  border-color: rgb(255 96 96 / 20%);
  color: var(--color-danger);
  background: rgb(255 96 96 / 7%);
}

.technical-format-actions button svg {
  display: block;
  width: 19px;
  height: 19px;
}

.technical-format-actions button:disabled {
  cursor: default;
  opacity: .35;
}

.technical-format-confirm {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.technical-format-confirm--rename {
  grid-template-columns: 1fr 1fr 1fr;
}

.technical-format-confirm button {
  min-height: 44px;
  border: 1.5px solid var(--color-border);
  border-radius: 10px;
  color: var(--color-text);
  background: var(--color-surface);
  font-size: 12px;
  font-weight: 900;
}

.technical-format-confirm button.is-confirm {
  border-color: color-mix(in srgb, var(--color-teal), transparent 38%);
  color: #087f73;
  background: color-mix(in srgb, var(--color-teal), transparent 82%);
}

.format-manager-modal-panel .technical-format-name span { color: #7a5c00; }
.format-manager-modal-panel .technical-format-name input { border-color: rgb(197 149 14 / 44%); caret-color: #7a5c00; }
.format-manager-modal-panel .technical-format-actions button { border-color: rgb(197 149 14 / 40%); color: #7a5c00; background: rgb(255 211 45 / 11%); }
.format-manager-modal-panel .technical-format-actions .is-update { border-color: rgb(197 149 14 / 44%); color: #6f5300; background: rgb(255 211 45 / 18%); }
.format-manager-modal-panel .technical-format-actions .is-delete { border-color: color-mix(in srgb, var(--editor-red), transparent 80%); color: var(--editor-red); background: color-mix(in srgb, var(--editor-red), transparent 91%); }
.format-manager-modal-panel .technical-format-confirm button.is-confirm { border-color: rgb(197 149 14 / 44%); color: #6f5300; background: rgb(255 211 45 / 18%); }

.technical-format-change-confirm {
  position: fixed;
  z-index: 624;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgb(0 0 0 / 46%);
}

.technical-format-change-confirm__panel {
  width: min(420px, 100%);
  padding: 16px;
  border: 1.5px solid color-mix(in srgb, var(--color-teal), transparent 42%);
  border-radius: 16px;
  color: var(--color-text);
  background: #eaf8f6;
  box-shadow: 0 18px 50px rgb(0 0 0 / 32%);
}

.technical-format-change-confirm__panel h3 {
  margin: 0 0 6px;
  color: #087f73;
  font-size: 17px;
  font-weight: 900;
}

.technical-format-change-confirm__panel > p {
  margin: 0 0 12px;
  color: var(--color-muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.technical-format-change-confirm__panel > p.technical-format-name-error {
  color: var(--color-danger);
}

.technical-format-change-confirm__panel > div {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.technical-format-change-confirm__panel button {
  min-height: 42px;
  border: 1.5px solid color-mix(in srgb, var(--color-teal), transparent 42%);
  border-radius: 10px;
  color: #087f73;
  background: color-mix(in srgb, var(--color-teal), transparent 86%);
  font-size: 11px;
  font-weight: 900;
}

.technical-format-change-confirm__panel button.is-discard {
  border-color: rgb(255 96 96 / 24%);
  color: var(--color-danger);
  background: rgb(255 96 96 / 8%);
}

.technical-format-change-confirm__panel button.is-save {
  border-color: var(--color-teal);
  color: #fff;
  background: var(--color-teal);
}

.technical-format-change-confirm__panel button:disabled {
  opacity: .35;
}

[data-theme="dark"] .technical-config-modal .round-config-modal-panel {
  background: rgb(11 55 49 / 98%);
}

[data-theme="dark"] .format-manager-modal-panel {
  color: var(--color-text);
  border-color: rgb(222 177 48 / 52%);
  background: rgb(50 43 19 / 98%);
}

[data-theme="dark"] .technical-format-change-confirm__panel {
  border-color: rgb(151 165 170 / 48%);
  background: rgb(31 39 42 / 98%);
}

[data-theme="dark"] .technical-format-button {
  border-color: color-mix(in srgb, var(--color-yellow), transparent 44%);
  color: var(--color-text);
  background: color-mix(in srgb, var(--color-yellow), transparent 82%);
}

[data-theme="dark"] .technical-format-button b,
[data-theme="dark"] .technical-format-change-confirm__panel h3 {
  color: #f0cf66;
}

[data-theme="dark"] .format-manager-modal-panel .technical-wheel,
[data-theme="dark"] .format-manager-modal-panel .vanilla-wheel {
  border-color: rgb(222 177 48 / 52%);
  background: rgb(61 53 25 / 96%);
}

[data-theme="dark"] .format-manager-modal-panel .technical-wheel > i,
[data-theme="dark"] .format-manager-modal-panel .vanilla-wheel > i {
  border-color: rgb(222 177 48 / 52%);
  background: rgb(101 84 28 / 96%);
}

[data-theme="dark"] .format-manager-modal-panel h2,
[data-theme="dark"] .technical-format-name span {
  color: #f0cf66;
}

[data-theme="dark"] .technical-round-summary,
[data-theme="dark"] .technical-rounds-button {
  color: var(--color-yellow);
}

[data-theme="dark"] .technical-series-row__rest,
[data-theme="dark"] .technical-rest-row,
[data-theme="dark"] .technical-keyboard__side .is-previous,
[data-theme="dark"] .technical-rest-choice__panel > div > button {
  color: #f4d36b;
}

[data-theme="dark"] .technical-completion-round {
  border-color: rgb(244 211 107 / 34%);
  background: rgb(244 211 107 / 8%);
}

[data-theme="dark"] .technical-completion-round strong,
[data-theme="dark"] .technical-completion-round__badges span {
  color: #f4d36b;
}

[data-theme="dark"] .technical-score-cell.is-active {
  box-shadow: 0 0 0 4px rgb(255 255 255 / 14%);
}

@media (min-width: 768px) {
  .technical-editor-title h1 {
    font-size: 20px;
  }

  .technical-editor-title p {
    font-size: 13px;
  }

  .technical-config-modal {
    align-items: center;
    padding: 32px;
  }

  .technical-config-modal .round-config-modal-panel {
    width: min(460px, calc(100vw - 64px));
    border-radius: 18px;
  }

  .format-manager-modal-panel {
    transform: none;
  }
}

@media (max-width: 767px) {
  html.keyboard-open .format-manager-modal-root,
  html:not(.is-standalone) .format-manager-modal-root {
    top: var(--visual-viewport-offset-top, 0px);
    bottom: auto;
    height: var(--visual-viewport-height, 100dvh);
    padding: 12px;
  }

  html.keyboard-open .format-manager-modal-panel,
  html:not(.is-standalone) .format-manager-modal-panel {
    max-height: calc(var(--visual-viewport-height, 100dvh) - 24px);
    overflow: auto;
    transform: none;
  }

  .format-manager-modal-root.is-name-editing {
    top: var(--visual-viewport-offset-top, 0px);
    bottom: auto;
    height: var(--visual-viewport-height, 100dvh);
    align-items: flex-start;
    padding-top: max(12px, env(safe-area-inset-top));
  }

  .format-manager-modal-panel.is-name-editing {
    max-height: calc(var(--visual-viewport-height, 100dvh) - max(24px, env(safe-area-inset-top)));
    margin-top: 0;
    transform: none;
  }

  .technical-format-name input {
    scroll-margin-block: 18px;
  }

  .technical-editor-root {
    display: block;
    width: 100%;
    height: 100lvh;
    padding: 0;
    overflow: hidden;
    background: var(--record-editor-bg, var(--color-surface));
  }

  .technical-editor-root > .record-editor-backdrop,
  .technical-editor-root > .technical-modal-panel > .chat-modal-handle {
    display: none;
  }

  .technical-editor-root .technical-modal-panel {
    width: 100%;
    height: var(--visual-viewport-height, 100dvh) !important;
    min-height: var(--visual-viewport-height, 100dvh) !important;
    max-height: var(--visual-viewport-height, 100dvh) !important;
    padding-right: 0 !important;
    padding-bottom: 0 !important;
    padding-left: 0 !important;
    padding-top: env(safe-area-inset-top, 0px) !important;
    border-radius: 0;
    box-shadow: none;
  }

  .technical-editor-title {
    padding: 10px 4px 16px;
  }

  .technical-entry-toolbar {
    grid-template-columns: minmax(90px, 1.25fr) minmax(52px, .8fr) minmax(62px, .9fr) minmax(68px, 1fr) 36px;
  }

  .technical-entry-toolbar--actions {
    grid-template-columns: minmax(90px, 180px) 36px;
  }

  .technical-entry-toolbar--compact {
    grid-template-columns: minmax(68px, 96px) minmax(0, 1fr) auto 40px 40px;
  }

  .technical-entry-toolbar--editor {
    padding: 12px 16px 14px 8px;
  }

  .technical-entry-toolbar__content {
    grid-template-columns: minmax(92px, 130px) minmax(72px, 1fr) auto;
  }

  .technical-entry-toolbar--compact .technical-rounds-button {
    width: 40px;
    height: 38px;
  }

  .technical-round-summary {
    align-items: flex-start;
  }

  .technical-round-summary__stats {
    align-self: center;
    font-size: 10px;
  }

  .technical-score-cells {
    grid-template-columns: repeat(var(--score-cell-columns, 6), minmax(22px, 32px));
  }

  .technical-keyboard {
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  .technical-config-modal .round-config-modal-panel {
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  }
}

@media (max-width: 390px) {
  .technical-entry-toolbar {
    grid-template-columns: minmax(78px, 1fr) 58px 65px 72px 34px;
    gap: 3px;
    padding: 6px 4px;
  }

  .technical-entry-toolbar--actions {
    grid-template-columns: minmax(78px, 160px) 34px;
  }

  .technical-entry-toolbar--compact {
    grid-template-columns: minmax(64px, 78px) minmax(0, 1fr) auto 38px 38px;
  }

  .technical-entry-toolbar--editor {
    padding: 12px 16px 14px 4px;
  }

  .technical-entry-toolbar__content {
    grid-template-columns: minmax(88px, 120px) minmax(68px, 1fr) auto;
  }

  .technical-entry-toolbar--compact .technical-rounds-button {
    width: 38px;
    height: 36px;
  }

  .technical-entry-toolbar > span,
  .technical-entry-toolbar > strong,
  .technical-entry-toolbar__content > span,
  .technical-entry-toolbar__content > strong,
  .technical-format-button {
    font-size: 11px;
  }

  .technical-entry-toolbar--editor .technical-entry-toolbar__total,
  .technical-entry-toolbar--editor .technical-entry-toolbar__content > strong {
    font-size: 12px;
  }

  .technical-round-summary {
    gap: 4px;
    padding-right: 6px;
    padding-left: 6px;
  }

  .technical-round-summary__copy {
    gap: 4px;
  }
}
