/* ═══════════════════════════════════════════════════════════
   BONO MODO — Инструменты (/instrumenty/), Soft Luxe
   ═══════════════════════════════════════════════════════════ */

/* ─── Хаб и карточки ───────────────────────────────────────── */
.tools-hub { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; margin-top: 40px; }
.tools-hub--compact { margin-top: 22px; }
.tools-hub__more { margin-top: 36px; color: var(--muted); }
.tool-card {
  display: flex; flex-direction: column; gap: 10px; padding: 28px; background: var(--surface); border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm); color: var(--ink); text-decoration: none; transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.tool-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.tool-card__icon { width: 52px; height: 52px; border-radius: 16px; background: var(--accent-soft) center / 30px no-repeat; }
.tool-card__icon--eskiz { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40' fill='none' stroke='%239E5238' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M14 5 L8 8 L4 16 L9 18 L11 14 V35 H29 V14 L31 18 L36 16 L32 8 L26 5 Q20 10 14 5Z'/%3E%3Cpath d='M20 9 V35' stroke-dasharray='2 2'/%3E%3C/svg%3E"); }
.tool-card__icon--label { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40' fill='none' stroke='%239E5238' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M3 12 L7 28 H23 L27 12'/%3E%3Cpath d='M3 12 q3 -3 6 0 t6 0 t6 0 t6 0'/%3E%3Ccircle cx='31' cy='29' r='6'/%3E%3C/svg%3E"); }
.tool-card__icon--size { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40' fill='none' stroke='%239E5238' stroke-width='2' stroke-linejoin='round'%3E%3Crect x='3' y='14' width='34' height='12' rx='2'/%3E%3Cpath d='M9 14v5M15 14v4M21 14v5M27 14v4M33 14v5'/%3E%3C/svg%3E"); }
.tool-card__icon--photo { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40' fill='none' stroke='%239E5238' stroke-width='2' stroke-linejoin='round'%3E%3Crect x='4' y='10' width='32' height='24' rx='4'/%3E%3Cpath d='M14 10l2-4h8l2 4'/%3E%3Ccircle cx='20' cy='22' r='7'/%3E%3C/svg%3E"); }
.tool-card__icon--spec { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40' fill='none' stroke='%239E5238' stroke-width='2' stroke-linejoin='round'%3E%3Crect x='6' y='4' width='28' height='32' rx='3'/%3E%3Cpath d='M6 13h28M6 21h28M6 29h28M16 13v23'/%3E%3C/svg%3E"); }
.tool-card__tag { font-size: 13px; color: var(--muted); letter-spacing: .02em; margin-top: 6px; }
.tool-card__title { font-family: var(--font-serif); font-size: 26px; font-weight: 600; line-height: 1.12; }
.tool-card__text { color: var(--muted); font-size: 15.5px; line-height: 1.55; flex: 1; }
.tool-card__foot { display: flex; justify-content: space-between; align-items: baseline; margin-top: 8px; }
.tool-card__price { font-family: var(--font-serif); font-size: 24px; font-weight: 600; }
.tool-card__link { font-weight: 600; color: var(--accent-deep); }

/* ─── Страница инструмента ─────────────────────────────────── */
.tool-page { padding-block: 8px 64px; }
.tool-hero { max-width: 820px; padding-block: clamp(12px, 2.5vw, 28px) clamp(24px, 3vw, 36px); }
.tool-hero__title { font-family: var(--font-serif); font-weight: 500; font-size: clamp(32px, 4.2vw, 52px); line-height: 1.05; letter-spacing: -0.01em; margin-top: 8px; }
.tool-hero__tagline { margin-top: 18px; font-size: clamp(17px, 1.5vw, 19px); color: var(--ink-2); line-height: 1.55; }
.tool-muted { color: var(--muted); font-size: 14px; font-weight: 400; }
.tool-section { margin-top: clamp(48px, 6vw, 72px); max-width: 960px; }
.tool-section__title { font-family: var(--font-serif); font-weight: 500; font-size: clamp(28px, 3vw, 38px); line-height: 1.1; }
.tool-steps { list-style: none; padding: 0; margin: 24px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.tool-step { background: var(--surface); border-radius: var(--r); padding: 22px 24px; }
.tool-step__num { display: inline-flex; width: 34px; height: 34px; border-radius: 50%; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent-deep); font-weight: 700; margin-bottom: 12px; }
.tool-step strong { display: block; font-size: 17px; }
.tool-step p { color: var(--muted); margin-top: 6px; font-size: 15px; line-height: 1.55; }
.tool-uses { margin: 20px 0 0; padding-left: 20px; line-height: 1.7; color: var(--ink-2); }
.tool-links { margin: 18px 0 0; padding-left: 20px; line-height: 1.9; }
.tool-links a { color: var(--accent-deep); }

/* ─── Приложение: ИИ-инструмент ────────────────────────────── */
.tool-app [hidden] { display: none !important; }
.tool-app { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: clamp(20px, 3.5vw, 40px); }
.tool-drops { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin-bottom: 22px; }
.tool-drop {
  position: relative; display: flex; align-items: center; justify-content: center; min-height: 260px; border-radius: var(--r);
  border: 2px dashed var(--line); background: var(--bg); cursor: pointer; overflow: hidden; transition: border-color .25s, background .25s;
}
.tool-drop:hover, .tool-drop.is-over { border-color: var(--accent); background: #fff8f1; }
.tool-drop input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.tool-drop__empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 24px; pointer-events: none; }
.tool-drop__plus { width: 48px; height: 48px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 28px; line-height: 46px; }
.tool-drop__label { font-weight: 600; }
.tool-drop__label em { font-style: normal; font-weight: 400; color: var(--muted); font-size: 14px; }
.tool-drop__hint { color: var(--muted); font-size: 14px; max-width: 32ch; line-height: 1.45; }
.tool-drop__img { position: absolute; inset: 0; pointer-events: none; }
.tool-drop__img img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.tool-drop.has-file { border-style: solid; border-color: var(--accent-soft); }
.tool-drop__clear { position: absolute; top: 10px; right: 10px; z-index: 2; width: 34px; height: 34px; border-radius: 50%; background: var(--surface); box-shadow: var(--shadow-sm); font-size: 20px; color: var(--ink); }
.tool-form__foot { display: grid; gap: 12px; margin-top: 8px; }
.tool-form__foot .form-btn { margin-top: 4px; }
.tool-form__foot .form-btn:disabled { opacity: .55; cursor: not-allowed; }

.tool-progress { display: flex; gap: 18px; align-items: center; padding: 28px; border-radius: var(--r); background: var(--bg); }
.tool-progress p { margin-top: 4px; }
.tool-progress__spin { flex: none; width: 40px; height: 40px; border-radius: 50%; border: 3px solid var(--accent-soft); border-top-color: var(--accent); animation: toolspin 1s linear infinite; }
@keyframes toolspin { to { transform: rotate(360deg); } }
.tool-preview { margin: 0; border-radius: var(--r); overflow: hidden; background: #fff; box-shadow: var(--shadow-sm); }
.tool-preview img { width: 100%; height: auto; display: block; }
.tool-buy, .tool-files, .tool-failed { margin-top: 22px; display: grid; gap: 14px; justify-items: start; }
.tool-buy__form { width: 100%; max-width: 520px; display: grid; gap: 12px; }
.tool-buy__price { font-family: var(--font-serif); font-size: 36px; font-weight: 600; line-height: 1; }
.tool-buy__price small { display: block; font-family: var(--font-sans); font-size: 14px; font-weight: 400; color: var(--muted); margin-top: 6px; }
.tool-buy__form .form-btn { margin-top: 0; }
.tool-buy__form .form-btn:disabled { opacity: .55; }
.tool-files__ok { padding: 14px 18px; border-radius: var(--r-sm); background: #EEF1EA; color: #3F4B37; }
.tool-files__list { list-style: none; padding: 0; margin: 0; width: 100%; max-width: 560px; display: grid; gap: 10px; }
.tool-file { display: flex; justify-content: space-between; align-items: center; background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px; color: var(--ink); font-weight: 600; text-decoration: none; }
.tool-file:hover { border-color: var(--accent); }
.tool-file span { color: var(--muted); font-weight: 400; font-size: 14px; }
.tool-history { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); }
.tool-history__title { font-size: 14px; color: var(--muted); }
.tool-history ul { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 8px 16px; }
.tool-history a { color: var(--accent-deep); font-size: 14px; }

.tool-spec { background: #fff; border-radius: var(--r); box-shadow: var(--shadow-sm); padding: clamp(18px, 3vw, 32px); }
.tool-spec__title { font-family: var(--font-serif); font-size: clamp(24px, 2.6vw, 30px); font-weight: 600; line-height: 1.15; }
.tool-spec__lead { display: grid; grid-template-columns: 130px 1fr; gap: 8px 16px; margin: 16px 0 0; font-size: 15.5px; line-height: 1.55; }
.tool-spec__lead dt { color: var(--muted); }
.tool-spec__lead dd { margin: 0; }
.tool-spec__sec { margin-top: 26px; }
.tool-spec__sec h4 { font-size: 17px; }
.tool-spec .tool-spec__table th, .tool-spec .tool-spec__table td { text-align: left; }
.tool-spec .tool-spec__table td { white-space: normal; vertical-align: top; font-size: 14.5px; }
.tool-spec .tool-spec__table td:first-child { font-weight: 400; }
.tool-spec__more { color: var(--muted); font-size: 14px; margin-top: 8px; }
@media (max-width: 600px) { .tool-spec__lead { grid-template-columns: 1fr; } }

/* ─── Приложение: ярлык ухода ──────────────────────────────── */
.care__grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 48px); align-items: start; }
.care__block { border: 0; padding: 0; margin: 0 0 22px; }
.care__block legend { font-weight: 700; margin-bottom: 10px; padding: 0; }
.care__block legend label { display: inline-flex; gap: 8px; align-items: center; cursor: pointer; }
.care__rows { display: grid; gap: 8px; }
.care__row { display: grid; grid-template-columns: 1fr 110px 36px; gap: 8px; align-items: center; }
.care__row .form-input { padding: 11px 12px; }
.care__pct { position: relative; }
.care__pct i { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-style: normal; color: var(--muted); pointer-events: none; }
.care__pct input { padding-right: 28px; }
.care__del { width: 36px; height: 36px; border-radius: 50%; background: var(--bg); color: var(--muted); font-size: 20px; }
.care__del:hover { color: var(--accent-deep); }
.care__add { margin-top: 10px; color: var(--accent-deep); font-weight: 600; background: none; padding: 4px 0; }
.care__sum { color: #A4442B; font-size: 14px; margin-top: 6px; min-height: 1em; }
.care__opts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.care__opts .form-label { display: grid; gap: 6px; font-size: 14px; }
.care__check { display: flex; gap: 10px; align-items: flex-start; margin-top: 12px; font-size: 15px; cursor: pointer; }
.care__check input { margin-top: 4px; }
.care__out { position: sticky; top: 100px; }
.care__label-wrap { background: var(--bg); border-radius: var(--r); padding: 26px; display: flex; justify-content: center; }
.care__label svg { width: 300px; max-width: 100%; height: auto; display: block; box-shadow: var(--shadow-sm); }
.care__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.care__warn { margin-top: 12px; color: #A4442B; font-size: 14px; }
.care__legend-title { font-family: var(--font-serif); font-weight: 500; font-size: 26px; margin-top: 28px; }
.care__legend { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; }
.care__legend li { display: flex; gap: 14px; align-items: center; font-size: 15px; line-height: 1.4; }
.care__legend svg { flex: none; background: #fff; border-radius: 8px; padding: 2px; }
.care__note { padding-left: 54px; color: var(--muted); }

/* ─── Приложение: размерная сетка ──────────────────────────── */
.sc__bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 14px; margin-bottom: 18px; }
.sc__tabs { display: inline-flex; background: var(--bg); border-radius: 999px; padding: 4px; gap: 4px; }
.sc__tab { padding: 9px 20px; border-radius: 999px; background: none; font-weight: 600; color: var(--muted); }
.sc__tab.is-active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.sc__range { display: flex; gap: 10px; }
.sc__range .form-label, .sc__opts .form-label { display: grid; gap: 6px; font-size: 14px; }
.sc__range .form-input { padding: 9px 12px; min-width: 110px; }
.sc__opts { display: grid; grid-template-columns: 1.4fr 1fr; gap: 12px; }
.sc__cols { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 16px; font-size: 15px; }
.sc__col { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
.sc__col-del { background: none; color: var(--muted); font-size: 18px; line-height: 1; padding: 0 2px; }
.sc__add { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 14px; }
.sc__add .form-input { flex: 1 1 260px; padding: 10px 12px; }
.sc__presets { display: flex; flex-wrap: wrap; gap: 6px; }
.sc__preset { background: var(--bg); border-radius: 999px; padding: 6px 12px; font-size: 14px; color: var(--accent-deep); }
.sc__preset:hover { background: var(--accent-soft); }
.sc__hint { margin-top: 18px; }
.sc__table-wrap { overflow-x: auto; margin-top: 12px; -webkit-overflow-scrolling: touch; }
.sc__table { width: 100%; border-collapse: collapse; font-size: 15px; background: #fff; }
.sc__table th { background: #F3E3D8; font-weight: 600; padding: 12px 10px; text-align: center; font-size: 14px; line-height: 1.3; }
.sc__table td { padding: 10px; text-align: center; border-bottom: 1px solid var(--line); white-space: nowrap; }
.sc__table td:first-child { font-weight: 600; }
.sc__table tbody tr:nth-child(even) { background: #FAF6F0; }
.sc__table td[contenteditable]:focus { outline: 2px solid var(--accent); outline-offset: -2px; background: #fff8f1; }
.sc__note, .sc__ref-note { color: var(--muted); font-size: 15px; line-height: 1.55; margin-top: 12px; max-width: 72ch; }
.sc__ref-note { margin-top: 14px; color: var(--ink-2); }

@media (max-width: 860px) {
  .care__grid { grid-template-columns: 1fr; }
  .care__out { position: static; }
  .tool-steps { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .tool-drops { grid-template-columns: 1fr; }
  .tool-drop { min-height: 200px; }
  .care__opts { grid-template-columns: 1fr; }
  .care__row { grid-template-columns: 1fr 92px 32px; }
  .sc__opts { grid-template-columns: 1fr; }
  .sc__tab { padding: 8px 14px; }
}
