/* Mobile search, social lists and video action sheets. Desktop views stay independent. */
html[data-ui="mobile"] #drawer:has(.xme-view),
html[data-ui="mobile"] #drawer:has(.xme-share),
html[data-ui="mobile"] #drawer[data-view="comments"] {
  --xme-text: #16171b;
  --xme-muted: #93949b;
  --xme-line: #f0f0f2;
  --xme-accent: #fe2c55;
  color-scheme: light;
  background: #fff;
  color: var(--xme-text);
}

html[data-ui="mobile"] #drawer:has(.xme-view) > .drawer-body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: #fff;
}

html[data-ui="mobile"] #drawer:has(.xme-view) > .drawer-header {
  border-bottom-color: var(--xme-line);
  background: #fff;
  color: var(--xme-text);
}

html[data-ui="mobile"] #drawer:has(.xme-view) > .drawer-header h2,
html[data-ui="mobile"] #drawer:has(.xme-view) #drawer-close {
  color: var(--xme-text);
}

html[data-ui="mobile"] #drawer[data-view="search"]:has(.xme-search) > .drawer-header {
  display: none;
}

html[data-ui="mobile"] #drawer .xme-view {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #fff;
  color: var(--xme-text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

html[data-ui="mobile"] #drawer .xme-icon {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
}

html[data-ui="mobile"] #drawer .xme-icon svg { display: block; }

html[data-ui="mobile"] #drawer .xme-view button,
html[data-ui="mobile"] #drawer .xme-share button {
  -webkit-touch-callout: none;
  touch-action: manipulation;
}

html[data-ui="mobile"] #drawer .xme-view button:active,
html[data-ui="mobile"] #drawer .xme-share button:active {
  opacity: .65;
}

html[data-ui="mobile"] #drawer .xme-view [hidden],
html[data-ui="mobile"] #drawer .xme-share [hidden],
html[data-ui="mobile"] #drawer:has(.xme-view)[hidden],
html[data-ui="mobile"] #drawer:has(.xme-share)[hidden],
html[data-ui="mobile"] #drawer[data-view="comments"][hidden] {
  display: none !important;
}

html[data-ui="mobile"] #drawer .xme-scroll {
  flex: 1 1 auto;
  min-height: 0;
  padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

html[data-ui="mobile"] #drawer .xme-scroll::-webkit-scrollbar,
html[data-ui="mobile"] #drawer .xme-tabs::-webkit-scrollbar,
html[data-ui="mobile"] #drawer .xme-share-row::-webkit-scrollbar,
html[data-ui="mobile"] #drawer .xme-recipient-row::-webkit-scrollbar {
  display: none;
}

/* Search is a full page with its own navigation and a persistent query field. */
html[data-ui="mobile"] #drawer .xme-search-header {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  min-height: calc(58px + env(safe-area-inset-top, 0px));
  padding: calc(7px + env(safe-area-inset-top, 0px)) max(14px, env(safe-area-inset-right, 0px)) 7px max(5px, env(safe-area-inset-left, 0px));
  background: #fff;
}

html[data-ui="mobile"] #drawer .xme-back {
  display: grid;
  flex: 0 0 36px;
  place-items: center;
  width: 36px;
  height: 44px;
  padding: 6px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #16171b;
}

html[data-ui="mobile"] #drawer .xme-back svg {
  width: 26px;
  height: 26px;
  stroke-width: 2;
  transform: rotate(180deg);
}

html[data-ui="mobile"] #drawer .xme-search-form {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  gap: 7px;
  min-width: 0;
  height: 44px;
  margin: 0;
  padding: 0 0 0 10px;
  border-radius: 8px;
  background: #f5f5f6;
}

html[data-ui="mobile"] #drawer .xme-search-form:focus-within {
  box-shadow: inset 0 0 0 2px #fe2c5540;
}

html[data-ui="mobile"] #drawer .xme-search-form > .xme-icon,
html[data-ui="mobile"] #drawer .xme-search-form > .xme-icon svg {
  width: 17px;
  height: 17px;
  color: #929399;
}

html[data-ui="mobile"] #drawer .xme-search-form input[type="search"] {
  flex: 1 1 auto;
  width: 0;
  min-width: 0;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  outline: none;
  background: transparent;
  color: #16171b;
  font-size: 16px;
  line-height: 44px;
  appearance: none;
  -webkit-appearance: none;
}

html[data-ui="mobile"] #drawer .xme-search-form input::placeholder { color: #9b9ca2; }
html[data-ui="mobile"] #drawer .xme-search-form input::-webkit-search-cancel-button { display: none; }

html[data-ui="mobile"] #drawer .xme-query-clear {
  display: grid;
  flex: 0 0 40px;
  place-items: center;
  width: 40px;
  height: 44px;
  padding: 6px;
  color: #b2b3b9;
}

html[data-ui="mobile"] #drawer .xme-query-clear svg { width: 16px; height: 16px; }

html[data-ui="mobile"] #drawer .xme-search-submit {
  flex: 0 0 auto;
  align-self: stretch;
  min-width: 51px;
  padding: 0 10px;
  color: var(--xme-accent);
  font-size: 15px;
  font-weight: 600;
}

html[data-ui="mobile"] #drawer .xme-history {
  padding: 16px max(18px, env(safe-area-inset-right, 0px)) 10px max(18px, env(safe-area-inset-left, 0px));
}

html[data-ui="mobile"] #drawer .xme-history h3 {
  display: inline-block;
  margin: 0 0 16px;
  color: #202126;
  font-size: 17px;
  font-weight: 650;
  line-height: 26px;
}

html[data-ui="mobile"] #drawer .xme-history-clear {
  float: right;
  display: grid;
  place-items: center;
  min-width: 36px;
  min-height: 32px;
  margin-top: -3px;
  padding: 6px 0 6px 12px;
  color: #a4a5ac;
  font-size: 12px;
}

html[data-ui="mobile"] #drawer .xme-history-clear svg { width: 17px; height: 17px; }
html[data-ui="mobile"] #drawer .xme-history-chips { display: flex; flex-wrap: wrap; gap: 10px 9px; }

html[data-ui="mobile"] #drawer .xme-history-chips button {
  min-width: 48px;
  max-width: 100%;
  min-height: 32px;
  padding: 5px 12px;
  overflow: hidden;
  border-radius: 4px;
  background: #f5f5f6;
  color: #55565c;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html[data-ui="mobile"] #drawer .xme-tabs {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  flex: 0 0 auto;
  align-items: stretch;
  justify-content: space-around;
  gap: 22px;
  min-height: 48px;
  margin: 0;
  padding: 0 max(18px, env(safe-area-inset-right, 0px)) 0 max(18px, env(safe-area-inset-left, 0px));
  overflow-x: auto;
  border-bottom: 1px solid var(--xme-line);
  background: #fff;
  scrollbar-width: none;
}

html[data-ui="mobile"] #drawer .xme-tabs button {
  position: relative;
  flex: 0 0 auto;
  min-width: 34px;
  min-height: 48px;
  padding: 0 0 2px;
  border: 0;
  background: transparent;
  color: #85868d;
  font-size: 15px;
  font-weight: 400;
  white-space: nowrap;
}

html[data-ui="mobile"] #drawer .xme-tabs button[aria-selected="true"] {
  color: #16171b;
  font-weight: 650;
}

html[data-ui="mobile"] #drawer .xme-tabs button[aria-selected="true"]::after {
  position: absolute;
  right: 50%;
  bottom: 0;
  width: 22px;
  height: 3px;
  border-radius: 2px;
  background: var(--xme-accent);
  content: "";
  transform: translateX(50%);
}

html[data-ui="mobile"] #drawer .xme-results { min-height: 0; }
html[data-ui="mobile"] #drawer .xme-results-heading { margin: 18px 18px 4px; color: #24252b; font-size: 16px; font-weight: 600; }
html[data-ui="mobile"] #drawer .xme-results-summary { margin: 12px max(18px, env(safe-area-inset-right, 0px)) 4px max(18px, env(safe-area-inset-left, 0px)); color: #757680; font-size: 12px; line-height: 20px; overflow-wrap: anywhere; }
html[data-ui="mobile"] #drawer .xme-tab-count { margin-left: 4px; color: inherit; font-size: 11px; font-weight: 400; }
html[data-ui="mobile"] #drawer .xme-search-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 8px; padding: 10px max(10px, env(safe-area-inset-right, 0px)) 18px max(10px, env(safe-area-inset-left, 0px)); }

