:root {
  color-scheme: dark;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
  color: #ecece6;
  background: #111311;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  margin: 0;
  background: #111311;
  color: #ecece6;
}

a {
  color: #d9bb8a;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: #f0d8b3;
}

button {
  color: inherit;
  font: inherit;
}

:focus-visible {
  outline: 3px solid #e4bd7d;
  outline-offset: 4px;
}

.site-layout {
  position: relative;
  width: min(100% - 2.5rem, 58rem);
  margin: 0 auto;
  padding: 2.5rem 0 5rem;
}

.site {
  width: 100%;
  margin: 0;
  padding: 0;
}

.account-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.85rem;
  margin: 0 0 2rem;
  color: #b8bbb4;
  font-size: 0.9rem;
}

.account-controls strong {
  color: #ecece6;
  overflow-wrap: anywhere;
}

.account-controls form {
  margin: 0;
}

.account-controls button,
.login-submit {
  padding: 0.55rem 0.9rem;
  border: 1px solid #65695f;
  border-radius: 0.2rem;
  background: #20231f;
  color: #f0efe9;
  cursor: pointer;
}

.account-controls button:hover,
.login-submit:hover {
  border-color: #d2b17b;
  background: #2a2c26;
}

.login-page {
  display: grid;
  min-height: 100vh;
  min-height: 100svh;
  place-items: center;
  padding: 2rem 1rem;
}

.login-card {
  width: min(100%, 27rem);
  padding: clamp(1.5rem, 6vw, 2.5rem);
  border: 1px solid #383d37;
  border-radius: 0.35rem;
  background: #171a17;
  box-shadow: 0 1.5rem 4rem rgb(0 0 0 / 24%);
}

.login-header {
  margin-bottom: 2rem;
}

.login-header h1 {
  margin: 0;
  color: #f1f0e9;
  font-size: 1.8rem;
  font-weight: 620;
  letter-spacing: 0.015em;
}

.login-header p {
  margin: 0.35rem 0 0;
  color: #b0b3ac;
}

.login-error {
  margin: 0 0 1.2rem;
  padding: 0.7rem 0.85rem;
  border-left: 3px solid #ce8f80;
  background: #2b211f;
  color: #f0c2b7;
}

.login-field {
  margin: 0 0 1.2rem;
}

.login-field label {
  display: block;
  margin-bottom: 0.35rem;
  color: #d2d4cd;
  font-size: 0.92rem;
}

.login-field input {
  width: 100%;
  min-height: 2.8rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid #50554e;
  border-radius: 0.2rem;
  background: #101210;
  color: #f0efe9;
  font: inherit;
}

.login-field input:focus-visible {
  border-color: #e4bd7d;
}

.login-submit {
  width: 100%;
  min-height: 2.9rem;
  margin-top: 0.3rem;
  background: #292b25;
  font-weight: 600;
}

.site-sidebar {
  display: none;
}

.site-layout.sidebar-open .site-sidebar {
  position: fixed;
  z-index: 20;
  inset: 0 auto 0 0;
  display: block;
  width: min(19rem, calc(100vw - 3rem));
  max-height: 100vh;
  overflow-y: auto;
  padding: 5rem 1.25rem 2rem;
  border-right: 1px solid #50554e;
  background: #171a17;
  box-shadow: 0.8rem 0 2.5rem rgb(0 0 0 / 35%);
}

.sidebar-toggle {
  position: fixed;
  z-index: 22;
  top: 2rem;
  left: 0;
  display: grid;
  width: 2.5rem;
  height: 3rem;
  place-items: center;
  padding: 0;
  border: 1px solid #50554e;
  border-left: 0;
  border-radius: 0 0.3rem 0.3rem 0;
  background: #20231f;
  color: #f0efe9;
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
}

.sidebar-toggle:hover {
  border-color: #d2b17b;
  background: #2a2c26;
}

.sidebar-backdrop {
  display: none;
}

.sidebar-backdrop:not([hidden]) {
  position: fixed;
  z-index: 19;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: rgb(0 0 0 / 68%);
  cursor: default;
}

body.sidebar-modal-open {
  overflow: hidden;
}

.sidebar-header {
  margin-bottom: 2rem;
}

