:root {
  font-family: system-ui, sans-serif;
  color-scheme: dark;
  color: #e1e7ef;
  background: #1a1b1e;
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
}
body {
  height: 100dvh;
  display: flex;
  flex-direction: column;
}
button,
input,
textarea {
  font: inherit;
}
button {
  background: #293546;
  color: #e6edf7;
  border: 1px solid #4b5a70;
  border-radius: 6px;
  padding: 9px 12px;
  cursor: pointer;
}
button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
button.on {
  background: #20c5d8;
  color: #092b31;
  border-color: #20c5d8;
}
button.danger {
  background: #512e38;
  border-color: #82515e;
}
input,
textarea {
  background: #131c28;
  border: 1px solid #4d607a;
  color: #e1edf9;
  border-radius: 6px;
  padding: 10px;
  min-width: 0;
}
button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid #65dfec;
  outline-offset: 2px;
}
#app {
  width: 100%;
  max-width: 750px;
  margin: 0 auto;
  flex: 1;
  min-height: 0;
  padding: 4px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
#status {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  background: #263d52;
  border: 1px solid #6790b3;
  border-radius: 6px;
  padding: 10px 15px;
  max-width: 90vw;
  font-size: 13px;
  pointer-events: none;
}
#status:empty {
  display: none;
}
.num {
  font-family: ui-monospace, "DejaVu Sans Mono", monospace;
  font-variant-numeric: tabular-nums;
}
.row {
  display: flex;
  gap: 7px;
  align-items: center;
}
.toolbar button {
  flex: 1;
  white-space: nowrap;
  font-size: 12px;
}
.tabs button {
  flex: 1;
  font-family: monospace;
  font-size: 17px;
}
.panel {
  border: 1px solid #3d495c;
  background: #202833;
  border-radius: 9px;
  padding: 12px;
}
.panel-head {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #a9bbd0;
  margin-bottom: 14px;
}
.five,
.roster {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}
.card {
  min-width: 0;
  text-align: center;
  position: relative;
}
.card .name {
  display: block;
  font-size: 10px;
  color: #b9c9da;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 11px;
}
.slot-no {
  font-size: 10px;
  color: #a9bbce;
  display: block;
  margin-bottom: 7px;
}
.portrait {
  display: block;
  position: relative;
  aspect-ratio: 1;
  width: 100%;
  padding: 0;
  border: 1px solid #7a879b;
  border-radius: 5px;
  overflow: visible;
  background: #263041;
  isolation: isolate;
}
.face {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}
.badge {
  position: absolute;
  pointer-events: none;
  z-index: 2;
  display: block;
  object-fit: contain;
}
.weapon {
  width: 29%;
  height: 29%;
  left: -6%;
  top: -7%;
}
.burst {
  width: 29%;
  height: 29%;
  left: -6%;
  top: 33%;
}
.element {
  width: 31%;
  height: 35%;
  right: -5%;
  bottom: -7%;
}
.cube {
  width: 30%;
  height: 30%;
  left: -5%;
  bottom: -6%;
  position: absolute;
  z-index: 4;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  border-radius: 3px;
}
.cube img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.cube small {
  position: absolute;
  bottom: 1px;
  font: 700 8px monospace;
  color: #fff;
  text-shadow: 0 1px 2px #000;
}
.cube.quantum small {
  color: #111;
  text-shadow: none;
}
.cube.add {
  background: #293b4b;
  border: 1px solid #68809a;
  font-size: 19px;
  line-height: 1;
  color: #c2d7eb;
}
.speed {
  position: absolute;
  right: 0;
  top: 0;
  background: #080c12;
  color: #fff;
  z-index: 5;
  font: 700 10px/1.3 monospace;
  padding: 1px 3px;
  border: 1px solid #394653;
  border-radius: 2px;
}
.link {
  position: absolute;
  left: 50%;
  top: -8px;
  transform: translateX(-50%);
  width: 27%;
  height: 31%;
  background: transparent;
  z-index: 6;
  padding: 0;
  border: 0;
  display: grid;
  place-items: center;
}
.link-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  background: #fff;
  clip-path: polygon(50% 0, 94% 25%, 94% 75%, 50% 100%, 6% 75%, 6% 25%);
  pointer-events: none;
}
.link-mark::before {
  content: "";
  position: absolute;
  inset: 2px;
  background: #58606b;
  clip-path: inherit;
}
.link.caster .link-mark::before {
  background: #1976d2;
}
.link.target .link-mark::before {
  background: #df3f43;
}
.link.add .link-mark::before {
  background: #9b7b21;
}
.link svg {
  width: 65%;
  height: 65%;
  position: relative;
  color: white;
}
.portrait > .favorite-stage {
  position: absolute;
  right: 1px;
  top: 56%;
  z-index: 4;
  padding: 1px 3px;
  border-radius: 3px;
  background: #2b2114;
  color: #ffe09a;
  font: 700 clamp(7px, 1.9vw, 9px)/1.25 system-ui, sans-serif;
  white-space: nowrap;
  pointer-events: none;
}
.current-party .face {
  filter: saturate(0.48) brightness(0.97);
}
.used-label {
  position: absolute;
  right: -2px;
  top: -2px;
  background: #243244;
  border: 1px solid #a4b7c8;
  color: white;
  border-radius: 3px;
  font: 700 10px monospace;
  padding: 2px 3px;
  z-index: 8;
}
.catalog {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.catalog input {
  width: 100%;
}
.catalog .panel-head {
  margin: 0;
}
.hint {
  font-size: 11px;
  color: #a0b2c8;
  line-height: 1.6;
}
.filters .stage {
  flex: 1;
  font:
    700 22px Georgia,
    serif;
}
.filters .more {
  background: #20c5d8;
  border-color: #20c5d8;
  border-radius: 50%;
  width: 35px;
  height: 35px;
  padding: 0;
  display: grid;
  place-items: center;
}
.more svg {
  width: 22px;
  height: 22px;
}
.roster {
  overflow: auto;
  min-height: 0;
  flex: 1;
  align-content: start;
  overscroll-behavior: contain;
  scrollbar-color: #42b4c7 #17202d;
  padding: 10px 6px;
  row-gap: 20px;
}
.roster .card .portrait {
  max-width: 70px;
  margin: auto;
}
.roster .name {
  font-size: 9px;
}
.empty {
  display: grid;
  place-items: center;
  border: 1px dashed #56667c;
  color: #8aa1b9;
}
.mode {
  font-size: 12px;
  color: #c5e6f2;
  background: #203f50;
  padding: 8px;
  border-radius: 5px;
}
.mode button {
  font-size: 11px;
  padding: 5px 8px;
}
.remove {
  margin-top: 8px;
  font-size: 11px;
  padding: 5px;
  width: 100%;
}
.dragging {
  opacity: 0.35;
}
.drop-target {
  outline: 2px dashed #f0b853;
  outline-offset: 2px;
}
.drag-ghost {
  position: fixed;
  z-index: 1000;
  pointer-events: none;
  width: 70px;
  height: 70px;
  transform: translate(-50%, -50%);
  opacity: 0.85;
}
dialog {
  color: #e1e7ef;
  background: #1d2838;
  border: 1px solid #5b6d85;
  border-radius: 12px;
  width: min(460px, calc(100vw - 24px));
  max-width: none;
  max-height: calc(100dvh - 24px);
  padding: 20px;
}
/* 버전 이름만 한 줄로 줄이고 설명·계산 수치·오류 원문은 보존합니다. */
.engine-version-label{display:inline-block;max-width:min(45vw,320px);min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;vertical-align:bottom}
.engine-version-title{display:flex;align-items:baseline;gap:.25em;min-width:0}.engine-version-caption{flex:none;white-space:nowrap}.engine-version-title>.engine-version-label{flex:0 1 auto;max-width:100%}dialog .engine-version-heading{min-width:0}
.victory-progress .dialog-head h2,.victory-title-state{min-width:0}.victory-title-state>.engine-version-label{flex:0 1 auto;max-width:100%}.victory-title-state>.victory-completion{flex:none;white-space:nowrap}
dialog::backdrop {
  background: #050a14c9;
}
dialog .dialog-head {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #41536a;
  padding-bottom: 15px;
  margin-bottom: 15px;
}
dialog h2 {
  font-size: 19px;
  margin: 0;
  flex: 1;
}
dialog .close {
  padding: 4px 8px;
  background: transparent;
  border: 0;
  font-size: 22px;
}
dialog label {
  display: block;
  font-size: 13px;
  margin-bottom: 7px;
}
dialog input,
dialog textarea {
  width: 100%;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
}
.full-dialog {
  width: calc(100vw - 24px);
  height: calc(100dvh - 24px);
  overflow: hidden;
  padding: 16px;
}
.full-dialog[open] {
  display: flex;
  flex-direction: column;
}
.dialog-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
}
.header-card {
  width: 70px;
  flex-shrink: 0;
  margin: 6px;
}
.filter-group {
  margin-bottom: 18px;
}
.filter-group .row {
  flex-wrap: wrap;
}
.filter-group button {
  font-size: 12px;
  flex: 1;
}
.cube-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}
.cube-choice {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  padding: 10px;
  font-size: 18px;
}
.cube-choice img {
  width: 80px;
  height: 80px;
  flex: none;
  object-fit: contain;
}
.radio {
  width: 17px;
  height: 17px;
  border: 2px solid #8bacc4;
  border-radius: 50%;
  flex: none;
}
.on .radio {
  background: #20c5d8;
  box-shadow: inset 0 0 0 3px #264656;
}
.gear-line {
  width: 100%;
  display: flex;
  justify-content: space-between;
  margin: 8px 0;
  padding: 12px;
}
.values {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
}
.values button {
  font-family: monospace;
}
.summary {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  line-height: 26px;
  margin-bottom: 12px;
}
.summary strong {
  font-size: 15px;
}
.saved-dialog {
  width: min(760px, calc(100vw - 24px));
  height: calc(100dvh - 24px);
}
.saved-card {
  padding: 14px;
  border: 1px solid #40516a;
  border-radius: 8px;
  margin-bottom: 15px;
}
.saved-heading {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: space-between;
  margin-bottom: 18px;
}
.saved-heading strong {
  font-size: 15px;
}
.saved-heading .row {
  margin-left: auto;
}
.saved-heading button {
  font-size: 11px;
  padding: 7px 9px;
}
.preview {
  max-width: 470px;
  margin: auto;
  display: grid;
  gap: 19px;
  padding: 7px;
}
.preview-row {
  display: grid;
  grid-template-columns: 20px repeat(5, minmax(0, 1fr));
  gap: 10px;
  align-items: center;
}
.preview-row > span {
  font: 11px monospace;
  color: #a9bbce;
}
.preview .card .name {
  display: none;
}
.preview .portrait {
  max-width: none;
}
.saved-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
}
.saved-actions button {
  font-size: 12px;
}
.json {
  font: 12px/1.6 monospace;
  white-space: pre;
  min-height: 150px;
  resize: vertical;
}
.share-view canvas {
  display: block;
  max-width: 100%;
  height: auto;
  margin: auto;
}
.share-view {
  overflow: auto;
  min-height: 0;
  flex: 1;
}
.file {
  border: 1px dashed #546d89;
  padding: 13px;
  margin-top: 12px;
  border-radius: 7px;
}
#save-name {
  margin-bottom: 6px;
}
@media (min-width: 700px) {
  .editor .five {
    max-width: 550px;
    margin: auto;
  }
  .editor .portrait {
    max-width: 90px;
    margin: auto;
  }
  .catalog .roster {
    width: 100%;
    max-width: 570px;
    align-self: center;
  }
}
@media (max-width: 500px) {
  #app {
    gap: 8px;
    padding: 2px 12px 10px;
  }
  .toolbar button {
    font-size: 10px;
    padding: 9px 5px;
  }
  .panel {
    padding: 10px;
  }
  .five {
    gap: 8px;
  }
  .cube small {
    font-size: 6px;
  }
  .speed {
    font-size: 8px;
  }
  .card .name {
    font-size: 9px;
  }
  .cube-options {
    grid-template-columns: 1fr;
    gap: 5px;
  }
  .cube-choice {
    padding: 6px 10px;
    font-size: 16px;
  }
  .cube-choice img {
    width: 60px;
    height: 60px;
  }
  .full-dialog {
    padding: 12px;
  }
  .saved-card {
    padding: 11px 8px;
  }
  .saved-heading strong {
    width: 100%;
  }
  .preview-row {
    gap: 7px;
  }
  .header-card {
    width: 62px;
  }
  .json {
    font-size: 11px;
  }
}

.portrait[role="button"] {
  cursor: pointer;
}
.used .portrait {
  cursor: not-allowed;
}
.preview button:disabled,
.header-card button:disabled {
  opacity: 1;
  cursor: default;
}
.preview .portrait {
  pointer-events: none;
}
.saved-dialog > .row {
  margin-bottom: 14px;
}
.tabs button,
.editor .portrait {
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}
.drag-ghost > .portrait {
  width: 70px;
  height: 70px;
}
.drag-ghost > button {
  width: 70px;
  height: 55px;
}
.dragging {
  cursor: grabbing;
}
.burst {
  background: #f5f7fa;
  clip-path: polygon(50% 0, 93.3% 25%, 93.3% 75%, 50% 100%, 6.7% 75%, 6.7% 25%);
  display: grid;
  place-items: center;
}
.burst:before {
  content: "";
  position: absolute;
  inset: 1px;
  background: #0b0d10;
  clip-path: inherit;
}
.burst-glyph {
  position: relative;
  z-index: 1;
  width: 58%;
  height: 65%;
  object-fit: contain;
  filter: brightness(0) invert(1);
}
.saved-heading strong,
.panel-head strong {
  overflow-wrap: anywhere;
  min-width: 0;
}
body {
  height: var(--view-height, 100dvh);
}
dialog {
  max-height: calc(var(--view-height, 100dvh) - 24px);
}
.full-dialog,
.saved-dialog {
  height: calc(var(--view-height, 100dvh) - 24px);
}
/* 버텀과 같은 총기 육각 테두리와 검은 내부를 사용합니다. */
.weapon {
  background: #f5f7fa;
  clip-path: polygon(50% 0, 93.3% 25%, 93.3% 75%, 50% 100%, 6.7% 75%, 6.7% 25%);
  display: grid;
  place-items: center;
  z-index: 6;
}
.weapon:before {
  content: "";
  position: absolute;
  inset: 1px;
  background: #0b0d10;
  clip-path: inherit;
}
.weapon-glyph {
  position: relative;
  z-index: 1;
  width: 92%;
  height: 92%;
  object-fit: contain;
  filter: brightness(0) invert(1);
}
.speed {
  top: 9px;
  right: -4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 36px;
  min-height: 28px;
  padding: 3px 4px;
  font-size: 16px;
  line-height: 1.2;
  border: 1px solid #98c3d4;
  border-radius: 8px;
  box-shadow: 0 1px 4px #0009;
  cursor: pointer;
}
.speed:not(:disabled)::after {
  content: "▾";
  font: 9px/1 system-ui;
  color: #a2e5ef;
}
.speed:not(:disabled):hover {
  background: #183647;
  border-color: #58e0ef;
}
.speed:not(:disabled):active {
  background: #235169;
}
.speed:disabled {
  cursor: default;
}
@media (max-width: 500px) {
  .speed {
    font-size: 14px;
    min-width: 34px;
    min-height: 26px;
    gap: 2px;
  }
}

/* 키보드가 줄인 시각적 뷰포트 안에 화면 전체를 고정합니다. */
body {
  position: fixed;
  top: var(--view-top, 0px);
  left: 0;
  right: 0;
  width: 100%;
  height: var(--view-height, 100dvh);
}
body > .page-nav,
.toolbar,
.tabs,
.editor {
  flex: 0 0 auto;
}
#app {
  gap: 6px;
  padding-top: 2px;
  padding-bottom: 8px;
}
.toolbar button {
  padding: 0 8px;
  min-height: 20px;
  line-height: 18px;
}
.tabs button {
  padding: 0 8px;
  min-height: 22px;
  line-height: 20px;
}
.editor {
  padding: 12px 10px 14px;
}
.editor .panel-head {
  margin-bottom: 12px;
}
.catalog {
  padding: 10px;
  gap: 7px;
  overflow: hidden;
}
.catalog .panel-head,
.search-controls {
  flex: 0 0 auto;
}
.search-controls {
  gap: 5px;
  min-width: 0;
  flex-wrap: nowrap;
}
.search-controls #search {
  width: 0;
  flex: 1 1 0;
  min-width: 0;
  padding: 6px;
  font-size: 16px;
  height: 35px;
}
.search-controls .stage {
  flex: 0 0 30px;
  min-width: 30px;
  padding: 0;
  height: 35px;
}
.search-controls .more {
  flex: 0 0 35px;
}
.catalog .roster {
  width: 100%;
  min-height: 0;
  margin: 0;
  overscroll-behavior: contain;
  touch-action: pan-y;
}

dialog {
  position: fixed;
  top: var(--view-center, 50%);
  bottom: auto;
  left: 0;
  right: 0;
  margin: 0 auto;
  transform: translateY(-50%);
}
#status {
  bottom: auto;
  top: calc(var(--view-top, 0px) + var(--view-height, 100dvh) - 56px);
}
@media (max-width: 500px) {
  .toolbar button {
    padding: 0 5px;
    min-height: 20px;
    line-height: 18px;
  }
}

/* 기본은 전체 해제이며 선택한 버스트만 원형으로 강조합니다. */
.search-controls .stage {
  width: 32px;
  min-width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border-radius: 50%;
  font-family: Arial, sans-serif;
  font-size: 18px;
  font-weight: 500;
  line-height: 1;
  display: grid;
  place-items: center;
}
/* 큐브는 비율 대신 충분히 큰 고정 크기와 클릭 영역을 제공합니다. */
.cube {
  width: 40px;
  height: 40px;
  left: -6px;
  bottom: -14px;
}
.cube small {
  inset: 0;
  display: grid;
  place-items: center;
  font: 800 10px/1 monospace;
  text-shadow: 0 1px 2px #000;
}
.cube.quantum small {
  text-shadow: 0 1px 1px #fff8;
}
.cube.add {
  font-size: 29px;
}
.editor {
  padding-bottom: 25px;
}
.header-card {
  margin-bottom: 17px;
}
.no-cube-icon {
  width: 80px;
  height: 80px;
  flex: none;
  display: grid;
  place-items: center;
  border: 1px dashed #7791aa;
  border-radius: 6px;
  font: 24px/1 sans-serif;
  color: #b5c7db;
}
.speed {
  top: -12px;
  right: -4px;
  background: rgba(8, 12, 18, 0.72);
}
.editor .speed {
  top: -32px;
  right: -2px;
}
.editor .panel-head {
  margin-bottom: 36px;
}
.speed:not(:disabled):hover {
  background: rgba(24, 54, 71, 0.9);
}
@media (max-width: 500px) {
  .editor .speed {
    top: -28px;
  }
  .no-cube-icon {
    width: 60px;
    height: 60px;
  }
}
/* 검색 이름은 사진 바로 아래에서 두 줄까지만 사용합니다. */
.roster {
  row-gap: 10px;
}
.roster .card .name {
  margin-top: 2px;
  white-space: normal;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  overflow-wrap: anywhere;
  text-overflow: ellipsis;
  font-size: 10px;
  line-height: 12px;
  min-height: 24px;
  max-height: 24px;
}