html[data-ui="mobile"] #drawer .xme-search-tile {
  display: flex;
  flex-direction: column;
  min-width: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: #fff;
  color: #202126;
  text-align: left;
}

html[data-ui="mobile"] #drawer .xme-cover {
  position: relative;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 5px;
  background: #efeff2;
  color: #c3c4cc;
}

html[data-ui="mobile"] #drawer .xme-cover img,
html[data-ui="mobile"] #drawer .xme-cover video { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
html[data-ui="mobile"] #drawer .xme-cover-placeholder { display: grid; place-items: center; width: 100%; height: 100%; }
html[data-ui="mobile"] #drawer .xme-cover-placeholder svg { width: 35px; height: 35px; stroke-width: 1.3; }
html[data-ui="mobile"] #drawer .xme-video-info { position: relative; display: flex; flex-direction: column; gap: 5px; width: 100%; min-width: 0; padding: 8px 1px 0; }
html[data-ui="mobile"] #drawer .xme-video-title { display: -webkit-box; overflow: hidden; color: #24252a; font-size: 13px; font-weight: 500; line-height: 20px; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
html[data-ui="mobile"] #drawer .xme-video-author { display: flex; align-items: center; gap: 5px; min-width: 0; color: #999aa1; font-size: 11px; line-height: 20px; }
html[data-ui="mobile"] #drawer .xme-video-author > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html[data-ui="mobile"] #drawer .xme-avatar { display: grid; flex: 0 0 auto; place-items: center; width: 52px; height: 52px; overflow: hidden; border-radius: 50%; background: hsl(var(--xme-avatar-hue, 225) 24% 93%); color: hsl(var(--xme-avatar-hue, 225) 17% 55%); font-size: 20px; font-weight: 500; }
html[data-ui="mobile"] #drawer .xme-avatar img { width: 100%; height: 100%; object-fit: cover; }
html[data-ui="mobile"] #drawer .xme-video-author .xme-avatar { width: 19px; height: 19px; font-size: 9px; }
html[data-ui="mobile"] #drawer .xme-video-info:has(.xme-video-metric) .xme-video-author { padding-right: 49px; }
html[data-ui="mobile"] #drawer .xme-video-metric { position: absolute; right: 1px; bottom: 2px; display: flex; align-items: center; gap: 4px; max-width: 48px; color: #a3a4ac; font-size: 10px; line-height: 16px; white-space: nowrap; }
html[data-ui="mobile"] #drawer .xme-video-metric svg { width: 12px; height: 12px; }

/* Follow directories use the same live profile rows as user search. */
html[data-ui="mobile"] #drawer .xme-person-list { padding: 5px max(18px, env(safe-area-inset-right, 0px)) 16px max(18px, env(safe-area-inset-left, 0px)); }
html[data-ui="mobile"] #drawer .xme-results > .xme-person { margin-right: max(18px, env(safe-area-inset-right, 0px)); margin-left: max(18px, env(safe-area-inset-left, 0px)); }
html[data-ui="mobile"] #drawer .xme-person { display: flex; align-items: center; gap: 12px; min-width: 0; min-height: 85px; padding: 11px 0; }
html[data-ui="mobile"] #drawer .xme-person-main { display: flex; flex: 1 1 auto; align-items: center; gap: 12px; min-width: 0; min-height: 54px; padding: 0; color: #202126; text-align: left; }
html[data-ui="mobile"] #drawer .xme-person-copy { display: flex; flex: 1 1 auto; flex-direction: column; gap: 4px; min-width: 0; }
html[data-ui="mobile"] #drawer .xme-person-copy strong { display: block; overflow: hidden; color: #23242a; font-size: 15px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
html[data-ui="mobile"] #drawer .xme-person-copy p { margin: 0; overflow: hidden; color: #9b9ca3; font-size: 12px; line-height: 18px; text-overflow: ellipsis; white-space: nowrap; }
html[data-ui="mobile"] #drawer .xme-follow { flex: 0 0 auto; min-width: 64px; min-height: 30px; padding: 4px 12px; border-radius: 3px; background: var(--xme-accent); color: #fff; font-size: 12px; font-weight: 500; }
html[data-ui="mobile"] #drawer .xme-follow:hover { color: #fff; }
html[data-ui="mobile"] #drawer .xme-follow[aria-pressed="true"] { background: #f1f1f3; color: #999aa2; }
html[data-ui="mobile"] #drawer .xme-follow:is([disabled], [aria-disabled="true"]) { opacity: .55; }
html[data-ui="mobile"] #drawer .xme-share button:is(:disabled, [aria-disabled="true"]) { cursor: default; opacity: .5; }
html[data-ui="mobile"] #drawer :is(.xme-view, .xme-share) button[aria-busy="true"] { cursor: progress; opacity: .55; }
html[data-ui="mobile"] #drawer .xme-action-status { flex: 0 0 auto; margin: 0; padding: 10px max(18px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(18px, env(safe-area-inset-left, 0px)); background: #fff5f7; color: #a82b47; font-size: 13px; line-height: 20px; text-align: center; }

/* Real account and player settings retain their available actions. */
html[data-ui="mobile"] #drawer .xme-menu { display: block; overflow-y: auto; padding: 8px max(16px, env(safe-area-inset-right, 0px)) calc(24px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); background: #f7f7f8; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
html[data-ui="mobile"] #drawer .xme-menu-section { margin: 0 0 12px; padding: 0 14px; border-radius: 10px; background: #fff; }
html[data-ui="mobile"] #drawer .xme-menu-heading { margin: 0; padding: 15px 0 5px; color: #a0a1a8; font-size: 12px; font-weight: 400; line-height: 20px; }
html[data-ui="mobile"] #drawer .xme-menu-items { display: flex; flex-direction: column; }
html[data-ui="mobile"] #drawer .xme-menu-item { display: flex; align-items: center; gap: 12px; width: 100%; min-width: 0; min-height: 58px; padding: 13px 0; border-bottom: 1px solid #f5f5f7; border-radius: 0; background: #fff; color: #202126; text-align: left; }
html[data-ui="mobile"] #drawer .xme-menu-item:last-child { border-bottom: 0; }
html[data-ui="mobile"] #drawer .xme-menu-icon { display: grid; flex: 0 0 25px; place-items: center; width: 25px; height: 27px; color: #383940; }
html[data-ui="mobile"] #drawer .xme-menu-icon svg { width: 23px; height: 23px; stroke-width: 1.7; }
html[data-ui="mobile"] #drawer .xme-menu-copy { display: block; flex: 1 1 auto; min-width: 0; }
html[data-ui="mobile"] #drawer .xme-menu-copy strong { color: #2b2c32; font-size: 15px; font-weight: 400; line-height: 24px; }
html[data-ui="mobile"] #drawer .xme-menu-copy p { margin: 3px 0 0; color: #a5a6ac; font-size: 11px; line-height: 18px; }
html[data-ui="mobile"] #drawer .xme-menu-value { max-width: 42%; margin-left: auto; overflow: hidden; color: #a0a1a9; font-size: 12px; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
html[data-ui="mobile"] #drawer .xme-menu-arrow { flex: 0 0 auto; color: #c7c8cf; }
html[data-ui="mobile"] #drawer .xme-menu-arrow svg { width: 15px; height: 15px; }
html[data-ui="mobile"] #drawer .xme-menu-switch { position: relative; display: block; flex: 0 0 40px; width: 40px; height: 24px; margin-left: auto; border-radius: 20px; background: #dedfe4; transition: background 160ms ease; }
html[data-ui="mobile"] #drawer .xme-menu-switch::after { position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px #0002; content: ""; transition: transform 160ms ease; }
html[data-ui="mobile"] #drawer .xme-menu-item[aria-checked="true"] .xme-menu-switch { background: var(--xme-accent); }
html[data-ui="mobile"] #drawer .xme-menu-item[aria-checked="true"] .xme-menu-switch::after { transform: translateX(16px); }
html[data-ui="mobile"] #drawer .xme-menu-items.is-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 4px; padding: 12px 0; }
html[data-ui="mobile"] #drawer .xme-menu-items.is-grid .xme-menu-item { flex-direction: column; justify-content: flex-start; gap: 9px; min-height: 78px; padding: 9px 1px; border: 0; text-align: center; }
html[data-ui="mobile"] #drawer .xme-menu-items.is-grid .xme-menu-icon { flex-basis: auto; width: 34px; height: 30px; }
html[data-ui="mobile"] #drawer .xme-menu-items.is-grid .xme-menu-icon svg { width: 26px; height: 26px; }
html[data-ui="mobile"] #drawer .xme-menu-items.is-grid .xme-menu-copy strong { font-size: 11px; line-height: 18px; }
html[data-ui="mobile"] #drawer .xme-menu-items.is-grid .xme-menu-value { max-width: 100%; margin: 0; font-size: 10px; }