.sidebar-header .site-name {
  display: inline-block;
  color: #f1f0e9;
  font-size: 1.3rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.sidebar-header p {
  margin: 0.35rem 0 0;
  color: #b0b3ac;
}

.sidebar-section {
  margin: 0 0 1.8rem;
}

.sidebar-section h2 {
  margin: 0 0 0.55rem;
  color: #bfc1ba;
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.sidebar-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.sidebar-list li {
  margin: 0;
  padding: 0.28rem 0;
  color: #b8bbb4;
  font-size: 0.91rem;
  line-height: 1.4;
}

.sidebar-list a {
  display: block;
  overflow-wrap: anywhere;
}

.sidebar-list time {
  display: block;
  margin-top: 0.05rem;
  font-size: 0.78rem;
}

.sidebar-muted {
  color: #858981 !important;
}

.sidebar-expand {
  margin-top: 0.45rem;
  padding: 0.3rem 0.55rem;
  border: 1px solid #50554e;
  border-radius: 0.2rem;
  background: #191c19;
  color: #d9bb8a;
  font-size: 0.82rem;
  cursor: pointer;
}

.sidebar-expand:hover {
  border-color: #d2b17b;
}

.new-post-float {
  position: fixed;
  z-index: 18;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  display: inline-flex;
  min-height: 3rem;
  align-items: center;
  justify-content: center;
  max-width: calc(100vw - 2rem);
  padding: 0.65rem 1rem;
  border: 1px solid #d2b17b;
  border-radius: 999px;
  background: #d9bb8a;
  color: #191a16;
  box-shadow: 0 0.5rem 1.5rem rgb(0 0 0 / 38%);
  font-weight: 650;
  text-decoration: none;
}

.new-post-float:hover {
  border-color: #f0d8b3;
  background: #f0d8b3;
  color: #191a16;
}

.site-new-post {
  max-width: 48rem;
}

.new-post-heading {
  margin-bottom: 2.2rem;
}

.new-post-heading h1 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 560;
  letter-spacing: -0.03em;
}

.draft-field {
  margin: 0 0 1.4rem;
}

.draft-field > label,
.draft-block-field > span {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  margin-bottom: 0.4rem;
  color: #d2d4cd;
  font-size: 0.94rem;
  font-weight: 600;
}

.draft-optional {
  color: #92968d;
  font-size: 0.8rem;
  font-weight: 400;
}

.draft-field input,
.draft-field textarea,
.draft-block-field input,
.draft-block-field textarea {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 2.85rem;
  padding: 0.6rem 0.7rem;
  border: 1px solid #50554e;
  border-radius: 0.2rem;
  background: #101210;
  color: #f0efe9;
  font: inherit;
  resize: vertical;
}

.draft-field input:focus-visible,
.draft-field textarea:focus-visible,
.draft-block-field input:focus-visible,
.draft-block-field textarea:focus-visible {
  border-color: #e4bd7d;
}

.draft-field input[aria-invalid="true"] {
  border-color: #ce8f80;
}

.draft-field-help {
  margin: 0.35rem 0 0;
  color: #92968d;
  font-size: 0.83rem;
}

.draft-block-editor {
  margin: 2.5rem 0 1.5rem;
}

.draft-block-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.draft-block-heading h2 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 580;
}

.draft-block-heading p {
  margin: 0.4rem 0 0;
  color: #b8bbb4;
  font-size: 0.9rem;
}

.draft-block-add-area {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.25rem;
}

.draft-secondary-button,
.draft-small-button {
  flex: 0 0 auto;
  padding: 0.42rem 0.7rem;
  border: 1px solid #65695f;
  border-radius: 0.2rem;
  background: #20231f;
  color: #f0efe9;
  font: inherit;
  font-size: 0.86rem;
  cursor: pointer;
}

.draft-secondary-button:hover,
.draft-small-button:hover:not(:disabled) {
  border-color: #d2b17b;
  background: #2a2c26;
}

.draft-small-button:disabled {
  color: #777b73;
  cursor: not-allowed;
}

.draft-remove-button {
  border-color: #77564d;
  color: #e8b8aa;
}

.draft-remove-button:hover:not(:disabled) {
  border-color: #ce8f80;
  background: #2b211f;
}

