.df-frame {
  --df-surface: #20392f;
  --df-ink: #fff9eb;
  --df-pad: clamp(18px, 4.5vw, 88px);
  --df-gutter-left: max(var(--df-pad), env(safe-area-inset-left));
  --df-gutter-right: max(var(--df-pad), env(safe-area-inset-right));
  isolation: isolate;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(clamp(180px, 35svh, 480px), 1fr) auto auto;
  min-height: 100vh;
  min-height: 100svh;
  color: var(--df-ink);
  background: var(--df-surface);
  font-family: var(--sans, system-ui, sans-serif);
}
.df-frame * { box-sizing: border-box; }
.df-frame[hidden], .df-frame [hidden] { display: none !important; }
.df-scenery {
  position: relative;
  grid-area: 1 / 1 / 4 / 2;
  overflow: hidden;
  z-index: -1;
  background: #2b4136;
  pointer-events: none;
}
.df-layer, .df-portrait { position: absolute; inset: 0; width: 100%; height: 100%; }
.df-portrait { display: block; object-fit: contain; }
.df-photo-playback {
  grid-area: 2 / 1;
  width: 100%;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.df-photo-playback:focus-visible { outline: 3px solid #ffdf94; outline-offset: -5px; }
.df-calm .df-reveal { animation: none; }
.df-calm .df-bar { display: none; }
.df-reveal { animation: df-reveal .65s ease-out backwards; }
@keyframes df-reveal { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion:reduce) { .df-reveal { animation: none; } }
.df-header {
  grid-area: 1 / 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: max(20px,env(safe-area-inset-top)) var(--df-gutter-right) 0 var(--df-gutter-left);
}
.df-orientation, .df-sample { background: #20392ff5; border-radius: 12px; }
.df-orientation { display: grid; justify-items: end; gap: 1px; margin-left: auto; padding: 8px 14px 10px; }
.df-clock { font-size: clamp(25px,2.8vw,44px); font-weight: 600; line-height: 1.15; font-variant-numeric: tabular-nums; }
.df-date { font-size: clamp(15px,1.25vw,22px); }
.df-sample { padding: 6px 10px; font-size: 14px; }
.df-caption {
  grid-area: 3 / 1;
  align-self: end;
  min-width: 0;
  padding: clamp(40px, 7svh, 96px) var(--df-gutter-right) clamp(18px,2.5vw,36px) var(--df-gutter-left);
  background: linear-gradient(to bottom, transparent, var(--df-surface) clamp(36px,6svh,88px));
}
.df-identity, .df-story { min-width: 0; max-width: 58rem; }
.df-name {
  margin: 0;
  color: var(--df-ink);
  font: 600 clamp(40px,4.5vw,74px)/1.08 var(--sans,system-ui,sans-serif);
  letter-spacing: -.035em;
  overflow-wrap: anywhere;
}
.df-relation { margin: 4px 0 0; font-size: clamp(22px,2vw,32px); line-height: 1.3; }
.df-story { margin-top: clamp(12px,1.2vw,22px); }
.df-story-label { margin: 0 0 3px; font: 650 clamp(18px,1.55vw,25px)/1.35 var(--sans,system-ui,sans-serif); color: #ffdfa9; }
.df-story-text { margin: 0; font-size: clamp(21px,1.85vw,30px); line-height: 1.4; overflow-wrap: anywhere; }
.df-expanded { max-height: 32svh; overflow: auto; overscroll-behavior: contain; }
.df-extras { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 8px; }
.df-inline { display: inline-flex; align-items: center; gap: 8px; color: var(--df-ink); background: none; text-decoration: underline; text-underline-offset: 4px; border: 0; min-height: 48px; padding: 4px 0; font: 600 18px var(--sans,system-ui,sans-serif); }
.df-media-error { margin: 0; font-size: 18px; }
.df-bar {
  grid-area: 4 / 1;
  display: grid;
  grid-template-columns: auto auto 1fr;
  grid-template-rows: auto auto;
  align-items: stretch;
  column-gap: 12px;
  background: var(--df-surface);
  padding: 0 var(--df-gutter-right) max(clamp(18px,2vw,32px), env(safe-area-inset-bottom)) var(--df-gutter-left);
}
.df-control, .df-about summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 50px;
  padding: 10px clamp(12px,1.4vw,24px);
  border: 1px solid #aab9a9;
  border-radius: 12px;
  color: var(--df-ink);
  background: #294238;
  font: 600 clamp(16px,1.25vw,23px)/1.25 var(--sans,system-ui,sans-serif);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.df-icon { display: inline-flex; align-items: center; flex: none; }
.df-paint { grid-area: 2 / 1; background: #f4ddb4; color: #253a2e; border-color: #f4ddb4; }
.df-options-button { grid-area: 2 / 2; }
.df-call { grid-area: 2 / 3; justify-self: end; }
.df-options {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 9px;
  grid-area: 1 / 1 / 2 / -1;
  padding: 12px 0;
  margin: 0 0 12px;
  border-block: 1px solid #7b9082;
}
.df-options-button[aria-expanded=true] { background: #e2eadc; color: #233c2f; }
.df-about { max-width: 100%; }
.df-about summary { display: list-item; list-style-position: inside; }
.df-about p { margin: 8px 0 2px; max-width: 58ch; overflow-wrap: anywhere; font-size: clamp(20px,1.7vw,30px); line-height: 1.4; }
.df-control:focus-visible, .df-inline:focus-visible, .df-about summary:focus-visible { outline: 3px solid #ffdf94; outline-offset: 3px; }
@media (hover:hover) {
  .df-control:hover, .df-about summary:hover { background: #41584a; color: #fff; }
  .df-paint:hover { background: #fff0d5; color: #243c2c; }
}
.df-video { grid-area: 2 / 1; align-self: center; justify-self: center; width: min(80%,760px); max-height: 46svh; z-index: 1; background: #15251d; }
.df-large-video { grid-area: 1 / 1 / 3 / 2; position: absolute; inset: 0; width: 100%; height: 100%; max-height: 100svh; object-fit: contain; }
.df-youtube { height: clamp(200px, 42svh, 428px); max-height: none; border: 0; }
.df-embed-loading { opacity: 0; pointer-events: none; }
.df-playing .df-caption { padding-top: clamp(12px, 2svh, 24px); }
.df-playing .df-scenery { visibility: hidden; }
.df-audio { width: min(100%,330px); }
.df-feed {
  height: 100vh;
  height: 100svh;
  grid-template-rows: auto minmax(0,1fr);
}
.df-feed > .df-control { justify-self: start; margin: max(10px,env(safe-area-inset-top)) var(--df-gutter-right) 10px var(--df-gutter-left); }
.df-feed-list { overflow-y: auto; overscroll-behavior-y: contain; scroll-snap-type: y proximity; }
.df-feed-list:focus-visible { outline: 3px solid #ffdf94; outline-offset: -5px; }
.df-feed-card {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 18px var(--df-gutter-right) max(18px,env(safe-area-inset-bottom)) var(--df-gutter-left);
  background: #2b4136;
  border-top: 1px solid #7b9082;
  scroll-snap-align: start;
}
.df-feed-photo, .df-feed-media { display: block; max-width: 100%; max-height: 63svh; object-fit: contain; }
.df-feed-media { width: min(100%,760px); }
.df-feed-details { width: min(100%,58rem); overflow-wrap: anywhere; }
.df-feed-details h2 { margin: 0; font-size: clamp(26px,3.3vw,54px); line-height: 1.15; }
.df-feed-details p, .df-feed-empty { margin: 8px 0 0; font-size: clamp(20px,2vw,31px); line-height: 1.4; }
.df-feed-empty { margin-inline: var(--df-gutter-left) var(--df-gutter-right); }
.df-feed-details .df-control { margin-top: 12px; }
.df-feed-details .df-media-error:empty { display: none; }
@media (min-width: 801px) {
  .df-caption:has(.df-story:not([hidden])) { display: grid; grid-template-columns: minmax(0,.8fr) minmax(0,1.2fr); align-items: end; gap: clamp(35px,4.5vw,80px); }
  .df-caption .df-story { margin-top: 0; }
}
@media (orientation: portrait) {
  .df-portrait.df-known-portrait {
    width: 145%;
    max-width: none;
    left: 50%;
    transform: translateX(-50%);
    object-position: 50% 52%;
  }
}
@media (max-width: 560px) {
  .df-frame { --df-pad: 16px; }
  .df-frame:not(.df-feed) { grid-template-rows: auto minmax(180px,1fr) auto auto; }
  .df-header { padding-top: max(14px, env(safe-area-inset-top)); }
  .df-orientation { padding: 6px 10px 8px; }
  .df-date { font-size: 14px; }
  .df-caption { padding-top: 40px; }
  .df-options { gap: 7px; }
  .df-bar { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 0 7px; }
  .df-bar > .df-control { flex-direction: column; justify-self: stretch; min-height: 65px; gap: 5px; padding: 6px 3px; font-size: 15.5px; }
}
@media (max-height: 540px) and (min-width: 561px) {
  .df-frame:not(.df-feed) { grid-template-rows: auto minmax(65px,1fr) auto auto; }
  .df-header { padding-top: max(8px,env(safe-area-inset-top)); }
  .df-caption { padding-block: 26px 10px; }
  .df-name { font-size: 34px; }
  .df-relation, .df-story-text { font-size: 20px; }
  .df-bar { padding-bottom: max(9px,env(safe-area-inset-bottom)); }
}