html[data-ui="mobile"] #drawer .xme-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: min(44dvh, 340px); padding: 40px 25px; color: #a5a6ad; text-align: center; }
html[data-ui="mobile"] #drawer .xme-empty-icon { display: grid; place-items: center; width: 66px; height: 66px; margin-bottom: 16px; border-radius: 50%; background: #f8f8fa; color: #d1d2d9; }
html[data-ui="mobile"] #drawer .xme-empty-icon svg { width: 34px; height: 34px; stroke-width: 1.3; }
html[data-ui="mobile"] #drawer .xme-empty h3 { margin: 0 0 8px; color: #96979f; font-size: 15px; font-weight: 500; line-height: 24px; }
html[data-ui="mobile"] #drawer .xme-empty p { max-width: 280px; margin: 0; color: #b1b2b9; font-size: 12px; line-height: 21px; overflow-wrap: anywhere; }
html[data-ui="mobile"] #drawer .xme-empty-action { min-width: 110px; min-height: 38px; margin-top: 22px; padding: 8px 20px; border-radius: 4px; background: var(--xme-accent); color: #fff; font-size: 13px; }
html[data-ui="mobile"] #drawer .xme-empty-action:hover { color: #fff; }

/* Comment, share and overflow surfaces rise over the bottom navigation. */
html[data-ui="mobile"] #drawer:is([data-view="comments"], [data-view="share"], [data-view="more"]):not([data-mobile-page="true"]) {
  position: fixed;
  top: auto;
  right: 0;
  bottom: var(--xme-keyboard-inset, 0px);
  left: 0;
  width: 100%;
  max-width: none;
  max-height: calc(100dvh - var(--xme-keyboard-inset, 0px) - max(24px, env(safe-area-inset-top, 0px)));
  padding-bottom: 0;
  border: 0;
  border-radius: 16px 16px 0 0;
  background: #fff;
  color: #16171b;
  box-shadow: 0 -12px 55px #0003;
  color-scheme: light;
}

html[data-ui="mobile"] #drawer:is([data-view="comments"], [data-view="share"], [data-view="more"])::before {
  width: 30px;
  height: 4px;
  margin-top: 8px;
  background: #d9d9df;
}

html[data-ui="mobile"] #drawer:is([data-view="comments"], [data-view="share"], [data-view="more"]) > .drawer-header {
  position: relative;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  min-height: 43px;
  padding: 6px 54px 9px;
  border: 0;
  background: #fff;
  touch-action: none;
}

html[data-ui="mobile"] #drawer:is([data-view="comments"], [data-view="share"], [data-view="more"]) > .drawer-header h2 { margin: 0; color: #25262b; font-size: 13px; font-weight: 500; line-height: 24px; }
html[data-ui="mobile"] #drawer:is([data-view="comments"], [data-view="share"], [data-view="more"]) #drawer-close { position: absolute; top: 0; right: max(5px, env(safe-area-inset-right, 0px)); left: auto; display: grid; place-items: center; width: 42px; height: 42px; padding: 11px; border-radius: 50%; background: transparent; color: #33343a; }
html[data-ui="mobile"] #drawer:is([data-view="comments"], [data-view="share"], [data-view="more"]) #drawer-close svg { width: 20px; height: 20px; transform: none; }
html[data-ui="mobile"] #drawer[data-view="comments"] { height: min(72dvh, 660px); }
html[data-ui="mobile"] #drawer[data-view="comments"] > .drawer-body { display: flex; flex: 1 1 auto; flex-direction: column; min-height: 0; margin: 0; padding: 0; overflow: hidden; background: #fff; }
html[data-ui="mobile"] #drawer[data-view="comments"] .drawer-intro { flex: 0 0 auto; margin: 0; padding: 4px 18px 9px; color: #a3a4ad; font-size: 10px !important; line-height: 18px; }
html[data-ui="mobile"] #drawer[data-view="comments"] .comment-list { flex: 1 1 auto; min-height: 0; padding: 0 max(17px, env(safe-area-inset-right, 0px)) 14px max(17px, env(safe-area-inset-left, 0px)); overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
html[data-ui="mobile"] #drawer[data-view="comments"] .comment-item { position: relative; display: flex; align-items: flex-start; gap: 10px; margin: 0; padding: 13px 0 6px; border: 0; }
html[data-ui="mobile"] #drawer[data-view="comments"] .comment-avatar { display: grid; flex: 0 0 34px; place-items: center; width: 34px; height: 34px; overflow: hidden; border-radius: 50%; background: #eff0f2; color: #8c8f9b; font-size: 12px; }
html[data-ui="mobile"] #drawer[data-view="comments"] .comment-content { flex: 1 1 auto; min-width: 0; padding-right: 37px; color: #222329; font-size: 14px; line-height: 1.65; }
html[data-ui="mobile"] #drawer[data-view="comments"] .comment-content strong { display: block; color: #96979e; font-size: 12px; font-weight: 400; line-height: 20px; }
html[data-ui="mobile"] #drawer[data-view="comments"] .comment-content p { margin: 3px 0 2px; color: #292a30; font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
html[data-ui="mobile"] #drawer[data-view="comments"] .comment-content time,
html[data-ui="mobile"] #drawer[data-view="comments"] .comment-content small { color: #b2b3ba; font-size: 10px; line-height: 20px; }
html[data-ui="mobile"] #drawer[data-view="comments"] .comment-actions { display: flex; align-items: center; gap: 16px; min-height: 25px; margin-top: 0; }
html[data-ui="mobile"] #drawer[data-view="comments"] .comment-action { min-height: 28px; padding: 3px 0; background: transparent; color: #a0a1aa; font-size: 11px; line-height: 20px; }
html[data-ui="mobile"] #drawer[data-view="comments"] .comment-actions .comment-action:first-child { position: absolute; top: 17px; right: 0; min-width: 32px; min-height: 34px; text-align: center; }
html[data-ui="mobile"] #drawer[data-view="comments"] .comment-action[aria-pressed="true"] { color: #fe2c55; }
html[data-ui="mobile"] #drawer[data-view="comments"] .comment-item.is-reply { gap: 8px; margin-left: 44px; padding: 8px 0 5px; border: 0; }
html[data-ui="mobile"] #drawer[data-view="comments"] .comment-item.is-reply .comment-avatar { flex-basis: 25px; width: 25px; height: 25px; font-size: 10px; }
html[data-ui="mobile"] #drawer[data-view="comments"] .comment-item.is-reply .comment-actions .comment-action:first-child { top: 11px; }
html[data-ui="mobile"] #drawer[data-view="comments"] .comment-input-row { position: relative; bottom: auto; display: grid; grid-template-columns: minmax(0, 1fr) auto; flex: 0 0 auto; align-items: center; gap: 7px 10px; margin: 0; padding: 10px max(14px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(14px, env(safe-area-inset-left, 0px)); border-top: 1px solid #f3f3f5; background: #fff; }
html[data-ui="mobile"] #drawer[data-view="comments"] .comment-input-row input { width: 100%; min-width: 0; min-height: 38px; height: 38px; padding: 0 14px; border: 0; border-radius: 20px; background: #f4f4f6; color: #26272e; font-size: 16px; line-height: 38px; }
html[data-ui="mobile"] #drawer[data-view="comments"] .comment-input-row input::placeholder { color: #a7a8b0; }
html[data-ui="mobile"] #drawer[data-view="comments"] .comment-input-row .primary-btn { min-width: 48px; min-height: 36px; padding: 5px 8px; border: 0; border-radius: 4px; background: #fe2c55; color: #fff; font-size: 13px; }
html[data-ui="mobile"] #drawer[data-view="comments"] .comment-input-row > button:not(.primary-btn) { grid-column: 1 / -1; justify-self: start; min-height: 24px; padding: 0 5px; border: 0; background: transparent; color: #93959f; font-size: 11px; }
html[data-ui="mobile"] #drawer[data-view="comments"] .empty-state { padding: 45px 20px; color: #aaaab3; }
html[data-ui="mobile"] #drawer[data-view="comments"] .empty-state strong { color: #9698a1; font-size: 14px; font-weight: 400; }
html[data-ui="mobile"] #drawer[data-view="comments"] .empty-state p { color: #b2b3bb; font-size: 12px; line-height: 21px; }
html[data-ui="mobile"] #drawer[data-view="comments"] .empty-state svg { color: #d0d1d7; }

