/* «Кімната Каті», фаза 3: «Стиліст», «Мої образи», карточка образа и лента карточек.
   Подключается после styles.css и кладёт правила в те же пласты: сырые значения только
   в tokens, внешний вид в components, раскладка экранов в screens. */

/* ========================================================================== tokens */
@layer tokens {
  :root {
    --st-col: 720px;                    /* колонка переписки на компьютере (d-stylist) */
    --st-card-peek: 40px;               /* сколько видно следующей карточки: 318 из 390 */
    --st-sheen: rgb(255 255 255 / .62); /* блик скелета ожидания */
    --st-bubble-max: 82%;
    --st-thumb: 56px;                   /* вещь в её реплике */
    --st-swap-w: 444px;                 /* лист замены справа на компьютере (d2-swap) */
    --st-dot: 6px;
    --st-dot-step: 12px;
    --st-dot-on: 18px;
  }
}

/* ========================================================================== components */
@layer components {
  /* ---------- коллаж образа: одна строка ячеек, вещь целиком в каждой ---------- */
  .k-lcol {
    position: relative;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    align-items: end;
    gap: var(--sp-1);
    padding: 7% 4% 5%;
    aspect-ratio: var(--lcol-ratio, 1.8);
    border-radius: var(--r-card-l);
    background: var(--surface-2);
    overflow: hidden;
  }
  .k-lcol[data-n="1"] { --lcol-ratio: 1.8; padding-inline: 30%; }
  .k-lcol[data-n="4"] { --lcol-ratio: 2.1; }
  .k-lcol[data-n="5"], .k-lcol[data-n="6"] { --lcol-ratio: 2.4; }
  .k-lcol__slot {
    position: relative;
    display: block;
    height: 100%;
    min-width: 0;
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: var(--r-photo-s);
    background: none;
    color: inherit;
  }
  .k-lcol__slot--s { height: 64%; }
  .k-lcol__slot > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: 50% 50%;
    -webkit-user-drag: none;
  }
  .k-lcol__slot--s > img { object-position: 50% 100%; }
  button.k-lcol__slot { min-height: 0; min-width: 0; }
  button.k-lcol__slot.is-sel { outline: 2px solid var(--acc); outline-offset: 2px; }
  .k-lcol__count { position: absolute; left: var(--sp-3); top: var(--sp-3); }
  .k-lcol__anchor { position: absolute; right: var(--sp-3); top: var(--sp-3); }

  /* ---------- карточка образа (m-stylist) ---------- */
  .k-look {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 10px;
    border-radius: var(--r-card-xl);
    background: var(--surface);
    box-shadow: inset 0 0 0 1px var(--line);
    --tr-x: opacity var(--dur-state) var(--ease-fade);
  }
  .k-look.is-editing { box-shadow: inset 0 0 0 2px var(--acc); }
  .k-look__col { position: relative; }
  .k-look.is-rejected .k-lcol__slot > img { opacity: .45; }
  .k-look__body { display: flex; flex-direction: column; flex: 1 1 auto; padding: var(--sp-3) 6px 2px; }
  .k-look__t { margin: 0; font: 600 var(--fs-title)/1.25 var(--font-ui); color: var(--ink); }
  .k-look__d { margin: 6px 0 0; font: 400 var(--fs-body-s)/1.4 var(--font-ui); color: var(--ink-2); }
  .k-look__h {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: var(--sp-2) 0 0;
    font: 400 var(--fs-caption)/1.3 var(--font-ui);
    color: var(--ink-2);
  }
  .k-look__h > .k-icon { width: 16px; height: 16px; flex: none; }
  .k-look__h--no { color: var(--danger); }
  .k-look__a { display: flex; align-items: center; gap: var(--sp-2); margin-top: auto; padding-top: var(--sp-3); }
  .k-look__a > .k-btn { flex: 1 1 auto; min-width: 0; min-height: var(--btn-h-compact); max-width: none; border-radius: var(--r-btn); }
  .k-look__like[aria-pressed="true"] .k-icon,
  .k-look__up[aria-pressed="true"] .k-icon { fill: currentColor; }
  .k-look__no[aria-pressed="true"] { color: var(--danger); background: var(--danger-soft); box-shadow: none; }
  .k-look__no[aria-pressed="true"] .k-icon { fill: none; }
  .k-look__up[aria-pressed="true"] { color: var(--acc); background: var(--acc-soft); box-shadow: none; }
  .k-look__main.is-done > .k-icon { order: 2; }
  /* План на день (день из календаря): самая длинная подпись «На понеділок, 28» на телефоне шла
     с многоточием; поля и кегль как у компактной кнопки, значок календаря остаётся (cutout, раунд 2). */
  .k-look__a--day > .k-look__main { padding-inline: var(--sp-3); font-size: var(--fs-body-s); }

  /* ---------- лента карточек (MOTION-SPEC #6) ---------- */
  .k-carwrap { position: relative; margin-inline: calc(-1 * var(--gutter)); }
  .k-carousel {
    position: relative;
    display: flex;
    gap: var(--sp-3);
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--gutter);
    padding: var(--sp-1) var(--gutter) var(--sp-2);
    scrollbar-width: none;
  }
  .k-carousel::-webkit-scrollbar { display: none; }
  .k-carousel.is-dragging { scroll-snap-type: none; cursor: grabbing; }
  .k-carousel > .k-look {
    flex: 0 0 calc(100% - var(--st-card-peek));
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }
  .k-carousel > .k-look:only-child { flex-basis: 100%; }
  @supports (animation-timeline: view()) {
    @keyframes k-look-depth {
      0% { scale: .94; opacity: .7; }
      42%, 62% { scale: 1; opacity: 1; }
      100% { scale: .94; opacity: .7; }
    }
    .k-carousel > .k-look {
      animation: k-look-depth linear both;
      animation-timeline: view(inline);
    }
    :root[data-motion="reduce"] .k-carousel > .k-look { animation: none; }
    @media (prefers-reduced-motion: reduce) { .k-carousel > .k-look { animation: none; } }
  }
  .k-dots {
    position: relative;
    display: flex;
    justify-content: center;
    gap: calc(var(--st-dot-step) - var(--st-dot));
    width: max-content;
    margin: var(--sp-2) auto 0;
  }
  .k-dots__d { width: var(--st-dot); height: var(--st-dot); border-radius: 50%; background: var(--line-2); }
  .k-dots__on {
    position: absolute;
    left: calc((var(--st-dot) - var(--st-dot-on)) / 2);
    top: 0;
    width: var(--st-dot-on);
    height: var(--st-dot);
    border-radius: 3px;
    background: var(--acc);
    translate: calc(var(--i, 0) * var(--st-dot-step)) 0;
    transition: translate var(--dur-move) var(--ease-move);
  }

  /* ---------- «Подобається»: маленький коллаж летит к «Шафа» (#9) ---------- */
  .k-flyer { position: fixed; z-index: var(--z-toast-fallback); pointer-events: none; }
  .k-flyer__mid, .k-flyer__in { width: 100%; height: 100%; }
  .k-flyer__look { width: 100%; height: 100%; aspect-ratio: auto; padding: 4px; gap: 2px; border-radius: 10px; box-shadow: var(--shadow-float); }
  .k-flyer__look .k-lcol__slot { border-radius: 4px; }

  /* ---------- плитка образа в сетке («Мої образи», «Усі 10») ---------- */
  .k-looktile {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 0;
    border: 0;
    border-radius: var(--r-tile);
    background: none;
    color: var(--ink);
    text-align: left;
  }
  .k-looktile .k-lcol {
    grid-auto-flow: row;
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: minmax(0, 1fr);
    align-items: stretch;
    padding: 8%;
    aspect-ratio: .8;
    border-radius: var(--r-tile);
  }
  .k-looktile .k-lcol[data-n="1"] { grid-template-columns: 1fr; }
  .k-looktile .k-lcol[data-n="3"] > :first-child { grid-row: span 2; }
  .k-looktile .k-lcol__slot, .k-looktile .k-lcol__slot--s { height: 100%; }
  .k-looktile .k-lcol__slot > img { object-position: 50% 50%; }
  .k-looktile.is-rejected .k-lcol__slot > img { opacity: .45; }
  .k-looktile__t {
    display: -webkit-box;
    margin: var(--sp-2) 2px 0;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    font: 600 var(--fs-body-s)/1.3 var(--font-ui);
  }
  .k-looktile__s { margin: 4px 2px 0; font: 400 var(--fs-caption)/1.3 var(--font-ui); color: var(--ink-2); }

  /* ---------- лист замены вещи (m-swap) ---------- */
  .k-swapstrip {
    display: flex;
    gap: var(--sp-2);
    margin-inline: calc(-1 * var(--sp-5));
    padding: var(--sp-2) var(--sp-5) var(--sp-1);
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scroll-padding-inline: var(--sp-5);
    scrollbar-width: none;
  }
  .k-swapstrip::-webkit-scrollbar { display: none; }
  .k-swaptile {
    flex: 0 0 82px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--ink);
    text-align: left;
    scroll-snap-align: start;
  }
  .k-swaptile__ph {
    position: relative;
    display: block;
    height: 110px;
    border-radius: var(--r-photo-s);
    background: var(--surface-2);
    overflow: hidden;
  }
  .k-swaptile__ph > img { position: absolute; inset: 6%; width: 88%; height: 88%; object-fit: contain; }
  .k-swaptile.is-now .k-swaptile__ph { box-shadow: inset 0 0 0 2px var(--acc); background: var(--acc-soft); }
  /* QA: у текущей вещи картинка ниже подписи «зараз», чтобы подпись не лежала на фото (m-swap). */
  .k-swaptile.is-now .k-swaptile__ph > img { top: 20px; height: calc(94% - 20px); }
  .k-swaptile__now {
    position: absolute;
    left: 6px;
    top: 6px;
    font: 700 var(--fs-label)/1 var(--font-ui);
    color: var(--acc-deep);
  }
  .k-swaptile__t {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    font: 500 var(--fs-caption)/1.25 var(--font-ui);
    /* QA: длинное слово («асиметричний») переносится, а не обрезается краем плитки. */
    hyphens: auto;
    overflow-wrap: anywhere;
  }
  .k-swapall {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
    min-height: var(--target);
    margin-top: var(--sp-2);
    padding: 0;
    border: 0;
    background: none;
    color: var(--acc);
    font: 600 var(--fs-body-s)/1.2 var(--font-ui);
  }
  .k-swapall > .k-icon { width: 18px; height: 18px; }
  .k-swaprows { margin-top: var(--sp-2); border-top: 1px solid var(--line); }
  .k-swaphint { margin-top: var(--sp-3); font-size: var(--fs-caption); }

  /* ---------- выбор вещи ---------- */
  .k-pickhead { display: flex; flex-direction: column; gap: var(--sp-3); margin-bottom: var(--sp-4); }
  .k-pickhead .k-field { max-width: none; }
  .k-pickchips { margin-inline: calc(-1 * var(--sp-5)); padding-inline-start: var(--sp-5); scroll-padding-inline: var(--sp-5); }
  .k-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-3) var(--sp-2); }

  /* ---------- «Стиліст»: шапка, начало, подсказки ---------- */
  .st-mirror { display: block; width: 100%; height: auto; border-radius: var(--r-card-l); background: var(--surface-2); }
  .st-mirror .m-floor { fill: var(--oak-lighter); }
  .st-mirror .m-oak { fill: var(--oak); }
  .st-mirror .m-oak-d { fill: var(--oak-deep); }
  .st-mirror .m-oak-l { fill: var(--oak-light); }
  .st-mirror .m-glass { fill: var(--sky); }
  .st-mirror .m-shine { fill: var(--surface); opacity: .7; }
  .st-mirror .m-spark { fill: var(--acc); }
  .st-mirror .m-pot { fill: var(--acc); }
  .st-mirror .m-leaf { fill: var(--olive); }
  .st-mirror .m-box { fill: var(--acc-deep); }
  .st-mirror .m-bottle { fill: var(--acc-soft); stroke: var(--line-2); stroke-width: 1; }
  .st-mirror .m-cap { fill: var(--mus); }
  .st-ask {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    min-height: 58px;
    padding: var(--sp-2) var(--sp-3) var(--sp-2) 10px;
    border: 0;
    border-radius: var(--r-tile);
    background: var(--surface);
    box-shadow: inset 0 0 0 1px var(--line);
    color: var(--ink);
    text-align: left;
  }
  .st-ask__ic {
    display: grid;
    place-items: center;
    flex: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--acc-soft);
    color: var(--acc);
  }
  .st-ask__ic > .k-icon { width: 20px; height: 20px; }
  .st-ask__text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
  .st-ask__t { font: 600 var(--fs-body)/1.25 var(--font-ui); }
  .st-ask__s { font: 400 var(--fs-caption)/1.3 var(--font-ui); color: var(--ink-2); }
  .st-ask > .k-row__chev { width: 18px; height: 18px; color: var(--ink); }
  .st-ask--plain .st-ask__ic { width: 28px; background: none; color: var(--ink-2); }
  .st-ask--plain .st-ask__ic > .k-icon { width: 22px; height: 22px; }
  .st-ask--hot { background: var(--acc-soft); box-shadow: none; }
  .st-ask--hot .st-ask__ic { color: var(--acc-deep); }
  .st-ask__new { flex: none; padding-right: var(--sp-2); font: 600 var(--fs-label)/1 var(--font-ui); color: var(--acc-deep); }
  .st-mirrorwrap { display: block; }
  .st-why { max-width: none; margin-top: var(--sp-4); }
  .st-why__go { margin-top: var(--sp-5); }
  .st-note { margin: 0; font: 400 var(--fs-hint)/var(--lh-hint) var(--font-ui); color: var(--ink-2); }
  .st-note--c { text-align: center; }

  /* ---------- «Стиліст»: реплики ---------- */
  .st-ctx {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    height: var(--target);
    padding: 0 var(--sp-4) 0 10px;
    border: 2px solid transparent;
    border-inline-width: 0;
    border-radius: 22px;
    background: var(--surface);
    background-clip: padding-box;
    box-shadow: inset 0 0 0 1px var(--line-2);
    color: var(--ink);
    font: 500 var(--fs-hint)/1 var(--font-ui);
  }
  .st-ctx > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .st-ctx > .k-icon { width: 18px; height: 18px; flex: none; }
  .st-bub {
    max-width: var(--st-bubble-max);
    margin: 0;
    padding: 11px var(--sp-4);
    border-radius: var(--r-btn);
    font: 400 var(--fs-body-s)/1.4 var(--font-ui);
    overflow-wrap: anywhere;
    white-space: pre-line;
  }
  .st-bub--me { background: var(--acc); color: var(--acc-ink); }
  .st-bub--ai { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
  .st-bub--me.has-thumb { display: flex; align-items: center; gap: var(--sp-3); padding: 8px var(--sp-4) 8px 8px; }
  .st-bub__thumb {
    position: relative;
    flex: none;
    width: var(--st-thumb);
    height: var(--st-thumb);
    border-radius: 12px;
    background: var(--surface);
    overflow: hidden;
  }
  .st-bub__thumb > img { position: absolute; inset: 6%; width: 88%; height: 88%; object-fit: contain; }
  .st-bub__thumb--photo > img { inset: 0; width: 100%; height: 100%; object-fit: cover; }
  .st-bub--wait { color: var(--ink-2); }

  /* ожидание (m-wait, MOTION-SPEC #11) */
  .st-steps {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: var(--sp-4) 18px;
    border-radius: var(--r-card);
    background: var(--surface);
    box-shadow: inset 0 0 0 1px var(--line);
  }
  .st-step { display: flex; align-items: center; gap: var(--sp-3); margin: 0; font: 400 var(--fs-body-s)/1.3 var(--font-ui); color: var(--ink-2); }
  .st-step > .k-icon { width: 20px; height: 20px; flex: none; }
  .st-step.is-done { color: var(--ink); font-weight: 600; }
  .st-step.is-now { color: var(--ink); font-weight: 600; }
  .st-step.is-now > .k-icon { color: var(--acc); }
  .st-long { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); }
  .st-skel {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: calc(100% - var(--st-card-peek));
    padding: 10px 10px var(--sp-4);
    border-radius: var(--r-card-xl);
    background: var(--surface);
    box-shadow: inset 0 0 0 1px var(--line);
    overflow: hidden;
  }
  .st-skel__b { border-radius: 8px; background: var(--surface-2); }
  .st-skel__col { aspect-ratio: 1.8; border-radius: var(--r-card-l); }
  .st-skel::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, transparent 20%, var(--st-sheen) 50%, transparent 80%);
    translate: -100% 0;
    animation: st-sweep var(--dur-shimmer) linear infinite;
  }
  @keyframes st-sweep { to { translate: 100% 0; } }
  @keyframes st-pulse { 50% { opacity: .55; } }
  :root[data-motion="reduce"] .st-skel::after { content: none; }
  :root[data-motion="reduce"] .st-skel { animation: st-pulse var(--dur-shimmer) ease-in-out infinite; }
  @media (prefers-reduced-motion: reduce) {
    .st-skel::after { content: none; }
    .st-skel { animation: st-pulse var(--dur-shimmer) ease-in-out infinite; }
  }
  .st-paused .st-skel::after, .st-paused .st-skel { animation-play-state: paused; }

  /* ошибка (m-x-error) */
  .st-err {
    display: flex;
    flex-direction: column;
    gap: var(--sp-4);
    padding: 18px;
    border-radius: var(--r-card);
    background: var(--surface);
    box-shadow: inset 0 0 0 1px var(--line);
  }
  .st-err__head { display: flex; align-items: center; gap: var(--sp-3); }
  .st-err__ic { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--danger-soft); color: var(--danger); }
  .st-err__t { margin: 0; font: 600 var(--fs-section)/1.25 var(--font-ui); }
  .st-err__s { margin: 2px 0 0; font: 400 var(--fs-caption)/1.3 var(--font-ui); color: var(--ink-2); }
  .st-err__x { margin: 0; font: 400 var(--fs-body-s)/1.45 var(--font-ui); }
  .st-err .k-btn { max-width: none; }

  /* вещи ответом («Покажи всі сині сумки») */
  .st-picks {
    display: flex;
    gap: var(--sp-3);
    margin-inline: calc(-1 * var(--gutter));
    padding: var(--sp-1) var(--gutter);
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scroll-padding-inline: var(--gutter);
    scrollbar-width: none;
  }
  .st-picks::-webkit-scrollbar { display: none; }
  .st-picks > .k-tile { flex: 0 0 116px; scroll-snap-align: start; }

  /* поле переписки над меню (m-stylist) */
  .st-dock {
    position: fixed;
    left: 0;
    right: 0;
    bottom: var(--nav-h);
    z-index: var(--z-dock);
    display: flex;
    flex-direction: column;
    gap: var(--sp-2);
    width: min(100%, var(--input-max));
    margin: 0 auto;
    /* до самого меню: между полем и меню не просвечивает лента (круг «Стиліст» лежит поверх) */
    padding: var(--sp-2) 12px calc(var(--nav-clear) - var(--nav-h) + 6px);
    background: linear-gradient(to bottom, transparent, var(--bg) var(--sp-4));
  }
  .st-quick { margin-inline: -12px; padding-inline: 12px var(--target); scroll-padding-inline: 12px; }
  .st-quick .k-chip > .k-icon { color: var(--ink); }
  .st-attach { display: flex; gap: var(--sp-2); }
  .st-attach__chip {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
    max-width: 100%;
    padding: 4px 0 4px 4px;
    border-radius: var(--r-btn);
    background: var(--surface);
    box-shadow: inset 0 0 0 1px var(--line-2);
    font: 500 var(--fs-hint)/1.2 var(--font-ui);
  }
  .st-attach__chip > span:not(.st-bub__thumb) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .st-attach__chip .st-bub__thumb { width: 40px; height: 40px; border-radius: 10px; background: var(--surface-2); }
  .st-attach__chip.is-loading { opacity: .6; }
  .st-comp {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    min-height: 48px;
    padding: 2px 2px 2px 4px;
    border-radius: 24px;
    background: var(--surface);
    box-shadow: inset 0 0 0 1px var(--line-2), var(--shadow-strip);
  }
  .st-comp:focus-within { box-shadow: inset 0 0 0 1.5px var(--acc), var(--shadow-strip); }
  .st-comp__in {
    flex: 1 1 auto;
    min-width: 0;
    min-height: var(--target);
    max-height: 150px;
    padding: 12px var(--sp-2) 10px;
    border: 0;
    outline: none;
    resize: none;
    background: none;
    color: var(--ink);
    font: 400 var(--fs-body)/1.35 var(--font-ui);
  }
  .st-comp__in::placeholder { color: var(--ph-ink); }
  .st-comp > .k-ibtn { color: var(--ink-2); }
  .st-comp > .k-ibtn[aria-pressed="true"] { color: var(--acc); }
  .st-comp__send { background: var(--acc); color: var(--acc-ink); box-shadow: none; }
  .st-comp__send:disabled { opacity: 1; background: var(--acc-soft); color: var(--acc-deep); }

  /* ---------- «Образ» (m-look) ---------- */
  .lk-col .k-lcol { --lcol-ratio: 1.38; }
  .lk-title { margin: 0; font: 600 var(--fs-display-m)/var(--lh-display) var(--font-display); }
  .lk-meta { margin: 6px 0 0; font: 400 var(--fs-hint)/1.35 var(--font-ui); color: var(--ink-2); }
  .lk-date {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
    min-height: var(--target);
    padding: 0 var(--sp-1);
    border: 0;
    border-radius: 12px;
    background: none;
    color: var(--ink-2);
    font: 400 var(--fs-hint)/1.3 var(--font-ui);
    text-align: left;
  }
  .lk-date > .k-icon { width: 18px; height: 18px; flex: none; }
  .lk-rows .k-row { gap: var(--sp-3); }
  .lk-rows .lk-row { padding: 0; }
  .lk-rowmain {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    flex: 1 1 auto;
    min-width: 0;
    min-height: var(--row-h-group);
    padding: var(--sp-2) 0;
    border: 0;
    border-radius: 12px;
    background: none;
    color: var(--ink);
    text-align: left;
    font: inherit;
  }
  .lk-rows .k-row__thumb { width: 44px; height: 44px; border-radius: 10px; position: relative; }
  .lk-rows .k-row__thumb > img { position: absolute; inset: 6%; width: 88%; height: 88%; object-fit: contain; }
  .lk-rows .k-ibtn { color: var(--ink-2); }
  .lk-days .k-row__value { max-width: 55%; }
  .lk-days .k-row[aria-pressed="true"] .k-row__label { color: var(--acc); font-weight: 600; }
}

