body {
  font-family: system-ui, sans-serif;
  margin: 0;
  padding: 16px;
  background: #f5f5f5;
}

.container {
  max-width: 420px;
  margin: auto;
  background: white;
  padding: 16px;
  border-radius: 12px;
}

/* Titles */
.title-kn {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 4px;
}

.title-en {
  font-size: 13px;
  color: #666;
  margin-bottom: 10px;
}

/* Top icons */
.top-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  margin-bottom: 10px;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: #eee;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-btn:hover {
  background: #ddd;
}

.material-symbols-outlined {
  font-size: 20px;
}

/* Inputs */

.field-block label {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
  display: block;
}

.field-block input {
  width: 100%;
  padding: 12px;
  font-size: 16px;
  border-radius: 8px;
  border: 1px solid #ccc;
  box-sizing: border-box;
}

.inline-label {
  font-size: 12px;
  margin-bottom: 3px;
}

.help-text {
  font-size: 12px;
  color: #666;
  margin-top: 3px;
  opacity: 0.7;
}

/* Error */
input.error {
  border: 2px solid #e53935;
  background: #fff5f5;
}

#errorMsg {
  color: #e53935;
  font-size: 14px;
  margin-top: 8px;
  min-height: 18px;
}

/* Result */
.result {
  margin-top: 14px;
  padding: 12px;
  background: #eef;
  border-radius: 8px;
  font-size: 16px;
}

.result .sub {
  margin-top: 8px;
  font-size: 14px;
}

/* Buttons */
.primary-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 12px;
  margin-top: 10px;
  border: none;
  border-radius: 8px;
  background: #1976d2;
  color: white;
  font-size: 15px;
}



.row-inputs {
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
}

.field-inline {
  flex: 1;
  min-width: 0;
  display: block;   /* 🔥 remove flex */
  text-align: center;
}

.label {
  font-size: 12px;
  text-align: center;
  margin-bottom: 3px;
}

.field-inline input {
  width: 100%;
  padding: 6px;
  font-size: 14px;
  border-radius: 8px;
  border: 1px solid #ccc;
  text-align: center;
  box-sizing: border-box;
}

.button-row {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.secondary-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px;
  border-radius: 8px;
  border: none;
  background: #1976d2;
  color: white;
  font-size: 12px;
}

.result {
  margin-top: 14px;
  padding: 14px;
  background: #eef;
  border-radius: 10px;
}

.result-block {
  margin-bottom: 10px;
}

.label {
  font-size: 12px;
  color: #555;
}

.value {
  font-size: 20px;
  font-weight: 600;
}

.value.small {
  font-size: 16px;
}

.result.compact {
  margin-top: 12px;
  padding: 12px;
  background: #eef;
  border-radius: 10px;
}

.result-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  padding: 4px 0;
  gap: 8px;
}

.result-row .label {
  font-size: 12px;
  color: #555;
}

.result-row .value {
  font-weight: 600;
  font-size: 16px;
  text-align: right;
  min-width: 80px;
}
.result-row .value {
  font-variant-numeric: tabular-nums;
}

.result-row:first-child .value {
  font-size: 18px;
}

.row-inputs {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  gap: 6px;
}

.field-inline {
  flex: 1 !important;
  min-width: 0 !important;
  display: block !important;
}

.field-inline input {
  width: 100% !important;
  padding: 6px !important;
  font-size: 14px !important;
}

.header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.title-block {
  flex: 1;
}

.title-kn {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
}

.title-en {
  font-size: 13px;
  color: #666;
  margin-top: 2px;
}

.header-actions {
  display: flex;
  gap: 6px;
  margin-top: 2px;
}

.inline-label {
  font-size: 12px;
  text-align: center;
}

.inline-sub {
  font-size: 10px;
  color: #777;
  text-align: center;
  margin-bottom: 2px;
}