/* Both the new share renderer and saved older share views use the same sheet. */
html[data-ui="mobile"] #drawer[data-view="share"] > .drawer-body { min-height: 0; margin: 0; padding: 0; overflow-x: hidden; overflow-y: auto; background: #f8f8f9; overscroll-behavior: contain; }
html[data-ui="mobile"] #drawer .xme-share { margin: 0; padding: 0; color: #2a2b31; }
html[data-ui="mobile"] #drawer[data-view="share"] .xme-share-preview,
html[data-ui="mobile"] #drawer[data-view="share"] .share-preview { display: flex; align-items: center; gap: 10px; min-height: 58px; margin: 0; padding: 5px max(20px, env(safe-area-inset-right, 0px)) 10px max(20px, env(safe-area-inset-left, 0px)); border: 0; background: #fff; }
html[data-ui="mobile"] #drawer .xme-share-preview .xme-cover { flex: 0 0 31px; width: 31px; height: 41px; aspect-ratio: auto; border-radius: 3px; }
html[data-ui="mobile"] #drawer .xme-share-preview .xme-cover > svg { width: 19px; height: 19px; }
html[data-ui="mobile"] #drawer[data-view="share"] .share-preview img { width: 31px; height: 41px; border-radius: 3px; }
html[data-ui="mobile"] #drawer .xme-share-preview strong,
html[data-ui="mobile"] #drawer[data-view="share"] .share-preview strong { display: -webkit-box; min-width: 0; overflow: hidden; color: #777882; font-size: 12px; font-weight: 400; line-height: 19px; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
html[data-ui="mobile"] #drawer .xme-recipient-row,
html[data-ui="mobile"] #drawer .xme-share-row,
html[data-ui="mobile"] #drawer[data-view="share"] .share-action-grid { display: flex; gap: 16px; width: 100%; margin: 0; padding: 17px max(20px, env(safe-area-inset-right, 0px)) 16px max(20px, env(safe-area-inset-left, 0px)); overflow-x: auto; overflow-y: hidden; background: #f8f8f9; overscroll-behavior-x: contain; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
html[data-ui="mobile"] #drawer .xme-recipient-row { background: #fff; }
html[data-ui="mobile"] #drawer .xme-share-row + .xme-share-row { border-top: 1px solid #efeff2; }
html[data-ui="mobile"] #drawer .xme-recipient,
html[data-ui="mobile"] #drawer .xme-share-action,
html[data-ui="mobile"] #drawer[data-view="share"] .share-action { display: flex; flex: 0 0 57px; flex-direction: column; align-items: center; justify-content: flex-start; gap: 9px; min-width: 57px; margin: 0; padding: 0; border: 0; background: transparent; color: #64656e; font-size: 11px; line-height: 18px; text-align: center; white-space: nowrap; }
html[data-ui="mobile"] #drawer .xme-recipient > span:last-child,
html[data-ui="mobile"] #drawer .xme-share-action > span:last-child { display: block; max-width: 64px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; pointer-events: none; }
html[data-ui="mobile"] #drawer .xme-recipient .xme-avatar { width: 51px; height: 51px; }
html[data-ui="mobile"] #drawer .xme-share-action-icon,
html[data-ui="mobile"] #drawer[data-view="share"] .share-action > span:first-child { display: grid; flex: 0 0 auto; place-items: center; width: 51px; height: 51px; border-radius: 50%; background: #fff; color: #43454f; }
html[data-ui="mobile"] #drawer .xme-share-action-icon svg,
html[data-ui="mobile"] #drawer[data-view="share"] .share-action svg { width: 25px; height: 25px; stroke-width: 1.7; }
html[data-ui="mobile"] #drawer .xme-share-action[data-action="send"] .xme-share-action-icon { background: #fe2c55; color: #fff; }
html[data-ui="mobile"] #drawer .xme-share-action[data-action="favorite"] .xme-share-action-icon,
html[data-ui="mobile"] #drawer .xme-share-action[data-action="save"] .xme-share-action-icon { color: #ecb94c; }
html[data-ui="mobile"] #drawer .xme-share-action[data-action="copy"] .xme-share-action-icon { color: #696b76; }
html[data-ui="mobile"] #drawer .xme-share-cancel,
html[data-ui="mobile"] #drawer[data-view="share"] .share-cancel { display: block; width: 100%; min-height: calc(53px + env(safe-area-inset-bottom, 0px)); margin: 0; padding: 14px max(18px, env(safe-area-inset-right, 0px)) calc(14px + env(safe-area-inset-bottom, 0px)) max(18px, env(safe-area-inset-left, 0px)); border: 0; border-top: 6px solid #f0f0f3; border-radius: 0; background: #fff; color: #313238; font-size: 15px; font-weight: 400; line-height: 24px; text-align: center; }
html[data-ui="mobile"] #drawer[data-view="share"] .share-link-input { display: block; width: calc(100% - 36px); height: 36px; margin: 0 18px 14px; padding: 0 11px; border: 1px solid #ededf1; border-radius: 4px; background: #fff; color: #999aa3; font-size: 12px; }
html[data-ui="mobile"] #drawer[data-view="more"] > .drawer-body:has(.xme-menu) { display: flex; min-height: 0; padding: 0; overflow: hidden; background: #f7f7f8; }
html[data-ui="mobile"] #drawer[data-view="more"] .xme-menu { flex: 1 1 auto; max-height: 62dvh; }

@media (min-width: 700px) {
  html[data-ui="mobile"] #drawer .xme-search-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px 12px; }
  html[data-ui="mobile"] #drawer .xme-person-list { max-width: 800px; width: 100%; margin: 0 auto; }
  html[data-ui="mobile"] #drawer .xme-share-row,
  html[data-ui="mobile"] #drawer .xme-recipient-row { justify-content: flex-start; gap: 22px; }
}

@media (max-height: 500px) {
  html[data-ui="mobile"] #drawer .xme-search-header { min-height: calc(49px + env(safe-area-inset-top, 0px)); padding-top: calc(4px + env(safe-area-inset-top, 0px)); padding-bottom: 4px; }
  html[data-ui="mobile"] #drawer .xme-tabs,
  html[data-ui="mobile"] #drawer .xme-tabs button { min-height: 40px; }
  html[data-ui="mobile"] #drawer .xme-empty { min-height: 180px; padding-top: 22px; padding-bottom: 22px; }
  html[data-ui="mobile"] #drawer .xme-empty-icon { width: 44px; height: 44px; margin-bottom: 8px; }
  html[data-ui="mobile"] #drawer .xme-empty-icon svg { width: 26px; height: 26px; }
  html[data-ui="mobile"] #drawer[data-view="comments"] { height: calc(100dvh - 12px); }
  html[data-ui="mobile"] #drawer:is([data-view="share"], [data-view="more"]):not([data-mobile-page="true"]) { max-height: calc(100dvh - var(--xme-keyboard-inset, 0px) - 10px); }
  html[data-ui="mobile"] #drawer .xme-share-preview { display: none; }
  html[data-ui="mobile"] #drawer .xme-share-row,
  html[data-ui="mobile"] #drawer .xme-recipient-row { padding-top: 12px; padding-bottom: 12px; }
  html[data-ui="mobile"] #drawer[data-view="more"] .xme-menu { max-height: calc(100dvh - 75px); }
}

@media (prefers-reduced-motion: reduce) {
  html[data-ui="mobile"] #drawer:has(.xme-view),
  html[data-ui="mobile"] #drawer:has(.xme-share),
  html[data-ui="mobile"] #drawer[data-view="comments"],
  html[data-ui="mobile"] #drawer .xme-menu-switch,
  html[data-ui="mobile"] #drawer .xme-menu-switch::after { animation: none !important; transition: none !important; }
}

/* Collections and personal libraries share real playback data with the feed. */
html[data-ui="mobile"] #drawer:has(.xme-collection) > .drawer-header {
  display: none;
}

html[data-ui="mobile"] #drawer .xme-collection-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 0 0 auto;
  gap: 8px;
  min-height: calc(58px + env(safe-area-inset-top, 0px));
  padding: calc(7px + env(safe-area-inset-top, 0px)) max(14px, env(safe-area-inset-right, 0px)) 7px max(5px, env(safe-area-inset-left, 0px));
  border-bottom: 1px solid #f3f3f5;
  background: #fff;
}

