:root {
  color-scheme: dark;
  --mov-graphite: #292a29;
  --mov-sand: #a4978a;
  --mov-panel: #e1d7cc;
  --mov-paper: #fff9f1;
  --mov-muted: #ddd5cb;
  --mov-width: 660px;
  --mov-inset: clamp(19px, 5.7vw, 25px);
  --mov-header-height: 71px;
}

html, body { background: var(--mov-graphite); color: var(--mov-paper); }
#app:not(.show), #app[inert] { visibility: hidden; }
[hidden] { display: none !important; }
.mov-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.mov-title, .mov-tools h2, .mov-feature strong, .mov-post h2, .mov-profile-name, .mov-profile-about h2,
.mov-profile-details, .mov-install h1 { font-family: "Actay Wide", system-ui, sans-serif; font-weight: 700; }

#app .app-topbar { background: var(--mov-graphite); border: 0; }
#app[data-tab="profile"] .app-topbar, #app[data-tab="all"] .app-topbar { display: none; }
.mov-header {
  display: flex; align-items: center; gap: 8px;
  width: min(100%, var(--mov-width)); min-height: var(--mov-header-height);
  margin: auto; padding: 0 var(--mov-inset);
}
.mov-logo { color: var(--mov-paper); display: flex; align-items: center; gap: 9px; text-decoration: none; margin-right: auto; }
.mov-logo__mark { font: 700 20px/1 "Actay Wide", system-ui; letter-spacing: -.09em; }
.mov-logo__wordmark { font: 700 14px/1 "Actay Wide", system-ui; text-transform: uppercase; }
.mov-header-action, .mov-dialog header button, .mov-profile-back, #app #profileAvaEdit {
  display: grid; place-items: center; width: 42px; height: 42px; flex: 0 0 auto;
  border: 1px solid #ffffff20; border-radius: 50%; color: var(--mov-paper);
  background: linear-gradient(150deg, #646562a3, #353632b3 54%, #5a5c57a6);
  box-shadow: inset 0 1px 2px #ffffff39, 0 2px 7px #18191454;
  cursor: pointer;
}
.mov-header-action app-icon, .mov-dialog header app-icon, .mov-profile-back app-icon { width: 20px; height: 20px; }