.draft-block {
  min-width: 0;
  margin: 0 0 1rem;
  padding: 1rem;
  border: 1px solid #424740;
  border-radius: 0.25rem;
  background: #171a17;
}

.draft-block > legend {
  padding: 0 0.4rem;
  color: #e5d0ac;
  font-size: 0.95rem;
  font-weight: 600;
}

.draft-block-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.9rem;
}

.draft-block-fields {
  display: grid;
  gap: 0.9rem;
}

.draft-block-field {
  display: block;
  min-width: 0;
}

.draft-block-field > span {
  font-size: 0.86rem;
  font-weight: 500;
}

.draft-block-field textarea {
  min-height: 7rem;
}

.draft-gallery {
  margin-top: 1.2rem;
  padding-top: 1rem;
  border-top: 1px solid #353a35;
}

.draft-gallery h3 {
  margin: 0 0 0.8rem;
  color: #c5c7c0;
  font-size: 0.9rem;
  font-weight: 600;
}

.draft-gallery-list {
  display: grid;
  gap: 0.75rem;
  min-height: 3.5rem;
  margin-bottom: 0.8rem;
  padding: 0.65rem;
  border: 1px dashed #50554e;
  border-radius: 0.2rem;
}

.draft-media-upload {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
  padding: 0.6rem 0.5rem 0.25rem;
  text-align: left;
}

.draft-media-upload-name {
  overflow-wrap: anywhere;
  font-size: 0.8rem;
}

.draft-media-upload-progress {
  display: block;
  width: 100%;
  height: 0.8rem;
  accent-color: #d9bb8a;
}

.draft-media-upload-detail {
  color: #a7aaa2;
  font-size: 0.85rem;
}

.draft-media-item {
  display: grid;
  grid-template-columns: minmax(7rem, 12rem) minmax(0, 1fr);
  gap: 0.8rem;
  min-width: 0;
  padding: 0.65rem;
  border: 1px solid #424740;
  border-radius: 0.2rem;
  background: #111311;
  cursor: grab;
}

.draft-media-item:active {
  cursor: grabbing;
}

.draft-media-preview {
  display: grid;
  min-height: 6rem;
  align-content: center;
  overflow: hidden;
  background: #090a09;
  color: #aeb1a8;
  text-align: center;
}

.draft-media-preview img,
.draft-media-preview video {
  width: 100%;
  max-height: 12rem;
  object-fit: contain;
}

.draft-media-fields {
  display: grid;
  gap: 0.55rem;
  min-width: 0;
}

.draft-media-fields .draft-block-field > span {
  margin-bottom: 0.25rem;
  font-size: 0.8rem;
}

.draft-media-fields input,
.draft-media-fields textarea {
  min-height: 2.3rem;
  padding: 0.4rem 0.55rem;
  font-size: 0.88rem;
}

.draft-media-fields textarea {
  min-height: 4rem;
}

.draft-media-actions {
  display: flex;
  grid-column: 1 / -1;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
}

.draft-file-input {
  display: none;
}

.draft-drop-help {
  margin: 0.55rem 0 0;
  color: #92968d;
  font-size: 0.82rem;
}

.draft-form-error {
  margin: 1rem 0;
  padding: 0.75rem 0.9rem;
  border-left: 3px solid #ce8f80;
  background: #2b211f;
  color: #f0c2b7;
}

.draft-submit-area {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.25rem;
  margin-top: 2rem;
  padding-top: 1.2rem;
  border-top: 1px solid #353a35;
}

.draft-submit-actions {
  display: flex;
  flex: 0 0 auto;
}

.draft-action-group {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.6rem;
}

.draft-submit-actions .post-publish-button {
  min-height: 2.9rem;
  padding-inline: 1rem;
}

.draft-publish-control {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
}

.draft-submit-area p {
  max-width: 31rem;
  margin: 0;
  color: #b8bbb4;
  font-size: 0.9rem;
}

.draft-submit-area .draft-publish-help {
  max-width: 14rem;
  color: #92968d;
  font-size: 0.78rem;
}