html[data-ui="mobile"] #drawer .xme-collection-heading {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: #202126;
  font-size: 17px;
  font-weight: 600;
  line-height: 28px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html[data-ui="mobile"] #drawer .xme-collection-header-spacer {
  display: block;
  flex: 0 0 36px;
  width: 36px;
  height: 44px;
}

html[data-ui="mobile"] #drawer .xme-collection-head-action {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0 2px 0 5px;
  border: 0;
  background: transparent;
  color: #fe2c55;
  font-size: 13px;
  font-weight: 500;
  line-height: 22px;
}

html[data-ui="mobile"] #drawer .xme-collection-description {
  max-width: 800px;
  margin: 0 auto;
  padding: 15px max(17px, env(safe-area-inset-right, 0px)) 7px max(17px, env(safe-area-inset-left, 0px));
  color: #9a9ba4;
  font-size: 12px;
  line-height: 21px;
  overflow-wrap: anywhere;
}

html[data-ui="mobile"] #drawer .xme-collection-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 9px;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
}

html[data-ui="mobile"] #drawer .xme-collection-item {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-width: 0;
  margin: 0;
  padding: 0;
}

html[data-ui="mobile"] #drawer .xme-collection-item > .xme-search-tile {
  width: 100%;
}

html[data-ui="mobile"] #drawer .xme-item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}

html[data-ui="mobile"] #drawer .xme-item-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1 0 auto;
  gap: 3px;
  min-width: 0;
  min-height: 31px;
  padding: 5px 8px;
  border: 0;
  border-radius: 4px;
  background: #f4f4f6;
  color: #747680;
  font-size: 11px;
  font-weight: 400;
  line-height: 18px;
}

html[data-ui="mobile"] #drawer .xme-item-action > .xme-icon,
html[data-ui="mobile"] #drawer .xme-item-action svg {
  width: 13px;
  height: 13px;
}

html[data-ui="mobile"] #drawer .xme-item-action.is-danger,
html[data-ui="mobile"] #drawer .xme-item-action.is-danger:hover {
  background: #fff2f5;
  color: #df4b69;
}

html[data-ui="mobile"] #drawer .xme-item-action:disabled {
  cursor: default;
  opacity: .45;
}

@media (max-height: 500px) {
  html[data-ui="mobile"] #drawer .xme-collection-header {
    min-height: calc(49px + env(safe-area-inset-top, 0px));
    padding-top: calc(4px + env(safe-area-inset-top, 0px));
    padding-bottom: 4px;
  }
}

html[data-ui="mobile"] #drawer .xme-search-collections {
  padding: 2px max(18px, env(safe-area-inset-right, 0px)) 18px max(18px, env(safe-area-inset-left, 0px));
}

html[data-ui="mobile"] #drawer .xme-collection-result {
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  min-width: 0;
  min-height: 112px;
  margin: 0;
  padding: 15px 0;
  border: 0;
  border-bottom: 1px solid #f1f1f4;
  border-radius: 0;
  background: #fff;
  color: #26272d;
  text-align: left;
}

html[data-ui="mobile"] #drawer .xme-collection-result > .xme-cover {
  flex: 0 0 62px;
  width: 62px;
  height: 82px;
  aspect-ratio: auto;
  border-radius: 5px;
}

html[data-ui="mobile"] #drawer .xme-collection-result-badge {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  padding: 3px 5px;
  background: #0006;
  color: #fff;
  font-size: 10px;
  line-height: 16px;
  text-align: center;
}

html[data-ui="mobile"] #drawer .xme-collection-result-copy {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

html[data-ui="mobile"] #drawer .xme-collection-result-copy strong {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: #26272d;
  font-size: 15px;
  font-weight: 550;
  line-height: 23px;
  overflow-wrap: anywhere;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

html[data-ui="mobile"] #drawer .xme-collection-result-description {
  overflow: hidden;
  color: #9c9da6;
  font-size: 12px;
  font-weight: 400;
  line-height: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html[data-ui="mobile"] #drawer .xme-collection-result-count {
  color: #a2a3ab;
  font-size: 11px;
  font-weight: 400;
  line-height: 19px;
}

html[data-ui="mobile"] #drawer .xme-collection-result-arrow,
html[data-ui="mobile"] #drawer .xme-collection-result-arrow svg {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  color: #c4c5cd;
}

/* Desktop player actions use a compact card anchored beside the action rail. */
html[data-ui="desktop"] #drawer[data-anchored-menu="true"]:is([data-view="share"], [data-view="more"]) {
  position: fixed;
  top: var(--menu-top, 80px);
  right: var(--menu-right, 84px);
  bottom: auto;
  left: auto;
  z-index: 72;
  display: flex;
  flex-direction: column;
  width: 340px;
  max-width: calc(100vw - 24px);
  height: auto;
  min-height: 0;
  max-height: min(620px, var(--menu-max-height, calc(100dvh - var(--menu-top, 80px) - 12px)));
  margin: 0;
  padding: 0;
  overflow: visible;
  border: 1px solid #ffffff10;
  border-radius: 12px;
  background: #242426;
  color: #e9e9ef;
  box-shadow: 0 14px 42px #0006;
  transform: none;
  transform-origin: 100% var(--menu-arrow-top, 32px);
  isolation: isolate;
  color-scheme: dark;
}

html[data-ui="desktop"] #drawer[data-anchored-menu="true"][hidden] {
  display: none !important;
}

html[data-ui="desktop"] #drawer[data-anchored-menu="true"]:is([data-view="share"], [data-view="more"])::before {
  position: absolute;
  top: clamp(20px, var(--menu-arrow-top, 32px), calc(100% - 20px));
  right: -6px;
  left: auto;
  z-index: 2;
  display: block;
  width: 11px;
  height: 11px;
  margin: 0;
  border: 0;
  border-top: 1px solid #ffffff10;
  border-right: 1px solid #ffffff10;
  border-radius: 1px;
  background: #242426;
  content: "";
  transform: rotate(45deg);
  pointer-events: none;
}

html[data-ui="desktop"] #drawer[data-anchored-menu="true"] > .drawer-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 0 0 auto;
  gap: 10px;
  min-height: 48px;
  margin: 0;
  padding: 8px 10px 5px 17px;
  border: 0;
  border-radius: 12px 12px 0 0;
  background: #242426;
}

html[data-ui="desktop"] #drawer[data-anchored-menu="true"] > .drawer-header h2 {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: #e5e5ec;
  font-size: 14px;
  font-weight: 550;
  line-height: 24px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html[data-ui="desktop"] #drawer[data-anchored-menu="true"] #drawer-close {
  position: static;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  margin: 0;
  padding: 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #9c9ca7;
}

html[data-ui="desktop"] #drawer[data-anchored-menu="true"] #drawer-close:hover {
  background: #ffffff08;
  color: #fff;
}

html[data-ui="desktop"] #drawer[data-anchored-menu="true"] #drawer-close svg {
  width: 17px;
  height: 17px;
  transform: none;
}

html[data-ui="desktop"] #drawer[data-anchored-menu="true"] > .drawer-body {
  position: relative;
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 5px 12px 12px;
  overflow-x: hidden;
  overflow-y: auto;
  border-radius: 0 0 12px 12px;
  background: #242426;
  color: #d6d6df;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #ffffff23 transparent;
}

html[data-ui="desktop"] #drawer[data-anchored-menu="true"] .desktop-share-preview {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 70px;
  margin: 0 3px 2px;
  padding: 2px 0 13px;
  border-bottom: 1px solid #ffffff0a;
}

html[data-ui="desktop"] #drawer[data-anchored-menu="true"] .desktop-share-preview img,
html[data-ui="desktop"] #drawer[data-anchored-menu="true"] .desktop-share-preview video {
  display: block;
  flex: 0 0 auto;
  width: 42px;
  height: 56px;
  overflow: hidden;
  border-radius: 4px;
  background: #333338;
  object-fit: cover;
}

html[data-ui="desktop"] #drawer[data-anchored-menu="true"] .desktop-share-preview strong {
  display: -webkit-box;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: #c7c7d1;
  font-size: 12px;
  font-weight: 400;
  line-height: 20px;
  overflow-wrap: anywhere;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

html[data-ui="desktop"] #drawer[data-anchored-menu="true"] .desktop-menu-action,
html[data-ui="desktop"] #drawer[data-anchored-menu="true"] .drawer-menu-action {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 11px;
  width: 100%;
  min-width: 0;
  min-height: 43px;
  margin: 0;
  padding: 9px 9px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #ceced8;
  font-size: 13px;
  font-weight: 400;
  line-height: 23px;
  text-align: left;
}