#app #tabFeed, #app #tabAll, #app #tabProfile {
  height: auto; bottom: 0; overflow: auto; overscroll-behavior-y: contain; padding: 0;
}
#app #tabFeed { top: calc(var(--mov-header-height) + env(safe-area-inset-top, 0px)); }
#app #tabAll { top: env(safe-area-inset-top, 0px); }
#app #tabProfile { top: 0; background: #171b11; }
.mov-content { width: min(100%, var(--mov-width)); margin-inline: auto; }
.mov-home { position: relative; background: var(--mov-graphite); }
.mov-intro {
  position: sticky; top: 0; z-index: 0; padding: 0 var(--mov-inset) 17px;
  background: var(--mov-graphite);
}
.mov-intro:has(.mov-all-tools:not([hidden])) { position: static; }
.mov-search {
  display: flex; align-items: center; gap: 13px; height: 50px; width: 100%;
  padding-right: 12px; border-radius: 30px; margin: 2px 0 16px;
  color: #deded9; border: 1px solid #ffffff17; background: #2c2d2c;
  box-shadow: inset 0 0 7px #f0eee718, 0 0 5px #f5f2e921;
}
.mov-search:focus-within { border-color: #e1d7cc8a; box-shadow: inset 0 0 9px #ded6c731, 0 0 8px #ffffff29; }
.mov-search app-icon { width: 21px; height: 21px; margin-left: 15px; flex: 0 0 auto; }
.mov-search input {
  flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent;
  color: var(--mov-paper); font: 400 15px "Actay", system-ui;
}
.mov-search input::placeholder { color: #c5c4bd; opacity: 1; }
.mov-tools > header { display: flex; align-items: center; justify-content: space-between; gap: 9px; margin-bottom: 7px; }
.mov-tools h2 { font-size: 14px; line-height: 1.35; color: #fff; }
#movShowTools { border: 0; background: none; color: #c6c4bc; font: 700 11px "Actay Wide", system-ui; padding: 5px 0 5px 8px; cursor: pointer; }
#app .mov-tools .widgets-stack {
  display: flex; flex-direction: row; flex-wrap: nowrap; gap: 12px; overflow: auto; align-items: stretch; scrollbar-width: none;
  width: calc(100% + var(--mov-inset) * 2); max-width: none;
  margin: 0 calc(-1 * var(--mov-inset)); padding: 0 var(--mov-inset);
  scroll-snap-type: x proximity; scroll-padding: var(--mov-inset); touch-action: pan-x pan-y;
}
.mov-feature {
  position: relative; isolation: isolate; display: block; overflow: hidden;
  flex: 0 0 min(50vw, 198px); aspect-ratio: 198 / 266;
  border: 0; border-radius: 20px; padding: 0; text-align: left; color: #fff;
  background: #454542 center/cover no-repeat; text-decoration: none; cursor: pointer; scroll-snap-align: start;
}
.mov-feature::after {
  content: ""; position: absolute; z-index: -1; inset: 0;
  background: linear-gradient(180deg, transparent 39%, #17171406 54%, #171714cd 100%);
}
.mov-feature[data-art="center"] { background-image: url("./mov-center.webp"); background-position: 48% center; }
.mov-feature[data-art="neuro"] { background-image: url("./mov-feature-neuro.webp"); }
.mov-feature[data-art="photo"] { background-image: url("./mov-feature-photo.webp"); }
.mov-feature .mov-feature-arrow {
  position: absolute; right: 5px; top: 5px; background: var(--mov-graphite);
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: #cbcbc6;
}
.mov-feature .mov-feature-arrow app-icon { width: 19px; height: 19px; transform: rotate(38deg); }
.mov-feature-label { display: grid; gap: 3px; }
.mov-feature .mov-feature-label { position: absolute; left: 16px; right: 12px; bottom: 16px; }
.mov-feature small { font: 400 10px "Actay", system-ui; color: #f2e9df; }
.mov-feature strong { font-size: 15px; line-height: 1.12; text-wrap: pretty; }
.mov-feature:active { transform: scale(.99); }
.mov-all-tools { padding: 12px 0 0; }
#movToolGrid { display: grid; gap: 8px; margin-bottom: 7px; }
.mov-tool-row {
  display: flex; align-items: center; gap: 12px; text-align: left; width: 100%;
  border: 0; padding: 9px; border-radius: 19px; color: var(--mov-graphite); background: var(--mov-panel);
  font: inherit; cursor: pointer;
}
.mov-tool-row .mov-feature-label { flex: 1; }
.mov-tool-row small { font-size: 12px; color: #4c463f; }
.mov-tool-icon { flex: 0 0 40px; height: 40px; display: grid; place-items: center; background: #a4978a56; border-radius: 12px; }
.mov-tool-icon svg, .mov-tool-row app-icon { width: 18px; height: 18px; }

.mov-feed-sheet {
  position: relative; z-index: 1; min-height: 75dvh;
  background: var(--mov-sand); border-radius: 39px 39px 0 0;
  padding: 9px 9px calc(100px + env(safe-area-inset-bottom, 0px));
  color: var(--mov-graphite);
}
.mov-news-banner {
  min-height: 124px; aspect-ratio: 2.85; display: grid; grid-template-columns: 54% 46%;
  width: 100%; border: 0; padding: 0; overflow: hidden; border-radius: 30px;
  color: var(--mov-graphite); background: var(--mov-paper); text-align: right; cursor: pointer;
}
.mov-news-banner img { width: 100%; height: 100%; object-fit: cover; object-position: 40% center; }
.mov-news-banner > span { align-self: center; padding: 9px 13px 9px 5px; }
.mov-news-banner strong { display: block; font: 700 clamp(13px, 3.9vw, 20px)/1.1 "Actay Wide", system-ui; text-wrap: balance; }
.mov-news-banner small { display: block; margin-top: 7px; font: 400 11px/1.2 "Actay", system-ui; }
.mov-status { margin: 11px 14px 0; line-height: 1.45; }
.mov-status:empty { display: none; }
.mov-posts { display: grid; gap: 15px; margin-top: 16px; }
.mov-post {
  content-visibility: auto; contain-intrinsic-size: auto 352px; color: var(--mov-graphite);
}
.mov-post-surface {
  display: block; width: 100%; padding: 0; overflow: hidden; border: 0; border-radius: 31px;
  background: var(--mov-panel); color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.mov-post-surface > img, .mov-post-cover img { display: block; width: 100%; height: auto; }
.mov-post-surface > img { max-height: 480px; object-fit: contain; background: #383934; }
.mov-post-copy { padding: 21px 23px 0; }
.mov-post h2 { font-size: clamp(20px, 6vw, 27px); line-height: 1.12; text-wrap: pretty; overflow-wrap: anywhere; }
.mov-post-excerpt {
  margin-top: 10px; font: 400 14px/1.5 "Actay", system-ui; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden;
}
.mov-post-cover { position: relative; min-height: 220px; overflow: hidden; background: #42443d; }
.mov-post-cover img { max-height: min(580px, 74vh); object-fit: cover; }
.mov-post-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 35%, #000d); }
.mov-post-cover .mov-post-copy { position: absolute; inset: auto 0 0; z-index: 1; padding: 22px 23px; color: #fff; }
.mov-post-cover .mov-post-excerpt { -webkit-line-clamp: 2; }
.mov-post-cover--empty { min-height: 160px; }
.mov-post-footer { display: flex; align-items: center; gap: 8px; padding: 13px 19px 15px 23px; }
.mov-post-details { display: grid; gap: 3px; flex: 1; font: 400 12px "Actay", system-ui; }
.mov-post-details small { font-size: 11px; color: #4c453e; }
.mov-post-footer app-icon { width: 23px; height: 23px; transform: rotate(40deg); }
.mov-post-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; padding: 2px 9px 1px; }
.mov-post-actions button {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-width: 42px; min-height: 38px;
  padding: 0 8px; border: 0; border-radius: 21px; background: transparent;
  color: var(--mov-graphite); font: 400 13px "Actay", system-ui; cursor: pointer;
}
.mov-post-actions button:nth-child(4) { margin-left: auto; }
.mov-post-actions button[aria-pressed=true] { background: #292a2922; }
.mov-post-actions app-icon { width: 21px; height: 21px; }
.mov-action-feedback { width: 100%; font-size: 13px; }
.mov-action-feedback:empty { display: none; }
.mov-feed-events { margin: 10px 13px 0; padding: 10px 0; color: inherit; border: 0; background: none; font: 700 13px "Actay Wide", system-ui; cursor: pointer; }

.mov-studio { padding: 21px var(--mov-inset) calc(110px + env(safe-area-inset-bottom, 0px)); }
.mov-title { margin: 0 0 20px; font-size: 23px; line-height: 1.2; }
.mov-studio-showcase { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.mov-studio-showcase .mov-feature { width: 100%; }
.mov-studio-actions { display: grid; gap: 10px; margin-top: 20px; }
.mov-studio-actions button { min-height: 43px; text-align: center; }
.mov-primary, .mov-secondary, .mov-request {
  display: inline-flex; justify-content: center; align-items: center; min-height: 38px; padding: 9px 15px;
  border: 0; border-radius: 22px; color: var(--mov-paper); background: #555651;
  font: 400 15px "Actay", system-ui; text-decoration: none; cursor: pointer;
}
.mov-primary { background: #d4c8b9; color: var(--mov-graphite); font-weight: 700; }
.mov-request { margin: 4px 0; }

#app #bottomNav {
  width: min(196px, calc(100% - 45px)); height: 59px; padding: 5px; gap: 0;
  color: #171918; border: 1px solid #deded8; border-radius: 90px;
  background: repeating-linear-gradient(100deg, #ffffff10 0 1px, #00000004 1px 3px),
    linear-gradient(174deg, #dddeda 0%, #b4b5b0 32%, #92948e 52%, #bdbfba 79%, #ecece7 100%);
  -webkit-backdrop-filter: none; backdrop-filter: none;
  box-shadow: inset 0 1px 2px #fff9, inset 0 -1px 3px #46494495, 0 5px 14px #15161360;
}
#app #bottomNav .bn-btn { margin: 0; flex: 1; height: 100%; border-radius: 60px; color: #191b1a; }
#app #bottomNav .bn-btn app-icon { height: 23px; width: 23px; }
#app #bnPill { height: calc(100% - 10px); top: 5px; border-radius: 60px;
  background: linear-gradient(165deg, #ffffffa6, #dddfd8b5 53%, #b9bbb3b8);
  box-shadow: inset 0 1px 2px #fffb, 0 1px 3px #32352e42;
}
#app .mov-feed-up { position: fixed; z-index: 30; bottom: calc(14px + env(safe-area-inset-bottom,0px));
  left: calc(50% + 108px); width: 51px; height: 51px; }

#app #tabProfile .profile { width: min(100%, var(--mov-width)); max-width: none; padding: 0; margin: 0 auto; }
.mov-profile-hero {
  position: sticky; top: 0; z-index: 0; height: min(128vw, 71dvh); min-height: 310px;
  display: flex; align-items: flex-end; justify-content: center; overflow: hidden;
  background: #171b11; padding: 18px 17px 33px;
}
.mov-profile-photo { position: absolute; width: 100%; height: 100%; inset: 0; object-fit: cover; object-position: center top; }
.mov-profile-hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, #171b115f, transparent 27%, transparent 61%, #171b11e8);
}
#app .mov-profile-hero .profile__ava-wrap { position: absolute; top: calc(11px + env(safe-area-inset-top, 0px)); right: var(--mov-inset); z-index: 2; margin: 0; width: 42px; height: 42px; }
#app .mov-profile-hero #profileAva { display: none; }
#app .mov-profile-hero #profileAvaEdit { position: static; }
.mov-profile-back { position: absolute; top: calc(11px + env(safe-area-inset-top,0px)); left: var(--mov-inset); z-index: 2; }
#app #tabProfile #profileName, #app #tabProfile #profileUsername, #app #tabProfile #roleLabel { display: none; }
.mov-profile-name { position: relative; z-index: 1; text-transform: uppercase; color: #fff; width: 100%; }
.mov-profile-name strong, .mov-profile-name span { display: block; overflow-wrap: anywhere; }
.mov-profile-name strong { font-size: clamp(30px, 10.5vw, 58px); line-height: 1; }
.mov-profile-name span { font-size: clamp(21px, 6.7vw, 37px); line-height: 1.03; }
#app #tabProfile .profile__extra {
  position: relative; z-index: 1; margin: -21px 0 0; width: 100%; max-width: none; min-height: 80dvh;
  padding: 29px var(--mov-inset) calc(105px + env(safe-area-inset-bottom, 0px));
  border-radius: 39px 39px 0 0; background: var(--mov-sand); color: var(--mov-graphite); text-align: left;
}
.mov-profile-about { margin-bottom: 23px; }
.mov-profile-about h2, .mov-profile-details, .mov-reposts h2 { font-size: 19px; }
.mov-profile-about p { margin: 8px 0 0; max-width: none; font: 400 14px/1.45 "Actay", system-ui; color: #322e29; }
.mov-profile-details { margin-bottom: 9px; }
#app #tabProfile .profile__extra .set-group { background: var(--mov-panel); color: var(--mov-graphite); }
#app #tabProfile .set-row__label, #app #tabProfile .set-group__ttl, #app #tabProfile .acct__email, #app #tabProfile .set-row__ico { color: var(--mov-graphite); }
#app #tabProfile .acct__pill.ok { color: #21583e; }
#app #tabProfile .acct__row { background: #292a2912; }
#app #tabProfile .acct__copy, #app #tabProfile .acct__ccode { color: #4c463f; }
#app #tabProfile .acct__logout { color: #6a273e; }
.mov-reposts { margin-top: 22px; text-align: left; }
.mov-reposts button { display: block; text-align: left; margin-top: 7px; white-space: normal; }

.mov-dialog {
  position: fixed; inset: auto 0 0; width: min(100%, var(--mov-width)); max-width: none; max-height: 89dvh;
  margin: 0 auto; padding: 18px 20px calc(21px + env(safe-area-inset-bottom, 0px));
  border: 1px solid #ffffff20; border-radius: 31px 31px 0 0; background: var(--mov-graphite);
  color: var(--mov-paper); overflow: auto;
}
.mov-dialog::backdrop { background: #10110fad; }
.mov-dialog header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mov-dialog h2 { font: 700 22px/1.17 "Actay Wide", system-ui; overflow-wrap: anywhere; }
.mov-dialog p { margin: 9px 0; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.mov-dialog img { display: block; width: 100%; height: auto; border-radius: 20px; margin-top: 12px; }
.mov-dialog label { display: grid; margin: 14px 0; gap: 5px; }
.mov-dialog textarea { min-height: 135px; resize: vertical; }
.mov-dialog input, .mov-dialog textarea {
  border: 1px solid #ffffff21; border-radius: 14px; padding: 12px;
  background: #ffffff0d; color: inherit; width: 100%; font: inherit;
}
.mov-dialog article { border-top: 1px solid #ffffff25; padding-top: 9px; margin-top: 12px; }
.mov-post-meta { color: var(--mov-muted); }
#app :focus-visible, .mov-dialog :focus-visible, .mov-install :focus-visible { outline: 2px solid #897755; outline-offset: 3px; }
#authScreen { background: var(--mov-graphite) !important; }
#authScreen .pass { background: #373833; backdrop-filter: none; }
#authScreen .pass__head::before { content: "MOV"; display: block; color: var(--mov-paper); font: 700 35px "Actay Wide", system-ui; letter-spacing: -.07em; margin-bottom: 14px; }
#authScreen .pbtn { color: var(--mov-graphite); background: #d4c8b9; }
#authScreen .pass__sub, #authScreen .plink, #authScreen .pcon, #authScreen .pf__l { color: var(--mov-muted); }

.mov-install {
  min-height: 100dvh; display: grid; place-items: center; padding: 26px var(--mov-inset);
  background: linear-gradient(170deg, #11120fd1, #292a29f2 68%), url("./mov-center.webp") center/cover no-repeat;
}
.mov-install__inner {
  width: min(100%, 430px); padding: 27px 24px; border-radius: 32px;
  background: var(--mov-sand); color: var(--mov-graphite);
}
.mov-install__icon { width: 72px; height: 72px; border-radius: 20px; margin-bottom: 13px; box-shadow: 0 4px 18px #24242042; }
.mov-install h1 { font-size: clamp(26px, 7.3vw, 36px); line-height: 1; }
.mov-install p, .mov-install li { margin-top: 10px; font-size: 15px; line-height: 1.42; }
.mov-install__steps { padding-left: 20px; }
.mov-install .mov-primary { margin-top: 14px; }
.mov-install #movInstallStatus:empty { display: none; }
#movPlannerLink.configured { display: none; }

@media (prefers-reduced-motion: reduce) {
  #app #bnPill, #app #bottomNav .bn-btn, .mov-dialog { transition: none !important; animation: none !important; }
}

.mov-profile-about header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mov-profile-about header button { min-height: 38px; padding-left: 8px; border: 0; background: none; color: #302b26; font: 400 13px "Actay", system-ui; cursor: pointer; }
.mov-profile-fields { display: grid; gap: 10px; margin: 0 0 14px; font: 400 14px "Actay", system-ui; }
.mov-profile-fields dt { color: #3d352f; font-size: 12px; }
.mov-profile-fields dd { margin: 3px 0 0; }