.draft-submit-button {
  flex: 0 0 auto;
  min-height: 2.9rem;
  padding: 0.6rem 1rem;
  border: 1px solid #d2b17b;
  border-radius: 0.2rem;
  background: #d9bb8a;
  color: #191a16;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}

.draft-submit-button:hover:not(:disabled) {
  border-color: #f0d8b3;
  background: #f0d8b3;
}

.draft-submit-button:disabled {
  color: #505047;
  cursor: wait;
}

.creation-confirmation {
  margin: 0 0 1.5rem;
  padding: 0.7rem 0.9rem;
  border-left: 3px solid #a9c19a;
  background: #1d261d;
  color: #d2e0c8;
}

.feed-page-heading {
  margin: 0 0 2.5rem;
}

.feed-page-heading h1,
.site-archive > h1 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 560;
  letter-spacing: -0.03em;
}

.site-header {
  margin-bottom: 3rem;
}

.site-name {
  display: inline-block;
  color: #f1f0e9;
  font-size: 1.3rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.site-header p {
  margin: 0.35rem 0 0;
  color: #b0b3ac;
}

.back-link {
  margin: 0 0 2rem;
}

.post {
  padding: 0 0 3rem;
  border-bottom: 1px solid #353a35;
}

.post + .post {
  padding-top: 3rem;
}

.post-header {
  margin-bottom: 2rem;
}

.post-date-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.post-share-button,
.post-publish-button,
.share-copy-button,
.share-revoke-button {
  padding: 0.38rem 0.75rem;
  border: 1px solid #65695f;
  border-radius: 0.2rem;
  background: #20231f;
  color: #f0efe9;
  font: inherit;
  font-size: 0.88rem;
  cursor: pointer;
}

.post-share-button:hover,
.post-publish-button:hover,
.share-copy-button:hover,
.share-revoke-button:hover {
  border-color: #d2b17b;
  background: #2a2c26;
}

.post-publish-area {
  margin-top: 1rem;
}

.post-publish-button {
  border-color: #d2b17b;
  background: #d9bb8a;
  color: #191a16;
  font-weight: 650;
}

.post-publish-button:hover {
  border-color: #f0d8b3;
  background: #f0d8b3;
}

.post-publish-button:disabled {
  border-color: #4a4d46;
  background: #292c28;
  color: #858980;
  cursor: not-allowed;
}

.share-dialog,
.publish-dialog {
  position: fixed;
  width: min(94vw, 54rem);
  max-width: none;
  max-height: 94vh;
  overflow: auto;
  padding: 2.6rem 1.25rem 1.25rem;
  border: 1px solid #50544d;
  border-radius: 0.3rem;
  background: #171a17;
  color: #ecece6;
  box-shadow: 0 1.5rem 4rem rgb(0 0 0 / 45%);
}

.share-dialog::backdrop,
.publish-dialog::backdrop {
  background: rgb(0 0 0 / 78%);
}

.share-dialog h2,
.publish-dialog h2 {
  margin: 0 0 0.8rem;
  font-size: 1.35rem;
  font-weight: 580;
}

.publish-media-warning {
  margin: 0.6rem 0 1rem;
  color: #d8c39f;
  font-size: 0.92rem;
}

.share-dialog-close,
.publish-dialog-close {
  position: absolute;
  top: 0.45rem;
  right: 0.5rem;
  width: 2.2rem;
  height: 2.2rem;
  border: 1px solid #555a53;
  border-radius: 50%;
  background: #20231f;
  color: #f0efe9;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.share-dialog-close:hover,
.publish-dialog-close:hover {
  border-color: #d2b17b;
  background: #2a2c26;
}

.publish-dialog {
  width: min(92vw, 34rem);
  padding: 2.6rem 1.5rem 1.5rem;
}

.publish-dialog form {
  margin: 0;
}

.publish-override-toggle {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: #d4d5cf;
}

.publish-override-toggle input {
  accent-color: #d9bb8a;
}

.publish-time-override {
  display: grid;
  gap: 0.4rem;
  margin-top: 1rem;
}

.publish-time-override[hidden] {
  display: none;
}

.publish-time-override input {
  width: 100%;
  min-height: 2.8rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid #65695f;
  border-radius: 0.2rem;
  background: #111311;
  color: #f0efe9;
  font: inherit;
}

.publish-confirmation {
  min-height: 2.7rem;
  margin: 1rem 0;
  color: #c7c9c2;
}

.publish-error {
  margin: 1rem 0;
  padding: 0.7rem 0.8rem;
  border-left: 3px solid #ce8f80;
  background: #2b211f;
  color: #f0c2b7;
}

.publish-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.7rem;
}

.publish-dialog-actions button {
  min-height: 2.7rem;
  padding: 0.45rem 0.8rem;
  border: 1px solid #65695f;
  border-radius: 0.2rem;
  background: #20231f;
  color: #f0efe9;
  font: inherit;
  cursor: pointer;
}

.publish-dialog-actions #publish-submit {
  border-color: #d2b17b;
  background: #d9bb8a;
  color: #191a16;
  font-weight: 650;
}