html[data-ui="desktop"] #drawer[data-anchored-menu="true"] .desktop-menu-action:hover,
html[data-ui="desktop"] #drawer[data-anchored-menu="true"] .drawer-menu-action:hover {
  background: #ffffff07;
  color: #fff;
}

html[data-ui="desktop"] #drawer[data-anchored-menu="true"] .desktop-menu-action > span:first-child:has(svg),
html[data-ui="desktop"] #drawer[data-anchored-menu="true"] .desktop-menu-action > svg,
html[data-ui="desktop"] #drawer[data-anchored-menu="true"] .drawer-menu-action svg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  color: #a0a0ae;
}

html[data-ui="desktop"] #drawer[data-anchored-menu="true"] .desktop-menu-action svg {
  display: block;
  width: 20px;
  height: 20px;
}

html[data-ui="desktop"] #drawer[data-anchored-menu="true"] .desktop-menu-value {
  flex: 0 0 auto;
  margin-left: auto;
  color: #92929e;
  font-size: 11px;
  line-height: 22px;
}

html[data-ui="desktop"] #drawer[data-anchored-menu="true"] .desktop-menu-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px 3px;
  margin: 0;
  padding: 13px 0;
}

html[data-ui="desktop"] #drawer[data-anchored-menu="true"] .desktop-menu-grid > button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 9px;
  min-width: 0;
  min-height: 77px;
  margin: 0;
  padding: 5px 1px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #bfc0ca;
  font-size: 11px;
  font-weight: 400;
  line-height: 18px;
  text-align: center;
}

html[data-ui="desktop"] #drawer[data-anchored-menu="true"] .desktop-menu-grid > button > span:first-child:has(svg) {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 43px;
  height: 43px;
  border-radius: 50%;
  background: #343438;
  color: #e2e2eb;
}

html[data-ui="desktop"] #drawer[data-anchored-menu="true"] .desktop-menu-grid > button svg {
  display: block;
  width: 23px;
  height: 23px;
  color: inherit;
}

html[data-ui="desktop"] #drawer[data-anchored-menu="true"] .desktop-menu-grid > button > svg {
  width: 43px;
  height: 43px;
  padding: 10px;
  border-radius: 50%;
  background: #343438;
  color: #e2e2eb;
}

html[data-ui="desktop"] #drawer[data-anchored-menu="true"] .desktop-menu-grid > button:hover {
  background: transparent;
  color: #fff;
}

html[data-ui="desktop"] #drawer[data-anchored-menu="true"] .desktop-menu-grid > button:hover > span:first-child:has(svg) {
  background: #404046;
}

html[data-ui="desktop"] #drawer[data-anchored-menu="true"] .desktop-menu-grid > button > span:last-child:not(:first-child) {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html[data-ui="desktop"] #drawer[data-anchored-menu="true"] .settings-row {
  gap: 14px;
  min-height: 50px;
  margin: 0;
  padding: 11px 9px;
  border: 0;
  color: #c5c5d0;
  font-size: 12px;
  line-height: 22px;
}

html[data-ui="desktop"] #drawer[data-anchored-menu="true"] .settings-row .drawer-item-copy strong {
  color: #c9c9d4;
  font-size: 12px;
  font-weight: 400;
  line-height: 20px;
}

html[data-ui="desktop"] #drawer[data-anchored-menu="true"] .settings-row .drawer-item-copy > span {
  color: #858591;
  font-size: 10px;
  line-height: 17px;
}

html[data-ui="desktop"] #drawer[data-anchored-menu="true"] .settings-row select,
html[data-ui="desktop"] #drawer[data-anchored-menu="true"] .desktop-menu-action select,
html[data-ui="desktop"] #drawer[data-anchored-menu="true"] .desktop-menu-select {
  flex: 0 0 auto;
  width: auto;
  max-width: 114px;
  min-height: 31px;
  padding: 5px 8px;
  border: 1px solid #ffffff10;
  border-radius: 5px;
  background: #303034;
  color: #d5d5df;
  font-size: 12px;
}

html[data-ui="desktop"] #drawer[data-anchored-menu="true"] input[type="checkbox"] {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  accent-color: #ff315b;
}

html[data-ui="desktop"] #drawer[data-anchored-menu="true"] .desktop-menu-switch,
html[data-ui="desktop"] #drawer[data-anchored-menu="true"] .desktop-menu-toggle-track {
  position: relative;
  display: block;
  flex: 0 0 32px;
  width: 32px;
  height: 18px;
  margin-left: auto;
  border-radius: 20px;
  background: #60606b;
  transition: background 160ms;
}

html[data-ui="desktop"] #drawer[data-anchored-menu="true"] :is(.desktop-menu-switch, .desktop-menu-toggle-track)::after {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #f2f2f6;
  content: "";
  transition: transform 160ms;
}

html[data-ui="desktop"] #drawer[data-anchored-menu="true"] [aria-checked="true"] :is(.desktop-menu-switch, .desktop-menu-toggle-track) {
  background: #ff315b;
}

html[data-ui="desktop"] #drawer[data-anchored-menu="true"] [aria-checked="true"] :is(.desktop-menu-switch, .desktop-menu-toggle-track)::after {
  transform: translateX(14px);
}

html[data-ui="desktop"] #drawer[data-anchored-menu="true"] .desktop-menu-action[role="switch"]:not(:has(.desktop-menu-switch, .desktop-menu-toggle-track)) {
  padding-right: 53px;
}

html[data-ui="desktop"] #drawer[data-anchored-menu="true"] .desktop-menu-action[role="switch"]:not(:has(.desktop-menu-switch, .desktop-menu-toggle-track))::before {
  position: absolute;
  top: calc(50% - 9px);
  right: 9px;
  width: 32px;
  height: 18px;
  border-radius: 20px;
  background: #60606b;
  content: "";
}

html[data-ui="desktop"] #drawer[data-anchored-menu="true"] .desktop-menu-action[role="switch"]:not(:has(.desktop-menu-switch, .desktop-menu-toggle-track))::after {
  position: absolute;
  top: calc(50% - 7px);
  right: 25px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #f2f2f6;
  content: "";
  transition: transform 160ms;
}

html[data-ui="desktop"] #drawer[data-anchored-menu="true"] .desktop-menu-action[role="switch"][aria-checked="true"]:not(:has(.desktop-menu-switch, .desktop-menu-toggle-track))::before {
  background: #ff315b;
}

html[data-ui="desktop"] #drawer[data-anchored-menu="true"] .desktop-menu-action[role="switch"][aria-checked="true"]:not(:has(.desktop-menu-switch, .desktop-menu-toggle-track))::after {
  transform: translateX(14px);
}

html[data-ui="desktop"] #drawer[data-anchored-menu="true"] .desktop-menu-divider {
  height: 0;
  margin: 8px 5px;
  border: 0;
  border-top: 1px solid #ffffff0a;
}

html[data-ui="desktop"] #drawer[data-anchored-menu="true"] .desktop-menu-note,
html[data-ui="desktop"] #drawer[data-anchored-menu="true"] .drawer-intro {
  margin: 9px 8px;
  color: #8a8a96;
  font-size: 11px;
  line-height: 1.8;
}

html[data-ui="desktop"] #drawer[data-anchored-menu="true"] button:disabled {
  cursor: default;
  opacity: .4;
}

html[data-ui="desktop"] #drawer[data-anchored-menu="true"] button:focus-visible,
html[data-ui="desktop"] #drawer[data-anchored-menu="true"] select:focus-visible {
  outline: 2px solid #ff7895;
  outline-offset: -3px;
}

html[data-ui="desktop"] #drawer[data-anchored-menu="true"].is-entering {
  animation: desktop-player-menu-enter 160ms cubic-bezier(.2, .75, .25, 1) both;
}

html[data-ui="desktop"] #drawer[data-anchored-menu="true"].is-closing {
  pointer-events: none;
  animation: desktop-player-menu-leave 160ms ease-in both;
}

/* An explicit title rule wins inherited panel colors in the mobile comments sheet. */
html[data-ui="mobile"] #drawer[data-view="comments"] > .drawer-header {
  min-height: 46px;
  padding-top: 7px;
  padding-bottom: 10px;
  border: 0;
  background: #fff;
  color: #25262b;
}

html[data-ui="mobile"] #drawer[data-view="comments"] #drawer-title {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: #25262b;
  font-size: 14px;
  font-weight: 600;
  line-height: 25px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html[data-ui="mobile"] #drawer[data-view="comments"] #drawer-close {
  color: #3d3e46;
}

