:root {
  --journal-reading-width: 56rem;
  --journal-ink: #263137;
  --journal-muted: #6c7477;
  --journal-paper: #fffdf7;
  --journal-line: rgba(67, 53, 38, 0.18);
  --journal-red: #9d342b;
  --journal-red-dark: #76241e;
  --journal-sage: #57705e;
}

.journal-editor-stage,
.journal-view-stage {
  min-height: calc(100vh - 8rem);
  padding: 2rem 0 4rem;
  background:
    radial-gradient(circle at 12% 16%, rgba(157, 52, 43, 0.08), transparent 24rem),
    radial-gradient(circle at 88% 72%, rgba(87, 112, 94, 0.09), transparent 26rem),
    #f3efe5;
}

.journal-editor-shell {
  width: min(calc(100% - 3rem), 1480px);
  max-width: 1480px;
}

.journal-view-shell {
  max-width: 1180px;
}

.journal-editor-loading {
  display: grid;
  min-height: 52vh;
  place-content: center;
  justify-items: center;
  color: var(--journal-muted);
}

.journal-editor-loading-mark {
  width: 2rem;
  height: 2rem;
  border: 2px solid rgba(157, 52, 43, 0.2);
  border-top-color: var(--journal-red);
  border-radius: 50%;
  animation: journal-spin 0.8s linear infinite;
}

.journal-editor-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.journal-owner-edit-link[hidden] {
  display: none !important;
}

.journal-editor-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.journal-local-draft-notice {
  align-items: center;
  background: rgba(255, 249, 232, 0.96);
  border: 1px solid rgba(138, 101, 31, 0.32);
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(64, 45, 28, 0.08);
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
}

.journal-local-draft-notice[hidden] {
  display: none;
}

.journal-local-draft-notice strong {
  color: #5f4518;
  display: block;
  font-size: 0.86rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.journal-local-draft-notice p {
  color: #5d5143;
  margin: 0.2rem 0 0;
}

.journal-local-draft-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 0.55rem;
}

.journal-review-button span {
  display: inline-block;
  min-width: 2rem;
  margin-left: 0.2rem;
  padding: 0.08rem 0.35rem;
  border-radius: 999px;
  background: rgba(157, 52, 43, 0.12);
  font-size: 0.7rem;
  font-variant-numeric: tabular-nums;
}

.journal-review-button[data-ready="true"] span {
  background: rgba(65, 106, 80, 0.14);
  color: #416a50;
}

.journal-publish-checklist {
  margin: 0 0 1rem;
  padding: 1rem;
  border: 1px solid rgba(87, 112, 94, 0.32);
  border-radius: 0.8rem;
  background: rgba(250, 248, 239, 0.98);
  box-shadow: 0 8px 26px rgba(64, 45, 28, 0.08);
}

.journal-publish-checklist[hidden] {
  display: none;
}

.journal-publish-checklist header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.journal-publish-checklist header strong {
  color: var(--journal-ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.15rem;
}

.journal-publish-checklist header p {
  margin: 0.15rem 0 0;
  color: var(--journal-muted);
  font-size: 0.78rem;
}

.journal-publish-checklist header button {
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(67, 53, 38, 0.08);
  color: #736c65;
  font-size: 1.2rem;
}

.journal-publish-checklist ul {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  margin: 0.85rem 0 0;
  padding: 0;
  list-style: none;
}

.journal-publish-checklist li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.65rem;
  border: 1px solid rgba(157, 52, 43, 0.18);
  border-radius: 0.5rem;
  background: #fffefb;
}

.journal-publish-checklist li > span {
  color: var(--journal-red);
  font-size: 1rem;
  font-weight: 700;
}

.journal-publish-checklist li[data-complete="true"] {
  border-color: rgba(65, 106, 80, 0.2);
  background: rgba(239, 246, 238, 0.7);
}

.journal-publish-checklist li[data-complete="true"] > span {
  color: #416a50;
}

.journal-publish-checklist li strong,
.journal-publish-checklist li small {
  display: block;
}

.journal-publish-checklist li strong {
  color: var(--journal-ink);
  font-size: 0.78rem;
}

.journal-publish-checklist li small {
  margin-top: 0.1rem;
  color: var(--journal-muted);
  font-size: 0.67rem;
}

.journal-save-status {
  min-width: 7rem;
  margin: 0 0.25rem 0 0;
  color: var(--journal-muted);
  font-size: 0.82rem;
  text-align: right;
}

.journal-save-status[data-state="error"] {
  color: #9a251d;
}

.journal-save-status[data-state="saved"] {
  color: #416a50;
}

.journal-editor-card {
  overflow: visible;
  box-shadow: 0 24px 60px rgba(60, 44, 30, 0.13);
}

.journal-editor-card[inert] {
  /* Disable conflicting editor controls without fading the writing surface. */
  filter: none;
  opacity: 1;
}

.journal-editor-hero {
  --journal-header-color: #9d342b;

  min-height: 27rem;
  background:
    linear-gradient(rgba(28, 22, 18, 0.18), rgba(28, 22, 18, 0.34)),
    var(--journal-header-color);
}

.journal-header-colour {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  width: fit-content;
  margin-top: 1.2rem;
  padding: 0.6rem 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 0.55rem;
  background: rgba(34, 26, 22, 0.22);
}

.journal-header-colour > label {
  margin: 0;
  color: #fff;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.journal-header-colour > input {
  width: 2.2rem;
  height: 2.2rem;
  padding: 0.15rem;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.journal-colour-swatches {
  display: flex;
  gap: 0.35rem;
}

.journal-colour-swatches button {
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border: 2px solid rgba(255, 255, 255, 0.52);
  border-radius: 50%;
  background: var(--journal-swatch);
  box-shadow: 0 1px 4px rgba(24, 18, 15, 0.24);
}

.journal-colour-swatches button[aria-pressed="true"] {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.journal-tag-editor {
  display: grid;
  gap: 0.5rem;
  max-width: 33rem;
  margin-top: 0.8rem;
  padding: 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 0.55rem;
  background: rgba(34, 26, 22, 0.22);
}

.journal-tag-editor > label {
  margin: 0;
  color: #fff;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.journal-tag-entry {
  display: flex;
  gap: 0.4rem;
}

.journal-tag-entry input {
  min-width: 0;
  flex: 1;
  padding: 0.52rem 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 0.35rem;
  background: rgba(255, 255, 255, 0.94);
  color: var(--journal-ink);
}

.journal-tag-entry .btn {
  white-space: nowrap;
}

.journal-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.journal-tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.28rem 0.3rem 0.28rem 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 0.76rem;
}

.journal-tag-chip button {
  display: grid;
  width: 1.35rem;
  height: 1.35rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  font-size: 1rem;
  place-items: center;
}

.journal-tag-chip button:hover,
.journal-tag-chip button:focus-visible {
  outline: none;
  background: rgba(255, 255, 255, 0.22);
}

.journal-tag-editor > p {
  margin: 0;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.7rem;
}

.journal-view-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 1rem 0;
}

.journal-view-tags span {
  padding: 0.3rem 0.62rem;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 0.76rem;
  font-weight: 700;
}

.journal-title-input,
.journal-summary-input {
  width: 100%;
  border: 1px solid transparent;
  color: #fff;
  background: transparent;
}

.journal-title-input {
  grid-column: 1 / -1;
  grid-row: 1;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0.5rem clamp(1.4rem, 5vw, 4rem) 0.45rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.9rem, 3.2vw, 3.25rem);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.035em;
  overflow-wrap: anywhere;
  text-align: left;
}