.publish-dialog-actions button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.share-preview-actions {
  margin: 0 0 0.55rem;
  font-size: 0.9rem;
}

.share-preview-frame {
  height: min(45vh, 30rem);
  min-height: 14rem;
  overflow: hidden;
  border: 1px solid #3f443e;
  background: #111311;
}

.share-preview-frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #111311;
}

.share-expiry-slot {
  box-sizing: border-box;
  min-height: 2.5rem;
  padding-top: 0.75rem;
}

.share-expiry {
  margin: 0;
  color: #b8bbb4;
  font-size: 0.86rem;
}

.share-controls {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
  margin-top: 1rem;
}

.share-copy-row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  width: 100%;
}

.share-copy-button {
  padding: 0.55rem 0.9rem;
  font-size: 0.95rem;
}

.share-copy-button:disabled,
.share-revoke-button:disabled {
  color: #858981;
  cursor: wait;
}

.share-revoke-button {
  border-color: #77564d;
  color: #e8b8aa;
}

.share-revoke-slot {
  min-height: 2.25rem;
}

.share-revoke-button:hover {
  border-color: #ce8f80;
  background: #2b211f;
}

.share-status {
  min-width: 0;
  min-height: 1.5em;
  color: #c9d8b9;
  font-size: 0.9rem;
}

.share-status.is-error {
  color: #f0b6a8;
}

h1,
h2,
h3 {
  color: #f3f2ec;
  line-height: 1.2;
  text-wrap: balance;
}

.post h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(2rem, 5vw, 3.35rem);
  font-weight: 560;
  letter-spacing: -0.035em;
}

.post h2 {
  margin: 2.8rem 0 0.8rem;
  font-size: clamp(1.35rem, 3vw, 1.8rem);
  font-weight: 560;
}

.post h3 {
  margin: 0 0 0.45rem;
  font-size: 1.05rem;
  font-weight: 600;
}

time,
.media-label {
  color: #b6b9b1;
  font-size: 0.9rem;
}

.summary,
.group-description,
.group-note p,
.block-copy {
  white-space: pre-wrap;
}

.summary {
  max-width: 52rem;
  margin: 1.2rem 0 0;
  color: #d3d4cd;
  font-size: 1.08rem;
}

.tags {
  margin: 0 0 2.25rem;
  color: #b7b9b2;
  font-size: 0.92rem;
}

.tags .tag {
  display: inline-block;
  margin: 0.15rem 0.35rem 0.15rem 0;
  padding: 0.08rem 0.55rem;
  border: 1px solid #424740;
  border-radius: 999px;
}

.tag-label {
  margin-right: 0.25rem;
  color: #b7b9b2;
}

.post-group {
  margin: 2.5rem 0 3rem;
}

.post-group > h2 {
  margin-top: 0;
}

.group-description {
  max-width: 52rem;
  margin: 0.8rem 0 1.5rem;
  color: #c6c8c1;
}

.group-note {
  margin: 1.65rem 0;
  color: #d6d7d1;
}

.group-note p,
.block-copy {
  margin: 0.5rem 0 0;
}

figure {
  margin: 1.5rem 0 2rem;
}

img,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

.single-media > video {
  width: 100%;
  max-height: 78vh;
  background: #070807;
}

.media-download {
  display: inline-block;
  width: fit-content;
  margin-top: 0.45rem;
  color: #d9bb8a;
  font-size: 0.82rem;
  text-underline-offset: 0.15em;
}

