#outfit-dialog {
  width: min(540px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  box-sizing: border-box;
  overflow: auto;
  padding: 20px;
  border: 3px solid var(--ink);
  border-radius: 12px;
  background: var(--parchment);
  color: var(--ink);
  box-shadow: var(--bevel), var(--ledge);
  font: 14px/1.45 var(--read);
  text-shadow: none;
}
#outfit-dialog::backdrop {
  background: rgb(20 35 28 / 65%);
}
#calling-dialog {
  width: min(520px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  box-sizing: border-box;
  overflow: auto;
  padding: 20px;
  border: 3px solid var(--ink);
  border-radius: 12px;
  background: var(--parchment);
  color: var(--ink);
  box-shadow: var(--bevel), var(--ledge);
  font: 14px/1.45 var(--read);
  text-shadow: none;
}
#calling-dialog::backdrop {
  background: rgb(20 35 28 / 65%);
}
#calling-dialog h2 {
  margin: 0 0 8px;
  color: var(--leaf-deep);
  font: 20px/1.4 var(--blocks);
}
#calling-dialog p {
  margin: 8px 0;
}
#calling-dialog .calling-choices {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}
#calling-dialog .calling-card {
  display: grid;
  gap: 2px;
  text-align: left;
  padding: 10px 12px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  font: 14px/1.4 var(--read);
  cursor: pointer;
}
#calling-dialog .calling-card strong {
  font: 16px/1.3 var(--blocks);
  color: var(--leaf-deep);
}
#calling-dialog .calling-card em {
  font-size: 12px;
  opacity: .85;
}
#calling-dialog .calling-card b {
  justify-self: start;
  margin-top: 4px;
  padding: 1px 7px;
  border-radius: 10px;
  background: var(--leaf-deep);
  color: var(--paper);
  font: 700 11px var(--read);
}
#calling-dialog .calling-card[aria-checked=true] {
  outline: 3px solid #b67c15;
  outline-offset: -3px;
  background: #ffe4a0;
}
#calling-dialog .calling-card:disabled {
  cursor: default;
  opacity: .6;
}
#calling-dialog .calling-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
#calling-dialog .calling-actions button {
  min-height: 44px;
  padding: 8px 15px;
  font: 700 14px var(--read);
  border: 2px solid var(--ink);
  border-radius: 6px;
  cursor: pointer;
}
#calling-dialog .calling-go {
  background: var(--evergreen);
  color: var(--paper);
}
#calling-dialog .calling-go:disabled {
  opacity: .5;
  cursor: default;
}
#calling-dialog :focus-visible {
  outline: 3px solid var(--leaf-deep);
  outline-offset: 2px;
}
#outfit-dialog h2 {
  margin: 0 0 8px;
  color: var(--leaf-deep);
  font: 20px/1.4 var(--blocks);
}
#outfit-dialog p {
  margin: 8px 0;
}
.outfit-layout {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 18px;
  align-items: start;
}
.outfit-stage {
  position: sticky;
  top: 0;
  text-align: center;
  border-radius: 10px;
  background: rgb(184 157 90 / 12%);
}
.outfit-stage canvas {
  width: 180px;
  height: 240px;
  max-width: 100%;
  display: block;
  margin: auto;
}
.outfit-stage canvas[hidden] {
  display: none;
}
.outfit-preview-note,
.outfit-hint {
  font-size: 12px;
}
.outfit-show-gear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 32px;
  margin-top: 4px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.outfit-show-gear input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--leaf-deep);
  color-scheme: light;
}
#outfit-dialog .outfit-stage .outfit-preview-note {
  margin: 2px 0 8px;
}
.outfit-worn-note {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  font-weight: 700;
}
.outfit-worn-note[hidden] {
  display: none;
}
.outfit-choices label {
  display: block;
  font-weight: 700;
  margin: 9px 0;
}
.outfit-choice {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 3px;
}
.outfit-swatch {
  flex: 0 0 22px;
  height: 22px;
  border: 2px solid var(--ink);
  border-radius: 5px;
}
#outfit-dialog select {
  min-width: 0;
  width: 100%;
  min-height: 40px;
  padding: 6px;
  border: 1px solid var(--ink);
  border-radius: 5px;
  background: var(--paper);
  color: var(--ink);
  font: 14px var(--read);
}
.outfit-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}
#outfit-dialog button {
  min-height: 44px;
  padding: 8px 15px;
  font: 700 14px var(--read);
  border: 2px solid var(--ink);
  border-radius: 6px;
  cursor: pointer;
}
#outfit-dialog .outfit-save {
  background: var(--evergreen);
  color: var(--paper);
}
.outfit-status {
  min-height: 20px;
}
#outfit-dialog :focus-visible {
  outline: 3px solid var(--leaf-deep);
  outline-offset: 2px;
}
.outfit-robe {
  margin: 9px 0;
}
.outfit-robe-name {
  font-weight: 700;
}
.outfit-robe .outfit-choice {
  flex-wrap: wrap;
}
#outfit-dialog .outfit-robe-pick {
  flex: 0 0 44px;
  width: 44px;
  height: 40px;
  padding: 2px;
  border: 1px solid var(--ink);
  border-radius: 5px;
  background: var(--paper);
  cursor: pointer;
  box-sizing: border-box;
}
#outfit-dialog .outfit-robe-hex {
  flex: 1 1 5.5em;
  min-width: 0;
  width: 5.5em;
  min-height: 40px;
  padding: 6px;
  border: 1px solid var(--ink);
  border-radius: 5px;
  background: var(--paper);
  color: var(--ink);
  font: 14px var(--read);
  box-sizing: border-box;
}
#outfit-dialog .outfit-robe-hex[aria-invalid=true] {
  border: 2px solid #a8432f;
}
#outfit-dialog .outfit-robe-reset {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 6px 10px;
}
.outfit-robe-note {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  font-weight: 400;
}
@media (max-width: 420px) {
  #outfit-dialog {
    padding: 12px;
  }
  .outfit-layout {
    grid-template-columns: 100px 1fr;
    gap: 10px;
  }
  .outfit-stage canvas {
    width: 100px;
    height: 134px;
  }
  #outfit-dialog .outfit-robe-hex {
    font-size: 16px;
  }
}
#calling-dialog .calling-current {
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--paper);
  font-weight: 800;
}
#calling-dialog .calling-hint {
  font-size: 12px;
}
#calling-dialog .calling-card [hidden] {
  display: none;
}
#calling-dialog .calling-status {
  min-height: 2.9em;
  font-size: 12px;
}
#calling-dialog .calling-actions {
  position: sticky;
  bottom: -20px;
  padding: 8px 0;
  background: var(--parchment);
}
#calling-dialog {
  scroll-padding-bottom: 120px;
}
#calling-dialog .calling-card {
  scroll-margin-block: 12px 120px;
}
#calling-dialog .calling-actions .calling-status {
  flex: 1 0 100%;
  margin: 0;
}
.training-shortcut {
  display: flex;
  align-items: center;
  gap: .65rem;
  margin: .65rem 0;
}
.training-shortcut small {
  flex: 1;
  font-size: .78rem;
  line-height: 1.4;
}
.training-shortcut button {
  flex-shrink: 0;
  min-height: 40px;
}
@media (max-width: 480px) {
  .training-shortcut {
    align-items: flex-start;
    flex-direction: column;
  }
}
#calling-dialog,
#calling-dialog .calling-card,
#calling-dialog .calling-actions button {
  corner-shape: bevel;
}
#calling-dialog .calling-delta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 8px 0;
}
#calling-dialog .calling-delta > div,
#calling-notice .calling-delta > div {
  border: 2px solid #3b3326;
  border-radius: 8px;
  padding: 8px 10px;
  background: #fffaf0;
  color: #2a261e;
}
#calling-dialog .calling-delta strong {
  font: 14px/1.3 var(--blocks);
}
#calling-dialog .calling-gain strong {
  color: #2f7a3a;
}
#calling-dialog .calling-lose strong {
  color: #a8432f;
}
#calling-dialog .calling-delta ul {
  margin: 4px 0 0;
  padding-left: 18px;
  font-size: 13px;
}
#calling-dialog li.cg-plus::marker {
  content: "+ ";
  color: #2f7a3a;
}
#calling-dialog li.cg-minus::marker {
  content: "− ";
  color: #a8432f;
}
#calling-dialog .calling-rules {
  margin: 6px 0;
  padding-left: 18px;
  font-size: 13px;
}
@media (max-width: 460px) {
  #calling-dialog .calling-delta {
    grid-template-columns: 1fr;
  }
}
#calling-notice {
  width: min(520px, calc(100vw - 24px));
  box-sizing: border-box;
  padding: 20px;
  border: 3px solid #3b3326;
  border-radius: 12px;
  background: #fff3dc;
  color: #2a261e;
}
#calling-notice::backdrop {
  background: rgb(20 35 28 / 65%);
}
#calling-notice h2 {
  margin: 0 0 8px;
  color: var(--leaf-deep);
  font: 20px/1.4 var(--blocks);
}
#calling-notice .calling-delta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 8px 0;
}
#calling-notice .calling-delta > div {
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 8px 10px;
}
#calling-notice .calling-gain strong {
  color: #2f7a3a;
  font: 14px/1.3 var(--blocks);
}
#calling-notice .calling-lose strong {
  color: #a8432f;
  font: 14px/1.3 var(--blocks);
}
#calling-notice ul {
  margin: 4px 0 0;
  padding-left: 18px;
  font-size: 13px;
}
#calling-notice li.cg-plus::marker {
  content: "+ ";
  color: #2f7a3a;
}
#calling-notice li.cg-minus::marker {
  content: "− ";
  color: #a8432f;
}
#calling-notice .calling-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}
@media (max-width: 460px) {
  #calling-notice .calling-delta {
    grid-template-columns: 1fr;
  }
}
#calling-notice .cg-now {
  font-weight: 600;
}
#calling-notice .cg-later {
  opacity: .72;
}
#calling-notice .cn-bar {
  margin-top: .5em;
}
#calling-notice .cn-bar-changes {
  margin: 2px 0 8px;
}
#calling-notice .calling-actions {
  margin-top: 12px;
  flex-wrap: wrap;
}
.outfit-gear {
  margin: 9px 0;
}
.outfit-gear-name {
  font-weight: 700;
}
.outfit-gear .outfit-choice {
  flex-wrap: wrap;
}
#outfit-dialog .outfit-gear-pick {
  flex: 0 0 44px;
  width: 44px;
  height: 40px;
  padding: 2px;
  border: 1px solid var(--ink);
  border-radius: 5px;
  background: var(--paper);
  cursor: pointer;
  box-sizing: border-box;
}
#outfit-dialog .outfit-gear-hex {
  flex: 1 1 5.5em;
  min-width: 0;
  width: 5.5em;
  min-height: 40px;
  padding: 6px;
  border: 1px solid var(--ink);
  border-radius: 5px;
  background: var(--paper);
  color: var(--ink);
  font: 14px var(--read);
  box-sizing: border-box;
}
#outfit-dialog .outfit-gear-hex[aria-invalid=true] {
  border: 2px solid #a8432f;
}
#outfit-dialog .outfit-gear-reset {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 6px 10px;
}
.outfit-gear-note {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  font-weight: 400;
}
@media (max-width: 420px) {
  #outfit-dialog {
    padding: 12px;
  }
  .outfit-layout {
    grid-template-columns: 100px 1fr;
    gap: 10px;
  }
  .outfit-stage canvas {
    width: 100px;
    height: 134px;
  }
  #outfit-dialog .outfit-gear-hex {
    font-size: 16px;
  }
}
#outfit-dialog .outfit-gear-target {
  flex: 1 1 100%;
  min-height: 40px;
}
.outfit-cost {
  min-height: 1.2em;
  font-weight: 700;
}
.outfit-own {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.outfit-own:empty {
  display: none;
}