/* ========================================================================== layouts: лист справа на компьютере */
@layer layouts {
  @media (min-width: 1100px) {
    .k-sheet.k-sheet--side {
      inset: 130px 80px auto auto;
      width: min(var(--st-swap-w), calc(100% - 160px));
      max-height: calc(100dvh - var(--desk-panel-top) - var(--desk-panel-bottom)); /* фаза 9: над меню */
      margin: 0;
      border-radius: var(--r-sheet);
    }
    .k-sheet.k-sheet--side::backdrop { background: transparent; }
    .k-sheet.k-sheet--side .k-sheet__grab { display: none; }
    /* фаза 9 (d-stylist): шапка «Стиліст» с «...» остаётся наверху, пока длинная переписка листается под ней */
    .k-pane[data-tab="stylist"] .k-thead { position: sticky; top: 0; z-index: var(--z-header); background: var(--bg); }
  }
}

/* ========================================================================== screens: только раскладка */
@layer screens {
  .st { display: flex; flex-direction: column; }
  .st__col { display: flex; flex-direction: column; gap: var(--sp-4); width: 100%; margin-inline: auto; }
  .st-start { display: flex; flex-direction: column; gap: var(--sp-3); }
  .st-start > .k-section { margin: var(--sp-3) var(--sp-1) 0; }
  .st-asks { display: flex; flex-direction: column; gap: 10px; }
  .st-feed { display: flex; flex-direction: column; gap: var(--sp-3); }
  .st-ex { display: flex; flex-direction: column; gap: var(--sp-3); }
  .st-ctxrow { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); }
  .st-ctxrow > .st-ctx:only-child { max-width: 100%; }
  .st-bub--me { align-self: flex-end; }
  .st-bub--ai { align-self: flex-start; }
  .st-wait { display: flex; flex-direction: column; gap: var(--sp-3); }
  .st-earlier { align-self: center; }
  .st-spacer { flex: none; height: var(--st-dock-space, 140px); }
  /* тост над полем переписки (m-s-like), а при строке состояния над ней */
  html[data-stylist] .k-toast:not(dialog .k-toast) { bottom: calc(var(--nav-clear) + var(--st-comp-h, 0px) + var(--sp-2)); }
  html[data-stylist][data-strip] .k-toast:not(dialog .k-toast) { bottom: calc(var(--nav-clear) + var(--dock-h) + var(--strip-space)); }

  .lk { display: flex; flex-direction: column; gap: var(--sp-4); padding-bottom: var(--sp-4); }
  .lk-head { display: flex; flex-direction: column; }
  .lk-actions { display: flex; flex-direction: column; align-items: center; gap: var(--sp-1); }
  .lk-looks { display: flex; flex-direction: column; gap: var(--sp-4); }
  .lk-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-5) var(--sp-3); }
  .lk-empty { padding: var(--sp-6) 0; text-align: center; }

  @media (min-width: 760px) {
    .lk-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  }

  /* компьютер (d-stylist): колонка 720, карточки сеткой в три колонки */
  @media (min-width: 1100px) {
    /* фаза 9: поля 80 как у других вкладок, шапка не прилипает к краю на 1280 */
    .k-pane[data-tab="stylist"].app { width: min(100%, calc(var(--desk-max) + 160px)); padding-inline: 80px; }
    .st__col { max-width: var(--st-col); }
    .st-dock { width: min(calc(100% - 32px), var(--st-col)); padding-inline: 0; }
    .st-quick { margin-inline: 0; padding-inline: 0 var(--target); }
    .k-carwrap { margin-inline: 0; }
    .k-carousel {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 18px;
      overflow: visible;
      padding: 0;
      scroll-snap-type: none;
    }
    .k-carousel > .k-look { animation: none; }
    .k-carousel .k-look__t { font-size: var(--fs-body-s); }
    .k-carousel .k-look__d { font-size: var(--fs-caption); }
    .k-carousel .k-lcol { --lcol-ratio: 1.08; }
    .k-carwrap > .k-dots { display: none; }
    .st-skel { width: calc((100% - 36px) / 3); }
    .st-skel__col { aspect-ratio: 1.08; }
    html:has(dialog.k-sheet--side[open]) .k-pane[data-tab="stylist"] .st__col { margin-inline: 0 auto; }
    html:has(dialog.k-sheet--side[open]) .st-dock { right: auto; left: max(80px, calc((100% - var(--desk-max)) / 2)); margin: 0; }
    .k-carousel .k-look__a > .k-btn { padding-inline: var(--sp-3); font-size: var(--fs-hint); }
    .lk-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    /* фаза 9: коллаж образа на компьютере ниже (вещи целиком), чтобы «Вдягну сьогодні» было видно без прокрутки */
    .lk-col .k-lcol { --lcol-ratio: 1.9; }
  }
}