.journal-view-page .journal-view-hero-copy .city-journal-title {
  font-size: clamp(2rem, 3.2vw, 3.25rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
  overflow-wrap: anywhere;
}

.journal-summary-input {
  max-width: 44rem;
  margin-top: 0.35rem;
  padding: 0.15rem 0.4rem 0.4rem;
  resize: vertical;
  font-size: 1.08rem;
  line-height: 1.65;
}

.journal-title-input:hover,
.journal-title-input:focus,
.journal-summary-input:hover,
.journal-summary-input:focus {
  border-color: rgba(255, 255, 255, 0.48);
  border-radius: 0.35rem;
  outline: none;
  background: rgba(255, 255, 255, 0.08);
}

.journal-summary-input::placeholder {
  color: rgba(255, 255, 255, 0.65);
}

.journal-cover-editor {
  position: relative;
  display: grid;
  min-height: 22rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(43, 22, 19, 0.14);
  place-items: center;
}

.journal-cover-editor img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.journal-cover-placeholder {
  display: grid;
  padding: 2rem;
  color: rgba(255, 255, 255, 0.84);
  text-align: center;
  place-items: center;
}

.journal-cover-placeholder span {
  font-size: 3rem;
}

.journal-cover-placeholder small {
  margin-top: 0.35rem;
}

.journal-cover-actions {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  z-index: 2;
  display: flex;
  gap: 0.45rem;
}

.journal-editor-body {
  display: grid;
  grid-template-columns: minmax(15rem, 0.3fr) minmax(0, 1fr);
  background: var(--journal-paper);
}

.journal-editor-guide {
  position: sticky;
  top: 5.5rem;
  align-self: start;
  display: grid;
  gap: 0.55rem;
  max-height: calc(100vh - 6.5rem);
  overflow-y: auto;
  padding: 2.2rem 1rem;
}

.journal-editor-guide p {
  margin: 0 0 0.4rem;
  color: var(--journal-ink);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.journal-editor-guide small {
  color: var(--journal-muted);
}

.journal-editor-guide > small {
  margin-top: 1.2rem;
  line-height: 1.5;
}

.journal-tool-list {
  display: grid;
  gap: 0.55rem;
}

.journal-tool-list > button {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  column-gap: 0.55rem;
  width: 100%;
  padding: 0.7rem;
  border: 1px solid var(--journal-line);
  border-radius: 0.5rem;
  background: #fffefb;
  color: var(--journal-ink);
  cursor: grab;
  text-align: left;
}

.journal-tool-list > button:hover,
.journal-tool-list > button:focus-visible,
.journal-tool-list > button[data-dragging="true"] {
  border-color: rgba(157, 52, 43, 0.48);
  outline: none;
  background: #f8eee4;
  box-shadow: 0 5px 14px rgba(62, 45, 32, 0.08);
  transform: translateY(-1px);
}

.journal-tool-list > button > span {
  grid-row: 1 / span 2;
  display: grid;
  width: 2rem;
  height: 2rem;
  border-radius: 0.4rem;
  background: rgba(157, 52, 43, 0.1);
  color: var(--journal-red-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
  place-items: center;
}

.journal-tool-list > button > strong {
  align-self: end;
  font-size: 0.84rem;
}

.journal-tool-list > button > small {
  margin: 0;
  font-size: 0.7rem;
  line-height: 1.25;
}

.journal-editor-main {
  position: relative;
  min-width: 0;
  padding: 3.2rem clamp(1.2rem, 5vw, 4.5rem) 5rem;
  border-left: 1px solid var(--journal-line);
}

.journal-editor-main::after {
  position: absolute;
  z-index: 8;
  inset: 0.75rem;
  display: grid;
  border: 2px dashed transparent;
  border-radius: 0.75rem;
  color: transparent;
  content: "Drop the journal tool here";
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  pointer-events: none;
  place-items: start center;
}

.journal-editor-main[data-drop-active="true"]::after {
  border-color: rgba(157, 52, 43, 0.62);
  background: rgba(255, 250, 241, 0.62);
  color: var(--journal-red-dark);
}

.journal-editor-main[data-drop-kind="image"][data-drop-active="true"]::after {
  content: "Drop photo here to add it to your journal";
}

.journal-writing-section > h2,
.journal-places-section > h2 {
  margin-bottom: 0.8rem;
  color: var(--journal-ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
}

.journal-toolbar {
  position: sticky;
  top: 4.3rem;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.28rem;
  margin: 1.7rem 0 0;
  padding: 0.55rem;
  border: 1px solid var(--journal-line);
  border-radius: 0.55rem 0.55rem 0 0;
  background: rgba(255, 253, 247, 0.97);
  box-shadow: 0 4px 15px rgba(48, 41, 33, 0.06);
}

.journal-toolbar button,
.journal-toolbar select {
  min-height: 2.35rem;
  border: 0;
  border-radius: 0.35rem;
  background: transparent;
  color: var(--journal-ink);
  font-size: 0.84rem;
}

.journal-toolbar button {
  min-width: 2.35rem;
  padding: 0.4rem 0.58rem;
}

.journal-toolbar button:hover,
.journal-toolbar button:focus-visible,
.journal-toolbar button[aria-pressed="true"] {
  outline: none;
  background: rgba(157, 52, 43, 0.12);
  color: var(--journal-red-dark);
}

.journal-toolbar button:disabled {
  opacity: 0.36;
  cursor: not-allowed;
}

.journal-toolbar select {
  padding: 0.35rem 1.9rem 0.35rem 0.55rem;
}

.journal-toolbar-divider {
  width: 1px;
  height: 1.7rem;
  margin: 0 0.2rem;
  background: var(--journal-line);
}

.journal-selected-image-details {
  display: grid;
  grid-template-columns: repeat(4, minmax(7rem, 1fr));
  align-items: end;
  gap: 0.65rem;
  padding: 0.75rem;
  border-right: 1px solid var(--journal-line);
  border-left: 1px solid var(--journal-line);
  background: #f8f1e7;
}

.journal-selected-image-details[hidden] {
  display: none;
}

.journal-editor-guide .journal-selected-image-details {
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: 0.75rem;
  padding: 0.8rem;
  border: 1px solid var(--journal-line);
  border-radius: 0.65rem;
  background: #f8f1e7;
}

.journal-editor-guide .journal-selected-image-details > strong {
  grid-column: auto;
}

.journal-editor-guide .journal-selected-image-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.journal-editor-guide .journal-selected-image-actions .btn {
  white-space: normal;
  font-size: 0.72rem;
}

.journal-selected-image-details > strong {
  grid-column: 1 / -1;
  color: var(--journal-red-dark);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.journal-selected-image-details label {
  display: grid;
  gap: 0.25rem;
  margin: 0;
  color: #4c4741;
  font-size: 0.7rem;
  font-weight: 700;
}

.journal-selected-image-details label small {
  font-weight: 400;
}

.journal-selected-image-details input,
.journal-selected-image-details textarea {
  min-width: 0;
  width: 100%;
  padding: 0.52rem 0.6rem;
  border: 1px solid rgba(67, 53, 38, 0.28);
  border-radius: 0.35rem;
  background: #fff;
}

.journal-selected-image-details textarea,
.journal-photo-copy-fields textarea {
  min-height: 4.2rem;
  resize: vertical;
  line-height: 1.45;
}

.journal-selected-image-details input[type="range"] {
  padding: 0;
  border: 0;
  background: transparent;
  accent-color: var(--journal-red);
}

.journal-selected-image-details output {
  float: right;
  color: var(--journal-red-dark);
  font-variant-numeric: tabular-nums;
}

.journal-image-wrap-control {
  align-self: center;
}

.journal-image-wrap-choice {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.5rem;
  font-weight: 400;
}

.journal-selected-image-details .journal-image-wrap-choice input[type="checkbox"] {
  width: 1rem;
  min-height: 1rem;
  margin: 0;
  padding: 0;
  accent-color: var(--journal-red);
}

.journal-selected-image-details select {
  min-width: 0;
  width: 100%;
  padding: 0.52rem 1.8rem 0.52rem 0.6rem;
  border: 1px solid rgba(67, 53, 38, 0.28);
  border-radius: 0.35rem;
  background: #fff;
}

.journal-selected-image-details input:focus {
  border-color: var(--journal-red);
  outline: 2px solid rgba(157, 52, 43, 0.14);
}

.journal-selected-image-details select:focus {
  border-color: var(--journal-red);
  outline: 2px solid rgba(157, 52, 43, 0.14);
}

.journal-selected-image-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: stretch;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.journal-selected-image-actions .btn {
  white-space: nowrap;
}

.journal-rich-editor {
  min-height: 30rem;
  border: 1px solid var(--journal-line);
  border-top: 0;
  border-radius: 0 0 0.55rem 0.55rem;
  background: #fffefb;
}

.journal-rich-editor .tiptap,
.journal-rendered-entry .tiptap {
  min-height: 30rem;
  padding: clamp(1.4rem, 4vw, 3rem);
  color: var(--journal-ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.08rem;
  line-height: 1.85;
  outline: none;
}

.journal-rich-editor .tiptap > * + *,
.journal-rendered-entry .tiptap > * + * {
  margin-top: 1.15rem;
}

.journal-rich-editor .tiptap h2,
.journal-rendered-entry .tiptap h2 {
  margin-top: 2.6rem;
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  line-height: 1.15;
}

.journal-rich-editor .tiptap h3,
.journal-rendered-entry .tiptap h3 {
  margin-top: 2rem;
  font-size: 1.45rem;
}

.journal-rich-editor .tiptap blockquote,
.journal-rendered-entry .tiptap blockquote {
  padding: 0.4rem 0 0.4rem 1.4rem;
  border-left: 3px solid var(--journal-red);
  color: #5e5751;
  font-style: italic;
}

.journal-rich-editor .tiptap img,
.journal-rendered-entry .tiptap img {
  display: block;
  width: 100%;
  max-height: 48rem;
  margin: 2rem 0;
  border-radius: 0.35rem;
  object-fit: contain;
}

.journal-rich-editor .tiptap img {
  cursor: grab;
  max-height: min(54vh, 30rem);
}

.journal-rich-editor .tiptap img:active {
  cursor: grabbing;
}

.journal-rich-editor .tiptap .ProseMirror-selectednode {
  outline: 2px solid rgba(157, 52, 43, 0.5);
  outline-offset: 3px;
}

.journal-rich-editor .tiptap .journal-entry-photo,
.journal-rendered-entry .tiptap .journal-entry-photo {
  display: grid;
  width: min(var(--journal-photo-width, 100%), 100%, 40rem, 72vw);
  max-width: 100%;
  margin: 2rem auto;
  justify-items: center;
}

.journal-rich-editor .tiptap .journal-editor-photo-node {
  position: relative;
  user-select: none;
}

.journal-rich-editor .tiptap .journal-editor-photo-node img {
  user-select: none;
}

.journal-image-resize-handle {
  position: absolute;
  z-index: 2;
  display: none;
  width: 0.9rem;
  height: 0.9rem;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--journal-red);
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.32);
  cursor: nwse-resize;
  touch-action: none;
}

.journal-editor-photo-node.ProseMirror-selectednode .journal-image-resize-handle {
  display: block;
}

.journal-image-resize-handle--nw,
.journal-image-resize-handle--se {
  cursor: nwse-resize;
}

.journal-image-resize-handle--ne,
.journal-image-resize-handle--sw {
  cursor: nesw-resize;
}

.journal-image-resize-handle--n,
.journal-image-resize-handle--s {
  left: 50%;
  cursor: ns-resize;
}

.journal-image-resize-handle--e,
.journal-image-resize-handle--w {
  top: 50%;
  cursor: ew-resize;
}

.journal-image-resize-handle--nw { top: -0.45rem; left: -0.45rem; }
.journal-image-resize-handle--n { top: -0.45rem; transform: translateX(-50%); }
.journal-image-resize-handle--ne { top: -0.45rem; right: -0.45rem; }
.journal-image-resize-handle--e { right: -0.45rem; transform: translateY(-50%); }
.journal-image-resize-handle--se { right: -0.45rem; bottom: -0.45rem; }
.journal-image-resize-handle--s { bottom: -0.45rem; transform: translateX(-50%); }
.journal-image-resize-handle--sw { bottom: -0.45rem; left: -0.45rem; }
.journal-image-resize-handle--w { left: -0.45rem; transform: translateY(-50%); }

.journal-rich-editor .tiptap figure.journal-entry-photo[data-photo-width="40"],
.journal-rendered-entry .tiptap figure.journal-entry-photo[data-photo-width="40"] {
  width: min(40%, 40rem, 72vw);
}

.journal-rich-editor .tiptap figure.journal-entry-photo[data-photo-width="60"],
.journal-rendered-entry .tiptap figure.journal-entry-photo[data-photo-width="60"] {
  width: min(60%, 40rem, 72vw);
}

.journal-rich-editor .tiptap figure.journal-entry-photo[data-photo-width="80"],
.journal-rendered-entry .tiptap figure.journal-entry-photo[data-photo-width="80"] {
  width: min(80%, 40rem, 72vw);
}

.journal-rich-editor .tiptap figure.journal-entry-photo[data-photo-alignment="left"],
.journal-rendered-entry .tiptap figure.journal-entry-photo[data-photo-alignment="left"] {
  margin-right: auto;
  margin-left: 0;
}

.journal-rich-editor .tiptap figure.journal-entry-photo[data-photo-alignment="right"],
.journal-rendered-entry .tiptap figure.journal-entry-photo[data-photo-alignment="right"] {
  margin-right: 0;
  margin-left: auto;
}

.journal-rich-editor .tiptap figure.journal-entry-photo[data-photo-text-wrap="true"],
.journal-rendered-entry .tiptap figure.journal-entry-photo[data-photo-text-wrap="true"] {
  display: block;
  float: left;
  clear: none;
  width: min(var(--journal-photo-width, 45%), 48%, 22rem);
  margin: 0.35rem 1.4rem 1rem 0;
}

.journal-rich-editor .tiptap figure.journal-entry-photo[data-photo-text-wrap="true"][data-photo-alignment="right"],
.journal-rendered-entry .tiptap figure.journal-entry-photo[data-photo-text-wrap="true"][data-photo-alignment="right"] {
  float: right;
  margin: 0.35rem 0 1rem 1.4rem;
}

.journal-rich-editor .tiptap figure.journal-entry-photo:not([data-photo-text-wrap="true"]),
.journal-rendered-entry .tiptap figure.journal-entry-photo:not([data-photo-text-wrap="true"]) {
  clear: both;
}

/* Consecutive photo blocks are an intentional two-column photo row. */
.journal-rich-editor .tiptap figure.journal-entry-photo:has(+ figure.journal-entry-photo),
.journal-rich-editor .tiptap figure.journal-entry-photo + figure.journal-entry-photo,
.journal-rendered-entry.tiptap figure.journal-entry-photo:has(+ figure.journal-entry-photo),
.journal-rendered-entry.tiptap figure.journal-entry-photo + figure.journal-entry-photo,
.journal-rendered-entry .tiptap figure.journal-entry-photo:has(+ figure.journal-entry-photo),
.journal-rendered-entry .tiptap figure.journal-entry-photo + figure.journal-entry-photo {
  display: grid;
  float: left;
  clear: none;
  width: min(calc(50% - 1.5rem), 40rem, 72vw);
  margin: 1rem 1.3rem 1rem 0;
}

.journal-rich-editor .tiptap h2,
.journal-rich-editor .tiptap h3,
.journal-rendered-entry .tiptap h2,
.journal-rendered-entry .tiptap h3 {
  clear: both;
}

.journal-rich-editor .tiptap .journal-entry-photo img,
.journal-rendered-entry .tiptap .journal-entry-photo img {
  width: 100%;
  max-width: 100%;
  margin: 0;
}

.journal-rich-editor .tiptap .journal-entry-photo figcaption,
.journal-rendered-entry .tiptap .journal-entry-photo figcaption,
.journal-rendered-entry figure.journal-entry-photo figcaption,
.journal-view-page .journal-view-body .journal-rendered-entry figure.journal-entry-photo figcaption {
  margin-top: 0.6rem;
  color: var(--journal-muted);
  font-family: "Lato", sans-serif;
  font-size: 0.74rem;
  font-style: italic;
  font-weight: 400;
  line-height: 1.55;
  text-align: center;
  white-space: pre-line;
}

.journal-rich-editor .tiptap a,
.journal-rendered-entry .tiptap a {
  color: var(--journal-red-dark);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.journal-rich-editor .tiptap p.is-editor-empty:first-child::before {
  float: left;
  height: 0;
  color: #999188;
  content: "Begin with the moment, place, or detail you want to remember…";
  pointer-events: none;
}

.journal-writing-note {
  margin-top: 0.55rem;
  color: var(--journal-muted);
  font-size: 0.78rem;
  text-align: right;
}

.journal-places-section {
  margin-top: 4.5rem;
  padding-top: 3.5rem;
  border-top: 1px solid var(--journal-line);
}

.journal-place-map-shell {
  margin: 1.6rem 0;
  overflow: hidden;
  border: 1px solid var(--journal-line);
  border-radius: 0.65rem;
  background: #f8f4e9;
}

.journal-place-map {
  min-height: 21rem;
  background: #dfe7df;
}

.journal-place-map-status {
  margin: 0;
  padding: 0.65rem 0.8rem;
  color: var(--journal-muted);
  font-size: 0.76rem;
}

.journal-place-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.8rem 0 2rem;
  padding: clamp(1rem, 3vw, 1.6rem);
  border: 1px solid var(--journal-line);
  border-radius: 0.65rem;
  background: #f8f4e9;
}

.journal-field {
  display: grid;
  gap: 0.38rem;
}

.journal-field-wide {
  grid-column: 1 / -1;
}

.journal-field label {
  margin: 0;
  color: #4a4c49;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.journal-field label span {
  font-weight: 400;
  text-transform: none;
}

.journal-field input,
.journal-field select,
.journal-field textarea {
  width: 100%;
  padding: 0.72rem 0.78rem;
  border: 1px solid rgba(67, 53, 38, 0.28);
  border-radius: 0.35rem;
  background: #fff;
  color: var(--journal-ink);
}

.journal-field input:focus,
.journal-field select:focus,
.journal-field textarea:focus {
  border-color: var(--journal-red);
  outline: 2px solid rgba(157, 52, 43, 0.15);
}

.journal-field-error {
  min-height: 1rem;
  margin: 0;
  color: #9a251d;
  font-size: 0.78rem;
}

.journal-place-list,
.journal-view-places {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.journal-place-card {
  position: relative;
  display: grid;
  gap: 0.45rem;
  padding: 1.15rem;
  border: 1px solid var(--journal-line);
  border-radius: 0.45rem;
  background: #fffefb;
}

.journal-view-places-intro {
  max-width: 48rem;
  margin: 0 0 1.4rem;
  color: var(--journal-muted);
  line-height: 1.7;
}

.journal-place-card-photo {
  margin: -1.15rem -1.15rem 0.5rem;
  overflow: hidden;
  border-radius: 0.45rem 0.45rem 0 0;
  background: #eee8de;
}

.journal-place-card-photo img {
  display: block;
  width: 100%;
  max-height: 17rem;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.journal-place-card-photo figcaption {
  padding: 0.45rem 0.75rem 0.1rem;
  color: var(--journal-muted);
  font-size: 0.76rem;
  line-height: 1.4;
}

.journal-place-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: 0.85rem;
  margin: 0 0 1.25rem;
}

.journal-place-gallery h3 {
  grid-column: 1 / -1;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.25rem;
}

.journal-place-gallery-photo {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--journal-line);
  border-radius: 0.45rem;
  background: #fffefb;
}

.journal-place-gallery-photo img {
  display: block;
  width: 100%;
  max-height: 18rem;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.journal-place-gallery-photo figcaption {
  padding: 0.55rem 0.7rem;
  color: var(--journal-muted);
  font-size: 0.76rem;
  line-height: 1.4;
}

.journal-place-route-number {
  width: fit-content;
  padding: 0.16rem 0.42rem;
  border-radius: 999px;
  background: rgba(157, 52, 43, 0.1);
  color: var(--journal-red-dark);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.journal-place-card-category {
  margin: 0;
  color: var(--journal-sage);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.journal-place-card h3 {
  margin: 0;
  padding-right: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.25rem;
}

.journal-place-card.is-editable h3 {
  padding-right: 5.5rem;
}

.journal-place-controls {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  display: flex;
  gap: 0.15rem;
}

.journal-place-controls button {
  display: grid;
  width: 1.8rem;
  height: 1.8rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #736c65;
  place-items: center;
}

.journal-place-controls button:hover,
.journal-place-controls button:focus-visible {
  outline: none;
  background: rgba(157, 52, 43, 0.1);
  color: var(--journal-red-dark);
}

.journal-place-controls button:disabled {
  opacity: 0.28;
}

.journal-place-controls .journal-place-remove {
  position: static;
}

.journal-place-card p:last-of-type {
  margin: 0;
  color: var(--journal-muted);
  font-size: 0.9rem;
}

.journal-place-card a {
  align-self: end;
  color: var(--journal-red-dark);
  font-size: 0.82rem;
  font-weight: 700;
}

.journal-place-remove {
  position: absolute;
  top: 0.72rem;
  right: 0.72rem;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #736c65;
  font-size: 1.25rem;
}

.journal-place-remove:hover,
.journal-place-remove:focus-visible {
  background: rgba(157, 52, 43, 0.1);
  color: var(--journal-red-dark);
}

.journal-route-marker-shell {
  border: 0;
  background: transparent;
}

.journal-route-marker {
  display: grid;
  width: 28px;
  height: 28px;
  border: 2px solid #fffdf7;
  border-radius: 50% 50% 50% 0;
  background: var(--journal-red);
  box-shadow: 0 3px 10px rgba(34, 26, 22, 0.34);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  transform: rotate(-45deg);
  place-items: center;
}

.journal-route-marker {
  line-height: 1;
}

.journal-route-marker > * {
  transform: rotate(45deg);
}

.journal-place-empty {
  display: grid;
  min-height: 10rem;
  padding: 2rem;
  border: 1px dashed rgba(67, 53, 38, 0.28);
  color: var(--journal-muted);
  text-align: center;
  place-content: center;
}

.journal-place-empty span {
  font-size: 2rem;
}

.journal-place-empty p {
  max-width: 25rem;
  margin: 0.5rem auto 0;
}

.journal-view-hero-copy {
  max-width: 52rem;
}

.journal-editor-page .journal-editor-hero .photo-journal-hero-copy,
.journal-view-page .journal-view-hero-copy {
  justify-content: flex-start;
}

.journal-editor-page .journal-editor-hero .photo-journal-hero-copy .story-date,
.journal-view-page .journal-view-hero-copy .story-date {
  margin-top: 0;
}

.journal-view-page .journal-view-hero-copy .story-deck {
  margin-top: 0.35rem;
}

.journal-view-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Published journal photos stay within a comfortable reading column. */
.journal-view-page .journal-view-body .journal-rendered-entry figure.journal-entry-photo {
  display: grid;
  width: min(var(--journal-photo-width, 100%), 100%, 40rem, 72vw);
  max-width: 100%;
  margin: 2rem auto;
  justify-items: center;
  text-align: center;
}

.journal-view-page .journal-view-body .journal-rendered-entry figure.journal-entry-photo[data-photo-width="40"] {
  width: min(40%, 40rem, 72vw);
}

.journal-view-page .journal-view-body .journal-rendered-entry figure.journal-entry-photo[data-photo-width="60"] {
  width: min(60%, 40rem, 72vw);
}

.journal-view-page .journal-view-body .journal-rendered-entry figure.journal-entry-photo[data-photo-width="80"] {
  width: min(80%, 40rem, 72vw);
}

.journal-view-page .journal-view-body .journal-rendered-entry figure.journal-entry-photo[data-photo-alignment="left"] {
  margin-right: auto;
  margin-left: 0;
}

.journal-view-page .journal-view-body .journal-rendered-entry figure.journal-entry-photo[data-photo-alignment="right"] {
  margin-right: 0;
  margin-left: auto;
}

.journal-view-page .journal-view-body .journal-rendered-entry figure.journal-entry-photo[data-photo-text-wrap="true"] {
  display: block;
  float: left;
  clear: none;
  width: min(var(--journal-photo-width, 45%), 48%, 22rem);
  margin: 0.35rem 1.4rem 1rem 0;
}

.journal-view-page .journal-view-body .journal-rendered-entry figure.journal-entry-photo[data-photo-text-wrap="true"][data-photo-alignment="right"] {
  float: right;
  margin: 0.35rem 0 1rem 1.4rem;
}

.journal-view-page .journal-view-body .journal-rendered-entry figure.journal-entry-photo:has(+ figure.journal-entry-photo),
.journal-view-page .journal-view-body .journal-rendered-entry figure.journal-entry-photo + figure.journal-entry-photo {
  display: grid;
  float: left;
  clear: none;
  width: min(calc(50% - 1.5rem), 40rem, 72vw);
  margin: 1rem 1.3rem 1rem 0;
}

.journal-view-page .journal-view-body .journal-rendered-entry img {
  display: block;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  max-height: min(54vh, 30rem) !important;
  margin: 0 auto;
  object-fit: contain !important;
  object-position: center;
}

@media (max-width: 767.98px) {
  .journal-editor-shell {
    width: 100%;
  }

  .journal-rich-editor .tiptap figure.journal-entry-photo[data-photo-text-wrap="true"],
  .journal-rendered-entry .tiptap figure.journal-entry-photo[data-photo-text-wrap="true"],
  .journal-view-page .journal-view-body .journal-rendered-entry figure.journal-entry-photo[data-photo-text-wrap="true"] {
    float: none;
    width: min(100%, calc(100vw - 2rem));
    margin: 1rem auto;
  }

  .journal-rich-editor .tiptap figure.journal-entry-photo:has(+ figure.journal-entry-photo),
  .journal-rich-editor .tiptap figure.journal-entry-photo + figure.journal-entry-photo,
  .journal-rendered-entry.tiptap figure.journal-entry-photo:has(+ figure.journal-entry-photo),
  .journal-rendered-entry.tiptap figure.journal-entry-photo + figure.journal-entry-photo,
  .journal-rendered-entry .tiptap figure.journal-entry-photo:has(+ figure.journal-entry-photo),
  .journal-rendered-entry .tiptap figure.journal-entry-photo + figure.journal-entry-photo,
  .journal-view-page .journal-view-body .journal-rendered-entry figure.journal-entry-photo:has(+ figure.journal-entry-photo),
  .journal-view-page .journal-view-body .journal-rendered-entry figure.journal-entry-photo + figure.journal-entry-photo {
    float: none;
    clear: both;
    width: min(100%, calc(100vw - 2rem));
    margin: 1rem auto;
  }

  .journal-view-page .journal-view-body .journal-rendered-entry figure.journal-entry-photo {
    width: min(100%, calc(100vw - 2rem));
    margin: 1rem auto;
  }

  .journal-view-page .journal-view-body .journal-rendered-entry img {
    max-height: min(46vh, 24rem) !important;
  }

  .journal-view-page .journal-view-body .journal-rendered-entry figure.journal-entry-photo[data-photo-width="40"] {
    width: min(40%, calc(100vw - 2rem));
  }

  .journal-view-page .journal-view-body .journal-rendered-entry figure.journal-entry-photo[data-photo-width="60"] {
    width: min(60%, calc(100vw - 2rem));
  }

  .journal-view-page .journal-view-body .journal-rendered-entry figure.journal-entry-photo[data-photo-width="80"] {
    width: min(80%, calc(100vw - 2rem));
  }

}

.journal-view-page .journal-view-cover {
  align-self: center;
  min-height: 0;
  height: auto;
  aspect-ratio: 4 / 3;
}

.journal-view-page .journal-view-cover img {
  object-fit: contain;
}

.journal-view-page .journal-view-title {
  max-width: 58rem;
  margin: 0;
  padding-inline: clamp(1.4rem, 5vw, 4rem);
  font-size: clamp(1.9rem, 3.2vw, 3.25rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
  overflow-wrap: anywhere;
  text-align: left;
}

@media (min-width: 992px) {
  .journal-editor-page .journal-editor-hero {
    grid-template-rows: auto minmax(22rem, auto);
    min-height: 0;
  }

  .journal-editor-page .journal-title-input {
    grid-column: 1 / -1;
    grid-row: 1;
    padding: 0.5rem clamp(1.5rem, 4vw, 3.5rem) 0.45rem;
  }

  .journal-editor-page .journal-editor-hero .photo-journal-hero-copy {
    grid-column: 1;
    grid-row: 2;
    max-width: none;
    padding-top: 0.5rem;
  }

  .journal-editor-page .journal-cover-editor {
    grid-column: 2;
    grid-row: 2;
  }

  .journal-view-page .photo-journal-hero {
    grid-template-columns: minmax(18rem, 0.82fr) minmax(0, 1.18fr);
    grid-template-rows: auto auto minmax(22rem, auto);
    min-height: 0;
  }

  .journal-view-page .journal-view-breadcrumbs {
    grid-column: 1 / -1;
    margin: 0;
    padding: 1.3rem clamp(2rem, 5vw, 4rem) 0;
  }

  .journal-view-page .journal-view-title {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: stretch;
    max-width: none;
    padding: 0.5rem clamp(1.5rem, 4vw, 3.5rem) 0.45rem;
    text-align: left;
  }

  .journal-view-page .journal-view-hero-copy {
    grid-column: 1;
    grid-row: 3;
    max-width: none;
    min-height: 0;
    justify-content: flex-start;
    padding: 0.5rem clamp(1.5rem, 4vw, 3.5rem) 1.5rem;
  }

  .journal-view-page .journal-view-hero-copy .story-date {
    margin-top: 0;
  }

  .journal-view-page .journal-view-cover {
    grid-column: 2;
    grid-row: 3;
    align-self: stretch;
    min-height: 0;
    height: auto;
    aspect-ratio: 4 / 3;
  }

  .journal-view-page .journal-view-cover-placeholder {
    grid-column: 2;
    grid-row: 3;
    align-self: stretch;
    min-height: 0;
    height: auto;
    aspect-ratio: 4 / 3;
  }
}
@media (max-width: 575.98px) {
  .journal-editor-page .journal-title-input {
    padding-right: 1.2rem;
    padding-left: 1.2rem;
  }

  .journal-view-page .journal-view-title {
    padding-right: 1.2rem;
    padding-left: 1.2rem;
  }
}

@media (max-width: 991.98px) {
  .journal-editor-page .journal-editor-hero .photo-journal-hero-copy,
  .journal-view-page .journal-view-hero-copy {
    min-height: 0;
    justify-content: flex-start;
    padding: 0.35rem 1.2rem 1rem;
  }
}

/* Compact, natural-ratio journal hero shared by the editor and reading views. */
.journal-editor-page .journal-title-input,
.journal-view-page .journal-view-title {
  font-size: clamp(2rem, 2.7vw, 2.7rem);
  line-height: 1.12;
}

.journal-editor-page .journal-editor-hero .photo-journal-hero-copy,
.journal-view-page .journal-view-hero-copy {
  max-width: 38rem;
}

.journal-editor-page .journal-editor-hero .photo-journal-hero-copy .story-date,
.journal-view-page .journal-view-hero-copy .story-date {
  text-transform: none;
  letter-spacing: 0.01em;
  font-size: 0.82rem;
  line-height: 1.45;
}

.journal-editor-page .journal-summary-input,
.journal-view-page .journal-view-hero-copy .story-deck {
  max-width: 37rem;
  line-height: 1.55;
}

.journal-editor-page .journal-editor-hero .story-byline,
.journal-view-page .journal-view-hero-copy .story-byline {
  margin-top: 0.5rem;
}

.journal-view-page .journal-view-tags {
  gap: 0.3rem;
  margin-top: 0.55rem;
}

.journal-editor-page .journal-cover-editor {
  display: flex;
  width: auto;
  min-height: 14rem;
  max-height: none;
  aspect-ratio: auto;
  align-items: center;
  justify-content: center;
  overflow: visible;
  border: 0;
  background: transparent;
  flex-direction: column;
}

.journal-editor-page .journal-cover-editor > img,
.journal-view-page .journal-view-cover > img {
  position: static;
  inset: auto;
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: min(52vh, 28rem);
  aspect-ratio: auto;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  object-fit: initial;
}

.journal-editor-page .journal-cover-editor > img[hidden] {
  display: none;
}

.journal-editor-page .journal-cover-editor .journal-cover-placeholder {
  min-height: 14rem;
  border: 1px dashed rgba(255, 250, 242, 0.45);
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.08);
}

.journal-editor-page .journal-cover-editor > figcaption,
.journal-view-page .journal-view-cover > figcaption {
  position: static;
  max-width: min(100%, 40rem);
  padding: 0.45rem 0.15rem 0;
  background: transparent;
  color: rgba(255, 250, 242, 0.82);
  font-size: 0.76rem;
  line-height: 1.45;
  text-align: center;
}

.journal-editor-page .journal-cover-settings {
  display: grid;
  gap: 0.65rem;
  margin: 1rem 0;
  padding: 0.9rem;
  border: 1px solid rgba(67, 53, 38, 0.16);
  border-radius: 0.75rem;
  background: #f8f2e8;
  color: #3b3028;
}

.journal-editor-page .journal-cover-settings-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.journal-editor-page .journal-cover-settings-actions .btn {
  min-height: 2.5rem;
}

.journal-editor-page .journal-editor-guide .journal-editor-personalize > summary {
  border-color: rgba(67, 53, 38, 0.2);
  background: #fffdf7;
  color: #3b3028;
}

.journal-editor-page .journal-editor-guide .journal-editor-personalize[open] > summary {
  background: #f1e5d5;
}

.journal-editor-page .journal-editor-guide .journal-header-colour,
.journal-editor-page .journal-editor-guide .journal-tag-editor {
  border-color: rgba(67, 53, 38, 0.16);
  background: #fffdf7;
}

.journal-editor-page .journal-editor-guide .journal-header-colour > label,
.journal-editor-page .journal-editor-guide .journal-tag-editor > label {
  color: #3b3028;
}

.journal-editor-page .journal-editor-guide .journal-header-colour > input,
.journal-editor-page .journal-editor-guide .journal-colour-swatches button {
  border-color: rgba(67, 53, 38, 0.25);
}

.journal-editor-page .journal-editor-guide .journal-tag-chip {
  border-color: rgba(67, 53, 38, 0.18);
  background: #f4e9dc;
  color: #3b3028;
}

.journal-editor-page .journal-editor-guide .journal-tag-editor > p {
  color: #6c6258;
}

@media (min-width: 992px) {
  .journal-editor-page .journal-editor-hero .photo-journal-hero-copy,
  .journal-view-page .journal-view-hero-copy {
    align-self: center;
    justify-content: center;
    padding-top: 1rem;
    padding-bottom: 1rem;
  }

  .journal-editor-page .journal-cover-editor,
  .journal-view-page .journal-view-cover {
    align-self: center;
  }
}

@media (max-width: 991.98px) {
  .journal-editor-page .journal-title-input,
  .journal-view-page .journal-view-title {
    font-size: clamp(1.8rem, 7vw, 2.4rem);
  }

  .journal-editor-page .journal-cover-editor,
  .journal-view-page .journal-view-cover {
    min-height: 0;
    margin: 0.25rem 1.2rem 1rem;
  }

  .journal-editor-page .journal-cover-editor > img,
  .journal-view-page .journal-view-cover > img {
    max-height: min(55vh, 24rem);
  }
}

.journal-view-body {
  padding: clamp(1.5rem, 5vw, 5rem);
  background: var(--journal-paper);
}

.journal-view-body .journal-rendered-entry .tiptap {
  min-height: 0;
  padding: 0;
}

.journal-view-page .story-byline a {
  color: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.16em;
}

.journal-view-page .story-byline a:hover,
.journal-view-page .story-byline a:focus-visible {
  color: #fff;
}

.journal-view-places-section {
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 1px solid var(--journal-line);
}

body.has-journal-photo-editor {
  overflow: hidden;
}

.journal-photo-editor {
  width: min(68rem, calc(100vw - 2rem));
  max-width: none;
  max-height: calc(100vh - 2rem);
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 1rem;
  background: transparent;
  color: var(--journal-ink);
}

.journal-photo-editor::backdrop {
  background: rgba(19, 18, 17, 0.78);
  backdrop-filter: blur(5px);
}

.journal-photo-editor-panel {
  max-height: calc(100vh - 2rem);
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 1rem;
  background: var(--journal-paper);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.42);
}

.journal-photo-editor-header,
.journal-photo-editor-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.2rem;
  background: #fffdf7;
}

.journal-photo-editor-header {
  border-bottom: 1px solid var(--journal-line);
}

.journal-photo-editor-header p,
.journal-photo-editor-header h2,
.journal-photo-editor-footer p {
  margin: 0;
}

.journal-photo-editor-header p {
  color: var(--journal-red);
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.journal-photo-editor-header h2 {
  margin-top: 0.1rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.35rem, 3vw, 2rem);
}

.journal-photo-editor-close {
  display: grid;
  width: 2.3rem;
  height: 2.3rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #eee9df;
  color: #4e4740;
  font-size: 1.6rem;
  line-height: 1;
  place-items: center;
}

.journal-photo-editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(17rem, 0.72fr);
  min-height: 32rem;
}

.journal-photo-preview-shell {
  display: grid;
  min-width: 0;
  padding: 1.2rem;
  background:
    linear-gradient(45deg, rgba(255, 255, 255, 0.025) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255, 255, 255, 0.025) 25%, transparent 25%),
    #171918;
  background-position: 0 0, 8px 8px;
  background-size: 16px 16px;
  color: rgba(255, 255, 255, 0.65);
  place-items: center;
}

.journal-photo-preview-stage {
  display: grid;
  width: 100%;
  min-height: 27rem;
  place-items: center;
}

.journal-photo-preview-stage canvas {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 57vh;
  outline: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.45);
  cursor: grab;
  touch-action: none;
}

.journal-photo-preview-stage canvas[data-dragging="true"] {
  cursor: grabbing;
}

.journal-photo-preview-stage canvas:focus-visible {
  outline: 3px solid #e7b85b;
  outline-offset: 3px;
}

.journal-photo-preview-shell > p {
  margin: 0.8rem 0 0;
  font-size: 0.72rem;
  text-align: center;
}

.journal-photo-controls {
  display: grid;
  align-content: start;
  gap: 1.4rem;
  padding: 1.35rem;
  border-left: 1px solid var(--journal-line);
  background: #fffdf7;
}

.journal-photo-controls section {
  display: grid;
  gap: 0.85rem;
}

.journal-photo-controls section + section {
  padding-top: 1.25rem;
  border-top: 1px solid var(--journal-line);
}

.journal-photo-controls h3 {
  margin: 0;
  font-size: 0.77rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.journal-photo-control-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.journal-photo-control-heading button,
.journal-photo-aspects button {
  padding: 0.42rem 0.58rem;
  border: 1px solid var(--journal-line);
  border-radius: 0.45rem;
  background: #f5f0e7;
  color: #4c4741;
  font-size: 0.73rem;
  font-weight: 700;
}

.journal-photo-control-heading button:hover,
.journal-photo-control-heading button:focus-visible,
.journal-photo-aspects button:hover,
.journal-photo-aspects button:focus-visible,
.journal-photo-aspects button[aria-pressed="true"] {
  border-color: var(--journal-red);
  outline: none;
  background: var(--journal-red);
  color: #fff;
}

.journal-photo-aspects {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.35rem;
}

.journal-photo-slider {
  display: grid;
  gap: 0.35rem;
  margin: 0;
}

.journal-photo-slider > span {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: #4c4741;
  font-size: 0.76rem;
  font-weight: 700;
}

.journal-photo-slider output {
  color: var(--journal-red);
  font-variant-numeric: tabular-nums;
}

.journal-photo-slider input {
  width: 100%;
  accent-color: var(--journal-red);
}

.journal-photo-copy-fields label {
  display: grid;
  gap: 0.32rem;
  margin: 0;
  color: #4c4741;
  font-size: 0.76rem;
  font-weight: 700;
}

.journal-photo-copy-fields label[hidden] {
  display: none;
}

.journal-photo-copy-fields label > span small {
  font-weight: 400;
}

.journal-photo-copy-fields input,
.journal-photo-copy-fields textarea {
  width: 100%;
  padding: 0.6rem 0.65rem;
  border: 1px solid rgba(67, 53, 38, 0.28);
  border-radius: 0.4rem;
  background: #fff;
  color: var(--journal-ink);
}

.journal-photo-copy-fields input:focus,
.journal-photo-copy-fields textarea:focus {
  border-color: var(--journal-red);
  outline: 2px solid rgba(157, 52, 43, 0.14);
}

.journal-photo-copy-fields label > small {
  color: var(--journal-muted);
  font-size: 0.67rem;
  font-weight: 400;
  line-height: 1.4;
}

.journal-photo-editor-footer {
  position: sticky;
  bottom: 0;
  z-index: 2;
  border-top: 1px solid var(--journal-line);
}

.journal-photo-editor-footer > p {
  max-width: 40rem;
  color: var(--journal-muted);
  font-size: 0.76rem;
}

.journal-photo-editor-footer > div {
  display: flex;
  flex: 0 0 auto;
  gap: 0.55rem;
}

@keyframes journal-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 767.98px) {
  .journal-editor-stage,
  .journal-view-stage {
    padding-top: 1rem;
  }

  .journal-editor-topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .journal-editor-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .journal-local-draft-notice {
    align-items: stretch;
    flex-direction: column;
  }

  .journal-local-draft-actions {
    flex-wrap: wrap;
  }

  .journal-publish-checklist ul {
    grid-template-columns: 1fr;
  }

  .journal-save-status {
    width: 100%;
    text-align: left;
  }

  .journal-editor-hero {
    grid-template-columns: 1fr;
  }

  .journal-cover-editor {
    min-height: 18rem;
  }

  .journal-editor-body {
    grid-template-columns: 1fr;
  }

  .journal-editor-guide {
    position: static;
    max-height: none;
    overflow: visible;
    padding: 1.2rem 1rem;
    border-bottom: 1px solid var(--journal-line);
  }

  .journal-tool-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .journal-editor-guide > small {
    display: block;
  }

  .journal-editor-main {
    padding: 2rem 1.5rem 3rem;
    border-left: 0;
  }

  .journal-toolbar {
    top: 3.8rem;
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  .journal-toolbar-divider {
    flex: 0 0 1px;
  }

  .journal-editor-guide .journal-selected-image-details {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .journal-editor-guide .journal-selected-image-details > strong {
    grid-column: 1 / -1;
  }

  .journal-selected-image-field--wide,
  .journal-editor-guide .journal-image-wrap-control {
    grid-column: 1 / -1;
  }

  .journal-editor-guide .journal-selected-image-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .journal-selected-image-actions {
    flex-wrap: wrap;
  }

  .journal-place-form,
  .journal-place-list,
  .journal-view-places {
    grid-template-columns: 1fr;
  }

  .journal-field-wide {
    grid-column: auto;
  }

  .journal-photo-editor {
    width: calc(100vw - 1rem);
    max-height: calc(100vh - 1rem);
  }

  .journal-photo-editor-panel {
    max-height: calc(100vh - 1rem);
  }

  .journal-photo-editor-layout {
    grid-template-columns: 1fr;
  }

  .journal-photo-preview-stage {
    min-height: 19rem;
  }

  .journal-photo-preview-stage canvas {
    max-height: 48vh;
  }

  .journal-photo-controls {
    border-top: 1px solid var(--journal-line);
    border-left: 0;
  }

  .journal-photo-editor-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .journal-photo-editor-footer > div {
    justify-content: flex-end;
  }
}

@media (max-width: 420px) {
  .journal-tool-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .journal-editor-guide {
    gap: 0.7rem;
    padding: 1rem 0.75rem;
  }

  .journal-tool-list > button {
    padding: 0.55rem;
  }

  .journal-tool-list > button > small {
    font-size: 0.64rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .journal-editor-loading-mark {
    animation-duration: 1.8s;
  }
}
.journal-revision-history {
  margin: 0 0 1rem;
  padding: 1rem;
  border: 1px solid #d9c7ae;
  border-radius: 0.85rem;
  background: rgba(255, 250, 241, 0.97);
  box-shadow: 0 0.8rem 2rem rgba(64, 43, 28, 0.1);
}

.journal-revision-history header {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  justify-content: space-between;
}

.journal-revision-history header p,
.journal-revision-status {
  margin: 0.25rem 0 0;
  color: #706155;
  font-size: 0.78rem;
}

.journal-revision-history header > button {
  padding: 0;
  border: 0;
  background: transparent;
  color: #65564b;
  cursor: pointer;
  font-size: 1.45rem;
}

.journal-revision-history ol {
  max-height: 22rem;
  margin: 0.85rem 0 0;
  padding: 0;
  overflow-y: auto;
  list-style: none;
}

.journal-revision-history li {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0;
  border-top: 1px solid #eadfce;
}

.journal-revision-history li > div {
  min-width: 0;
  display: grid;
  gap: 0.15rem;
}

.journal-revision-history li strong,
.journal-revision-history li small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.journal-revision-history li small {
  color: #77685d;
  font-size: 0.7rem;
}
.journal-preview-badge {
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: #fff2cf;
  color: #7c5218;
  font-size: 0.72rem;
  font-weight: 700;
}

/* Keep the writing controls calm and the active save action easy to reach. */
.journal-editor-page .journal-editor-topbar {
  position: sticky;
  top: 0.5rem;
  z-index: 30;
  padding: 0.55rem 0.75rem;
  border: 1px solid rgba(67, 53, 38, 0.12);
  border-radius: 0.75rem;
  background: rgba(248, 245, 237, 0.95);
  box-shadow: 0 5px 18px rgba(60, 44, 30, 0.1);
  backdrop-filter: blur(10px);
}

.journal-editor-page .journal-editor-actions {
  min-width: 0;
  max-width: calc(100% - 12rem);
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: thin;
}

.journal-editor-page .journal-editor-actions > * {
  flex: 0 0 auto;
}

.journal-editor-page .journal-save-status {
  flex: 0 0 auto;
  padding: 0 0.35rem;
  font-variant-numeric: tabular-nums;
}

.journal-editor-personalize {
  margin-top: 0.8rem;
}

.journal-editor-personalize > summary {
  width: fit-content;
  padding: 0.45rem 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 999px;
  background: rgba(34, 26, 22, 0.2);
  color: #fff;
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 700;
}

.journal-editor-personalize > summary:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.journal-editor-personalize[open] > summary {
  margin-bottom: 0.65rem;
  background: rgba(34, 26, 22, 0.34);
}

.journal-rich-editor .tiptap {
  width: 100%;
  max-width: var(--journal-reading-width);
  margin-right: auto;
  margin-left: auto;
  padding: 0;
}

.journal-view-page .journal-view-body .journal-rendered-entry {
  max-width: var(--journal-reading-width);
  margin-right: auto;
  margin-left: auto;
}

.journal-rich-editor .tiptap > p,
.journal-rich-editor .tiptap > ul,
.journal-rich-editor .tiptap > ol {
  margin: 1.05rem 0;
  color: #51483f;
  font-size: 1.04rem;
  line-height: 1.82;
}

.journal-rich-editor .tiptap > h2,
.journal-rich-editor .tiptap > h3 {
  margin: 2.2rem 0 0.8rem;
  color: #3c2b22;
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.2;
}

.journal-rich-editor .tiptap > blockquote {
  margin: 1.5rem 0;
  padding: 0.4rem 0 0.4rem 1.2rem;
  border-left: 3px solid #b75a42;
  color: #66564a;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.12rem;
  line-height: 1.7;
}

.journal-view-page .journal-view-body .journal-rendered-entry > p,
.journal-view-page .journal-view-body .journal-rendered-entry.tiptap > p,
.journal-view-page .journal-view-body .journal-rendered-entry > .tiptap > p,
.journal-view-page .journal-view-body .journal-rendered-entry > ul,
.journal-view-page .journal-view-body .journal-rendered-entry > ol,
.journal-view-page .journal-view-body .journal-rendered-entry.tiptap > ul,
.journal-view-page .journal-view-body .journal-rendered-entry.tiptap > ol,
.journal-view-page .journal-view-body .journal-rendered-entry > .tiptap > ul,
.journal-view-page .journal-view-body .journal-rendered-entry > .tiptap > ol {
  margin: 1.05rem 0;
  color: #51483f;
  font-size: 1.04rem;
  line-height: 1.82;
}

.journal-view-page .journal-view-body .journal-rendered-entry > h2,
.journal-view-page .journal-view-body .journal-rendered-entry > h3,
.journal-view-page .journal-view-body .journal-rendered-entry.tiptap > h2,
.journal-view-page .journal-view-body .journal-rendered-entry.tiptap > h3 {
  margin: 2.2rem 0 0.8rem;
  color: #3c2b22;
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.2;
}

.journal-view-page .journal-view-body .journal-rendered-entry > blockquote,
.journal-view-page .journal-view-body .journal-rendered-entry.tiptap > blockquote,
.journal-view-page .journal-view-body .journal-rendered-entry > .tiptap > blockquote {
  margin: 1.5rem 0;
  padding: 0.4rem 0 0.4rem 1.2rem;
  border-left: 3px solid #b75a42;
  color: #66564a;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.12rem;
  line-height: 1.7;
}

@media (max-width: 767.98px) {
  .journal-editor-page .journal-editor-topbar {
    position: static;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
  }

  .journal-editor-page .journal-editor-actions {
    max-width: 100%;
    padding: 0.2rem 0 0.55rem;
    scrollbar-width: thin;
  }

  .journal-editor-page .journal-editor-actions .journal-save-status {
    min-width: max-content;
  }

  .journal-view-page .journal-view-body .journal-rendered-entry > p,
  .journal-view-page .journal-view-body .journal-rendered-entry.tiptap > p,
  .journal-view-page .journal-view-body .journal-rendered-entry > .tiptap > p,
  .journal-view-page .journal-view-body .journal-rendered-entry > ul,
  .journal-view-page .journal-view-body .journal-rendered-entry > ol,
  .journal-view-page .journal-view-body .journal-rendered-entry.tiptap > ul,
  .journal-view-page .journal-view-body .journal-rendered-entry.tiptap > ol,
  .journal-view-page .journal-view-body .journal-rendered-entry > .tiptap > ul,
  .journal-view-page .journal-view-body .journal-rendered-entry > .tiptap > ol {
    font-size: 1rem;
    line-height: 1.72;
  }
}

@media (min-width: 768px) and (max-width: 1279.98px) {
  .journal-editor-shell {
    width: 100%;
  }

  .journal-editor-body {
    grid-template-columns: minmax(0, 1fr);
  }

  .journal-editor-guide {
    position: static;
    max-height: none;
    overflow: visible;
    padding: 1.2rem clamp(1.25rem, 5vw, 3rem);
    border-bottom: 1px solid var(--journal-line);
  }

  .journal-tool-list {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .journal-editor-main {
    padding: 2rem clamp(1.25rem, 5vw, 3rem) 4rem;
    border-left: 0;
  }

  .journal-editor-guide .journal-selected-image-details {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .journal-editor-guide .journal-selected-image-details > strong,
  .journal-editor-guide .journal-selected-image-details .journal-selected-image-field--wide,
  .journal-editor-guide .journal-selected-image-actions {
    grid-column: 1 / -1;
  }

  .journal-editor-guide .journal-selected-image-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .journal-editor-guide .journal-selected-image-details {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .journal-editor-guide .journal-selected-image-details > strong,
  .journal-editor-guide .journal-selected-image-actions {
    grid-column: 1 / -1;
  }

  .journal-editor-guide .journal-selected-image-details .journal-selected-image-field--wide {
    grid-column: 1 / -1;
  }

  .journal-editor-guide .journal-selected-image-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1280px) and (max-width: 1339.98px) {
  .journal-editor-body {
    grid-template-columns: minmax(0, 1fr);
  }

  .journal-editor-guide {
    position: static;
    max-height: none;
    overflow: visible;
    padding: 1.2rem clamp(1.25rem, 5vw, 3rem);
    border-bottom: 1px solid var(--journal-line);
  }

  .journal-tool-list {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .journal-editor-main {
    padding: 2rem clamp(1.25rem, 5vw, 3rem) 4rem;
    border-left: 0;
  }
}

@media (min-width: 1280px) {
  .journal-editor-hero {
    max-width: 1180px;
    margin-right: auto;
    margin-left: auto;
  }

  .journal-editor-main {
    padding-right: clamp(1.2rem, 3vw, 2.5rem);
    padding-left: clamp(1.2rem, 3vw, 2.5rem);
  }
}

@media (max-width: 767.98px) {
  .journal-rich-editor .tiptap figure.journal-entry-photo {
    width: min(100%, calc(100vw - 2rem));
    margin: 1rem auto;
  }

  .journal-rich-editor .tiptap figure.journal-entry-photo[data-photo-width="40"] {
    width: min(40%, calc(100vw - 2rem));
  }

  .journal-rich-editor .tiptap figure.journal-entry-photo[data-photo-width="60"] {
    width: min(60%, calc(100vw - 2rem));
  }

  .journal-rich-editor .tiptap figure.journal-entry-photo[data-photo-width="80"] {
    width: min(80%, calc(100vw - 2rem));
  }

  .journal-rich-editor .tiptap img {
    max-height: min(46vh, 24rem);
  }

  .journal-rich-editor .tiptap > p,
  .journal-rich-editor .tiptap > ul,
  .journal-rich-editor .tiptap > ol {
    font-size: 1rem;
    line-height: 1.72;
  }
}

/* Keep the public, server-rendered heading hierarchy visually identical to
   the heading level the author chose in the editor. The published page shifts
   headings down one semantic level to preserve a single page-level h1. */
.journal-rich-editor .tiptap > h1,
body.journal-view-page .journal-view-body .journal-rendered-entry .journal-published-entry > h2.journal-published-heading--level-1 {
  margin: 0 0 0.5rem;
  color: #212529;
  font-family: Lato, "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.2;
}

.journal-rich-editor .tiptap > h2,
body.journal-view-page .journal-view-body .journal-rendered-entry .journal-published-entry > h3.journal-published-heading--level-2 {
  margin: 2.2rem 0 0.8rem;
  color: #3c2b22;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  line-height: 1.2;
}

.journal-rich-editor .tiptap > h3,
body.journal-view-page .journal-view-body .journal-rendered-entry .journal-published-entry > h4.journal-published-heading--level-3 {
  margin: 2.2rem 0 0.8rem;
  color: #3c2b22;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.45rem;
  line-height: 1.2;
}

body.journal-view-page .journal-view-body .journal-rendered-entry .journal-published-entry > h4.journal-published-heading--level-3 {
  clear: both;
}

/* Keep the journal's chosen color while retaining the refreshed, compact layout. */
.journal-editor-page .journal-editor-hero,
.journal-view-page .journal-editor-hero {
  position: relative;
  min-height: 0;
  overflow: hidden;
  border-top: 0;
  background:
    linear-gradient(rgba(28, 22, 18, 0.18), rgba(28, 22, 18, 0.28)),
    var(--journal-header-color, #9d342b);
  color: #fffaf2;
  align-items: start;
}

.journal-editor-page .journal-title-input,
.journal-view-page .journal-view-title {
  max-width: none;
  margin: 0;
  padding: 1.3rem clamp(1.25rem, 4vw, 3rem) 0.35rem;
  color: #fffaf2;
  font-size: clamp(1.9rem, 3.2vw, 2.8rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.025em;
  text-align: left;
}

.journal-editor-page .journal-title-input {
  background: transparent;
}

.journal-editor-page .journal-editor-hero .photo-journal-hero-copy,
.journal-view-page .journal-view-hero-copy {
  min-width: 0;
  max-width: 44rem;
  padding: 0.45rem clamp(1.25rem, 4vw, 3rem) 1.5rem;
  justify-content: flex-start;
  color: #fffaf2;
}

.journal-editor-page .journal-editor-hero .photo-journal-hero-copy .story-date,
.journal-view-page .journal-view-hero-copy .story-date {
  margin: 0 0 0.55rem;
  color: #ffe1ad;
  font-size: 0.68rem;
  letter-spacing: 0.09em;
  line-height: 1.5;
}

.journal-editor-page .journal-travel-period {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 0.1rem;
  color: #fffaf2;
  font-size: 0.82rem;
}

.journal-editor-page .journal-travel-period label {
  margin: 0;
  color: inherit;
  font-weight: 600;
}

.journal-editor-page .journal-travel-period select,
.journal-editor-page .journal-travel-period input {
  min-height: 2.25rem;
  padding: 0.35rem 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 0.35rem;
  background: rgba(255, 255, 255, 0.12);
  color: #fffaf2;
  font: inherit;
}

.journal-editor-page .journal-travel-period select option {
  color: #2e2925;
}

.journal-editor-page .journal-travel-period input {
  width: 8.4rem;
}

.journal-editor-page .journal-travel-period-note {
  margin: -0.15rem 0 0.55rem;
  color: rgba(255, 250, 242, 0.72);
  font-size: 0.7rem;
}

.journal-editor-page .journal-summary-input,
.journal-view-page .journal-view-hero-copy .story-deck {
  max-width: 42rem;
  margin: 0;
  color: rgba(255, 250, 242, 0.92);
  font-size: 1.06rem;
  line-height: 1.65;
}

.journal-editor-page .journal-summary-input {
  padding: 0.2rem 0.35rem;
  border-color: rgba(255, 255, 255, 0.42);
  border-radius: 0.35rem;
  background: rgba(255, 255, 255, 0.12);
  color: #fffaf2;
}

.journal-editor-page .journal-summary-input::placeholder {
  color: rgba(255, 250, 242, 0.72);
}

.journal-editor-page .journal-summary-input:focus {
  border-color: rgba(255, 255, 255, 0.78);
  outline: 2px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.18);
}

.journal-editor-page .journal-editor-hero .story-byline,
.journal-view-page .journal-view-hero-copy .story-byline {
  margin: 0.75rem 0 0;
  color: #f4d4ae;
  font-size: 0.75rem;
  line-height: 1.5;
}

.journal-view-page .journal-view-tags {
  gap: 0.35rem;
  margin: 0.8rem 0 0;
}

.journal-view-page .journal-view-tags span {
  padding: 0.24rem 0.55rem;
  border-color: rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.15);
  color: #fffaf2;
  font-size: 0.72rem;
  font-weight: 600;
}

.journal-view-page .journal-view-breadcrumbs a {
  color: #ffe1ad;
}

.journal-view-page .journal-view-breadcrumbs span {
  color: rgba(255, 250, 242, 0.7);
}

.journal-editor-page .journal-editor-personalize > summary {
  border-color: rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.16);
  color: #fffaf2;
}

.journal-editor-page .journal-editor-personalize[open] > summary {
  background: rgba(255, 255, 255, 0.24);
}

.journal-editor-page .journal-header-colour,
.journal-editor-page .journal-tag-editor {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(34, 26, 22, 0.18);
}

.journal-editor-page .journal-header-colour > label,
.journal-editor-page .journal-tag-editor > label {
  color: #fffaf2;
}

.journal-editor-page .journal-header-colour > input,
.journal-editor-page .journal-colour-swatches button {
  border-color: rgba(255, 255, 255, 0.58);
}

.journal-editor-page .journal-tag-chip {
  border-color: rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.16);
  color: #fffaf2;
}

.journal-editor-page .journal-tag-editor > p {
  color: rgba(255, 250, 242, 0.78);
}

.journal-editor-page .journal-cover-editor {
  min-width: 0;
  min-height: 0;
  max-height: 32rem;
  aspect-ratio: 4 / 3;
  margin: 1rem clamp(1.25rem, 4vw, 3rem) 1.5rem 0;
  border: 1px solid rgba(67, 53, 38, 0.14);
  border-radius: 0.75rem;
  background: #f0ede6;
}

.journal-editor-page .journal-cover-editor img {
  object-fit: contain;
}

.journal-editor-page .journal-cover-placeholder {
  color: #6c6258;
}

.journal-editor-page .journal-cover-placeholder small {
  color: #75685c;
}

.journal-editor-page .journal-cover-actions .btn {
  border-color: rgba(67, 53, 38, 0.2);
  background: rgba(255, 253, 247, 0.96);
  color: #3b3028;
}

.journal-view-page .journal-view-cover {
  display: flex;
  min-width: 0;
  min-height: 0;
  max-height: none;
  height: auto;
  margin: 1rem clamp(1.25rem, 4vw, 3rem) 1.5rem 0;
  aspect-ratio: auto;
  background: transparent;
  flex-direction: column;
  justify-content: flex-start;
}

.journal-view-page .journal-view-cover img {
  width: 100%;
  height: auto;
  max-height: min(52vh, 30rem);
  aspect-ratio: 4 / 3;
  border: 1px solid rgba(67, 53, 38, 0.14);
  border-radius: 0.75rem;
  background: #f0ede6;
  object-fit: contain;
}

.journal-view-page .journal-view-cover figcaption {
  position: static;
  max-width: 100%;
  padding: 0.45rem 0.15rem 0;
  background: transparent;
  color: rgba(255, 250, 242, 0.82);
  font-size: 0.72rem;
  line-height: 1.5;
}

@media (min-width: 992px) {
  .journal-editor-page .journal-editor-hero {
    grid-template-columns: minmax(0, 0.9fr) minmax(22rem, 1.1fr);
    grid-template-rows: auto minmax(0, 1fr);
    column-gap: 0;
  }

  .journal-editor-page .journal-title-input {
    grid-column: 1 / -1;
    grid-row: 1;
    padding-bottom: 0.35rem;
  }

  .journal-editor-page .journal-editor-hero .photo-journal-hero-copy {
    grid-column: 1;
    grid-row: 2;
    max-width: none;
    padding-top: 0.45rem;
  }

  .journal-editor-page .journal-cover-editor {
    grid-column: 2;
    grid-row: 2;
    align-self: start;
  }

  .journal-view-page .photo-journal-hero {
    grid-template-columns: minmax(0, 0.9fr) minmax(22rem, 1.1fr);
    grid-template-rows: auto auto minmax(0, 1fr);
    column-gap: 0;
  }

  .journal-view-page .journal-view-breadcrumbs {
    grid-column: 1 / -1;
    grid-row: 1;
    padding: 1.2rem clamp(1.25rem, 4vw, 3rem) 0;
  }

  .journal-view-page .journal-view-title {
    grid-column: 1 / -1;
    grid-row: 2;
    padding-top: 0.9rem;
    padding-bottom: 0.35rem;
  }

  .journal-view-page .journal-view-hero-copy {
    grid-column: 1;
    grid-row: 3;
    max-width: none;
    padding-top: 0.45rem;
  }

  .journal-view-page .journal-view-cover {
    grid-column: 2;
    grid-row: 3;
    align-self: start;
  }
}

@media (max-width: 991.98px) {
  .journal-editor-page .journal-editor-hero,
  .journal-view-page .photo-journal-hero {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto;
  }

  .journal-editor-page .journal-title-input,
  .journal-view-page .journal-view-title {
    grid-column: 1;
    grid-row: auto;
    padding: 1rem 1.2rem 0.3rem;
  }

  .journal-editor-page .journal-editor-hero .photo-journal-hero-copy,
  .journal-view-page .journal-view-hero-copy {
    grid-column: 1;
    grid-row: auto;
    min-height: 0;
    padding: 0.35rem 1.2rem 1rem;
  }

  .journal-editor-page .journal-cover-editor,
  .journal-view-page .journal-view-cover {
    grid-column: 1;
    grid-row: auto;
    width: auto;
    max-width: none;
    margin: 0.25rem 1.2rem 1.2rem;
  }

  .journal-editor-page .journal-cover-editor {
    width: auto;
    aspect-ratio: 4 / 3;
  }

  .journal-view-page .journal-view-breadcrumbs {
    grid-column: 1;
    grid-row: auto;
    padding: 1rem 1.2rem 0;
  }
}

/* Final journal hero layout override: natural cover ratio, aligned summary. */
.journal-editor-page .journal-cover-editor,
.journal-view-page .journal-view-cover {
  display: flex;
  width: auto;
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  max-height: none;
  height: auto;
  margin: 0.5rem clamp(1.25rem, 4vw, 3rem) 1.35rem 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  aspect-ratio: auto;
  align-items: center;
  align-self: start;
  flex-direction: column;
  justify-content: flex-start;
}

.journal-editor-page .journal-cover-editor > img,
.journal-view-page .journal-view-cover > img {
  position: static;
  inset: auto;
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: min(52vh, 28rem);
  border: 0;
  border-radius: 0.45rem;
  background: transparent;
  box-shadow: none;
  aspect-ratio: auto;
  object-fit: contain;
}

.journal-editor-page .journal-cover-editor > img[hidden],
.journal-editor-page .journal-cover-editor > figcaption[hidden] {
  display: none;
}

.journal-editor-page .journal-cover-editor > figcaption,
.journal-view-page .journal-view-cover > figcaption {
  position: static;
  max-width: min(100%, 40rem);
  padding: 0.45rem 0.15rem 0;
  background: transparent;
  color: rgba(255, 250, 242, 0.82);
  font-size: 0.76rem;
  line-height: 1.45;
  text-align: center;
}

@media (min-width: 992px) {
  .journal-editor-page .journal-editor-hero {
    grid-template-rows: auto auto;
    align-content: start;
  }

  .journal-editor-page .journal-editor-hero .photo-journal-hero-copy,
  .journal-view-page .journal-view-hero-copy {
    min-height: 0;
    align-self: start;
    justify-content: flex-start;
    padding-top: 0.5rem;
    padding-bottom: 1.35rem;
  }

  .journal-view-page .photo-journal-hero {
    grid-template-rows: auto auto auto;
    align-content: start;
  }
}

@media (max-width: 991.98px) {
  .journal-editor-page .journal-cover-editor,
  .journal-view-page .journal-view-cover {
    margin: 0.25rem 1.2rem 1.2rem;
  }

  .journal-editor-page .journal-cover-editor > img,
  .journal-view-page .journal-view-cover > img {
    max-height: min(55vh, 24rem);
  }
}

/* Give the header its own left-side controls, parallel to the writing tools. */
.journal-editor-page .journal-header-tools {
  min-width: 0;
  padding: 0 clamp(0.9rem, 2vw, 1.4rem) 1.25rem;
}

.journal-editor-page .journal-header-tools-title {
  margin: 0 0 0.55rem;
  color: #ffe1ad;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.journal-editor-page .journal-header-tools .journal-cover-settings {
  width: 100%;
  margin: 0;
  padding: 0.8rem;
  gap: 0.6rem;
}

.journal-editor-page .journal-header-tools .journal-cover-settings-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.journal-editor-page .journal-header-tools .journal-cover-settings > strong {
  font-size: 0.82rem;
}

.journal-editor-page .journal-header-tools .journal-cover-settings-actions .btn {
  width: 100%;
  white-space: normal;
}

@media (min-width: 992px) {
  .journal-editor-page .journal-editor-hero {
    grid-template-columns: minmax(10rem, 0.28fr) minmax(17rem, 0.78fr) minmax(20rem, 1.14fr);
    column-gap: clamp(0.7rem, 1.8vw, 1.5rem);
  }

  .journal-editor-page .journal-header-tools {
    grid-column: 1;
    grid-row: 1 / span 2;
    padding: 1.1rem 0 1.25rem clamp(1.2rem, 2.5vw, 2rem);
    align-self: start;
  }

  .journal-editor-page .journal-title-input {
    grid-column: 2 / -1;
    grid-row: 1;
    padding-left: 0;
  }

  .journal-editor-page .journal-editor-hero .photo-journal-hero-copy {
    grid-column: 2;
    grid-row: 2;
    padding-left: 0;
  }

  .journal-editor-page .journal-cover-editor {
    grid-column: 3;
    grid-row: 2;
    margin-right: clamp(1.2rem, 2.5vw, 2rem);
  }
}

@media (max-width: 991.98px) {
  .journal-editor-page .journal-title-input {
    grid-column: 1;
    grid-row: 1;
  }

  .journal-editor-page .journal-header-tools {
    grid-column: 1;
    grid-row: 2;
    padding: 0 1.2rem 0.75rem;
  }

  .journal-editor-page .journal-editor-hero .photo-journal-hero-copy {
    grid-column: 1;
    grid-row: 3;
  }

  .journal-editor-page .journal-cover-editor {
    grid-column: 1;
    grid-row: 4;
  }
}