.media-label {
  display: block;
  margin: 0 0 0.4rem;
  letter-spacing: 0.035em;
}

figcaption {
  margin-top: 0.7rem;
  color: #c1c3bc;
  font-size: 0.94rem;
}

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

.gallery-entry {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
}

.gallery-item {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: stretch;
  padding: 0;
  overflow: hidden;
  border: 1px solid #343934;
  border-radius: 0.25rem;
  background: #191c19;
  color: #ecece6;
  text-align: left;
  cursor: zoom-in;
}

.gallery-item:hover {
  border-color: #77715f;
  background: #20231f;
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #090a09;
}

.solo-media {
  width: 100%;
  border: 0;
  background: transparent;
}

.solo-media img {
  max-height: 78vh;
  aspect-ratio: auto;
  object-fit: contain;
}

.gallery-item .media-label,
.gallery-caption {
  margin: 0;
  padding: 0.5rem 0.75rem 0;
}

.gallery-caption {
  display: block;
  padding-top: 0.15rem;
  padding-bottom: 0.75rem;
  color: #c1c3bc;
  font-size: 0.9rem;
}

.video-preview-frame {
  position: relative;
  display: block;
  width: 100%;
  min-height: 12rem;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: linear-gradient(145deg, #242824, #111311 72%);
}

.video-preview-frame > video,
.video-preview-frame > canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  visibility: hidden;
}

.video-preview-frame[data-ready] > canvas {
  visibility: visible;
}

.video-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 0.6rem;
  background: linear-gradient(145deg, #242824, #111311 72%);
  color: #c5c7c0;
  text-align: center;
}

.video-preview-frame[data-ready] .video-placeholder {
  background: transparent;
}

.video-preview-frame[data-ready] .video-placeholder > span:not(.play-icon) {
  display: none;
}

.play-icon {
  display: grid;
  width: 3rem;
  height: 3rem;
  place-items: center;
  border: 1px solid #85877f;
  border-radius: 50%;
  color: #eee7d9;
  font-size: 1.1rem;
}

#feed-status {
  min-height: 1.65em;
  margin: 1.5rem 0 0.75rem;
  color: #b8bbb4;
}

#feed-sentinel {
  height: 1px;
}

#load-more {
  padding: 0.65rem 1rem;
  border: 1px solid #65695f;
  border-radius: 0.2rem;
  background: #20231f;
  color: #f0efe9;
  cursor: pointer;
}

#load-more:hover:not(:disabled) {
  border-color: #d2b17b;
  background: #2a2c26;
}

#load-more:disabled {
  color: #858981;
  cursor: not-allowed;
}

.empty-feed {
  color: #b8bbb4;
}

.gallery-panel {
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(96vw, 84rem);
  max-width: none;
  height: 94vh;
  height: 94dvh;
  max-height: 94vh;
  max-height: 94dvh;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
  border: 1px solid #50544d;
  background: #111311;
  color: #ecece6;
}

.gallery-panel[open] {
  display: flex;
}

.gallery-panel::backdrop {
  background: rgb(0 0 0 / 88%);
}

.gallery-panel-header {
  display: flex;
  min-height: 3.5rem;
  flex: 0 0 3.5rem;
  align-items: center;
  justify-content: flex-end;
  padding: 0 0.65rem;
  border-bottom: 1px solid #343934;
}

.gallery-panel-header form {
  margin: 0;
}

.gallery-panel-close {
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid #555a53;
  border-radius: 50%;
  background: #20231f;
  color: #f0efe9;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.gallery-panel-close:hover {
  border-color: #d2b17b;
  background: #2a2c26;
}

.gallery-panel-items {
  min-height: 0;
  flex: 1;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scrollbar-gutter: stable;
  padding: 0 clamp(1rem, 3vw, 3rem) 2rem;
  scroll-padding-block: 0.75rem 1rem;
}

.gallery-panel-items:focus-visible {
  outline: 2px solid #d2b17b;
  outline-offset: -3px;
}

.gallery-panel-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 1rem;
  min-width: 0;
  padding: 0.75rem 0 2.5rem;
  margin: 0 0 2.5rem;
  border-bottom: 1px solid #343934;
}

