/*! web-calculator.ru © 2022-2026 — авторский код, копирование запрещено. src:rd-drobi.css */
/* Калькулятор дробей в новом дизайне. Движок (kalkulator-drobey-prostoy.js, frac-modes.js, frac-converter.js)
   прежний; старый drobi.css сюда не подключаем, нужные из него правила повторены ниже. */

/* ---------- режимы ---------- */
.rd #calc_fraction .frac-mode { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin: 0 0 20px; }
.rd #calc_fraction .frac-mode__label { margin: 0; }
.rd #calc_fraction .frac-mode__select { display: none; }
.rd #calc_fraction .rd-frac-seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 999px; background: var(--pill); max-width: 100%; }
.rd #calc_fraction .rd-frac-seg button { height: 40px; padding: 0 18px; border: 0; border-radius: 999px; background: transparent; color: var(--ink); font: 500 14px/1 var(--f-ui); cursor: pointer; white-space: nowrap; transition: background .15s; }
.rd #calc_fraction .rd-frac-seg button:hover { background: var(--accent-soft); }
.rd #calc_fraction .rd-frac-seg button.is-active { background: #fff; box-shadow: 0 1px 3px rgba(13, 13, 13, .08); }
.rd #calc_fraction .rd-frac-seg button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- доска ---------- */
.rd #calc_fraction .fraction-wrapper { margin: 0; }
.rd #calc_fraction .frac-board { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 16px; border-radius: 22px; background: var(--pill); }
.rd #calc_fraction #frac-inputs { display: contents; }
.rd #calc_fraction .frac-term { display: grid; grid-template-columns: auto auto; grid-template-areas: "sel sel" "ctl row"; align-items: center; gap: 10px 10px; padding: 14px; border-radius: 18px; background: var(--tile); position: relative; }
.rd #calc_fraction .frac-term > .frac-caption { display: none; }
.rd #calc_fraction .frac-toggle { display: none; }
.rd #calc_fraction .t-type-select,
.rd #calc_fraction .frac-term > .m-caption { grid-area: sel; justify-self: start; }
.rd #calc_fraction .frac-term > .frac-row { grid-area: row; }
.rd #calc_fraction .frac-term__ctl { grid-area: ctl; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.rd #calc_fraction .t-type-select {
    display: block; height: 32px; padding: 0 30px 0 12px; border: 0; border-radius: 999px; background: var(--pill) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%230D0D0D' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 12px center;
    color: var(--ink); font: 500 13px/1 var(--f-ui); -webkit-appearance: none; appearance: none; cursor: pointer;
}
.rd #calc_fraction .frac-term .m-caption { font: 400 11px/1.2 var(--f-mono); letter-spacing: 1px; text-transform: uppercase; color: var(--mute); white-space: nowrap; }

.rd #calc_fraction .frac-row { display: flex; align-items: center; gap: 8px; }
.rd #calc_fraction .frac-whole { display: none; }
.rd #calc_fraction .frac-stack { display: flex; flex-direction: column; align-items: stretch; gap: 5px; width: 64px; }
.rd #calc_fraction .frac-bar { display: block; height: 2px; width: 100%; border-radius: 2px; background: var(--ink); }
.rd #calc_fraction .frac-dec-wrap { display: none; align-items: center; }
.rd #calc_fraction .val_fraction {
    width: 64px; height: 46px; padding: 0 4px; box-sizing: border-box; border: 0; border-radius: 12px; background: var(--pill);
    color: var(--ink); font: 600 20px/1 var(--f-ui); text-align: center; -moz-appearance: textfield; appearance: textfield;
}
.rd #calc_fraction .frac-stack .val_fraction { width: 100%; }
.rd #calc_fraction .input-small { width: 52px; }
.rd #calc_fraction .t-dec { width: 110px; }
.rd #calc_fraction .val_fraction:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.rd #calc_fraction .fr-sign { display: none; font: 600 24px/1 var(--f-ui); color: var(--ink); }

.rd #calc_fraction .change_sign { width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: var(--pill); color: var(--ink); font-size: 0; cursor: pointer; }
.rd #calc_fraction .change_sign::after { content: "±"; font: 500 18px/1 var(--f-ui); }
.rd #calc_fraction .change_sign:hover { background: var(--accent-soft); }
.rd #calc_fraction .frac-remove { width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--mute); font: 400 18px/1 var(--f-ui); cursor: pointer; }
.rd #calc_fraction .frac-remove:hover { background: #F3DADA; color: var(--bad, #C0392B); }

