:root {
  --trends-ink: #10162f;
  --trends-muted: #56617f;
  --trends-line: #e4e7f1;
  --trends-violet: #6630e8;
  --trends-violet-soft: #f5f1ff;
  --trends-green: #18ad68;
  --trends-coral: #ff3157;
  --trends-orange: #ff9f34;
}

* { box-sizing: border-box; }
html { background: #fff; }
body.trends-body { min-width: 320px; margin: 0; background: #fff; color: var(--trends-ink); font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
.trends-body > main { min-height: calc(100vh - 72px); }
.trends-page { display: grid; grid-template-columns: clamp(292px, 20vw, 360px) minmax(0, 1fr); min-height: calc(100vh - 72px); }

.trends-sidebar { min-width: 0; padding: 31px 31px 40px 43px; border-right: 1px solid var(--trends-line); background: #fff; }
.trends-period-nav { display: grid; gap: 2px; padding-bottom: 30px; }
.trends-period-nav a { display: flex; min-height: 52px; align-items: center; gap: 17px; border: 1px solid transparent; border-radius: 7px; padding: 0 11px; color: #192141; font-size: 15px; font-weight: 600; transition: background .16s ease, border-color .16s ease, color .16s ease; }
.trends-period-nav a:hover { background: #faf9ff; color: var(--trends-violet); }
.trends-period-nav a[aria-current="page"] { border-color: #d9cbff; background: linear-gradient(100deg, #f4efff, #fbf9ff); color: var(--trends-violet); }
.trends-period-nav svg { width: 20px; height: 20px; flex: 0 0 20px; fill: none; stroke: #566180; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.trends-period-nav a[aria-current="page"] svg { stroke: currentColor; }

.trends-categories { border-bottom: 1px solid var(--trends-line); padding: 0 4px 25px; }
.trends-categories h2 { margin: 0; border-bottom: 1px solid var(--trends-line); padding: 0 0 13px; color: #18203e; font: inherit; font-size: 14px; font-weight: 750; }
.trends-categories ul { display: grid; gap: 3px; margin: 14px 0 13px; padding: 0; list-style: none; }
.trends-categories li a { display: grid; min-height: 35px; grid-template-columns: 19px minmax(0, 1fr) auto; align-items: center; gap: 9px; color: #283150; font-size: 13px; }
.trends-categories li a:hover span, .trends-category-all:hover { color: var(--trends-violet); }
.trends-categories li svg { width: 18px; height: 18px; fill: none; stroke: #596687; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.trends-categories li strong { color: #5a6584; font-weight: 500; font-variant-numeric: tabular-nums; }
.trends-category-all { color: var(--trends-violet); font-size: 13px; font-weight: 650; }

.trends-maker-card { margin: 27px 2px 0; border-radius: 10px; padding: 21px 18px 18px; background: linear-gradient(145deg, #f7f2ff, #fff8fb); }
.trends-maker-title { display: flex; align-items: center; gap: 13px; color: #202847; font-size: 13px; }
.trends-maker-title > span { display: grid; width: 34px; height: 34px; flex: 0 0 34px; place-items: center; border-radius: 10px; background: #fff; box-shadow: 0 5px 16px rgb(62 37 132 / 10%); }
.trends-maker-title svg { width: 25px; height: 25px; fill: none; stroke: #ff702a; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.trends-maker-card p { margin: 8px 2px 17px 47px; color: #59637e; font-size: 12px; line-height: 1.55; }
.trends-maker-card > a { display: grid; min-height: 40px; place-items: center; border: 1px solid #8e5ff2; border-radius: 6px; background: rgb(255 255 255 / 72%); color: var(--trends-violet); font-size: 12px; font-weight: 700; }

.trends-content { min-width: 0; padding: 24px 10px 30px 43px; }
.trends-breadcrumb { display: flex; align-items: center; gap: 8px; color: #5e6785; font-size: 12px; line-height: 1.4; }
.trends-breadcrumb a { color: inherit; }
.trends-breadcrumb span { color: #a0a7ba; font-size: 18px; line-height: .8; }
.trends-breadcrumb strong { color: var(--trends-violet); font-weight: 600; }

.trends-header { display: flex; min-height: 101px; align-items: flex-start; justify-content: space-between; gap: 28px; padding-top: 15px; }
.trends-heading { display: flex; align-items: flex-start; gap: 16px; }
.trends-heading > img { width: 34px; height: 41px; flex: 0 0 34px; object-fit: contain; transform: translateY(-3px); }
.trends-heading h1 { margin: 0; color: #0b112b; font-size: clamp(28px, 2.1vw, 34px); font-weight: 780; line-height: 1.08; letter-spacing: -.04em; }
.trends-heading p { margin: 9px 0 0; color: #505b7c; font-size: 13px; }
.trends-header form { flex: 0 0 auto; }
.trends-header select { width: 225px; height: 47px; border: 1px solid #dfe3ee; border-radius: 8px; padding: 0 42px 0 16px; background: #fff; color: #33405f; font: inherit; font-size: 13px; font-weight: 600; box-shadow: 0 3px 10px rgb(31 36 76 / 3%); cursor: pointer; }
.trends-header select:focus-visible { border-color: #8e66ef; outline: 3px solid rgb(104 48 232 / 15%); }

.trends-ranking { overflow: hidden; border: 1px solid #dfe3ed; border-radius: 10px; background: #fff; }
.trend-row { display: grid; min-height: 133px; grid-template-columns: 114px 92px minmax(250px, 457px) minmax(180px, 1fr) minmax(150px, 190px) 64px; align-items: center; gap: 18px; padding: 16px 18px 16px 28px; }
.trend-row + .trend-row { border-top: 1px solid var(--trends-line); }
.trend-rank { display: grid; width: 58px; justify-items: center; gap: 11px; margin-left: 10px; }
.trend-rank strong { color: #0d1430; font-size: 25px; font-weight: 750; line-height: 1; font-variant-numeric: tabular-nums; }
.trend-rank span { color: var(--trends-green); font-size: 13px; font-weight: 750; line-height: 1; white-space: nowrap; }
.trend-rank span.is-down { color: var(--trends-coral); }

.trend-logo { display: grid; width: 84px; height: 84px; place-items: center; overflow: hidden; border: 1px solid #ececf3; border-radius: 18px; padding: 4px; background: #fff; box-shadow: 0 5px 12px rgb(31 34 74 / 8%); }
.trend-logo img { width: 100%; height: 100%; border-radius: 14px; object-fit: contain; }
.trend-logo > span { display: grid; width: 100%; height: 100%; place-items: center; border-radius: 14px; background: linear-gradient(135deg, #7546ef, #3f16ba); color: #fff; font-size: 30px; font-weight: 800; }

.trend-copy { min-width: 0; align-self: center; }
.trend-copy h2 { display: flex; align-items: center; gap: 7px; margin: 0 0 4px; font: inherit; }
.trend-copy h2 a { min-width: 0; overflow: hidden; color: #111730; font-size: 18px; font-weight: 750; line-height: 1.15; text-overflow: ellipsis; white-space: nowrap; }
.trend-copy h2 svg { width: 18px; height: 18px; flex: 0 0 18px; fill: var(--trends-violet); }
.trend-copy h2 svg path { fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.trend-category { display: inline-block; margin-bottom: 5px; color: var(--trends-violet); font-size: 13px; font-weight: 650; }
.trend-copy p { display: -webkit-box; overflow: hidden; max-width: 480px; margin: 0; color: #56617d; font-size: 13px; line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }

.trend-meta { align-self: center; }
.trend-meta p { display: flex; align-items: center; gap: 7px; margin: 0 0 11px; color: #252e4f; font-size: 13px; }
.trend-meta svg { width: 19px; height: 19px; fill: var(--trends-orange); }
.trend-meta strong { font-weight: 650; }
.trend-meta p span { color: #4e5877; }
.trend-meta small { color: #4f5a79; font-size: 13px; }

.trend-chart { width: 100%; height: 72px; overflow: visible; color: #4f86f7; }
.trend-chart-grid { fill: none; stroke: #e5e8ed; stroke-width: .7; vector-effect: non-scaling-stroke; }
.trend-chart-line { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }

.trend-action { display: grid; place-items: center; }
.trend-action form { margin: 0; }
.trend-action a, .trend-action button { display: grid; width: 49px; height: 49px; place-items: center; border: 1px solid #e1e4ef; border-radius: 10px; padding: 0; background: #fff; color: var(--trends-violet); box-shadow: 0 3px 10px rgb(28 32 72 / 4%); transition: border-color .16s ease, background .16s ease, transform .16s ease; }
.trend-action a:hover, .trend-action button:hover { border-color: #bda8f4; background: #faf8ff; transform: translateY(-1px); }
.trend-action svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.trend-action [aria-pressed="true"] svg { fill: currentColor; }

.trends-empty { display: grid; min-height: 440px; place-items: center; align-content: center; border: 1px solid var(--trends-line); border-radius: 10px; padding: 40px; text-align: center; }
.trends-empty > span { font-size: 44px; }
.trends-empty h2 { margin: 10px 0 5px; font-size: 22px; }
.trends-empty p { margin: 0; color: var(--trends-muted); }

@media (max-width: 1280px) {
  .trends-content { padding-right: 26px; padding-left: 30px; }
  .trend-row { grid-template-columns: 50px 78px minmax(220px, 1fr) 155px 155px 54px; gap: 13px; padding-right: 12px; padding-left: 18px; }
  .trend-rank { width: auto; margin-left: 0; }
  .trend-logo { width: 74px; height: 74px; border-radius: 16px; }
  .trend-meta { font-size: 12px; }
}

@media (max-width: 1050px) {
  .trends-page { grid-template-columns: 245px minmax(0, 1fr); }
  .trends-sidebar { padding: 24px 18px; }
  .trend-row { grid-template-columns: 48px 74px minmax(210px, 1fr) 145px 54px; }
  .trend-chart { display: none; }
  .trends-maker-card p { margin-left: 0; }
}

@media (max-width: 820px) {
  .trends-page { display: block; }
  .trends-sidebar { border-right: 0; border-bottom: 1px solid var(--trends-line); padding: 14px 18px; }
  .trends-period-nav { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; padding: 0; }
  .trends-period-nav a { min-height: 44px; justify-content: center; gap: 7px; padding: 0 8px; font-size: 12px; }
  .trends-period-nav svg { width: 17px; height: 17px; flex-basis: 17px; }
  .trends-categories, .trends-maker-card { display: none; }
  .trends-content { padding: 20px 18px 30px; }
  .trends-header { min-height: 105px; }
  .trends-header select { width: 165px; }
  .trend-row { grid-template-columns: 42px 68px minmax(0, 1fr) 50px; min-height: 116px; }
  .trend-meta { display: none; }
  .trend-logo { width: 66px; height: 66px; }
}

@media (max-width: 600px) {
  .trends-sidebar { overflow: visible; padding: 10px; }
  .trends-period-nav { width: auto; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trends-period-nav a { font-size: 11px; }
  .trends-content { padding: 17px 10px 25px; }
  .trends-header { min-height: 145px; flex-direction: column; gap: 13px; padding: 13px 4px 18px; }
  .trends-heading { gap: 10px; }
  .trends-heading > img { width: 32px; height: 39px; flex-basis: 32px; transform: translateY(-2px); }
  .trends-heading h1 { font-size: 27px; }
  .trends-heading p { font-size: 12px; }
  .trends-header form, .trends-header select { width: 100%; }
  .trend-row { grid-template-columns: 33px 58px minmax(0, 1fr) 42px; gap: 9px; min-height: 105px; padding: 12px 8px; }
  .trend-rank strong { font-size: 20px; }
  .trend-rank span { font-size: 10px; }
  .trend-logo { width: 56px; height: 56px; border-radius: 13px; }
  .trend-logo img, .trend-logo > span { border-radius: 10px; }
  .trend-copy h2 { margin-bottom: 3px; }
  .trend-copy h2 a { font-size: 15px; }
  .trend-copy h2 svg { width: 15px; height: 15px; flex-basis: 15px; }
  .trend-category { margin-bottom: 2px; font-size: 11px; }
  .trend-copy p { font-size: 11px; -webkit-line-clamp: 1; }
  .trend-action a, .trend-action button { width: 39px; height: 39px; border-radius: 8px; }
  .trend-action svg { width: 20px; height: 20px; }
}
