/* Converter */
.app-converter { background: var(--surface); container-type: inline-size; }
.cv-split { min-height: 0; }
.cv-side { width: 210px; }
.cv-fav-item .ic { color: #f5a524; }
.cv-mainwrap { min-width: 0; }
.cv-tabs { display: none; }
.cv-main { flex: 1; padding: 22px 28px 28px; display: flex; flex-direction: column; gap: 14px; max-width: 760px; width: 100%; margin: 0 auto; }

.cv-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cv-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cv-title h2 { margin: 0; font-size: 20px; font-weight: 700; }
.cv-title-ic { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #fb923c, #c2410c); flex: 0 0 auto; }
.cv-head .icon-btn.on { color: #f5a524; }
.cv-head .icon-btn.on svg { fill: #f5a524; }

.cv-card { position: relative; display: flex; flex-direction: column; gap: 6px; }
.cv-field {
  display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 12px; border-radius: 18px;
  background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow .15s;
}
.cv-field:focus-within { box-shadow: inset 0 0 0 2px var(--accent); }
.cv-num {
  width: 100%; border: 0; outline: none; background: none; color: var(--text); padding: 0; min-width: 0;
  font-family: var(--font-display); font-size: 40px; font-weight: 300; line-height: 1.15; letter-spacing: -.01em;
}
.cv-field.to .cv-num { font-weight: 400; }
.cv-num.bad { color: #e5484d; }
.cv-num::placeholder { color: var(--text-3); }
.cv-unitrow { display: flex; align-items: center; gap: 6px; }
.cv-unit { flex: 1; min-width: 0; height: 32px; background-color: var(--surface); }
.cv-swap {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 2;
  width: 42px; height: 42px; border-radius: 50%; border: 0; display: grid; place-items: center;
  background: var(--accent); color: var(--accent-fg); box-shadow: 0 0 0 5px var(--surface), 0 4px 12px rgba(0, 0, 0, .2);
  transition: filter .12s;
}
.cv-swap:hover { filter: brightness(1.1); }
.cv-formula { font-size: 13px; color: var(--text-2); padding: 0 4px; min-height: 18px; overflow-wrap: anywhere; }
.cv-formula b { color: var(--text); font-weight: 600; }

.cv-rates { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: rgba(var(--accent-rgb), .1); color: var(--text-2); font-size: 12.5px; }
.cv-rates > span:first-child { color: var(--accent); display: grid; }
.cv-rates.warn { background: rgba(245, 165, 36, .14); }
.cv-rates.warn > span:first-child { color: #d48806; }
.cv-rates-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.cv-rates-t b { color: var(--text); font-weight: 600; }

.cv-subhead { margin: 10px 4px 0; font-size: 12px; font-weight: 700; color: var(--text-3); text-transform: none; }
.cv-all { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 6px; }
.cv-all-row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 9px 12px; border-radius: 11px; border: 0;
  background: var(--surface-2); color: var(--text); text-align: left; min-width: 0; transition: background .12s;
}
.cv-all-row:hover { background: var(--tile-hover); }
.cv-all-row.on { box-shadow: inset 0 0 0 1.5px var(--accent); }
.cv-all-name { font-size: 12.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.cv-all-val { white-space: nowrap; font-size: 13px; text-align: right; overflow: hidden; text-overflow: ellipsis; max-width: 60%; }
.cv-all-val b { font-weight: 600; font-variant-numeric: tabular-nums; }
.cv-all-val small { color: var(--text-3); }
.cv-credit { margin: 4px; font-size: 11.5px; color: var(--text-3); }

@container (max-width: 640px) {
  .cv-side { display: none; }
  .cv-tabs { display: flex; gap: 6px; padding: 8px 12px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); flex: 0 0 auto; background: var(--surface); }
  .cv-tabs::-webkit-scrollbar { display: none; }
  .cv-main { padding: 14px 14px 22px; }
  .cv-num { font-size: 32px; }
  .cv-all { grid-template-columns: 1fr; }
}