.rd #calc_fraction .frac-op,
.rd #calc_fraction .frac-eq { display: flex; align-items: center; justify-content: center; }
.rd #calc_fraction .frac-op > .frac-caption { display: none; }
.rd #calc_fraction .sel-op {
    width: 48px; height: 48px; padding: 0; border: 0; border-radius: 50%; background: var(--tile); color: var(--ink);
    font: 500 20px/1 var(--f-ui); text-align: center; text-align-last: center; -webkit-appearance: none; appearance: none; cursor: pointer;
}
.rd #calc_fraction .sel-op:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.rd #calc_fraction .equal-sign { font: 500 28px/1 var(--f-ui); color: var(--mute); }

/* результат на доске */
.rd #calc_fraction .frac-result { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; background: var(--tile); box-shadow: inset 0 0 0 2px var(--accent); }
.rd #calc_fraction .frac-result > .frac-caption { display: block; font: 400 11px/1.2 var(--f-mono); letter-spacing: 1px; text-transform: uppercase; color: var(--accent); }
.rd #calc_fraction .frac-result .val_fraction { background: #fff; box-shadow: inset 0 0 0 1.5px var(--accent-mid); color: var(--accent); cursor: default; }
.rd #calc_fraction .frac-result #f3_int { width: 52px; background: transparent; box-shadow: none; font-size: 34px; }
.rd #calc_fraction .frac-result .frac-bar { background: var(--accent); }
.rd #calc_fraction .frac-result .fr-sign { color: var(--accent); }
.rd #calc_fraction #fr_sign3 { display: none; }
.rd #calc_fraction .frac-result.is-whole .frac-bar,
.rd #calc_fraction .frac-result.is-whole #f3_den { display: none; }
.rd #calc_fraction .frac-result.is-whole #f3_num { background: transparent; box-shadow: none; font-size: 34px; }

/* ---------- управление ---------- */
.rd #calc_fraction .rd-frac-ctlrow { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin: 16px 0 0; }
.rd #calc_fraction .board-ctl { display: flex; }
.rd #calc_fraction .btn-add-frac { height: 40px; padding: 0 18px; border: 1px solid var(--ink); border-radius: 999px; background: transparent; color: var(--ink); font: 500 14px/1 var(--f-ui); cursor: pointer; }
.rd #calc_fraction .btn-add-frac:hover { background: var(--tile); }
.rd #calc_fraction .rd-frac-hint { font: 400 13px/1.4 var(--f-ui); color: var(--mute); }
body.frac-mode-alt.rd #calc_fraction .rd-frac-ctlrow { display: none; }

.rd #calc_fraction .btn-wrapper1 { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 0; }
.rd #calc_fraction .btn-r,
.rd #calc_fraction .btn-c { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 28px; border: 0; border-radius: 999px; font: 600 15px/1 var(--f-ui); cursor: pointer; transition: opacity .15s; }
.rd #calc_fraction .btn-r { background: var(--ink); color: #fff; }
.rd #calc_fraction .btn-c { background: var(--pill); color: var(--ink); }
.rd #calc_fraction .btn-r:hover,
.rd #calc_fraction .btn-c:hover { opacity: .85; }
.rd #calc_fraction .calc_loading { display: none; width: 14px; height: 14px; border: 2px solid rgba(255, 255, 255, .4); border-top-color: #fff; border-radius: 50%; animation: rd-frac-spin 1s linear infinite; }
@keyframes rd-frac-spin { to { transform: rotate(360deg); } }

.rd #calc_fraction .frac-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 20px 0 0; }
.rd #calc_fraction .frac-chips__label { margin: 0 6px 0 0; }
.rd #calc_fraction .frac-chip { height: 36px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--pill); color: var(--ink); font: 500 13px/1 var(--f-mono); cursor: pointer; white-space: nowrap; transition: background .15s; }
.rd #calc_fraction .frac-chip:hover { background: var(--accent-soft); }

/* ---------- блок результата ---------- */
.rd #calc_fraction .rd-frac-res { margin: 24px 0 0; padding: 24px; border-radius: 22px; background: var(--tile); }
.rd #calc_fraction .div_s:has(#decision:empty) { display: none; }
.rd #calc_fraction .rd-frac-res__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.rd #calc_fraction .calc-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.rd #calc_fraction .btn-mini { height: 34px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--pill); color: var(--ink); font: 500 13px/1 var(--f-ui); cursor: pointer; }
.rd #calc_fraction .btn-mini:hover { background: var(--accent-soft); }