.gallery-panel-media {
  display: grid;
  min-width: 0;
  height: min(72vh, calc(100vh - 10rem), 52rem);
  height: min(72vh, calc(100dvh - 10rem), 52rem);
  min-height: min(8rem, calc(100vh - 10rem));
  min-height: min(8rem, calc(100dvh - 10rem));
  place-items: center;
  overflow: hidden;
  background: #070807;
}

.gallery-panel-image {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: min(72vh, calc(100vh - 10rem), 52rem);
  max-height: min(72vh, calc(100dvh - 10rem), 52rem);
  object-fit: contain;
}

.gallery-panel-video-frame {
  display: grid;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  place-items: center;
}

.gallery-panel-video-frame > canvas {
  object-fit: contain;
}

.gallery-panel-video-frame[data-ready] .video-placeholder > span {
  display: none;
}

.gallery-panel-play {
  border: 1px solid #777c73;
  border-radius: 0.2rem;
  padding: 0.65rem 1rem;
  background: rgb(17 19 17 / 88%);
  color: #f0efe9;
  font: inherit;
  cursor: pointer;
}

.gallery-panel-play:hover {
  border-color: #d2b17b;
  background: #2a2c26;
}

.gallery-panel-player {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: min(72vh, calc(100vh - 10rem), 52rem);
  max-height: min(72vh, calc(100dvh - 10rem), 52rem);
  background: #050605;
  object-fit: contain;
}

.gallery-panel-video-frame > .gallery-panel-player {
  position: relative;
  inset: auto;
  width: auto;
  height: auto;
  place-self: center;
  visibility: visible;
  object-fit: contain;
}

.gallery-panel-copy {
  min-width: 0;
  overflow-wrap: anywhere;
}

.gallery-panel-copy h2 {
  margin: 0 0 0.75rem;
  color: #ecece6;
  font-size: clamp(1.1rem, 2vw, 1.6rem);
}

.gallery-panel-copy p {
  margin: 0;
  color: #c1c3bc;
  white-space: pre-wrap;
}

@media (max-width: 600px) {
  .account-controls {
    flex-wrap: wrap;
    gap: 0.45rem 0.7rem;
    margin-bottom: 1.5rem;
    font-size: 0.84rem;
  }

  .site {
    width: min(100% - 2rem, 58rem);
    padding-top: 1.5rem;
  }

  .site-header {
    margin-bottom: 2rem;
  }

  .new-post-float {
    right: max(0.75rem, env(safe-area-inset-right));
    bottom: max(0.75rem, env(safe-area-inset-bottom));
  }

  .draft-block-heading,
  .draft-submit-area {
    align-items: stretch;
    flex-direction: column;
  }

  .draft-block-add-area .draft-secondary-button {
    width: 100%;
  }

  .draft-block {
    padding: 0.75rem;
  }

  .draft-media-item {
    grid-template-columns: 1fr;
  }

  .draft-media-preview img,
  .draft-media-preview video {
    max-height: 16rem;
  }

  .draft-submit-actions,
  .draft-action-group {
    width: 100%;
  }

  .draft-action-group .draft-submit-button {
    width: auto;
  }

  .gallery {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr));
    gap: 0.65rem;
  }

  .video-preview-frame {
    min-height: 9rem;
  }

  .gallery-panel {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    border-right: 0;
    border-left: 0;
  }

  .gallery-panel-items {
    padding: 0 0.85rem 1.5rem;
  }

  .gallery-panel-entry {
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
  }

  .gallery-panel-image,
  .gallery-panel-player {
    max-height: 56vh;
    max-height: 56dvh;
  }

  .gallery-panel-media {
    height: 56vh;
    height: 56dvh;
    min-height: 0;
  }

  .gallery-panel-video-frame {
    height: 100%;
  }

  .gallery-panel-copy h2 {
    margin-bottom: 0.45rem;
  }
}

@media (max-width: 800px) {
  .site-layout,
  .site-layout.sidebar-open {
    display: block;
    width: min(100% - 2rem, 58rem);
    margin-right: auto;
    margin-left: auto;
    padding-top: 1.5rem;
  }

  .site {
    width: 100%;
    margin: 0;
    padding-top: 0;
  }

}
