.personal-card-tabs {
  display: flex;
  gap: 8px;
  padding: 5px;
  background: #101521;
  border: 1px solid #30364b;
  border-radius: 13px;
  width: fit-content;
  margin: 0 0 22px;
  flex-wrap: wrap;
}
.personal-card-tabs button {
  border: 0;
  border-radius: 9px;
  padding: 12px 18px;
  background: transparent;
  color: #a8b3c9;
  font-weight: 700;
}
.personal-card-tabs button[aria-pressed='true'] {
  background: #343052;
  color: #eee9ff;
  box-shadow: 0 2px 10px #0002;
}
.personal-card-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin: 0 0 25px;
  padding: 20px;
  border: 1px solid #3d3b59;
  border-radius: 15px;
  background: linear-gradient(110deg, #25213b, #141b28);
}
.personal-card-toolbar b {
  color: #ece7ff;
  font-size: 16px;
}
.personal-card-toolbar p {
  margin: 6px 0 0;
  color: #aab4c9;
  font-size: 12px;
}
.personal-card-toolbar button:disabled {
  opacity: 0.45;
  cursor: default;
}
.personal-card-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid #343b4c;
}
.personal-card-actions > span {
  margin-right: auto;
  font-size: 12px;
  color: #a9b7cc;
}
.personal-card-state {
  padding: 35px;
  line-height: 1.8;
}
.personal-card-dialog {
  width: min(780px, calc(100vw - 24px));
  max-height: 88dvh;
  padding: 28px;
  border: 1px solid #52486d;
  border-radius: 20px;
  background: #111824;
  color: #e8edf8;
  box-shadow: 0 24px 80px #0009;
  overflow: auto;
  color-scheme: dark;
}
.personal-card-dialog::backdrop {
  background: #030713c9;
  backdrop-filter: blur(5px);
}
.personal-editor-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}
.personal-editor-heading h2 {
  margin: 8px 0 0;
  font-size: 23px;
}
.personal-editor-tip {
  color: #a9b7cd;
  font-size: 13px;
  line-height: 1.7;
  margin: 18px 0 22px;
}
.personal-card-dialog form > label {
  margin: 16px 0 9px;
  font-size: 12px;
  color: #bec8dc;
}
.personal-rich-editor {
  background: #171d2d;
  border: 1px solid #3b455b;
  border-radius: 11px;
  padding: 18px;
  min-height: 125px;
  max-height: 300px;
  overflow: auto;
  font-size: 16px;
  line-height: 1.75;
  overflow-wrap: anywhere;
  outline: none;
  white-space: pre-wrap;
}
.personal-rich-editor:focus {
  border-color: #aa96ed;
  box-shadow: 0 0 0 3px #aa96ed1c;
}
.personal-rich-editor:empty::before {
  content: attr(data-placeholder);
  color: #78859e;
  pointer-events: none;
}
.personal-rich-answer {
  background: #132a29;
  border-color: #345e53;
  min-height: 160px;
}
.personal-rich-editor [style*='background-color'] {
  color: #121721;
}
.personal-rich-editor ul {
  padding-left: 24px;
  list-style: disc;
}
.personal-rich-editor ol {
  padding-left: 24px;
  list-style: decimal;
}
.personal-editor-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid #30394c;
}
.personal-editor-footer > span {
  font-size: 11px;
  color: #94a4bd;
  line-height: 1.6;
  margin-right: auto;
  max-width: 230px;
}
#personalCardStatus {
  color: #ffe0a3;
  font-size: 13px;
  line-height: 1.6;
  min-height: 20px;
  margin: 15px 0 0;
}
.personal-selection-tools {
  position: fixed;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  max-width: min(620px, calc(100vw - 48px));
  padding: 9px;
  border: 1px solid #746591;
  border-radius: 12px;
  background: #27253b;
  box-shadow: 0 10px 30px #0008;
}
.personal-selection-tools[hidden] {
  display: none;
}
.personal-selection-tools button {
  min-height: 34px;
  min-width: 32px;
  padding: 5px 8px;
  border: 1px solid #514960;
  border-radius: 6px;
  background: #171c2b;
  color: #f3edff;
  font-size: 12px;
}
.personal-selection-tools button:hover {
  background: #45405d;
}
.personal-selection-tools label {
  font-size: 9px;
  gap: 2px;
  text-align: center;
}
.personal-selection-tools input[type='color'] {
  padding: 1px;
  width: 30px;
  height: 24px;
  cursor: pointer;
}
.personal-selection-tools select {
  padding: 7px 5px;
  width: auto;
  max-width: 115px;
  font-size: 11px;
}
.flashcard-question-text {
  font-size: clamp(20px, 3vw, 28px);
  line-height: 1.5;
  letter-spacing: -0.3px;
  margin: 12px 0 0;
  color: #f1efff;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.flashcard-question-text p,
.flashcard-question-text div,
.flashcard-answer-copy p,
.flashcard-answer-copy div {
  font-size: inherit;
  color: inherit;
  line-height: inherit;
  margin: 0 0 8px;
}
.flashcard-question-text ul,
.flashcard-answer-copy ul {
  padding-left: 24px;
  list-style: disc;
}
.flashcard-question-text ol,
.flashcard-answer-copy ol {
  padding-left: 24px;
  list-style: decimal;
}
.flashcard-question-text [style*='background-color'],
.flashcard-answer-copy [style*='background-color'] {
  color: #121721;
}
@media (max-width: 600px) {
  .personal-card-tabs {
    width: 100%;
  }
  .personal-card-tabs button {
    flex: 1;
    padding: 11px 8px;
    font-size: 12px;
  }
  .personal-card-toolbar {
    align-items: stretch;
    flex-direction: column;
    padding: 16px;
  }
  .personal-card-dialog {
    padding: 18px;
    max-height: 92dvh;
  }
  .personal-editor-footer {
    flex-wrap: wrap;
  }
  .personal-editor-footer > span {
    width: 100%;
    max-width: none;
    flex-basis: 100%;
    margin-bottom: 4px;
  }
  .personal-editor-footer button {
    flex: 1;
  }
  .personal-card-actions {
    flex-wrap: wrap;
  }
  .personal-card-actions > span {
    width: 100%;
  }
  .personal-selection-tools {
    gap: 4px;
    padding: 7px;
  }
  .personal-selection-tools button {
    min-height: 36px;
  }
  .personal-rich-editor {
    padding: 13px;
  }
}