.rd #calc_fraction .rd-frac-sum { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 24px; margin: 18px 0 0; }
.rd #calc_fraction .rd-frac-sum[hidden] { display: none; }
.rd #calc_fraction .rd-frac-sum__expr { font: 400 15px/1.4 var(--f-mono); color: var(--mute); }
.rd #calc_fraction .rd-frac-sum__ans { display: flex; align-items: center; gap: 10px; margin: 6px 0 0; font: 600 48px/1 var(--f-ui); color: var(--ink); }
.rd #calc_fraction .rd-fr { display: inline-flex; flex-direction: column; align-items: center; font-size: .5em; line-height: 1.05; }
.rd #calc_fraction .rd-fr__d { border-top: 2px solid currentColor; padding-top: 2px; min-width: 1.2em; text-align: center; }
.rd #calc_fraction .rd-frac-sum__side { display: flex; flex-direction: column; gap: 10px; padding: 0 0 0 24px; border-left: 1px solid var(--line); }
.rd #calc_fraction .rd-frac-sum__row { display: flex; flex-direction: column; gap: 3px; }
.rd #calc_fraction .rd-frac-sum__row b { font: 500 15px/1.3 var(--f-mono); color: var(--ink); }

/* полосы долей */
.rd #calc_fraction .rd-frac-bars { margin: 22px 0 0; padding: 20px 0 0; border-top: 1px solid var(--line); }
.rd #calc_fraction .rd-frac-bars[hidden] { display: none; }
.rd #calc_fraction .rd-frac-bars .rd-label { display: block; margin: 0 0 12px; }
.rd #calc_fraction .rd-bar-row { display: grid; grid-template-columns: 72px minmax(0, 1fr); align-items: center; gap: 12px; margin: 0 0 8px; }
.rd #calc_fraction .rd-bar-row__name { font: 500 14px/1 var(--f-mono); color: var(--ink); }
.rd #calc_fraction .rd-bar-row__cells { display: flex; flex-wrap: wrap; gap: 8px; }
.rd #calc_fraction .rd-bar-grp { display: flex; gap: 3px; }
.rd #calc_fraction .rd-bar-cell { width: 16px; height: 16px; border-radius: 4px; background: var(--line); }
.rd #calc_fraction .rd-bar-cell.is-a { background: var(--accent); }
.rd #calc_fraction .rd-bar-cell.is-b { background: var(--accent-mid); }
.rd #calc_fraction p.rd-frac-bars__cap { display: block; margin: 12px 0 0; font: 400 13px/1.5 var(--f-mono); color: var(--mute); }
.rd #calc_fraction .rd-frac-res.has-bars #frac-viz { display: none !important; }

/* круги движка (для десятичных, умножения и деления) */
.rd #calc_fraction .frac-viz { margin: 20px 0 0; padding: 20px 0 0; border-top: 1px solid var(--line); text-align: left; }
.rd #calc_fraction .viz-cap { margin: 0 0 10px; font: 400 11px/1.3 var(--f-mono); letter-spacing: 1px; text-transform: uppercase; color: var(--mute); }
.rd #calc_fraction .viz-extra { color: var(--mute); }
.rd #calc_fraction .viz-pies { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.rd #calc_fraction .viz-pie { flex: 0 0 auto; }

/* решение по шагам */
.rd #calc_fraction .rd-frac-steps-head { margin: 22px 0 14px; padding: 20px 0 0; border-top: 1px solid var(--line); }
.rd #calc_fraction #decision { display: flex; flex-direction: column; gap: 14px; font: 400 15px/1.5 var(--f-ui); color: var(--ink); }
.rd #calc_fraction #decision br { display: none; }
.rd #calc_fraction #decision p { display: block; margin: 0; }
.rd #calc_fraction #decision .rd-hide { display: none; }
.rd #calc_fraction .rd-step { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 14px; align-items: start; }
.rd #calc_fraction .rd-step__num { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: #fff; font: 600 13px/1 var(--f-ui); }
.rd #calc_fraction .rd-step__body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.rd #calc_fraction .rd-step__body > p:first-child { margin: 3px 0 0; font-weight: 500; }
.rd #calc_fraction .rd-step__body > p + p { font-family: var(--f-mono); font-size: 14px; color: var(--ink); overflow-x: auto; }
.rd #calc_fraction #decision b,
.rd #calc_fraction #decision strong { font-weight: 600; }
.rd #calc_fraction .fraction1 { display: inline-block; vertical-align: middle; text-align: center; margin: 0 .2em; }
.rd #calc_fraction .numerator,
.rd #calc_fraction .denominator { display: block; }
.rd #calc_fraction .fraction-line { display: block; border-bottom: 1px solid currentColor; margin: 1px 0; min-width: 1em; }
.rd #calc_fraction .mixed-number { display: inline-flex; align-items: center; }
.rd #calc_fraction .whole { margin-right: .25em; }

