@import url('./simplify.css');
@import url('./wow.css');

.editor-page-heading {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.editor-heading-controls,
.editor-heading-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.editor-heading-controls {
  margin-left: auto;
  justify-content: flex-end;
  gap: 12px;
}
.editor-heading-actions .button {
  min-height: 40px;
}
.canvas-header > span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.editor-page-heading > .eyebrow {
  margin-left: auto;
  font-size: 9px;
}
.shortcut-link {
  background: none;
  border: 0;
  padding: 0;
  font-size: 10px;
  color: var(--text-muted);
  cursor: pointer;
}
.fight-editor {
  border: 1px solid var(--border);
  border-radius: 11px;
  overflow: hidden;
  background: var(--bg-card);
}
.editor-toolbar {
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--border);
  padding: 14px 18px;
  background: var(--bg-card);
  flex-wrap: wrap;
}
.editor-encounter {
  min-width: 150px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.editor-encounter .eyebrow {
  font-size: 8px;
  letter-spacing: 1px;
  color: var(--text-muted);
}
.editor-encounter select {
  min-height: 30px;
  border: 0;
  background: transparent;
  padding: 0 25px 0 0;
  font-size: 16px;
  font-weight: 600;
  max-width: 200px;
}
.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-left: 9px;
}
.toolbar-actions .icon-button {
  min-height: 33px;
  width: 32px;
  font-size: 20px;
  color: var(--text-secondary);
}
.toolbar-actions .icon {
  width: 16px;
  height: 16px;
}
.toolbar-separator {
  height: 23px;
  width: 1px;
  background: var(--border);
  margin: 0 9px;
}
#zoom-label {
  font-size: 10px;
  color: var(--text-secondary);
  min-width: 34px;
  text-align: center;
}
.toolbar-save {
  display: flex;
  gap: 9px;
  align-items: center;
  margin-left: auto;
}
.toolbar-save .button {
  min-height: 40px;
  padding: 8px 12px;
  font-size: 10px;
}
.toolbar-save .icon {
  width: 14px;
}
.toolbar-save .save-status {
  font-size: 9px;
  margin-right: 6px;
}
.save-status.warning {
  color: var(--warning);
}
.save-status.danger {
  color: var(--danger);
}
.phase-bar {
  display: flex;
  align-items: center;
  gap: 9px;
  border-bottom: 1px solid var(--border);
  padding: 8px 15px;
  min-width: 0;
  background: var(--bg-card);
}
.phase-tabs {
  display: flex;
  gap: 6px;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: thin;
  min-width: 0;
}
.phase-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 5px;
  padding: 7px 12px;
  font-size: 10px;
  min-height: 33px;
  white-space: nowrap;
  color: var(--text-muted);
}
.phase-tab > span {
  font-size: 8px;
  opacity: 0.5;
}
.phase-tab.active {
  color: var(--accent);
  border-color: var(--accent-border);
  background: var(--accent-soft);
}
.phase-bar > .button {
  font-size: 9px;
  padding: 6px 9px;
  min-height: 31px;
}
.phase-bar > .button .icon {
  width: 12px;
}
.phase-bar .icon-button {
  width: 30px;
  min-height: 30px;
}
.phase-bar .icon {
  width: 15px;
}
.editor-workspace {
  display: grid;
  grid-template-columns: 121px minmax(0, 1fr) 244px;
  min-height: 645px;
}
.object-tools {
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  padding: 13px 7px;
}
.tool-label {
  font-size: 7px;
  letter-spacing: 1px;
  color: var(--text-muted);
  padding: 0 7px 12px;
}
.object-tool {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 8px;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 5px;
  width: 100%;
  font-size: 9px;
  color: var(--text-secondary);
  min-height: 35px;
  text-align: left;
}
.object-tool .icon {
  width: 15px;
  height: 15px;
}
.object-tool:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
}
.object-tool.active {
  background: var(--accent-soft);
  border-color: var(--accent-border);
  color: var(--accent);
}
.tool-bottom {
  padding: 11px 5px 3px;
  border-top: 1px solid var(--border);
  margin-top: 10px;
}
.tool-bottom .check-label {
  font-size: 9px;
  min-height: 30px;
}
.tool-bottom input {
  width: 12px;
  height: 12px;
}
.canvas-area {
  background: var(--bg-secondary);
  display: flex;
  flex-direction: column;
  min-width: 0;
  position: relative;
}
.canvas-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 15px 18px;
  border-bottom: 1px solid var(--bg-elevated);
  font-size: 9px;
  color: var(--text-muted);
}
.canvas-header > span {
  display: flex;
  gap: 8px;
  align-items: center;
}
.canvas-header .icon {
  width: 13px;
  height: 13px;
}
.canvas-header > span:last-child {
  font-size: 7px;
  letter-spacing: 1.2px;
  color: var(--text-muted);
}
.encounter-board {
  width: 100%;
  flex: 1;
  display: flex;
  align-items: center;
  min-height: 0;
  overflow: hidden;
}
.encounter-svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: 75vh;
  aspect-ratio: 1;
  touch-action: none;
  user-select: none;
  outline: none;
  overflow: hidden;
}
.encounter-svg:focus-visible {
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--accent) 50%, transparent);
}
.encounter-svg.placing {
  cursor: crosshair;
}
.compass-text {
  text-anchor: middle;
  font-size: 1.5px;
  fill: var(--text-muted);
  font-family: inherit;
  letter-spacing: 0.2px;
}
.canvas-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-top: 1px solid var(--bg-elevated);
  color: var(--text-muted);
  font-size: 8px;
}
.canvas-footer > span:last-child {
  white-space: nowrap;
  color: var(--text-muted);
}
.encounter-object {
  cursor: grab;
}
.encounter-object:active {
  cursor: grabbing;
}
.object-label {
  fill: #d0c7c1;
  font-family: inherit;
  font-weight: 600;
  paint-order: stroke;
  stroke: #24252b;
  stroke-width: 0.6px;
  stroke-linejoin: round;
  pointer-events: auto;
}
.object-assignee {
  fill: var(--accent-hover);
  font-family: inherit;
  font-weight: 700;
  paint-order: stroke;
  stroke: #24252b;
  stroke-width: 0.7px;
  pointer-events: auto;
}
.object-symbol {
  text-anchor: middle;
  dominant-baseline: central;
  font-family: Arial, sans-serif;
  pointer-events: none;
}
.object-text {
  font-family: inherit;
  font-size: 2.8px;
  font-weight: 600;
  paint-order: stroke;
  stroke: #24252b;
  stroke-width: 0.45px;
}
.encounter-object.faded {
  opacity: 1;
}
.encounter-object.faded > :not(.object-names) {
  opacity: 0.35;
}
.encounter-object.faded > .object-names {
  opacity: 0.8;
}
.encounter-object.faded:hover > .object-names,
.encounter-object.faded:focus-visible > .object-names {
  opacity: 1;
}
.encounter-object.highlighted .object-label {
  fill: var(--accent-hover);
}
.selection-border {
  stroke: var(--accent-hover);
  stroke-width: 0.28;
  fill: none;
  stroke-dasharray: 1 0.6;
  pointer-events: none;
}
.resize-handle,
.rotate-handle {
  fill: var(--accent-hover);
  stroke: var(--bg-inset);
  stroke-width: 0.3;
  cursor: nwse-resize;
}
.rotate-handle {
  cursor: crosshair;
}
.selection-rectangle {
  fill: var(--accent);
  fill-opacity: 0.12;
  stroke: var(--accent);
  stroke-width: 0.25;
  pointer-events: none;
}
.alignment-guide {
  stroke: var(--accent);
  stroke-width: 0.2;
  stroke-dasharray: 1 1;
  pointer-events: none;
}
.relationship {
  fill: none;
  stroke: var(--accent-hover);
  stroke-width: 0.32;
  stroke-dasharray: 1.3 1;
  opacity: 0.5;
  pointer-events: none;
}
.relationship.movement {
  stroke: #a6d6bc;
  stroke-width: 0.6;
  opacity: 0.9;
}
.editor-sidebar {
  background: var(--bg-card);
  border-left: 1px solid var(--border);
  min-width: 0;
  max-height: 800px;
  overflow: auto;
  scrollbar-width: thin;
}
.properties-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg-card);
  z-index: 1;
}
.properties-tabs button {
  flex: 1;
  border: 0;
  border-bottom: 2px solid transparent;
  font-size: 10px;
  padding: 14px 10px;
  background: transparent;
  color: var(--text-muted);
  min-height: 46px;
}
.properties-tabs button.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.properties-content {
  padding: 17px 14px;
}
.property-title {
  margin-bottom: 15px;
}
.property-title h3 {
  font-size: 12px;
}
.property-title .eyebrow {
  font-size: 7px;
  color: var(--text-muted);
}
.property-form {
  display: flex;
  flex-direction: column;
  gap: 13px;
}
.property-form .form-field,
.properties-content > .form-field {
  font-size: 9px;
}
.property-form input,
.property-form select,
.property-form textarea,
.properties-content textarea {
  padding: 7px 9px;
  font-size: 10px;
  min-height: 34px;
}
.property-form textarea,
.properties-content textarea {
  min-height: 76px;
}
.property-form input[type='color'] {
  padding: 4px;
}
.property-form .form-grid {
  gap: 10px;
}
.property-form .check-label {
  font-size: 9px;
  min-height: 26px;
}
.property-form .check-label input {
  min-height: 0;
}
.property-form .button {
  font-size: 9px;
  min-height: 34px;
  padding: 7px;
}
.property-form .button .icon {
  width: 12px;
  height: 12px;
}
.property-actions {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}
.property-actions .button {
  flex: 1;
}
.properties-empty {
  text-align: center;
  padding: 22px 8px 28px;
}
.properties-empty > .icon {
  width: 25px;
  height: 25px;
  color: var(--brown);
  margin-bottom: 15px;
}
.properties-empty h3 {
  font-size: 12px;
  margin-bottom: 8px;
}
.properties-empty p {
  font-size: 10px;
  color: var(--text-muted);
  line-height: 1.8;
}
.object-list {
  border-top: 1px solid var(--border);
  margin-top: 21px;
  padding-top: 14px;
}
.object-list summary {
  font-size: 9px;
  color: var(--text-muted);
  cursor: pointer;
}
.object-list summary span {
  float: right;
}
.object-list > div {
  margin-top: 10px;
  max-height: 240px;
  overflow: auto;
  scrollbar-width: thin;
}
.object-list-item {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  min-height: 32px;
  padding: 6px 8px;
  font-size: 9px;
  width: 100%;
  text-align: left;
  color: var(--text-secondary);
}
.object-list-item .icon {
  width: 12px;
  height: 12px;
}
.object-list-item span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.object-list-item.active {
  border-color: var(--accent-border);
  color: var(--accent);
  background: var(--accent-soft);
}
.assignment-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 12px 0 18px;
}
.assignment-card {
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--bg-card);
  display: flex;
  align-items: center;
  overflow: hidden;
}
.assignment-card.active {
  border-color: var(--accent-border);
  background: var(--accent-soft);
}
.assignment-highlight {
  display: flex;
  flex-direction: column;
  padding: 12px 10px;
  gap: 6px;
  background: transparent;
  border: 0;
  flex: 1;
  text-align: left;
  min-width: 0;
}
.assignment-type {
  font-size: 7px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent);
}
.assignment-highlight strong {
  font-size: 10px;
  line-height: 1.4;
}
.assigned-name {
  font-size: 10px;
  color: var(--text-secondary);
}
.assignment-card .icon-button {
  width: 27px;
  min-height: 30px;
  padding: 7px;
  margin-right: 5px;
}
.assignment-card .icon {
  width: 12px;
  height: 12px;
}
#auto-assign {
  font-size: 9px;
  padding: 7px 8px;
  min-height: 34px;
  width: 100%;
}
#auto-assign .icon {
  width: 12px;
  height: 12px;
}
.assignment-validation {
  margin-top: 23px;
  border-top: 1px solid var(--border);
  padding-top: 18px;
}
.assignment-validation h4 {
  font-size: 11px;
  margin-bottom: 6px;
}
.assignment-validation .field-help {
  font-size: 9px;
}
.assignment-validation .validation-warning {
  font-size: 9px;
  line-height: 1.6;
  padding: 8px;
  margin-top: 8px;
}
.assignment-validation .validation-warning .icon {
  width: 11px;
  height: 11px;
}
.validation-passed {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--success);
  font-size: 9px;
  margin-top: 12px;
}
.validation-passed .icon {
  width: 12px;
  height: 12px;
}
.editor-footnote {
  font-size: 10px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 15px;
}
.editor-footnote .icon {
  width: 13px;
  height: 13px;
}
.editor-mobile-controls {
  display: none;
}
.editor-error {
  padding: 12px 16px;
  background: #3a292c;
  border-bottom: 1px solid #754950;
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}
.editor-error > span {
  flex: 1;
  min-width: 220px;
  color: #e3acae;
}
.editor-error .button {
  font-size: 9px;
}
.shortcut-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: 25px;
}
.shortcut-grid kbd {
  background: var(--border);
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: 4px;
  padding: 3px 7px;
  font-size: 10px;
}
.modal-actions.full {
  grid-column: 1/-1;
}
.readonly-board .encounter-svg {
  touch-action: pan-y;
}
.readonly-board .encounter-object {
  cursor: pointer;
}
@media (min-width: 1600px) {
  .editor-workspace {
    grid-template-columns: 140px minmax(0, 1fr) 275px;
  }
  .object-tool {
    font-size: 10px;
    min-height: 37px;
    gap: 11px;
  }
  .object-tools {
    padding: 16px 11px;
  }
  .properties-content {
    padding: 19px 18px;
  }
  .property-form .form-field {
    font-size: 10px;
  }
  .property-form input,
  .property-form select,
  .property-form textarea {
    font-size: 11px;
    min-height: 36px;
  }
  .encounter-svg {
    max-height: 80vh;
  }
}
@media (max-width: 1200px) {
  .editor-toolbar {
    gap: 10px;
  }
  .toolbar-actions {
    margin: 0;
  }
  .editor-workspace {
    grid-template-columns: 100px minmax(0, 1fr) 220px;
  }
  .object-tools {
    padding: 12px 5px;
  }
  .object-tool {
    gap: 7px;
    font-size: 8px;
    padding: 9px 5px;
  }
  .object-tool .icon {
    width: 13px;
    height: 13px;
  }
  .toolbar-save .save-status {
    display: none;
  }
  .editor-encounter select {
    max-width: 170px;
  }
  .canvas-header > span:last-child {
    display: none;
  }
  .canvas-footer > span:last-child {
    display: none;
  }
  .properties-content {
    padding: 14px 11px;
  }
}
@media (max-width: 1023px) {
  .editor-workspace {
    grid-template-columns: 110px minmax(0, 1fr) 228px;
  }
  .editor-page-heading {
    gap: 10px;
  }
}
@media (max-width: 767px) {
  .editor-page-heading {
    margin-bottom: 15px;
  }
  .editor-page-heading > .eyebrow {
    display: none;
  }
  .shortcut-link {
    margin-left: auto;
    font-size: 9px;
  }
  .editor-toolbar {
    padding: 12px;
    gap: 10px;
  }
  .editor-encounter {
    min-width: 140px;
    flex: 1;
  }
  .editor-encounter select {
    max-width: 180px;
    font-size: 14px;
    min-height: 34px;
  }
  .toolbar-actions {
    order: 3;
    flex: 1;
  }
  .toolbar-actions .icon-button {
    min-height: 36px;
    width: 33px;
  }
  .toolbar-save {
    gap: 6px;
  }
  .toolbar-save .button {
    min-height: 36px;
    font-size: 10px;
    padding: 8px;
  }
  .toolbar-save .button .icon {
    width: 13px;
  }
  .toolbar-save .save-status {
    display: inline;
    position: absolute;
    bottom: 12px;
    right: 12px;
    max-width: 125px;
    text-align: right;
  }
  .editor-toolbar {
    position: relative;
    padding-bottom: 8px;
  }
  .toolbar-save > .badge {
    font-size: 8px;
  }
  .editor-workspace {
    display: flex;
    flex-direction: column;
    min-height: 0;
    position: relative;
  }
  .editor-mobile-controls {
    display: flex;
    gap: 8px;
    padding: 9px 12px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-card);
  }
  .editor-mobile-controls > .button {
    flex: 1;
    min-height: 36px;
    font-size: 9px;
    padding: 7px;
  }
  .editor-mobile-controls .icon {
    width: 13px;
    height: 13px;
  }
  .object-tools {
    display: none;
    border-right: 0;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-bottom: 1px solid var(--border);
    padding: 10px;
    gap: 3px;
  }
  .object-tools.mobile-open {
    display: grid;
    order: 0;
  }
  .object-tools .tool-label {
    grid-column: 1/-1;
  }
  .object-tool {
    flex-direction: column;
    text-align: center;
    justify-content: center;
    min-height: 56px;
    padding: 8px 3px;
    gap: 6px;
    font-size: 8px;
  }
  .object-tool .icon {
    width: 16px;
    height: 16px;
  }
  .tool-bottom {
    grid-column: 1/-1;
    display: flex;
    gap: 18px;
    margin: 5px 0 0;
    padding: 4px 6px;
  }
  .canvas-area {
    order: 1;
  }
  .encounter-svg {
    max-height: none;
    aspect-ratio: 1;
  }
  .encounter-board {
    min-height: 0;
  }
  .canvas-header {
    padding: 11px 14px;
    font-size: 9px;
  }
  .canvas-footer {
    padding: 10px 12px;
    font-size: 8px;
  }
  .editor-sidebar {
    order: 2;
    border: 0;
    border-top: 1px solid var(--border);
    max-height: 600px;
    display: none;
  }
  .editor-sidebar.mobile-open {
    display: block;
  }
  .properties-content {
    padding: 19px 17px;
  }
  .property-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
  .property-form > .form-grid {
    grid-column: 1/-1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .property-form input,
  .property-form select,
  .property-form textarea {
    min-height: 42px;
    font-size: 12px;
  }
  .property-form .form-field {
    font-size: 11px;
  }
  .property-form .check-label input {
    min-height: 0;
  }
  .property-form .check-label {
    font-size: 10px;
  }
  .property-form > .property-actions {
    grid-column: 1/-1;
  }
  .property-form > .form-field:has(textarea) {
    grid-column: 1/-1;
  }
  .property-form .button {
    min-height: 40px;
    font-size: 11px;
  }
  .properties-tabs button {
    font-size: 12px;
    min-height: 46px;
  }
  .object-list summary {
    font-size: 11px;
  }
  .object-list-item {
    font-size: 11px;
    min-height: 41px;
  }
  .assignment-highlight strong {
    font-size: 13px;
  }
  .assignment-highlight .assigned-name {
    font-size: 12px;
  }
  .assignment-type {
    font-size: 9px;
  }
  .assignment-card .icon-button {
    min-height: 42px;
    width: 42px;
  }
  .assignment-card .icon {
    width: 16px;
    height: 16px;
  }
  #auto-assign {
    min-height: 42px;
    font-size: 11px;
  }
  .assignment-validation .validation-warning {
    font-size: 11px;
  }
  .assignment-validation .field-help {
    font-size: 11px;
  }
  .editor-footnote {
    font-size: 9px;
  }
  .phase-bar {
    padding: 8px;
    gap: 5px;
    flex-wrap: wrap;
  }
  .phase-tabs {
    flex-basis: 100%;
  }
  .phase-tab {
    min-height: 38px;
    font-size: 10px;
    padding: 8px 12px;
  }
  .phase-bar > .button {
    min-height: 33px;
    font-size: 9px;
    margin-left: 0;
  }
  .phase-bar > #edit-phase {
    min-height: 33px;
  }
  .phase-tabs .icon-button {
    min-height: 38px;
    min-width: 33px;
  }
  .shortcut-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .shortcut-grid kbd {
    justify-self: start;
    margin-bottom: 8px;
  }
  .editor-error > span {
    min-width: 100%;
    font-size: 11px;
  }
}
@media (max-width: 374px) {
  .toolbar-save .button {
    font-size: 9px;
    padding: 7px;
  }
  .editor-encounter {
    min-width: 110px;
  }
  .editor-encounter select {
    max-width: 125px;
  }
  .editor-mobile-controls {
    padding: 8px;
    gap: 5px;
  }
  .editor-mobile-controls > .button {
    font-size: 8px;
  }
  .editor-mobile-controls .icon {
    width: 12px;
  }
  .property-form {
    grid-template-columns: 1fr;
  }
  .object-tools {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 767px) {
  .editor-mobile-controls > .button,
  .toolbar-save .button,
  .toolbar-actions .icon-button,
  .phase-tab,
  .phase-bar > .button,
  .phase-bar .icon-button {
    min-height: 44px;
  }
  .canvas-footer {
    line-height: 1.5;
  }
  .resize-handle,
  .rotate-handle {
    stroke-width: 1.3;
    stroke: var(--bg-inset);
    paint-order: stroke;
    pointer-events: all;
  }
}
