.editorial-app {
  --ed-ink: #181a20;
  --ed-muted: #707a8a;
  --ed-line: #f2f2f2;
  --ed-soft: #f5f5f5;
  --ed-yellow: #fcd535;
  --ed-gold: #b38400;
  --ed-green: #0ca678;
  position: relative;
  min-height: 100%;
  color: var(--ed-ink);
  background: #fff;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.45;
  text-align: start;
}

.editorial-app :is(button, input, textarea, select) {
  font: inherit;
  box-sizing: border-box;
}

.editorial-app button {
  appearance: none;
  border: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
}

.editorial-app button:focus-visible,
.editorial-app :is(input, textarea, select):focus-visible {
  outline: 2px solid #aa7c00;
  outline-offset: 2px;
}

.editorial-app :is(h1, h2, p) { margin: 0; }
.editorial-app button svg { flex: 0 0 auto; }
.editorial-app .ed-icon-button { display: inline-grid; width: 34px; height: 40px; padding: 0; place-items: center; }
.editorial-app .ed-muted { color: var(--ed-muted); }
.editorial-app .ed-ticker { color: var(--ed-gold); font-weight: 600; }
.editorial-app .ed-active { color: var(--ed-gold); }

.editorial-app .ed-image {
  display: block;
  width: min(100%, var(--image-width, 100%));
  aspect-ratio: var(--image-ratio, 16/9);
  background-image: var(--image);
  background-position: var(--image-pos);
  background-repeat: no-repeat;
  background-size: var(--image-size);
}

.editorial-app .ed-avatar {
  flex: 0 0 auto;
  display: grid;
  width: 36px;
  height: 36px;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 50%;
  overflow: hidden;
}

.editorial-app .ed-avatar-text {
  background: #fff3c5;
  color: #6f5200;
  font-size: 12px;
  font-weight: 700;
}

.editorial-app .ed-feed-toolbar {
  position: sticky;
  z-index: 2;
  top: 0;
  display: flex;
  width: 100%;
  align-items: center;
  background: #fff;
}

.editorial-app .ed-tab-scroll {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 47px;
  align-items: stretch;
  gap: 16px;
  overflow-x: auto;
  padding-inline: 16px 8px;
  scrollbar-width: none;
}

.editorial-app .ed-tab-scroll::-webkit-scrollbar { display: none; }

.editorial-app .ed-tab-scroll button {
  position: relative;
  flex: 0 0 auto;
  padding: 0 0 4px;
  white-space: nowrap;
  color: #626262;
}

.editorial-app .ed-tab-scroll button[aria-pressed="true"] {
  color: #080808;
  font-weight: 600;
}

.editorial-app .ed-tab-scroll button[aria-pressed="true"]::after {
  position: absolute;
  right: calc(50% - 8px);
  bottom: 4px;
  width: 16px;
  height: 3px;
  border-radius: 2px;
  background: #f3d349;
  content: '';
}

.editorial-app .ed-menu-button {
  position: relative;
  flex: 0 0 34px;
  height: 47px;
  margin-inline-end: 8px;
  color: #797d85;
}

.editorial-app .ed-search-row {
  display: flex;
  height: 42px;
  align-items: center;
  gap: 8px;
  margin: 8px 16px;
  padding: 0 11px;
  border-radius: 8px;
  background: var(--ed-soft);
  color: var(--ed-muted);
}

.editorial-app .ed-search-row input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--ed-ink);
  background: transparent;
}

.editorial-app .ed-feed-card {
  display: flex;
  align-items: start;
  gap: 8px;
  border-bottom: 1px solid var(--ed-line);
  padding: 11px 16px 8px;
}

.editorial-app .ed-card-main { flex: 1 1 auto; min-width: 0; }

.editorial-app .ed-card-byline {
  display: flex;
  min-height: 22px;
  align-items: center;
  gap: 7px;
  color: #787878;
  font-size: 12px;
}