/* история */
.rd #calc_fraction .frac-history { margin: 20px 0 0; }
.rd #calc_fraction .hist-head { display: flex; align-items: center; justify-content: space-between; margin: 0 0 10px; }
.rd #calc_fraction .hist-title { font: 400 11px/1.3 var(--f-mono); letter-spacing: 1px; text-transform: uppercase; color: var(--mute); }
.rd #calc_fraction .hist-clear { min-height: 32px; padding: 6px 8px; border: 0; background: none; color: var(--accent); font: 500 13px/1 var(--f-ui); cursor: pointer; }
.rd #calc_fraction .hist-list { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; }
.rd #calc_fraction .hist-list li { margin: 0; padding: 0; list-style: none; }
.rd #calc_fraction .hist-item { width: 100%; padding: 10px 14px; border: 0; border-radius: 12px; background: var(--tile); color: var(--ink); font: 400 14px/1.3 var(--f-mono); text-align: left; cursor: pointer; }
.rd #calc_fraction .hist-item:hover { background: var(--accent-soft); }
.rd #calc_fraction .hist-eq { margin: 0 4px; color: var(--mute); }
.rd #calc_fraction .hist-item b { color: var(--accent); font-weight: 600; }
body.frac-mode-alt #frac-history { display: none !important; }

.rd .frac-toast { position: fixed; left: 50%; bottom: 24px; z-index: 50; padding: 12px 20px; border-radius: 999px; background: var(--ink); color: #fff; font: 500 14px/1.3 var(--f-ui); opacity: 0; pointer-events: none; transform: translateX(-50%) translateY(10px); transition: opacity .2s, transform .2s; }
.rd .frac-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- режимы: сокращение, сравнение, степень, перевод ---------- */
.rd #frac-mode-panel .frac-whole { display: block; }
.rd #frac-mode-panel .m-op { flex-direction: column; gap: 6px; }
.rd #frac-mode-panel .m-op .m-caption { font: 400 11px/1.2 var(--f-mono); letter-spacing: 1px; text-transform: uppercase; color: var(--mute); }
.rd #frac-mode-panel .m-cmp { display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 48px; border-radius: 14px; background: var(--tile); color: var(--accent); font: 600 22px/1 var(--f-ui); }
.rd #frac-mode-panel .m-exp-wrap { grid-template-areas: "sel" "row"; grid-template-columns: auto; }
.rd #frac-mode-panel .m-exp { width: 56px; }
.rd #frac-mode-panel .frac-mode__answer { margin: 20px 0 0; padding: 18px 20px; border-radius: 18px; background: var(--tile); font: 400 15px/1.6 var(--f-ui); color: var(--ink); }
.rd #frac-mode-panel .frac-mode__answer b { font-weight: 600; color: var(--accent); }
.rd #frac-mode-panel .frac-mode__answer sup { font-size: .7em; }
.rd #frac-mode-panel .frac-mode__err { color: var(--bad, #C0392B); }
.rd #frac-mode-panel .frac-mode__copied { color: var(--mute); font-size: 13px; }
.rd #frac-mode-panel .conv-card--in-panel { margin: 0; }

/* ---------- конвертер (в статье и в режиме «Перевод») ---------- */
.rd #frac_converter { margin: 16px 0 24px; padding: 22px; border-radius: 22px; background: var(--card); }
.rd .rd-article__body #frac_converter { background: var(--tile); }
.rd #frac_converter .conv-row { display: flex; flex-direction: column; gap: 8px; margin: 0 0 14px; }
.rd #frac_converter .conv-row label { font: 400 11px/1.3 var(--f-mono); letter-spacing: 1px; text-transform: uppercase; color: var(--mute); }
.rd #frac_converter .conv-select {
    max-width: 100%; height: 46px; padding: 0 36px 0 16px; border: 0; border-radius: 999px; background: var(--pill) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%230D0D0D' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 16px center;
    color: var(--ink); font: 500 15px/1 var(--f-ui); -webkit-appearance: none; appearance: none; cursor: pointer;
}
.rd #frac_converter .conv-inputs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.rd #frac_converter .conv-in { width: 130px; height: 46px; box-sizing: border-box; border: 0; border-radius: 12px; background: var(--pill); color: var(--ink); font: 600 18px/1 var(--f-ui); text-align: center; }
.rd #frac_converter .conv-in:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.rd #frac_converter .conv-in-wide { width: 210px; }
.rd #frac_converter .conv-btn { height: 46px; padding: 0 26px; border: 0; border-radius: 999px; background: var(--ink); color: #fff; font: 600 15px/1 var(--f-ui); cursor: pointer; }
.rd #frac_converter .conv-result { min-height: 24px; margin: 14px 0 0; font: 400 17px/1.5 var(--f-ui); color: var(--ink); }
.rd #frac_converter .conv-result b { color: var(--accent); font-weight: 600; }
.rd #frac_converter .conv-err { color: var(--bad, #C0392B); font-size: 14px; }

