@media (max-width: 520px) {
  .brand span {
    max-width: 126px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .header-action {
    padding: 0 12px;
  }

  .hero-actions,
  .button {
    width: 100%;
  }

  .poet-grid,
  .shortcut-grid,
  .media-card {
    grid-template-columns: 1fr;
  }

  body.is-home-route .poet-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.is-home-route .poet-tile {
    min-height: 78px;
  }

  .music-screen {
    padding: 14px 10px 18px;
  }

  body.is-music-surface.has-mini-player {
    padding-bottom: 226px;
  }

  .android-music-header {
    grid-template-columns: 46px minmax(0, 1fr) 46px;
    gap: 8px;
  }

  .android-icon-btn {
    width: 46px;
    height: 46px;
    border-radius: 15px;
  }

  .android-title-pill {
    min-height: 46px;
    border-radius: 15px;
    padding: 6px 10px;
  }

  .android-title-pill strong {
    font-size: 15px;
  }

  .android-title-pill-simple strong {
    font-size: 20px;
  }

  .android-title-pill em {
    display: none;
  }

  .android-header-search {
    grid-template-columns: 1fr;
  }

  .music-view-row {
    justify-content: stretch;
  }

  .music-view-toggle {
    width: 100%;
  }

  .music-view-toggle a {
    flex: 1;
  }

  .catalog-list-card {
    position: relative;
    grid-template-columns: 78px minmax(0, 1fr) 42px;
    grid-template-areas: "cover main side";
    gap: 10px;
    min-height: 132px;
    padding: 14px 10px;
    border-radius: 16px;
    background: #111116;
  }

  .catalog-list-card.active {
    border-color: rgba(123, 92, 255, 0.92);
    background: #151422;
    box-shadow: inset 0 0 0 1px rgba(123, 92, 255, 0.28);
  }

  .catalog-cover-col {
    grid-area: cover;
    align-self: start;
  }

  .catalog-card-main {
    grid-area: main;
    padding-top: 0;
  }

  .catalog-metric-stack {
    grid-area: side;
    align-self: start;
    gap: 7px;
    justify-items: center;
  }

  .catalog-card-info-row {
    flex-wrap: wrap;
    gap: 6px;
  }

  .catalog-chip-row-inline {
    display: none;
  }

  .catalog-chip-row-mobile {
    display: flex;
    margin-top: 8px;
  }

  .catalog-inline-player {
    display: none;
  }

  .catalog-inline-play {
    width: 38px;
    height: 38px;
  }

  .catalog-cover-btn {
    width: 70px;
    height: 70px;
    border-radius: 13px;
  }

  .catalog-year {
    max-width: 70px;
    font-size: 11px;
  }

  .catalog-card-title {
    margin-bottom: 6px;
    font-size: 18px;
    line-height: 1.12;
  }

  .catalog-genre-row {
    font-size: 13px;
  }

  .catalog-attribution {
    min-height: 34px;
    margin-bottom: 0;
    font-size: 12px;
    line-height: 1.38;
  }

  .catalog-card-actions {
    grid-area: side;
    align-self: end;
    display: none;
    justify-content: center;
    margin: 0;
  }

  .catalog-cover-col { position: relative; }
  .catalog-card-menu {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 9px;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    font-size: 20px;
    line-height: 1;
    letter-spacing: 1px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
  }

  .catalog-card-icon {
    width: 36px;
    height: 36px;
  }

  .catalog-metric-btn {
    min-height: 22px;
    border: 0;
    padding: 0;
    background: transparent;
    font-size: 12px;
  }

  .catalog-metric-btn:hover {
    border-color: transparent;
    background: transparent;
  }

  .music-swipe-host,
  .music-swipe-shell,
  .music-swipe-card {
    min-height: 0;
  }

  .music-swipe-shell {
    padding-right: 0;
    margin-bottom: 112px;
  }

  .music-swipe-cover,
  .music-swipe-cover img {
    min-height: 210px;
  }

  .music-swipe-cover img {
    height: min(28vh, 220px);
  }

  .music-swipe-body h2 {
    font-size: 21px;
  }

  .music-swipe-play {
    width: 70px;
    height: 70px;
  }

  .music-swipe-play.playing {
    width: 62px;
    height: 62px;
  }

  .music-swipe-actions-row {
    grid-template-columns: 1fr;
  }

  .music-swipe-actions-row .catalog-card-actions {
    justify-content: flex-start;
  }

  .music-swipe-nav button {
    width: 42px;
    height: 48px;
    border-radius: 14px;
  }

  .music-swipe-nav {
    right: 10px;
    z-index: 2;
  }

  .search-form,
  .media-actions,
  .result-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .media-cover img {
    height: 210px;
  }

  .detail-cover img,
  .detail-cover .cover-placeholder {
    min-height: 260px;
  }

  .poem-text {
    font-size: 16px;
  }

  .poet-tile {
    min-height: 112px;
  }

  .tile-card {
    flex-basis: 136px;
  }

  .bottom-nav {
    bottom: 8px;
    width: calc(100% - 14px);
    min-height: 88px;
    padding: 8px 6px 10px;
    border-radius: 20px;
  }

  .bottom-nav a,
  .bottom-nav button {
    grid-template-rows: 34px auto;
    font-size: 11px;
  }

  .bottom-icon,
  .bottom-create-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    font-size: 20px;
  }

  .music-menu {
    bottom: 118px;
    width: calc(100% - 14px);
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px;
    min-height: 72px;
    padding: 7px;
  }

  .music-menu a {
    min-height: 56px;
    padding: 6px 2px;
  }

  .music-menu span {
    font-size: 20px;
  }

  .music-menu strong {
    font-size: 10px;
  }

  .music-menu::after {
    right: 29%;
  }

  .mini-player {
    left: 0;
    right: 0;
    bottom: 88px;
    width: 100%;
    padding: 8px 14px 10px;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
    background: rgba(12, 12, 18, 0.98);
    box-shadow: 0 -12px 36px rgba(0, 0, 0, 0.5);
    transform: none;
  }

  .mini-player-row {
    grid-template-columns: 44px minmax(0, 1fr) 40px 42px 40px 40px;
    gap: 8px;
  }

  .mini-player img {
    width: 44px;
    height: 44px;
    border-radius: 8px;
  }

  .mini-player-info {
    min-width: 0;
  }

  .mini-player-close {
    display: inline-flex;
  }

  .mini-player-action.mini-player-expand {
    display: none;
  }

  .mini-player-action {
    display: inline-flex;
    width: 40px;
    height: 40px;
    border-radius: 999px;
  }

  .mini-player-toggle {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    color: #fff;
    background: rgba(255, 138, 61, 0.18);
    box-shadow: inset 0 0 0 2px rgba(255, 138, 61, 0.92), 0 0 22px rgba(255, 138, 61, 0.34);
    font-size: 18px;
  }

  .mini-player-progress {
    grid-template-columns: 1fr auto;
    grid-template-areas: "seek seek" "cur dur";
    gap: 2px 8px;
    margin-top: 7px;
  }

  .mini-player-time {
    display: block;
    font-size: 11px;
  }

  #mini-player-seek {
    grid-area: seek;
    height: 12px;
  }

  #mini-player-current {
    grid-area: cur;
    text-align: left;
  }

  #mini-player-duration {
    grid-area: dur;
    text-align: right;
  }

  .music-menu-open .mini-player {
    transform: translateY(10px);
  }

  .hero-stats strong {
    font-size: 25px;
  }

  h1 {
    font-size: 52px;
  }

  h2 {
    font-size: 34px;
  }
}