.editorial-app .ed-card-byline strong { color: #111; font-size: 14px; font-weight: 600; }
.editorial-app .ed-card-byline .ed-icon-button { width: 25px; height: 24px; margin: -3px -3px 0 auto; color: #8b8b8b; }

.editorial-app .ed-feed-read {
  display: block;
  width: 100%;
  padding: 0;
  color: #161616;
  font-size: 16px;
  line-height: 1.38;
  text-align: start;
}

.editorial-app .ed-feed-read > strong { display: block; margin: 2px 0 4px; font-weight: 650; }
.editorial-app .ed-excerpt { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 5; white-space: pre-line; overflow-wrap: anywhere; }
.editorial-app .ed-card-cover { margin-top: 8px; border-radius: 10px; }
.editorial-app .ed-uploaded-cover { display: block; max-width: 100%; object-fit: cover; }
.editorial-app .ed-uploaded-cover.ed-card-cover { width: min(212px, 100%); max-height: 182px; }

.editorial-app .ed-coins { display: flex; gap: 8px; margin-top: 8px; font-size: 12px; }
.editorial-app .ed-coins span { padding: 3px 8px; border-radius: 4px; background: #f8f8f8; }
.editorial-app .ed-coins em { color: var(--ed-green); font-style: normal; }

.editorial-app .ed-actions { display: flex; justify-content: space-between; gap: 5px; margin-top: 4px; }

.editorial-app .ed-actions button {
  display: flex;
  flex: 0 0 auto;
  min-width: 36px;
  min-height: 36px;
  align-items: center;
  gap: 4px;
  justify-content: flex-start;
  padding: 0;
  font-size: 12px;
}

.editorial-app .ed-fab {
  position: sticky;
  z-index: 3;
  bottom: 15px;
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  margin: -55px 16px 15px auto;
  padding: 0;
  border-radius: 15px;
  background: var(--ed-yellow);
  box-shadow: 0 3px 8px #181a2021;
}

.editorial-app [data-role="feed-items"] { min-height: min(620px, 71vh); padding-bottom: 52px; }

.editorial-app .ed-news-timeline {
  position: relative;
  margin-inline: 25px 15px;
  padding: 8px 0 10px;
}

.editorial-app .ed-news-timeline::before {
  position: absolute;
  top: 25px;
  bottom: 30px;
  left: 0;
  border-left: 1px dashed #e7e7e7;
  content: '';
}

.editorial-app .ed-news-date { display: block; position: relative; margin: 0 0 7px 10px; color: #101010; }
.editorial-app .ed-news-date::before,
.editorial-app .ed-news-row::before { position: absolute; top: .56em; width: 5px; height: 5px; rotate: 45deg; content: ''; }
.editorial-app .ed-news-date::before { left: -12px; background: #161616; }

.editorial-app .ed-news-row {
  display: flex;
  position: relative;
  width: 100%;
  flex-direction: column;
  gap: 4px;
  padding: 12px 0 11px 15px;
  color: #151515;
  text-align: start;
}

.editorial-app .ed-news-row::before { top: 20px; left: -2px; width: 4px; height: 4px; background: #bcbcbc; }
.editorial-app .ed-news-row small,
.editorial-app .ed-announcement small { color: #707070; font-size: 12px; font-weight: 400; }
.editorial-app .ed-news-row .ed-coins { margin-top: 1px; }
.editorial-app .ed-news-topics { display: flex; overflow-x: auto; gap: 6px; padding: 5px 14px 10px; scrollbar-width: none; }
.editorial-app .ed-news-topics button { flex: 0 0 auto; border-radius: 5px; padding: 6px 8px; color: #646464; font-size: 13px; }
.editorial-app .ed-news-topics button[aria-pressed="true"] { color: #131313; background: #f6f6f6; }

.editorial-app .ed-announcement {
  display: flex;
  width: 100%;
  align-items: flex-start;
  gap: 8px;
  border-bottom: 1px solid var(--ed-line);
  padding: 15px 16px;
  text-align: start;
}

.editorial-app .ed-announcement span { display: grid; gap: 6px; }
.editorial-app .ed-announcement svg { margin-top: 2px; }
.editorial-app .ed-opening-reference { margin-top: 8px; border-radius: 6px; padding: 7px 10px; background: var(--ed-soft); font-size: 13px; }

.editorial-app .ed-campaign { display: grid; gap: 19px; padding: 12px 15px 6px; }
.editorial-app .ed-campaign-hero { overflow: hidden; border: 1px solid #eee4af; border-radius: 16px; }
.editorial-app .ed-campaign-hero > div { border-radius: 14px 14px 0 0; padding: 17px 16px; background: #fcf8e7; }
.editorial-app .ed-campaign-hero h2 { margin-bottom: 4px; font-size: 22px; font-weight: 750; }
.editorial-app .ed-campaign-illustration { width: 100%; }
.editorial-app .ed-campaign-meta { display: flex; align-items: end; justify-content: space-between; gap: 8px; margin-top: 26px; color: #6c6c6c; }
.editorial-app .ed-campaign-meta button { min-width: 74px; }

.editorial-app .ed-campaign-card {
  display: flex;
  min-height: 108px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid #f0f0f0;
  border-radius: 16px;
  padding: 13px 15px;
  color: #101010;
  text-align: start;
}

.editorial-app .ed-campaign-card strong { display: block; margin-bottom: 2px; font-size: 19px; font-weight: 750; }
.editorial-app .ed-campaign-card .ed-image { flex: 0 0 73px; }

.editorial-app .ed-app-header {
  display: grid;
  min-height: 48px;
  grid-template-columns: minmax(38px, 1fr) minmax(0, 3fr) minmax(38px, 1fr);
  align-items: center;
  padding: 0 12px;
  background: #fff;
}

.editorial-app .ed-app-header > button:first-child { justify-self: start; }
.editorial-app .ed-app-header h1 { justify-self: center; font-size: 17px; font-weight: 650; text-align: center; }
.editorial-app .ed-header-actions { display: flex; justify-content: end; }

.editorial-app .ed-article { padding: 9px 16px 20px; }
.editorial-app .ed-article-byline { display: flex; align-items: center; gap: 8px; }
.editorial-app .ed-article-byline > div { min-width: 0; }
.editorial-app .ed-article-byline strong { display: block; color: #111; font-size: 15px; }
.editorial-app .ed-article-byline small { display: block; color: #717171; font-size: 12px; }

.editorial-app .ed-article h2 {
  margin: 25px 0 17px;
  color: #0b0b0b;
  font-size: 24px;
  font-weight: 650;
  letter-spacing: -.45px;
  line-height: 1.23;
  overflow-wrap: anywhere;
}

.editorial-app .ed-article-cover { width: 100%; max-height: 280px; margin-bottom: 16px; border-radius: 10px; }
.editorial-app .ed-article-body { color: #151515; font-size: 16px; line-height: 1.58; overflow-wrap: anywhere; }
.editorial-app .ed-article-body p { margin: 0 0 17px; }
.editorial-app .ed-article-body ul { margin: 0 0 16px; padding-inline-start: 20px; }
.editorial-app .ed-article-body li { margin-bottom: 5px; padding-inline-start: 0; }

.editorial-app .ed-follow {
  align-self: center;
  flex: 0 0 auto;
  margin-inline-start: auto;
  padding: 5px 12px;
  border-radius: 5px;
  background: var(--ed-yellow);
  color: #161616;
  font-size: 13px;
  font-weight: 600;
}

.editorial-app .ed-follow[aria-pressed="true"] { background: #f0f0f0; }
.editorial-app .ed-comments { border-top: 1px solid var(--ed-line); padding: 16px 16px 25px; }
.editorial-app .ed-comments h2 { margin-bottom: 10px; font-size: 16px; }
.editorial-app .ed-comment { padding: 8px 0; border-bottom: 1px solid var(--ed-line); overflow-wrap: anywhere; }
.editorial-app .ed-comment p { margin-top: 3px; }

.editorial-app .ed-article-dock {
  position: sticky;
  z-index: 2;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 16px;
  border-top: 1px solid var(--ed-line);
  padding: 7px 15px 9px;
  background: #fff;
}

.editorial-app .ed-article-dock form {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  align-items: center;
  border-radius: 8px;
  padding-inline: 10px 3px;
  background: #f4f4f4;
}

.editorial-app .ed-article-dock form input {
  width: 100%;
  min-width: 0;
  height: 36px;
  border: 0;
  color: var(--ed-ink);
  background: transparent;
  font-size: 13px;
}

.editorial-app .ed-article-dock .ed-actions { flex: 0 0 auto; gap: clamp(5px, 2vw, 15px); margin: 0; }
.editorial-app .ed-article-dock .ed-actions button { min-width: 20px; flex-direction: column; justify-content: center; gap: 0; font-size: 11px; }
.editorial-app .ed-article-dock .ed-send { display: none; width: 28px; padding: 0; }
.editorial-app .ed-article-dock form:focus-within .ed-send { display: grid; place-items: center; }

.editorial-app .ed-center { padding: 9px 15px 56px; }
.editorial-app .ed-center h2,
.editorial-app .ed-extra h2 { margin-bottom: 13px; font-size: 16px; font-weight: 650; }
.editorial-app .ed-center-profile { padding-bottom: 31px; }
.editorial-app .ed-center-profile .ed-avatar { width: 48px; height: 48px; margin-bottom: 13px; }
.editorial-app .ed-center-profile h2 { margin: 0 0 5px; font-size: 18px; }
.editorial-app .ed-center-profile small,
.editorial-app .ed-center-profile p { color: #777; font-size: 12px; }
.editorial-app .ed-center-profile p { margin-top: 12px; }
.editorial-app .ed-center-profile p strong { color: #181a20; }

.editorial-app .ed-feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px 6px;
  margin: 18px -4px 32px;
}

.editorial-app .ed-feature-grid button {
  display: flex;
  min-width: 0;
  min-height: 72px;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 0 3px;
  font-size: 12px;
  line-height: 1.3;
}

.editorial-app .ed-feature-grid button span { display: grid; width: 48px; height: 48px; place-items: center; border: 1px solid #efefef; border-radius: 16px; background: #fafafa; }
.editorial-app .ed-creator-card { display: block; width: 100%; margin-bottom: 32px; padding: 0; }
.editorial-app .ed-creator-banner { width: 100%; border-radius: 11px; background-color: #121212; }
.editorial-app .ed-trend-tabs { margin-bottom: 7px; font-size: 13px; }
.editorial-app .ed-trend-tabs strong { display: inline-block; border-radius: 6px; padding: 6px 10px; background: #f4f4f4; }

.editorial-app .ed-trend {
  display: flex;
  width: 100%;
  min-height: 40px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--ed-line);
  padding: 8px 0;
  text-align: start;
}

.editorial-app .ed-content-tabs { flex: 0 0 auto; gap: 24px; }
.editorial-app .ed-status-tabs { display: flex; gap: 6px; min-height: 43px; align-items: center; padding-inline: 16px; }
.editorial-app .ed-status-tabs button { border-radius: 7px; padding: 5px 8px; color: #646464; font-size: 12px; }
.editorial-app .ed-status-tabs button:first-child { margin-inline-start: -8px; }
.editorial-app .ed-status-tabs button[aria-pressed="true"] { color: #111; background: #f5f5f5; font-weight: 650; }
.editorial-app [data-role="admin-items"] { min-height: min(600px, 70vh); padding-bottom: 55px; }

.editorial-app .ed-admin-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--ed-line);
  padding: 4px 16px;
}

.editorial-app .ed-admin-title { min-width: 0; padding: 12px 0; text-align: start; }
.editorial-app .ed-admin-title strong { display: block; overflow: hidden; color: #111; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.editorial-app .ed-admin-title small { display: block; margin-top: 8px; color: #777; font-size: 12px; }
.editorial-app .ed-empty { padding: 38px 12px; color: #777; font-size: 13px; text-align: center; }

.editorial-app[data-screen="editor"] { height: 100%; }

.editorial-app .ed-composer {
  display: flex;
  min-height: max(510px, 100%);
  flex-direction: column;
}

.editorial-app .ed-composer .ed-app-header { flex: 0 0 48px; }
.editorial-app .ed-composer .ed-publish { justify-self: end; }
.editorial-app .ed-publish { min-height: 33px; border-radius: 7px; padding: 6px 13px; color: #111; background: var(--ed-yellow); font-size: 14px; font-weight: 600; }
.editorial-app .ed-title-field { width: auto; min-height: 54px; margin: 0 16px; border: 0; border-bottom: 1px solid var(--ed-line); padding: 0; color: #171717; background: #fff; font-size: 23px; font-weight: 650; }
.editorial-app .ed-composer textarea { flex: 1 1 auto; min-height: 230px; max-height: 540px; margin: 0 16px; border: 0; padding: 13px 0; resize: vertical; color: #111; background: #fff; font-size: 16px; line-height: 1.58; }
.editorial-app .ed-composer :is(input, textarea)::placeholder { color: #858585; opacity: 1; }
.editorial-app .ed-composer-picture { width: min(210px, 100%); max-height: 145px; margin: 0 16px 8px; border-radius: 8px; }

.editorial-app .ed-composer-controls {
  display: flex;
  min-height: 47px;
  align-items: center;
  gap: 5px;
  border-block: 1px solid var(--ed-line);
  padding: 0 11px;
}

.editorial-app .ed-cover-button { position: relative; display: grid; width: 34px; min-height: 40px; place-items: center; cursor: pointer; }
.editorial-app .ed-cover-button input { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; }
.editorial-app .ed-cover-button:focus-within { outline: 2px solid #aa7c00; outline-offset: 2px; }
.editorial-app .ed-category-field { min-width: 0; margin-left: auto; }
.editorial-app .ed-category-field span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.editorial-app .ed-category-field select { max-width: 100%; border: 1px solid #eaeaea; border-radius: 6px; padding: 3px; color: #222; background: #fff; font-size: 12px; }
.editorial-app .ed-draft { flex: 0 0 auto; padding: 7px 8px; border-radius: 6px; background: #f5f5f5; font-size: 12px; font-weight: 600; }
.editorial-app .ed-composer-types { display: flex; min-height: 49px; justify-content: space-evenly; background: #f7f7f7; }
.editorial-app .ed-composer-types button { flex: 1 1 0; padding: 8px 10px; color: #696969; font-size: 16px; }
.editorial-app .ed-composer-types button[aria-pressed="true"] { color: #101010; font-weight: 650; }

.editorial-app .ed-extra { padding: 13px 16px 30px; }
.editorial-app .ed-extra > p { margin: 12px 0; }
.editorial-app .ed-metrics { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; margin-bottom: 22px; }
.editorial-app .ed-metrics div { display: grid; gap: 4px; padding: 12px; border-radius: 7px; background: #f5f5f5; }
.editorial-app .ed-metrics small { color: var(--ed-muted); }
.editorial-app .ed-metrics strong { font-size: 19px; }
.editorial-app .ed-task { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 0; }

.editorial-app .ed-scrim {
  position: fixed;
  z-index: 11;
  inset: 0;
  background: #181a2061;
}

.editorial-app .ed-sheet {
  position: fixed;
  z-index: 12;
  bottom: 0;
  left: 50%;
  width: min(100%, 480px);
  transform: translateX(-50%);
  border-radius: 15px 15px 0 0;
  padding: 6px 16px calc(15px + env(safe-area-inset-bottom));
  background: #fff;
  color: var(--ed-ink);
}

.editorial-app .ed-sheet-grab { width: 35px; height: 4px; margin: 0 auto 4px; border-radius: 2px; background: #e2e2e2; }
.editorial-app .ed-sheet header { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--ed-line); }
.editorial-app .ed-sheet > button { display: flex; width: 100%; min-height: 48px; align-items: center; gap: 9px; padding: 0 4px; text-align: start; }
.editorial-app .ed-sheet > button:is([data-action="delete"], [data-action="remove"], [data-action="discard"]) { color: #c1273b; }

.editorial-app .ed-notice {
  position: fixed;
  z-index: 14;
  top: max(60px, calc(env(safe-area-inset-top) + 12px));
  left: 50%;
  display: none;
  width: min(calc(100% - 32px), 448px);
  transform: translateX(-50%);
  border-radius: 11px;
  padding: 15px 18px;
  background: #fff;
  color: #202630;
  box-shadow: 0 5px 24px #181a2024;
  font-size: 14px;
  font-weight: 600;
}

.editorial-app .ed-notice.ed-visible { display: block; }

@media (min-width: 580px) {
  .editorial-app .ed-sheet {
    bottom: max(16px, calc((100dvh - 852px) / 2));
    width: 393px;
    border-radius: 15px 15px 25px 25px;
  }

  .editorial-app .ed-notice {
    top: max(76px, calc((100dvh - 852px) / 2 + 60px));
    width: 361px;
  }
}

@media (max-width: 345px) {
  .editorial-app .ed-tab-scroll { gap: 12px; }
  .editorial-app .ed-article-dock { gap: 9px; }
  .editorial-app .ed-composer-controls { gap: 1px; }
  .editorial-app .ed-composer-controls .ed-icon-button { width: 28px; }
}
