.v77-state-bridge[hidden] {
  display: none !important;
}

.v77-journal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(225px, 1fr));
  gap: 15px;
  align-items: start;
  margin-top: 18px;
}

.v77-filters-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 15px;
  align-items: end;
}

.v77-entry {
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden;
  background: linear-gradient(145deg, #2b2228, #16181e);
}

.v77-entry.is-search-target {
  box-shadow: 0 0 0 2px var(--gold, #d8b476), 0 10px 28px rgba(0, 0, 0, 0.65);
}

/* Distinct subtle fantasy colors for Diario vs Quest cards */
.v77-entry[data-entry-type="diary"] {
  background: linear-gradient(145deg, #322a1a, #1d1a13);
  border-color: #8f7443;
}

.v77-entry[data-entry-type="diary"] .v77-summary:hover {
  background: #a8874a24;
}

.v77-entry[data-entry-type="diary"] .v77-emblem {
  border-color: #b79454;
  background: radial-gradient(ellipse at 30% 20%, #8b6f384d, #241e14);
}

.v77-entry[data-entry-type="diary"] .v77-entry-date {
  border-color: #7c6741;
  background: #14120c;
}

.v77-entry[data-entry-type="diary"] .v77-entry-body {
  border-top-color: #755e38;
  background: #14120c55;
}

.v77-entry[data-entry-type="quest"] {
  background: linear-gradient(145deg, #2e2019, #191310);
  border-color: #7f5740;
}

.v77-entry[data-entry-type="quest"] .v77-summary:hover {
  background: #8f573b26;
}

.v77-entry[data-entry-type="quest"] .v77-emblem {
  border-color: #a67152;
  background: radial-gradient(ellipse at 30% 20%, #7f4e344d, #211611);
}

.v77-entry[data-entry-type="quest"] .v77-entry-date {
  border-color: #73503c;
  background: #130e0b;
}

.v77-entry[data-entry-type="quest"] .v77-entry-body {
  border-top-color: #6b4936;
  background: #130e0b55;
}

.v77-entry[hidden],
.v77-empty-filter[hidden] {
  display: none !important;
}

.v77-summary {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  padding: 22px 16px 17px;
  cursor: pointer;
  list-style: none;
  color: var(--ink, #ede9e2);
}

.v77-summary::-webkit-details-marker {
  display: none;
}

.v77-summary:hover {
  background: #8d5b4522;
}

.v77-emblem {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 92px;
  height: 92px;
  border: 1px solid #aa8558;
  border-radius: 18px;
  color: var(--gold, #d8b476);
  background: radial-gradient(ellipse at 30% 20%, #7b533e55, #201b25);
}

.v77-emblem svg {
  width: 55px;
  height: 55px;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.v77-caption {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 7px;
  width: 100%;
  min-width: 0;
}

.v77-type-tag {
  font-size: 11px;
  color: var(--muted, #b6b0a6);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.v77-entry-title {
  font: 20px Georgia, serif;
  color: var(--gold, #d8b476);
  overflow-wrap: anywhere;
}

.v77-entry-date {
  border: 1px solid #7c674a;
  background: #101115;
  border-radius: 5px;
  padding: 7px 10px;
  font-size: 14px;
}

.v77-entry-campaign {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  align-self: center;
  max-width: 100%;
  padding: 3px 9px;
  border-radius: 6px;
  border: 1px solid #6b5842;
  background: rgba(16, 15, 20, 0.78);
  color: #dec9a4;
  font-size: 11px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.v77-entry-campaign[hidden] {
  display: none !important;
}

.v77-entry-campaign-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 13px;
  height: 13px;
  color: var(--gold, #d8b476);
  flex-shrink: 0;
}

.v77-entry-campaign-icon svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.v77-quest-date-line {
  display: block;
  font-size: 13px;
  line-height: 1.45;
}

.v77-quest-date-line + .v77-quest-date-line {
  margin-top: 3px;
  padding-top: 3px;
  border-top: 1px solid #3c3329;
}

.v77-quest-date-line.is-tbd {
  color: var(--muted, #b6b0a6);
  font-style: italic;
}

.v77-open-hint {
  font-size: 11px;
  color: var(--muted, #b6b0a6);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.v77-open {
  grid-column: 1 / -1;
}

.v77-open .v77-summary {
  flex-direction: row;
  text-align: left;
  padding: 15px 18px;
}

.v77-open .v77-emblem {
  width: 60px;
  height: 60px;
  flex: 0 0 60px;
}

.v77-open .v77-emblem svg {
  width: 38px;
  height: 38px;
}

.v77-open .v77-caption {
  max-width: 650px;
}

.v77-open .v77-entry-date {
  align-self: flex-start;
  min-width: 170px;
}

.v77-open .v77-entry-campaign {
  align-self: flex-start;
}

.v77-open .v77-open-hint {
  margin-left: auto;
}

.v77-entry-body {
  padding: 22px;
  border-top: 1px solid #6b5741;
  background: #15151b55;
}

.v77-entry-body > label,
.v77-quest-dates-rows > .v77-quest-date-row {
  font-size: 16px;
  margin-bottom: 16px;
}

.v77-quest-dates-rows {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.v77-quest-dates-rows > .v77-quest-date-row {
  display: block;
  margin-bottom: 0;
}

.v77-quest-date-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.v77-enddate-status {
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 10px;
  border: 1px solid #6f6250;
  color: var(--gold, #d8b476);
  background: #141318;
}

.v77-enddate-status.is-pending {
  color: var(--muted, #b6b0a6);
  font-style: italic;
}

.v77-enddate-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.v77-enddate-controls input {
  flex: 1;
}

.v77-clear-date {
  font-size: 12px;
  padding: 7px 10px;
  white-space: nowrap;
}

.v77-entry-body textarea {
  font: 18px/1.85 system-ui, sans-serif;
  min-height: 400px;
  padding: 18px;
}

.v77-entry-body textarea.v77-loot {
  min-height: 180px;
}

.v77-entry-body input,
.v77-entry-body select {
  font-size: 17px;
  padding: 11px;
}

.v77-type-label {
  flex: 1 1 220px;
  max-width: 310px;
  margin-top: 0;
  font-size: 14px;
}

.v77-add {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.v77-add svg,
.v77-edit-skills svg {
  width: 19px;
  height: 19px;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.v77-skills-panel.magic-summary {
  display: block !important;
  min-width: 0;
  border-color: var(--border, #79694e);
}

.v77-skills-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.v77-skills-head h3 {
  margin-bottom: 0;
}

.v77-edit-skills {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.v77-table-scroll {
  overflow-x: auto;
  margin-top: 15px;
}

.v77-skills-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.v77-skills-table thead th {
  font-size: 12px;
  color: var(--gold, #d8b476);
  padding: 10px 8px;
  border-bottom: 1px solid #8b7052;
}

.v77-skills-table tbody th,
.v77-skills-table td {
  padding: 10px 8px;
  border-bottom: 1px solid #473d35;
  font-size: 14px;
}

.v77-skills-table tbody th {
  font-weight: 500;
  min-width: 150px;
}

.v77-skills-table tbody th small {
  display: block;
  font-size: 12px;
}

.v77-skills-table td:nth-child(2) {
  color: var(--muted, #b6b0a6);
  font-size: 13px;
}

.v77-skills-table td:nth-child(3),
.v77-skills-table td:nth-child(4) {
  text-align: center;
}

.v77-skill-bonus,
.v77-skilled-bonus {
  display: inline-block;
  min-width: 43px;
  padding: 5px 7px;
  border-radius: 5px;
  font-weight: 700;
  font-size: 18px;
  background: #101115;
  border: 1px solid #4d443b;
}

.v77-skilled-bonus {
  background: #45161d;
  border-color: #a02a35;
}

.v77-prof-mark {
  color: var(--gold, #d8b476);
  font-size: 19px;
}

.v77-tools {
  border-top: 1px solid #8b7052;
  margin-top: 20px;
  padding-top: 15px;
}

.v77-tools ul {
  padding-left: 19px;
}

.v77-tools li {
  margin: 7px 0;
}

.v77-skills-dialog {
  max-width: 850px;
}

.v77-skills-dialog fieldset {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}

.v77-skills-dialog form > button {
  margin-right: 8px;
}

.v77-skills-dialog input[type="checkbox"] {
  width: auto;
}

.v77-skills-dialog p[hidden] {
  display: none !important;
}

@media (max-width: 760px) {
  .v77-journal-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
  }

  .v77-type-label {
    max-width: 100%;
    flex-basis: 100%;
  }

  .v77-summary {
    padding: 16px 12px;
  }

  .v77-emblem {
    width: 78px;
    height: 78px;
  }

  .v77-emblem svg {
    width: 46px;
    height: 46px;
  }

  .v77-entry-title {
    font-size: 18px;
  }

  .v77-open .v77-summary {
    flex-wrap: wrap;
  }

  .v77-open .v77-caption {
    flex: 1;
    min-width: 130px;
  }

  .v77-open .v77-open-hint {
    width: 100%;
    text-align: right;
  }

  .v77-entry-body {
    padding: 14px;
  }

  .v77-entry-body textarea {
    font-size: 17px;
    line-height: 1.8;
    padding: 13px;
    min-height: 330px;
  }

  .v77-entry-body textarea.v77-loot {
    min-height: 170px;
  }

  .v77-skills-table tbody th,
  .v77-skills-table td {
    padding: 8px 5px;
  }

  .v77-skills-table td:nth-child(2) {
    font-size: 11px;
    min-width: 90px;
  }

  .v77-skills-head {
    align-items: start;
  }

  .v77-edit-skills {
    font-size: 12px;
  }

  .v77-skills-dialog fieldset {
    grid-template-columns: 1fr;
  }
}

@media print {
  .v77-journal-grid {
    display: block;
  }

  .v77-entry,
  .v77-entry[data-entry-type="diary"],
  .v77-entry[data-entry-type="quest"] {
    margin: 12px 0 !important;
    overflow: visible;
    background: white;
  }

  .v77-emblem,
  .v77-open-hint,
  .v77-type-label,
  .v77-journal-count,
  .v77-edit-skills,
  .v77-clear-date {
    display: none !important;
  }

  .v77-entry-campaign {
    color: black;
    background: white;
    border-color: #999;
  }

  .v77-entry-body {
    background: white;
    color: black;
  }

  .v77-skills-table th,
  .v77-skills-table td {
    color: black !important;
  }

  .v77-skilled-bonus,
  .v77-skill-bonus {
    background: white;
    color: black;
  }
}