/* 배지는 초상화 모서리에 겹치며 별도 윗줄을 만들지 않습니다. */
.editor .speed {
  top: -5px;
  right: -3px;
}
.cube {
  left: calc(8.5% - 20px);
  bottom: -12px;
}
.cube.add {
  width: 13.3333px;
  height: 13.3333px;
  min-width: 0;
  min-height: 0;
  padding: 0;
  font-size: 12px;
  line-height: 1;
  left: calc(8.5% - 6.6667px);
  bottom: -4px;
}
#app {
  padding-left: 6px;
  padding-right: 6px;
  gap: 6px;
}
.editor,
.catalog {
  border: 0;
  border-radius: 0;
  background: transparent;
}
.editor {
  padding: 10px 9px 8px;
}
.editor .five {
  max-width: none;
  width: 100%;
}
.editor .portrait {
  width: 100%;
  max-width: none;
  margin: 0;
}
.catalog {
  padding: 0;
  gap: 6px;
}
.catalog .roster {
  max-width: none;
  padding: 4px 4px;
  row-gap: 6px;
}

/* 검색 중에는 초상화를 줄이지 않고 상단 두 줄만 위로 이동합니다. */
.search-mode body > .page-nav {
  margin-top: var(--nav-slide);
  visibility: hidden;
  pointer-events: none;
}
.search-mode .toolbar {
  margin-top: var(--toolbar-slide);
  visibility: hidden;
  pointer-events: none;
}
.editor .portrait,
.page-nav,
.toolbar {
  transition: none;
}

/* 편성 탭과 검색 결과는 캐릭터 자리와 구분하여 표시합니다. */
.tabs {
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
}
.search-mode .tabs {
  margin-top: 0;
}
.tabs button {
  flex: 0 0 42px;
  width: 42px;
}
#search {
  appearance: none;
  -webkit-appearance: none;
}
#search:focus,
#search:focus-visible {
  outline: none;
  border-color: #65dfec;
  box-shadow: inset 0 0 0 1px #65dfec;
}
.cube.add {
  width: 20px;
  height: 20px;
  font-size: 17px;
  left: calc(8.5% - 10px);
  bottom: -2px;
}
.speed {
  justify-content: flex-end;
  text-align: right;
}
.speed:not(:disabled)::after {
  content: none;
  display: none;
}
.editor .card .name {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  white-space: normal;
  overflow: hidden;
  overflow-wrap: anywhere;
  text-overflow: ellipsis;
  margin-top: 7px;
  font-size: 10px;
  line-height: 12px;
  max-height: 24px;
}
.link {
  left: 34%;
  width: 24px;
  height: 27px;
}
.portrait.jackal-linked {
  border-color: #df3f43;
  box-shadow: 0 0 0 1px #df3f43;
}

.speed-presets {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
  margin: 14px 0 16px;
}
.speed-presets button {
  padding: 8px 2px;
  font-size: 13px;
}

/* 현재 편집 중인 파티의 선택 상태를 표시합니다. */
.current-party .portrait {
  border-color: #20c5d8;
  box-shadow: 0 0 0 2px rgba(32, 197, 216, 0.8);
}
.current-party .used-label {
  left: auto;
  right: -3px;
  top: -2px;
  transform: none;
  background: #20c5d8;
  border-color: #20c5d8;
  border-radius: 0;
  color: #092a31;
  font-size: 13px;
}

.used-divider {
  grid-column: 1 / -1;
  border-top: 1px solid #657385;
  margin-top: 8px;
  padding: 8px 0 3px;
  color: #aeb9ca;
  font-size: 11px;
  text-align: left;
}
.share-dialog {
  width: 100vw;
  max-width: 100vw;
  height: var(--view-height, 100dvh);
  max-height: var(--view-height, 100dvh);
  margin: 0;
  padding: 8px 0;
  border: 0;
  border-radius: 0;
}
.share-dialog .dialog-head {
  flex: none;
  gap: 8px;
  padding: 0 8px 6px;
  margin-bottom: 0;
}
.share-dialog .dialog-head h2,
.share-dialog .share-download,
.share-dialog .share-export,
.share-dialog .close {
  font-size: 19px;
  line-height: 24px;
}
.share-dialog .share-download,
.share-dialog .share-export {
  white-space: nowrap;
  padding: 4px 6px;
}
.share-dialog .share-export {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #293546;
  color: #e6edf7;
  border: 1px solid #4b5a70;
  border-radius: 6px;
  text-decoration: none;
  cursor: pointer;
}
.share-dialog .share-export-error:not([hidden]) {
  flex: none;
  margin: 4px 8px;
  color: #ff9ca7;
  font-size: 13px;
}
.share-dialog .dialog-head .close {
  width: auto;
  min-width: 50px;
  min-height: 34px;
  padding: 4px 6px;
  white-space: nowrap;
  background: #293546;
  border: 1px solid #4b5a70;
  border-radius: 6px;
}
.share-dialog .share-view {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.share-view canvas {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  flex: none;
  object-fit: contain;
  margin: 0;
}
.share-board {
  width: 410px;
  background: #1a1b1e;
  padding: 12px 9px 8px;
  box-sizing: border-box;
}
.share-board h3 {
  text-align: center;
  font-size: 16px;
  margin: 0 0 12px;
  overflow-wrap: anywhere;
}
.share-board .five {
  margin-bottom: 9px;
}
.share-board .portrait {
  width: 100%;
  max-width: none;
  container-type: inline-size;
}
.share-burst-charge {
  position: absolute;
  left: 26.5%;
  right: 26.5%;
  bottom: -1px;
  z-index: 3;
  display: flex;
  justify-content: center;
  pointer-events: none;
}
.share-burst-value {
  flex: none;
  padding: 1px 2px;
  border-radius: 2px;
  background: rgba(0, 0, 0, .75);
  color: #fff;
  font: 700 clamp(8px, 2.4vw, 10px)/1.15 monospace;
  font-size: min(calc(clamp(8px, 2.4vw, 10px) * .95), calc(14.4032cqw - 1.2258px));
  white-space: nowrap;
}
.share-board .card .name {
  min-height: 24px;
}

.burst-frame {
  height: 17px;
  line-height: 14px;
  margin-bottom: 0;
  text-align: center;
  color: #ff4b54;
  font-weight: 800;
  font-size: 14px;
}

.burst-frame {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
}
.frame-value {
  flex: 0 0 auto;
}
.frame-note {
  flex: 0 0 auto;
  color: #aeb9ca;
  font:
    400 9px/14px system-ui,
    sans-serif;
}

.editor .five {
  position: relative;
}
.burst-frame {
  transform: translateY(-5px);
}
.jackal-frame-note {
  position: absolute;
  top: -3px;
  right: 0;
  text-align: right;
  pointer-events: none;
}
.jackal-frame-note.above-frame {
  top: -15px;
}
.jackal-frame-note .frame-note {
  display: block;
  text-align: right;
  font-size: 9px;
  line-height: 14px;
  white-space: nowrap;
}
.editor:not(.share-board) {
  padding-top: 4px;
  padding-bottom: 1px;
}
.editor:not(.share-board) .card .name {
  margin-top: 3px;
  display: block;
  white-space: nowrap;
  -webkit-line-clamp: unset;
  line-clamp: unset;
  min-height: 0;
  max-height: 12px;
  text-overflow: ellipsis;
}
.editor .card .name {
  margin-top: 4px;
}

/* 저장 목록 안에서만 초상화 크기에 비례하여 장비 표시를 축소합니다. */
.saved-dialog {
  --saved-preview-row-gap: 19px;
  --saved-preview-slot-gap: 7px;
}
.saved-dialog .dialog-scroll {
  touch-action: pan-y;
}
.saved-preview:empty {
  /* 5×5 정사각형 초상화의 높이에 가로·세로 간격 차이를 더합니다. */
  aspect-ratio: 1;
  box-sizing: content-box;
  padding-bottom: calc(4 * (var(--saved-preview-row-gap) - var(--saved-preview-slot-gap)));
}
.saved-dialog .saved-import {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  line-height: 1;
}
.saved-dialog .saved-import svg {
  display: block;
  width: 1em;
  height: 1em;
}
.saved-dialog .preview {
  max-width: none;
  width: 100%;
  padding: 7px;
  gap: var(--saved-preview-row-gap);
}
.saved-dialog .preview-row {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--saved-preview-slot-gap);
}
.saved-dialog .preview .portrait {
  container-type: inline-size;
}
.saved-dialog .preview .speed {
  top: -6%;
  right: -3%;
  width: 54%;
  height: 36%;
  min-width: 0;
  min-height: 0;
  padding: 1% 4%;
  gap: 0;
  font-size: 20cqw;
  line-height: 1;
  border-radius: 11cqw;
}
.saved-dialog .preview .cube {
  width: 57%;
  height: 57%;
  left: -20%;
  bottom: -17%;
}
.saved-dialog .preview .cube small {
  font-size: 14cqw;
}
.saved-dialog .preview .evaluation-burst-charge {
  left: 29%;
  right: 26%;
  z-index: 3;
}
.saved-dialog .preview .evaluation-burst-value {
  font-size: min(11cqw, 8px);
  padding-left: .5px;
  padding-right: .5px;
}
.saved-dialog .preview .link {
  width: 34%;
  height: 38%;
  top: -11%;
}