@keyframes desktop-player-menu-enter {
  from { opacity: 0; transform: translateX(8px) scale(.98); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes desktop-player-menu-leave {
  from { opacity: 1; transform: translateX(0) scale(1); }
  to { opacity: 0; transform: translateX(7px) scale(.985); }
}

@media (max-width: 390px) {
  html[data-ui="desktop"] #drawer[data-anchored-menu="true"] .desktop-menu-grid {
    gap: 6px 0;
  }

  html[data-ui="desktop"] #drawer[data-anchored-menu="true"] .desktop-menu-grid > button {
    font-size: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html[data-ui="desktop"] #drawer[data-anchored-menu="true"],
  html[data-ui="desktop"] #drawer[data-anchored-menu="true"] *,
  html[data-ui="desktop"] #drawer[data-anchored-menu="true"] *::before,
  html[data-ui="desktop"] #drawer[data-anchored-menu="true"] *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* Collection owns its navigation bar; avoid a second title and back button. */
html[data-ui="mobile"] #drawer:has(.xme-collection)>.drawer-header{display:none}
.mobile-seek-wrap{display:none}
html[data-ui="mobile"] .mobile-seek-wrap{display:block;position:absolute;bottom:0;left:0;right:0;height:22px;z-index:9;touch-action:none}
html[data-ui="mobile"] #mobile-seek{appearance:none;-webkit-appearance:none;position:absolute;bottom:0;left:0;width:100%;height:18px;margin:0;background:transparent;cursor:pointer;touch-action:none;--progress:0%}
html[data-ui="mobile"] #mobile-seek::-webkit-slider-runnable-track{height:2px;background:linear-gradient(to right,#ffffffbd var(--progress),#ffffff28 var(--progress))}
html[data-ui="mobile"] #mobile-seek::-webkit-slider-thumb{appearance:none;-webkit-appearance:none;width:6px;height:6px;border-radius:50%;margin-top:-2px;background:#fff}
html[data-ui="mobile"] #mobile-seek::-moz-range-track{height:2px;background:#ffffff45}
html[data-ui="mobile"] #mobile-seek::-moz-range-thumb{width:6px;height:6px;border:0;background:#fff}
html[data-ui="mobile"] #mobile-seek-time{display:none;position:absolute;bottom:64px;left:0;right:0;text-align:center;color:#fff;font-size:28px;font-variant-numeric:tabular-nums;text-shadow:0 2px 10px #000}
html[data-ui="mobile"] .is-seeking #mobile-seek-time{display:block}
html[data-ui="mobile"] .is-seeking .video-info,html[data-ui="mobile"] .is-seeking .social-rail{opacity:.25}
html[data-ui="mobile"] .is-seeking #mobile-seek::-webkit-slider-runnable-track{height:4px}
html[data-ui="mobile"] .is-seeking #mobile-seek::-webkit-slider-thumb{width:12px;height:12px;margin-top:-4px}

html[data-ui="mobile"] .creator-service-note{margin:16px 22px;color:#999;font-size:12px;line-height:1.7}
html[data-ui="mobile"] .search-scope-note{margin:0;padding:8px 16px max(10px,env(safe-area-inset-bottom));flex:none;color:#aaa;background:#fff;font-size:10px;line-height:1.5}

/* Keep the feed chrome compact while giving every control a real touch target. */
html[data-ui="mobile"] .mobile-topbar {
  padding-right: max(8px, env(safe-area-inset-right, 0px));
  padding-left: max(8px, env(safe-area-inset-left, 0px));
  background: linear-gradient(#0005, #0001 72%, transparent);
  -webkit-user-select: none;
  user-select: none;
}

html[data-ui="mobile"] .mobile-topbar nav {
  min-width: 0;
  gap: clamp(14px, 5.8vw, 26px);
}

html[data-ui="mobile"] .mobile-topbar nav button {
  min-width: 44px;
  padding-inline: 3px;
  color: #ffffffb8;
  touch-action: manipulation;
  transition: color 160ms ease, opacity 160ms ease;
}

html[data-ui="mobile"] .mobile-topbar nav button.is-active {
  color: #fff;
}

html[data-ui="mobile"] :is(.mobile-topbar, .mobile-tabbar) button:active {
  opacity: .65;
}

html[data-ui="mobile"] .video-info {
  right: calc(max(8px, env(safe-area-inset-right, 0px)) + 66px);
  bottom: 27px;
  max-width: 620px;
  transition: opacity 160ms ease;
}

html[data-ui="mobile"] .creator-row {
  margin-bottom: 6px;
}

html[data-ui="mobile"] .creator-row strong {
  overflow: hidden;
  max-width: 100%;
  font-size: 17px;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html[data-ui="mobile"] .video-title-line {
  margin-bottom: 5px;
}

html[data-ui="mobile"] .video-info p {
  color: #fffffff0;
  font-size: 14px;
  line-height: 1.55;
  overflow-wrap: anywhere;
  -webkit-line-clamp: 2;
}

html[data-ui="mobile"] .video-info p span {
  color: #fff;
  font-size: 13px;
  line-height: 1.6;
}

html[data-ui="mobile"] .music-line {
  max-width: 100%;
  margin-top: 7px;
  overflow: hidden;
  color: #ffffffdb;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html[data-ui="mobile"] .social-rail {
  right: max(7px, env(safe-area-inset-right, 0px));
  bottom: 23px;
  gap: clamp(6px, 1.2dvh, 11px);
  transition: opacity 160ms ease;
}

html[data-ui="mobile"] .social-button {
  height: 56px;
  gap: 4px;
  touch-action: manipulation;
  transition: transform 160ms var(--mobile-touch-easing), opacity 160ms ease;
}

html[data-ui="mobile"] .social-button svg {
  width: 34px;
  height: 34px;
  filter: drop-shadow(0 1px 2px #0005);
}

html[data-ui="mobile"] .social-button small {
  max-width: 100%;
  color: #fff;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  line-height: 16px;
}

html[data-ui="mobile"] .video-more-button {
  width: 48px;
  height: 44px;
  min-height: 44px;
}

html[data-ui="mobile"] :is(.social-button, .creator-profile-button, .avatar-follow-button):active {
  transform: scale(.9);
}

html[data-ui="mobile"] :is(.social-button.is-liked, .social-button.is-saved) svg {
  animation: mobile-reaction-pop 300ms var(--mobile-touch-easing);
}

html[data-ui="mobile"] .play-overlay:hover {
  background: transparent;
  transform: translate(-50%, -50%);
}

html[data-ui="mobile"] .video-stage.feed-enter-next {
  animation: mobile-feed-next 240ms var(--mobile-touch-easing) both;
}

html[data-ui="mobile"] .video-stage.feed-enter-previous {
  animation: mobile-feed-previous 240ms var(--mobile-touch-easing) both;
}

/* The line stays quiet until dragging, with a forgiving hit area above the tab bar. */
html[data-ui="mobile"] .mobile-seek-wrap {
  height: 30px;
}

html[data-ui="mobile"] #mobile-seek {
  height: 30px;
  padding-top: 14px;
  border-radius: 0;
}

html[data-ui="mobile"] #mobile-seek::-webkit-slider-thumb {
  opacity: 0;
  transition: opacity 120ms ease;
}

html[data-ui="mobile"] #mobile-seek::-moz-range-thumb {
  opacity: 0;
}

html[data-ui="mobile"] #mobile-seek::-moz-range-progress {
  height: 2px;
  background: #ffffffbd;
}

html[data-ui="mobile"] .is-seeking #mobile-seek::-webkit-slider-thumb,
html[data-ui="mobile"] #mobile-seek:focus-visible::-webkit-slider-thumb,
html[data-ui="mobile"] .is-seeking #mobile-seek::-moz-range-thumb,
html[data-ui="mobile"] #mobile-seek:focus-visible::-moz-range-thumb {
  opacity: 1;
}

html[data-ui="mobile"] .is-seeking #mobile-seek::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

html[data-ui="mobile"] .is-seeking #mobile-seek::-moz-range-track,
html[data-ui="mobile"] .is-seeking #mobile-seek::-moz-range-progress {
  height: 4px;
}

html[data-ui="mobile"] #mobile-seek-time {
  bottom: 78px;
  font-size: clamp(25px, 7vw, 34px);
  font-weight: 600;
  letter-spacing: .5px;
  pointer-events: none;
}

