a i {
  color: var(--pico-primary);
}

a {
  color: var(--pico-contrast);
}

/* OOT Spoilers START*/
.legend-card {
  grid-column: 1 / -1;
}

.legend-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.75rem 1.5rem;
  padding: 1rem;
}

.legend-item {
  font-size: 0.7rem;
}

/* Highlight the abbreviation keys to stand out */
.abbreviation {
  font-weight: 700;
  color: var(--pico-primary);
  background-color: var(--pico-background-color);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  display: inline-block;
  min-width: 45px;
  text-align: center;
  margin-right: 0.35rem;
  border: 1px solid var(--pico-secondary);
}

.grid-top {
  align-items: start;
}

/* OOT Spoilers END*/

/* Status Badge Styling */
.status-badge {
  font-size: 0.8rem;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.3s ease;
}

.status-badge.saved {
  background-color: var(--pico-ins-color, #2e7d32);
  color: #ffffff;
}

.status-badge.saving {
  background-color: var(--pico-mark-background-color, #f57c00);
  color: #ffffff;
}

.status-badge.cleared {
  background-color: var(--pico-secondary-background, #757575);
  color: #ffffff;
}

/* Flexible Notepad Editor Area */
.editor-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  margin-bottom: 1rem;
  position: relative;
}

textarea#notepad {
  flex: 1;
  min-height: 380px;
  resize: vertical;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1.05rem;
  line-height: 1.6;
  padding: 1.25rem;
  border-radius: var(--pico-border-radius);
  box-shadow: var(--pico-box-shadow);
}

/* Toast notifications */
.toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  padding: 0.75rem 1.25rem;
  background-color: var(--pico-card-background-color);
  border: 1px solid var(--pico-border-color);
  border-radius: var(--pico-border-radius);
  box-shadow: var(--pico-box-shadow);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 1000;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* Modal styling tweaks */
dialog article {
  max-width: 450px;
  width: 100%;
}

.theme-toggle-btn {
  background: transparent;
  border: none;
  color: var(--pico-color);
  padding: 0.4rem 0.6rem;
  cursor: pointer;
  box-shadow: none;
  margin-bottom: 0;
  width: auto;
}

.theme-toggle-btn:hover {
  background: var(--pico-secondary-hover-background);
}