/* ---------- статья ---------- */
.rd .rd-article__body .rd-frac-ex { margin: 0 0 16px; padding: 16px 20px; border-radius: 16px; background: var(--tile); }
.rd .rd-article__body .rd-frac-ex .rd-label { display: block; margin: 0 0 6px; }
.rd .rd-article__body .rd-frac-ex p { display: block; margin: 0; font: 400 15px/1.6 var(--f-mono); }
.rd .rd-article__body .rd-frac-ex strong { color: var(--accent); font-weight: 600; }
.rd .rd-article__body p.rd-frac-more { position: relative; display: block; margin: 0 0 24px; padding: 14px 48px 14px 18px; border: 1px solid var(--line); border-radius: 16px; font-size: 15px; line-height: 1.5; }
.rd .rd-article__body p.rd-frac-more + p.rd-frac-more { margin-top: -14px; }
.rd .rd-article__body p.rd-frac-more::after { content: "→"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); color: var(--accent); font: 500 18px/1 var(--f-ui); }

/* шпаргалка сбоку */
.rd .rd-fc { gap: 10px; }
.rd .rd-fc .rd-label { margin: 0; }
.rd .rd-fc__sub { margin-top: 8px !important; }
.rd .rd-fc__item { display: flex; flex-direction: column; gap: 4px; padding: 12px 16px; border-radius: 16px; background: var(--tile); }
.rd .rd-fc__name { font: 400 12px/1.3 var(--f-ui); color: var(--mute); }
.rd .rd-fc__f { font: 600 16px/1.3 var(--f-mono); color: var(--ink); }
.rd .rd-fc__f b { color: var(--accent); font-weight: 600; }
.rd .rd-fc__e { font: 400 13px/1.3 var(--f-mono); color: var(--ink); }
.rd .rd-fc .rd-btn { margin-top: 6px; }

/* ---------- планшет ---------- */
@media (max-width: 1024px) {
    .rd #calc_fraction .rd-frac-sum { grid-template-columns: 1fr; }
    .rd #calc_fraction .rd-frac-sum__side { padding: 14px 0 0; border-left: 0; border-top: 1px solid var(--line); }
}