/* Keyboard focus keeps input and send actions visible inside the comment sheet. */
html[data-ui="mobile"] #drawer[data-view="comments"] .comment-input-row input {
  min-height: 44px;
  height: 44px;
  line-height: 44px;
}

html[data-ui="mobile"] #drawer[data-view="comments"] .comment-input-row .primary-btn {
  min-width: 52px;
  min-height: 44px;
  border-radius: 6px;
}

html[data-ui="mobile"] #drawer[data-view="comments"] .comment-list {
  scroll-padding-block: 8px 24px;
}

html[data-ui="mobile"] #drawer[data-view="comments"] .comment-actions .comment-action:first-child {
  right: -5px;
  min-width: 44px;
  min-height: 44px;
}

html[data-ui="mobile"] #drawer[data-view="comments"] .comment-input-row input:focus-visible {
  outline: 2px solid #fe2c5566;
  outline-offset: 0;
}

html[data-ui="mobile"] #drawer :is(.xme-back, .xme-collection-header-spacer) {
  flex-basis: 44px;
  width: 44px;
}

html[data-ui="mobile"] #drawer .xme-follow {
  min-height: 44px;
  padding-inline: 14px;
}

html[data-ui="mobile"] #drawer :is(.xme-history-clear, .xme-empty-action) {
  min-height: 44px;
}

html[data-ui="mobile"] #drawer .xme-view button:focus-visible,
html[data-ui="mobile"] #drawer .xme-share button:focus-visible,
html[data-ui="mobile"] #drawer [role="tabpanel"]:focus-visible {
  outline: 2px solid #fe2c5599;
  outline-offset: -2px;
}

@keyframes mobile-reaction-pop {
  0% { transform: scale(.8); }
  55% { transform: scale(1.16); }
  100% { transform: scale(1); }
}

@keyframes mobile-feed-next {
  from { transform: translateY(72px); opacity: .8; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes mobile-feed-previous {
  from { transform: translateY(-72px); opacity: .8; }
  to { transform: translateY(0); opacity: 1; }
}

@media (hover: none) {
  html[data-ui="mobile"] .social-button:hover {
    transform: none;
  }

  html[data-ui="mobile"] .social-button:active {
    transform: scale(.9);
  }

  html[data-ui="mobile"] .playing .video-stage:hover .play-overlay {
    opacity: 0;
    pointer-events: none;
  }
}

@media (max-width: 360px) {
  html[data-ui="mobile"] .mobile-topbar nav { gap: 10px; }
  html[data-ui="mobile"] .mobile-topbar nav button { font-size: 16px; }
  html[data-ui="mobile"] .creator-row strong { font-size: 16px; }
  html[data-ui="mobile"] .video-info p { font-size: 13px; }
  html[data-ui="mobile"] .video-info p span { font-size: 12px; }
  html[data-ui="mobile"] #drawer .xme-search-header { gap: 3px; padding-right: 8px; }
}

@media (max-height: 650px) {
  html[data-ui="mobile"] .social-rail { gap: 3px; }
  html[data-ui="mobile"] .social-button { height: 48px; }
  html[data-ui="mobile"] .social-button svg { width: 29px; height: 29px; }
  html[data-ui="mobile"] .creator-action { height: 64px; }
  html[data-ui="mobile"] .video-info p { -webkit-line-clamp: 2; }
}

/* Rotation keeps WebApp navigation; only the video overlay rearranges. */
@media (max-height: 500px) and (orientation: landscape) {
  html[data-ui="mobile"] .social-rail {
    right: max(12px, env(safe-area-inset-right, 0px));
    bottom: 19px;
    gap: 10px;
  }
  html[data-ui="mobile"] .social-button { width: 44px; height: 44px; }
  html[data-ui="mobile"] .social-button svg { width: 26px; height: 26px; }
  html[data-ui="mobile"] .social-button small { font-size: 10px; line-height: 14px; }
  html[data-ui="mobile"] .creator-action { height: 57px; }
  html[data-ui="mobile"] .video-info { bottom: 84px; max-width: min(620px, 70vw); }
  html[data-ui="mobile"] .creator-row strong { font-size: 15px; }
  html[data-ui="mobile"] .video-title-line h2 { -webkit-line-clamp: 1; }
  html[data-ui="mobile"] .video-info p { font-size: 12px; -webkit-line-clamp: 1; }
  html[data-ui="mobile"] #mobile-seek-time { bottom: 65px; }
}

@media (max-height: 500px) and (orientation: portrait) {
  html[data-ui="mobile"] .social-rail {
    flex-direction: column;
    align-items: center;
    right: max(5px, env(safe-area-inset-right, 0px));
    bottom: 20px;
    gap: 0;
    width: 52px;
  }
  html[data-ui="mobile"] .creator-action { height: 54px; }
  html[data-ui="mobile"] .social-button { height: 44px; }
  html[data-ui="mobile"] .social-button svg { width: 25px; height: 25px; }
  html[data-ui="mobile"] .social-button small { font-size: 10px; line-height: 13px; }
  html[data-ui="mobile"] .video-info { right: 69px; bottom: 27px; }
  html[data-ui="mobile"] .video-info p { -webkit-line-clamp: 1; }
}

@media (prefers-reduced-motion: reduce) {
  html[data-ui="mobile"] :is(.video-stage, .social-button, .social-button svg, .creator-profile-button, .avatar-follow-button, .video-info, .social-rail) {
    animation: none !important;
    transition: none !important;
  }
}

/* Author and topic controls belong to the shared player in both view modes. */
html[data-ui] .video-info .creator-name-button,
html[data-ui] .video-info .video-tag {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  min-height: 32px;
  padding: 2px 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  text-shadow: inherit;
  pointer-events: auto;
  touch-action: manipulation;
}

html[data-ui] .video-info .creator-name-button { max-width: 100%; }
html[data-ui] .video-info .creator-name-button strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html[data-ui] .video-info .creator-name-button:focus-visible,
html[data-ui] .video-info .video-tag:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }
html[data-ui] .video-info .creator-name-button:hover,
html[data-ui] .video-info .video-tag:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
html[data-ui] .video-info p:has(.video-tags) { display: block; max-height: none; }
html[data-ui] .video-info p .video-description-copy {
  display: -webkit-box;
  overflow: hidden;
  color: inherit;
  font: inherit;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
html[data-ui] .video-info p .video-tags {
  display: flex;
  gap: 12px;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  white-space: nowrap;
  pointer-events: auto;
  -webkit-overflow-scrolling: touch;
}
html[data-ui] .video-info .video-tags::-webkit-scrollbar { display: none; }
html[data-ui] .video-info .video-tag { flex: 0 0 auto; max-width: 100%; overflow: hidden; white-space: nowrap; }
html[data-ui="mobile"] .video-info :is(.creator-name-button, .video-tag) { min-height: 44px; }
html[data-ui="mobile"] .video-info .video-tag { min-width: 44px; }
@media (max-height: 500px) {
  html[data-ui] .video-info p .video-description-copy { -webkit-line-clamp: 1; }
}

/* Shared recovery stays above the player, with navigation available underneath. */
.playback-status{position:absolute;z-index:12;left:50%;top:43%;transform:translate(-50%,-50%);width:min(320px,calc(100% - 40px));padding:20px;border:1px solid #ffffff28;border-radius:16px;background:#17181eeb;backdrop-filter:blur(16px);color:#fff;text-align:center;box-shadow:0 12px 40px #0004}
.playback-status p{margin:0 0 16px;font-size:14px;line-height:1.6}
.playback-status>div{display:flex;gap:10px;justify-content:center}
.playback-status button{min-height:44px;padding:0 16px;border-radius:9px;background:#ffffff17;font-size:13px}
.playback-status button:last-child{background:var(--pink,#ff365d)}
.like-burst{position:absolute;z-index:13;pointer-events:none;color:#ff365d;font-size:88px;line-height:1;filter:drop-shadow(0 3px 14px #0003);animation:xuji-like-burst .65s ease-out both}
@keyframes xuji-like-burst{0%{opacity:0;transform:translate(-50%,-35%) scale(.3) rotate(-16deg)}25%{opacity:1;transform:translate(-50%,-50%) scale(1.15) rotate(-12deg)}60%{opacity:1;transform:translate(-50%,-60%) scale(1) rotate(-12deg)}100%{opacity:0;transform:translate(-50%,-105%) scale(1.2) rotate(-8deg)}}
@media(prefers-reduced-motion:reduce){.like-burst{animation:none;transform:translate(-50%,-50%)}}