/* ─── Flow «Создать» (web) ─── */
.button-block {
  display: flex;
  width: 100%;
}

.create-layout {
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.create-poem-preview,
.create-advanced {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  overflow: hidden;
}

.create-poem-preview > summary,
.create-advanced > summary {
  cursor: pointer;
  padding: 16px 20px;
  font-weight: 850;
  color: var(--text);
  list-style: none;
}

.create-poem-preview > summary::-webkit-details-marker,
.create-advanced > summary::-webkit-details-marker {
  display: none;
}

.create-poem-preview > summary::after,
.create-advanced > summary::after {
  content: "▾";
  float: right;
  color: var(--muted);
}

.create-poem-preview[open] .poem-text {
  padding: 0 20px 18px;
  color: var(--muted);
  line-height: 1.7;
  max-height: 320px;
  overflow: auto;
}

.create-block .section-heading {
  display: block;
  grid-template-columns: 1fr;
  gap: 0;
  margin-bottom: 14px;
}

.create-genre-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.create-genre-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-height: 104px;
  padding: 14px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.1s ease;
}

.create-genre-tile:hover {
  border-color: rgba(255, 122, 69, 0.45);
  transform: translateY(-1px);
}

.create-genre-tile.selected {
  border-color: var(--tile-color, var(--accent));
  background: color-mix(in srgb, var(--tile-color, var(--accent)) 18%, var(--surface));
  box-shadow: 0 0 0 1px var(--tile-color, var(--accent)) inset;
}