/* ---------- телефон ---------- */
@media (max-width: 639px) {
    .rd #calc_fraction .rd-frac-seg { display: none; }
    .rd #calc_fraction .frac-mode { margin-bottom: 14px; }
    .rd #calc_fraction .frac-mode__select {
        display: block; width: 100%; min-width: 0; height: 44px; padding: 0 40px 0 16px; border: 0; border-radius: 999px;
        background: var(--pill) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%230D0D0D' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 16px center;
        color: var(--ink); font: 500 16px/1 var(--f-ui); -webkit-appearance: none; appearance: none;
    }
    .rd #calc_fraction .frac-board { gap: 8px; padding: 10px; border-radius: 18px; }
    .rd #calc_fraction .frac-term { flex: 1 1 0; min-width: 0; grid-template-columns: 1fr; grid-template-areas: "sel" "row" "ctl"; justify-items: center; gap: 8px; padding: 10px 8px; border-radius: 16px; }
    .rd #calc_fraction .t-type-select,
    .rd #calc_fraction .frac-term > .m-caption { justify-self: center; }
    .rd #calc_fraction .frac-term__ctl { flex-direction: row; }
    .rd #calc_fraction .frac-row { gap: 6px; }
    .rd #calc_fraction .frac-stack { width: 52px; }
    .rd #calc_fraction .val_fraction { width: 52px; height: 42px; font-size: 18px; }
    .rd #calc_fraction .input-small { width: 40px; }
    .rd #calc_fraction .t-dec { width: 88px; }
    .rd #calc_fraction .change_sign { width: 32px; height: 32px; }
    .rd #calc_fraction .sel-op { width: 40px; height: 40px; font-size: 18px; }
    .rd #calc_fraction .frac-eq { display: none; }
    .rd #calc_fraction .frac-result { flex: 1 1 100%; flex-direction: row; align-items: center; justify-content: flex-start; gap: 12px; padding: 12px 16px; }
    .rd #calc_fraction .frac-result::before { content: "="; font: 500 26px/1 var(--f-ui); color: var(--accent); }
    .rd #calc_fraction .frac-result > .frac-caption { order: -2; margin-right: auto; }
    .rd #calc_fraction .frac-result::before { order: -1; }
    .rd #calc_fraction .frac-result #f3_int { font-size: 28px; }
    .rd #calc_fraction .frac-result.is-whole #f3_num { font-size: 28px; }
    .rd #calc_fraction .rd-frac-ctlrow { flex-direction: column; align-items: stretch; }
    .rd #calc_fraction .board-ctl,
    .rd #calc_fraction .btn-add-frac { width: 100%; }
    .rd #calc_fraction .btn-add-frac { height: 44px; }
    .rd #calc_fraction .rd-frac-hint { text-align: center; font-size: 12px; }
    .rd #calc_fraction .btn-wrapper1 { margin-top: 14px; }
    .rd #calc_fraction .btn-r,
    .rd #calc_fraction .btn-c { flex: 1 1 0; padding: 0 16px; }
    .rd #calc_fraction .frac-chips { flex-wrap: nowrap; overflow-x: auto; margin: 16px -16px 0; padding: 0 16px 4px; scrollbar-width: none; }
    .rd #calc_fraction .frac-chips::-webkit-scrollbar { display: none; }
    .rd #calc_fraction .frac-chips > * { flex: 0 0 auto; }
    .rd #calc_fraction .btn-mini { padding: 0 12px; font-size: 12px; }
    .rd #calc_fraction .calc-actions { gap: 6px; }
    .rd #calc_fraction .rd-frac-res { margin-top: 18px; padding: 18px 16px; border-radius: 18px; }
    .rd #calc_fraction .rd-frac-sum__ans { font-size: 40px; }
    .rd #calc_fraction .rd-bar-row { grid-template-columns: 1fr; gap: 6px; }
    .rd #calc_fraction .rd-bar-cell { width: 12px; height: 12px; border-radius: 3px; }
    .rd #calc_fraction .rd-bar-grp { gap: 2px; }
    .rd #calc_fraction .rd-step { gap: 10px; }
    .rd #frac-mode-panel .m-cmp { width: 36px; height: 44px; font-size: 18px; }
    .rd #frac-mode-panel .m-exp { width: 46px; }
    .rd #frac_converter { padding: 16px; }
    .rd #frac_converter .conv-select { width: 100%; font-size: 16px; }
    .rd #frac_converter .conv-in { flex: 1; min-width: 90px; width: auto; font-size: 16px; }
    .rd #frac_converter .conv-btn { width: 100%; }
    .rd .rd-article__body .rd-frac-ex { padding: 14px 16px; }
    .rd .rd-article__body .rd-frac-ex p { font-size: 14px; }
}

.rd #frac-mode-panel #frac_converter { background: var(--tile); }
.rd #frac-mode-panel .calc-actions { margin: 10px 0 0; }
.rd #frac_converter .conv-in::placeholder { color: var(--mute); font-weight: 400; font-size: 15px; }
.rd #calc_fraction .val_fraction::placeholder { color: var(--mute); font-weight: 400; }
.rd #calc_fraction .rd-frac-res.is-alt .rd-frac-res__head { display: none; }
.rd #calc_fraction .rd-frac-res.is-alt .rd-frac-steps-head { margin-top: 0; padding-top: 0; border-top: 0; }