/* 상세 필터는 별도 전체 화면에서 아이콘과 이름을 함께 표시합니다. */
.filter-dialog {
  width: 100vw;
  max-width: 100vw;
  height: var(--view-height, 100dvh);
  max-height: var(--view-height, 100dvh);
  margin: 0;
  border: 0;
  border-radius: 0;
  padding: 12px;
}
.filter-dialog .dialog-head {
  flex: none;
  margin-bottom: 8px;
  padding-bottom: 8px;
}
.filter-dialog .filter-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.filter-dialog .filter-group {
  margin: 0;
}
.filter-dialog .filter-group h3 {
  margin: 0 0 6px;
  font-size: 14px;
  line-height: 18px;
  font-weight: 600;
}
.filter-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}
.filter-corporation .filter-options {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.filter-dialog .filter-option {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
  min-height: 38px;
  gap: 6px;
  padding: 6px;
  font-size: 13px;
  line-height: 18px;
}
.filter-label {
  white-space: nowrap;
  word-break: keep-all;
}
.filter-icon {
  flex: none;
  width: 20px;
  height: 20px;
  object-fit: contain;
}
.filter-corporation .filter-icon {
  width: 34px;
  height: 22px;
}
.filter-monochrome {
  filter: brightness(0) invert(1);
}
.filter-option.on .filter-monochrome {
  filter: brightness(0);
}
.filter-dialog .dialog-actions {
  flex: none;
  margin-top: 8px;
}
@media (min-width: 700px) {
  .filter-dialog .filter-options {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  .filter-dialog .filter-class .filter-options {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .filter-dialog .filter-weapon .filter-options {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

.filter-dialog .dialog-head h2 {
  font-size: 18px;
}
.filter-dialog .dialog-actions button {
  padding: 7px 10px;
  font-size: 14px;
  line-height: 18px;
}
@media (max-height: 600px) {
  .filter-dialog {
    padding: 8px;
  }
  .filter-dialog .dialog-head {
    margin-bottom: 6px;
    padding-bottom: 6px;
  }
  .filter-dialog .dialog-head h2 {
    font-size: 16px;
  }
  .filter-dialog .filter-body {
    gap: 8px;
  }
  .filter-dialog .filter-group h3 {
    margin-bottom: 4px;
    font-size: 13px;
    line-height: 16px;
  }
  .filter-dialog .filter-option {
    min-height: 30px;
    padding: 4px;
    gap: 5px;
    font-size: 12px;
    line-height: 16px;
  }
  .filter-dialog .filter-icon {
    width: 16px;
    height: 16px;
  }
  .filter-dialog .filter-corporation .filter-icon {
    width: 28px;
    height: 18px;
  }
  .filter-dialog .dialog-actions {
    margin-top: 6px;
  }
  .filter-dialog .dialog-actions button {
    padding: 5px 8px;
    font-size: 13px;
    line-height: 16px;
  }
}

/* 평가 화면 안에서만 다섯 파티와 승률을 한 화면에 맞춥니다. */
.toolbar:has(button:nth-child(6)) {
  gap: 4px;
}
.toolbar:has(button:nth-child(6)) button {
  padding-inline: 3px;
  min-width: 0;
  font-size: clamp(9px, 2.7vw, 12px);
}
.shortest-toolbar,
.five-toolbar {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 4px;
  flex: 0 0 auto;
}
.shortest-toolbar button,
.five-toolbar button {
  min-width: 0;
  min-height: 20px;
  padding: 0 3px;
  line-height: 18px;
  font-size: clamp(9px, 2.7vw, 12px);
  white-space: nowrap;
}
.search-mode .shortest-toolbar,
.search-mode .five-toolbar { display: none; }
.five-toolbar .party-clear,
.five-toolbar .charge-graph-button { padding-inline: 0; font-size: clamp(8px, 2.5vw, 12px); }
.charge-graph-dialog { width: min(560px, calc(100vw - 24px)); height: auto; }
.charge-graph-dialog .dialog-head { flex: 0 0 auto; }
.charge-graph-dialog .dialog-head h2 { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.charge-graph-dialog .dialog-head .close { flex: 0 0 auto; }
.charge-graph-scroll { min-width: 0; min-height: 0; touch-action: pan-y; -webkit-overflow-scrolling: touch; }
.charge-graph-explanation { margin: 0 0 8px; color: #c4d4e5; font-size: 13px; }
.charge-graph-summary { margin: 8px 0 12px; color: #75e0eb; font-size: 13px; }
.charge-graph-summary:empty { display: none; }
.charge-graph-chart { min-width: 0; }
.charge-graph-chart > svg { display: block; width: 100%; height: auto; }
.charge-graph-error { color: #ffafbb; }

.kakashi-dialog { width: min(740px, calc(100vw - 24px)); }
.kakashi-dialog > .hint { margin: 4px 0 8px; }
.kakashi-evaluation-warning { display: block; color: #ff6b7f; font-weight: 700; }
.kakashi-controls { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 6px; }
.kakashi-seasons { display: flex; flex-wrap: wrap; gap: 0 10px; min-width: 0; margin: 0; padding: 0; border: 0; }
.kakashi-seasons legend { padding: 0; font-size: 12px; }
.kakashi-seasons label { display: inline-flex; align-items: center; gap: 5px; min-height: 34px; margin: 0; white-space: nowrap; }
.kakashi-seasons input { width: 15px; height: 15px; margin: 0; }
.kakashi-controls button { min-height: 34px; padding: 5px 8px; font-size: 12px; }
.kakashi-deck-actions { display: flex; gap: 6px; }
.kakashi-deck-actions button { white-space: nowrap; }
.kakashi-threshold-field {
  display: flex; align-items: center; gap: 8px;
}
.kakashi-threshold-field input {
  width: 6em; min-width: 0; padding: 6px 8px; font-size: 16px;
}
.kakashi-threshold-rule.lowered { color: #f3d287; }
.kakashi-bulk-confirm[open] {
  display: flex; flex-direction: column; width: min(540px, calc(100vw - 16px)); padding: 12px; overflow: hidden;
}
.kakashi-bulk-confirm.has-choices { height: min(760px, calc(var(--view-height, 100dvh) - 24px)); }
.kakashi-bulk-confirm > .dialog-head { flex: none; margin-bottom: 6px; padding-bottom: 8px; }
.kakashi-bulk-confirm > .hint, .kakashi-bulk-message { flex: none; margin: 4px 0; }
.kakashi-bulk-confirm > .dialog-actions { flex: none; flex-wrap: wrap; margin-top: 8px; }
/* iOS에서 목록의 flex-basis가 0px로 확정되어 접히는 문제를 방지합니다. */
.kakashi-bulk-choices { flex: 1 1 auto; display: grid; align-content: start; gap: 8px; touch-action: pan-y; }
.kakashi-bulk-choice { min-width: 0; border: 1px solid #41536a; border-radius: 8px; }
.kakashi-bulk-choice:has(input:checked) { border-color: #81e8e2; }
.kakashi-bulk-select {
  display: flex; align-items: center; gap: 8px; min-height: 38px; margin: 0; padding: 6px 8px;
  background: #26364a; border-radius: 7px 7px 0 0; cursor: pointer;
}
.kakashi-bulk-select:has(input:checked) { background: #25464f; }
.kakashi-bulk-select input { width: 17px; height: 17px; margin: 0; accent-color: #81e8e2; }
.kakashi-bulk-score { margin-left: auto; color: #81e8e2; }
.kakashi-bulk-floor { color: #c1cfdf; }
.kakashi-bulk-party { padding: 4px 8px 6px; }
.kakashi-bulk-party + .kakashi-bulk-party { border-top: 1px solid #35455a; }
.kakashi-bulk-party > p { margin: 3px 0 0; font-size: 12px; font-weight: 700; }
.kakashi-bulk-message:empty { display: none; }
.kakashi-status { margin: 6px 0; min-height: 2.5em; font-size: 12px; overflow-wrap: anywhere; }
.kakashi-clock { flex: none; margin: 0 0 6px; }
.kakashi-list { touch-action: pan-y; }
.kakashi-card { border: 1px solid #40516a; border-radius: 8px; padding: 8px; margin-bottom: 8px; }
.kakashi-card-heading, .kakashi-card-actions { display: flex; gap: 6px; align-items: center; }
.kakashi-card-heading { justify-content: space-between; margin-bottom: 7px; }
.kakashi-actual { color: #f3d287; font-size: 12px; }
.kakashi-frequency { display: flex; flex-wrap: wrap; gap: 3px 10px; margin: -2px 0 8px; color: #b6c9dc; font-size: 12px; }
.kakashi-frequency strong { color: #75e0e8; }
.kakashi-ranking-note { margin: 0 0 8px; }
.kakashi-preview {
  --kakashi-card-gap: clamp(6px, 2vw, 10px);
  max-width: 560px;
  margin-inline: auto;
  padding-inline: 4px;
}
.kakashi-preview:empty {
  aspect-ratio: 5;
  box-sizing: content-box;
  max-width: 552px;
  padding-bottom: calc(53px - .8 * var(--kakashi-card-gap));
}
.kakashi-portraits { position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--kakashi-card-gap); }
.kakashi-unit { container-type: inline-size; }
.kakashi-unit .burst-frame { height: 22px; gap: 2px; font-size: clamp(9px, 24cqw, 14px); transform: none; }
.kakashi-unit .portrait { container-type: inline-size; }
.kakashi-unit .speed { top: -5px; right: -3px; min-width: 0; min-height: 0; padding: 2px 3px; font-size: clamp(9px, 22cqw, 16px); cursor: inherit; }
.kakashi-unit .jackal-linked .speed { padding-inline: 2px; font-size: clamp(8px, 18cqw, 16px); }
.kakashi-unit .cube { width: min(40px, 70cqw); height: min(40px, 70cqw); left: max(-8px, calc(8.5% - min(20px, 35cqw))); bottom: -10px; }
.kakashi-unit .cube small { font-size: clamp(7px, 15cqw, 10px); }
.kakashi-unit .link { width: min(24px, 43cqw); height: min(27px, 48cqw); }
.kakashi-unit .evaluation-burst-charge { left: 32%; right: 26%; z-index: 5; }
.kakashi-unit .name {
  margin-top: 7px;
  height: 24px;
  font-size: 10px;
  line-height: 12px;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  white-space: normal;
  overflow-wrap: anywhere;
}
.kakashi-frame-note { position: absolute; right: 0; top: 3px; pointer-events: none; }
.kakashi-frame-note.left { right: auto; left: 0; }
.kakashi-card-actions { justify-content: flex-end; margin-top: 7px; }
.kakashi-score { flex: 1; min-width: 0; }
.kakashi-card-actions strong { display: block; font-size: 12px; color: #53e2e6; }
.kakashi-sim-counts { font-size: 10px; color: #bdc9d8; line-height: 1.2; }
.kakashi-card-actions button { min-height: 30px; padding: 4px 6px; white-space: nowrap; font-size: 11px; }
.kakashi-card-actions .kakashi-report {
  display: grid; flex: 0 0 34px; place-items: center;
  width: 34px; height: 34px; padding: 0;
}
.kakashi-report svg { pointer-events: none; }
.kakashi-report.has-result { border-color: #77d5db; }
.kakashi-card .kakashi-availability { margin: 4px 0 0; }

.evaluation-dialog {
  width: 100vw;
  max-width: 100vw;
  height: var(--view-height, 100dvh);
  max-height: var(--view-height, 100dvh);
  margin: 0;
  padding: 8px;
  border: 0;
  border-radius: 0;
  gap: 2px;
}
.evaluation-dialog .dialog-head {
  flex: none;
  margin: 0;
  padding: 0 0 4px;
}
.evaluation-dialog .dialog-head h2 {
  font-size: 19px;
}
.evaluation-deck-summary{display:flex;flex:none;align-items:baseline;gap:8px;min-width:0;margin:0;font-size:13px;line-height:18px}
.evaluation-deck-name{flex:1;min-width:0;margin:0;color:#e1e7ef;font-size:inherit;font-weight:800;line-height:inherit;white-space:normal;overflow-wrap:anywhere}
.evaluation-average{flex:none;margin-left:auto;color:#21d5df;white-space:nowrap;text-align:right}
.deck-composition{flex:none;min-width:0;max-width:100%;margin:0;color:#c1cdd9;font-variant-numeric:tabular-nums;white-space:nowrap;overflow:hidden}
.deck-composition>.deck-composition-line{display:inline-block}
.evaluation-composition{height:14px;font-size:clamp(9px,2.6vw,11px);line-height:14px}
.evaluation-composition-group{display:inline;margin:0}
.evaluation-composition-item{display:inline-block;white-space:nowrap}
.current-deck-composition{height:13px;margin-bottom:-4px;font-size:10px;line-height:13px;white-space:nowrap;overflow:hidden}
.evaluation-method,
.evaluation-status {
  flex: none;
  margin: 0;
  font-size: 11px;
  line-height: 16px;
  color: #bac8d5;
}
.evaluation-list {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-rows: repeat(5, minmax(0, 1fr));
  gap: 0;
}
.evaluation-party {
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
}
.evaluation-heading {
  position: relative;
  z-index: 5;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  width: 100%;
  font-size: 11px;
  line-height: 20px;
}
.evaluation-percent {
  color: #21d5df;
  font-size: clamp(12px, 3.6vw, 17px);
  white-space: nowrap;
}
.evaluation-detail {
  color: #aab8c8;
  font-size: 9px;
  line-height: 11px;
  min-height: 11px;
}
.evaluation-party .five {
  width: min(
    calc(100% - 16px),
    calc((var(--evaluation-row-height, 130px) - 48px) * 5 + 28px)
  );
  gap: 7px;
  flex: none;
}
.evaluation-party .portrait {
  container-type: inline-size;
  width: 100%;
}
.evaluation-party .card .name {
  margin-top: 3px;
  min-height: 0;
  height: 12px;
  font-size: 9px;
  line-height: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}
.evaluation-party .speed {
  top: -6%;
  right: -3%;
  width: 54%;
  height: 36%;
  min-width: 0;
  min-height: 0;
  padding: 1% 4%;
  font-size: 20cqw;
  line-height: 1;
  border-radius: 11cqw;
}
.evaluation-party .cube {
  width: 48%;
  height: 48%;
  left: -22%;
  bottom: -17%;
}
.evaluation-party .cube small {
  font-size: 14cqw;
}
.evaluation-party .link {
  width: 34%;
  height: 38%;
  top: -11%;
}
.evaluation-party button:disabled {
  opacity: 1;
}

.evaluation-highlight {
  font-weight: 800;
  padding: 0 2px;
  border-radius: 2px;
}
.evaluation-draw {
  color: #ffdb69;
  background: #ffdb6924;
}
.evaluation-unresolved {
  color: #ff929e;
  background: #ff637824;
}
.evaluation-error {
  color: #ff929e;
  font-weight: 700;
  font-size: 10px;
  line-height: 12px;
  text-align: center;
  overflow-wrap: anywhere;
}

.evaluation-error {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 1버스트 수치는 공유 화면과 같은 5런처 상대 계산을 사용합니다. */
.evaluation-party .slot-cell {
  position: relative;
  min-width: 0;
}
.evaluation-party .burst-frame {
  position: absolute;
  z-index: 1;
  left: 0;
  right: 0;
  bottom: 100%;
  height: 14px;
  line-height: 14px;
  transform: translateY(-5px);
}

.evaluation-retry {
  appearance: none;
  -webkit-appearance: none;
  flex: 0 0 auto;
  box-sizing: border-box;
  min-height: 36px;
  padding: 6px 10px;
  border: 1px solid #71839a;
  border-radius: 6px;
  background: #293546;
  color: #f1f5f9;
  font:
    500 14px/20px system-ui,
    sans-serif;
  white-space: nowrap;
}

.evaluation-heading {
  height: 20px;
  flex: 0 0 20px;
  gap: 6px;
}
.evaluation-report-button {
  /* 20px 승률 줄 밖으로 돌출되어 아래 차속 배지를 가리지 않도록 합니다. */
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  min-height: 0;
  padding: 1px;
  box-sizing: border-box;
  display: grid;
  place-items: center;
  border: 1px solid #71839a;
  border-radius: 4px;
  background: #293546;
  color: #a6eff3;
}
.evaluation-report-button svg {
  display: block;
  width: 14px;
  height: 14px;
}
.evaluation-report-button:disabled {
  opacity: 0.35;
}
.evaluation-report-dialog {
  width: 100vw;
  max-width: 100vw;
  height: var(--view-height, 100dvh);
  max-height: var(--view-height, 100dvh);
  margin: 0;
  padding: 8px;
  border: 0;
  border-radius: 0;
  top: var(--view-top, 0px);
  transform: none;
}
.evaluation-report-dialog .dialog-head {
  flex: none;
  margin-bottom: 6px;
  padding-bottom: 6px;
}
.evaluation-report-body {
  padding: 0 6px 12px;
  overflow-x: hidden;
  overflow-y: auto;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
}
.evaluation-report-body h3 {
  font-size: 14px;
  margin: 8px 0;
}
.evaluation-report-entry {
  border-top: 1px solid #435369;
  margin-top: 14px;
  padding-top: 8px;
}
.report-entry-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}
.report-win-rate {
  color: #21d5df;
  font-size: 14px;
  white-space: nowrap;
}
.report-summary,
.report-tally {
  margin: 8px 0;
  font-size: 12px;
  line-height: 20px;
}
.report-note {
  color: #b6c5d4;
  font-size: 11px;
  line-height: 18px;
  margin: 6px 0;
}
.report-note.report-frequency-repeated {
  color: #ffdf59;
  font-weight: 700;
}
.report-wins {
  color: #79e6ba;
}
.report-losses {
  color: #ff929e;
}
.report-draws {
  color: #ffdb69;
}
.report-unresolved {
  color: #ff929e;
}
.evaluation-report-preview .five {
  gap: 7px;
  padding: 25px 8px 0;
}
/* 5열의 한 칸 높이와 위쪽 25px, 이름 28px을 유지하여 스크롤 위치가 뛰지 않습니다. */
.report-match-preview {
  position: relative;
}
.report-match-preview::before {
  content: "";
  display: block;
  padding-top: calc(20% + 44.2px);
}
.report-match-preview > .evaluation-report-preview {
  position: absolute;
  inset: 0;
}
.evaluation-report-preview .portrait {
  container-type: inline-size;
  width: 100%;
}
.evaluation-report-preview .card .name {
  margin-top: 4px;
  min-height: 24px;
  font-size: 9px;
  line-height: 12px;
  white-space: normal;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.evaluation-report-preview .speed {
  top: -6%;
  right: -3%;
  width: 54%;
  height: 36%;
  min-width: 0;
  min-height: 0;
  padding: 1% 4%;
  font-size: 20cqw;
  line-height: 1;
  border-radius: 11cqw;
}
.evaluation-report-preview .cube {
  width: 48%;
  height: 48%;
  left: -22%;
  bottom: -17%;
}
.evaluation-report-preview .cube small {
  font-size: 14cqw;
}
.evaluation-report-preview .link {
  width: 34%;
  height: 38%;
  top: -11%;
}
.evaluation-report-preview button:disabled {
  opacity: 1;
}

.saved-actions {
  gap: 6px;
  align-items: center;
}
.saved-edit-actions {
  gap: 6px;
  flex: 0 0 auto;
}
.saved-actions button {
  white-space: nowrap;
}
.saved-actions .saved-delete {
  background: #6d2738;
  border-color: #c2526b;
  color: #fff;
}

.evaluation-report-preview .slot-cell {
  position: relative;
  min-width: 0;
}
.evaluation-report-preview .burst-frame {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  height: 14px;
  line-height: 14px;
  transform: translateY(-5px);
}
.report-b1-frame {
  color: #ff4b54;
  font-weight: 800;
}

.game-skills-dialog {
  width: min(620px, calc(100vw - 24px));
  max-height: calc(var(--view-height, 100dvh) - 24px);
  padding: 0;
  overflow: hidden;
}
.game-skills-dialog .dialog-head {
  padding: 14px;
  margin: 0;
}
.game-skills-dialog[open] {
  display: flex;
  flex-direction: column;
}
.game-skills-body {
  min-height: 0;
  overflow-y: auto;
  padding: 0 16px 16px;
  line-height: 1.7;
  font-size: 14px;
}
.game-skills-note {
  color: #becbdc;
  font-size: 12px;
}
.game-skills-body section {
  border-top: 1px solid #526276;
  padding: 12px 0;
}
.game-skills-body h3 {
  color: #65dfec;
  margin: 0 0 5px;
  font-size: 16px;
}
.game-skills-body h4 {
  color: #ffdb91;
  margin: 0 0 8px;
  font-size: 15px;
}
.game-skill-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 0;
}

/* 설명을 여는 손짓 동안만 선택을 막고, 이후에는 복사를 허용합니다. */
#roster .portrait,
#roster .portrait *,
.game-skills-dialog.selection-guard,
.game-skills-dialog.selection-guard * {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.editor .portrait,
.editor .portrait *,
.tabs button {
  -webkit-touch-callout: none;
}

/* 아이콘 그림과 터치 영역을 분리하고 가운데에만 해제 버튼을 둡니다. */
.editor .portrait {
  --remove-top: 38%;
  --remove-bottom: 36%;
}
.editor .portrait.empty[aria-pressed="true"] {
  outline: 2px solid #88c8ff;
  outline-offset: -2px;
}
.portrait-remove {
  position: absolute;
  inset: var(--remove-top) 25% var(--remove-bottom);
  z-index: 3;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
}
/* 오른쪽 반격 버튼 주변을 초상화 해제 영역에서 제외합니다. */
.editor .portrait:has(> .scarlet-counter-toggle) > .portrait-remove {
  right: max(25%, 23px);
}
.editor .link:not(:disabled),
.shortest-target-preview .link {
  width: min(36px, 64%);
  height: min(38px, calc(var(--remove-top) + 13px));
  top: -13px;
  align-items: start;
}
.editor .link:not(:disabled) .link-mark,
.shortest-target-preview .link-mark {
  width: 24px;
  height: 27px;
  margin-top: 4px;
}
.cube-mark { display: contents; }
.editor .cube:not(:disabled),
.shortest-target-preview .cube {
  width: min(38px, calc(60% + 8px));
  height: min(38px, calc(var(--remove-bottom) + 8px));
  left: -8px;
  bottom: -8px;
  border: 0;
  background: transparent;
}
.editor .cube:not(:disabled) .cube-mark,
.shortest-target-preview .cube-mark {
  position: absolute;
  left: calc(8px + 8.5cqw);
  bottom: 2px;
  transform: translateX(-50%);
  width: min(28px, 38cqw);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  pointer-events: none;
}
.editor .cube.add:not(:disabled) .cube-mark {
  width: 20px;
  bottom: 6px;
  border: 1px solid #68809a;
  border-radius: 3px;
  background: #293b4b;
}
.editor .cube:not(.add):not(:disabled) img,
.shortest-target-preview .cube img {
  position: absolute;
  width: 40px;
  height: 40px;
  max-width: none;
  pointer-events: none;
}
.editor .cube small {
  pointer-events: none;
}


/* 평가 결과는 공유 이미지의 25칸 렌더러로 전체 높이를 출력합니다. */
.evaluation-dialog .dialog-head { gap: 4px; }
.evaluation-dialog .dialog-head h2 { white-space: nowrap; min-width: 0; }
.evaluation-dialog .evaluation-retry,
.evaluation-dialog .evaluation-json-export,
.evaluation-dialog .evaluation-download {
  appearance: none;
  flex: 0 0 auto;
  min-height: 36px;
  padding: 6px;
  border: 1px solid #71839a;
  border-radius: 6px;
  background: #293546;
  color: #f1f5f9;
  font: 500 13px/20px system-ui, sans-serif;
  white-space: nowrap;
}
.evaluation-json-error:not([hidden]) {
  flex: none;
  margin: 2px 0;
  color: #ff9ca7;
  font-size: 12px;
}
@media (max-width: 380px) {
  .evaluation-dialog .dialog-head { gap: 2px; }
  .evaluation-dialog .dialog-head h2 { font-size: 16px; }
  .evaluation-dialog .evaluation-retry,
  .evaluation-dialog .evaluation-json-export,
  .evaluation-dialog .evaluation-download { padding-inline: 4px; font-size: 12px; }
  .evaluation-dialog .dialog-head .app-close { min-width: 56px; padding-inline: 4px; font-size: 12px; }
}
.evaluation-export .evaluation-export-method,
.evaluation-export .evaluation-export-status {
  color: #bac8d5;
  text-align: center;
  font-size: 10px;
  line-height: 14px;
  margin: 2px 0;
}
.evaluation-export-heading {
  margin-top: 10px;
  color: #21d5df;
  font-size: 17px;
  font-weight: 800;
  line-height: 22px;
  text-align: right;
}
.evaluation-export .five { margin-bottom: 2px; }
.evaluation-export .portrait { container-type: inline-size; }
.evaluation-export .cube { width: 48%; height: 48%; left: -22%; bottom: -17%; }
.evaluation-export-detail {
  font-size: 10px;
  line-height: 14px;
  text-align: center;
  color: #aab8c8;
  overflow-wrap: anywhere;
}
.evaluation-export-detail .evaluation-error {
  display: block;
  overflow: visible;
  -webkit-line-clamp: unset;
}


/* 검색과 평가에 같은 충전량 글꼴·배경을 사용합니다. */
.roster .catalog-burst-charge,
.evaluation-burst-value {
  padding: 1px 2px;
  border-radius: 2px;
  background: rgba(0, 0, 0, .75);
  color: #fff;
  font: 700 clamp(8px, 2.4vw, 10px)/1.15 monospace;
  white-space: nowrap;
  pointer-events: none;
}
.roster .catalog-burst-charge {
  position: absolute;
  left: -1px;
  bottom: -1px;
  z-index: 5;
}

/* 평가 초상화에서는 큐브와 속성 아이콘 사이에 기준 충전량을 표시합니다. */
.evaluation-burst-charge {
  position: absolute;
  left: 26.5%;
  right: 26.5%;
  bottom: -1px;
  z-index: 3;
  display: flex;
  justify-content: center;
  text-align: center;
  white-space: nowrap;
  pointer-events: none;
}
.evaluation-burst-value {
  flex: none;
  /* 1.60%의 기존 크기를 기준으로 5% 줄여 모든 숫자에 적용합니다. */
  font-size: min(calc(clamp(8px, 2.4vw, 10px) * .95), calc(14.4032cqw - 1.2258px));
}
.editor:not(.share-board) .portrait { container-type: inline-size; }
.editor:not(.share-board) .evaluation-burst-charge { left: 32%; right: 26%; z-index: 5; }
.editor:not(.share-board) .evaluation-burst-value { font-size: clamp(8px, 2.4vw, 10px); }

/* 평가 오른쪽 두 자리의 B1 수치는 승률·보고서 대신 초상화 중앙에 표시합니다. */
.portrait > .burst-frame.portrait-frame {
  position: absolute;
  top: 50%;
  bottom: auto;
  left: 0;
  right: 0;
  height: 14px;
  margin: 0;
  transform: translateY(-50%);
  z-index: 15;
  pointer-events: none;
  text-shadow: 0 1px 3px #000, 0 0 3px #000;
}

/* 얼굴 위에 놓인 숫자만 반투명 바탕으로 구분합니다. */
.portrait > .burst-frame.portrait-frame .frame-value {
  padding: 2px 4px;
  border: 0;
  border-radius: 3px;
  background: rgb(0 0 0 / 65%);
}

/* 대결별 평가 기록을 독립 실행해 보여주는 전투 재생 창입니다. */
.report-entry-actions{display:flex;align-items:center;gap:8px;flex:none}
.report-replay-button{display:grid;place-items:center;width:28px;height:28px;padding:0;border:1px solid #58839f;border-radius:6px;background:#294860;color:#c9f4ff;cursor:pointer}
.report-replay-button svg{display:block;width:14px;height:14px}
/* 검색·키보드용 공용 높이가 남아 있어도 전투 창은 실제 뷰포트를 채웁니다. */
.report-replay-dialog{position:fixed;inset:0;transform:none;width:100vw;max-width:100vw;height:100vh;height:100dvh;max-height:none;margin:0;padding:0;border:0;border-radius:0}
.report-replay-dialog .dialog-head{flex:none;margin:8px}
.report-replay-status{margin:8px;font-size:13px;line-height:1.4}
.report-replay-view{position:absolute;inset:0;width:auto;height:auto;min-height:0;margin:0;background:#070a11}.report-replay-view[hidden]{display:none}
/* 승리플랜·배치 순서 보고서는 iframe을 사용하므로 기본 300×150 크기를 해제합니다. */
.report-bottom-replay-frame{position:absolute;inset:0;display:block;width:100%;height:100%;min-height:0;box-sizing:border-box;border:0;background:#070a11}.report-bottom-replay-frame[hidden]{display:none}

/* 아이폰 보고서 재생은 보텀처럼 변환 없는 전체 화면에서 표시합니다. */
.report-replay-dialog.iphone-report-replay{contain:layout paint;background:#070a11}
.report-replay-dialog.iphone-report-replay::backdrop{background:#070a11}
body>.iphone-replay-background{display:none!important}

/* 최단경로의 확인과 다중 제외 선택 */
.shortest-hint { color: var(--muted, #aeb7c8); font-size: .85rem; }
.shortest-excluded-summary { overflow-wrap: anywhere; }
.shortest-error { color: #ffb2aa; }
.shortest-exclusion-picker[open] { display: flex; flex-direction: column; gap: .6rem; }
.shortest-exclusion-grid { gap: 6px 10px; }
.shortest-exclusion-grid .card[hidden] { display: none; }
.shortest-exclusion-choice[aria-pressed="true"] { border-color: #69d9ef; box-shadow: 0 0 0 2px #69d9ef; }
.shortest-exclusion-choice[aria-pressed="true"]::after { content: "✓"; position: absolute; right: 2px; top: 2px; color: #fff; background: #12647a; border-radius: 50%; padding: 0 3px; font-weight: bold; }
.shortest-exclusion-picker .dialog-actions { flex-shrink: 0; }

.shortest-stages { min-width: 0; border: 0; padding: 0; margin: .8rem 0; }
.shortest-stages legend { padding: 0; margin-bottom: .5rem; font-weight: 600; }
.shortest-stage-buttons { display: flex; gap: .5rem; }
.shortest-stage-buttons button { flex: 1; min-width: 0; }
.shortest-stage-buttons button[aria-pressed="true"] { background: #12647a; border-color: #69d9ef; box-shadow: inset 0 0 0 1px #69d9ef; }
.shortest-stage-summary { color: var(--muted, #aeb7c8); font-size: .85rem; margin: .5rem 0 0; }
.shortest-hint { white-space: pre-line; }

.shortest-error { white-space: pre-line; }

/* 부분 편성의 여러 단계는 같은 카드 안에서 줄을 나누어 표시합니다. */
.partial-burst-frame .frame-value { white-space: pre-line; flex: 0 1 auto; max-width: 100%; font-size: 12px; }
/* 승리플랜 진행 화면은 편성 미리보기만 표시합니다. */
.victory-warning{color:#ffd483;font-weight:700}.victory-progress{width:min(760px,96vw)}.victory-progress .dialog-head,.victory-progress>.dialog-actions{position:sticky;z-index:4;background:#132330;padding:8px 0}.victory-progress .dialog-head{top:0}.victory-progress>.dialog-actions{bottom:0}.victory-team{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:5px}.victory-member{min-width:0}.victory-member small{display:block;font-size:10px;overflow-wrap:anywhere}.victory-member .card{width:100%;min-width:0}.victory-outcome{display:block;text-align:center;font-size:24px;padding:10px}.victory-best{font-size:18px;color:#81e8e2}.victory-log{max-height:120px;overflow:auto;font-size:11px;padding-left:20px}.victory-status,.victory-clock,.victory-meta{font-size:12px}.victory-progress h3{font-size:14px;margin:10px 0}.victory-progress .portrait{pointer-events:none}.victory-progress .dialog-actions{flex-wrap:wrap}.victory-confirm .victory-warning{font-size:14px}
.victory-link{grid-column:1/-1;font-size:11px;color:#81e8e2}.victory-results p{font-size:12px;margin:4px 0}
/* 진행 중 숫자·큐브·이미지가 바뀌어도 세 편성 영역과 버튼 위치는 유지합니다. */
.victory-progress[open]{display:flex;flex-direction:column;box-sizing:border-box;height:calc(var(--view-height,100dvh) - 24px);max-height:calc(var(--view-height,100dvh) - 24px);overflow:hidden;padding:8px 12px 10px;gap:4px;--victory-portrait:clamp(36px,calc((var(--view-height,100dvh) - 560px)/3),96px);font-variant-numeric:tabular-nums}
.victory-progress .dialog-head{position:static;flex:none;margin:0;padding:0 0 4px;min-height:35px}
.victory-info{display:grid;gap:2px;min-width:0}.victory-info p{margin:0;line-height:15px}
.victory-state{height:30px;overflow:auto;overflow-wrap:anywhere;scrollbar-width:thin}.victory-save-status{font-size:11px;color:#bdd2e2}
.victory-clock{display:grid;grid-template-columns:minmax(0,1fr);grid-auto-rows:15px;height:30px;font-size:11px}.victory-clock p{min-width:0;white-space:nowrap;overflow:auto;scrollbar-width:none}.victory-eta{color:#a8dfed}
.victory-meta{height:15px;overflow:auto;overflow-wrap:anywhere;font-size:11px;scrollbar-width:thin}
@media(max-width:380px){.victory-meta{height:30px}}
@media(min-width:600px){.victory-clock{grid-template-columns:max-content minmax(0,1fr);column-gap:12px;height:15px}}
.victory-live{flex:1 1 auto;min-height:0;overflow:auto;padding:0 2px}.victory-progress h3{font-size:12px;line-height:16px;margin:3px 0 10px}
.victory-team{position:relative;border:2px solid transparent;border-radius:7px;padding:5px 3px 2px;gap:4px;grid-template-rows:calc(var(--victory-portrait) + 29px) 14px;align-items:start;box-sizing:border-box}
.victory-team.is-winner{border-color:#68e5ef;box-shadow:0 0 5px #68e5ef55}.victory-team.is-winner::after{content:'승리';position:absolute;top:-10px;left:10px;padding:0 5px;color:#68e5ef;background:#1d2838;font-size:11px;line-height:16px;font-weight:700}
.victory-member .portrait{height:var(--victory-portrait);aspect-ratio:auto;width:100%}.victory-member .face{height:100%;width:100%;object-fit:cover}.victory-member small{height:28px;line-height:14px;overflow:hidden;font-size:9px}.victory-member .card{margin:0}.victory-link{height:14px;line-height:14px;overflow:hidden;white-space:nowrap}
.victory-outcome{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);padding:0}
.victory-best-panel{flex:none;border-top:1px solid #41536a;padding-top:5px}.victory-best{font-size:13px;line-height:17px;height:51px;overflow:auto;margin:0 0 5px}.victory-progress>.dialog-actions{position:static;flex:none;margin:0;padding:3px 0 0;min-height:36px;align-items:center}.victory-progress .dialog-actions button{padding:6px 10px}
.victory-extra{flex:none;position:relative;font-size:11px;line-height:18px}.victory-extra-body{display:none}.victory-extra[open]>.victory-extra-body{display:block;position:absolute;bottom:22px;left:0;right:0;max-height:35vh;overflow:auto;background:#132330;border:1px solid #647b99;border-radius:6px;padding:8px;z-index:8}.victory-extra .victory-log{margin:0;max-height:none}
@media(max-height:650px){.victory-progress[open]{gap:3px;padding:7px 9px 9px;--victory-portrait:clamp(32px,calc((var(--view-height,100dvh) - 530px)/3),70px)}.victory-best{height:34px;font-size:11px}.victory-progress h3{margin-top:1px}}
/* 제목은 legend로 테두리를 끊고, 승리 표시는 오른쪽 모서리에 배치합니다. */
.victory-live{display:flex;flex-direction:column;gap:12px;padding:3px 1px 1px}.victory-frame{position:relative;flex:none;min-width:0;margin:0;padding:7px 7px 4px;border:2px solid transparent;border-radius:8px}.victory-frame legend{padding:0 6px;margin-left:0;color:#e1e7ef;font-size:12px;font-weight:700;line-height:18px}.victory-frame.is-winner{border-color:#68e5ef;box-shadow:0 0 4px #68e5ef33}.victory-win-label{display:none;position:absolute;right:10px;top:-9px;transform:translateY(-50%);padding:0 5px;background:#1d2838;color:#68e5ef;font-size:11px;font-weight:700;line-height:18px}.victory-frame.is-winner .victory-win-label{display:block}.victory-frame>.victory-team{border:0;border-radius:0;padding:0;box-shadow:none;gap:4px}.victory-frame>.victory-team::after{content:none}.victory-frame .victory-link{margin:0}.victory-progress[open]{--victory-portrait:clamp(36px,calc((var(--view-height,100dvh) - 570px)/3),96px)}
@media(max-height:650px){.victory-live{gap:8px}.victory-frame{padding:5px 5px 3px}.victory-progress[open]{--victory-portrait:clamp(30px,calc((var(--view-height,100dvh) - 545px)/3),65px)}}
/* 큐브·차속은 기존 스타일을 유지하며 WIN과 링크 위치만 별도로 조정합니다. */
.victory-live{padding-top:10px;gap:28px}.victory-team{grid-template-rows:auto}.victory-member .portrait{height:auto;aspect-ratio:1;width:100%}.victory-member .card{max-width:96px;margin-inline:auto}.victory-win-label{top:-20px;padding:0;background:none;line-height:18px;font-weight:900}.victory-link{position:absolute;left:7px;bottom:-18px;height:14px;line-height:14px;margin:0;overflow:visible}.victory-best-team>.victory-link{bottom:-16px}.victory-best-panel{padding-bottom:15px}
@media(max-height:650px){.victory-live{gap:24px}}
@media(max-height:650px){.victory-member .card{max-width:44px}}
@media(min-height:651px) and (max-height:750px){.victory-member .card{max-width:60px}}
/* 원래 빈자리의 후보 테두리는 총기·버스트·차속 배지 뒤에 표시합니다. */
.victory-search-slot .portrait::after{content:'';position:absolute;inset:-2px;border:3px solid #ffd447;border-radius:6px;box-shadow:0 0 3px #ffd44788;z-index:1;pointer-events:none;background:none}
/* 최고 후보의 승률·패배율을 별도 배경으로 강조하고 보조 수치는 아래에 둡니다. */
.victory-best:has(.victory-metrics){overflow:hidden}.victory-metrics{display:grid;grid-template-columns:1fr 1fr;gap:7px;height:26px}.victory-metric{display:flex;align-items:center;justify-content:center;box-sizing:border-box;border:1px solid;border-radius:5px;padding:2px 6px;font-size:16px;line-height:20px;font-weight:800;white-space:nowrap;font-variant-numeric:tabular-nums}.victory-metric-win{background:#123d43;border-color:#67e5ef;color:#e5feff}.victory-metric-loss{background:#472938;border-color:#d989a8;color:#fff0f5}.victory-best-secondary{display:block;height:calc(100% - 27px);overflow:auto;margin-top:1px;color:#b9d5da;font-size:10px;line-height:12px}
/* 읽기 전용 큐브·차속은 약한 반투명만 유지합니다. 크기와 위치는 그대로 둡니다. */
.victory-progress .victory-member .cube:disabled,.victory-progress .victory-member .speed:disabled{opacity:.75}
/* 하단의 긴 버튼 배경·최소 높이·빈 여백을 없애고 기록과 버튼을 한 줄에 둡니다. */
.victory-best-panel{padding-bottom:0}.victory-best-panel:has(.victory-best-team>.victory-link){padding-bottom:14px}.victory-footer{position:relative;display:flex;align-items:center;justify-content:space-between;gap:8px;flex:none;margin:0;padding:0;background:none}.victory-footer>.victory-extra{position:static;min-width:0;flex:1}.victory-footer>.victory-extra>summary{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer}.victory-footer>.dialog-actions{position:static;flex:none;min-height:0;margin:0;padding:0;gap:6px;background:none;flex-wrap:nowrap}.victory-footer .victory-extra[open]>.victory-extra-body{bottom:calc(100% + 4px)}
/* 기본 카드의 자칼 링크 아이콘을 그대로 사용하며 읽기 전용에서도 선명하게 표시합니다. */
.victory-progress .link:disabled{opacity:1}
/* 완료 상태와 기존 대결 보고서로 연결되는 문서 아이콘입니다. */
.victory-completion{display:inline-block;box-sizing:border-box;min-width:58px;margin-left:6px;padding:3px 5px;border-radius:5px;font-size:11px;line-height:16px;font-weight:800;text-align:center;vertical-align:middle;background:#244057;color:#c8e7f1}.victory-completion[data-state=complete]{background:#174d3e;color:#aaffcf;box-shadow:inset 0 0 0 1px #64dca2}.victory-completion[data-state=cancelled]{background:#493c24;color:#ffdfa0}.victory-completion[data-state=error]{background:#542b35;color:#ffd5de}.victory-metric{gap:4px}.victory-metric .victory-report-button{display:inline-flex;align-items:center;justify-content:center;flex:none;width:18px;height:20px;min-width:0;min-height:0;padding:0;border:0;background:none;color:inherit;opacity:1}.victory-metric .victory-report-button svg{width:18px;height:18px}.victory-metric .victory-report-button:disabled{opacity:.4}

.victory-metric .victory-report-icon{width:18px;height:18px;flex:none}.victory-metrics>button{cursor:pointer}.victory-metric:focus-visible{outline:2px solid #fff;outline-offset:2px}

/* 완료 배지의 색·크기는 유지하고 테두리 광채를 선명하게 반복합니다. */
.victory-completion[data-state=complete]{animation:victory-complete-glow 1s ease-in-out infinite}
@keyframes victory-complete-glow{0%,100%{box-shadow:inset 0 0 0 1px #64dca2,0 0 0 0 #64dca200}50%{box-shadow:inset 0 0 0 3px #aaffcf,0 0 16px 5px #64dca2ee,0 0 0 2px #aaffcf}}
@media(prefers-reduced-motion:reduce){.victory-completion[data-state=complete]{animation:none;box-shadow:inset 0 0 0 2px #aaffcf,0 0 5px #64dca266}}
/* 계산 중에도 완료된 후보를 스크롤하며 하단 취소 버튼은 창 안에 고정합니다. */
.victory-progress .victory-scroll{display:block;flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;overflow-anchor:none;padding-right:3px;scrollbar-gutter:stable}
.victory-progress .victory-live{flex:none;overflow:visible;margin-bottom:12px}
.victory-progress .victory-best{height:auto;min-height:51px;overflow:visible}
.victory-progress .victory-best-secondary{height:auto;overflow:visible}
.victory-progress .victory-ranking-title{font-size:13px;font-weight:800;color:#d9f5f7;margin:10px 0 8px}
.victory-ranked-panel{margin-top:16px;padding-top:4px}
.victory-candidate-footer{display:flex;align-items:center;justify-content:space-between;gap:6px;min-width:0;margin-top:2px}
.victory-candidate-footer>.victory-link{position:static;flex:1;min-width:0;height:auto;line-height:16px;margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.victory-candidate-footer>.victory-candidate-apply{display:inline-flex;align-items:center;justify-content:center;flex:none;min-height:20px;margin:0 0 0 auto;padding:1px 6px;font-size:10px;line-height:16px;white-space:nowrap}
.victory-scroll .victory-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}
.victory-scroll .victory-metric{min-width:0}
@media(max-width:380px){.victory-progress .victory-metric{font-size:13px;padding-inline:3px}}

/* 버텀의 반격 칼 아이콘을 공유하고 기본 자칼 링크 크기로 초상화 오른쪽 중앙에 배치합니다. */
.portrait>.scarlet-counter-toggle{position:absolute;top:50%;left:auto;right:-6px;transform:translateY(-50%);z-index:8;width:24px;height:27px;min-width:0;min-height:0;padding:0;border:0;background:none;display:flex;align-items:center;justify-content:center;touch-action:manipulation}
.scarlet-counter-toggle::before,.scarlet-counter-toggle::after{content:'';position:absolute;inset:0;clip-path:polygon(50% 0,94% 25%,94% 75%,50% 100%,6% 75%,6% 25%);background:#f7f8fb}
.scarlet-counter-toggle::after{inset:2px;background:#737880}
.scarlet-counter-toggle.active::after{background:#e03131}
.scarlet-counter-toggle>img{position:relative;z-index:1;width:65%;height:65%;object-fit:contain;pointer-events:none}
.scarlet-counter-toggle:disabled{opacity:1;cursor:default}
.scarlet-counter-toggle:focus-visible{outline:2px solid #fff;outline-offset:2px;border-radius:4px}

/* 현재 덱 JSON 내보내기: 이름·기본 저장, 내용, 보조 작업을 분리합니다. */
.deck-export-dialog { width: min(680px, calc(100vw - 24px)); overflow: hidden; }
.deck-export-dialog[open] { display: flex; flex-direction: column; gap: 12px; }
.deck-export-dialog .dialog-head { margin-bottom: 0; flex: 0 0 auto; }
.export-name-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; flex: 0 0 auto; }
.export-deck-name { overflow-wrap: anywhere; min-width: 0; }
.export-name-row button { font-size: 12px; padding: 9px 12px; }
.deck-export-dialog .hint { margin: 0; flex: 0 0 auto; }
.deck-export-dialog textarea.json { height: clamp(160px, 42dvh, 420px); min-height: 100px; flex: 1 1 auto; overflow: auto; resize: none; white-space: pre; tab-size: 2; scrollbar-gutter: stable; }
.deck-export-dialog .export-actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(76px, auto); margin-top: 0; flex: 0 0 auto; }
.export-actions button { min-width: 0; font-size: 13px; }
@media (max-width: 420px) {
 .deck-export-dialog { padding: 14px; }
 .export-name-row { grid-template-columns: minmax(0, 1fr); gap: 8px; }
 .export-name-row button { width: 100%; }
 .export-actions button { font-size: 12px; padding-inline: 8px; }
}

/* 승리플랜 재검색은 상단 닫기 바로 왼쪽에 고정합니다. */
.victory-progress .dialog-head{gap:6px}.victory-progress .dialog-head h2{min-width:0;font-size:16px;line-height:19px;white-space:nowrap}
.victory-title-state{display:flex;align-items:center;gap:5px;font-size:11px;line-height:16px;font-weight:600;color:#b8ccde}.victory-title-state .victory-completion{min-width:0;margin:0;padding:1px 4px;font-size:10px;line-height:14px}
.victory-progress .victory-header-retry{flex:none;white-space:nowrap;padding:6px 8px;font-size:13px}.victory-progress .dialog-head .close{flex:none;white-space:nowrap}

/* 저장창은 입력칸을 자동 선택하지 않고 기존 덱 목록을 터치 스크롤합니다. */
.deck-save-dialog { width:min(580px,calc(100vw - 24px)); max-height:calc(100dvh - 32px); overflow:hidden; }
.deck-save-dialog[open] { display:flex; flex-direction:column; gap:10px; }
.deck-save-dialog .dialog-head,.deck-save-dialog label,.deck-save-dialog .hint,.deck-save-dialog .dialog-actions { flex:none; margin:0; }
.deck-save-dialog label input { display:block; width:100%; box-sizing:border-box; margin-top:6px; }
.deck-save-list { overflow-y:auto; min-height:60px; max-height:40dvh; flex:1 1 auto; touch-action:pan-y; overscroll-behavior:contain; scrollbar-gutter:stable; }
.deck-save-target { display:block; width:100%; text-align:left; margin-bottom:6px; overflow-wrap:anywhere; }
.deck-save-target[aria-pressed="true"] { border-color:#88c8ff; background:#294f6c; }
.deck-save-dialog .dialog-actions { display:flex; flex-wrap:wrap; gap:8px; }

/* 승리플랜 이름 아래에서 차속 적용 여부를 구분합니다. */
.victory-progress .victory-team{grid-template-rows:auto}
/* 이름 길이가 바뀌어도 비교 상대 아래 결과 영역이 움직이지 않도록 두 줄을 확보합니다. */
.victory-progress .victory-member .name{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;font-size:10px;line-height:14px;min-height:28px;height:28px;max-height:28px;overflow:hidden;white-space:normal;overflow-wrap:anywhere}
.victory-progress .victory-member small{height:auto;min-height:28px;overflow:visible}

/* 장비 설명과 이름의 높이가 바뀌어도 현재 비교 편성은 고정합니다. */
.victory-progress .victory-member>small{height:42px;min-height:42px;max-height:42px;line-height:14px;overflow:auto}

/* 첫 버스트 프레임의 숫자와 단위를 함께 강조합니다. */
.victory-progress .victory-b1-highlight{color:#ff6b7f;font-weight:800;white-space:nowrap;font-size:1.1em}

/* 우승확률: 현재 대결과 100회 기록을 큰 스크롤 창에 표시합니다. */
.championship-dialog[open]{transform:none;display:flex;flex-direction:column;box-sizing:border-box;position:fixed;inset:0;margin:0;width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;border-radius:0;padding:12px;gap:8px;overflow:hidden}
.championship-dialog .dialog-head{flex:none;margin:0;gap:8px}.championship-dialog h2{font-size:18px;min-width:0}.championship-dialog p{margin:4px 0}.championship-dialog>.hint{font-size:11px;flex:none}
.championship-rate{font-size:22px;color:#6ae5ee}.championship-status{font-size:12px;min-height:32px;flex:none}.championship-scroll{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
.championship-live{border:1px solid #60748b;border-radius:8px;padding:10px;margin-bottom:14px}.championship-live h3{margin:0;font-size:15px}.championship-pair{display:grid;grid-template-columns:1fr 1fr;gap:14px}.championship-five{width:100%;max-width:580px;margin-inline:auto;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:4px;min-width:0}.championship-five .name{font-size:11px;line-height:14px;height:auto;white-space:normal;overflow-wrap:anywhere}.championship-five .portrait{max-height:110px}.championship-pair-status{display:block;font-size:13px;margin-top:8px;min-height:36px}.championship-pair-status[data-outcome=win]{color:#70efcd}.championship-pair-status[data-outcome=loss]{color:#ff8897}
.championship-trial{margin:8px 0;padding:8px;border:1px solid #3b5065;border-radius:6px}.championship-trial>summary{font-size:13px;cursor:pointer;overflow-wrap:anywhere}.championship-stage{margin:8px 0 4px;padding:8px;background:#142536}.championship-stage>summary{cursor:pointer;font-size:13px}.championship-record-pair{padding:8px 0;border-bottom:1px solid #405368}.championship-record-pair .championship-five{margin-bottom:8px}.championship-record-pair p{font-size:12px}
@media(max-width:600px){.championship-dialog .dialog-head h2{font-size:15px}.championship-rate{font-size:19px}.championship-pair{grid-template-columns:1fr;gap:10px}.championship-five .name{font-size:10px}.championship-dialog{padding:8px}.championship-five .portrait{max-height:90px}}

/* 한 대진의 내 5덱과 상대 5덱을 항상 좌우로 함께 표시합니다. */
.championship-board{--championship-name-height:14px;--championship-face:clamp(24px,calc((100dvh - 380px)/5 - 28px - var(--championship-name-height)),52px)}
.championship-board-head,.championship-board-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);column-gap:12px}
.championship-board-head{text-align:center;font-size:12px;margin-bottom:5px}.championship-board-row{padding:4px 0;border-top:1px solid #3b5065;row-gap:2px}.championship-board-side{min-width:0}
.championship-board-own{padding-top:var(--championship-name-height)}
.championship-deck-label{display:flex;justify-content:center;align-items:center;gap:4px;height:var(--championship-name-height);line-height:var(--championship-name-height);min-width:0;font-size:10px;color:#cbd7e7;white-space:nowrap}
.championship-deck-number,.championship-deck-name-count{flex:none}
.championship-deck-nickname{min-width:0;overflow:hidden;text-overflow:ellipsis;font-weight:700;color:#e8f4ff}
.championship-board .championship-five{position:relative;gap:3px;max-width:calc(var(--championship-face)*5 + 12px)}
.championship-board .card{margin:0;min-width:0}.championship-board .portrait{width:100%;height:auto;max-height:none;aspect-ratio:1;overflow:hidden}
.championship-board .portrait>:not(.face){display:none}.championship-board .face{width:100%;height:100%;object-fit:cover}
.championship-board .championship-five.is-loser::after{content:'';position:absolute;z-index:20;pointer-events:none;left:0;right:0;top:50%;height:3px;background:#ff354d;transform:translateY(-50%);box-shadow:0 0 2px #66000c}
.championship-row-result{grid-column:1/-1;display:block;font-size:10px;line-height:13px;overflow-wrap:anywhere;color:#cbd7e7}.championship-board-row[data-outcome=win] .championship-row-result{color:#70efcd}.championship-board-row[data-outcome=loss] .championship-row-result{color:#ff8897}
@media(max-width:600px){.championship-live{padding:6px}.championship-board-head,.championship-board-row{column-gap:8px}.championship-board-head{font-size:11px}.championship-row-result{font-size:9px;line-height:12px}.championship-board .championship-five.is-loser::after{height:2px}}

.championship-confirm .championship-confirm-actions{display:flex;justify-content:flex-end;margin-top:16px}

.championship-confirm .championship-duration{color:#fff;font-size:17px;font-weight:600;line-height:1.6;margin:16px 0}

/* 모바일과 PC 화면에서 보고서 정렬 버튼을 선택할 수 있도록 배치합니다. */
.report-sort-controls{display:flex;flex-wrap:wrap;gap:6px;margin:12px 0}
.report-sort-controls button{font-size:12px;padding:7px 10px}
.report-sort-controls button[aria-pressed="true"]{border-color:#68e5ef;color:#68e5ef;background:#243e50}

/* 카운터의 장비와 속성은 기존 딕 카드를 사용하며 작은 화면에서는 대결별로 쌓습니다. */
:is(.counter-confirm,.counter-recovery,.counter-dialog,.counter-overview-dialog)[open]{position:fixed;inset:0;transform:none;box-sizing:border-box;margin:0;width:100vw;max-width:100vw;height:var(--view-height,100dvh);max-height:var(--view-height,100dvh);border:0;border-radius:0}
:is(.counter-confirm,.counter-recovery)[open]{display:flex;flex-direction:column;overflow:auto}
.counter-confirm>.dialog-actions{margin-top:auto;flex:none}
.counter-dialog[open]{display:flex;flex-direction:column;position:fixed;inset:0;transform:none;box-sizing:border-box;margin:0;width:100vw;max-width:100vw;height:var(--view-height,100dvh);max-height:var(--view-height,100dvh);overflow:hidden;padding:12px;gap:8px}
.counter-dialog .dialog-head,.counter-dialog>.dialog-actions,.counter-status,.counter-summary{flex:none;margin:0}
.counter-scroll{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain}
.counter-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px;border:1px solid #435369;border-radius:8px;padding:8px;margin-bottom:12px}
.counter-side{min-width:0}.counter-side h3{margin:0 0 6px;font-size:13px}.counter-five{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:4px}
.counter-member,.counter-member .card{min-width:0;width:100%}.counter-member .card{margin:0}.counter-member .portrait{width:100%;aspect-ratio:1;height:auto}
.counter-member .name{height:28px;line-height:14px;font-size:10px;white-space:normal;overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}
.counter-member .speed{font-size:10px;padding:2px}.counter-member .badge{width:19px;height:19px}.counter-member .cube{width:24px;height:24px;left:0;bottom:0;right:auto;top:auto;transform:translate(-25%,25%)}.counter-member .cube small{font-size:7px}.counter-member .evaluation-burst-charge{font-size:9px}.counter-member .link{width:19px;height:19px}
.counter-speed{display:block;text-align:center;font-size:10px;white-space:nowrap;line-height:16px}.counter-row-note{grid-column:1/-1;margin:2px 0;font-size:12px}.counter-row-note[data-favored=true]{color:#68e5ef}.counter-status{font-size:12px;min-height:32px}.counter-summary{font-size:17px;color:#68e5ef}.counter-dialog>.hint{margin:0;font-size:11px}.counter-dialog>.dialog-actions{flex-wrap:wrap}
@media(max-width:600px){.counter-row{grid-template-columns:minmax(0,1fr);gap:8px}.counter-dialog[open]{padding:8px}.counter-member .badge{width:17px;height:17px}.counter-member .speed{font-size:9px}.counter-member .evaluation-burst-charge{font-size:8px}}
.counter-board button:disabled{opacity:1}
.counter-goals{display:flex;gap:8px;margin:12px 0}.counter-goals button{flex:1;white-space:nowrap}.counter-goals button[aria-pressed=true]{color:#68e5ef;border-color:#68e5ef;background:#243e50}.counter-goal-hint{font-size:13px;line-height:1.5}
@media(max-width:400px){.counter-target-goals{gap:6px}.counter-target-goals button{padding:9px 6px;font-size:14px}}

/* 카운터 다섯 덱 전체를 화면 안에 맞추며 원본 결과 스크롤 위치는 유지합니다. */
.counter-overview-dialog[open]{height:100vh;position:fixed;inset:0;transform:none;margin:0;box-sizing:border-box;width:100vw;max-width:100vw;height:var(--view-height,100dvh);max-height:var(--view-height,100dvh);padding:8px;display:flex;flex-direction:column;gap:6px;overflow:hidden}
.counter-overview-dialog .dialog-head{flex:none;margin:0;min-width:0}.counter-overview-dialog .dialog-head h2{font-size:16px}
.counter-overview-body{flex:1;min-height:0;min-width:0;display:flex;align-items:center;justify-content:center;overflow:hidden}
.counter-overview-body canvas{flex:none;min-width:0;min-height:0;display:block;max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain}
.counter-dialog .dialog-head{gap:6px;min-width:0}.counter-dialog .dialog-head h2{min-width:0;font-size:clamp(14px,2vw,18px)}
.counter-dialog .counter-stop,.counter-dialog .counter-resume{flex:none;white-space:nowrap;font-size:12px;padding:6px 10px;margin:0}
.counter-dialog>.dialog-actions{position:static;min-height:0;padding:0;background:none;border:0}
.counter-required-run{flex:none;max-height:48px;overflow:auto;font-size:11px;line-height:16px;margin:0}

/* 우승확률의 양쪽 5덱 배치를 복사한 카운터 전용 진행 화면입니다. */
.counter-order{font-size:12px;margin:0;color:#68e5ef}.counter-order-history{font-size:11px;overflow-wrap:anywhere}.counter-order-history p{line-height:1.6}
.counter-live-board{height:100%;display:grid;grid-template-rows:repeat(5,minmax(0,1fr));min-height:220px;gap:2px}
.counter-live-board .counter-row{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:2px 8px;padding:2px 4px;margin:0;min-height:0;overflow:hidden}
.counter-live-board .counter-side h3{font-size:10px;margin:0 0 1px}.counter-live-board .counter-five{gap:2px;max-width:calc((100dvh - 280px)/5 * 5)}
.counter-live-board .counter-member .portrait{max-height:clamp(18px,calc((100dvh - 350px)/5),65px);aspect-ratio:1;width:auto;max-width:100%}
.counter-live-board .portrait>:not(.face){display:none}.counter-live-board .face{width:100%;height:100%;object-fit:cover}
.counter-live-board .counter-member .name,.counter-live-board .counter-speed{display:none}.counter-live-board .counter-row-note{font-size:9px;line-height:11px;margin:0}

.counter-live-board .counter-row[data-active=true]{border-color:#68e5ef;background:#203c4b}

.counter-searching{font-size:clamp(6px,1.6vw,10px);white-space:nowrap;word-break:keep-all;overflow:hidden;display:flex;align-items:center;justify-content:center}
.counter-order-controls{display:flex;align-items:center;gap:4px;flex-wrap:wrap;margin:6px 0}.counter-order-controls button,.counter-order-controls select{font-size:11px;padding:4px;min-width:0}.counter-order-controls select{flex:1}

.counter-five{position:relative}.counter-five.is-loser::after{content:'';position:absolute;pointer-events:none;z-index:20;left:0;right:0;top:50%;height:5px;background:#ff354d;box-shadow:0 0 2px #66000c;transform:translateY(-50%)}
.counter-live-board .portrait.jackal-linked{border-color:rgba(223,63,67,.5);box-shadow:0 0 0 1px rgba(223,63,67,.5)}

.counter-order-bar{display:flex;align-items:center;gap:6px;flex:none;min-width:0}.counter-order-bar .counter-order{flex:1;min-width:0}.counter-random{margin-left:auto;flex:none;font-size:11px;padding:4px 7px;white-space:nowrap}

.counter-activity{font-size:11px;margin:0;min-height:16px;color:#a8d6e5;padding-left:13px;position:relative}.counter-activity::before{content:'';position:absolute;left:0;top:3px;width:7px;height:7px;border:1px solid #68e5ef;border-right-color:transparent;border-radius:50%;animation:counter-response-spin .8s linear infinite}.counter-activity[data-waiting=true]{color:#ffdfa0}.counter-activity[data-stopped=true]::before{animation:none;border-color:#7e8d99}@keyframes counter-response-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.counter-activity::before{animation:none}}

.counter-cache-status{font-size:10px;color:#a8c2cf;margin:0;flex:none}

.counter-speed-option{display:flex;align-items:center;gap:7px;font-size:13px;margin:10px 0}.counter-speed-option input{width:16px;height:16px;flex:none}

/* 맞대결 정보 줄을 별도로 확보하여 승률 글자가 초상화에 밀려 잘리지 않게 합니다. */
.counter-dialog[open]{gap:4px}
.counter-dialog>.counter-eta{flex:none;margin:0;font-size:11px;line-height:15px}
.counter-dialog>.counter-status{min-height:0;line-height:15px}
.counter-live-board{min-height:280px}
.counter-live-board .counter-row{grid-template-rows:minmax(0,1fr) auto;row-gap:1px}
.counter-live-board .counter-side{display:flex;flex-direction:column;min-height:0}
.counter-live-board .counter-side h3{flex:none;line-height:12px}
.counter-live-board .counter-five{flex:1;min-height:0;grid-template-rows:minmax(0,1fr);container-type:size}
.counter-live-board .counter-five.is-loser::after{top:min(calc((100cqw - 8px)/10),calc((100cqh - 12px)/2),32.5px)}
.counter-live-board .counter-member,.counter-live-board .counter-member .card{min-height:0;height:100%}
.counter-live-board .counter-member .card{container-type:size}
.counter-live-board .counter-member .portrait{width:min(100cqw,calc(100cqh - 12px),65px);height:min(100cqw,calc(100cqh - 12px),65px);max-width:none;max-height:none;aspect-ratio:1;box-sizing:border-box;margin-inline:auto}
.counter-live-board .counter-row-note{min-height:12px;line-height:12px;white-space:normal;overflow-wrap:anywhere;overflow:visible}

/* 진행 문구의 줄 수가 변해도 덱 영역의 위치와 초상화 크기를 유지합니다. */
.counter-dialog .dialog-head h2{height:40px;line-height:20px;overflow:auto}
.counter-dialog>.counter-summary{display:block;height:60px;line-height:20px;overflow:auto}
.counter-run-info{flex:none;box-sizing:border-box;height:clamp(150px,28dvh,210px);overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable;display:flex;flex-direction:column;gap:3px}
.counter-run-info>p{flex:none;margin:0;font-size:11px;line-height:15px;overflow-wrap:anywhere}
.counter-run-info>.counter-status{min-height:0;font-size:12px;line-height:15px}
.counter-run-info>.counter-cache-status{font-size:10px}
.counter-order-bar{height:32px}
.counter-order-bar .counter-order{height:28px;line-height:14px;overflow:auto}
.counter-live-board .counter-row-note{height:24px;min-height:24px;max-height:24px;overflow:auto}
@media(min-width:600px){.counter-dialog>.counter-summary{height:40px}}
/* 작은 높이에서도 초상화를 알아볼 수 있는 공간은 남깁니다. */
.counter-live-board{min-height:330px}
@media(min-width:360px){.counter-dialog>.counter-summary{height:40px}.counter-live-board{min-height:290px}.counter-live-board .counter-row-note{height:12px;min-height:12px;max-height:12px}}

.counter-confirm .championship-duration{color:#ff6474;font-size:18px;font-weight:800;line-height:1.6;margin:16px 0}
.counter-trial-options{gap:4px}.counter-trial-options button{font-size:12px;padding:8px 3px;white-space:nowrap;line-height:1.3}.counter-trial-hint{font-size:12px;line-height:1.5;margin:4px 0 10px}

.saved-dialog .saved-b1-frame{position:absolute;left:0;right:0;top:-17px;height:14px;line-height:14px;text-align:center;font-size:12px;font-weight:800;color:#ff4b54;white-space:nowrap;pointer-events:none}

/* 카운터 B1 프레임은 초상화 바로 아래의 기존 여백에 표시합니다. */
.counter-live-board .portrait>.counter-b1-frame{display:block;position:absolute;top:calc(100% + 2px);left:50%;transform:translateX(-50%);height:10px;line-height:10px;font-size:9px;font-weight:700;color:#ff4b54;white-space:nowrap;pointer-events:none}

/* 최종 카운터 결과는 기존 카드 아이콘을 초상화 모서리에 표시합니다. */
.counter-dialog[data-run-state=complete] .counter-live-board .portrait{container-type:inline-size}
.counter-dialog[data-run-state=complete] .counter-live-board .portrait>:is(.weapon,.burst,.element){display:block;width:clamp(10px,25cqw,16px);height:clamp(10px,25cqw,16px)}
.counter-dialog[data-run-state=complete] .counter-live-board .portrait>.weapon{left:-2px;top:-2px;right:auto;bottom:auto}
.counter-dialog[data-run-state=complete] .counter-live-board .portrait>.burst{left:-2px;top:50%;right:auto;bottom:auto;transform:translateY(-50%)}
.counter-dialog[data-run-state=complete] .counter-live-board .portrait>.cube{display:grid;left:0;bottom:0;top:auto;right:auto;transform:translate(-25%,25%);width:clamp(12px,30cqw,20px);height:clamp(12px,30cqw,20px)}
.counter-dialog[data-run-state=complete] .counter-live-board .cube small{display:none}
.counter-dialog[data-run-state=complete] .counter-live-board .portrait>.element{right:-2px;bottom:-2px;left:auto;top:auto}
.counter-dialog[data-run-state=complete] .counter-live-board .portrait>.speed{display:block;top:-2px;right:-1px;left:auto;bottom:auto;min-width:0;min-height:0;width:auto;height:auto;font-size:clamp(8px,20cqw,11px);line-height:1.2;padding:0 1px;white-space:nowrap}

/* 실제로 교체된 실시간 카드만 짧게 전환하고, 같은 편성의 카드는 그대로 유지합니다. */
.victory-live .victory-member .card{animation:victory-live-card-enter .14s ease-out}
.victory-live .victory-frame{transition:border-color .14s ease-out,box-shadow .14s ease-out}
@keyframes victory-live-card-enter{from{opacity:.65;transform:translateY(2px)}to{opacity:1;transform:translateY(0)}}
@media(prefers-reduced-motion:reduce){.victory-live .victory-member .card{animation:none}.victory-live .victory-frame{transition:none}}

/* 5vs5는 양쪽 25명을 같은 화면에 유지하며 아이콘과 첫 버스트를 표시합니다. */
.five-toolbar { margin:0; }
.five-confirm[open] { display:flex; flex-direction:column; box-sizing:border-box; overflow:hidden; padding:12px; }
.five-confirm .dialog-head { flex:none; padding-bottom:8px; margin-bottom:8px; }
.five-confirm-body { min-height:0; overflow:auto; overscroll-behavior:contain; }
.five-confirm-body p { margin:6px 0; }
.five-confirm-footer { flex:none; min-width:0; padding-top:8px; border-top:1px solid #41536a; }
.five-confirm-footer .hint { margin:4px 0; font-size:11px; overflow-wrap:anywhere; }
.five-saved-list { display:block; width:100%; min-width:0; max-width:100%; margin-top:4px; padding:6px; text-overflow:ellipsis; }
.five-confirm-footer>label { min-width:0; }
.five-confirm-footer .dialog-actions { margin-top:6px; }
@media(max-height:450px){.five-confirm-body{max-height:45px}.five-confirm-footer .hint{font-size:10px;line-height:1.2}.five-confirm .dialog-head h2{font-size:16px}.five-confirm .dialog-head{padding-bottom:4px;margin-bottom:4px}}
.five-confirm .dialog-actions { justify-content:flex-end; }
.five-trial-setting { display:flex; align-items:center; gap:8px; }
.five-trial-setting select { width:auto; padding:5px 8px; }
.five-dialog[open] { position:fixed; inset:0; transform:none; box-sizing:border-box; margin:0; width:100vw; max-width:100vw; height:var(--view-height,100dvh); max-height:var(--view-height,100dvh); border:0; border-radius:0; }
.five-dialog .dialog-head { flex:none; flex-wrap:wrap; padding-bottom:3px; margin-bottom:3px; }
.five-summary { display:block; color:#00d9df; font-size:17px; }
.five-dialog>.five-summary { height:28px; min-height:28px; max-height:28px; line-height:14px; overflow:auto; }
.five-status,.five-detail,.five-clock,.five-order { font-size:11px; margin:3px 0; min-height:14px; overflow-wrap:anywhere; }
.five-dialog>.five-status { height:26px; min-height:26px; max-height:26px; line-height:13px; overflow:auto; }
.five-dialog>.five-detail { height:26px; min-height:26px; max-height:26px; line-height:13px; overflow:auto; }
.five-names { display:grid; grid-template-columns:1fr 1fr; gap:8px; height:16px; min-height:16px; font-size:12px; }
.five-names strong { min-width:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.five-order { flex:none; height:24px; min-height:24px; max-height:24px; line-height:12px; margin:2px 0; overflow:auto; }
.five-row { position:relative; display:grid; min-height:0; grid-template-columns:minmax(0,1fr) minmax(0,1fr); grid-template-rows:minmax(0,1fr) 16px; gap:2px 8px; border:1px solid #455b70; border-radius:6px; padding:2px 5px; margin:0; }
.five-side { min-width:0; min-height:0; display:flex; flex-direction:column; }
.five-side h3 { flex:none; display:block; height:12px; font-size:11px; line-height:12px; margin:0 0 12px; white-space:nowrap; }
.five-party-id { font-size:inherit; white-space:nowrap; }
.five-party-stats { display:inline; white-space:nowrap; font-variant-numeric:tabular-nums; }
.five-party-rate { color:#00efff; font-size:inherit; font-weight:800; line-height:inherit; }
.five-party-count { display:none; }
.five-team { position:relative; flex:1; display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); grid-template-rows:minmax(0,1fr); gap:3px; min-width:0; min-height:0; }
.five-team .card { min-width:0; min-height:0; width:100%; height:100%; margin:0; container-type:size; }
.five-team .portrait { position:relative; width:min(100cqw,max(8px,calc(100cqh - 13px)),72px); height:min(100cqw,max(8px,calc(100cqh - 13px)),72px); aspect-ratio:1; max-height:none; margin-inline:auto; overflow:visible; container-type:inline-size; box-sizing:border-box; }
.five-team .face { width:100%; height:100%; object-fit:cover; border-radius:5px; }
.five-team .portrait>.weapon,.five-team .portrait>.burst,.five-team .portrait>.element { display:block; width:clamp(9px,26cqw,17px); height:clamp(9px,26cqw,17px); z-index:3; }
.five-team .portrait>:is(.weapon,.burst) { display:grid; place-items:center; }
.five-team :is(.weapon-glyph,.burst-glyph) { display:block; min-width:0; min-height:0; }
.five-team .portrait>.weapon { left:-2px; top:-2px; right:auto; bottom:auto; }
.five-team .portrait>.burst { left:-2px; top:50%; right:auto; bottom:auto; transform:translateY(-50%); }
.five-team .portrait>.cube { display:grid; left:0; bottom:0; top:auto; right:auto; transform:translate(-25%,25%); width:clamp(20px,60cqw,42px); height:clamp(20px,60cqw,42px); z-index:3; }
.five-team .cube small { display:none; }
.five-team .portrait>.element { right:-2px; bottom:-2px; top:auto; left:auto; }
.five-team .portrait>.speed { opacity:1; display:block; top:-2px; right:-1px; bottom:auto; left:auto; min-width:0; min-height:0; padding:0 1px; width:auto; height:auto; font-size:clamp(8px,22cqw,12px); line-height:1.2; z-index:4; }
.five-team .portrait>:is(.weapon,.burst,.cube,.element,.speed),
.five-team .portrait>:is(.weapon,.burst,.cube,.element,.speed) img { opacity:1; }
.five-team .portrait>.five-frame { position:absolute; left:50%; transform:translateX(-50%); top:-12px; color:#ff4b54; font-size:clamp(9px,23cqw,12px); font-weight:800; line-height:12px; white-space:nowrap; z-index:5; }
.five-team .name { font-size:9px; line-height:12px; height:12px; min-height:12px; max-height:12px; margin-top:1px; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.five-team .evaluation-burst-charge { display:none; }
.five-team .link { opacity:1; width:clamp(9px,24cqw,15px); height:clamp(9px,24cqw,15px); }
.five-team.five-loser:after { content:""; position:absolute; left:0; right:0; top:var(--five-strike-y,16px); transform:translateY(-50%); height:4px; background:#ff4556; z-index:8; pointer-events:none; box-shadow:0 0 2px #000; }
.five-note { display:flex; align-items:center; gap:4px; grid-column:1/-1; font-size:9px; line-height:14px; height:16px; min-height:0; margin:0; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.five-controls { flex:none; display:flex; gap:16px; align-items:center; margin:2px 0; }
.five-controls[hidden] { display:none; }
.five-controls-main { display:flex; flex-wrap:wrap; align-items:center; gap:4px; min-width:0; }
.five-controls-pages { display:flex; flex:none; align-items:center; gap:4px; }
.five-controls button,.five-controls input { height:36px; box-sizing:border-box; font-size:14px; line-height:18px; }
.five-controls button { min-width:36px; padding:0 2px; white-space:nowrap; }
.five-controls input { width:70px; min-width:0; padding:4px; }
.five-controls .five-random { flex:none; margin-left:auto; }
.five-scroll { min-height:0; display:flex; flex-direction:column; overflow:hidden; }
.five-board { flex:1; min-height:0; width:100%; display:grid; grid-template-rows:repeat(5,minmax(0,1fr)); gap:2px; }
@media(max-width:600px) {
 .five-dialog { padding:7px; }
 .five-summary { font-size:14px; }
 .five-row { gap:2px 6px; padding:2px 4px; }
 .five-team { gap:3px; }
 .five-side h3 { font-size:10px; }
 .five-dialog .dialog-head h2 { font-size:17px; }
 .five-dialog .dialog-head button { font-size:12px; padding:7px; }
 .five-controls { margin:2px 0; }
 .five-dialog>.five-clock { margin:2px 0; }
}

@media(max-height:650px) {
 .five-dialog>.five-detail,.five-dialog>.five-clock { display:none; }
 .five-dialog>.five-summary { height:20px; min-height:20px; max-height:20px; line-height:20px; white-space:nowrap; }
 .five-dialog>.five-status { height:20px; min-height:20px; max-height:20px; line-height:20px; white-space:nowrap; }
}
@media(max-height:520px) {
 .five-dialog .dialog-head { padding-bottom:2px; margin-bottom:2px; }
 .five-dialog>.five-summary,.five-dialog>.five-status { height:16px; min-height:16px; max-height:16px; line-height:16px; margin:1px 0; }
 .five-dialog>.five-status,.five-dialog>.five-summary,.five-dialog .five-names { display:none; }
 .five-side h3 { margin-bottom:8px; }
 .five-dialog .dialog-head h2 { font-size:15px; }
 .five-dialog .dialog-head button { padding:4px; font-size:11px; }
 .five-team .name,.five-note { display:none; }
 .five-row { grid-template-rows:minmax(0,1fr); padding-bottom:6px; }
 .five-team .portrait { width:min(100cqw,100cqh,60px); height:min(100cqw,100cqh,60px); }
 .five-order { height:14px; min-height:14px; max-height:14px; white-space:nowrap; }
}

/* 실제 50개 맞대결 목록은 결과 배치 페이지와 분리해 조회합니다. */
.five-match-report[open]{position:fixed;inset:0;transform:none;margin:0;box-sizing:border-box;width:100vw;max-width:100vw;height:var(--view-height,100dvh);max-height:var(--view-height,100dvh);border:0;border-radius:0;padding:10px;overflow:hidden}
.five-match-report>.dialog-head,.five-match-report>.hint{flex:none;margin:0 0 6px}
.five-dialog .dialog-head .five-report-button{display:grid;place-items:center;box-sizing:border-box;padding:0;width:28px;height:28px;flex:none;color:#68e5ef}
.five-report-button svg{width:18px;height:18px;display:block}
.five-match-entry{border:1px solid #455b70;border-radius:6px;padding:6px;margin:0 0 8px}
.five-match-heading{display:flex;align-items:center;justify-content:space-between;gap:6px;font-size:12px;margin-bottom:6px}
.five-match-replay{flex:none;padding:3px 8px;color:#68e5ef}
/* 두 팀 각 5열의 간격과 이름 높이를 유지해 미리보기가 나타날 때 스크롤이 움직이지 않습니다. */
.five-match-preview{position:relative;padding-top:calc(clamp(0px,10% - 3.4px,64px) + 23px)}
.five-match-preview>.five-report-teams{position:absolute;inset:0}
.five-report-teams{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px}
.five-report-teams .five{min-width:0;gap:3px}
.five-report-teams .card{min-width:0;margin:0}
.five-report-teams .portrait{width:min(100%,64px);margin-inline:auto;container-type:inline-size}
.five-report-teams .portrait>.speed{top:-2px;right:-1px;min-width:0;min-height:0;width:auto;height:auto;padding:0 1px;font-size:clamp(8px,22cqw,11px);line-height:1.2}
.five-report-teams .portrait>:is(.weapon,.burst,.element){width:clamp(9px,26cqw,17px);height:clamp(9px,26cqw,17px)}
.five-report-teams .portrait>.cube{left:0;bottom:0;right:auto;top:auto;transform:translate(-25%,25%);width:clamp(10px,30cqw,21px);height:clamp(10px,30cqw,21px)}
.five-report-teams .cube small{display:none}
.five-report-teams .portrait>.link{width:clamp(10px,24cqw,16px);height:clamp(10px,24cqw,16px)}
.five-report-teams .name{font-size:9px;line-height:12px;height:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.five-report-teams :is(.cube,.speed,.link):disabled{opacity:1}
.five-match-rates{font-size:11px;color:#68e5ef;font-weight:700;margin:5px 0 0}

.five-score{color:#00efff;font-size:inherit;font-weight:800;white-space:nowrap}
@media(max-height:520px){.five-dialog[data-page="0"]>.five-summary{display:block}}

.five-note-text{flex:1;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.five-row-replay{position:relative;display:grid;place-items:center;flex:none;box-sizing:border-box;width:22px;height:16px;min-height:0;padding:0;border:1px solid #86bfd3;border-radius:3px;background:#29465c;color:#a5f4ff;font-size:10px;line-height:12px}
.five-row-replay[hidden]{display:none}
.five-row-replay::after{content:"";position:absolute;inset:-4px 0}
@media(max-height:520px){.five-dialog:not([data-page="0"]) .five-note:has(.five-row-replay:not([hidden])){display:flex;position:absolute;right:4px;bottom:2px;width:22px;overflow:visible}.five-dialog .five-note-text{display:none}}

.victory-speed-option,.shortest-speed-option{display:flex;align-items:center;gap:8px;margin:10px 0;font-size:14px}.victory-speed-option input[type=checkbox],.shortest-speed-option input[type=checkbox]{width:auto;min-width:0;flex:none;margin:0}
.victory-position-options{display:flex;align-items:center;flex-wrap:wrap;gap:0 16px}.victory-position-options .victory-speed-option{margin:6px 0}.victory-preserve-option[hidden]{display:none!important}

/* 배치 순서 전용 레이아웃입니다. 기존 5vs5 스타일과 분리합니다. */
.order-toolbar { margin:0; }
.order-saved-list { display:grid; gap:6px; max-height:35dvh; overflow:auto; }
.order-saved-list button[aria-pressed=true] { border-color:#00cbd3; background:#244c60; }
.order-confirm .dialog-actions { justify-content:flex-end; }
.order-trial-setting { display:flex; align-items:center; gap:8px; }
.order-trial-setting select { width:auto; padding:5px 8px; }
.order-dialog[open] { position:fixed; inset:0; transform:none; box-sizing:border-box; margin:0; width:100vw; max-width:100vw; height:var(--view-height,100dvh); max-height:var(--view-height,100dvh); border:0; border-radius:0; }
.order-dialog .dialog-head { flex:none; flex-wrap:wrap; padding-bottom:3px; margin-bottom:3px; }
.order-summary { display:block; color:#00d9df; font-size:17px; }
.order-dialog>.order-summary { height:28px; min-height:28px; max-height:28px; line-height:14px; overflow:auto; }
.order-status,.order-detail,.order-clock,.order-order { font-size:11px; margin:3px 0; min-height:14px; overflow-wrap:anywhere; }
.order-dialog>.order-status { height:26px; min-height:26px; max-height:26px; line-height:13px; overflow:auto; }
.order-dialog>.order-detail { height:26px; min-height:26px; max-height:26px; line-height:13px; overflow:auto; }
.order-names { display:grid; grid-template-columns:1fr 1fr; gap:8px; height:16px; min-height:16px; font-size:12px; }
.order-names strong { min-width:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.order-order { flex:none; height:24px; min-height:24px; max-height:24px; line-height:12px; margin:2px 0; overflow:auto; }
.order-row { position:relative; display:grid; min-height:0; grid-template-columns:minmax(0,1fr) minmax(0,1fr); grid-template-rows:minmax(0,1fr) 16px; gap:2px 8px; border:1px solid #455b70; border-radius:6px; padding:2px 5px; margin:0; }
.order-side { min-width:0; min-height:0; display:flex; flex-direction:column; }
.order-side h3 { flex:none; display:block; height:12px; font-size:11px; line-height:12px; margin:0 0 12px; white-space:nowrap; }
.order-party-id { font-size:inherit; white-space:nowrap; }
.order-party-stats { display:inline; white-space:nowrap; font-variant-numeric:tabular-nums; }
.order-party-rate { color:#00efff; font-size:inherit; font-weight:800; line-height:inherit; }
.order-party-count { display:none; }
.order-team { position:relative; flex:1; display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); grid-template-rows:minmax(0,1fr); gap:3px; min-width:0; min-height:0; }
.order-team .card { min-width:0; min-height:0; width:100%; height:100%; margin:0; container-type:size; }
.order-team .portrait { position:relative; width:min(100cqw,max(8px,calc(100cqh - 13px)),72px); height:min(100cqw,max(8px,calc(100cqh - 13px)),72px); aspect-ratio:1; max-height:none; margin-inline:auto; overflow:visible; container-type:inline-size; box-sizing:border-box; }
.order-team .face { width:100%; height:100%; object-fit:cover; border-radius:5px; }
.order-team .portrait>.weapon,.order-team .portrait>.burst,.order-team .portrait>.element { display:block; width:clamp(9px,26cqw,17px); height:clamp(9px,26cqw,17px); z-index:3; }
.order-team .portrait>:is(.weapon,.burst) { display:grid; place-items:center; }
.order-team :is(.weapon-glyph,.burst-glyph) { display:block; min-width:0; min-height:0; }
.order-team .portrait>.weapon { left:-2px; top:-2px; right:auto; bottom:auto; }
.order-team .portrait>.burst { left:-2px; top:50%; right:auto; bottom:auto; transform:translateY(-50%); }
.order-team .portrait>.cube { display:grid; left:0; bottom:0; top:auto; right:auto; transform:translate(-25%,25%); width:clamp(20px,60cqw,42px); height:clamp(20px,60cqw,42px); z-index:3; }
.order-team .cube small { display:none; }
.order-team .portrait>.element { right:-2px; bottom:-2px; top:auto; left:auto; }
.order-team .portrait>.speed { opacity:1; display:block; top:-2px; right:-1px; bottom:auto; left:auto; min-width:0; min-height:0; padding:0 1px; width:auto; height:auto; font-size:clamp(8px,22cqw,12px); line-height:1.2; z-index:4; }
.order-team .portrait>:is(.weapon,.burst,.cube,.element,.speed),
.order-team .portrait>:is(.weapon,.burst,.cube,.element,.speed) img { opacity:1; }
.order-team .portrait>.order-frame { position:absolute; left:50%; transform:translateX(-50%); top:-12px; color:#ff4b54; font-size:clamp(9px,23cqw,12px); font-weight:800; line-height:12px; white-space:nowrap; z-index:5; }
.order-team .name { font-size:9px; line-height:12px; height:12px; min-height:12px; max-height:12px; margin-top:1px; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.order-team .evaluation-burst-charge { display:none; }
.order-team .link { opacity:1; width:clamp(9px,24cqw,15px); height:clamp(9px,24cqw,15px); }
.order-team.order-loser:after { content:""; position:absolute; left:0; right:0; top:var(--order-strike-y,16px); transform:translateY(-50%); height:4px; background:#ff4556; z-index:8; pointer-events:none; box-shadow:0 0 2px #000; }
.order-note { display:flex; align-items:center; gap:4px; grid-column:1/-1; font-size:9px; line-height:14px; height:16px; min-height:0; margin:0; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.order-controls { flex:none; display:flex; gap:16px; align-items:center; margin:2px 0; }
.order-controls[hidden] { display:none; }
.order-controls-main { display:flex; flex-wrap:wrap; align-items:center; gap:4px; min-width:0; }
.order-controls-pages { display:flex; flex:none; align-items:center; gap:4px; }
.order-controls button,.order-controls input { height:36px; box-sizing:border-box; font-size:14px; line-height:18px; }
.order-controls button { min-width:36px; padding:0 2px; white-space:nowrap; }
.order-controls input { width:70px; min-width:0; padding:4px; }
.order-controls .order-random { flex:none; margin-left:auto; }
.order-scroll { min-height:0; display:flex; flex-direction:column; overflow:hidden; }
.order-board { flex:1; min-height:0; width:100%; display:grid; grid-template-rows:repeat(5,minmax(0,1fr)); gap:2px; }
@media(max-width:600px) {
 .order-dialog { padding:7px; }
 .order-summary { font-size:14px; }
 .order-row { gap:2px 6px; padding:2px 4px; }
 .order-team { gap:3px; }
 .order-side h3 { font-size:10px; }
 .order-dialog .dialog-head h2 { font-size:17px; }
 .order-dialog .dialog-head button { font-size:12px; padding:7px; }
 .order-controls { margin:2px 0; }
 .order-dialog>.order-clock { margin:2px 0; }
}

@media(max-height:650px) {
 .order-dialog>.order-detail,.order-dialog>.order-clock { display:none; }
 .order-dialog>.order-summary { height:20px; min-height:20px; max-height:20px; line-height:20px; white-space:nowrap; }
 .order-dialog>.order-status { height:20px; min-height:20px; max-height:20px; line-height:20px; white-space:nowrap; }
}
@media(max-height:520px) {
 /* 낮은 화면에서는 행 높이를 보존하고 결과 안에서 스크롤합니다. */
 .order-scroll { overflow-y:auto; overscroll-behavior:contain; }
 .order-board { flex:none; grid-template-rows:repeat(5,minmax(80px,auto)); }
 .order-dialog .dialog-head { padding-bottom:2px; margin-bottom:2px; }
 .order-dialog>.order-summary,.order-dialog>.order-status { height:16px; min-height:16px; max-height:16px; line-height:16px; margin:1px 0; }
 .order-dialog>.order-status,.order-dialog>.order-summary,.order-dialog .order-names { display:none; }
 .order-side h3 { margin-bottom:8px; }
 .order-dialog .dialog-head h2 { font-size:15px; }
 .order-dialog .dialog-head button { padding:4px; font-size:11px; }
 .order-team .name,.order-note { display:none; }
 .order-row { grid-template-rows:minmax(0,1fr); padding-bottom:6px; }
 .order-team .portrait { width:min(100cqw,100cqh,60px); height:min(100cqw,100cqh,60px); }
 .order-order { height:14px; min-height:14px; max-height:14px; white-space:nowrap; }
}

/* 실제 50개 맞대결 목록은 결과 배치 페이지와 분리해 조회합니다. */
.order-match-report[open]{position:fixed;inset:0;transform:none;margin:0;box-sizing:border-box;width:100vw;max-width:100vw;height:var(--view-height,100dvh);max-height:var(--view-height,100dvh);border:0;border-radius:0;padding:10px;overflow:hidden}
.order-match-report>.dialog-head,.order-match-report>.hint{flex:none;margin:0 0 6px}
.order-dialog .dialog-head .order-report-button{display:grid;place-items:center;box-sizing:border-box;padding:0;width:28px;height:28px;flex:none;color:#68e5ef}
.order-report-button svg{width:18px;height:18px;display:block}
.order-match-entry{border:1px solid #455b70;border-radius:6px;padding:6px;margin:0 0 8px}
.order-match-heading{display:flex;align-items:center;justify-content:space-between;gap:6px;font-size:12px;margin-bottom:6px}
.order-match-replay{flex:none;padding:3px 8px;color:#68e5ef}
.order-report-teams{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px}
.order-report-teams .five{min-width:0;gap:3px}
.order-report-teams .card{min-width:0;margin:0}
.order-report-teams .portrait{width:min(100%,64px);margin-inline:auto;container-type:inline-size}
.order-report-teams .portrait>.speed{top:-2px;right:-1px;min-width:0;min-height:0;width:auto;height:auto;padding:0 1px;font-size:clamp(8px,22cqw,11px);line-height:1.2}
.order-report-teams .portrait>:is(.weapon,.burst,.element){width:clamp(9px,26cqw,17px);height:clamp(9px,26cqw,17px)}
.order-report-teams .portrait>.cube{left:0;bottom:0;right:auto;top:auto;transform:translate(-25%,25%);width:clamp(10px,30cqw,21px);height:clamp(10px,30cqw,21px)}
.order-report-teams .cube small{display:none}
.order-report-teams .portrait>.link{width:clamp(10px,24cqw,16px);height:clamp(10px,24cqw,16px)}
.order-report-teams .name{font-size:9px;line-height:12px;height:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.order-report-teams :is(.cube,.speed,.link):disabled{opacity:1}
.order-match-rates{font-size:11px;color:#68e5ef;font-weight:700;margin:5px 0 0}

.order-score{color:#00efff;font-size:inherit;font-weight:800;white-space:nowrap}
@media(max-height:520px){.order-dialog[data-page="0"]>.order-summary{display:block}}

.order-note-text{flex:1;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.order-row-replay{position:relative;display:grid;place-items:center;flex:none;box-sizing:border-box;width:22px;height:16px;min-height:0;padding:0;border:1px solid #86bfd3;border-radius:3px;background:#29465c;color:#a5f4ff;font-size:10px;line-height:12px}
.order-row-replay[hidden]{display:none}
.order-row-replay::after{content:"";position:absolute;inset:-4px 0}
@media(max-height:520px){.order-dialog:not([data-page="0"]) .order-note:has(.order-row-replay:not([hidden])){display:flex;position:absolute;right:4px;bottom:2px;width:22px;overflow:visible}.order-dialog .order-note-text{display:none}}


.order-speed-option{display:flex;align-items:center;gap:8px;margin:10px 0}.order-speed-option input{width:auto}.order-controls{display:flex;flex-wrap:wrap;gap:4px;flex:none}.order-controls select{min-width:0;max-width:44%;font-size:11px;padding:4px}.order-controls button{font-size:11px;padding:4px}.order-cache-hint{color:#ffcf9d}.order-dialog>.order-clock{font-size:10px;line-height:14px;height:28px;min-height:28px;overflow:auto;margin:0}.order-dialog .order-names{font-size:10px}.order-dialog>.order-status{height:26px;min-height:26px}.order-dialog>.order-summary{font-size:13px}.order-speed-option input[type=checkbox]{width:16px;height:16px}.order-dialog .order-note{font-size:9px}
/* 낮은 가로 화면에서도 진행·경과 정보는 유지하고 숨긴 설명 줄 공간을 회수합니다. */
.order-dialog>.order-clock{display:block}
@media(max-height:520px){
 .order-dialog>.order-status{display:block;height:14px;min-height:14px;max-height:14px;line-height:14px;font-size:10px;margin:0}
 .order-dialog>.order-summary{display:block;height:16px;min-height:16px;max-height:16px;line-height:16px;font-size:11px;margin:0}
 .order-dialog>.order-clock{height:14px;min-height:14px;max-height:14px;line-height:14px;font-size:9px}
 .order-row{grid-template-rows:minmax(0,1fr)}
}

/* 0번은 특정 상대 초상화를 대표로 사용하지 않는 전체 통계입니다. */
.order-pages{display:flex;align-items:center;gap:4px;min-width:0;max-width:54%}
.order-pages select{max-width:none;flex:1;width:150px;min-width:0}
.order-pages .order-page-button{flex:none;min-width:26px;width:26px;height:28px;padding:0}
.order-controls>select{max-width:40%}
.order-aggregate-detail{flex:1;display:flex;flex-direction:column;justify-content:center;gap:3px;min-height:0;color:#b7cfdb;font-size:11px;text-align:center}
.order-aggregate-detail strong{color:#00efff;font-size:12px}
@media(max-height:520px){.order-aggregate-detail{font-size:9px;gap:0}.order-aggregate-detail strong{font-size:10px}.order-aggregate-detail span:last-child{display:none}}

.order-party-report{display:inline-grid;place-items:center;width:17px;height:17px;min-width:17px;min-height:0;padding:1px;margin-left:4px;vertical-align:middle;border:1px solid #648ea3;border-radius:3px;background:#29465c;color:#9ceaf0}
.order-party-report svg{display:block;width:13px;height:13px}
.order-party-report:disabled{opacity:.4}
.order-match-report .report-entry-head{align-items:center;flex-wrap:wrap;gap:4px}
.order-match-report .report-entry-head h3{overflow-wrap:anywhere;min-width:0;flex:1}
.order-match-report .evaluation-report-entry[data-current=true]{border-color:#68e5ef}

/* 5vs5의 초상화 배치를 복사한 카운터 완료 전용 스타일입니다. */
.counter-dialog[data-run-state=complete] .dialog-head h2{height:auto;min-height:20px;line-height:20px}
.counter-dialog[data-run-state=complete]>.counter-summary{height:40px;min-height:40px;max-height:40px;line-height:20px;font-size:14px}
.counter-dialog[data-run-state=complete] .counter-run-info{height:64px;min-height:0}
.counter-dialog[data-run-state=complete] .counter-scroll{display:flex;flex-direction:column;overflow:visible}
.counter-dialog[data-run-state=complete] .counter-order-history{flex:none;max-height:64px;overflow:auto}
.counter-dialog[data-run-state=complete] .counter-live-board{height:auto;flex:1;min-height:0;gap:2px;width:100%}
.counter-dialog[data-run-state=complete] .counter-row{grid-template-rows:minmax(0,1fr) 16px;gap:2px 8px;padding:2px 5px;overflow:visible;border-radius:6px}
.counter-dialog[data-run-state=complete] .counter-side h3{flex:none;display:block;height:12px;font-size:11px;line-height:12px;margin:0 0 12px;white-space:nowrap}
.counter-dialog[data-run-state=complete] .counter-five{max-width:none;width:100%;gap:3px;min-width:0;container-type:normal}
.counter-dialog[data-run-state=complete] .counter-member .card{width:100%;height:100%;min-width:0;min-height:0;container-type:size}
.counter-dialog[data-run-state=complete] .counter-live-board .portrait{position:relative;width:min(100cqw,max(8px,calc(100cqh - 13px)),72px);height:min(100cqw,max(8px,calc(100cqh - 13px)),72px);aspect-ratio:1;max-width:none;max-height:none;margin-inline:auto;overflow:visible;container-type:inline-size;box-sizing:border-box}
.counter-dialog[data-run-state=complete] .counter-live-board .face{width:100%;height:100%;object-fit:cover;border-radius:5px}
.counter-dialog[data-run-state=complete] .counter-live-board .portrait>:is(.weapon,.burst,.element){display:block;width:clamp(9px,26cqw,17px);height:clamp(9px,26cqw,17px);z-index:3}
.counter-dialog[data-run-state=complete] .counter-live-board .portrait>:is(.weapon,.burst){display:grid;place-items:center}
.counter-dialog[data-run-state=complete] .counter-live-board :is(.weapon-glyph,.burst-glyph){display:block;min-width:0;min-height:0}
.counter-dialog[data-run-state=complete] .counter-live-board .portrait>.cube{left:0;bottom:0;right:auto;top:auto;transform:translate(-25%,25%);width:clamp(20px,60cqw,42px);height:clamp(20px,60cqw,42px);z-index:3}
.counter-dialog[data-run-state=complete] .counter-live-board .portrait>.speed{font-size:clamp(8px,22cqw,12px);z-index:4}
.counter-dialog[data-run-state=complete] .counter-live-board .portrait>:is(.weapon,.burst,.cube,.element,.speed),
.counter-dialog[data-run-state=complete] .counter-live-board .portrait>:is(.weapon,.burst,.cube,.element,.speed) img{opacity:1}
.counter-dialog[data-run-state=complete] .counter-live-board .portrait>.counter-b1-frame{top:-12px;height:12px;line-height:12px;font-size:clamp(9px,23cqw,12px);font-weight:800;z-index:5}
.counter-dialog[data-run-state=complete] .counter-live-board .counter-member .name{display:block;font-size:9px;line-height:12px;height:12px;min-height:12px;max-height:12px;margin-top:1px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.counter-dialog[data-run-state=complete] .counter-live-board .evaluation-burst-charge{display:none}
.counter-dialog[data-run-state=complete] .counter-live-board .link{display:block;opacity:1;width:clamp(9px,24cqw,15px);height:clamp(9px,24cqw,15px)}
.counter-dialog[data-run-state=complete] .counter-live-board .counter-five.is-loser::after{top:var(--counter-strike-y,16px);height:4px;background:#ff4556;z-index:8}
.counter-dialog[data-run-state=complete] .counter-row-note{height:16px;min-height:0;max-height:16px;line-height:14px;margin:0;font-size:9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
@media(max-width:600px){.counter-dialog[data-run-state=complete]{padding:7px}.counter-dialog[data-run-state=complete] .counter-row{column-gap:6px;padding:2px 4px}}
@media(max-height:520px){.counter-dialog[data-run-state=complete] .counter-run-info{display:none}.counter-dialog[data-run-state=complete]>.counter-summary{height:20px;min-height:20px;max-height:20px;font-size:12px}.counter-dialog[data-run-state=complete] .counter-row{grid-template-rows:minmax(0,1fr) 12px}.counter-dialog[data-run-state=complete] .counter-row-note{height:12px;max-height:12px;font-size:8px}.counter-dialog[data-run-state=complete]>.dialog-actions button{padding:5px 8px;font-size:12px}}

/* 배치 순서의 작은 초상화에서는 반격 충전 표시를 링크와 같은 크기로 맞춥니다. */
:is(.order-team,.order-report-teams) .portrait>.scarlet-counter-toggle{width:clamp(9px,24cqw,15px);height:clamp(9px,24cqw,15px);right:-2px}
:is(.order-team,.order-report-teams) .portrait>.link{width:clamp(9px,24cqw,15px);height:clamp(9px,24cqw,15px);top:-3px}

/* 5vs5 계산 완료 후 양쪽 파티 종합 승률 옆에서 해당 대결만 확인합니다. */
.five-party-report-button{display:inline-grid;place-items:center;width:14px;height:14px;min-width:14px;min-height:0;padding:0;margin-left:3px;vertical-align:middle;line-height:1;border:1px solid #648ea3;border-radius:3px;background:#29465c;color:#9ceaf0}.five-party-report-button svg{display:block;width:11px;height:11px}.five-party-report .report-summary{color:#00efff;font-weight:700}

/* 현재 앱 버전을 P1~P5와 같은 줄의 맨 왼쪽에 표시합니다. */
.tabs{position:relative;justify-content:center}.tabs .party-version{position:absolute;left:0;top:50%;transform:translateY(-50%);white-space:nowrap;color:#aebdcc;font:700 12px/20px system-ui,sans-serif;text-decoration:underline;text-underline-offset:3px}.tabs .party-version:focus-visible{outline:2px solid #61dbea;outline-offset:3px}@media(max-width:360px){.tabs{gap:4px}.tabs button[data-party]{flex-basis:36px;width:36px;padding-left:4px;padding-right:4px}}
/* 승리플랜의 읽기 전용 초상화는 스킬 상세만 열 수 있습니다. */
.victory-progress .skill-preview .portrait{pointer-events:auto;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
/* 긴 안내를 펼쳐도 계산 시작 버튼은 확인 창 하단에 고정합니다. */
.victory-confirm[open]{display:flex;flex-direction:column;box-sizing:border-box;max-height:calc(100dvh - 24px);overflow:hidden}
.victory-confirm>.dialog-head,.victory-confirm>.dialog-actions{flex:none}
.victory-confirm>.dialog-head{margin-bottom:8px;padding-bottom:8px}
/* 자동 높이 dialog에서 Safari가 본문의 0% flex-basis를 0px로 축소하지 않게 합니다. */
.victory-confirm-body{flex:1 1 auto;min-height:0;overflow:auto;overscroll-behavior:contain}
.victory-confirm-body>p{margin:6px 0;font-size:13px;line-height:1.4}
.victory-confirm-body .shortest-stages{margin:10px 0}
.victory-confirm-body .shortest-excluded-summary{max-height:3.9em;overflow:auto}
.victory-confirm-guide{margin-top:8px;font-size:12px;color:#aeb7c8}
.victory-confirm-guide summary{cursor:pointer}
.victory-confirm>.dialog-actions{margin-top:10px;padding-top:8px;border-top:1px solid #41536a;justify-content:flex-end}
.victory-confirm .shortest-error:empty{display:none}

/* 임시 상대 포함 안내는 기존 제목 영역 안에서만 줄바꿈합니다. */
.dialog-head.has-temporary-notice{flex-wrap:wrap}
.temporary-opponents-notice{flex:0 0 100%;min-width:0;margin:2px 0;color:#ff7474;font-size:11px;font-weight:700;line-height:16px;overflow-wrap:anywhere}
.report-temporary{color:#ff7474!important}

.server-weights-notice{flex:0 0 100%;min-width:0;margin:2px 0;color:#aec9dc;font-size:11px;line-height:16px;overflow-wrap:anywhere}

/* 오른쪽 1버스트 라벨은 비활성 초상화 버튼 밖에 두어 펼치기 버튼을 누를 수 있게 합니다. */
.evaluation-party .slot-cell > .evaluation-portrait-frame {
  top: 50%; bottom: auto; transform: translateY(-50%);
  height: 18px; margin: 0; z-index: 15;
  pointer-events: none;
  font-size: clamp(9px, 24cqw, 14px);
}
.evaluation-portrait-frame .frame-value {
  padding: 2px 3px; border-radius: 3px;
  background: rgb(0 0 0 / 65%); text-shadow: 0 1px 3px #000;
}
.burst-details-toggle {
  flex: 0 0 14px; width: 14px; height: 16px; min-height: 0;
  padding: 0; margin: 0; border: 1px solid #bd5963; border-radius: 3px;
  background: #21191bdd; color: #ff7880; font-size: 9px; line-height: 14px;
  cursor: pointer; pointer-events: auto;
}
.evaluation-burst-popup {
  box-sizing: border-box; width: min(620px, calc(100vw - 24px));
  max-width: calc(100vw - 24px); max-height: min(80dvh, 700px);
  margin: auto; padding: 12px; overflow: auto;
}
.evaluation-burst-popup .dialog-head h2 {font-size:25px;color:#ff7880;font-weight:800;font-variant-numeric:tabular-nums;min-width:0}
.evaluation-burst-popup .dialog-head {flex-wrap:wrap;gap:6px}
.burst-popup-baseline {margin:4px 0 8px;color:#ff7880;font-weight:700}
.burst-popup-values {list-style:none;padding:0;margin:0}
.burst-popup-values li {display:flex;align-items:baseline;gap:12px;padding:7px 0;border-top:1px solid #425366;font-size:12px}
.burst-popup-values strong {flex:none;min-width:48px;color:#ff7880}
.burst-popup-values span {min-width:0;overflow-wrap:anywhere}
.burst-popup-note {font-size:11px;color:#aab8c8;margin:8px 0 0}
.burst-popup-guide {font-size:12px;line-height:1.6;color:#c5d1df;margin:8px 0 12px}
.burst-popup-order {font-weight:700;margin:0 0 3px;overflow-wrap:anywhere}
.burst-popup-base-order {margin-top:7px;font-size:14px}
.burst-popup-changed {margin:0 0 3px;color:#ff9aa0}
.burst-popup-values .burst-popup-delta {display:block;max-width:76px;white-space:normal;font-size:10px;line-height:1.5;color:#bac8d8;font-weight:400}
.burst-popup-reasons {min-width:0;flex:1;overflow-wrap:anywhere;line-height:1.6}
.burst-popup-case {margin-top:6px}
.burst-popup-case summary {cursor:pointer;color:#d7e4f4;padding:5px 0}
.burst-popup-case p {margin:6px 0;font-size:12px}
.burst-popup-case .burst-popup-opponent {color:#aab8c8;font-size:11px}

/* 표시용 프레임 영역은 보고서 버튼의 입력을 가로채지 않습니다. 펼치기 버튼은 자체 pointer-events를 유지합니다. */
.evaluation-party .burst-frame { z-index: 6; pointer-events: none; }

.five-fixed-order { display:flex; align-items:center; gap:7px; margin:6px 0; font-size:13px; }
.five-fixed-order input { flex:none; width:16px; height:16px; margin:0; }

@media(max-height:650px){
 .five-dialog[data-fixed-order="true"] .five-side h3 { margin-bottom:8px; }
 .five-dialog[data-fixed-order="true"] .five-team .name { display:none; }
 .five-dialog[data-fixed-order="true"] .five-team .portrait { width:min(100cqw,max(8px,100cqh),72px);height:min(100cqw,max(8px,100cqh),72px); }
}

/* 실행 버튼은 창 안에 유지하고 긴 평가 안내만 스크롤합니다. */
.evaluation-confirm[open] {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 16px;
}
.evaluation-confirm > .dialog-head,
.evaluation-confirm > .dialog-actions {
  flex: none;
}
.evaluation-confirm .dialog-head {
  gap: 8px;
  margin-bottom: 10px;
  padding-bottom: 10px;
}
.evaluation-confirm .dialog-head h2 {
  min-width: 0;
  font-size: 17px;
  overflow-wrap: anywhere;
}
.evaluation-confirm-body {
  min-height: 0;
  min-width: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.evaluation-confirm > .dialog-actions {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #41536a;
  flex-wrap: wrap;
}
.evaluation-confirm > .dialog-actions button {
  min-width: 0;
  max-width: 100%;
  white-space: normal;
}

/* 기본 1버스트 상세 버튼은 초상화 열의 폭 안에서 표시합니다. */
.editor .burst-frame:has(.burst-details-toggle){min-width:0;gap:2px}
.editor .burst-frame:has(.burst-details-toggle) .frame-value{font-size:clamp(8px,2.8vw,14px)}
.editor .partial-burst-frame:has(.burst-details-toggle) .frame-value{font-size:clamp(7px,2.5vw,14px)}

/* 옵션이 늘어나거나 안내를 펼쳐도 시작·취소는 화면 안에 유지합니다. */
.shortest-confirm[open]{display:flex;flex-direction:column;box-sizing:border-box;max-height:calc(100dvh - 24px);overflow:hidden}
.shortest-confirm>.dialog-head,.shortest-confirm>.dialog-actions{flex:none}
.shortest-confirm>.dialog-head{margin-bottom:8px;padding-bottom:8px}
.shortest-confirm-body{flex:1 1 auto;min-height:0;overflow:auto;overscroll-behavior:contain}
.shortest-confirm-body>p{margin:6px 0;font-size:13px;line-height:1.4}
.shortest-confirm-body .shortest-excluded-summary{max-height:3.9em;overflow:auto}
.shortest-confirm-guide{margin-top:8px;font-size:12px;color:#aeb7c8}
.shortest-confirm-guide summary{cursor:pointer}
.shortest-confirm>.dialog-actions{margin-top:10px;padding-top:8px;border-top:1px solid #41536a;justify-content:flex-end}
.shortest-confirm .shortest-error:empty{display:none}
.shortest-confirm .shortest-target-option{display:grid;grid-template-columns:minmax(0,1fr) minmax(104px,8rem);align-items:center;gap:8px;margin:10px 0 0;font-weight:700}
.shortest-target-option input{box-sizing:border-box;min-width:0;padding:6px 8px;font-size:16px}
.shortest-target-dialog[open]{display:flex;flex-direction:column;position:fixed;inset:calc(var(--view-top,0px) + 12px) 0 auto;transform:none;margin:0 auto;width:min(540px,calc(100vw - 12px));max-height:calc(var(--view-height,100dvh) - 24px);padding:10px;overflow:hidden}
.shortest-target-dialog[open][data-has-candidates="true"]{height:calc(var(--view-height,100dvh) - 24px)}
.shortest-target-dialog>.dialog-head{flex:none;margin-bottom:8px;padding-bottom:8px}
.shortest-target-dialog>.dialog-actions{flex:none;flex-wrap:wrap}
.shortest-target-eta{flex:none;box-sizing:border-box;height:32px;margin:0 0 6px;font-size:12px;line-height:16px;overflow:auto;overflow-wrap:anywhere;overscroll-behavior:contain}
.shortest-target-diagnostics{flex:none;margin:0 0 6px;font-size:11px;line-height:1.45;overflow-wrap:anywhere}
.shortest-target-diagnostics summary{cursor:pointer}
.shortest-target-filter:not([hidden]){display:flex;align-items:center;gap:8px;flex:none;margin:0 0 6px}
.shortest-target-filter input{flex:1;min-width:0;padding:5px 7px;font-size:16px}
.shortest-target-filter output{flex:none;font-size:11px;white-space:nowrap}
.shortest-target-status{flex:none;box-sizing:border-box;height:48px;min-height:48px;margin:0 0 6px;overflow-y:auto;font-size:12px;line-height:16px;overscroll-behavior:contain}
.shortest-target-results:not([hidden]){display:block;flex:1 1 auto;min-height:0;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;overflow-anchor:none;touch-action:pan-y;-webkit-overflow-scrolling:touch}
.shortest-target-choice{min-width:0;margin:0 0 6px;padding:6px;border:1px solid #41536a;border-radius:6px}
.shortest-target-choice:last-child{margin-bottom:0}
.shortest-target-choice:has(input:checked){border-color:#81e8e2;background:#203842}
.shortest-target-heading{display:flex;align-items:center;justify-content:space-between;gap:6px;min-width:0}
.shortest-target-heading .shortest-target-select{min-width:0;font-size:clamp(11px,3.4vw,15px);white-space:nowrap}
.shortest-target-score{flex:none;font-size:clamp(10px,3.2vw,13px);font-weight:700;font-variant-numeric:tabular-nums;white-space:nowrap;color:#bac8d5}
.shortest-target-score[data-state="ready"]{color:#5fe0eb}
.shortest-target-score[data-state="error"]{color:#ffb7a9}
.shortest-target-evaluation-hint{flex:none;margin:0 0 6px;font-size:11px}
.shortest-target-choice .shortest-target-select{display:flex;align-items:center;gap:6px;margin:0;cursor:pointer}
.shortest-target-select input{width:auto;margin:0;accent-color:#65dfec}
.shortest-target-preview{padding-inline:3px;cursor:pointer;touch-action:pan-y}
.shortest-target-preview .five{pointer-events:none}
.shortest-target-preview .slot-cell{min-width:0;container-type:inline-size}
.editor.shortest-target-preview .portrait{container-type:normal;touch-action:pan-y}
.shortest-target-preview button:disabled{opacity:1}
.shortest-target-preview .speed{min-width:0;font-size:clamp(10px,32cqw,16px)}

/* 차속작은 원본 장비를 읽는 독립 안내이며 결과 영역만 스크롤합니다. */
.charge-workshop-dialog[open]{display:flex;flex-direction:column;position:fixed;inset:calc(var(--view-top,0px) + 6px) 0 auto;transform:none;margin:0 auto;box-sizing:border-box;width:min(760px,calc(100vw - 10px));height:calc(var(--view-height,100dvh) - 12px);max-height:calc(var(--view-height,100dvh) - 12px);overflow:hidden;padding:10px}
.charge-workshop-dialog>.dialog-head{flex:none;margin-bottom:5px;padding-bottom:5px}.charge-workshop-dialog>.dialog-head h2{font-size:17px;line-height:24px}.charge-workshop-dialog>.dialog-head button{padding:5px 9px;font-size:12px;line-height:22px}.charge-workshop-guide{flex:none;margin:0 0 7px;font-size:11px;line-height:18px;color:#8edbd6;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.charge-workshop-hidden,.charge-workshop-controls legend{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);clip-path:inset(50%);white-space:nowrap;border:0}
.charge-workshop-controls{flex:none}.charge-workshop-controls fieldset{min-width:0;padding:0;margin:0;border:0}.charge-workshop-targets{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}.charge-workshop-targets button{min-width:0;padding:6px 4px;font-size:13px;line-height:20px;white-space:nowrap}
.charge-workshop-filterline{display:flex;flex-direction:column;align-items:stretch;gap:2px;margin:7px 0;white-space:nowrap}.charge-workshop-weapons,.charge-workshop-options{display:flex;align-items:center;gap:14px;min-height:30px;min-width:0}.charge-workshop-filter-title{flex:0 0 26px;font-size:11px;color:#aebfce}.charge-workshop-filterline label{display:flex;align-items:center;gap:6px;margin:0;padding:0;min-height:30px;font-size:12px;line-height:20px;white-space:nowrap}.charge-workshop-filterline input[type=checkbox]{box-sizing:border-box;display:block;flex:0 0 16px;width:16px;height:16px;min-width:16px;margin:0;padding:0;border:0;appearance:auto;accent-color:#20c5d8}
.charge-workshop-tools{display:flex;align-items:center;gap:6px;margin-bottom:5px;flex:none}.charge-workshop-tools input{flex:1;min-width:0;font-size:16px;line-height:22px;padding:5px 7px}.charge-workshop-tools button{flex:none;padding:7px 6px;font-size:11px;line-height:18px;white-space:nowrap}
.charge-workshop-criteria{position:relative;flex:none;font-size:11px;color:#afc2d2}.charge-workshop-criteria>summary{cursor:pointer;white-space:nowrap;padding:7px 5px;line-height:18px;border:1px solid #40576c;border-radius:4px}.charge-workshop-criteria-body{position:absolute;right:0;top:100%;z-index:5;box-sizing:border-box;width:min(620px,calc(100vw - 34px));max-height:260px;overflow:auto;padding:10px;border:1px solid #536c80;border-radius:5px;background:#162633;box-shadow:0 5px 18px #0008;line-height:1.6}.charge-workshop-criteria-body p{margin:0 0 8px}.charge-workshop-origin{color:#bdd0de}.charge-workshop-references{display:flex;gap:10px;flex-wrap:wrap}.charge-workshop-references a{color:#8ce5df}
.charge-workshop-status{flex:none;min-height:18px;margin:0 0 6px;font-size:11px;line-height:18px;color:#b7cedc;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.charge-workshop-status[data-state=error]{color:#ffb2a8}
.jackal-link-dialog{width:min(620px,94vw);box-sizing:border-box}.jackal-link-dialog p{margin:10px 0;line-height:1.5}.jackal-link-basis,.jackal-link-note{font-size:12px;color:#b4c8d7}.jackal-link-preview{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:4px;padding-top:8px}.jackal-link-preview .slot{min-width:0}.jackal-link-empty{border:1px dashed #52677b;border-radius:5px}.jackal-link-attacks{padding:0;list-style:none;margin:12px 0}.jackal-link-attacks li{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px 8px;padding:8px;border-bottom:1px solid #40566a;font-size:13px}.jackal-link-attacks strong{min-width:0;overflow-wrap:anywhere}.jackal-link-attacks small{grid-column:1/-1;color:#b4c8d7;font-size:11px}.jackal-link-attacks .is-target{background:#26303e;border-left:3px solid #e86478}.jackal-link-attacks b{font-variant-numeric:tabular-nums;color:#87e6e6}.jackal-link-error a{color:#81e8e2}
.jackal-link-attacks li{grid-template-columns:minmax(0,1fr)}.jackal-link-numbers{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.jackal-link-numbers>span{display:flex;align-items:baseline;justify-content:space-between;gap:4px;min-width:0}.jackal-link-stat-label{font-size:10px;color:#b4c8d7}.jackal-link-numbers b{font-size:13px;white-space:nowrap}
.charge-workshop-results{display:block;flex:1 1 auto;min-height:0;overflow-x:hidden;overflow-y:auto;touch-action:pan-y;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding-right:2px}
.charge-workshop-character{margin:0 0 8px;padding:8px;border:1px solid #40576c;border-radius:6px;background:#182634;min-width:0}.charge-workshop-character-head{display:flex;align-items:center;gap:8px;min-width:0;min-height:40px}.charge-workshop-face{width:40px;height:40px;object-fit:cover;flex:none;border:1px solid #536b7c;border-radius:5px}.charge-workshop-character-head>div{flex:1;min-width:0}.charge-workshop-character h3{margin:0;font-size:14px;line-height:20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.charge-workshop-weapon{margin:0;font-size:11px;line-height:16px;color:#b4c7d5}.charge-workshop-total{margin:4px 0 2px;font-size:13px;line-height:18px;font-weight:700;font-variant-numeric:tabular-nums}.charge-workshop-badge{flex:none;font-size:11px;line-height:18px;color:#70e4e5}.charge-workshop-cube{margin:2px 0 4px;font-size:11px;line-height:16px;color:#dfca92}
.charge-workshop-gears{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;margin:4px 0;padding:0}.charge-workshop-gears>div{box-sizing:border-box;min-width:0;min-height:38px;padding:2px 1px;background:#12202d;border:1px solid #324657;border-radius:4px;text-align:center;white-space:nowrap}.charge-workshop-gears dt{margin:0;font-size:11px;line-height:14px;color:#a8bccd}.charge-workshop-gears dd{display:block;margin:0;font-size:12px;line-height:18px;font-variant-numeric:tabular-nums}.charge-workshop-gears .is-changed{border-color:#4aa5af}.charge-workshop-next{font-weight:700;color:#7ce8e9}
.charge-workshop-character>.charge-workshop-action{margin:4px 0;font-size:12px;line-height:18px;color:#8ce5df;font-weight:700;overflow-wrap:anywhere}.charge-workshop-card-body p{margin:3px 0;font-size:11px;line-height:17px;overflow-wrap:anywhere}.charge-workshop-card-body .charge-workshop-after{font-size:12px;line-height:18px;color:#bdd0de}.charge-workshop-card-body .charge-workshop-modules{margin:4px 0 0;font-size:13px;line-height:20px;color:#f0d99c;font-weight:700}.charge-workshop-card-body .charge-workshop-note{color:#d9c49f}.charge-workshop-card-body .charge-workshop-complete{margin:4px 0 0;font-size:12px;line-height:18px;color:#a2e9b7}
.charge-workshop-card-body .charge-workshop-outcome-title{margin:8px 0 4px;font-size:11px;color:#c7dce6}.charge-workshop-outcomes{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}.charge-workshop-outcomes button{min-width:0;padding:5px 3px;font-size:12px;line-height:18px;color:#a1efeb;border-color:#4c7f8b}.charge-workshop-outcomes small{display:block;font-size:10px;line-height:15px;color:#c2d3df;white-space:normal;overflow-wrap:anywhere}.charge-workshop-selection{display:flex;align-items:center;justify-content:space-between;gap:6px;margin-top:7px;padding-top:5px;border-top:1px solid #375061}.charge-workshop-card-body .charge-workshop-selection p{margin:0;font-size:10px;line-height:16px;color:#aabfcd}.charge-workshop-reset{display:flex;flex:none;gap:4px}.charge-workshop-reset button{padding:3px 5px;font-size:10px;line-height:16px}
.charge-workshop-card-body .charge-workshop-preview-complete{margin:4px 0;font-size:12px;line-height:18px;color:#f0d99c}.charge-workshop-character[data-plan-state=ready][data-preview-state=achieved] .charge-workshop-badge{color:#f0d99c}
.charge-workshop-character .charge-workshop-section-title{margin:0 0 6px;padding:0;font-size:12px;line-height:18px;color:#89e6df}.charge-workshop-character[data-plan-state=achieved]{border-color:#4d7967;background:#192d2a}.charge-workshop-character[data-plan-state=achieved] .charge-workshop-section-title,.charge-workshop-character[data-plan-state=achieved] .charge-workshop-badge{color:#a2e9b7}.charge-workshop-error p{max-width:440px;line-height:1.6}.charge-workshop-error a{color:#81e8e2}
@media(min-width:640px){.charge-workshop-results{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;align-content:start}.charge-workshop-character{margin:0;align-self:start}.charge-workshop-filterline{flex-direction:row;align-items:center;gap:20px}.charge-workshop-options{border-left:1px solid #3d5365;padding-left:14px}}
@media(max-width:350px){.charge-workshop-weapons,.charge-workshop-options{gap:9px}.charge-workshop-filterline label{font-size:11px;gap:5px}.charge-workshop-filter-title{flex-basis:22px}.charge-workshop-tools{gap:4px}.charge-workshop-tools button{font-size:10px;padding-inline:5px}.charge-workshop-gears dd{font-size:11px}.charge-workshop-total{white-space:normal;overflow:visible;text-overflow:clip}}


/* 진행 문구 길이가 바뀌어도 파티 목록이 움직이지 않도록 두 줄 높이를 확보합니다. */
.evaluation-status-line{display:block;flex:none;box-sizing:content-box;height:32px;margin:0;min-width:0;overflow:auto;overscroll-behavior:contain;overflow-wrap:anywhere;font-size:11px;line-height:16px;color:#bac8d5}
.evaluation-status-line>.evaluation-status,.evaluation-status-line>.evaluation-cache-status{display:inline;margin:0;font:inherit;color:inherit}
.evaluation-cache-status:empty{display:none}
/* 계산 중에는 두 줄을 예약하고 완료·실패 후에는 실제 문구 높이만 사용합니다. */
.evaluation-dialog[data-evaluation-state="settled"] .evaluation-status-line{height:auto;overflow:visible}

/* 큐브 집계는 진행 안내 다음 줄에서 읽으며 항목 안의 이름·개수는 나누지 않습니다. */
.evaluation-cube-summary{display:block;flex:none;min-width:0;max-width:100%;margin:0;font-size:12px;line-height:18px;font-weight:700;color:#e1e7ef;overflow-wrap:anywhere}
.cube-usage-count{display:inline-block;white-space:nowrap}
.cube-usage-over-limit{background:rgba(237,72,90,.24);border-radius:4px}

/* 왼쪽 큐브 합계와 오른쪽 승률에 한 줄을 사용합니다. */
.party-overview{display:flex;flex:none;align-items:center;gap:6px;min-height:18px}
.party-cube-usage{display:flex;flex:1;min-width:0;overflow:hidden}
.current-cube-summary{flex:none;text-align:left;font-size:12px;line-height:18px;font-weight:700;color:#e1e7ef;white-space:nowrap}
.party-overview+.tabs{margin-top:0}
.quick-evaluation-result{flex:none;font-size:12px;font-weight:700;color:#d0dbe6;font-variant-numeric:tabular-nums;white-space:nowrap}
.quick-evaluation-result[data-state="ready"]{color:#5fe0eb}

.tabs:has(.quick-evaluation){
  display:grid;
  grid-template-columns:minmax(max-content,1fr) repeat(5,minmax(0,42px)) minmax(max-content,1fr);
}
.tabs:has(.quick-evaluation) .party-version{position:static;transform:none;justify-self:start}
.tabs:has(.quick-evaluation) button[data-party]{width:100%;min-width:0;padding-inline:2px}
.quick-evaluation{display:flex;align-self:stretch;justify-self:end}
.quick-evaluation-label{position:relative;display:flex;align-items:center;gap:4px;font-size:11px;font-weight:700;white-space:nowrap;cursor:pointer}
.quick-evaluation-toggle{position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:pointer}
.quick-evaluation-track{position:relative;width:24px;height:14px;border:1px solid #8695a6;border-radius:999px;background:#384452}
.quick-evaluation-track::after{content:"";position:absolute;inset:1px auto auto 1px;width:10px;height:10px;border-radius:50%;background:#dbe6ef}
.quick-evaluation-toggle:checked+.quick-evaluation-track{border-color:#73d8e3;background:#187f94}
.quick-evaluation-toggle:checked+.quick-evaluation-track::after{transform:translateX(10px)}
.quick-evaluation-toggle:focus-visible+.quick-evaluation-track{outline:2px solid #65dfec;outline-offset:2px}