.create-genre-emoji {
  font-size: 24px;
}

.create-genre-tile strong {
  font-size: 15px;
}

.create-genre-tile small {
  color: var(--muted);
  font-weight: 600;
  line-height: 1.35;
}

.create-style-note {
  display: block;
  margin-top: 16px;
}

.create-style-note > span,
.create-control-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-weight: 800;
  font-size: 14px;
}

.create-style-note input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
  font-size: 15px;
}

.create-advanced-body {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 4px 20px 20px;
}

.segmented.inline {
  margin-top: 0;
}

.segmented.inline button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.045);
  font-weight: 850;
}

.segmented.inline button.active {
  border-color: rgba(255, 122, 69, 0.55);
  color: var(--text);
  background: rgba(255, 122, 69, 0.12);
}

.create-toggle,
.create-oferta {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
}

.create-toggle {
  cursor: pointer;
}

.create-oferta {
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.create-toggle input {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
  margin-top: 1px;
}

.create-oferta-box {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  border: 2px solid rgba(255, 255, 255, 0.34);
  border-radius: 4px;
  color: #141014;
  background: rgba(255, 255, 255, 0.08);
}

.create-oferta.accepted .create-oferta-box {
  border-color: var(--accent);
  background: var(--accent);
}

.create-oferta-box svg {
  width: 15px;
  height: 15px;
}

.create-oferta-link {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.create-oferta:hover .create-oferta-link {
  color: #ffb27a;
}

.adaptation-track {
  position: relative;
  padding-top: 8px;
}

.adaptation-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 4px;
  outline: none;
  background: linear-gradient(
    to right,
    rgba(125, 211, 252, 0.38) 0 var(--lock, 0%),
    var(--accent) var(--lock, 0%) var(--val, 0%),
    rgba(255, 255, 255, 0.12) var(--val, 0%) 100%
  );
}

.adaptation-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--accent);
  cursor: pointer;
}

.adaptation-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--accent);
  cursor: pointer;
}

.adaptation-lockpin {
  position: absolute;
  top: -3px;
  transform: translateX(-50%);
  font-size: 12px;
  color: var(--teal);
  pointer-events: none;
}

.create-control-label em {
  color: var(--accent);
  font-style: normal;
}

.adaptation-copy {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.adaptation-copy strong {
  color: var(--text);
}

.adaptation-copy span {
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
}

.adaptation-safety {
  color: var(--teal);
}

.create-foot-note {
  color: var(--muted);
  font-size: 13px;
  margin-top: -8px;
}

.create-foot-note.notice-strong {
  color: var(--accent);
  font-weight: 800;
}

.create-notice {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  padding: 16px 18px;
  border: 1px solid rgba(125, 211, 252, 0.35);
  border-radius: 12px;
  background: rgba(125, 211, 252, 0.08);
}

.create-notice.warn {
  border-color: rgba(252, 165, 165, 0.5);
  background: rgba(252, 165, 165, 0.1);
}

.create-notice-ico {
  font-size: 20px;
  line-height: 1.2;
}

.create-notice-text strong {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
}

.create-notice-text p {
  color: var(--muted);
  line-height: 1.6;
  font-size: 14px;
}

.create-immediate {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
}

.create-immediate input {
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
}

.create-control-hint {
  margin: -2px 0 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.create-adaptation {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px;
  background: var(--surface);
}

.adaptation-scale {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.adaptation-lock {
  color: var(--teal);
}

.create-character-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 10px;
}

.create-character-head strong {
  color: var(--text);
}

.create-character-head span {
  color: var(--muted);
  font-size: 13px;
}

.character-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

